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

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

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 > > V

[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 fr

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 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 forward. I'm

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 Liguori 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

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 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 example, in mm/com

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 > Krishna Kumar > Tom Lendacky > Refer to - > ht

[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 diff --git a/include/asm-generic/kvm_para.h b/include/

Re: VT-d not working for FreeBSD 9.0 guest

2012-05-18 Thread Shesha Sreenivasamurthy
Alex Williamson 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) running on

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

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 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

[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): KVM

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

2012-05-18 Thread Marcelo Tosatti
From: Takuya Yoshikawa (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 Signed-off-by: Marcelo Tosatti Signed-off

[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 Signed-off-by: Avi Kivity Signed-off-by: Greg Kroah-Hartman --- arch/x

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

2012-05-18 Thread Marcelo Tosatti
From: Avi Kivity (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 vcpus are inst

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

2012-05-18 Thread Marcelo Tosatti
From: Nadav Har'El (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. Signed-off-by: Nadav Har'E

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

2012-05-18 Thread Marcelo Tosatti
From: Jens Freimann (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 calling kvm store stat

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

2012-05-18 Thread Marcelo Tosatti
From: Alex Williamson (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 leaves a window where this p

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

2012-05-18 Thread Marcelo Tosatti
From: Christian Borntraeger (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 that the fpc is valid. S

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 gener

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 inf

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 wrote: On Mon, 2012-05-14 at 16:02 -06

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 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 >> capabili

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 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 and another for OBFF) s

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, 201