Re: Seeking a KVM benchmark

2014-11-09 Thread Gleb Natapov
On Sat, Nov 08, 2014 at 08:44:42AM -0800, Andy Lutomirski wrote: On Sat, Nov 8, 2014 at 8:00 AM, Andy Lutomirski l...@amacapital.net wrote: On Nov 8, 2014 4:01 AM, Gleb Natapov g...@kernel.org wrote: On Fri, Nov 07, 2014 at 09:59:55AM -0800, Andy Lutomirski wrote: On Thu, Nov 6, 2014 at

Re: Benchmarking for vhost polling patch

2014-11-09 Thread Razya Ladelsky
Razya Ladelsky/Haifa/IBM@IBMIL wrote on 29/10/2014 02:38:31 PM: From: Razya Ladelsky/Haifa/IBM@IBMIL To: m...@redhat.com Cc: Razya Ladelsky/Haifa/IBM@IBMIL, Alex Glikson/Haifa/IBM@IBMIL, Eran Raichstein/Haifa/IBM@IBMIL, Yossi Kuperman1/Haifa/IBM@IBMIL, Joel Nider/Haifa/IBM@IBMIL,

Re: Seeking a KVM benchmark

2014-11-09 Thread Andy Lutomirski
On Sun, Nov 9, 2014 at 12:52 AM, Gleb Natapov g...@kernel.org wrote: On Sat, Nov 08, 2014 at 08:44:42AM -0800, Andy Lutomirski wrote: On Sat, Nov 8, 2014 at 8:00 AM, Andy Lutomirski l...@amacapital.net wrote: On Nov 8, 2014 4:01 AM, Gleb Natapov g...@kernel.org wrote: On Fri, Nov 07, 2014

Re: [PATCH] x86, kvm, vmx: Always use LOAD_IA32_EFER if available

2014-11-09 Thread Wanpeng Li
Hi Andy, On Fri, Nov 07, 2014 at 06:25:18PM -0800, Andy Lutomirski wrote: At least on Sandy Bridge, letting the CPU switch IA32_EFER is much faster than switching it manually. I benchmarked this using the vmexit kvm-unit-test (single run, but GOAL multiplied by 5 to do more iterations): Test

[PATCH 00/13] Add VT-d Posted-Interrupts support for KVM

2014-11-09 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. You can find the VT-d Posted-Interrtups Spec. in

[PATCH 08/13] KVM: Update Posted-Interrupts descriptor during VCPU scheduling

2014-11-09 Thread Feng Wu
Update Posted-Interrupts descriptor according to the following rules: - Before VCPU block, set 'NV' to POSTED_INTR_WAKEUP_VECTOR - After VCPU block, set 'NV' back to POSTED_INTR_VECTOR Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/include/asm/kvm_host.h |5 ++ arch/x86/kvm/vmx.c

[PATCH 06/13] KVM: Add some helper functions for Posted-Interrupts

2014-11-09 Thread Feng Wu
This patch adds three helper functions to manipulate the Posted- Interrtups Decriptor. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/vmx.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index

[PATCH 13/13] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts

2014-11-09 Thread Feng Wu
Enable VT-d Posted-Interrtups and add a command line parameter for it. Signed-off-by: Feng Wu feng...@intel.com --- drivers/iommu/irq_remapping.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index

[PATCH 12/13] iommu/vt-d: No need to migrating irq for VT-d Posted-Interrtups

2014-11-09 Thread Feng Wu
We don't need to migrate the irqs for VT-d Posted-Interrtups here. When 'pst' is set in IRTE, the associated irq will be posted to guests instead of interrupt remapping. The destination of the interrupt is set in Posted-Interrupts Descriptor, and the migration happens during VCPU scheduling.

[PATCH 07/13] x86, irq: Define a global vector for VT-d Posted-Interrupts

2014-11-09 Thread Feng Wu
Currently, we use a global vector as the Posted-Interrupts Notification Event for all the VCPUs in the system. We need to introduce another global vector for VT-d Posted-Interrtups, which will be used to wakeup the sleep VCPU when an external interrupt from a direct-assigned device happens for

[PATCH 11/13] KVM: Suppress posted-interrupt when 'SN' is set

2014-11-09 Thread Feng Wu
Currently, we don't support urgent interrupt, all interrupts are recognized as non-urgent interrupt, so we cannot send posted-interrupt when 'SN' is set. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/vmx.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff

[PATCH 10/13] KVM: Add the handler for Wake-up Vector

2014-11-09 Thread Feng Wu
When VCPU is blocked and an external interrupts from assigned devices is delivered to it, VT-d Posted-Interrupts mechanism will deliver a interrrupt to the associated physical CPU with Wake-up Vector. In its handler, we find the destination VCPU and wake up it. Signed-off-by: Feng Wu

[PATCH] Add VT-d Posted-Interrupts support in QEMU

2014-11-09 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. This patch is used together with the patches in

[PATCH 05/13] KVM: Update IRTE according to guest interrupt configuration changes

2014-11-09 Thread Feng Wu
When guest changes its interrupt configuration (such as, vector, etc.) for direct-assigned devices, we need to update the associated IRTE with the new guest vector, so external interrupts from the assigned devices can be injected to guests without VM-Exit. The current method of handling guest

[PATCH 09/13] KVM: Change NDST field after VCPU scheduling

2014-11-09 Thread Feng Wu
This patch changes the NDST filed of Posted-Interrupts Descriptor after VCPU is scheduled to another physical CPU. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/vmx.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c

[PATCH] x86: Update VT-d Posted-Interrupts related information

2014-11-09 Thread Feng Wu
VT-d Posted-Interrupts(PI) is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM involvement when guest is running in non-root mode. If VT-d PI is supported by KVM, we need to

[PATCH 02/13] KVM: Initialize VT-d Posted-Interrtups Descriptor

2014-11-09 Thread Feng Wu
This patch initialize the VT-d Posted-interrupt Descritpor. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/include/asm/irq_remapping.h |1 + arch/x86/kernel/apic/apic.c |1 + arch/x86/kvm/vmx.c | 56 - 3 files changed,

[PATCH 01/13] iommu/vt-d: VT-d Posted-Interrupts feature detection

2014-11-09 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. This patch adds feature detection logic for VT-d

[PATCH 03/13] KVM: Add KVM_CAP_PI to detect VT-d Posted-Interrtups

2014-11-09 Thread Feng Wu
This patch adds KVM_CAP_PI to detect VT-d Posted-Interrtups feature for QEMU. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/x86.c |4 include/uapi/linux/kvm.h |1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c

[PATCH 04/13] iommu/vt-d: Adjust 'struct irte' to better suit for VT-d Posted-Interrupts

2014-11-09 Thread Feng Wu
This patch adjusts the definition of 'struct irte', so that we can add the VT-d Posted-Interrtups format in this structure later. Signed-off-by: Feng Wu feng...@intel.com --- drivers/iommu/intel_irq_remapping.c | 35 +++ include/linux/dmar.h|

Re: typo of the comment

2014-11-09 Thread Ingo Molnar
* john_gong john_g...@yeah.net wrote: hi Paolo, i find a typo of the comment. From 09d5df31f0930e8e3eb10ad60a3debc53d6ce992 Mon Sep 17 00:00:00 2001 From: john_gong john_g...@yeah.net Date: Fri, 7 Nov 2014 07:32:17 +0800 Subject: [PATCH] modify a typo of the comment Signed-off-by: