[PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Tian, Kevin
Hi, Avi, Here comes the patch: KVM: APIC: avoid instruction emulation for EOI writes Instruction emulation for EOI writes can be skipped, since sane guest simply uses MOV instead of string operations. This is a nice improvement when guest doesn't support x2apic or hyper-V

RE: [PATCH] KVM: emulate lapic tsc deadline timer for hvm

2011-08-29 Thread Tian, Kevin
From: Marcelo Tosatti Sent: Tuesday, August 23, 2011 6:47 PM + if (!apic-lapic_timer.tscdeadline) + return; + + tsc_target = kvm_x86_ops- + guest_to_host_tsc(apic-lapic_timer.tscdeadline); + rdtscll(tsc_now); +

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Avi Kivity
On 08/29/2011 09:09 AM, Tian, Kevin wrote: static int handle_apic_access(struct kvm_vcpu *vcpu) { + unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); + int access_type, offset; + + access_type = (exit_qualification 12) 0xf; + offset =

RE: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Tian, Kevin
From: Avi Kivity [mailto:a...@redhat.com] Sent: Monday, August 29, 2011 3:24 PM On 08/29/2011 09:09 AM, Tian, Kevin wrote: static int handle_apic_access(struct kvm_vcpu *vcpu) { + unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); + int access_type, offset;

RE: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Sasha Levin
On Mon, 2011-08-29 at 15:35 +0800, Tian, Kevin wrote: From: Avi Kivity [mailto:a...@redhat.com] Sent: Monday, August 29, 2011 3:24 PM On 08/29/2011 09:09 AM, Tian, Kevin wrote: static int handle_apic_access(struct kvm_vcpu *vcpu) { + unsigned long exit_qualification =

[Bug 39412] Win Vista and Win2K8 guests' network breaks down

2011-08-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=39412 Jay Ren yongjie@intel.com changed: What|Removed |Added Status|NEEDINFO|CLOSED

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Avi Kivity
On 08/29/2011 11:15 AM, Sasha Levin wrote: +#define APIC_ACCESS_TYPE_W 1 /* Linear write access during inst execution */ static int handle_apic_access(struct kvm_vcpu *vcpu) { + unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); + int access_type, offset; + +

[Bug 39412] Win Vista and Win2K8 guests' network breaks down

2011-08-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=39412 Florian Mickler flor...@mickler.org changed: What|Removed |Added Resolution|CODE_FIX|UNREPRODUCIBLE

Re: [PATCH 3/5] Migration thread mutex

2011-08-29 Thread Stefan Hajnoczi
On Sat, Aug 27, 2011 at 7:09 PM, Umesh Deshpande udesh...@redhat.com wrote: This patch implements migrate_ram mutex, which protects the RAMBlock list traversal in the migration thread during the transfer of a ram from their addition/removal from the iothread. Note: Combination of iothread

Re: [PATCH 5/5] Separate migration thread

2011-08-29 Thread Stefan Hajnoczi
On Sat, Aug 27, 2011 at 7:09 PM, Umesh Deshpande udesh...@redhat.com wrote: This patch creates a separate thread for the guest migration on the source side. All exits (on completion/error) from the migration thread are handled by a bottom handler, which is called from the iothread.

Re: [PATCH 0/5] Separate thread for VM migration

2011-08-29 Thread Paolo Bonzini
On 08/27/2011 08:09 PM, Umesh Deshpande wrote: Following patch series deals with VCPU and iothread starvation during the migration of a guest. Currently the iothread is responsible for performing the guest migration. It holds qemu_mutex during the migration and doesn't allow VCPU to enter the

qemu-kvm 0.15.0 boot order not working

2011-08-29 Thread Peter Lieven
Hi, when I specify something like qemu -boot order=dc -cdrom image.iso -drive file=img.raw,if=virtio,boot=yes or qemu -boot order=n -cdrom image.iso -drive file=img.raw,if=virtio,boot=yes with qemu-kvm 0.15.0 it will always directly boot from the hardrive and not from cdrom or network. is

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Jan Kiszka
On 2011-08-29 08:09, Tian, Kevin wrote: Hi, Avi, Here comes the patch: KVM: APIC: avoid instruction emulation for EOI writes Instruction emulation for EOI writes can be skipped, since sane guest simply uses MOV instead of string operations. This is a nice

Re: HPET configuration in Seabios

2011-08-29 Thread Jan Kiszka
On 2011-08-29 07:32, Avi Kivity wrote: On 08/29/2011 01:14 AM, Kevin O'Connor wrote: On Sun, Aug 28, 2011 at 10:42:49PM +0200, Jan Kiszka wrote: On 2011-08-28 20:54, Alexander Graf wrote: On 28.08.2011, at 02:42, Avi Kivity wrote: On 08/26/2011 08:32 AM, ya su wrote:

Re: [AUTOTEST][PATCH][KVM] Add test for problem with killing guest when network is under load.

2011-08-29 Thread Lukáš Doktor
Thanks, this patch works well. Acked-by: Lukas Doktor ldok...@redhat.com Dne 26.8.2011 10:31, Jiří Župka napsal(a): This patch contain two tests. 1) Try kill guest when guest netwok is under loading. 2) Try kill guest after multiple adding and removing network drivers. Signed-off-by: Jiří

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Avi Kivity
On 08/29/2011 01:24 PM, Jan Kiszka wrote: static int handle_apic_access(struct kvm_vcpu *vcpu) { + unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); + int access_type, offset; + + access_type = (exit_qualification 12) 0xf; + offset = exit_qualification 0xfff;

