Re: KVM: PPC: Book3S: Add API for in-kernel XICS emulation

2013-05-02 Thread David Gibson
On Sat, Apr 27, 2013 at 10:28:37AM -, Paul Mackerras wrote: This adds the API for userspace to instantiate an XICS device in a VM and connect VCPUs to it. The API consists of a new device type for the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which functions similarly to

RE: [PATCH 11/11] nEPT: Provide the correct exit qualification upon EPT

2013-05-02 Thread Xu, Xinhao
Hi, Jan Can you provide details of your test environment? -Original Message- From: Jan Kiszka [mailto:jan.kis...@web.de] Sent: Sunday, April 28, 2013 5:36 PM To: Xu, Xinhao Cc: Nakajima, Jun; kvm@vger.kernel.org Subject: Re: [PATCH 11/11] nEPT: Provide the correct exit qualification upon

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Gleb Natapov
On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually calling these functions with slots_lock held. The srcu read lock, OTOH, is required. Signed-off-by: Scott Wood scottw...@freescale.com Marcelo, could you

[PATCH] [RFC] s390/kvm: note a quiescing state if we interupt guest mode

2013-05-02 Thread Christian Borntraeger
The SIE instruction is interruptible, so instead of having a guest exit on a host interrupt we basically return to guest mode. We have some logic in the interrupt handler to check for need_resched, machine checks or sigpending to exit SIE the hard way, but RCU is currently not handled, leading to

virtio performance analysis

2013-05-02 Thread nitesh narayan lal
Hi, I am currently working on the virtio performance analysis in PowerPC . I was looking at the virtio front-end code and had done tracing by adding WARN_ON condition in skb_recv_done(),xmit_skb_done( ) and virtqueue_kick(). What I had seen is virtqueue_kick() internally it calls iowrite16() which

Re: [PATCH 11/11] nEPT: Provide the correct exit qualification upon EPT

2013-05-02 Thread Jan Kiszka
On 2013-05-02 08:59, Xu, Xinhao wrote: Hi, Jan Can you provide details of your test environment? Pretty simple: Run a Linux 3.9(-rc5) kernel as L2 on top of the same kernel with QEMU (git head at that time). I've attached the config. Jan -Original Message- From: Jan Kiszka

RE: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-05-02 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Friday, April 26, 2013 4:46 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; Wood Scott-B07421; Bhushan Bharat-R65777 Subject: Re: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 09:18, Gleb Natapov wrote: On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually calling these functions with slots_lock held. The srcu read lock, OTOH, is required. Signed-off-by: Scott Wood

[PULL] vhost: cleanups and fixes

2013-05-02 Thread Michael S. Tsirkin
The following changes since commit c39904a0ac22cf05f5f44226457f6da0fe65457e: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next (2013-04-26 23:33:41 -0400) are available in the git repository at:

Re: [PATCH v3 16/32] arm64: KVM: hypervisor initialization code

2013-05-02 Thread Catalin Marinas
On Mon, Apr 08, 2013 at 05:17:18PM +0100, Marc Zyngier wrote: Provide EL2 with page tables and stack, and set the vectors to point to the full blown world-switch code. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_host.h | 13 +

Re: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 11:46, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Friday, April 26, 2013 4:46 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; Wood Scott-B07421; Bhushan Bharat-R65777

Re: [PATCH] KVM: PPC: Book3S: Add API for in-kernel XICS emulation

2013-05-02 Thread Alexander Graf
On 27.04.2013, at 12:28, Paul Mackerras wrote: This adds the API for userspace to instantiate an XICS device in a VM and connect VCPUs to it. The API consists of a new device type for the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which functions similarly to

