New: memset hang on pci device memory using kvm
https://bugzilla.kernel.org/show_bug.cgi?id=115451
Bug ID: 115451
Summary: memset hang on pci device memory using kvm
Product: Virtualization
Version: unspecified
Kernel Version: RHEL - 2.6.18-308.el5
Hardware: Intel
OS: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: kvm
Assignee: [email protected]
Reporter: [email protected]
Regression: Noi have host x86 based rhel system [kernel version - 2.6.18-308.el5]. On this I am trying to boot up a debian amd64 image using qemu with kvm.
On my virtual os i have a pcimem application, through which I R/W any configured memory on pci devices.
Issue is whenever i try to use memset in excess of 156 bytes in my pcimem application to configure any pci device memory, call to memset hangs. However, memcpy work fine in all scenarios.
memset works fine if boot my virtual os without kvm.
my kvm version is :
$/usr/libexec/qemu-kvm --help
QEMU PC emulator version 0.9.1 (kvm-83-maint-snapshot-20090205), Copyright (c) 2003-2008 Fabrice Bellard
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
https://bugzilla.kernel.org/show_bug.cgi?id=115451
Huaitong Han <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Huaitong Han <[email protected]> ---
You should try reproduce it on upstream kernel, and list steps if it can be reproduced, so that many people can help to debug it.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=115451
--- Comment #2 from Gaurav Sharma <[email protected]> --- Following is the system info :
Host machine kernel version : 2.6.18-308.el5
Guest OS : Debian 3.2.0-4-686-pae
KVM vesrion : QEMU PC emulator version 0.9.1
Following are the steps to re-create the issue :
1. Boot the guest OS using QEMU with KVM enabled.
2. lspci will list down the pci devices configured on the guest OS.
3. I have a some PCI device configured with bar0 memory.
4. modify the pcimem.c application to use call memset
// This code is being modified to call memset to do a bulk write transaction case 'w':
fprintf(stderr, "Before doing memset\n");
memset((virt_addr), 1, datalen);
fprintf(stderr, "after doing memset\n");
break;5. Call the pcimem application to write on bar0 memory.
6. It results in memset call in hang, and the application needs to be explicitly killed. I do not get the log message after memset call.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=115451
--- Comment #3 from Gaurav Sharma <[email protected]> --- Created attachment 211901
--> https://bugzilla.kernel.org/attachment.cgi?id=211901&action=edit
Attached is the pcimem application that i use
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=115451
--- Comment #4 from Gaurav Sharma <[email protected]> --- Also, when memset fails, i get following from dmesg on host machine :
emulation failed (pagetable) rip 410bab 66 0f 7f 07 emulation failed (pagetable) rip 410bab 66 0f 7f 07 emulation failed (pagetable) rip 410bab 66 0f 7f 07 emulation failed (pagetable) rip 410bab 66 0f 7f 07
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=115451
Paolo Bonzini <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #5 from Paolo Bonzini <[email protected]> --- Please try on KVM and QEMU version that are less than 7 years old...
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=115451
--- Comment #6 from Gaurav Sharma <[email protected]> --- I am using qemu version 2.2.0 and kvm modules are the default with the host kernel version [RHEL 5.8], which doesn't seems to be that old to me. Any data point am i missing ?
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=115451
--- Comment #7 from Paolo Bonzini <[email protected]> ---
First, RHEL5.8 was released in February 2012, which is 4 years old. The latest RHEL release is 5.11 (September 2014). Second, RHEL5's KVM modules were forked from the upstream kernel around 2009. It hasn't had any features added for at least 5 years.
In any case, this bug tracker is only for the upstream kernel. Even if the bug was identified and fixed, you would have to open a support case with Red Hat to get it in the distribution---and you would probably get it only in RHEL7, or at most (quite unlikely) in RHEL6, because RHEL5 only has major security fixes applied at this point in time.
Anyway, from comment 4, it looks like RHEL5 doesn't have support for SSE instructions (movdqa in this case) to and from PCI BARs. This is supported in upstream since April 2012 (generic support for SSE came in March 2011, while movdqa was added one year later).
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 115451] memset hang on pci device memory using kvm
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=115451
Paolo Bonzini <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |PATCH_ALREADY_AVAILABLESignature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.