Re: HPET configuration in Seabios

2011-08-29 Thread Avi Kivity
On 08/29/2011 01:25 PM, Jan Kiszka wrote: Can't seabios just poke at the hpet itself and see if it exists or not? Would be hard for the BIOS to guess the locations of the blocks unless we define the addresses used by QEMU as something like base + hpet_no * block_size in all cases.

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Jan Kiszka
On 2011-08-29 12:59, Avi Kivity wrote: On 08/29/2011 01:24 PM, Jan Kiszka wrote: static int handle_apic_access(struct kvm_vcpu *vcpu) { + unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); + int access_type, offset; + + access_type = (exit_qualification 12)

Re: HPET configuration in Seabios

2011-08-29 Thread Jan Kiszka
On 2011-08-29 13:00, Avi Kivity wrote: On 08/29/2011 01:25 PM, Jan Kiszka wrote: Can't seabios just poke at the hpet itself and see if it exists or not? Would be hard for the BIOS to guess the locations of the blocks unless we define the addresses used by QEMU as something like base +

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Avi Kivity
On 08/29/2011 02:03 PM, Jan Kiszka wrote: Just reading the first byte requires a guest page table walk. This is probably the highest cost in emulation (which also requires a walk for the data access). And what about caching the result of the first walk? Usually, a sane guest won't have

Re: HPET configuration in Seabios

2011-08-29 Thread Avi Kivity
On 08/29/2011 02:05 PM, Jan Kiszka wrote: On 2011-08-29 13:00, Avi Kivity wrote: On 08/29/2011 01:25 PM, Jan Kiszka wrote: Can't seabios just poke at the hpet itself and see if it exists or not? Would be hard for the BIOS to guess the locations of the blocks unless we define the

Re: HPET configuration in Seabios

2011-08-29 Thread Jan Kiszka
On 2011-08-29 13:05, Jan Kiszka wrote: On 2011-08-29 13:00, Avi Kivity wrote: On 08/29/2011 01:25 PM, Jan Kiszka wrote: Can't seabios just poke at the hpet itself and see if it exists or not? Would be hard for the BIOS to guess the locations of the blocks unless we define the addresses

Re: [PATCH 3/3] KVM: x86 emulator: fuzz tester

2011-08-29 Thread Avi Kivity
On 08/26/2011 01:17 AM, Lucas Meneghel Rodrigues wrote: I still haven't gone through all the code, but it's a good idea to put a MODULE_LICENSE(GPL) macro around here, so the build system doesn't complain about it: WARNING: modpost: missing MODULE_LICENSE() in arch/x86/kvm/test-emulator.o

Re: [PATCH 0/3] Emulator fuzz tester

2011-08-29 Thread Avi Kivity
On 08/26/2011 03:11 AM, Lucas Meneghel Rodrigues wrote: Lucas, how would we go about integrating this into kvm-autotest? I have applied the 3 patches on your latest tree, compiled the kernel but I'm having trouble in running the test the way you described. One thing I've noticed here: I

