[PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-18 Thread Mao, Junjie
This patch handles PCID/INVPCID for guests. Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces so that the processor may retain cached information when software switches to a different linear address space.

[PATCH v2] Add PCID/INVPCID test

2012-05-18 Thread Mao, Junjie
Add unit test for basic functionality of PCID/INVPCID feature exposing in kvm. Changes from v1: Hard code 'invpcid' instruction Signed-off-by: Junjie Mao junjie@intel.com --- config-x86-common.mak |2 + config-x86_64.mak |3 +- x86/README|1 + x86/pcid.c

Re: [RFC] sched: make callers check lock contention for cond_resched_lock()

2012-05-18 Thread Ingo Molnar
* Takuya Yoshikawa takuya.yoshik...@gmail.com wrote: Replaced Ingo's address with kernel.org one, On Thu, 03 May 2012 17:47:30 +0200 Peter Zijlstra pet...@infradead.org wrote: On Thu, 2012-05-03 at 22:00 +0900, Takuya Yoshikawa wrote: But as I could not see why spin_needbreak() was

RE: Private bridge configuration

2012-05-18 Thread Veruca Salt
Date: Mon, 14 May 2012 08:33:33 -0400 Subject: Private bridge configuration From: j...@legido.com To: kvm@vger.kernel.org Good evening. I would like to set up below network scenario: Hypervisor eth0 192.168.1.x eth1 10.10.1.x Vm1 eth0

[RFC][PATCH] Add support for the GUEST_SMBASE VMCS field for Intel VT-x.

2012-05-18 Thread Matthias Lange
Hi, I was playing around with kvm's nested virtualization feature on Intel VT-x. When trying to access the GUEST_SMBASE (offset 0x4828)field of the VMCS I got a VMREAD/VMWRITE from/to unsupported VMCS component error. According to the Intel manual this field is not optional. The error results

Re: [Qemu-devel] Adding an IPMI BMC device to KVM

2012-05-18 Thread Stefan Hajnoczi
On Mon, May 7, 2012 at 3:30 PM, Anthony Liguori anth...@codemonkey.ws wrote: On 05/06/2012 09:39 AM, Avi Kivity wrote: On 05/06/2012 05:35 PM, Anthony Liguori wrote: So what's really the use case here?  Would an IPMI - libvirt bridge get you what you need?  I really think that's the best path

Re: [Qemu-devel] Adding an IPMI BMC device to KVM

2012-05-18 Thread Corey Minyard
On 05/18/2012 08:08 AM, Stefan Hajnoczi wrote: On Mon, May 7, 2012 at 3:30 PM, Anthony Liguorianth...@codemonkey.ws wrote: On 05/06/2012 09:39 AM, Avi Kivity wrote: On 05/06/2012 05:35 PM, Anthony Liguori wrote: So what's really the use case here? Would an IPMI - libvirt bridge get you

Re: [RFC] sched: make callers check lock contention for cond_resched_lock()

2012-05-18 Thread Takuya Yoshikawa
On Fri, 18 May 2012 09:26:05 +0200 Ingo Molnar mi...@kernel.org wrote: I'm not sure we had a usable spin_is_contended() back then, nor was the !PREEMPT case in my mind really. The fact that both spin_needbreak() and spin_is_contended() can be used outside of sched is a bit confusing. For

Re: [RFC:kvm] export host NUMA info to guest make emulated device NUMA attr

2012-05-18 Thread Shirley Ma
On Thu, 2012-05-17 at 17:20 +0800, Liu Ping Fan wrote: Currently, the guest can not know the NUMA info of the vcpu, which will result in performance drawback. This is the discovered and experiment by Shirley Ma x...@us.ibm.com Krishna Kumar krkum...@in.ibm.com Tom

[PATCH] kvm: make asm-generic/kvm_para.h have an ifdef __KERNEL__ block

2012-05-18 Thread Paul Gortmaker
There are two functions in this asm-generic file. Looking at other arch which do not use the generic version, these two fcns are within an #ifdef __KERNEL__ block, so make the generic one consistent with those. Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com diff --git

Re: VT-d not working for FreeBSD 9.0 guest

2012-05-18 Thread Shesha Sreenivasamurthy
Alex Williamson alex.williamson at redhat.com writes: On Wed, 2012-05-16 at 17:49 +, Shesha Sreenivasamurthy wrote: I'm using FreeBSD 9.0 (FreeBSD freebsd9-i386 9.0-RELEASE FreeBSD 9.0-RELEASE) as my guest OS with qemu-kvm (qemu-kvm-1.1-rc2/x86_64-softmmu/ qemu-system-x86_64)

Re: [PATCH] kvm: make asm-generic/kvm_para.h have an ifdef __KERNEL__ block

2012-05-18 Thread Sam Ravnborg
On Fri, May 18, 2012 at 01:59:39PM -0400, Paul Gortmaker wrote: There are two functions in this asm-generic file. Looking at other arch which do not use the generic version, these two fcns are within an #ifdef __KERNEL__ block, so make the generic one consistent with those. Signed-off-by:

Re: VT-d not working for FreeBSD 9.0 guest

2012-05-18 Thread Alex Williamson
On Fri, 2012-05-18 at 18:38 +, Shesha Sreenivasamurthy wrote: Alex Williamson alex.williamson at redhat.com writes: On Wed, 2012-05-16 at 17:49 +, Shesha Sreenivasamurthy wrote: I'm using FreeBSD 9.0 (FreeBSD freebsd9-i386 9.0-RELEASE FreeBSD 9.0-RELEASE) as my guest OS

[PATCH 0/7] KVM fixes for 3.2.17

2012-05-18 Thread Marcelo Tosatti
See individual patches for details. Alex Williamson (1): KVM: lock slots_lock around device assignment Avi Kivity (1): KVM: Ensure all vcpus are consistent with in-kernel irqchip settings Christian Borntraeger (1): KVM: s390: Sanitize fpc registers for KVM_SET_FPU Jens Freimann (1):

[PATCH 1/7] KVM: mmu_notifier: Flush TLBs before releasing mmu_lock

2012-05-18 Thread Marcelo Tosatti
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp (cherry picked from commit 565f3be2174611f364405bbea2d86e153c2e7e78 Other threads may process the same page in that small window and skip TLB flush and then return before these functions do flush. Signed-off-by: Takuya Yoshikawa

[PATCH 5/7] KVM: VMX: vmx_set_cr0 expects kvm-srcu locked

2012-05-18 Thread Marcelo Tosatti
(cherry picked from commit 7a4f5ad051e02139a9f1c0f7f4b1acb88915852b) vmx_set_cr0 is called from vcpu run context, therefore it expects kvm-srcu to be held (for setting up the real-mode TSS). Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com

[PATCH 2/7] KVM: Ensure all vcpus are consistent with in-kernel irqchip settings

2012-05-18 Thread Marcelo Tosatti
From: Avi Kivity a...@redhat.com (cherry picked from commit 3e515705a1f46beb1c942bb8043c16f8ac7b1e9e) If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu-arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no

[PATCH 4/7] KVM: nVMX: Fix erroneous exception bitmap check

2012-05-18 Thread Marcelo Tosatti
From: Nadav Har'El n...@math.technion.ac.il (cherry picked from commit 9587190107d0c0cbaccbf7bf6b0245d29095a9ae) The code which checks whether to inject a pagefault to L1 or L2 (in nested VMX) was wrong, incorrect in how it checked the PF_VECTOR bit. Thanks to Dan Carpenter for spotting this.

[PATCH 6/7] KVM: s390: do store status after handling STOP_ON_STOP bit

2012-05-18 Thread Marcelo Tosatti
From: Jens Freimann jf...@linux.vnet.ibm.com (cherry picked from commit 9e0d5473e2f0ba2d2fe9dab9408edef3060b710e) In handle_stop() handle the stop bit before doing the store status as described for Stop and Store Status in the Principles of Operation. We have to give up the local_int.lock before

[PATCH 3/7] KVM: lock slots_lock around device assignment

2012-05-18 Thread Marcelo Tosatti
From: Alex Williamson alex.william...@redhat.com (cherry picked from commit 21a1416a1c945c5aeaeaf791b63c64926018eb77) As pointed out by Jason Baron, when assigning a device to a guest we first set the iommu domain pointer, which enables mapping and unmapping of memory slots to the iommu. This

[PATCH 7/7] KVM: s390: Sanitize fpc registers for KVM_SET_FPU

2012-05-18 Thread Marcelo Tosatti
From: Christian Borntraeger borntrae...@de.ibm.com (cherry picked from commit 851755871c1f3184f4124c466e85881f17fa3226) commit 7eef87dc99e419b1cc051e4417c37e4744d7b661 (KVM: s390: fix register setting) added a load of the floating point control register to the KVM_SET_FPU path. Lets make sure

Re: [PATCH] kvm: make asm-generic/kvm_para.h have an ifdef __KERNEL__ block

2012-05-18 Thread Paul Gortmaker
[Re: [PATCH] kvm: make asm-generic/kvm_para.h have an ifdef __KERNEL__ block] On 18/05/2012 (Fri 20:42) Sam Ravnborg wrote: On Fri, May 18, 2012 at 01:59:39PM -0400, Paul Gortmaker wrote: There are two functions in this asm-generic file. Looking at other arch which do not use the generic

Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-18 Thread Marcelo Tosatti
On Fri, May 18, 2012 at 06:17:05AM +, Mao, Junjie wrote: This patch handles PCID/INVPCID for guests. Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces so that the processor may retain cached

Re: RESEND3: Re: [PATCH 05/13] pci: New pci_acs_enabled()

2012-05-18 Thread Don Dutile
On 05/18/2012 06:02 PM, Alex Williamson wrote: On Wed, 2012-05-16 at 09:29 -0400, Don Dutile wrote: On 05/15/2012 05:09 PM, Alex Williamson wrote: On Tue, 2012-05-15 at 13:56 -0600, Bjorn Helgaas wrote: On Mon, May 14, 2012 at 4:49 PM, Alex Williamson alex.william...@redhat.com wrote: On

Re: [PATCH] PCI: save/restore max Latency Value for device LTR

2012-05-18 Thread Bjorn Helgaas
On Tue, May 8, 2012 at 3:09 AM, Hao, Xudong xudong@intel.com wrote: -Original Message- From: Bjorn Helgaas [mailto:bhelg...@google.com]  } This doesn't make any sense to me.  pos is the offset of the PCI Express Capability (identifier 10h).  LTR is a separate extended

Re: [PATCH 1/1] Enable LTR/OBFF before device is used by driver

2012-05-18 Thread Bjorn Helgaas
On Sun, May 13, 2012 at 8:48 PM, Xudong Hao xudong@linux.intel.com wrote: Enable LTR(Latency tolerance reporting) and OBFF(optimized buffer flush/fill) in  pci_enable_device(), so that they are enabled before the device is used by driver. Please split this into two patches (one for LTR

Re: [PATCH 05/13] pci: New pci_acs_enabled()

2012-05-18 Thread Alex Williamson
On Fri, 2012-05-18 at 19:00 -0400, Don Dutile wrote: On 05/18/2012 06:02 PM, Alex Williamson wrote: On Wed, 2012-05-16 at 09:29 -0400, Don Dutile wrote: On 05/15/2012 05:09 PM, Alex Williamson wrote: On Tue, 2012-05-15 at 13:56 -0600, Bjorn Helgaas wrote: On Mon, May 14, 2012 at 4:49 PM,