RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 886798 - Guest should get S3/S4 state according to machine type to avoid cross migration issue
Summary: Guest should get S3/S4 state according to machine type to avoid cross migrati...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 761491
TreeView+ depends on / blocked
 
Reported: 2012-12-13 08:26 UTC by Qunfang Zhang
Modified: 2013-02-21 07:45 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.349.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:45:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0527 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2013-02-20 21:51:08 UTC

Description Qunfang Zhang 2012-12-13 08:26:45 UTC
Description of problem:
Migrate a rhel6.4 guest from a rhel6.2 host (don't support s3/s4) to rhel6.4 host (enabled s3/s4), after migration finished, the s3/s4 is still disabled (even after reboot guest).
Vice versa,if I migrate the guest from rhel6.4 host (enabled s3/s4) to a rhel6.2 host (don't support s3/s4), after migration the s3/s4 is still enabled. And after I implement S4 and resume, guest hit error and can not work well.

Maybe customer will hit this issue when migrate guest from rhel6.4 host to a lower rhel6.2-z host.

Version-Release number of selected component (if applicable):
RHEL6.2-z:
kernel-2.6.32-220.30.1.el6.x86_64
qemu-kvm-0.12.1.2-2.209.el6_2.5.x86_64
seabios-0.6.1.2-8.el6.x86_64

RHEL6.4 host:
2.6.32-347.el6.x86_64
qemu-kvm-0.12.1.2-2.340.el6.x86_64
seabios-0.6.1.2-25.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Boot a guest on rhel6.4 host:
/usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -enable-kvm -name rhel6.4-6.2 -uuid 16d6f013-2940-4124-946a-13da591a3fba -k en-us -rtc base=localtime,clock=host,driftfix=slew -no-kvm-pit-reinjection -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=input0 -drive file=/dev/vg-qz/lv-6.4-6.2,if=none,id=disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x3,drive=disk0,id=disk0  -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide0-1-0,bus=ide.1,unit=0,id=cdrom -netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=44:37:E6:5E:91:5E,bus=pci.0,addr=0x5 -monitor stdio -qmp tcp:0:6666,server,nowait -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -vnc :10 -k en-us -boot c -global  PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0

2. Boot the guest on rhel6.2 host and remove "-global  PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0" with listening mode.

3. #cat /sys/power/state 

4. Migrate guest from rhel6.4 host to rhel6.2-z

5. #cat /sys/power/state

  
Actual results:
After step4: returns "mem disk"
Guest S3/S4 state doesn't change after migration.
And if do s4 and resume, guest got error and can not work well.

Expected results:
Guest should get s3/s4 from machine type. 

Additional info:
If an older host disabled s3/s4 by default while a newer version host enabled s3/s4 by default (not now, assume it in future). There will be problem even migrate guest with same command line.

Comment 2 Amit Shah 2012-12-13 08:52:30 UTC
The key thing here is to have s3 and s4 config options disabled in machine types < rhel-6.3.0.

Comment 3 Ademar Reis 2012-12-14 19:43:41 UTC
(In reply to comment #2)
> The key thing here is to have s3 and s4 config options disabled in machine
> types < rhel-6.3.0.

But s3/s4 is disabled by default in rhel6.4 (see Bug 848369), so we should disable it in rhel-6.4.0 machine type as well.

Would it be safe to change the machine type in the z-stream?

Comment 4 Amit Shah 2012-12-15 05:40:28 UTC
z-stream need not be modified.  We just need to modify the machine types for older RHEL releases in the 6.4 code.

Comment 5 Amit Shah 2012-12-18 08:53:32 UTC
The disable_s3 and disable_s4 properties were added during RHEL6.4 (bug 848369).

With RHEL6.4, we can control the advertisement of s3 and s4 functionality to the guest.

Migrating from 6.4 host (with defaults) to 6.2 host results in a guest-visible change: S3 and S4 suddenly become available.  This is fixable by making the rhel6.2 machine type default to s3/s4 advertisement disabled.

RHEL6.3 had a disabled S3 and S4 advertisement by default, using a BIOS image that didn't advertise S3 and S4.  This too is fixable by making the rhel6.3 machine type default to s3/s4 advertisement disabled.

RHEL6.1 and RHEL6.0 didn't have any special patches in this area, so S3/S4 advertisement was the default value: enabled.  The 6.1 and 6.0 machine types, then, should have the advertisement enabled to not cause guest-visible changes.

As a side note, migrating a RHEL6.0 or RHEL6.1 VM to a RHEL6.2 or 6.3 
host would have caused a guest-visible change, but we can do better 
starting with 6.4, so let's do the right thing now.  This, however, has 
the potential to cause two guest-visible changes if a VM is migrated 
like this:

RHEL6.1 host --1--> RHEL6.3 host --2--> RHEL6.4 host

In (1) above, guest will start seeing S3/S4 advertised.  After (2), 
S3/S4 will go away again.

Comment 6 Amit Shah 2012-12-18 09:35:05 UTC
(In reply to comment #5)
> Migrating from 6.4 host (with defaults) to 6.2 host results in a
> guest-visible change: S3 and S4 suddenly become available.  This is fixable
> by making the rhel6.2 machine type default to s3/s4 advertisement disabled.

Sorry, I meant migrating from 6.2 host to 6.4 host (with defaults) results in a guest-visible change.

Comment 8 Amit Shah 2012-12-20 05:41:58 UTC
Note to QE: the incompatibility is only seen in migrating guests from 6.0 or 6.1 hosts to newer hosts.

6.0/1 -> 6.2/3 hosts: s3/s4 become unavailable (there's nothing we can do about it now).

6.2/3 -> 6.4 hosts: s3/s4 remains disabled by default.

6.0/1 -> 6.4 hosts: s3/s4 remains available by default.


Migrating from 6.2 host to 6.4 host with non-default values for disable_s3/s4 isn't supported, so should not be attempted.

Comment 9 Qunfang Zhang 2012-12-21 10:22:20 UTC
Hi, Amit
I just have a brief test with your build. Currently the S3/S4 will be enabled on rhel6.4 host with -M rhel6.0.0/-M rhel6.1.0 (NOT append -global PIIX4_PM.disable_s3/s4 option). And S3/s4 will be still disalbed on rhel6.4 host with -M rhel6.2.0/-M rhel6.3.0.  And I do some simple migration between rhel6.4 and rhel6.0/rhel6.1 host. Guest works well after migration and the S3/S4 state is correct.

I did not run a complete function run for guest stable ABI. Because we will have another round guest stable abi test soon once get confirmed with the 'info qtree' comparison stuff that we discussed  recently.

Anyway, the build you provided to me works well on the "getting S3/S4 state" and thanks very much.

Comment 13 Qunfang Zhang 2013-01-22 09:22:42 UTC
Verified on qemu-kvm-0.12.1.2-2.352.el6.x86_64, currently guest guests S3/S4 state according to machine type.

Boot guest on rhel6.4 host with different machine type and check the S3/S4 state. All of the below options work as expected. 

1. With "-M rhel6.0.0", S3/S4 will be enabled by default. 
2. With "-M rhel6.1.0", S3/s4 will be enabled by default.
3. With "-M rhel6.2.0", S3/S4 will be disabled by default.
4. With "-M rhel6.3.0", S3/S4 will be disabled by default.

5. Do ping-pong migration between rhel6.1<->rhel6.4 and rhel6.3<->rhel6.4, guest works well after migration. 

So I would like to verified pass this bug. 

And also a full function test for "stable guest abi" will be executed soon after bug 869981 is fixed which is planned to include in snapshot 5. The result will be updated in that bug.

Comment 15 errata-xmlrpc 2013-02-21 07:45:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0527.html


Note You need to log in before you can comment on or make changes to this bug.