[PATCH] kvm tools: Add ivshmem device

2011-08-29 Thread Sasha Levin
The patch adds an ivshmem device which can be used to share memory between guests on the same host. This implementation is lacking inter-guest communication which should be implemented later once information regarding the client-server protocol is gathered, though infrastructure used to add and

[PATCH] KVM: Document KVM_IRQFD

2011-08-29 Thread Sasha Levin
Avi Kivity a...@redhat.com Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- Documentation/virtual/kvm/api.txt | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt

[PATCH resend] KVM: Document KVM_IRQFD

2011-08-29 Thread Sasha Levin
Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- Documentation/virtual/kvm/api.txt | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt

Re: [PATCH resend] KVM: Document KVM_IRQFD

2011-08-29 Thread Avi Kivity
On 08/29/2011 03:34 PM, Sasha Levin wrote: Cc: Avi Kivitya...@redhat.com Cc: Marcelo Tosattimtosa...@redhat.com Signed-off-by: Sasha Levinlevinsasha...@gmail.com Thanks, applied. +Returns: 0 on success, !0 on error + -1 (I fixed this). -- error compiling committee.c: too many arguments to

Re: [PATCH 3/3] KVM: x86 emulator: fuzz tester

2011-08-29 Thread Avi Kivity
On 08/25/2011 10:04 PM, Avi Kivity wrote: Also fuzzing from an actual guest is useful to test the real backend functions. What problem did you encounter? The new testsuite scheme seems a good fit for that (with the exception of being locked to 32-bit mode). Mostly that I forgot it exists.

Re: [PATCH resend] KVM: Document KVM_IRQFD

