qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 24/26] acpi, acpi_piix: factor out GPE logic


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 24/26] acpi, acpi_piix: factor out GPE logic
Date: Mon, 18 Apr 2011 11:22:40 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 04/18/2011 10:47 AM, Isaku Yamahata wrote:
Hmm but it seems that there is another issue.
With the previous patch, I confirmed sts and en are saved as expected.

The related VMStateDescription are defined in acpi_piix.c in
the following order.
vmstate_acpi calls vmstate_gpe. and&vmstate_gpe<  &vmstate_acpi.


(gdb) p &vmstate_gpe
$1 = (const VMStateDescription *) 0x6f0b00
(gdb) p &vmstate_acpi
$2 = (const VMStateDescription *) 0x6f0aa0

So no.

However, your call trace shows something different.
(I'm assuming the stack trace is correct. gdb or compiler optimization?)

static const VMStateDescription vmstate_gpe = {
...

static const VMStateDescription vmstate_acpi = {
     .fields      = (VMStateField []) {
...
         VMSTATE_STRUCT(gpe, PIIX4PMState, 2, vmstate_gpe, ACPIGPE),


>
>  #0  0x000000000049aff4 in qemu_put_be16s (f=0x2427490, pv=0x1ae7580,
>  size=2) at hw/hw.h:108
>  #1  put_uint16 (f=0x2427490, pv=0x1ae7580, size=2) at savevm.c:855
>  #2  0x000000000049c3e4 in vmstate_save_state (f=0x2427490,
>  vmsd=0x6f0b00, opaque=0x21f5ef0) at savevm.c:1436

vmsd = 0x6f0b00 =&vmstate_gpe<<<<<<  correct???

Correct.

opaque = 0x21f5ef0 =&PIIX4PMState->gpe

>  #3  0x000000000049c3b6 in vmstate_save_state (f=0x2427490,
>  vmsd=0x6f0aa0, opaque=0x21f5b90) at savevm.c:1434

vmsd = 0x6f0aa0 =&vmstate_acpi<<<<<<<<<<<<<  correct?

Correct.

opaque = 0x21f5b90 =&PIIX4PMState

opaque seems correct as
0x21f5b90 - 0x21f5ef0 = 0x348 = offsetof(PIIX4PMState, gpe)


On my environment the stack trace looks like
(gdb) where
#0  vmstate_save_state (f=0x25d16d0, vmsd=0x695940, opaque=0x283a218)
     at savevm.c:1374
#1  0x00000000004bb4f7 in vmstate_save_state (f=0x25d16d0, vmsd=0x695a40,
     opaque=0x2839ed0) at savevm.c:1412
...

(gdb) print&vmstate_gpe
$32 = (const VMStateDescription *) 0x695940
(gdb) print&vmstate_acpi
$33 = (const VMStateDescription *) 0x695a40


Are you using qemu-kvm.git or qemu.git? I think there are indeed two issues, your patch fixes the first and there is another that is specific to qemu-kvm.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]