RE: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-21 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 05:39:46AM +, Zhang, Yang Z wrote: >> Gleb Natapov wrote on 2013-03-21: >>> On Thu, Mar 21, 2013 at 05:30:32AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 03:42:46AM +, Zhang, Ya

RE: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-21 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-20: > On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Update RTC interrrupt's destination vcpu map when ioapic entry of RTC >> or apic register (id, ldr, dfr) is changed. >> >> Signed-off-by: Yang Zhang >> --- >> virt/kvm/ioap

Re: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 07:02:39AM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-03-20: > > On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote: > >> From: Yang Zhang > >> > >> Update RTC interrrupt's destination vcpu map when ioapic entry of RTC > >> or apic register (id, ldr,

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 06:58:41PM -0500, Scott Wood wrote: > On 03/14/2013 07:13:46 PM, Kevin Hilman wrote: > >The new context tracking subsystem unconditionally includes kvm_host.h > >headers for the guest enter/exit macros. This causes a compile > >failure when KVM is not enabled. > > > >Fix by

[PATCH] vfio: make local function vfio_pci_intx_unmask_handler() static

2013-03-21 Thread Wei Yongjun
From: Wei Yongjun vfio_pci_intx_unmask_handler() was not declared. It should be static. Signed-off-by: Wei Yongjun --- drivers/vfio/pci/vfio_pci_intrs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c

KVM next tree merge onto current Linus master

2013-03-21 Thread Alexander Graf
Hi guys, Just recently this really important patch got pulled into Linus' tree for 3.9: commit 1674400aaee5b466c595a8fc310488263ce888c7 Author: Anton Blanchard Date: Tue Mar 12 01:51:51 2013 + powerpc: Fix -mcmodel=medium breakage in prom_init.c Commit 5ac47f7a6efb (powerpc: Relo

Re: [RFC PATCH 6/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-03-21 Thread Alexander Graf
On 14.02.2013, at 06:49, Scott Wood wrote: > Hook the MPIC code up to the KVM interfaces, add locking, etc. > > TODO: irqfd support > > Signed-off-by: Scott Wood Could you please split this patch up on your next respin? Also please make sure you don't have #if 0'ed code in here. Just return

Re: [PATCH 1/9] KVM: PPC: Book3S: Add infrastructure to implement kernel-side RTAS calls

2013-03-21 Thread Alexander Graf
On 15.02.2013, at 00:59, Paul Mackerras wrote: > From: Michael Ellerman > > For pseries machine emulation, in order to move the interrupt > controller code to the kernel, we need to intercept some RTAS > calls in the kernel itself. This adds an infrastructure to allow > in-kernel handlers to b

Re: [PATCH 2/9] KVM: PPC: Remove unused argument to kvmppc_core_dequeue_external

2013-03-21 Thread Alexander Graf
On 15.02.2013, at 01:00, Paul Mackerras wrote: > Currently kvmppc_core_dequeue_external() takes a struct kvm_interrupt * > argument and does nothing with it, in any of its implementations. > This removes it in order to make things easier for forthcoming > in-kernel interrupt controller emulation

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-03-21 Thread Alexander Graf
On 25.02.2013, at 01:59, Paul Mackerras wrote: > On Wed, Feb 20, 2013 at 04:58:54PM -0300, Marcelo Tosatti wrote: > >> This is probably a stupid question, but why the >> KVM_SET_IRQCHIP/KVM_SET_GSI_ROUTING interface is not appropriate for >> your purposes? >> >> x86 sets up a default GSI->IRQCH

Re: [PATCH] virtio-blk: Set default serial id

2013-03-21 Thread Paolo Bonzini
Il 20/03/2013 09:34, Asias He ha scritto: >> The solution is to do persistent naming either by really passing -device >> virtio-blk-pci,serial= or with udev inside the guest using the bus >> address (PCI devfn) like the new persistent network interface naming for >> Linux. > > '-virtio-blk-pci,ser

[PATCH] ARM: EXYNOS5440: DTS: Add virtual GIC DT bindings

2013-03-21 Thread Giridhar Maruthy
Exynos5440 has GIC which has virtualization support in them. These are used by KVM. Signed-off-by: Giridhar Maruthy --- arch/arm/boot/dts/exynos5440.dtsi |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.

Fwd: [PATCH] ARM: EXYNOS5440: DTS: Add virtual GIC DT bindings

2013-03-21 Thread Giridhar Maruthy
This patch is similar to the ones already submitted by Alexander Graf and also in Christoffer's tree in linux-kvm-arm for Arndale board, while this is required for exynos5440. Exynos5440 has GIC which has virtualization support in them. These are used by KVM. Signed-off-by: Giridhar Maruthy -

Re: [PATCH] KVM: PPC: e500: Expose MMU registers via ONE_REG

2013-03-21 Thread Alexander Graf
On 19.03.2013, at 18:26, Scott Wood wrote: > On 03/19/2013 12:17:11 PM, Mihai Caraman wrote: >> diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c >> index 66b6e31..b77b855 100644 >> --- a/arch/powerpc/kvm/e500_mmu.c >> +++ b/arch/powerpc/kvm/e500_mmu.c >> @@ -596,6 +596,95 @@

Re: [PATCH] KVM: PPC: e500: Add separate functions for vcpu's MMU configuration

2013-03-21 Thread Alexander Graf
On 19.03.2013, at 18:16, Mihai Caraman wrote: > Move vcpu's MMU default configuration and geometry update into their own > functions. Mind to explain why? Alex > > Signed-off-by: Mihai Caraman > --- > arch/powerpc/kvm/e500_mmu.c | 59 +++ > 1 files c

[PATCH 0/2] KVM: MMU: Make the meaning of kvm_mmu_free_some_pages() clearer

2013-03-21 Thread Takuya Yoshikawa
Takuya Yoshikawa (2): KVM: MMU: Move kvm_mmu_free_some_pages() into kvm_mmu_alloc_page() KVM: MMU: Rename kvm_mmu_free_some_pages() to make_mmu_pages_available() arch/x86/kvm/mmu.c | 16 +--- arch/x86/kvm/mmu.h |6 -- arch/x86/kvm/paging_tmpl.h |1 -

[PATCH 1/2] KVM: MMU: Move kvm_mmu_free_some_pages() into kvm_mmu_alloc_page()

2013-03-21 Thread Takuya Yoshikawa
What this function is doing is to ensure that the number of shadow pages does not exceed the maximum limit stored in n_max_mmu_pages: so this is placed at every code path that can reach kvm_mmu_alloc_page(). Although it might have some sense to spread this function in each such code path when it c

[PATCH 2/2] KVM: MMU: Rename kvm_mmu_free_some_pages() to make_mmu_pages_available()

2013-03-21 Thread Takuya Yoshikawa
The current name "kvm_mmu_free_some_pages" should be used for something that actually frees some shadow pages, as we expect from the name, but what the function is doing is to make some, KVM_MIN_FREE_MMU_PAGES, shadow pages available: it does nothing when there are enough. This patch changes the n

[PATCH v5 0/6] Use eoi to track RTC interrupt delivery status

2013-03-21 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the pending_eoi set to number of vcpu that received the interrupt. And decreas

[PATCH v5 1/6] KVM: Add vcpu info to ioapic_update_eoi()

2013-03-21 Thread Yang Zhang
From: Yang Zhang Add vcpu info to ioapic_update_eoi, so we can know which vcpu issued this EOI. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c| 12 ++-- virt/kvm/ioapic.h|3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH v5 3/6] KVM : Calculate destination vcpu on interrupt injection