2011-08-29 Thread Sasha Levin
On Mon, 2011-08-29 at 15:37 +0300, Avi Kivity wrote: On 08/29/2011 03:34 PM, Sasha Levin wrote: Cc: Avi Kivitya...@redhat.com Cc: Marcelo Tosattimtosa...@redhat.com Signed-off-by: Sasha Levinlevinsasha...@gmail.com Thanks, applied. +Returns: 0 on success, !0 on error + -1 (I

Re: [PATCH resend] KVM: Document KVM_IRQFD

2011-08-29 Thread Avi Kivity
On 08/29/2011 03:43 PM, Sasha Levin wrote: On Mon, 2011-08-29 at 15:37 +0300, Avi Kivity wrote: On 08/29/2011 03:34 PM, Sasha Levin wrote: Cc: Avi Kivitya...@redhat.com Cc: Marcelo Tosattimtosa...@redhat.com Signed-off-by: Sasha Levinlevinsasha...@gmail.com Thanks, applied.

Re: [PATCH 3/5] Migration thread mutex

2011-08-29 Thread Umesh Deshpande
On 08/29/2011 05:04 AM, Stefan Hajnoczi wrote: On Sat, Aug 27, 2011 at 7:09 PM, Umesh Deshpandeudesh...@redhat.com wrote: This patch implements migrate_ram mutex, which protects the RAMBlock list traversal in the migration thread during the transfer of a ram from their addition/removal from

Re: [PATCH 5/5] Separate migration thread

2011-08-29 Thread Umesh Deshpande
On 08/29/2011 05:09 AM, Stefan Hajnoczi wrote: On Sat, Aug 27, 2011 at 7:09 PM, Umesh Deshpandeudesh...@redhat.com wrote: This patch creates a separate thread for the guest migration on the source side. All exits (on completion/error) from the migration thread are handled by a bottom handler,

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Jan Kiszka
On 2011-08-29 13:11, Avi Kivity wrote: On 08/29/2011 02:03 PM, Jan Kiszka wrote: Just reading the first byte requires a guest page table walk. This is probably the highest cost in emulation (which also requires a walk for the data access). And what about caching the result of the first

[no subject]

2011-08-29 Thread David Ahern
subscribe -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Avi Kivity
On 08/29/2011 04:55 PM, Jan Kiszka wrote: On 2011-08-29 13:11, Avi Kivity wrote: On 08/29/2011 02:03 PM, Jan Kiszka wrote: Just reading the first byte requires a guest page table walk. This is probably the highest cost in emulation (which also requires a walk for the data access).

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Michael S. Tsirkin
So how about something like the following? Compile tested only, and I'm not sure I got the ipr and iov error handling right. Comments? Subject: [PATCH] pci: fail block usercfg access on reset Anyone who wants to block usercfg access will also want to block reset from userspace. On the other

Re: Questions regarding ivshmem spec

2011-08-29 Thread Sasha Levin
On Thu, 2011-08-25 at 16:29 +0300, Sasha Levin wrote: Hello, I am looking to implement an ivshmem device for KVM tools, the purpose is to provide same functionality as QEMU and interoperability with QEMU. [snip] 1. File handles and guest IDs are passed between the server and the peers

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Jan Kiszka
On 2011-08-29 17:05, Michael S. Tsirkin wrote: So how about something like the following? Compile tested only, and I'm not sure I got the ipr and iov error handling right. Comments? This still doesn't synchronize two callers of pci_block_user_cfg_access unless one was reset. We may not have

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Michael S. Tsirkin
On Mon, Aug 29, 2011 at 05:42:16PM +0200, Jan Kiszka wrote: On 2011-08-29 17:05, Michael S. Tsirkin wrote: So how about something like the following? Compile tested only, and I'm not sure I got the ipr and iov error handling right. Comments? This still doesn't synchronize two callers

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Jan Kiszka
On 2011-08-29 17:58, Michael S. Tsirkin wrote: On Mon, Aug 29, 2011 at 05:42:16PM +0200, Jan Kiszka wrote: I still don't get what prevents converting ipr to allow plain mutex synchronization. My vision is: - push reset-on-error of ipr into workqueue (or threaded IRQ?) - require mutex

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Michael S. Tsirkin
On Mon, Aug 29, 2011 at 06:14:39PM +0200, Jan Kiszka wrote: On 2011-08-29 17:58, Michael S. Tsirkin wrote: On Mon, Aug 29, 2011 at 05:42:16PM +0200, Jan Kiszka wrote: I still don't get what prevents converting ipr to allow plain mutex synchronization. My vision is: - push reset-on-error

[Bug 39412] Win Vista and Win2K8 guests' network breaks down

2011-08-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=39412 --- Comment #10 from Rafael J. Wysocki r...@sisk.pl 2011-08-29 16:23:57 --- On Monday, August 29, 2011, Ren, Yongjie wrote: I've verified this bug in Linus' tree 3.1.0-rc4. It got fixed, so I closed the bug. The commit I tried is below.

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Jan Kiszka
On 2011-08-29 18:23, Michael S. Tsirkin wrote: On Mon, Aug 29, 2011 at 06:14:39PM +0200, Jan Kiszka wrote: On 2011-08-29 17:58, Michael S. Tsirkin wrote: On Mon, Aug 29, 2011 at 05:42:16PM +0200, Jan Kiszka wrote: I still don't get what prevents converting ipr to allow plain mutex

RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Yoder Stuart-B08248
Alex Graf, Scott Wood, and I met last week to try to flesh out some details as to how vfio could work for non-PCI devices, like we have in embedded systems. This most likely will require a different kernel driver than vfio-- for now we are calling it dtio (for device tree I/O) as there is no way

Re: Questions regarding ivshmem spec

2011-08-29 Thread Cam Macdonell
On Mon, Aug 29, 2011 at 9:25 AM, Sasha Levin levinsasha...@gmail.com wrote: On Thu, 2011-08-25 at 16:29 +0300, Sasha Levin wrote: Hello, I am looking to implement an ivshmem device for KVM tools, the purpose is to provide same functionality as QEMU and interoperability with QEMU. [snip]

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Jan Kiszka
On 2011-08-29 17:42, Jan Kiszka wrote: I still don't get what prevents converting ipr to allow plain mutex synchronization. My vision is: - push reset-on-error of ipr into workqueue (or threaded IRQ?) I'm starting to like your proposal: I had a look at ipr, but it turned out to be anything

Re: [PATCH 1/5] Support for vm_stop from the migration thread

2011-08-29 Thread Marcelo Tosatti
On Sat, Aug 27, 2011 at 02:09:44PM -0400, Umesh Deshpande wrote: Currently, when any thread other than iothread calls vm_stop, it is scheduled to be executed later by the iothread. This patch allows the execution of vm_stop from threads other than iothread. This is especially helpful when the

Re: [PATCH 3/5] Migration thread mutex

2011-08-29 Thread Marcelo Tosatti
On Sat, Aug 27, 2011 at 02:09:46PM -0400, Umesh Deshpande wrote: This patch implements migrate_ram mutex, which protects the RAMBlock list traversal in the migration thread during the transfer of a ram from their addition/removal from the iothread. Note: Combination of iothread mutex and

Re: [PATCH 5/5] Separate migration thread

2011-08-29 Thread Marcelo Tosatti
On Sat, Aug 27, 2011 at 02:09:48PM -0400, Umesh Deshpande wrote: This patch creates a separate thread for the guest migration on the source side. All exits (on completion/error) from the migration thread are handled by a bottom handler, which is called from the iothread. Signed-off-by:

Re: [Qemu-devel] RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Anthony Liguori
On 08/29/2011 11:51 AM, Yoder Stuart-B08248 wrote: Alex Graf, Scott Wood, and I met last week to try to flesh out some details as to how vfio could work for non-PCI devices, like we have in embedded systems. This most likely will require a different kernel driver than vfio-- for now we are

Re: Broken pci_block_user_cfg_access interface

2011-08-29 Thread Michael S. Tsirkin
On Mon, Aug 29, 2011 at 08:47:07PM +0200, Jan Kiszka wrote: On 2011-08-29 17:42, Jan Kiszka wrote: I still don't get what prevents converting ipr to allow plain mutex synchronization. My vision is: - push reset-on-error of ipr into workqueue (or threaded IRQ?) I'm starting to like your

Re: [Qemu-devel] RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Scott Wood
On 08/29/2011 02:04 PM, Anthony Liguori wrote: On 08/29/2011 11:51 AM, Yoder Stuart-B08248 wrote: Instead of config space fixed at 0xf, we would propose a header and multiple 'device info' records at offset 0x0 that would encode everything that user space needs to know about the device:

Re: RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Alex Williamson
On Mon, 2011-08-29 at 16:51 +, Yoder Stuart-B08248 wrote: Alex Graf, Scott Wood, and I met last week to try to flesh out some details as to how vfio could work for non-PCI devices, like we have in embedded systems. This most likely will require a different kernel driver than vfio-- for

Re: [PATCH resend] KVM: Document KVM_IRQFD

2011-08-29 Thread Scott Wood
On 08/29/2011 07:34 AM, Sasha Levin wrote: Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- Documentation/virtual/kvm/api.txt | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-)

