qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: blauwirbel@gmail.com, akong@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set
Date: Tue, 15 Jan 2013 20:09:05 +0100	[thread overview]
Message-ID: <50F5A951.7020706@redhat.com> (raw)
In-Reply-To: <50F58992.90005@redhat.com>

On 01/15/13 17:53, Paolo Bonzini wrote:
> Il 15/01/2013 00:47, Laszlo Ersek ha scritto:
>> @@ -442,12 +455,14 @@ static void piix3_reset(void *opaque)
>>      pci_conf[0xae] = 0x00;
>>  
>>      d->pic_levels = 0;
>> +    d->rcr = 0;
>>  }
>>  
>>  static int piix3_post_load(void *opaque, int version_id)
>>  {
>>      PIIX3State *piix3 = opaque;
>>      piix3_update_irq_levels(piix3);
>> +    piix3->rcr &= 2; /* keep System Reset type only */
>>      return 0;
>>  }
>>  
>> @@ -464,7 +479,7 @@ static void piix3_pre_save(void *opaque)
>>  
>>  static const VMStateDescription vmstate_piix3 = {
>>      .name = "PIIX3",
>> -    .version_id = 3,
>> +    .version_id = 4,
>>      .minimum_version_id = 2,
>>      .minimum_version_id_old = 2,
>>      .post_load = piix3_post_load,
>> @@ -473,15 +488,46 @@ static const VMStateDescription vmstate_piix3 = {
>>          VMSTATE_PCI_DEVICE(dev, PIIX3State),
>>          VMSTATE_INT32_ARRAY_V(pci_irq_levels_vmstate, PIIX3State,
>>                                PIIX_NUM_PIRQS, 3),
>> +        VMSTATE_UINT8_V(rcr, PIIX3State, 4),
>>          VMSTATE_END_OF_LIST()
>>      }
> 
> It would be nice to put this in a subsection, since it should be almost
> always 0.

OK, "docs/migration.txt" seems to explain subsections nicely. I'll try
to figure it out. I agree that rcr will be almost always 0 and should
not impede newer-to-older migration if possible.

> Otherwise, the patch looks good.

Thanks for the review!
Laszlo

  reply	other threads:[~2013-01-15 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 23:47 [Qemu-devel] [PATCH] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set Laszlo Ersek
2013-01-15 16:53 ` Paolo Bonzini
2013-01-15 19:09   ` Laszlo Ersek [this message]
2013-01-15 20:04   ` [Qemu-devel] [PATCH v2] " Laszlo Ersek
2013-01-15 20:12     ` [Qemu-devel] v1->v2 diff (PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set) Laszlo Ersek
2013-01-16 10:54     ` [Qemu-devel] [PATCH v2] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set Paolo Bonzini
2013-01-16 18:06     ` 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=50F5A951.7020706@redhat.com \
    --to=lersek@redhat.com \
    --cc=akong@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@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).