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 1083969 - libguestfs-test-tool hangs when the guest is boot with -cpu host
Summary: libguestfs-test-tool hangs when the guest is boot with -cpu host
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kernel
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Marcelo Tosatti
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1038427 (view as bug list)
Depends On:
Blocks: 833649
TreeView+ depends on / blocked
 
Reported: 2014-04-03 10:22 UTC by Qian Guo
Modified: 2019-03-22 11:27 UTC (History)
10 users (show)

Fixed In Version: kernel-3.10.0-186.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 11:48:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libguestfs-test-tool result of cpu host (15.20 KB, text/plain)
2014-04-03 10:23 UTC, Qian Guo
no flags Details
libguestfs-test-tool result of cpu SandyBridge (48.13 KB, text/plain)
2014-04-03 10:23 UTC, Qian Guo
no flags Details
test with comment7, libguestfs-test-tool can finish with -cpu host (47.61 KB, text/plain)
2014-09-23 03:12 UTC, Qian Guo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0290 0 normal SHIPPED_LIVE Important: kernel security, bug fix, and enhancement update 2015-03-05 16:13:58 UTC

Description Qian Guo 2014-04-03 10:22:24 UTC
Description of problem:
Boot guest with -cpu host in host which nested enabled, when run the libguestfs-test-tool, the tool hangs at 
...
[    1.347651] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
...
Version-Release number of selected component (if applicable):
kernel of both host and guest:
# uname -r
3.10.0-118.el7.x86_64

# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-1.5.3-60.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Enable nested in host:
# modprobe -r kvm_intel
# modprobe kvm_intel nested=1
# cat /sys/module/kvm_intel/parameters/nested 
Y

2.Boot rhel7 guest with -cpu host:
# /usr/libexec/qemu-kvm -S -name rhel7 -M pc -nodefaults -vga std  -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 -drive id=drive_image1,if=none,cache=none,aio=native,file=/home/rhel70326cp1.qcow2_v3 -device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0,addr=04 -device virtio-net-pci,mac=16:33:3f:09:12:78,id=vnet0,netdev=hostdev0,bus=pci.0,addr=05 -netdev tap,id=hostdev0,vhost=on,script=/etc/qemu-ifup -m 4G -smp 4,sockets=1,cores=4,threads=1 -cpu host  -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :3 -rtc base=localtime,clock=host,driftfix=slew -boot menu=on -enable-kvm -monitor stdio -qmp unix:/tmp/q1,server,nowait -device virtio-balloon-pci,id=b1

3.Inside guest:
# libguestfs-test-tool

Actual results:
The tool hangs at 

...
[    1.347651] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
...

Expected results:
libguestfs-test-tool can finish successfully

Additional info:
Host infos (24 cpus in total)
# cat /proc/cpuinfo  
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 45
model name	: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
stepping	: 7
microcode	: 0x710
cpu MHz		: 2221.093
cache size	: 15360 KB
physical id	: 0
siblings	: 12
core id		: 0
cpu cores	: 6
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4000.13
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

.....
.....

processor	: 23
vendor_id	: GenuineIntel
cpu family	: 6
model		: 45
model name	: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
stepping	: 7
microcode	: 0x710
cpu MHz		: 1460.156
cache size	: 15360 KB
physical id	: 1
siblings	: 12
core id		: 5
cpu cores	: 6
apicid		: 43
initial apicid	: 43
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4004.59
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:


2.Test with -cpu SandyBridge/Penryn, won't hit this issue.

3.Will attach the whole logs of -cpu host and -cpu SandyBridge

Comment 1 Qian Guo 2014-04-03 10:23:10 UTC
Created attachment 882211 [details]
libguestfs-test-tool result of cpu host

Comment 2 Qian Guo 2014-04-03 10:23:38 UTC
Created attachment 882212 [details]
libguestfs-test-tool result of cpu SandyBridge

Comment 4 Qian Guo 2014-04-03 10:58:46 UTC
According to bug 986048 comment 31 , I reproduced this issue and file this bug, this bug is not a regression.

Comment 5 Ademar Reis 2014-04-04 18:13:43 UTC
Reassigning to Marcelo. Maybe it's a dupe of Bug 1038427?

Comment 6 Marcelo Tosatti 2014-04-11 21:24:04 UTC
(In reply to Ademar Reis from comment #5)
> Reassigning to Marcelo. Maybe it's a dupe of Bug 1038427?

Ademar, it is not because bug of BZ 1038427 results in 

[70040.943669] nested_vmx_run: VMCS MSR_{LOAD,STORE} unsupported

Comment 9 Qian Guo 2014-09-23 03:12:43 UTC
Created attachment 940236 [details]
test with comment7, libguestfs-test-tool can finish with -cpu host

Comment 11 Marcelo Tosatti 2014-09-24 17:47:14 UTC
*** Bug 1038427 has been marked as a duplicate of this bug. ***

Comment 13 Jarod Wilson 2014-10-10 19:44:34 UTC
Patch(es) available on kernel-3.10.0-186.el7

Comment 16 Qian Guo 2014-11-05 08:12:55 UTC
Reproduced this bug with kernel-3.10.0-183.el7

Steps:
1.Confirm nested =1
# cat /sys/module/kvm_intel/parameters/nested 
Y

2.Boot guest with -cpu host
# /usr/libexec/qemu-kvm -S -name rhel7 -M pc -nodefaults -vga std  -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 -drive id=drive_image1,if=none,cache=none,aio=native,file=/home/rhel7u1/rhel7u1cp1.qcow2 -device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0,addr=04 -device virtio-net-pci,mac=16:33:3f:09:12:78,id=vnet0,netdev=hostdev0,bus=pci.0,addr=05 -netdev tap,id=hostdev0,vhost=on,script=/etc/qemu-ifup -m 4G -smp 4,sockets=1,cores=4,threads=1 -cpu host  -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :3 -rtc base=localtime,clock=host,driftfix=slew -boot menu=on -enable-kvm -monitor stdio -qmp unix:/tmp/q1,server,nowait -device virtio-balloon-pci,id=b1 

3.Inside guest:
# libguestfs-test-tool

Actual results:
The tool hangs at 

...
NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
...

So this bug is reproduced 

Verify this bug with kernel-3.10.0-197.el7.x86_64 and qemu-kvm-rhev-2.1.2-6.el7.x86_64

Steps as above,

result, 
Guest# libguestfs-test-tool 
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
SELinux: Enforcing
...
libguestfs: closing guestfs handle 0x7fb2fcb2de80 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfstIGn2Z
===== TEST FINISHED OK =====

So this bug is fixed

Comment 18 errata-xmlrpc 2015-03-05 11:48:14 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.

https://rhn.redhat.com/errata/RHSA-2015-0290.html


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