Re: RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Scott Wood
On 08/29/2011 02:51 PM, Alex Williamson wrote: On Mon, 2011-08-29 at 16:51 +, Yoder Stuart-B08248 wrote: The device info records following the file header have the following record types each with content encoded in a record specific way: REGION - describes an addressable address range

KVM call agenda for August 30

2011-08-29 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Later, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Alex Williamson
On Mon, 2011-08-29 at 16:58 -0500, Scott Wood wrote: On 08/29/2011 02:51 PM, Alex Williamson wrote: On Mon, 2011-08-29 at 16:51 +, Yoder Stuart-B08248 wrote: The device info records following the file header have the following record types each with content encoded in a record specific

Re: RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Scott Wood
On 08/29/2011 05:46 PM, Alex Williamson wrote: On Mon, 2011-08-29 at 16:58 -0500, Scott Wood wrote: On 08/29/2011 02:51 PM, Alex Williamson wrote: On Mon, 2011-08-29 at 16:51 +, Yoder Stuart-B08248 wrote: The device info records following the file header have the following record types

[PATCH 3/4] Add generic stubs for kvm stop check functions

2011-08-29 Thread Eric B Munson
This function is called from the watchdog code when a soft lockup is detected. If this is an arch that does not support pvclock, this function is used. Signed-off-by: Eric B Munson emun...@mgebm.net --- include/asm-generic/pvclock.h | 14 ++ 1 files changed, 14 insertions(+), 0

[PATCH 2/4] Add functions to check if the host has stopped the vm

