From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 285D7C47404 for ; Thu, 10 Oct 2019 01:06:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2EF62086D for ; Thu, 10 Oct 2019 01:06:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SSUdF4O0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2EF62086D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIMul-0003gt-4A for qemu-devel@archiver.kernel.org; Wed, 09 Oct 2019 21:06:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48461) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIMty-00030U-H7 for qemu-devel@nongnu.org; Wed, 09 Oct 2019 21:06:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIMtw-0003Dl-ML for qemu-devel@nongnu.org; Wed, 09 Oct 2019 21:05:58 -0400 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]:40889) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIMtw-0003DI-H3; Wed, 09 Oct 2019 21:05:56 -0400 Received: by mail-oi1-x234.google.com with SMTP id k9so3437509oib.7; Wed, 09 Oct 2019 18:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NF2T/p7EZoElBDCPihxvRc7fyYMOzP9CcsrzyEtRNnc=; b=SSUdF4O0YnW+aJKNQajb/7S5Z2Nc1hOlbXE0EODz3AKu3IiXKsgUQa84phJE4JEosA 7XPWKFuhA01JzQSApfWykDOiMFbglxGD0F8azwr/vmcJMtlGwhnXGNHUYzQctvad6Db1 Ecoj1QuP6FwXMU7/iL8j80A3CxkzYKOZc+cHtGBaSPESGRjcv5e/ShWvyIDWRSKuMEwD vu7aAEERZZOr5HvucUYUKea89dlrm7eowJIEQN7m4pt4l88mN533xNddgcNHuJLWMRps KXWpJNu77Lr3gxfBT9bAF8cB9KWj1fpcTXG60SuAL3b0AQS1XcSrGZkUeka4tf+NLZF3 yBNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NF2T/p7EZoElBDCPihxvRc7fyYMOzP9CcsrzyEtRNnc=; b=cXBGJf7Rr17+rxJs3sQ3zCsWPMl7z+wQyXaULGicUGuO6k8HSi6aptOk/i8kqIxBFu 63Pmmo0tKwagYXJ8uQM/ovy65MJv6cEc88PSbfJOiN4OOIdFQAanS9BnuNgrndzua07/ C6YuZXbyw6q9lxNp2zuGdp6N6YSdvNxnayeTrxefIEB1UhGJHYjLpU88zLYYzQ1959qr oVaNJreuZkDOevY6oqlw7iIERPCMjOruw8H/2PQ7hDaf0wBBcmlSQMW2XuZYhrFfvPJ9 4U6Gv1O9dqzyPIfKl4B1KfjHSlxFWLodwa57GuXW9EziyY2TrUhzQIiTx2wF3vdSq/IG iHFw== X-Gm-Message-State: APjAAAUhV6HVwVIN7hWeAHOFh5+vVK/AmoSNaNwA4cbkUx2yslO7hX2y tX/vEH5FIXrjggGsROqdCKU5HINb4HU42XPcSlo= X-Google-Smtp-Source: APXvYqw0DLyBYkbNBKpf8FnL5uUoX/fQf4kEnrGg9Dk9EX//guD9dc1wEu6kc1DHRxs2qdtC7+DSJfMX2G0Tkv7FMBM= X-Received: by 2002:aca:d18:: with SMTP id 24mr5236456oin.56.1570669555418; Wed, 09 Oct 2019 18:05:55 -0700 (PDT) MIME-Version: 1.0 References: <20191008142539.7793-1-philmd@redhat.com> In-Reply-To: From: Li Qiang Date: Thu, 10 Oct 2019 09:05:19 +0800 Message-ID: Subject: Re: [PATCH v2 0/8] hw: Convert various reset() handler to DeviceReset To: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Content-Type: multipart/alternative; boundary="000000000000e90c8605948400ff" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::234 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Aleksandar Rikalo , Qemu Developers , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Aleksandar Markovic , =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= , Igor Mammedov , John Snow Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000e90c8605948400ff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Philippe Mathieu-Daud=C3=A9 =E4=BA=8E2019=E5=B9=B410=E6= =9C=8810=E6=97=A5=E5=91=A8=E5=9B=9B =E4=B8=8A=E5=8D=883:54=E5=86=99=E9=81= =93=EF=BC=9A > Hi Li, > > On 10/9/19 4:28 AM, Li Qiang wrote: > > Philippe Mathieu-Daud=C3=A9 > =E4=BA=8E > > 2019=E5=B9=B410=E6=9C=888=E6=97=A5=E5=91=A8=E4=BA=8C =E4=B8=8B=E5=8D=88= 10:47=E5=86=99=E9=81=93=EF=BC=9A > > > > Since v1: > > - Removed the pci-host devices > > > > > > Hello I want to know why remove this? > > I haven't removed the devices, I simply remove the patches converting > them to DeviceReset, Yes, I mean the patches. > basically because I've not enough time to check if > the are on a bus that would reset them. IIUC, they are right. > I added these devices on my TODO > list for later, so meanwhile the other devices can be easily reviewed > and merged. When few patches from a series are not reviewed or > incorrect, sometime the rest of the series is not merged, so I prefer to > split it and get these patches merged. As far as I can see, most of the devices' usage of qemu_register_reset function can be convert to 'dc->reset'. In the main function. qemu_register_reset(qbus_reset_all_fn, sysbus_get_default()); The 'qbus_reset_all_fn' calls 'qbus_reset_all' from the 'main-sys-bus'. Then 'qdev_reset_one' will call 'device_reset'. So IIUC every bus attached to 'main-sys-bus' can be reset through 'dc->reset' So I'm quite sure most of the cases that devices use 'qemu_register_reset' can be changed to 'dc->reset'. Seems you're busy, If you don't mind, I can do some of the work to convert 'reset' callback(not a patchset, one by one). Thanks, Li Qiang > > > > > - Removed the vmcoreinfo conversion (elmarco) but add a comment. > > - Added Igor's R-b tag. > > > > Following the thread discussion between Peter/Markus/Damien about > > reset handlers: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg617103.html > > I started to remove qemu_register_reset() calls from few qdevified > > devices (the trivial ones). > > > > Regards, > > > > Phil. > > > > v1: > https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg06367.html > > > > Philippe Mathieu-Daud=C3=A9 (8): > > hw/acpi/piix4: Convert reset handler to DeviceReset > > hw/isa/piix4: Convert reset handler to DeviceReset > > hw/ide/piix: Convert reset handler to DeviceReset > > hw/ide/sii3112: Convert reset handler to DeviceReset > > hw/ide/via82c: Convert reset handler to DeviceReset > > hw/isa/vt82c686: Convert reset handler to DeviceReset > > hw/input/lm832x: Convert reset handler to DeviceReset > > hw/misc/vmcoreinfo: Document its reset handler > --000000000000e90c8605948400ff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
Philippe Mathieu-Daud=C3=A9 <philmd@redhat.com> =E4=BA=8E2019=E5= =B9=B410=E6=9C=8810=E6=97=A5=E5=91=A8=E5=9B=9B =E4=B8=8A=E5=8D=883:54=E5=86= =99=E9=81=93=EF=BC=9A
Hi Li,