2013-03-21 Thread Yang Zhang
From: Yang Zhang Add a new parameter to know vcpus who received the interrupt. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c | 21 - arch/x86/kvm/lapic.h |5 +++-- virt/kvm/ioapic.c|2 +- virt/kvm/ioapic.h|2 +- virt/kvm/irq_comm.c | 12 ++-

[PATCH v5 2/6] KVM: Introduce struct rtc_status

2013-03-21 Thread Yang Zhang
From: Yang Zhang Signed-off-by: Yang Zhang --- virt/kvm/ioapic.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 2fc61a5..6e5c88f 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h @@ -34,6 +34,11 @@ struct kvm_vcpu

[PATCH v5 5/6] KVM: Force vmexit with virtual interrupt delivery

2013-03-21 Thread Yang Zhang
From: Yang Zhang Need the EOI to track interrupt deliver status, so force vmexit on EOI for rtc interrupt when enabling virtual interrupt delivery. Signed-off-by: Yang Zhang --- virt/kvm/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt

[PATCH v5 6/6] KVM: Use eoi to track RTC interrupt delivery status

2013-03-21 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the pending_eoi set to number of vcpu that received the interrupt. And decrease

[PATCH v5 4/6] KVM: Add reset/restore rtc_status support

2013-03-21 Thread Yang Zhang
From: Yang Zhang Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/lapic.h |2 ++ virt/kvm/ioapic.c| 35 +++ 3 files changed, 45 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index

RE: [PATCH] KVM: PPC: e500: Expose MMU registers via ONE_REG

2013-03-21 Thread Caraman Mihai Claudiu-B02008
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Thursday, March 21, 2013 12:07 PM > To: Wood Scott-B07421 > Cc: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; kvm@vger.kernel.org > Subject: Re: [PATCH] KVM: PPC: e500: E

