qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Markus Armbruster <armbru@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	glommer@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qdev: Reset hotplugged devices
Date: Sat, 21 Aug 2010 10:19:49 -0500	[thread overview]
Message-ID: <4C6FEE95.4080109@codemonkey.ws> (raw)
In-Reply-To: <m362z4xork.fsf@blackfin.pond.sub.org>

On 08/21/2010 05:07 AM, Markus Armbruster wrote:
>> diff --git a/vl.c b/vl.c
>> index b3e3676..5de1688 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -2968,6 +2968,9 @@ int main(int argc, char **argv, char **envp)
>>       }
>>
>>       qemu_system_reset();
>> +
>> +    qemu_register_reset((void *)qbus_reset_all, sysbus_get_default());
>> +
>>      
> This is inconsistent with qdev_create().  qdev_create() uses null.
>
> I agree with the N.B. in your commit message: the root of the tree
> should be explicit.  Implicit is too much magic.  But you create a
> second kind of magic.  I don't object to how that works, only to having
> two different kinds.
>
> I'd suggest you either make your qemu_reset_all() work like existing
> qdev_create(), i.e. null means root.  Or change qdev_create() to work
> like your qemu_reset_all(), i.e. use sysbus_get_default() instead of
> null.
>    

I'm getting rid of the NULL crap too although it's lower on my qdev 
TODO..  sysbus_get_default() is a heck of a lot easier to grep for 
though than NULL so I'd prefer to use this for now.

Regards,

Anthony Liguori

>>       if (loadvm) {
>>           if (load_vmstate(loadvm)<  0) {
>>               autostart = 0;
>>      

  reply	other threads:[~2010-08-21 15:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 16:19 [Qemu-devel] [PATCH] qdev: Reset hotplugged devices Alex Williamson
2010-08-03 17:41 ` [Qemu-devel] " Glauber Costa
2010-08-20  9:00 ` [Qemu-devel] " Markus Armbruster
2010-08-20 12:41   ` Alex Williamson
2010-08-20 15:47     ` Markus Armbruster
2010-08-20 15:56       ` Anthony Liguori
2010-08-20 16:14         ` Markus Armbruster
2010-08-20 18:12           ` Anthony Liguori
2010-08-20 22:05             ` Alex Williamson
2010-08-21 10:07             ` Markus Armbruster
2010-08-21 15:19               ` Anthony Liguori [this message]
2010-08-23 11:25             ` [Qemu-devel] " Paolo Bonzini
2010-08-23 13:27               ` Anthony Liguori
2010-08-25  3:07         ` [Qemu-devel] " Isaku Yamahata
2010-08-25 12:55           ` Anthony Liguori
2010-08-25 15:17             ` Isaku Yamahata
2010-08-25 16:49               ` Anthony Liguori
2010-08-26  8:38                 ` Isaku Yamahata
2010-08-26 13:02                   ` Anthony Liguori
2010-08-27  3:52                     ` Isaku Yamahata
2010-08-27 17:43                       ` Wei Xu
2010-08-27  7:28                     ` Isaku Yamahata
2010-08-26 13:04                   ` Anthony Liguori
2010-08-26 13:15             ` Avi Kivity
2010-08-26 13:25               ` Anthony Liguori
2010-08-26 14:29                 ` Avi Kivity
2010-08-26 17:39                   ` Blue Swirl
2010-08-23 12:00   ` Avi Kivity
2010-08-23 12:21     ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6FEE95.4080109@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=glommer@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).