Re: [PATCH -next] kvm/ppc/mpic: fix missing unlock in set_base_addr()

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 07:17, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function set_base_addr() when disables the mapping. Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21 (kvm/ppc/mpic: in-kernel MPIC

Re: [PATCH 1/3] kvm/ppc/booke: Hold srcu lock when calling gfn functions

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 02:27, Scott Wood wrote: On 05/01/2013 07:15:53 PM, Marcelo Tosatti wrote: On Fri, Apr 26, 2013 at 07:53:38PM -0500, Scott Wood wrote: diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119..506c87d 100644 --- a/arch/powerpc/kvm/booke.c +++

Re: [PATCH 2/3] kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write

2013-05-02 Thread Alexander Graf
On 27.04.2013, at 02:53, Scott Wood wrote: These functions do an srcu_dereference without acquiring the srcu lock themselves. Signed-off-by: Scott Wood scottw...@freescale.com Thanks, applied to kvm-ppc-queue. Alex -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Gleb Natapov
On Thu, May 02, 2013 at 12:53:44PM +0200, Alexander Graf wrote: On 02.05.2013, at 09:18, Gleb Natapov wrote: On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually calling these functions with slots_lock held.

Re: [PATCH 1/2] kvm/ppc/mpic: fix mmio region lists when multiple guests used

2013-05-02 Thread Alexander Graf
On 01.05.2013, at 02:57, Scott Wood wrote: Keeping a linked list of statically defined objects doesn't work very well when we have multiple guests. :-P Switch to an array of constant objects. This fixes a hang when multiple guests are used. Signed-off-by: Scott Wood

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 13:00, Gleb Natapov wrote: On Thu, May 02, 2013 at 12:53:44PM +0200, Alexander Graf wrote: On 02.05.2013, at 09:18, Gleb Natapov wrote: On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually

Re: BUG: virtio_mmio multi-queue competely broken -- virtio *registers* considered harmful

2013-05-02 Thread Pawel Moll
Hi Tom, On Thu, 2013-05-02 at 04:40 +0100, Tom Lyon wrote: Virtiio_mmio attempts to mimic the layout of some control registers from virtio_pci. These registers, in particular VIRTIO_MMIO_QUEUE_SEL and VIRTIO_PCI_QUEUE_SEL, are active in nature, and not just passive like a normal memory

Re: [PATCH v3 16/32] arm64: KVM: hypervisor initialization code

2013-05-02 Thread Marc Zyngier
On 02/05/13 12:03, Catalin Marinas wrote: On Mon, Apr 08, 2013 at 05:17:18PM +0100, Marc Zyngier wrote: Provide EL2 with page tables and stack, and set the vectors to point to the full blown world-switch code. Signed-off-by: Marc Zyngier marc.zyng...@arm.com ---

[PATCH 1/6] kvm/ppc/mpic: remove default routes from documentation

2013-05-02 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The default routes were removed from the code during patchset respinning, but were not removed from the documentation. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 4/6] kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write

2013-05-02 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com These functions do an srcu_dereference without acquiring the srcu lock themselves. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c | 23 +++ 1 file changed,

[PATCH 5/6] kvm/ppc/mpic: fix missing unlock in set_base_addr()

2013-05-02 Thread Alexander Graf
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function set_base_addr() when disables the mapping. Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21 (kvm/ppc/mpic: in-kernel MPIC emulation) Signed-off-by: Wei Yongjun

[PATCH 3/6] kvm/ppc/mpic: remove users

2013-05-02 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is an unused (no pun intended) leftover from when this code did reference counting. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/mpic.c | 1 - 1 file changed, 1 deletion(-) diff

[PULL 0/6] ppc patch queue 2013-05-02 for 3.10

2013-05-02 Thread Alexander Graf
Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull and apply to next, so it makes its way into 3.10. Sorry for the late request. There is still one RCU patch outstanding that needs a respin, so expect another request to come in later in the 3.10 cycle. Changes include: -

[PATCH 6/6] KVM: PPC: Book3S: Add API for in-kernel XICS emulation

2013-05-02 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds the API for userspace to instantiate an XICS device in a VM and connect VCPUs to it. The API consists of a new device type for the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which functions similarly to KVM_CAP_IRQ_MPIC, and the

[PATCH 2/6] kvm/ppc/mpic: fix mmio region lists when multiple guests used

2013-05-02 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Keeping a linked list of statically defined objects doesn't work very well when we have multiple guests. :-P Switch to an array of constant objects. This fixes a hang when multiple guests are used. Signed-off-by: Scott Wood scottw...@freescale.com

[PATCH 01/29] cpu: Make kvm-stub.o available outside softmmu

2013-05-02 Thread Andreas Färber
From: Igor Mammedov imamm...@redhat.com It will provide stubs for *-user targets once softmmu-specific calls are attempted from common CPU code. Signed-off-by: Igor Mammedov imamm...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de ---

[PATCH 02/29] cpu: Call cpu_synchronize_post_init() from DeviceClass::realize()