Re: [PATCH] KVM: PPC: e500: Expose MMU registers via ONE_REG

2013-03-21 Thread Alexander Graf
On 21.03.2013, at 12:02, Caraman Mihai Claudiu-B02008 wrote: > > >> -Original Message- >> From: Alexander Graf [mailto:ag...@suse.de] >> Sent: Thursday, March 21, 2013 12:07 PM >> To: Wood Scott-B07421 >> Cc: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org; linuxppc- >> d...@lists

RE: [PATCH] KVM: PPC: e500: Add separate functions for vcpu's MMU configuration

2013-03-21 Thread Caraman Mihai Claudiu-B02008
> -Original Message- > From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- > ow...@vger.kernel.org] On Behalf Of Alexander Graf > Sent: Thursday, March 21, 2013 12:07 PM > To: Caraman Mihai Claudiu-B02008 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org

[PATCH] KVM: Call kvm_apic_match_dest() to check destination vcpu

2013-03-21 Thread Yang Zhang
From: Yang Zhang For a given vcpu, kvm_apic_match_dest() will tell you whether the vcpu in the destination list quickly. Drop kvm_calculate_eoi_exitmap() and use kvm_apic_match_dest() instead. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c | 47 ---

RE: [PATCH] KVM: PPC: e500: Expose MMU registers via ONE_REG

2013-03-21 Thread Caraman Mihai Claudiu-B02008
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Thursday, March 21, 2013 1:07 PM > To: Caraman Mihai Claudiu-B02008 > Cc: Wood Scott-B07421; kvm-...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; kvm@vger.kernel.org > Subject: Re: [PATCH] KVM: PPC: e500: Expo

Re: [PATCH v5 3/6] KVM : Calculate destination vcpu on interrupt injection

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 06:49:21PM +0800, Yang Zhang wrote: > From: Yang Zhang > > Add a new parameter to know vcpus who received the interrupt. > > Signed-off-by: Yang Zhang > --- > arch/x86/kvm/lapic.c | 21 - > arch/x86/kvm/lapic.h |5 +++-- > virt/kvm/ioapic.c

Re: [PATCH] KVM: PPC: e500: Add separate functions for vcpu's MMU configuration

2013-03-21 Thread Alexander Graf
On 21.03.2013, at 12:19, Caraman Mihai Claudiu-B02008 wrote: >> -Original Message- >> From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- >> ow...@vger.kernel.org] On Behalf Of Alexander Graf >> Sent: Thursday, March 21, 2013 12:07 PM >> To: Caraman Mihai Claudiu-B02008 >> Cc: kvm-...@vg

Re: [PATCH 16/29] arm64: KVM: HYP mode world switch implementation

2013-03-21 Thread Marc Zyngier
On 20/03/13 20:04, Christopher Covington wrote: > Hi Marc, > > On 03/13/2013 03:59 PM, Christopher Covington wrote: > > [...] > >> Alternatively, you could consider storing the host registers in a >> slimmed-down vcpu structure for hosts, rather than on the stack. I am actively implementing thi

RE: [PATCH v5 3/6] KVM : Calculate destination vcpu on interrupt injection

2013-03-21 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 06:49:21PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Add a new parameter to know vcpus who received the interrupt. >> >> Signed-off-by: Yang Zhang >> --- >> arch/x86/kvm/lapic.c | 21 - >> arch/x86/kvm/l

Re: [PATCH v5 3/6] KVM : Calculate destination vcpu on interrupt injection

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 11:56:05AM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-03-21: > > On Thu, Mar 21, 2013 at 06:49:21PM +0800, Yang Zhang wrote: > >> From: Yang Zhang > >> > >> Add a new parameter to know vcpus who received the interrupt. > >> > >> Signed-off-by: Yang Zhang >

Re: [PATCH v5 2/6] KVM: Introduce struct rtc_status

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 06:49:20PM +0800, Yang Zhang wrote: > From: Yang Zhang > > Signed-off-by: Yang Zhang > --- > virt/kvm/ioapic.h |8 > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h > index 2fc61a5..6e5c88f 100644 > --

RE: [PATCH v5 3/6] KVM : Calculate destination vcpu on interrupt injection

2013-03-21 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 11:56:05AM +, Zhang, Yang Z wrote: >> Gleb Natapov wrote on 2013-03-21: >>> On Thu, Mar 21, 2013 at 06:49:21PM +0800, Yang Zhang wrote: From: Yang Zhang Add a new parameter to know vcpus who received the interrupt. >>>

RE: [PATCH v5 2/6] KVM: Introduce struct rtc_status

2013-03-21 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 06:49:20PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Signed-off-by: Yang Zhang >> --- >> virt/kvm/ioapic.h |8 >> 1 files changed, 8 insertions(+), 0 deletions(-) >> diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapi

