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 1300454 - virsh shutdown/reboot requests fail to work after the first guest reboot
Summary: virsh shutdown/reboot requests fail to work after the first guest reboot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Wei Huang (AMD)
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1173755
TreeView+ depends on / blocked
 
Reported: 2016-01-20 21:22 UTC by Wei Huang (AMD)
Modified: 2016-04-28 16:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-28 16:51:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Huang (AMD) 2016-01-20 21:22:39 UTC
This bug is related to guest VM shutdown/reboot support for recent GPIO-based powerdown feature.

Symptom:
The 1st shutdown/reboot always worked for a fresh VM. If VM has been rebooted, then shutdown/reboot requests will fail to trigger VM to act (no reaction). In other words,
 * fresh VM -> shutdown (worked) -> fresh VM -> shutdown/reboot (worked)
 * fresh VM -> reboot (worked) -> stale VM -> shutdown/reboot (failed)

How to reproduce:
1. Download QEMU source from at http://git.engineering.redhat.com/git/users/wehuang/rhel7-qemu-kvm.git/log/?h=wei/qemu-rhev-upstream25-backport
2. Use a guest VM with RHELSA 7.3 kernel (4.4+), which supports GPIO fully. Boots this kernel.
3. In virsh, send shutdown/reboot requests to VM using "shutdown" or "reboot" commands.

Comment 2 Wei Huang (AMD) 2016-01-25 20:56:30 UTC
It looks like the problem was caused by GPIO IRQ triggering mechanism. The following patch solves the problem. A patch will be prepared for the upstream.

-Wei


--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -550,7 +550,9 @@ static DeviceState *pl061_dev;
 static void virt_powerdown_req(Notifier *n, void *opaque)
 {
     /* use gpio Pin 3 for power button event */
+    qemu_set_irq(qdev_get_gpio_in(pl061_dev, 3), 0);
     qemu_set_irq(qdev_get_gpio_in(pl061_dev, 3), 1);

Comment 3 Andrew Jones 2016-04-26 13:24:13 UTC
This is a high priority, as it fixes basic functionality. Do we have upstream patches yet?

Comment 4 Wei Huang (AMD) 2016-04-27 15:36:01 UTC
I will test them today with the latest composes (QEMU). Will update the status after complete.

Comment 5 Wei Huang (AMD) 2016-04-28 16:51:49 UTC
Here is my testing results:

SETUP
* Fresh RHELSA installation on Seattle
* Install the latest QEMU compose: qemu-kvm-rhev-2.6.0-0.el7.rc3.aarch64
* Install a new guest VM from 7.2 ISO (RHELSA 7.3 ISO isn't available yet) using virt-install (name it: VM KERNEL 1)
* Download the latest RHELSA 7.3 kernel (kernel-4.5.0-0.34.el7) inside the same VM. Compile and install the kernel-4.5.0-0.34.el7 kernel in guest VM (name it: VM KERNEL 2)

TESTING RESULTS
1) VM KERNEL 1
Shutdown/reboot (in virsh) doesn't work. This is because AMBA fix was not included in RHELSA 7.2 tree. See https://lkml.org/lkml/2015/9/30/392 for details.
2) VM KERNEL 2
Shutdown/reboot (in virsh) work. The issue described in this BZ wasn't observed anymore: no matter how early I issued shutdown/reboot command, guest VM was always able to comply.

CONCLUSION
shutdown/reboot should work properly under ACPI mode for RHELSA 7.3 kernel + QEMU 2.6. We can close this BZ.


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