On 2012-09-03 10:51, Jan Kiszka wrote:
>> diff --git a/hw/i8259_common.c b/hw/i8259_common.c
>> index ab3d98b..dcde5f2 100644
>> --- a/hw/i8259_common.c
>> +++ b/hw/i8259_common.c
>> @@ -33,6 +33,7 @@ void pic_reset_common(PICCommonState *s)
>>      s->isr = 0;
>>      s->priority_add = 0;
>>      s->irq_base = 0;
>> +    s->icw3 = 0;
>>      s->read_reg_select = 0;
>>      s->poll = 0;
>>      s->special_mask = 0;
>> @@ -111,6 +112,7 @@ static const VMStateDescription vmstate_pic_common = {
>>          VMSTATE_UINT8(isr, PICCommonState),
>>          VMSTATE_UINT8(priority_add, PICCommonState),
>>          VMSTATE_UINT8(irq_base, PICCommonState),
>> +        VMSTATE_UINT8(icw3, PICCommonState),
> 
> Let's add this as an optional subsection, only written when it's not
> 0x04 (for a master) or 0x2 (for a slave). See target-i386/machine.c for
> examples, or read docs/migration.txt. That will mean you need to set
> icw3 to 0x4 before loading a vmstate (=> pre_load handler).

Oh, and this code affects also the kvm-pic. So you have to maintain icw3
for that model as well, setting it to the PC defaults. Please test KVM
after your changes, including migration.

Jan


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to