Skip to contentSkip to conversation

target-i386: reorder fields in cpu/msr_hyperv_hypercall subsection

PATCH Applied Paolo Bonzini 4 participants 8 messages Apr 2, 2014 – Apr 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-i386: reorder fields in cpu/msr_hyperv_hypercall subsection

The subsection already exists in one well-known enterprise Linux distribution, but for some strange reason the fields were swapped when forward-porting the patch to upstream.

Limit headaches for said enterprise Linux distributor when the time will come to rebase their version of QEMU.

---
 target-i386/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/machine.c +1 -1
index 24bc373..168cab6 100644
@@ -569,8 +569,8 @@ static const VMStateDescription vmstate_msr_hypercall_hypercall = {
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField []) {
-        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_UINT64(env.msr_hv_guest_os_id, X86CPU),
+        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_END_OF_LIST()
     }
 };
Signature · 1 line
1.9.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Paolo Bonzini

The subsection already exists in one well-known enterprise Linux distribution, but for some strange reason the fields were swapped when forward-porting the patch to upstream.

Limit headaches for said enterprise Linux distributor when the time will come to rebase their version of QEMU.

Peter could you pick this up for 2.0 please?

Otherwise we will need to maintain 2.0
compatibility code which is annoying ...

Quoted 20 lines
---
 target-i386/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/machine.c +1 -1
index 24bc373..168cab6 100644
@@ -569,8 +569,8 @@ static const VMStateDescription vmstate_msr_hypercall_hypercall = {
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField []) {
-        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_UINT64(env.msr_hv_guest_os_id, X86CPU),
+        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_END_OF_LIST()
     }
 };
Signature · 1 line
1.9.0
#2 lore raw
Quoted 11 lines · Michael S. Tsirkin
Quoted 8 lines · Paolo Bonzini

The subsection already exists in one well-known enterprise Linux distribution, but for some strange reason the fields were swapped when forward-porting the patch to upstream.

Limit headaches for said enterprise Linux distributor when the time will come to rebase their version of QEMU.

Quoted 6 lines

Peter could you pick this up for 2.0 please?

Otherwise we will need to maintain 2.0
compatibility code which is annoying ...

Applied to master, thanks.

-- PMM

#3 lore raw
In reply to Paolo Bonzini
Quoted 17 lines · Paolo Bonzini

The subsection already exists in one well-known enterprise Linux distribution, but for some strange reason the fields were swapped when forward-porting the patch to upstream.

Limit headaches for said enterprise Linux distributor when the time will come to rebase their version of QEMU.

---
 target-i386/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/machine.c +0 -0
index 24bc373..168cab6 100644

target-i386/machine.c static const VMStateDescription vmstate_msr_hypercall_hypercall = { · line 575

Quoted 8 lines
target-i386/machine.c +1 -1
@@ -569,8 +569,8 @@ static const VMStateDescription vmstate_msr_hypercall_hypercall = {
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField []) {
-        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_UINT64(env.msr_hv_guest_os_id, X86CPU),
+        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_END_OF_LIST()
     }

Surely this is a migration compatibility break and you need to bump the version fields here?

thanks
-- PMM

#4 lore raw

Il 02/04/2014 17:42, Peter Maydell ha scritto:

Quoted 13 lines · Paolo Bonzini
Quoted 12 lines

The subsection already exists in one well-known enterprise Linux distribution, but for some strange reason the fields were swapped when forward-porting the patch to upstream.

Limit headaches for said enterprise Linux distributor when the time will come to rebase their version of QEMU.

---
 target-i386/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines

target-i386/machine.c static const VMStateDescription vmstate_msr_hypercall_hypercall = { · line 575

Quoted 13 lines
target-i386/machine.c +1 -1
index 24bc373..168cab6 100644
@@ -569,8 +569,8 @@ static const VMStateDescription vmstate_msr_hypercall_hypercall = {
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField []) {
-        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_UINT64(env.msr_hv_guest_os_id, X86CPU),
+        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_END_OF_LIST()
     }

Surely this is a migration compatibility break and you need to bump the version fields here?

No, it was introduced in 2.0 so we're still in time.

Paolo

#5 lore raw
In reply to Peter Maydell
Quoted 30 lines · Peter Maydell
Quoted 17 lines · Paolo Bonzini

The subsection already exists in one well-known enterprise Linux distribution, but for some strange reason the fields were swapped when forward-porting the patch to upstream.

Limit headaches for said enterprise Linux distributor when the time will come to rebase their version of QEMU.

---
 target-i386/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/machine.c +0 -0
index 24bc373..168cab6 100644

target-i386/machine.c static const VMStateDescription vmstate_msr_hypercall_hypercall = { · line 575

Quoted 8 lines
target-i386/machine.c +1 -1
@@ -569,8 +569,8 @@ static const VMStateDescription vmstate_msr_hypercall_hypercall = {
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField []) {
-        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_UINT64(env.msr_hv_guest_os_id, X86CPU),
+        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_END_OF_LIST()
     }

Surely this is a migration compatibility break and you need to bump the version fields here?

Quoted 2 lines

thanks
-- PMM

Not if we fix it before we put out 2.0.

#6 lore raw

Am 02.04.2014 17:56, schrieb Michael S. Tsirkin:

Quoted 31 lines · Peter Maydell
Quoted 30 lines · Paolo Bonzini
Quoted 17 lines

The subsection already exists in one well-known enterprise Linux distribution, but for some strange reason the fields were swapped when forward-porting the patch to upstream.

Limit headaches for said enterprise Linux distributor when the time will come to rebase their version of QEMU.

---
 target-i386/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/machine.c +0 -0
index 24bc373..168cab6 100644

target-i386/machine.c static const VMStateDescription vmstate_msr_hypercall_hypercall = { · line 575

Quoted 8 lines
target-i386/machine.c +1 -1
@@ -569,8 +569,8 @@ static const VMStateDescription vmstate_msr_hypercall_hypercall = {
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField []) {
-        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_UINT64(env.msr_hv_guest_os_id, X86CPU),
+        VMSTATE_UINT64(env.msr_hv_hypercall, X86CPU),
         VMSTATE_END_OF_LIST()
     }

Surely this is a migration compatibility break and you need to bump the version fields here?

Quoted 4 lines
Quoted 2 lines

thanks
-- PMM

Not if we fix it before we put out 2.0.

Is the version_id important for that enterprise distribution?

We usually didn't make this depend on the release but on individual changes, so PMM has a point. If someone did a savevm on master and after this patch tries to loadvm it, maybe nothing bad happens in this case but something we could easily prevent.

Regards,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#7 lore raw

Il 02/04/2014 18:10, Andreas Färber ha scritto:

Quoted 6 lines

Is the version_id important for that enterprise distribution?

We usually didn't make this depend on the release but on individual changes, so PMM has a point. If someone did a savevm on master and after this patch tries to loadvm it, maybe nothing bad happens in this case but something we could easily prevent.

In this case most likely they don't have the subsection (it's only there if you use "-cpu foo,hv_something").

A more likely source of breakage if you do savevm on master is that the machine type changed between the time of the savevm and the time of the release. We obviously do not guarantee that between releases.

Paolo