Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-28 Thread Glauber Costa
On 11/27/2012 07:10 PM, Michael Wolf wrote: On 11/27/2012 02:48 AM, Glauber Costa wrote: Hi, On 11/27/2012 12:36 AM, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting

Re: [kvm:queue 23/25] arch/s390/kvm/kvm-s390.c:358:6: error: conflicting types for 'kvm_arch_vcpu_postcreate'

2012-11-28 Thread Fengguang Wu
On Tue, Nov 27, 2012 at 11:51:19PM -0200, Marcelo Tosatti wrote: On Tue, Nov 27, 2012 at 10:56:50AM +0800, Fengguang Wu wrote: Hi Marcelo, FYI, kernel build failed on tree: git://git.kernel.org/pub/scm/virt/kvm/kvm.git queue head: fc1ddea318fa2c1ac3d496d8653ca4bc9b66e679

Re: [PATCHv4 0/2] kvm: direct msix injection

2012-11-28 Thread Michael S. Tsirkin
On Tue, Nov 27, 2012 at 09:34:57PM -0700, Alex Williamson wrote: On Wed, 2012-11-21 at 21:26 +0200, Michael S. Tsirkin wrote: On Wed, Oct 17, 2012 at 06:05:53PM +0200, Michael S. Tsirkin wrote: We can deliver certain interrupts, notably MSIX, from atomic context. Here's an untested

Re: [PATCH v2 4/4] nested vmx: use a list to store the launched vmcs12 for L1 VMM

2012-11-28 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 10:29:08PM -0200, Marcelo Tosatti wrote: On Thu, Nov 22, 2012 at 12:51:59PM +0800, Dongxiao Xu wrote: The launch state is not a member in the VMCS area, use a separate variable (list) to store it instead. Signed-off-by: Dongxiao Xu dongxiao...@intel.com 1. What

Re: [PATCH v2 1/6] x86: PIT connects to pin 2 of IOAPIC

2012-11-28 Thread Gleb Natapov
On Wed, Nov 21, 2012 at 04:09:34PM +0800, Yang Zhang wrote: When PIT connects to IOAPIC, it route to pin 2 not pin 0. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- virt/kvm/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c

Re: Performance issue

2012-11-28 Thread Vadim Rozenfeld
On Tuesday, November 27, 2012 11:13:12 PM George-Cristian Bîrzan wrote: On Tue, Nov 27, 2012 at 10:38 PM, Vadim Rozenfeld vroze...@redhat.com wrote: I have some code which do both reference time and invariant TSC but it will not work after migration. I will send it later today. Do you

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Gleb Natapov
On Wed, Oct 17, 2012 at 06:06:06PM +0200, Michael S. Tsirkin wrote: We can deliver certain interrupts, notably MSI, from atomic context. Use kvm_set_irq_inatomic, to implement an irq handler for msi. This reduces the pressure on scheduler in case where host and guest irq share a host cpu.

Re: [PATCH] KVM: MMU: lazily drop large spte

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 01:27:38PM +0800, Xiao Guangrong wrote: On 11/18/2012 11:00 AM, Marcelo Tosatti wrote: map gfn 4? See corrected step 7 above. Ah, this is a real bug, and unfortunately, it exists in current code. I will make a separate patchset to fix it. Thank you, Marcelo!

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Michael S. Tsirkin
On Wed, Nov 28, 2012 at 01:43:34PM +0200, Gleb Natapov wrote: On Wed, Oct 17, 2012 at 06:06:06PM +0200, Michael S. Tsirkin wrote: We can deliver certain interrupts, notably MSI, from atomic context. Use kvm_set_irq_inatomic, to implement an irq handler for msi. This reduces the

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 01:56:16PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 01:43:34PM +0200, Gleb Natapov wrote: On Wed, Oct 17, 2012 at 06:06:06PM +0200, Michael S. Tsirkin wrote: We can deliver certain interrupts, notably MSI, from atomic context. Use

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Michael S. Tsirkin
On Wed, Nov 28, 2012 at 02:13:01PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 01:56:16PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 01:43:34PM +0200, Gleb Natapov wrote: On Wed, Oct 17, 2012 at 06:06:06PM +0200, Michael S. Tsirkin wrote: We can deliver certain