2013-05-02 Thread Andreas Färber
From: Igor Mammedov imamm...@redhat.com If hotplugged, synchronize CPU state to KVM. Signed-off-by: Igor Mammedov imamm...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- include/sysemu/kvm.h | 20 ++-- kvm-all.c

[PATCH 25/29] target-i386/kvm.c: Code formatting changes

2013-05-02 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com Add appropriate spaces around operators, and break line where it needs to be broken to allow feature-words array to be introduced without having too-long lines. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Igor Mammedov

[PATCH 27/29] target-i386: Replace cpuid_*features fields with a feature word array

2013-05-02 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com This replaces the feature-bit fields on both X86CPU and x86_def_t structs with an array. With this, we will be able to simplify code that simply does the same operation on all feature words (e.g. kvm_check_features_against_host(),

RE: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-05-02 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, May 02, 2013 4:35 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; Wood Scott-B07421 Subject: Re: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support On

Re: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 16:00, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, May 02, 2013 4:35 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; Wood Scott-B07421 Subject: Re: [PATCH 7/7 v3]

Re: [PATCH 1/3] kvm/ppc/booke: Hold srcu lock when calling gfn functions

2013-05-02 Thread Marcelo Tosatti
On Wed, May 01, 2013 at 07:27:23PM -0500, Scott Wood wrote: On 05/01/2013 07:15:53 PM, Marcelo Tosatti wrote: On Fri, Apr 26, 2013 at 07:53:38PM -0500, Scott Wood wrote: diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119..506c87d 100644 ---

[PATCH v2 0/5] ARM: KVM: various mmu related fixes for 3.10

2013-05-02 Thread Marc Zyngier
This patch series fixes a number of of KVM/ARM issues that have either been spotted during the review of the arm64 code, or while reworking related code. Only the first patch fixes a potential (if unlikely) problem, the others are either cosmetic or performance related. Tested on TC-2. Marc

[PATCH v2 1/5] ARM: KVM: be more thorough when invalidating TLBs

2013-05-02 Thread Marc Zyngier
The KVM/ARM MMU code doesn't take care of invalidating TLBs before freeing a {pte,pmd} table. This could cause problems if the page is reallocated and then speculated into by another CPU. Reported-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Marc Zyngier marc.zyng...@arm.com ---

[PATCH v2 2/5] ARM: KVM: remove dead prototype for __kvm_tlb_flush_vmid

2013-05-02 Thread Marc Zyngier
__kvm_tlb_flush_vmid has been renamed to __kvm_tlb_flush_vmid_ipa, and the old prototype should have been removed when the code was modified. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm/include/asm/kvm_asm.h | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v2 5/5] ARM: KVM: use phys_addr_t instead of unsigned long long for HYP PGDs

2013-05-02 Thread Marc Zyngier
HYP PGDs are passed around as phys_addr_t, except just before calling into the hypervisor init code, where they are cast to a rather weird unsigned long long. Just keep them around as phys_addr_t, which is what makes the most sense. Reported-by: Catalin Marinas catalin.mari...@arm.com

[PATCH v2 3/5] ARM: KVM: relax cache maintainance when building page tables