Re: [PATCH v5 3/6] KVM : Calculate destination vcpu on interrupt injection

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 12:12:06PM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-03-21: > > On Thu, Mar 21, 2013 at 11:56:05AM +, Zhang, Yang Z wrote: > >> Gleb Natapov wrote on 2013-03-21: > >>> On Thu, Mar 21, 2013 at 06:49:21PM +0800, Yang Zhang wrote: > From: Yang Zhang > >

Re: [PATCH 0/11] KVM: nVMX: shadow VMCS support, v1

2013-03-21 Thread Orit Wasserman
On 03/10/2013 06:03 PM, Abel Gordon wrote: > This series of patches implements shadow-vmcs capability for nested VMX. > > Shadow-vmcs - background and overview: > > In Intel VMX, vmread and vmwrite privileged instructions are used by the > hypervisor to read and modify the guest and host specif

RE: [PATCH v5 3/6] KVM : Calculate destination vcpu on interrupt injection

2013-03-21 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 12:12:06PM +, Zhang, Yang Z wrote: >> Gleb Natapov wrote on 2013-03-21: >>> On Thu, Mar 21, 2013 at 11:56:05AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 06:49:21PM +0800, Yang Zhan

Re: [PATCH v2 4/7] KVM: MMU: delete shadow page from hash list in kvm_mmu_prepare_zap_page

2013-03-21 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 04:30:24PM +0800, Xiao Guangrong wrote: > Move deletion shadow page from the hash list from kvm_mmu_commit_zap_page to > kvm_mmu_prepare_zap_page, we that we can free the shadow page out of mmu-lock. > > Also, delete the invalid shadow page from the hash list since this pag

Re: [PATCH 0/11] KVM: nVMX: shadow VMCS support, v1

2013-03-21 Thread Abel Gordon
Orit Wasserman wrote on 21/03/2013 02:22:44 PM: > By the way do you have some performance results, how does it improve nested ? Only the old numbers we obtained "emulating" this type of feature using Nehalem processors and we --including you :)-- published in the Turtles papers: http://static.

Re: Host kernel crash at pci_find_upstream_pcie_bridge on VM exit

2013-03-21 Thread Ganesh Narayanaswamy
Hi Alex, Yes. They are PCIe devices which expose the PCIe functionality: -bash-4.1# lspci -vv -s 04:00 …. Capabilities: [ac] Express (v2) Endpoint, MSI 00 -bash-4.1# lspci -vv -s 03:00 …. Capabilities: [80] Express (v2) Endpoint, MSI 00 Is there any dependency issue here ? Does

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Marcelo Tosatti
On Thu, Mar 21, 2013 at 06:54:46AM +0200, Gleb Natapov wrote: > On Wed, Mar 20, 2013 at 08:19:13PM -0300, Marcelo Tosatti wrote: > > On Wed, Mar 20, 2013 at 11:32:38PM +0200, Gleb Natapov wrote: > > > On Wed, Mar 20, 2013 at 05:03:19PM -0300, Marcelo Tosatti wrote: > > > > On Wed, Mar 20, 2013 at 0

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 11:02:24AM -0300, Marcelo Tosatti wrote: > On Thu, Mar 21, 2013 at 06:54:46AM +0200, Gleb Natapov wrote: > > On Wed, Mar 20, 2013 at 08:19:13PM -0300, Marcelo Tosatti wrote: > > > On Wed, Mar 20, 2013 at 11:32:38PM +0200, Gleb Natapov wrote: > > > > On Wed, Mar 20, 2013 at 0

RE: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: > On Thu, Mar 21, 2013 at 11:02:24AM -0300, Marcelo Tosatti wrote: >> On Thu, Mar 21, 2013 at 06:54:46AM +0200, Gleb Natapov wrote: >>> On Wed, Mar 20, 2013 at 08:19:13PM -0300, Marcelo Tosatti wrote: On Wed, Mar 20, 2013 at 11:32:38PM +0200, Gleb Natapov wrot

Re: KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-21 Thread Marcelo Tosatti
On Thu, Mar 21, 2013 at 01:41:59PM +0800, Xiao Guangrong wrote: > On 03/21/2013 04:14 AM, Marcelo Tosatti wrote: > > > > kvm_mmu_calculate_mmu_pages numbers, > > > > maximum number of shadow pages = 2% of mapped guest pages > > > > Does not make sense for TDP guests where mapping all of guest >

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Kevin Hilman
Gleb Natapov writes: > On Wed, Mar 20, 2013 at 06:58:41PM -0500, Scott Wood wrote: >> On 03/14/2013 07:13:46 PM, Kevin Hilman wrote: >> >The new context tracking subsystem unconditionally includes kvm_host.h >> >headers for the guest enter/exit macros. This causes a compile >> >failure when KVM