Re: [PATCH v2 4/4] nested vmx: use a list to store the launched vmcs12 for L1 VMM

2012-11-28 Thread Orit Wasserman
On 11/28/2012 02:29 AM, Marcelo Tosatti wrote: On Thu, Nov 22, 2012 at 12:51:59PM +0800, Dongxiao Xu wrote: The launch state is not a member in the VMCS area, use a separate variable (list) to store it instead. Signed-off-by: Dongxiao Xu dongxiao...@intel.com 1. What is the problem with

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 02:22:45PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 02:13:01PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 01:56:16PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 01:43:34PM +0200, Gleb Natapov wrote: On Wed, Oct 17, 2012 at

Re: [PATCH v4 02/13] ARM: KVM: Keep track of currently running vcpus

2012-11-28 Thread Will Deacon
Just a bunch of typos in this one :) On Sat, Nov 10, 2012 at 03:44:30PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com When an interrupt occurs for the guest, it is sometimes necessary to find out which vcpu was running at that point. Keep track of which vcpu is

Re: [PATCH v4 03/13] ARM: KVM: Initial VGIC infrastructure support

2012-11-28 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:44:37PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com Wire the basic framework code for VGIC support. Nothing to enable yet. Again, not sure how useful this patch is. Might as well merge it with code that actually does something. Couple of

[PATCH 1/2] KVM: VMX: fix invalid cpu passed to smp_call_function_single

2012-11-28 Thread Xiao Guangrong
In loaded_vmcs_clear, loaded_vmcs-cpu is the fist parameter passed to smp_call_function_single, if the target cpu is downing (doing cpu hot remove), loaded_vmcs-cpu can become -1 then -1 is passed to smp_call_function_single It can be triggered when vcpu is being destroyed, loaded_vmcs_clear is

[PATCH 2/2] KVM: VMX: fix memory order between loading vmcs and clearing vmcs

2012-11-28 Thread Xiao Guangrong
vmcs-cpu indicates whether it exists on the target cpu, -1 means the vmcs does not exist on any vcpu If vcpu load vmcs with vmcs.cpu = -1, it can be directly added to cpu's percpu list. The list can be corrupted if the cpu prefetch the vmcs's list before reading vmcs-cpu. Meanwhile, we should

Re: [PATCH v4 03/13] ARM: KVM: Initial VGIC infrastructure support

2012-11-28 Thread Marc Zyngier
On 28/11/12 12:49, Will Deacon wrote: On Sat, Nov 10, 2012 at 03:44:37PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com Wire the basic framework code for VGIC support. Nothing to enable yet. Again, not sure how useful this patch is. Might as well merge it with code

Re: [PATCH v4 04/13] ARM: KVM: Initial VGIC MMIO support code

2012-11-28 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:44:44PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com Wire the initial in-kernel MMIO support code for the VGIC, used for the distributor emulation. [...] diff --git a/arch/arm/kvm/vgic.c b/arch/arm/kvm/vgic.c new file mode 100644 index

Re: [PATCH v4 05/13] ARM: KVM: VGIC accept vcpu and dist base addresses from user space

2012-11-28 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:44:51PM +, Christoffer Dall wrote: User space defines the model to emulate to a guest and should therefore decide which addresses are used for both the virtual CPU interface directly mapped in the guest physical address space and for the emulated distributor

Re: [PATCH v4 02/13] ARM: KVM: Keep track of currently running vcpus

2012-11-28 Thread Marc Zyngier
On 28/11/12 12:47, Will Deacon wrote: Just a bunch of typos in this one :) Typos? me? ;-) On Sat, Nov 10, 2012 at 03:44:30PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com When an interrupt occurs for the guest, it is sometimes necessary to find out which vcpu was