2011-08-29 Thread Eric B Munson
When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. Signed-off-by: Eric B Munson emun...@mgebm.net --- arch/x86/include/asm/pvclock.h |2 ++

[PATCH 0/4] Avoid soft lockup message when KVM is stopped by host

2011-08-29 Thread Eric B Munson
Currently, when qemu stops a guest kernel that guest will issue a soft lockup message when it resumes. This set provides the ability for qemu to comminucate to the guest that it has been stopped. When the guest hits the watchdog on resume it will check if it was suspended before issuing the

[PATCH 4/4] Add check for suspended vm in softlockup detector

2011-08-29 Thread Eric B Munson
A suspended VM can cause spurious soft lockup warnings. To avoid these, the watchdog now checks if the kernel knows it was stopped by the host and skips the warning if so. Signed-off-by: Eric B Munson emun...@mgebm.net --- kernel/watchdog.c | 12 1 files changed, 12

[PATCH 1/4] Add flag to indicate that a vm was stopped by the host

2011-08-29 Thread Eric B Munson
This flag will be used to check if the vm was stopped by the host when a soft lockup was detected. Signed-off-by: Eric B Munson emun...@mgebm.net --- arch/x86/include/asm/pvclock-abi.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/pvclock-abi.h

[PATCH v2] KVM: APIC: avoid instruction emulation for EOI writes

2011-08-29 Thread Tian, Kevin
v2 changes: define exit qualification fields for APIC-Access in vmx.h use apic_reg_write instead of apic_set_eoi, to avoid breaking tracing add fasteoi option to allow disabling this acceleration commit 2a66a12cb6928c962d24907e6d39b6eb9ac94b4b Author: Kevin Tian

Re: kvm PCI assignment VFIO ramblings

2011-08-29 Thread David Gibson
eOn Fri, Aug 26, 2011 at 01:17:05PM -0700, Aaron Fabbri wrote: [snip] Yes. In essence, I'd rather not have to run any other admin processes. Doing things programmatically, on the fly, from each process, is the cleanest model right now. The persistent group model doesn't necessarily prevent

[PATCH v3 01/11] KVM: MMU: avoid pte_list_desc running out in kvm_mmu_pte_write

2011-08-29 Thread Xiao Guangrong
kvm_mmu_pte_write is unsafe since we need to alloc pte_list_desc in the function when spte is prefetched, unfortunately, we can not know how many spte need to be prefetched on this path, that means we can use out of the free pte_list_desc object in the cache, and BUG_ON() is triggered, also some

[PATCH v3 02/11] KVM: x86: tag the instructions which are used to write page table

2011-08-29 Thread Xiao Guangrong
The idea is from Avi: | tag instructions that are typically used to modify the page tables, and | drop shadow if any other instruction is used. | The list would include, I'd guess, and, or, bts, btc, mov, xchg, cmpxchg, | and cmpxchg8b. This patch is used to tag the instructions and in the later

[PATCH v3 03/11] KVM: x86: retry non-page-table writing instruction

2011-08-29 Thread Xiao Guangrong
If the emulation is caused by #PF and it is non-page_table writing instruction, it means the VM-EXIT is caused by shadow page protected, we can zap the shadow page and retry this instruction directly The idea is from Avi Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com ---

[PATCH v3 04/11] KVM: x86: cleanup port-in/port-out emulated

2011-08-29 Thread Xiao Guangrong
Remove the same code between emulator_pio_in_emulated and emulator_pio_out_emulated Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c | 59 ++- 1 files changed, 26 insertions(+), 33 deletions(-) diff --git

[PATCH v3 05/11] KVM: MMU: do not mark accessed bit on pte write path

2011-08-29 Thread Xiao Guangrong
In current code, the accessed bit is always set when page fault occurred, do not need to set it on pte write path Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/mmu.c | 22 +- 2 files

[PATCH v3 06/11] KVM: MMU: cleanup FNAME(invlpg)

2011-08-29 Thread Xiao Guangrong
Directly Use mmu_page_zap_pte to zap spte in FNAME(invlpg), also remove the same code between FNAME(invlpg) and FNAME(sync_page) Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 16 ++-- arch/x86/kvm/paging_tmpl.h | 42

[PATCH v3 07/11] KVM: MMU: fast prefetch spte on invlpg path