Re: [RFC PATCH 6/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-03-21 Thread Scott Wood
On 03/21/2013 03:28:35 AM, Alexander Graf wrote: On 14.02.2013, at 06:49, Scott Wood wrote: > Hook the MPIC code up to the KVM interfaces, add locking, etc. > > TODO: irqfd support > > Signed-off-by: Scott Wood Could you please split this patch up on your next respin? Any particular split y

Re: [RFC PATCH 6/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-03-21 Thread Alexander Graf
On 21.03.2013, at 15:43, Scott Wood wrote: > On 03/21/2013 03:28:35 AM, Alexander Graf wrote: >> On 14.02.2013, at 06:49, Scott Wood wrote: >> > Hook the MPIC code up to the KVM interfaces, add locking, etc. >> > >> > TODO: irqfd support >> > >> > Signed-off-by: Scott Wood >> Could you please sp

Re: Virtualbox svga card in KVM

2013-03-21 Thread Alon Levy
> > > Hi, > I am planning on bringing in the virtualbox svga card into kvm > as a new svga card type (vbox probably?) so that we can load > the VirtualBox SVGA card drivers in the guest. > > Is this even feasible?. Any ideas on where I should start > looking? I don't se

Re: Host kernel crash at pci_find_upstream_pcie_bridge on VM exit

2013-03-21 Thread Alex Williamson
On Thu, 2013-03-21 at 06:55 -0700, Ganesh Narayanaswamy wrote: > Hi Alex, > > Yes. They are PCIe devices which expose the PCIe functionality: > > -bash-4.1# lspci -vv -s 04:00 > …. > Capabilities: [ac] Express (v2) Endpoint, MSI 00 > > -bash-4.1# lspci -vv -s 03:00 > …. > Capabiliti

Re: [PATCH 3/3] ARM: EXYNOS5250: Register architected timers

2013-03-21 Thread Alexander Graf
On 14.03.2013, at 20:07, Sergei Shtylyov wrote: > Hello. > > On 14-03-2013 4:59, Alexander Graf wrote: > >> When running on an exynos 5250 SoC, we don't initialize the architected >> timers. The chip however supports architected timers. > >> When we don't initialize them, KVM will try to acces

Re: KVM next tree merge onto current Linus master

2013-03-21 Thread Marcelo Tosatti
On Thu, Mar 21, 2013 at 08:49:07AM +0100, Alexander Graf wrote: > Hi guys, > > Just recently this really important patch got pulled into Linus' tree for 3.9: > > commit 1674400aaee5b466c595a8fc310488263ce888c7 > Author: Anton Blanchard > Date: Tue Mar 12 01:51:51 2013 + > > powerpc: F

Re: [PATCH net] vhost/net: fix heads usage of ubuf_info

2013-03-21 Thread Ben Hutchings
On Thu, 2013-03-21 at 08:02 +0200, Michael S. Tsirkin wrote: > On Sun, Mar 17, 2013 at 02:29:55PM -0400, David Miller wrote: > > From: "Michael S. Tsirkin" > > Date: Sun, 17 Mar 2013 14:46:09 +0200 > > > > > ubuf info allocator uses guest controlled head as an index, > > > so a malicious guest co

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 02:27:22PM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-03-21: > > On Thu, Mar 21, 2013 at 11:02:24AM -0300, Marcelo Tosatti wrote: > >> On Thu, Mar 21, 2013 at 06:54:46AM +0200, Gleb Natapov wrote: > >>> On Wed, Mar 20, 2013 at 08:19:13PM -0300, Marcelo Tosatti

Re: [PATCH net] vhost/net: fix heads usage of ubuf_info

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 04:23:48PM +, Ben Hutchings wrote: > On Thu, 2013-03-21 at 08:02 +0200, Michael S. Tsirkin wrote: > > On Sun, Mar 17, 2013 at 02:29:55PM -0400, David Miller wrote: > > > From: "Michael S. Tsirkin" > > > Date: Sun, 17 Mar 2013 14:46:09 +0200 > > > > > > > ubuf info allo

Re: [PATCH net] vhost/net: fix heads usage of ubuf_info

2013-03-21 Thread Ben Hutchings
On Thu, 2013-03-21 at 18:28 +0200, Michael S. Tsirkin wrote: > On Thu, Mar 21, 2013 at 04:23:48PM +, Ben Hutchings wrote: > > On Thu, 2013-03-21 at 08:02 +0200, Michael S. Tsirkin wrote: > > > On Sun, Mar 17, 2013 at 02:29:55PM -0400, David Miller wrote: > > > > From: "Michael S. Tsirkin" > >

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Scott Wood
On 03/21/2013 09:27:14 AM, Kevin Hilman wrote: Gleb Natapov writes: > On Wed, Mar 20, 2013 at 06:58:41PM -0500, Scott Wood wrote: >> On 03/14/2013 07:13:46 PM, Kevin Hilman wrote: >> >The new context tracking subsystem unconditionally includes kvm_host.h >> >headers for the guest enter/exit

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 01:42:34PM -0500, Scott Wood wrote: > On 03/21/2013 09:27:14 AM, Kevin Hilman wrote: > >Gleb Natapov writes: > > > >> On Wed, Mar 20, 2013 at 06:58:41PM -0500, Scott Wood wrote: > >>> On 03/14/2013 07:13:46 PM, Kevin Hilman wrote: > >>> >The new context tracking subsystem u

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Scott Wood
On 03/21/2013 02:16:00 PM, Gleb Natapov wrote: On Thu, Mar 21, 2013 at 01:42:34PM -0500, Scott Wood wrote: > On 03/21/2013 09:27:14 AM, Kevin Hilman wrote: > >Gleb Natapov writes: > > > >> On Wed, Mar 20, 2013 at 06:58:41PM -0500, Scott Wood wrote: > >>> Why can't the entirety kvm_host.h be incl

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Marcelo Tosatti
> > > But current PI patches do break them, thats my point. So we either > > > need to revise them again, or drop LAPIC timer reinjection. Making > > > apic_accept_irq semantics "it returns coalescing info, but only sometimes" > > > is dubious though. > > We may rollback to the initial idea: test b

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 05:51:50PM -0300, Marcelo Tosatti wrote: > > > > But current PI patches do break them, thats my point. So we either > > > > need to revise them again, or drop LAPIC timer reinjection. Making > > > > apic_accept_irq semantics "it returns coalescing info, but only > > > > som

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 02:33:13PM -0500, Scott Wood wrote: > On 03/21/2013 02:16:00 PM, Gleb Natapov wrote: > >On Thu, Mar 21, 2013 at 01:42:34PM -0500, Scott Wood wrote: > >> On 03/21/2013 09:27:14 AM, Kevin Hilman wrote: > >> >Gleb Natapov writes: > >> > > >> >> On Wed, Mar 20, 2013 at 06:58:41

[Bug 55421] igb VF can't work in KVM guest

2013-03-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=55421 Alex Williamson changed: What|Removed |Added CC||alex.william...@redhat.com,

Re: [Bug 55421] igb VF can't work in KVM guest

2013-03-21 Thread Alex Williamson
Mitch, Bugzilla wouldn't let me add you to the CC, so FYI... Thanks, Alex On Thu, 2013-03-21 at 21:29 +, bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=55421 > > > Alex Williamson changed: > >What|Removed |Adde

RE: [Bug 55421] igb VF can't work in KVM guest

2013-03-21 Thread Williams, Mitch A
Thanks for the FYI, Alex. When we pushed this patch upstream, there was a corresponding patch to igbvf that was pushed at the same time. With this patch, the VFs detect the zero address and generate a random MAC address themselves. The reason for this change is to make the VFs play nicely with u

Re: [Bug 55421] igb VF can't work in KVM guest

2013-03-21 Thread Alex Williamson
On Thu, 2013-03-21 at 22:03 +, Williams, Mitch A wrote: > Thanks for the FYI, Alex. When we pushed this patch upstream, there > was a corresponding patch to igbvf that was pushed at the same time. > With this patch, the VFs detect the zero address and generate a random > MAC address themselves.

Re: [PATCH v2 0/7] KVM: MMU: fast zap all shadow pages

2013-03-21 Thread Marcelo Tosatti
On Wed, Mar 20, 2013 at 04:30:20PM +0800, Xiao Guangrong wrote: > Changlog: > V2: > - do not reset n_requested_mmu_pages and n_max_mmu_pages > - batch free root shadow pages to reduce vcpu notification and mmu-lock > contention > - remove the first patch that introduce kvm->arch.mmu_cache

Re: [PATCH 0/2] KVM: MMU: Make the meaning of kvm_mmu_free_some_pages() clearer

2013-03-21 Thread Marcelo Tosatti
On Thu, Mar 21, 2013 at 07:32:56PM +0900, Takuya Yoshikawa wrote: > Takuya Yoshikawa (2): > KVM: MMU: Move kvm_mmu_free_some_pages() into kvm_mmu_alloc_page() > KVM: MMU: Rename kvm_mmu_free_some_pages() to make_mmu_pages_available() > > arch/x86/kvm/mmu.c | 16 +--- > a

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Marcelo Tosatti
On Thu, Mar 21, 2013 at 11:13:39PM +0200, Gleb Natapov wrote: > On Thu, Mar 21, 2013 at 05:51:50PM -0300, Marcelo Tosatti wrote: > > > > > But current PI patches do break them, thats my point. So we either > > > > > need to revise them again, or drop LAPIC timer reinjection. Making > > > > > apic_a

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Kevin Hilman
Gleb Natapov writes: > On Thu, Mar 21, 2013 at 02:33:13PM -0500, Scott Wood wrote: >> On 03/21/2013 02:16:00 PM, Gleb Natapov wrote: >> >On Thu, Mar 21, 2013 at 01:42:34PM -0500, Scott Wood wrote: >> >> On 03/21/2013 09:27:14 AM, Kevin Hilman wrote: >> >> >Gleb Natapov writes: >> >> > >> >> >> O

RE: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Zhang, Yang Z
Marcelo Tosatti wrote on 2013-03-22: > On Thu, Mar 21, 2013 at 11:13:39PM +0200, Gleb Natapov wrote: >> On Thu, Mar 21, 2013 at 05:51:50PM -0300, Marcelo Tosatti wrote: >> But current PI patches do break them, thats my point. So we either >> need to revise them again, or drop LAPIC timer re

Re: [PATCH v2 0/7] KVM: MMU: fast zap all shadow pages

2013-03-21 Thread Xiao Guangrong
On 03/22/2013 06:21 AM, Marcelo Tosatti wrote: > On Wed, Mar 20, 2013 at 04:30:20PM +0800, Xiao Guangrong wrote: >> Changlog: >> V2: >> - do not reset n_requested_mmu_pages and n_max_mmu_pages >> - batch free root shadow pages to reduce vcpu notification and mmu-lock >> contention >> - re

Re: [PATCH v2 4/7] KVM: MMU: delete shadow page from hash list in kvm_mmu_prepare_zap_page

2013-03-21 Thread Xiao Guangrong
On 03/21/2013 09:14 PM, Gleb Natapov wrote: > On Wed, Mar 20, 2013 at 04:30:24PM +0800, Xiao Guangrong wrote: >> Move deletion shadow page from the hash list from kvm_mmu_commit_zap_page to >> kvm_mmu_prepare_zap_page, we that we can free the shadow page out of >> mmu-lock. >> >> Also, delete the

[PATCH 0/2] tcm_vhost endpoint

2013-03-21 Thread Asias He
Asias He (2): tcm_vhost: Use vq->private_data to indicate if the endpoint is setup tcm_vhost: Initialize vq->last_used_idx when set endpoint drivers/vhost/tcm_vhost.c | 47 +-- 1 file changed, 41 insertions(+), 6 deletions(-) -- 1.8.1.4 -- To uns

[PATCH 1/2] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-03-21 Thread Asias He
Currently, vs->vs_endpoint is used indicate if the endpoint is setup or not. It is set or cleared in vhost_scsi_set_endpoint() or vhost_scsi_clear_endpoint() under the vs->dev.mutex lock. However, when we check it in vhost_scsi_handle_vq(), we ignored the lock. Instead of using the vs->vs_endpoint

[PATCH 2/2] tcm_vhost: Initialize vq->last_used_idx when set endpoint

2013-03-21 Thread Asias He
This patch fixes guest hang when booting seabios and guest. [0.576238] scsi0 : Virtio SCSI HBA [0.616754] virtio_scsi virtio1: request:id 0 is not a head! vq->last_used_idx is initialized only when /dev/vhost-scsi is opened or closed. vhost_scsi_open -> vhost_dev_init() -> vhost_v

Re: KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-21 Thread Xiao Guangrong
On 03/21/2013 10:29 PM, Marcelo Tosatti wrote: > On Thu, Mar 21, 2013 at 01:41:59PM +0800, Xiao Guangrong wrote: >> On 03/21/2013 04:14 AM, Marcelo Tosatti wrote: >>> >>> kvm_mmu_calculate_mmu_pages numbers, >>> >>> maximum number of shadow pages = 2% of mapped guest pages >>> >>> Does not make se

[PATCH v6 0/6] Use eoi to track RTC interrupt delivery status

2013-03-21 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the pending_eoi set to number of vcpu that received the interrupt. And decreas

[PATCH v6 1/6] KVM: Add vcpu info to ioapic_update_eoi()

2013-03-21 Thread Yang Zhang
From: Yang Zhang Add vcpu info to ioapic_update_eoi, so we can know which vcpu issued this EOI. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c| 12 ++-- virt/kvm/ioapic.h|3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH v6 2/6] KVM: Introduce struct rtc_status

2013-03-21 Thread Yang Zhang
From: Yang Zhang Signed-off-by: Yang Zhang --- virt/kvm/ioapic.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 2fc61a5..cd30277 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h @@ -34,6 +34,17 @@ struct kvm

[PATCH v6 3/6] KVM : Return destination vcpu on interrupt injection

2013-03-21 Thread Yang Zhang
From: Yang Zhang Add a new parameter to know vcpus who received the interrupt. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c | 25 - arch/x86/kvm/lapic.h |5 +++-- virt/kvm/ioapic.c|2 +- virt/kvm/ioapic.h|2 +- virt/kvm/irq_comm.c | 12 +++

[PATCH v6 4/6] KVM: Add reset/restore rtc_status support

2013-03-21 Thread Yang Zhang
From: Yang Zhang Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/lapic.h |2 ++ virt/kvm/ioapic.c| 26 ++ 3 files changed, 36 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index d7915a1.

[PATCH v6 6/6] KVM: Use eoi to track RTC interrupt delivery status

2013-03-21 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the pending_eoi set to number of vcpu that received the interrupt. And decrease

[PATCH v6 5/6] KVM : Force vmexit with virtual interrupt delivery

2013-03-21 Thread Yang Zhang
From: Yang Zhang Need the EOI to track interrupt deliver status, so force vmexit on EOI for rtc interrupt when enabling virtual interrupt delivery. Signed-off-by: Yang Zhang --- virt/kvm/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt

[PATCH V4 0/2] tcm_vhost hotplug

2013-03-21 Thread Asias He
Asias He (2): tcm_vhost: Introduce tcm_vhost_check_feature() tcm_vhost: Add hotplug/hotunplug support drivers/vhost/tcm_vhost.c | 224 -- drivers/vhost/tcm_vhost.h | 10 +++ 2 files changed, 229 insertions(+), 5 deletions(-) -- 1.8.1.4 -- To uns

[PATCH V4 1/2] tcm_vhost: Introduce tcm_vhost_check_feature()

2013-03-21 Thread Asias He
This helper is useful to check if a feature is supported. Signed-off-by: Asias He Reviewed-by: Stefan Hajnoczi --- drivers/vhost/tcm_vhost.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 0524267..d81e3a9 100644 ---

[PATCH V4 2/2] tcm_vhost: Add hotplug/hotunplug support

2013-03-21 Thread Asias He
In commit 365a7150094 ([SCSI] virtio-scsi: hotplug support for virtio-scsi), hotplug support is added to virtio-scsi. This patch adds hotplug and hotunplug support to tcm_vhost. You can create or delete a LUN in targetcli to hotplug or hotunplug a LUN in guest. Changes in v4: - Drop tcm_vhost_ch

Re: [Bug 53611] New: nVMX: Add nested EPT

2013-03-21 Thread Nakajima, Jun
On Mon, Mar 4, 2013 at 8:45 PM, Nakajima, Jun wrote: > I have some updates on this. We rebased the patched to the latest KVM > (L0). It turned out that the version of L1 KVM/Linux matters. At that > time, actually I used v3.7 kernel for L1, and the L2 didn't work as I > described above. If I use v

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-21 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 08:06:41PM -0300, Marcelo Tosatti wrote: > On Thu, Mar 21, 2013 at 11:13:39PM +0200, Gleb Natapov wrote: > > On Thu, Mar 21, 2013 at 05:51:50PM -0300, Marcelo Tosatti wrote: > > > > > > But current PI patches do break them, thats my point. So we either > > > > > > need to re

[PATCH V2 0/3] tcm_vhost pending requests flush

2013-03-21 Thread Asias He
Changes in v2: - Increase/Decrease inflight requests in vhost_scsi_{allocate,free}_cmd and tcm_vhost_{allocate,free}_evt Asias He (3): tcm_vhost: Wait for pending requests in vhost_scsi_flush() tcm_vhost: Wait for pending requests in vhost_scsi_clear_endpoint() tcm_vhost: Fix tv_cmd leak i

[PATCH V2 1/3] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-03-21 Thread Asias He
This patch makes vhost_scsi_flush() wait for all the pending requests issued before the flush operation to be finished. Signed-off-by: Asias He --- drivers/vhost/tcm_vhost.c | 117 ++ drivers/vhost/tcm_vhost.h | 4 ++ 2 files changed, 101 insertions(

[PATCH V2 2/3] tcm_vhost: Wait for pending requests in vhost_scsi_clear_endpoint()

2013-03-21 Thread Asias He
Wait for termination of all pending requests in clear endpoint operation, otherwise you cannot reset virtio devices safely. Signed-off-by: Asias He --- drivers/vhost/tcm_vhost.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index dc0

[PATCH V2 3/3] tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq

2013-03-21 Thread Asias He
If we fail to submit the allocated tv_vmd to tcm_vhost_submission_work, we will leak the tv_vmd. Free tv_vmd on fail path. Signed-off-by: Asias He --- drivers/vhost/tcm_vhost.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vho