[PATCH] KVM: use is_idle_task() instead of idle_cpu() to decide when to halt in async_pf

2012-11-28 Thread Gleb Natapov
As Frederic pointed idle_cpu() may return false even if async fault happened in the idle task if wake up is pending. In this case the code will try to put idle task to sleep. Fix this by using is_idle_task() to check for idle task. Reported-by: Frederic Weisbecker fweis...@gmail.com

Re: [PATCH v4 06/13] ARM: KVM: VGIC distributor handling

2012-11-28 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:44:58PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com Add the GIC distributor emulation code. A number of the GIC features are simply ignored as they are not required to boot a Linux guest. Signed-off-by: Marc Zyngier marc.zyng...@arm.com

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Michael S. Tsirkin
On Wed, Nov 28, 2012 at 02:45:09PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 02:22:45PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 02:13:01PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 01:56:16PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at

Re: [kvmarm] [PATCH v4 05/13] ARM: KVM: VGIC accept vcpu and dist base addresses from user space

2012-11-28 Thread Marc Zyngier
On 28/11/12 13:11, Will Deacon wrote: On Sat, Nov 10, 2012 at 03:44:51PM +, Christoffer Dall wrote: User space defines the model to emulate to a guest and should therefore decide which addresses are used for both the virtual CPU interface directly mapped in the guest physical address space

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 03:25:44PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 02:45:09PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 02:22:45PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 02:13:01PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at

Re: [PATCH v4 04/13] ARM: KVM: Initial VGIC MMIO support code

2012-11-28 Thread Marc Zyngier
On 28/11/12 13:09, Will Deacon wrote: On Sat, Nov 10, 2012 at 03:44:44PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com Wire the initial in-kernel MMIO support code for the VGIC, used for the distributor emulation. [...] diff --git a/arch/arm/kvm/vgic.c