2011-08-29 Thread Xiao Guangrong
Fast prefetch spte for the unsync shadow page on invlpg path Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |4 +--- arch/x86/kvm/mmu.c | 38 +++--- arch/x86/kvm/paging_tmpl.h | 30

[PATCH v3 08/11] KVM: MMU: remove unnecessary kvm_mmu_free_some_pages

2011-08-29 Thread Xiao Guangrong
In kvm_mmu_pte_write, we do not need to alloc shadow page, so calling kvm_mmu_free_some_pages is really unnecessary Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH v3 09/11] KVM: MMU: split kvm_mmu_pte_write function

2011-08-29 Thread Xiao Guangrong
kvm_mmu_pte_write is too long, we split it for better readable Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 187 +++- 1 files changed, 112 insertions(+), 75 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH v3 10/11] KVM: MMU: fix detecting misaligned accessed

2011-08-29 Thread Xiao Guangrong
Sometimes, we only modify the last one byte of a pte to update status bit, for example, clear_bit is used to clear r/w bit in linux kernel and 'andb' instruction is used in this function, in this case, kvm_mmu_pte_write will treat it as misaligned access, and the shadow page table is zapped

[PATCH v3 11/11] KVM: MMU: improve write flooding detected

2011-08-29 Thread Xiao Guangrong
Detecting write-flooding does not work well, when we handle page written, if the last speculative spte is not accessed, we treat the page is write-flooding, however, we can speculative spte on many path, such as pte prefetch, page synced, that means the last speculative spte may be not point to

Re: VFIO v2 design plan

2011-08-29 Thread David Gibson
On Fri, Aug 26, 2011 at 11:05:23AM -0600, Alex Williamson wrote: I don't think too much has changed since the previous email went out, but it seems like a good idea to post a summary in case there were suggestions or objections that I missed. VFIO v2 will rely on the platform iommu driver

Re: A non-responsive guest problem

2011-08-29 Thread Paul
Hi, After changing the clock source from kvm-clock to tsc, everything is OK. Probably it's the bug of kvm-clock. Maybe these bugs have been fixed in latest qemu. Thanks, Paul On Wed, Aug 24, 2011 at 8:47 PM, Paul fly...@gmail.com wrote: Hi, Sometimes this problem happened in one day, but

Re: VFIO v2 design plan

2011-08-29 Thread Alex Williamson
On Tue, 2011-08-30 at 13:04 +1000, David Gibson wrote: On Fri, Aug 26, 2011 at 11:05:23AM -0600, Alex Williamson wrote: I don't think too much has changed since the previous email went out, but it seems like a good idea to post a summary in case there were suggestions or objections that

Re: RFC: vfio / device assignment -- layout of device fd files

2011-08-29 Thread Alex Williamson
On Mon, 2011-08-29 at 18:14 -0500, Scott Wood wrote: On 08/29/2011 05:46 PM, Alex Williamson wrote: On Mon, 2011-08-29 at 16:58 -0500, Scott Wood wrote: On 08/29/2011 02:51 PM, Alex Williamson wrote: On Mon, 2011-08-29 at 16:51 +, Yoder Stuart-B08248 wrote: The device info records

KVM on IBM PowerEN processor

2011-08-29 Thread Kun Wang
Hi, everyone, This is Kun Wang from IBM Research China. I and my team have been working on IBM PowerEN processor in recent years, including its simulation, lib/runtime optimization and etc. Now we start the work to enable KVM on PowerEN processor. Since the A2 core of PowerEN follows Power ISA

[PATCH 4/4] Add check for suspended vm in softlockup detector

2011-08-29 Thread Eric B Munson
A suspended VM can cause spurious soft lockup warnings. To avoid these, the watchdog now checks if the kernel knows it was stopped by the host and skips the warning if so. Signed-off-by: Eric B Munson emun...@mgebm.net --- kernel/watchdog.c | 12 1 files changed, 12

[PATCH 1/4] Add flag to indicate that a vm was stopped by the host

2011-08-29 Thread Eric B Munson
This flag will be used to check if the vm was stopped by the host when a soft lockup was detected. Signed-off-by: Eric B Munson emun...@mgebm.net --- arch/x86/include/asm/pvclock-abi.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/pvclock-abi.h