On 10/9/19 4:28 AM, Li Qiang wrote:
> Philippe Mathieu-Daud=C3=A9 <philmd@redhat.com <mailto:philmd@redhat.com>> =E4=BA=8E
> 2019=E5=B9=B410=E6=9C=888=E6=97=A5=E5=91=A8=E4=BA=8C =E4=B8=8B=E5=8D= =8810:47=E5=86=99=E9=81=93=EF=BC=9A
>
>=C2=A0 =C2=A0 =C2=A0Since v1:
>=C2=A0 =C2=A0 =C2=A0- Removed the pci-host devices
>
>
> Hello=C2=A0 I want to know why=C2=A0 remove this?

I haven't removed the devices, I simply remove the patches converting <= br> them to DeviceReset,

Yes, I mean the patch= es.
=C2=A0
basically because I've not enough time to check if
the are on a bus that would reset them.

II= UC, they are right.
=C2=A0
I added these devices on my TODO
list for later, so meanwhile the other devices can be easily reviewed
and merged. When few patches from a series are not reviewed or
incorrect, sometime the rest of the series is not merged, so I prefer to split it and get these patches merged.

As f= ar as I can see, most of the devices' usage of qemu_register_reset func= tion can be=C2=A0
convert to 'dc->reset'. In the main = function.

qemu_register_reset(qbus_reset_all_fn, s= ysbus_get_default());

The 'qbus_reset_all_fn&#= 39; calls 'qbus_reset_all' from the 'main-sys-bus'. Then &#= 39;qdev_reset_one'
will call 'device_reset'. So IIUC = every bus attached to 'main-sys-bus' can be reset through 'dc-&= gt;reset'

So I'm quite sure most of the ca= ses that devices use 'qemu_register_reset' can be changed to 'd= c->reset'.
Seems you're busy,=C2=A0 If you don't m= ind, I can do some of the work to convert 'reset' callback(not a pa= tchset, one by one).

Thanks,
Li Qiang

=C2=A0
=C2=A0

>
>=C2=A0 =C2=A0 =C2=A0- Removed the vmcoreinfo conversion (elmarco) but a= dd a comment.
>=C2=A0 =C2=A0 =C2=A0- Added Igor's R-b tag.
>
>=C2=A0 =C2=A0 =C2=A0Following the thread discussion between Peter/Marku= s/Damien about
>=C2=A0 =C2=A0 =C2=A0reset handlers:
>=C2=A0 =C2=A0 =C2=A0https://www= .mail-archive.com/qemu-devel@nongnu.org/msg617103.html
>=C2=A0 =C2=A0 =C2=A0I started to remove qemu_register_reset() calls fro= m few qdevified
>=C2=A0 =C2=A0 =C2=A0devices (the trivial ones).
>
>=C2=A0 =C2=A0 =C2=A0Regards,
>
>=C2=A0 =C2=A0 =C2=A0Phil.
>
>=C2=A0 =C2=A0 =C2=A0v1: https= ://lists.gnu.org/archive/html/qemu-devel/2019-09/msg06367.html
>
>=C2=A0 =C2=A0 =C2=A0Philippe Mathieu-Daud=C3=A9 (8):
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/acpi/piix4: Convert reset handler to Dev= iceReset
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/isa/piix4: Convert reset handler to Devi= ceReset
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/ide/piix: Convert reset handler to Devic= eReset
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/ide/sii3112: Convert reset handler to De= viceReset
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/ide/via82c: Convert reset handler to Dev= iceReset
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/isa/vt82c686: Convert reset handler to D= eviceReset
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/input/lm832x: Convert reset handler to D= eviceReset
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 hw/misc/vmcoreinfo: Document its reset hand= ler
--000000000000e90c8605948400ff--