Re: [PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 11:15:13AM +0800, Xiao Guangrong wrote: On 11/28/2012 07:32 AM, Marcelo Tosatti wrote: On Tue, Nov 27, 2012 at 11:13:11AM +0800, Xiao Guangrong wrote: +static bool reexecute_instruction(struct kvm_vcpu *vcpu, unsigned long cr2) { -gpa_t gpa; +

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: On 11/27/2012 06:41 AM, Marcelo Tosatti wrote: - return false; +again: + page_fault_count = ACCESS_ONCE(vcpu-kvm-arch.page_fault_count); + + /* + * if emulation was due to access to shadowed page table + *

Re: [PATCH v4 03/13] ARM: KVM: Initial VGIC infrastructure support

2012-11-28 Thread Will Deacon
On Wed, Nov 28, 2012 at 01:09:37PM +, Marc Zyngier wrote: On 28/11/12 12:49, Will Deacon wrote: On Sat, Nov 10, 2012 at 03:44:37PM +, Christoffer Dall wrote: @@ -363,7 +370,7 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, */ int kvm_arch_vcpu_runnable(struct

Re: [PATCH v4 06/13] ARM: KVM: VGIC distributor handling

2012-11-28 Thread Marc Zyngier
On 28/11/12 13:21, Will Deacon wrote: On Sat, Nov 10, 2012 at 03:44:58PM +, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com Add the GIC distributor emulation code. A number of the GIC features are simply ignored as they are not required to boot a Linux guest.

kvm: let's add HYPERV capabilities (was Re: [PATCH 01/20] hyper-v: introduce Hyper-V support infrastructure.)

2012-11-28 Thread Michael S. Tsirkin
On Fri, Jan 20, 2012 at 03:26:27PM -0200, Marcelo Tosatti wrote: From: Vadim Rozenfeld vroze...@redhat.com [Jan: fix build with CONFIG_USER_ONLY] Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- Makefile.target |2 + target-i386/cpuid.c | 14 +++

Re: [PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-28 Thread Xiao Guangrong
On 11/28/2012 10:01 PM, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 11:15:13AM +0800, Xiao Guangrong wrote: On 11/28/2012 07:32 AM, Marcelo Tosatti wrote: On Tue, Nov 27, 2012 at 11:13:11AM +0800, Xiao Guangrong wrote: +static bool reexecute_instruction(struct kvm_vcpu *vcpu, unsigned long

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Xiao Guangrong
On 11/28/2012 10:12 PM, Gleb Natapov wrote: On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: On 11/27/2012 06:41 AM, Marcelo Tosatti wrote: - return false; +again: + page_fault_count = ACCESS_ONCE(vcpu-kvm-arch.page_fault_count); + + /* + * if emulation was due to

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Michael S. Tsirkin
On Wed, Nov 28, 2012 at 03:38:40PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 03:25:44PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 02:45:09PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 02:22:45PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at

Re: [PATCH 2/5] Expand the steal time msr to also contain the consigned time.

2012-11-28 Thread Michael Wolf
On 11/27/2012 03:03 PM, Konrad Rzeszutek Wilk wrote: On Mon, Nov 26, 2012 at 02:36:45PM -0600, Michael Wolf wrote: Add a consigned field. This field will hold the time lost due to capping or overcommit. The rest of the time will still show up in the steal-time field. Signed-off-by: Michael

Re: [PATCHv4 2/2] kvm: deliver msi interrupts from irq handler

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 05:25:17PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 03:38:40PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 03:25:44PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 28, 2012 at 02:45:09PM +0200, Gleb Natapov wrote: On Wed, Nov 28, 2012 at

Re: [PATCH] vhost-blk: Add vhost-blk support v5

2012-11-28 Thread David Miller
From: Michael S. Tsirkin m...@redhat.com Date: Mon, 26 Nov 2012 17:14:16 +0200 On Mon, Nov 19, 2012 at 10:26:41PM +0200, Michael S. Tsirkin wrote: Userspace bits: - 1) LKVM The latest vhost-blk userspace bits for kvm tool can be found here:

PCI device pass through support

2012-11-28 Thread Krishna J
Hi Alex, I am trying to pass through a PCI device to the guest to compare the MSI interrupt latency with normal device pass through and pass through using VFIO framework. I used the following script for dev in $(ls /sys/bus/pci/devices/:06:00.0/iommu_group/devices); do     vendor=$(cat

Re: PCI device pass through support

2012-11-28 Thread Alex Williamson
On Wed, 2012-11-28 at 16:32 +, Krishna J wrote: Hi Alex, I am trying to pass through a PCI device to the guest to compare the MSI interrupt latency with normal device pass through and pass through using VFIO framework. I used the following script for dev in $(ls

Re: [PATCH] kvm tools: powerpc: convert spapr pci to new device iterators

2012-11-28 Thread Matt Evans
Hi Will, On 2012-11-27 13:00, Will Deacon wrote: Commit 8d35d32d0148 (kvm tools: add generic device registration mechanism) introduced a tree-based device lookup-by-bus mechanism as well as iterators to enumerate the devices on a particular bus. Whilst both x86 and ppc were converted by the

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-28 Thread Michael Wolf
On 11/27/2012 05:24 PM, Marcelo Tosatti wrote: On Mon, Nov 26, 2012 at 02:36:24PM -0600, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or vmstat. The

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-28 Thread Michael Wolf
On 11/28/2012 02:45 AM, Glauber Costa wrote: On 11/27/2012 07:10 PM, Michael Wolf wrote: On 11/27/2012 02:48 AM, Glauber Costa wrote: Hi, On 11/27/2012 12:36 AM, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may

Re: Performance issue

2012-11-28 Thread George-Cristian Bîrzan
On Wed, Nov 28, 2012 at 1:39 PM, Vadim Rozenfeld vroze...@redhat.com wrote: On Tuesday, November 27, 2012 11:13:12 PM George-Cristian Bîrzan wrote: On Tue, Nov 27, 2012 at 10:38 PM, Vadim Rozenfeld vroze...@redhat.com wrote: I have some code which do both reference time and invariant TSC but

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-28 Thread Anthony Liguori
Glauber Costa glom...@parallels.com writes: Hi, On 11/27/2012 12:36 AM, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or vmstat. This can cause

Re: Performance issue

2012-11-28 Thread George-Cristian Bîrzan
On Wed, Nov 28, 2012 at 1:39 PM, Vadim Rozenfeld vroze...@redhat.com wrote: There are two patches, one for kvm and another one for qemu. I just realised this. I was supposed to use qemu, or qemu-kvm? I used qemu -- George-Cristian Bîrzan -- To unsubscribe from this list: send the line

Re: Performance issue

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 09:18:38PM +0200, George-Cristian Bîrzan wrote: On Wed, Nov 28, 2012 at 1:39 PM, Vadim Rozenfeld vroze...@redhat.com wrote: There are two patches, one for kvm and another one for qemu. I just realised this. I was supposed to use qemu, or qemu-kvm? I used qemu Does

Re: Performance issue

2012-11-28 Thread George-Cristian Bîrzan
On Wed, Nov 28, 2012 at 9:56 PM, Gleb Natapov g...@redhat.com wrote: On Wed, Nov 28, 2012 at 09:18:38PM +0200, George-Cristian Bîrzan wrote: On Wed, Nov 28, 2012 at 1:39 PM, Vadim Rozenfeld vroze...@redhat.com wrote: There are two patches, one for kvm and another one for qemu. I just

Re: Performance issue

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 10:01:04PM +0200, George-Cristian Bîrzan wrote: On Wed, Nov 28, 2012 at 9:56 PM, Gleb Natapov g...@redhat.com wrote: On Wed, Nov 28, 2012 at 09:18:38PM +0200, George-Cristian Bîrzan wrote: On Wed, Nov 28, 2012 at 1:39 PM, Vadim Rozenfeld vroze...@redhat.com wrote:

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-28 Thread Glauber Costa
On 11/28/2012 10:43 PM, Michael Wolf wrote: On 11/27/2012 05:24 PM, Marcelo Tosatti wrote: On Mon, Nov 26, 2012 at 02:36:24PM -0600, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported

Re: [PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-28 Thread Alex Williamson
On Wed, 2012-11-28 at 18:21 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and

[PATCH V2] Added tests for ia32_tsc_adjust funtionality.

2012-11-28 Thread Will Auld
Added x86/tsc_adjust.c and updated x86/vmexit.c to include timing tests for reading and writing the emulated IA32_TSC_ADJUST msr. Signed-off-by: Will Auld will.a...@intel.com --- config-x86-common.mak | 5 - x86/tsc_adjust.c | 60 +++

Re: [PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 10:55:26PM +0800, Xiao Guangrong wrote: On 11/28/2012 10:01 PM, Gleb Natapov wrote: On Wed, Nov 28, 2012 at 11:15:13AM +0800, Xiao Guangrong wrote: On 11/28/2012 07:32 AM, Marcelo Tosatti wrote: On Tue, Nov 27, 2012 at 11:13:11AM +0800, Xiao Guangrong wrote:

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: On 11/28/2012 10:12 PM, Gleb Natapov wrote: On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: On 11/27/2012 06:41 AM, Marcelo Tosatti wrote: -return false; +again: +page_fault_count =

Re: [PATCH V2] Added tests for ia32_tsc_adjust funtionality.

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 01:32:09PM -0800, Will Auld wrote: Added x86/tsc_adjust.c and updated x86/vmexit.c to include timing tests for reading and writing the emulated IA32_TSC_ADJUST msr. Signed-off-by: Will Auld will.a...@intel.com --- config-x86-common.mak | 5 - x86/tsc_adjust.c

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Xiao Guangrong
On 11/29/2012 05:57 AM, Marcelo Tosatti wrote: On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: On 11/28/2012 10:12 PM, Gleb Natapov wrote: On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: On 11/27/2012 06:41 AM, Marcelo Tosatti wrote: -return false;

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Xiao Guangrong
On 11/29/2012 06:40 AM, Xiao Guangrong wrote: On 11/29/2012 05:57 AM, Marcelo Tosatti wrote: On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: On 11/28/2012 10:12 PM, Gleb Natapov wrote: On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: On 11/27/2012 06:41 AM,

RE: [PATCH V2] Added tests for ia32_tsc_adjust functionality.

2012-11-28 Thread Auld, Will
Thanks Marcelo! -Original Message- From: Marcelo Tosatti [mailto:mtosa...@redhat.com] Sent: Wednesday, November 28, 2012 2:14 PM To: Auld, Will Cc: kvm@vger.kernel.org; Dugger, Donald D; Liu, Jinsong; Zhang, Xiantao; a...@redhat.com; Gleb Subject: Re: [PATCH V2] Added tests for

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Marcelo Tosatti
On Thu, Nov 29, 2012 at 06:40:51AM +0800, Xiao Guangrong wrote: On 11/29/2012 05:57 AM, Marcelo Tosatti wrote: On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: On 11/28/2012 10:12 PM, Gleb Natapov wrote: On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: On

Re: [PATCH 1/2] KVM: VMX: fix invalid cpu passed to smp_call_function_single

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 08:53:15PM +0800, Xiao Guangrong wrote: In loaded_vmcs_clear, loaded_vmcs-cpu is the fist parameter passed to smp_call_function_single, if the target cpu is downing (doing cpu hot remove), loaded_vmcs-cpu can become -1 then -1 is passed to smp_call_function_single It

Re: [PATCH] KVM: use is_idle_task() instead of idle_cpu() to decide when to halt in async_pf

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 03:19:08PM +0200, Gleb Natapov wrote: As Frederic pointed idle_cpu() may return false even if async fault happened in the idle task if wake up is pending. In this case the code will try to put idle task to sleep. Fix this by using is_idle_task() to check for idle task.

Re: [PATCH 2/2] KVM: VMX: fix memory order between loading vmcs and clearing vmcs

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 08:54:14PM +0800, Xiao Guangrong wrote: vmcs-cpu indicates whether it exists on the target cpu, -1 means the vmcs does not exist on any vcpu If vcpu load vmcs with vmcs.cpu = -1, it can be directly added to cpu's percpu list. The list can be corrupted if the cpu

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Marcelo Tosatti
On Thu, Nov 29, 2012 at 07:16:50AM +0800, Xiao Guangrong wrote: On 11/29/2012 06:40 AM, Xiao Guangrong wrote: On 11/29/2012 05:57 AM, Marcelo Tosatti wrote: On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: On 11/28/2012 10:12 PM, Gleb Natapov wrote: On Tue, Nov 27, 2012 at

Re: [PATCH V3 RFC 1/2] sched: Bail out of yield_to when source and target runqueue has one task

2012-11-28 Thread Andrew Theurer
On Wed, 2012-11-28 at 14:26 -0800, Chegu Vinod wrote: On 11/27/2012 6:23 AM, Chegu Vinod wrote: On 11/27/2012 2:30 AM, Raghavendra K T wrote: On 11/26/2012 07:05 PM, Andrew Jones wrote: On Mon, Nov 26, 2012 at 05:37:54PM +0530, Raghavendra K T wrote: From: Peter Zijlstra

Re: [PATCH 2/2] KVM: VMX: fix memory order between loading vmcs and clearing vmcs

2012-11-28 Thread Xiao Guangrong
On 11/29/2012 08:04 AM, Marcelo Tosatti wrote: On Wed, Nov 28, 2012 at 08:54:14PM +0800, Xiao Guangrong wrote: vmcs-cpu indicates whether it exists on the target cpu, -1 means the vmcs does not exist on any vcpu If vcpu load vmcs with vmcs.cpu = -1, it can be directly added to cpu's percpu

RE: [PATCH v2 4/4] nested vmx: use a list to store the launched vmcs12 for L1 VMM

2012-11-28 Thread Xu, Dongxiao
-Original Message- From: Gleb Natapov [mailto:g...@redhat.com] Sent: Wednesday, November 28, 2012 7:28 PM To: Marcelo Tosatti Cc: Xu, Dongxiao; kvm@vger.kernel.org Subject: Re: [PATCH v2 4/4] nested vmx: use a list to store the launched vmcs12 for L1 VMM On Tue, Nov 27, 2012 at

Re: [PATCH V3 RFC 0/2] kvm: Improving undercommit scenarios

2012-11-28 Thread Chegu Vinod
On 11/26/2012 4:07 AM, Raghavendra K T wrote: In some special scenarios like #vcpu = #pcpu, PLE handler may prove very costly, because there is no need to iterate over vcpus and do unsuccessful yield_to burning CPU. The first patch optimizes all the yield_to by bailing out when there is

RE: [PATCH v2 4/4] nested vmx: use a list to store the launched vmcs12 for L1 VMM

2012-11-28 Thread Xu, Dongxiao
-Original Message- From: Orit Wasserman [mailto:owass...@redhat.com] Sent: Wednesday, November 28, 2012 8:30 PM To: Marcelo Tosatti Cc: Xu, Dongxiao; kvm@vger.kernel.org; g...@redhat.com Subject: Re: [PATCH v2 4/4] nested vmx: use a list to store the launched vmcs12 for L1 VMM

Re: [PATCH V3 RFC 1/2] sched: Bail out of yield_to when source and target runqueue has one task

2012-11-28 Thread Chegu Vinod
On 11/28/2012 5:09 PM, Chegu Vinod wrote: On 11/27/2012 6:23 AM, Chegu Vinod wrote: On 11/27/2012 2:30 AM, Raghavendra K T wrote: On 11/26/2012 07:05 PM, Andrew Jones wrote: On Mon, Nov 26, 2012 at 05:37:54PM +0530, Raghavendra K T wrote: From: Peter Zijlstra pet...@infradead.org In case of

Re: [PATCH 2/2] KVM: VMX: fix memory order between loading vmcs and clearing vmcs

2012-11-28 Thread Xiao Guangrong
On 11/29/2012 08:04 AM, Marcelo Tosatti wrote: On Wed, Nov 28, 2012 at 08:54:14PM +0800, Xiao Guangrong wrote: vmcs-cpu indicates whether it exists on the target cpu, -1 means the vmcs does not exist on any vcpu If vcpu load vmcs with vmcs.cpu = -1, it can be directly added to cpu's percpu

Re: [PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-28 Thread Alexey Kardashevskiy
On 29/11/12 08:01, Alex Williamson wrote: On Wed, 2012-11-28 at 18:21 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent

Re: [RFC PATCH 0/4] MSI affinity for assigned devices

2012-11-28 Thread Jan Kiszka
On 2012-11-28 00:21, Alex Williamson wrote: On Wed, 2012-11-28 at 00:08 +0100, Jan Kiszka wrote: On 2012-11-27 23:00, Alex Williamson wrote: This is post-1.3 material, so I'll just post it as an RFC for now. MSI routing updates aren't currently handled by pci-assign or vfio-pci (when using

Re: SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

2012-11-28 Thread razamatan
Jimmy Crossley jcrossley at CoNetrix.com writes: -Original Message- From: kvm-owner at vger.kernel.org [mailto:kvm-owner at vger.kernel.org] On Behalf Of Jimmy Crossley Sent: Friday, June 08, 2012 17:29 Subject: Garbled audio - Windows 7 64 bit guest on Debian I am