2013-05-02 Thread Marc Zyngier
Patch 5a677ce044f1 (ARM: KVM: switch to a dual-step HYP init code) introduced code that flushes page tables to the point of coherency. This is overkill (point of unification is enough and already done), and actually not required if running on a SMP capable platform (the HW PTW can snoop other

[PATCH v2 4/5] ARM: KVM: get rid of S2_PGD_SIZE

2013-05-02 Thread Marc Zyngier
S2_PGD_SIZE defines the number of pages used by a stage-2 PGD and is unused, except for a VM_BUG_ON check that missuses the define. As the check is very unlikely to ever triggered except in circumstances where KVM is the least of our worries, just kill both the define and the VM_BUG_ON check.

Re: [PATCH v3 19/32] arm64: KVM: Plug the VGIC

2013-05-02 Thread Catalin Marinas
On Wed, Apr 24, 2013 at 12:43:21PM +0100, Marc Zyngier wrote: On 24/04/13 00:00, Christoffer Dall wrote: On Mon, Apr 08, 2013 at 05:17:21PM +0100, Marc Zyngier wrote: Add support for the in-kernel GIC emulation. The include file is a complete duplicate of the 32bit one - something to fix

Re: [PATCH v2 3/5] ARM: KVM: relax cache maintainance when building page tables

2013-05-02 Thread Catalin Marinas
On Thu, May 02, 2013 at 03:39:00PM +0100, Marc Zyngier wrote: Patch 5a677ce044f1 (ARM: KVM: switch to a dual-step HYP init code) introduced code that flushes page tables to the point of coherency. This is overkill (point of unification is enough and already done), and actually not required if

Re: [PATCH v2 3/5] ARM: KVM: relax cache maintainance when building page tables

2013-05-02 Thread Will Deacon
On Thu, May 02, 2013 at 03:39:00PM +0100, Marc Zyngier wrote: Patch 5a677ce044f1 (ARM: KVM: switch to a dual-step HYP init code) introduced code that flushes page tables to the point of coherency. This is overkill (point of unification is enough and already done), and actually not required if

Re: [PATCH] [RFC] s390/kvm: note a quiescing state if we interupt guest mode

2013-05-02 Thread Paul E. McKenney
On Thu, May 02, 2013 at 10:09:52AM +0200, Christian Borntraeger wrote: The SIE instruction is interruptible, so instead of having a guest exit on a host interrupt we basically return to guest mode. We have some logic in the interrupt handler to check for need_resched, machine checks or

Re: BUG: virtio_mmio multi-queue competely broken -- virtio *registers* considered harmful

2013-05-02 Thread Tom Lyon
On 05/01/2013 10:25 PM, Michael S. Tsirkin wrote: On Wed, May 01, 2013 at 08:40:54PM -0700, Tom Lyon wrote: Virtiio_mmio attempts to mimic the layout of some control registers from virtio_pci. These registers, in particular VIRTIO_MMIO_QUEUE_SEL and VIRTIO_PCI_QUEUE_SEL, are active in nature,

Re: [PATCH v2 1/5] ARM: KVM: be more thorough when invalidating TLBs

2013-05-02 Thread Catalin Marinas
On Thu, May 02, 2013 at 03:38:58PM +0100, Marc Zyngier wrote: diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index f7793df..9e2d906c 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S ... -static void clear_pte_entry(pte_t *pte) +static void

Re: [PATCH v2 3/5] ARM: KVM: relax cache maintainance when building page tables

2013-05-02 Thread Christoffer Dall
On Thu, May 2, 2013 at 8:03 AM, Will Deacon will.dea...@arm.com wrote: On Thu, May 02, 2013 at 03:39:00PM +0100, Marc Zyngier wrote: Patch 5a677ce044f1 (ARM: KVM: switch to a dual-step HYP init code) introduced code that flushes page tables to the point of coherency. This is overkill (point of

Re: [PATCH v2 3/5] ARM: KVM: relax cache maintainance when building page tables

2013-05-02 Thread Will Deacon
On Thu, May 02, 2013 at 04:15:05PM +0100, Christoffer Dall wrote: On Thu, May 2, 2013 at 8:03 AM, Will Deacon will.dea...@arm.com wrote: On Thu, May 02, 2013 at 03:39:00PM +0100, Marc Zyngier wrote: Patch 5a677ce044f1 (ARM: KVM: switch to a dual-step HYP init code) introduced code that

Re: BUG: virtio_mmio multi-queue competely broken -- virtio *registers* considered harmful

2013-05-02 Thread Tom Lyon
On 05/02/2013 04:37 AM, Pawel Moll wrote: Hi Tom, On Thu, 2013-05-02 at 04:40 +0100, Tom Lyon wrote: Virtiio_mmio attempts to mimic the layout of some control registers from virtio_pci. These registers, in particular VIRTIO_MMIO_QUEUE_SEL and VIRTIO_PCI_QUEUE_SEL, are active in nature, and

Re: [PATCH v3 20/32] arm64: KVM: Plug the arch timer

2013-05-02 Thread Catalin Marinas
On Wed, Apr 24, 2013 at 12:43:51PM +0100, Marc Zyngier wrote: On 24/04/13 00:00, Christoffer Dall wrote: On Mon, Apr 08, 2013 at 05:17:22PM +0100, Marc Zyngier wrote: Add support for the in-kernel timer emulation. The include file is a complete duplicate of the 32bit one - something to fix

Re: [PATCH] [RFC] s390/kvm: note a quiescing state if we interupt guest mode

2013-05-02 Thread Christian Borntraeger
On 02/05/13 17:09, Paul E. McKenney wrote: On Thu, May 02, 2013 at 10:09:52AM +0200, Christian Borntraeger wrote: The SIE instruction is interruptible, so instead of having a guest exit on a host interrupt we basically return to guest mode. We have some logic in the interrupt handler to check

[GIT PULL] VFIO for v3.10

2013-05-02 Thread Alex Williamson
Hi Linus, Please pull the following tag for v3.10. This should auto merge cleanly to your current tree. Thanks, Alex The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9: Linux 3.9-rc2 (2013-03-10 16:54:19 -0700) are available in the git repository at:

Re: [PATCH v3 24/32] arm64: KVM: 32bit GP register access

2013-05-02 Thread Catalin Marinas
On Mon, Apr 08, 2013 at 05:17:26PM +0100, Marc Zyngier wrote: static inline bool kvm_vcpu_reg_is_pc(const struct kvm_vcpu *vcpu, int reg) { - return false; + return (vcpu_mode_is_32bit(vcpu)) reg == 15; } On AArch64, would ESR_EL2 have SRT == 15 when the source/destination

Re: [PATCH 1/3] kvm/ppc/booke: Hold srcu lock when calling gfn functions

2013-05-02 Thread Scott Wood
On 05/02/2013 09:37:53 AM, Marcelo Tosatti wrote: On Wed, May 01, 2013 at 07:27:23PM -0500, Scott Wood wrote: On 05/01/2013 07:15:53 PM, Marcelo Tosatti wrote: On Fri, Apr 26, 2013 at 07:53:38PM -0500, Scott Wood wrote: diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index

Re: [PATCH] ARM: KVM: Don't handle PSCI calls via SMC

2013-05-02 Thread Dave Martin
On Wed, May 01, 2013 at 10:59:13AM -0700, Christoffer Dall wrote: On Wed, May 1, 2013 at 9:49 AM, Dave P Martin dave.mar...@arm.com wrote: Currently, kvmtool unconditionally declares that HVC should be used to call PSCI, so the function numbers in the DT tell the guest nothing about the

Q: What is the struct kvm srcu protecting?

2013-05-02 Thread David Daney
Hi, I am working on the MIPS KVM port, and am trying to figure out under which circumstances do I need to srcu_read_lock()/srcu_read_unlock() the kvm-srcu. I am looking at implementing something similar to arch/x86/kvm/x86.c at __msr_io(), where we see: . . . idx =

Re: [PULL] vhost: cleanups and fixes

2013-05-02 Thread Nicholas A. Bellinger
On Thu, 2013-05-02 at 13:53 +0300, Michael S. Tsirkin wrote: The following changes since commit c39904a0ac22cf05f5f44226457f6da0fe65457e: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next (2013-04-26 23:33:41 -0400) are available in the git

Re: [PULL] vhost: cleanups and fixes

2013-05-02 Thread Michael S. Tsirkin
On Thu, May 02, 2013 at 11:55:29AM -0700, Nicholas A. Bellinger wrote: On Thu, 2013-05-02 at 13:53 +0300, Michael S. Tsirkin wrote: The following changes since commit c39904a0ac22cf05f5f44226457f6da0fe65457e: Merge branch 'master' of

Re: [PULL] vhost: cleanups and fixes

2013-05-02 Thread Linus Torvalds
On Thu, May 2, 2013 at 12:33 PM, Michael S. Tsirkin m...@redhat.com wrote: I prefer not rebasing, Good. will play with git to see why does request-pull get me a wrong diffstat and how to trick it into doing the right thing. Maybe merging my branch into master will do

[PULLv2] vhost: cleanups and fixes

2013-05-02 Thread Michael S. Tsirkin
Hi Linus, This is exactly same code as my previous pull sent earlier, the diffstat was wrong however, I did a merge with master which fixed that. And I forgot to copy you so you likely did not see it at all :( Here comes. The following changes since commit

Re: [PULLv2] vhost: cleanups and fixes

2013-05-02 Thread Linus Torvalds
On Thu, May 2, 2013 at 1:11 PM, Michael S. Tsirkin m...@redhat.com wrote: Hi Linus, This is exactly same code as my previous pull sent earlier, the diffstat was wrong however, I did a merge with master which fixed that. See my other email. THIS IS NOT A VALID REASON TO DO A BACK-MERGE!

Re: [PULLv2] vhost: cleanups and fixes

2013-05-02 Thread Linus Torvalds
I pulled the previous tag, which didn't have the merge. And what the heck is up with virtualizat...@lists.osdl.org? That thing doesn't work. osdl.org? Did we suddenly take a delorean back a decade? Nonworking list cc removed. Linus -- To unsubscribe from this list: send the line

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

2013-05-02 Thread Alexander Graf
On 02.04.2013, at 13:56, Gleb Natapov wrote: On Mon, Mar 25, 2013 at 02:14:20PM -0700, Kevin Hilman wrote: Gleb Natapov g...@redhat.com writes: On Sun, Mar 24, 2013 at 02:44:26PM +0100, Frederic Weisbecker wrote: 2013/3/21 Gleb Natapov g...@redhat.com: Isn't is simpler for

Re: [PATCH 02/11] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-02 Thread Marcelo Tosatti
On Thu, Apr 25, 2013 at 11:43:22PM -0700, Jun Nakajima wrote: This is the first patch in a series which adds nested EPT support to KVM's nested VMX. Nested EPT means emulating EPT for an L1 guest so that L1 can use EPT when running a nested guest L2. When L1 uses EPT, it allows the L2 guest to

Re: [PULL 0/6] ppc patch queue 2013-05-02 for 3.10

2013-05-02 Thread Marcelo Tosatti
On Thu, May 02, 2013 at 03:32:45PM +0200, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull and apply to next, so it makes its way into 3.10. Sorry for the late request. There is still one RCU patch outstanding that needs a respin, so expect

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-02 Thread Marcelo Tosatti
On Sat, Apr 27, 2013 at 11:13:20AM +0800, Xiao Guangrong wrote: The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to walk and zap all shadow pages one by one, also it need to zap all guest page's rmap and all shadow page's parent spte list. Particularly, things become worse

Re: [PATCH v2] KVM: x86: Remove support for reporting coalesced APIC IRQs

2013-05-02 Thread Marcelo Tosatti
On Sun, Apr 28, 2013 at 02:00:41PM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com Since the arrival of posted interrupt support we can no longer guarantee that coalesced IRQs are always reported to the IRQ source. Moreover, accumulated APIC timer events could cause a busy

Re: [PATCH] KVM: x86: Rework request for immediate exit

2013-05-02 Thread Marcelo Tosatti
On Sun, Apr 28, 2013 at 10:50:52AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com The VMX implementation of enable_irq_window raised KVM_REQ_IMMEDIATE_EXIT after we checked it in vcpu_enter_guest. This caused infinite loops on vmentry. Fix it by letting enable_irq_window

Re: [PATCH v2] KVM: x86: Account for failing enable_irq_window for NMI window request

2013-05-02 Thread Marcelo Tosatti
On Mon, Apr 29, 2013 at 05:38:27PM +0200, Paolo Bonzini wrote: Il 29/04/2013 16:46, Jan Kiszka ha scritto: With VMX, enable_irq_window can now return -EBUSY, in which case an immediate exit shall be requested before entering the guest. Account for this also in enable_nmi_window which uses

Re: Q: What is the struct kvm srcu protecting?

2013-05-02 Thread Marcelo Tosatti
On Thu, May 02, 2013 at 11:22:52AM -0700, David Daney wrote: Hi, I am working on the MIPS KVM port, and am trying to figure out under which circumstances do I need to srcu_read_lock()/srcu_read_unlock() the kvm-srcu. For x86: kvm-srcu protects memory slot information (kvm-memslots) and

Re: any reason kvm_main.c doesn't use debugfs_remove_recursive?

2013-05-02 Thread Marcelo Tosatti
On Tue, Apr 30, 2013 at 12:06:27PM -0400, Robert P. J. Day wrote: poking around in the KVM code and ran across this in kvm_main.c: ... snip ... out_dir: debugfs_remove_recursive(kvm_debugfs_dir); out: return r; } static void kvm_exit_debug(void) { struct

Re: [PATCH v4 2/6] KVM: x86: introduce memslot_set_lpage_disallowed

2013-05-02 Thread Takuya Yoshikawa
On Sat, 27 Apr 2013 11:13:18 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: It is used to set disallowed large page on the specified level, can be used in later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 53

Re: [PATCH v4 3/6] KVM: MMU: introduce kvm_clear_all_lpage_info

2013-05-02 Thread Takuya Yoshikawa
On Sat, 27 Apr 2013 11:13:19 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: This function is used to reset the large page info of all guest pages which will be used in later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 25

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-02 Thread Takuya Yoshikawa
On Sat, 27 Apr 2013 11:13:20 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: +/* + * Fast invalid all shadow pages belong to @slot. + * + * @slot != NULL means the invalidation is caused the memslot specified + * by @slot is being deleted, in this case, we should ensure that

RE: [PATCH v10 7/7] KVM: VMX: Use posted interrupt to deliver virtual interrupt

2013-05-02 Thread Yangminqiang
-Original Message- From: Nakajima, Jun [mailto:jun.nakaj...@intel.com] Sent: Friday, April 26, 2013 9:46 PM To: Yangminqiang Cc: Zhang, Yang Z; kvm@vger.kernel.org; g...@redhat.com; mtosa...@redhat.com; Zhang, Xiantao; Luohao (brian); Haofeng Subject: Re: [PATCH v10 7/7] KVM: VMX:

[PATCH v17 RESEND] pvpanic: pvpanic device driver

2013-05-02 Thread Hu Tao
pvpanic device is a qemu simulated device through which guest panic event is sent to host. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- drivers/platform/x86/Kconfig | 7 +++ drivers/platform/x86/Makefile | 2 + drivers/platform/x86/pvpanic.c | 115

KVM VM(rhel-5.5) %si is too high when TX/RX packets

2013-05-02 Thread Zhanghaoyu (A)
I running a VM(RHEL-5.5) on KVM hypervisor(linux-3.8 + QEMU-1.4.1), and direct-assign intel 82576 VF to the VM. When TX/RX packets on VM to the other host via iperf tool, top tool result on VM shown that the %si is too high, approximately 95% ~ 100%, but from the view of host, the VM's total

Re: [PATCH] KVM: x86: Rework request for immediate exit

2013-05-02 Thread Gleb Natapov
On Thu, May 02, 2013 at 10:20:39PM -0300, Marcelo Tosatti wrote: On Sun, Apr 28, 2013 at 10:50:52AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com The VMX implementation of enable_irq_window raised KVM_REQ_IMMEDIATE_EXIT after we checked it in vcpu_enter_guest. This

[PATCH 1/3] vhost: Remove vhost_enable_zcopy in vhost.h

2013-05-02 Thread Asias He
It is net.c specific. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/vhost.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index b58f4ae..4330209 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -191,7 +191,4 @@

[PATCH 0/3] vhost cleanups and separate module

2013-05-02 Thread Asias He
Asias He (3): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module drivers/vhost/Kconfig | 8 drivers/vhost/Makefile | 3 ++- drivers/vhost/net.c| 6 ++ drivers/vhost/scsi.c | 1 -

[PATCH 2/3] vhost: Move VHOST_NET_FEATURES to net.c

2013-05-02 Thread Asias He
vhost.h should not depend on device specific marcos like VHOST_NET_F_VIRTIO_NET_HDR and VIRTIO_NET_F_MRG_RXBUF. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/net.c | 6 ++ drivers/vhost/vhost.h | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH 3/3] vhost: Make vhost a separate module

2013-05-02 Thread Asias He
Currently, vhost-net and vhost-scsi are sharing the vhost core code. However, vhost-scsi shares the code by including the vhost.c file directly. Making vhost a separate module makes it is easier to share code with other vhost devices. Signed-off-by: Asias He as...@redhat.com ---

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-02 Thread Xiao Guangrong
On 05/03/2013 09:05 AM, Marcelo Tosatti wrote: + +/* + * Fast invalid all shadow pages belong to @slot. + * + * @slot != NULL means the invalidation is caused the memslot specified + * by @slot is being deleted, in this case, we should ensure that rmap + * and lpage-info of the @slot can

Re: [PATCH v4 2/6] KVM: x86: introduce memslot_set_lpage_disallowed

2013-05-02 Thread Xiao Guangrong
On 05/03/2013 10:10 AM, Takuya Yoshikawa wrote: On Sat, 27 Apr 2013 11:13:18 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: It is used to set disallowed large page on the specified level, can be used in later patch Signed-off-by: Xiao Guangrong

Re: [PATCH v4 3/6] KVM: MMU: introduce kvm_clear_all_lpage_info

2013-05-02 Thread Xiao Guangrong
On 05/03/2013 10:15 AM, Takuya Yoshikawa wrote: On Sat, 27 Apr 2013 11:13:19 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: This function is used to reset the large page info of all guest pages which will be used in later patch Signed-off-by: Xiao Guangrong

Re: KVM: PPC: Book3S: Add API for in-kernel XICS emulation

2013-05-02 Thread David Gibson
On Sat, Apr 27, 2013 at 10:28:37AM -, Paul Mackerras wrote: This adds the API for userspace to instantiate an XICS device in a VM and connect VCPUs to it. The API consists of a new device type for the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which functions similarly to

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Gleb Natapov
On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually calling these functions with slots_lock held. The srcu read lock, OTOH, is required. Signed-off-by: Scott Wood scottw...@freescale.com Marcelo, could you

RE: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-05-02 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Friday, April 26, 2013 4:46 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Wood Scott-B07421; Bhushan Bharat-R65777 Subject: Re: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub

Re: [PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 11:46, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Friday, April 26, 2013 4:46 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Wood Scott-B07421; Bhushan Bharat-R65777

Re: [PATCH] KVM: PPC: Book3S: Add API for in-kernel XICS emulation

2013-05-02 Thread Alexander Graf
On 27.04.2013, at 12:28, Paul Mackerras wrote: This adds the API for userspace to instantiate an XICS device in a VM and connect VCPUs to it. The API consists of a new device type for the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which functions similarly to

Re: [PATCH -next] kvm/ppc/mpic: fix missing unlock in set_base_addr()

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 07:17, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function set_base_addr() when disables the mapping. Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21 (kvm/ppc/mpic: in-kernel MPIC

Re: [PATCH 1/3] kvm/ppc/booke: Hold srcu lock when calling gfn functions

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 02:27, Scott Wood wrote: On 05/01/2013 07:15:53 PM, Marcelo Tosatti wrote: On Fri, Apr 26, 2013 at 07:53:38PM -0500, Scott Wood wrote: diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119..506c87d 100644 --- a/arch/powerpc/kvm/booke.c +++

Re: [PATCH 2/3] kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write

2013-05-02 Thread Alexander Graf
On 27.04.2013, at 02:53, Scott Wood wrote: These functions do an srcu_dereference without acquiring the srcu lock themselves. Signed-off-by: Scott Wood scottw...@freescale.com Thanks, applied to kvm-ppc-queue. Alex -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Gleb Natapov
On Thu, May 02, 2013 at 12:53:44PM +0200, Alexander Graf wrote: On 02.05.2013, at 09:18, Gleb Natapov wrote: On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually calling these functions with slots_lock held.

Re: [PATCH 1/2] kvm/ppc/mpic: fix mmio region lists when multiple guests used

2013-05-02 Thread Alexander Graf
On 01.05.2013, at 02:57, Scott Wood wrote: Keeping a linked list of statically defined objects doesn't work very well when we have multiple guests. :-P Switch to an array of constant objects. This fixes a hang when multiple guests are used. Signed-off-by: Scott Wood

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Alexander Graf
On 02.05.2013, at 13:00, Gleb Natapov wrote: On Thu, May 02, 2013 at 12:53:44PM +0200, Alexander Graf wrote: On 02.05.2013, at 09:18, Gleb Natapov wrote: On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually

[PULL 0/6] ppc patch queue 2013-05-02 for 3.10

2013-05-02 Thread Alexander Graf
Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull and apply to next, so it makes its way into 3.10. Sorry for the late request. There is still one RCU patch outstanding that needs a respin, so expect another request to come in later in the 3.10 cycle. Changes include: -

[PATCH 1/6] kvm/ppc/mpic: remove default routes from documentation

2013-05-02 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The default routes were removed from the code during patchset respinning, but were not removed from the documentation. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 3/6] kvm/ppc/mpic: remove users

2013-05-02 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is an unused (no pun intended) leftover from when this code did reference counting. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/mpic.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 5/6] kvm/ppc/mpic: fix missing unlock in set_base_addr()

2013-05-02 Thread Alexander Graf
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function set_base_addr() when disables the mapping. Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21 (kvm/ppc/mpic: in-kernel MPIC emulation) Signed-off-by: Wei Yongjun

  1   2   >