[PATCH 3/4] vhost-scsi: Always access vq->private_data under vq mutex

2013-05-06 Thread Asias He
Signed-off-by: Asias He --- drivers/vhost/scsi.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 5531ebc..d78768b 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -896,19 +896,15 @@ vhost_scsi_handle_

[PATCH 4/4] vhost: Remove custom vhost rcu usage

2013-05-06 Thread Asias He
Now, vq->private_data is always accessed under vq mutex. No need to play the vhost rcu trick. Signed-off-by: Asias He --- drivers/vhost/net.c | 16 ++-- drivers/vhost/scsi.c | 6 ++ drivers/vhost/test.c | 11 --- drivers/vhost/vhost.h | 10 ++ 4 files changed

[PATCH 2/4] vhost-test: Always access vq->private_data under vq mutex

2013-05-06 Thread Asias He
Signed-off-by: Asias He --- drivers/vhost/test.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index dc526eb..435b911 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -48,11 +48,12 @@ static void handle_vq(s

[PATCH 1/4] vhost-net: Always access vq->private_data under vq mutex

2013-05-06 Thread Asias He
Signed-off-by: Asias He --- drivers/vhost/net.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 2b51e23..b616d9a 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -349,12 +349,11 @@ static void

[PATCH 0/4] vhost private_data rcu removal

2013-05-06 Thread Asias He
Asias He (4): vhost-net: Always access vq->private_data under vq mutex vhost-test: Always access vq->private_data under vq mutex vhost-scsi: Always access vq->private_data under vq mutex vhost: Remove custom vhost rcu usage drivers/vhost/net.c | 37 -

Re: [PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread David Gibson
On Tue, May 07, 2013 at 04:27:49PM +1000, Alexey Kardashevskiy wrote: > On 05/07/2013 04:02 PM, David Gibson wrote: > > On Tue, May 07, 2013 at 03:51:31PM +1000, Alexey Kardashevskiy wrote: > >> On 05/07/2013 03:29 PM, David Gibson wrote: > >>> On Mon, May 06, 2013 at 05:25:56PM +1000, Alexey Karda

[PATCH] vhost-test: Make vhost/test.c work

2013-05-06 Thread Asias He
Fix it by: 1) switching to use the new device specific fields per vq 2) not including vhost.c, instead make vhost-test.ko depend on vhost.ko. --- drivers/vhost/test.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/drivers/vhost/test.c b/

[PATCH] vhost-scsi: Enable VIRTIO_RING_F_EVENT_IDX

2013-05-06 Thread Asias He
It is disabled as a workaround. Now userspace bits works fine with it. So, let's enable it. Signed-off-by: Asias He --- drivers/vhost/scsi.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index d860b58..5531ebc 100644 --- a/

Re: [PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
On 05/07/2013 04:02 PM, David Gibson wrote: > On Tue, May 07, 2013 at 03:51:31PM +1000, Alexey Kardashevskiy wrote: >> On 05/07/2013 03:29 PM, David Gibson wrote: >>> On Mon, May 06, 2013 at 05:25:56PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE, H_PUT_TC

Re: [PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread David Gibson
On Tue, May 07, 2013 at 03:51:31PM +1000, Alexey Kardashevskiy wrote: > On 05/07/2013 03:29 PM, David Gibson wrote: > > On Mon, May 06, 2013 at 05:25:56PM +1000, Alexey Kardashevskiy wrote: > >> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > >> and H_STUFF_TCE requests withou

Re: [PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
On 05/07/2013 03:29 PM, David Gibson wrote: > On Mon, May 06, 2013 at 05:25:56PM +1000, Alexey Kardashevskiy wrote: >> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT >> and H_STUFF_TCE requests without passing them to QEMU, which should >> save time on switching to QEMU and bac

Re: [PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread David Gibson
On Mon, May 06, 2013 at 05:25:56PM +1000, Alexey Kardashevskiy wrote: > This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > and H_STUFF_TCE requests without passing them to QEMU, which should > save time on switching to QEMU and back. > > Both real and virtual modes are supported

Re: [PATCH 2/6] KVM: PPC: Add support for multiple-TCE hcalls

2013-05-06 Thread David Gibson
On Mon, May 06, 2013 at 05:25:53PM +1000, Alexey Kardashevskiy wrote: > This adds real mode handlers for the H_PUT_TCE_INDIRECT and > H_STUFF_TCE hypercalls for QEMU emulated devices such as virtio > devices or emulated PCI. These calls allow adding multiple entries > (up to 512) into the TCE tabl

Re: Fwd: Booting physically installed Windows while in Arch (AHCI support in OVMF?)

2013-05-06 Thread Michael Tokarev
06.05.2013 00:42, Evert Heylen wrote: > Please, any help? I think the easiest way is to convert your existing system from UEFI back to regular bios + MBR. For that, you need to disable UEFI boot in bios and convert GPT to MBR on the HDD. This is because, as you figured, ahci support in OVMF isn'

Re: [PATCH] kvm/ppc: interrupt disabling fixes

2013-05-06 Thread Benjamin Herrenschmidt
On Mon, 2013-05-06 at 22:32 -0500, Scott Wood wrote: > + hard_irq_disable(); > + trace_hardirqs_off(); I still think hard_irq_disable() should be fixed to "do the right thing" here :-) I'll do that standalone patch here and give it a spin. Cheers, Ben. -- To unsubscribe from this l

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Benjamin Herrenschmidt
On Mon, 2013-05-06 at 22:05 -0500, Scott Wood wrote: > On 05/06/2013 07:03:14 PM, Benjamin Herrenschmidt wrote: > > On Mon, 2013-05-06 at 18:53 -0500, Scott Wood wrote: > > > > > > > Ie. The last stage of entry will hard enable, so they should be > > > > soft-enabled too... if not, latency trackers

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

2013-05-06 Thread Xiao Guangrong
On 05/07/2013 03:50 AM, Marcelo Tosatti wrote: > On Mon, May 06, 2013 at 11:39:11AM +0800, Xiao Guangrong wrote: >> On 05/04/2013 08:52 AM, Marcelo Tosatti wrote: >>> On Sat, May 04, 2013 at 12:51:06AM +0800, Xiao Guangrong wrote: On 05/03/2013 11:53 PM, Marcelo Tosatti wrote: > On Fri, Ma

[PATCH v18] pvpanic: pvpanic device driver

2013-05-06 Thread Hu Tao
pvpanic device is a qemu simulated device through which guest panic event is sent to host. Signed-off-by: Hu Tao --- v17 -> v18: 1. call acpi_walk_resources to get the port, and usb outb instead of acpi_evaluate_oject in panic notifier callback 2. reword help messag

[PATCH] kvm/ppc: interrupt disabling fixes

2013-05-06 Thread Scott Wood
booke64 was not maintaing consistent lazy ee state when exiting the guest, leading to warnings and worse. booke32 was less affected due to the absence of lazy ee, but it was still feeding bad information into trace_hardirqs_off/on -- we don't want guest execution to be seen as an "IRQs off" interv

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alexey Kardashevskiy
On 05/07/2013 11:42 AM, Alex Williamson wrote: > On Tue, 2013-05-07 at 10:49 +1000, Alexey Kardashevskiy wrote: >> On 05/07/2013 07:07 AM, Alex Williamson wrote: >>> On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: From: Alexey Kardashevskiy The IOMMU API implements groups c

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Scott Wood
On 05/06/2013 07:03:14 PM, Benjamin Herrenschmidt wrote: On Mon, 2013-05-06 at 18:53 -0500, Scott Wood wrote: > > > Ie. The last stage of entry will hard enable, so they should be > > soft-enabled too... if not, latency trackers will consider the whole > > guest periods as "interrupt disabled"

KVM: x86: perform kvmclock updates in lockstep

2013-05-06 Thread Marcelo Tosatti
It is necessary for each vcpus system_timestamp memory copy to be updated from one sample of the nanosecond kernel clock. If this is not the case, and NTP changes frequency adjustment, different vcpus will make use of different time bases. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/

Re: [RFC PATCH 04/11] kvm tools: console: unconditionally output to any console

2013-05-06 Thread Anup Patel
On Tue, May 7, 2013 at 2:34 AM, Sasha Levin wrote: > On 05/03/2013 12:09 PM, Will Deacon wrote: >> On Fri, May 03, 2013 at 05:02:14PM +0100, Sasha Levin wrote: >>> On 05/03/2013 05:19 AM, Pekka Enberg wrote: On Wed, May 1, 2013 at 6:50 PM, Will Deacon wrote: > From: Marc Zyngier > >

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-06 Thread tiejun.chen
On 05/07/2013 10:06 AM, Scott Wood wrote: On 05/06/2013 08:56:25 PM, tiejun.chen wrote: On 05/07/2013 07:50 AM, Scott Wood wrote: On 05/05/2013 10:13:17 PM, tiejun.chen wrote: On 05/06/2013 11:10 AM, Tiejun Chen wrote: For the external interrupt, the decrementer exception and the doorbell exc

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-06 Thread tiejun.chen
On 05/07/2013 07:50 AM, Scott Wood wrote: On 05/05/2013 10:13:17 PM, tiejun.chen wrote: On 05/06/2013 11:10 AM, Tiejun Chen wrote: For the external interrupt, the decrementer exception and the doorbell excpetion, we also need to soft-disable interrupts while doing as host interrupt handlers sin

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

2013-05-06 Thread Zhang, Yang Z
Yangminqiang wrote on 2013-05-03: > Nakajima, Jun wrote on 2013-04-26: >> Subject: Re: [PATCH v10 7/7] KVM: VMX: Use posted interrupt to deliver >> virtual >> interrupt >> >> On Fri, Apr 26, 2013 at 2:29 AM, Yangminqiang >> wrote: >> Ivytown or newer platform supported it. >>> >>> Ivytown

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Tue, 2013-05-07 at 10:49 +1000, Alexey Kardashevskiy wrote: > On 05/07/2013 07:07 AM, Alex Williamson wrote: > > On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: > >> From: Alexey Kardashevskiy > >> > >> The IOMMU API implements groups creating/deletion, device binding > >> and IOMMU ma

irqfd issue

2013-05-06 Thread Asias He
Hi, I am seeing this with linus/master. Any ideas? [ 34.168356] IPv6: ADDRCONF(NETDEV_UP): virbr0: link is not ready [ 36.743758] BUG: unable to handle kernel paging request at 00030029 [ 36.745177] IP: [] __mutex_lock_slowpath+0x34/0x240 [ 36.746576] PGD 0 [ 36.747962] Oops: 0

Re: [v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-06 Thread tiejun.chen
On 05/06/2013 10:58 PM, Alexander Graf wrote: On 05/06/2013 04:53 AM, Tiejun Chen wrote: Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alexey Kardashevskiy
On 05/07/2013 07:07 AM, Alex Williamson wrote: > On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: >> From: Alexey Kardashevskiy >> >> The IOMMU API implements groups creating/deletion, device binding >> and IOMMU map/unmap operations. >> >> The PowerPC implementation uses most of the API e

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Benjamin Herrenschmidt
On Mon, 2013-05-06 at 18:53 -0500, Scott Wood wrote: > > > Ie. The last stage of entry will hard enable, so they should be > > soft-enabled too... if not, latency trackers will consider the whole > > guest periods as "interrupt disabled"... > > OK... I guess we already have that problem on 32-bit

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Scott Wood
On 05/05/2013 04:03:08 PM, Benjamin Herrenschmidt wrote: On Fri, 2013-05-03 at 18:45 -0500, Scott Wood wrote: > kvmppc_lazy_ee_enable() was causing interrupts to be soft-enabled > (albeit hard-disabled) in kvmppc_restart_interrupt(). This led to > warnings, and possibly breakage if the interrupt

Re: [PATCH] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-06 Thread David Daney
On 05/06/2013 04:11 PM, Sanjay Lal wrote: On May 6, 2013, at 3:39 PM, David Daney wrote: /* for KVM_GET_REGS and KVM_SET_REGS */ +/* + * If Config[AT] is zero (32-bit CPU), the register contents are + * stored in the lower 32-bits of the struct kvm_regs fields and sign + * extended to 64-bits

Re: [PATCH] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-06 Thread Sanjay Lal
On May 6, 2013, at 3:39 PM, David Daney wrote: > > /* for KVM_GET_REGS and KVM_SET_REGS */ > +/* > + * If Config[AT] is zero (32-bit CPU), the register contents are > + * stored in the lower 32-bits of the struct kvm_regs fields and sign > + * extended to 64-bits. > + */ > struct kvm_regs { > -

[PATCH] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-06 Thread David Daney
From: David Daney There are several parts to this: o All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. o FPU register formats are defined. o CP0 Registers are manipulated via the KVM_GET_MSRS/KVM_SET_MSRS mechanism. The vcpu_io

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: > From: Alexey Kardashevskiy > > The IOMMU API implements groups creating/deletion, device binding > and IOMMU map/unmap operations. > > The PowerPC implementation uses most of the API except map/unmap > operations, which are implemented o

Re: [RFC PATCH 04/11] kvm tools: console: unconditionally output to any console

2013-05-06 Thread Sasha Levin
On 05/03/2013 12:09 PM, Will Deacon wrote: > On Fri, May 03, 2013 at 05:02:14PM +0100, Sasha Levin wrote: >> On 05/03/2013 05:19 AM, Pekka Enberg wrote: >>> On Wed, May 1, 2013 at 6:50 PM, Will Deacon wrote: From: Marc Zyngier Kvmtool suppresses any output to a console that has not

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

2013-05-06 Thread Marcelo Tosatti
On Mon, May 06, 2013 at 11:39:11AM +0800, Xiao Guangrong wrote: > On 05/04/2013 08:52 AM, Marcelo Tosatti wrote: > > On Sat, May 04, 2013 at 12:51:06AM +0800, Xiao Guangrong wrote: > >> On 05/03/2013 11:53 PM, Marcelo Tosatti wrote: > >>> On Fri, May 03, 2013 at 01:52:07PM +0800, Xiao Guangrong wro

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

2013-05-06 Thread Xiao Guangrong
On 05/07/2013 01:24 AM, Gleb Natapov wrote: > On Mon, May 06, 2013 at 09:10:11PM +0800, Xiao Guangrong wrote: >> On 05/06/2013 08:36 PM, Gleb Natapov wrote: >> > Step 1) Fix kvm_mmu_zap_all's behaviour: introduce lockbreak via > spin_needbreak. Use generation numbers so that in case kvm_mmu

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

2013-05-06 Thread Gleb Natapov
On Mon, May 06, 2013 at 09:10:11PM +0800, Xiao Guangrong wrote: > On 05/06/2013 08:36 PM, Gleb Natapov wrote: > > >>> Step 1) Fix kvm_mmu_zap_all's behaviour: introduce lockbreak via > >>> spin_needbreak. Use generation numbers so that in case kvm_mmu_zap_all > >>> releases mmu_lock and reacquire

KVM call agenda for 2013-05-07

2013-05-06 Thread Juan Quintela
Hi Please send in any agenda topics you are interested in. Later, Juan. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-06 Thread Alexander Graf
On 05/06/2013 04:53 AM, Tiejun Chen wrote: Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm

Re: [PATCH] vhost: drop virtio_net.h dependency

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:37:34PM +0300, Michael S. Tsirkin wrote: > There's no net specific code in vhost.c anymore, > don't include the virtio_net.h header. Did you push the it to your tree. I am not seeing it. > Signed-off-by: Michael S. Tsirkin > --- > > This is on top of Asias' patches, a

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 04:15:35PM +0300, Michael S. Tsirkin wrote: > On Mon, May 06, 2013 at 08:05:26PM +0800, Asias He wrote: > > On Mon, May 06, 2013 at 01:07:46PM +0300, Michael S. Tsirkin wrote: > > > On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: > > > > MST, This is on top of [PAT

Re: [PATCH v17 RESEND] pvpanic: pvpanic device driver

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 13:38, Marcelo Tosatti ha scritto: > On Mon, May 06, 2013 at 11:39:35AM +0800, Hu Tao wrote: >> On Fri, May 03, 2013 at 06:59:18PM -0300, Marcelo Tosatti wrote: >>> On Fri, May 03, 2013 at 10:47:10AM +0800, Hu Tao wrote: pvpanic device is a qemu simulated device through which gue

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 08:05:26PM +0800, Asias He wrote: > On Mon, May 06, 2013 at 01:07:46PM +0300, Michael S. Tsirkin wrote: > > On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: > > > MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. > > > > Okay, how about making EVENT_IDX work f

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

2013-05-06 Thread Xiao Guangrong
On 05/06/2013 08:36 PM, Gleb Natapov wrote: >>> Step 1) Fix kvm_mmu_zap_all's behaviour: introduce lockbreak via >>> spin_needbreak. Use generation numbers so that in case kvm_mmu_zap_all >>> releases mmu_lock and reacquires it again, only shadow pages >>> from the generation with which kvm_mmu_

[PATCH 0/1] [PULL] qemu-kvm.git uq/master queue

2013-05-06 Thread Gleb Natapov
Anthony please pull if it is not too later for 1.5. The following changes since commit 467b34689d277fa56c09ad07ca0f08d7d7539f6d: Update OpenBIOS images (2013-05-05 09:53:22 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for you t

[PATCH 1/1] kvmvapic: add ioport read accessor

2013-05-06 Thread Gleb Natapov
From: Marcelo Tosatti Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti Reviewed-by: Jan Kiszka Signed-off-by: Gleb Natapov --- hw

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

2013-05-06 Thread Gleb Natapov
On Mon, May 06, 2013 at 11:39:11AM +0800, Xiao Guangrong wrote: > On 05/04/2013 08:52 AM, Marcelo Tosatti wrote: > > On Sat, May 04, 2013 at 12:51:06AM +0800, Xiao Guangrong wrote: > >> On 05/03/2013 11:53 PM, Marcelo Tosatti wrote: > >>> On Fri, May 03, 2013 at 01:52:07PM +0800, Xiao Guangrong wro

Re: [PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:03:42PM +0300, Michael S. Tsirkin wrote: > On Mon, May 06, 2013 at 04:38:21PM +0800, Asias He wrote: > > 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. > > > > Makin

Re: [PATCH] vhost: drop virtio_net.h dependency

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:37:34PM +0300, Michael S. Tsirkin wrote: > There's no net specific code in vhost.c anymore, > don't include the virtio_net.h header. > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Asias He > --- > > This is on top of Asias' patches, already queued so > just FYI.

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:07:46PM +0300, Michael S. Tsirkin wrote: > On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: > > MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. > > Okay, how about making EVENT_IDX work for virtio-scsi? > I'm guessing it's some messup with feature negotia

Re: [uq/master PATCH] kvmvapic: add ioport read accessor

2013-05-06 Thread Gleb Natapov
On Sun, May 05, 2013 at 05:51:49PM -0300, Marcelo Tosatti wrote: > > Necessary since memory region accessor assumes read and write > methods are registered. Otherwise reading I/O port 0x7e segfaults. > > https://bugzilla.redhat.com/show_bug.cgi?id=954306 > > Signed-off-by: Marcelo Tosatti > Ap

Re: [PATCH v17 RESEND] pvpanic: pvpanic device driver

2013-05-06 Thread Marcelo Tosatti
On Mon, May 06, 2013 at 11:39:35AM +0800, Hu Tao wrote: > On Fri, May 03, 2013 at 06:59:18PM -0300, Marcelo Tosatti wrote: > > On Fri, May 03, 2013 at 10:47:10AM +0800, Hu Tao wrote: > > > pvpanic device is a qemu simulated device through which guest panic > > > event is sent to host. > > > > > >

[PATCH] vhost: drop virtio_net.h dependency

2013-05-06 Thread Michael S. Tsirkin
There's no net specific code in vhost.c anymore, don't include the virtio_net.h header. Signed-off-by: Michael S. Tsirkin --- This is on top of Asias' patches, already queued so just FYI. drivers/vhost/vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/v

Re: [PATCH v2 06/11] vhost-net: Cleanup vhost_ubuf and vhost_zcopy

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:24PM +0800, Asias He wrote: > - Rename vhost_ubuf to vhost_net_ubuf > - Rename vhost_zcopy_mask to vhost_net_zcopy_mask > - Make funcs static > > Signed-off-by: Asias He OK this actually fixes a warning introduced by patch 1, so I'll pull this in too (don't like bui

Re: virtio performance analysis

2013-05-06 Thread Michael S. Tsirkin
On Thu, May 02, 2013 at 09:13:29AM +0530, nitesh narayan lal wrote: > Hi, > I am currently working on the virtio performance analysis in PowerPC . That's nice. > 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

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: > MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Okay, how about making EVENT_IDX work for virtio-scsi? I'm guessing it's some messup with feature negotiation, that's what all event-idx bugs came down to so far. > Asias He (11): >

Re: [PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:21PM +0800, Asias He wrote: > 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 de

Re: [PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:21PM +0800, Asias He wrote: > 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 de

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 03:41:36PM +0930, Rusty Russell wrote: > Asias He writes: > > 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 > > I like these cleanups, MST pleasee apply. Absolutely.

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: > MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Acked-by: Michael S. Tsirkin Once -rc1 is out I'll fork -next and apply them. Thanks a lot! Nicholas, recently attempts to push patches through both net and target trees resulted i

[PATCH v2 11/11] vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd

2013-05-06 Thread Asias He
This way, we use cmd for struct tcm_vhost_cmd and evt for struct tcm_vhost_cmd. Signed-off-by: Asias He --- drivers/vhost/scsi.c | 142 +-- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c

[PATCH v2 09/11] vhost-scsi: Make func indention more consistent

2013-05-06 Thread Asias He
Signed-off-by: Asias He --- drivers/vhost/scsi.c | 154 +-- 1 file changed, 88 insertions(+), 66 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index d4798e1..d9781ed 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi

[PATCH v2 10/11] vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg

2013-05-06 Thread Asias He
Signed-off-by: Asias He --- drivers/vhost/scsi.c | 122 +-- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index d9781ed..353145f 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi

[PATCH v2 08/11] vhost-scsi: Rename struct vhost_scsi *s to *vs

2013-05-06 Thread Asias He
vs is used everywhere, make the naming more consistent. Signed-off-by: Asias He --- drivers/vhost/scsi.c | 56 ++-- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 02ddedd..d4798e1 1

[PATCH v2 06/11] vhost-net: Cleanup vhost_ubuf and vhost_zcopy

2013-05-06 Thread Asias He
- Rename vhost_ubuf to vhost_net_ubuf - Rename vhost_zcopy_mask to vhost_net_zcopy_mask - Make funcs static Signed-off-by: Asias He --- drivers/vhost/net.c | 58 +++-- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/drivers/vhost/ne

[PATCH v2 07/11] vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration

2013-05-06 Thread Asias He
It was needed when struct tcm_vhost_tpg is in tcm_vhost.h Signed-off-by: Asias He --- drivers/vhost/scsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 2dcb94a..02ddedd 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -115,7

[PATCH v2 05/11] vhost: Simplify dev->vqs[i] access

2013-05-06 Thread Asias He
Signed-off-by: Asias He --- drivers/vhost/vhost.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index e406d5f..74bc779 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -260,1

[PATCH v2 04/11] vhost: Remove comments for hdr in vhost.h

2013-05-06 Thread Asias He
It is supposed to be removed when hdr is moved into vhost_net_virtqueue. Signed-off-by: Asias He --- drivers/vhost/vhost.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 94a80eb..51aeb5f 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/v

[PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 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 --- drivers/vhost/Kconfig | 8

[PATCH v2 01/11] vhost: Remove vhost_enable_zcopy in vhost.h

2013-05-06 Thread Asias He
It is net.c specific. Signed-off-by: Asias He --- drivers/vhost/vhost.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index cc23bc4..076c9ac 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -192,7 +192,4 @@ static inline int

[PATCH v2 02/11] vhost: Move VHOST_NET_FEATURES to net.c

2013-05-06 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 --- drivers/vhost/net.c | 6 ++ drivers/vhost/vhost.h | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/driver

[PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Asias He
MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Asias He (11): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module vhost: Remove comments for hdr in vhost.h vhost: Simplify dev->vqs[i] access vhost-net: Cleanup

Re: [PATCH 4/4] vhost-net: Cleanup vhost_ubuf adn vhost_zcopy

2013-05-06 Thread Asias He
On Mon, May 6, 2013 at 4:17 PM, Michael S. Tsirkin wrote: > Typo a/adn/and/ Yes. Catched this up and and fixed already. > > On Fri, May 03, 2013 at 02:25:18PM +0800, Asias He wrote: >> - Rename vhost_ubuf to vhost_net_ubuf >> - Rename vhost_zcopy_mask to vhost_net_zcopy_mask >> - Make funcs st

Re: [PATCH 4/4] vhost-net: Cleanup vhost_ubuf adn vhost_zcopy

2013-05-06 Thread Michael S. Tsirkin
Typo a/adn/and/ On Fri, May 03, 2013 at 02:25:18PM +0800, Asias He wrote: > - Rename vhost_ubuf to vhost_net_ubuf > - Rename vhost_zcopy_mask to vhost_net_zcopy_mask > - Make funcs static > > Signed-off-by: Asias He > --- > drivers/vhost/net.c | 58 > +++

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-06 Thread Asias He
Hello Rusty, On Mon, May 06, 2013 at 03:41:36PM +0930, Rusty Russell wrote: > Asias He writes: > > 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 > > I like these cleanups, MST pleasee apply

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-06 Thread Rusty Russell
Asias He writes: > 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 I like these cleanups, MST pleasee apply. I have some other cleanups which are on hold for the moment pending MST's vhost_net simpl

[PATCH 6/6] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per a huge page. Real mode handlers check if the requested

[PATCH 2/6] KVM: PPC: Add support for multiple-TCE hcalls

2013-05-06 Thread Alexey Kardashevskiy
This adds real mode handlers for the H_PUT_TCE_INDIRECT and H_STUFF_TCE hypercalls for QEMU emulated devices such as virtio devices or emulated PCI. These calls allow adding multiple entries (up to 512) into the TCE table in one call which saves time on transition to/from real mode. This adds a g

[PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests without passing them to QEMU, which should save time on switching to QEMU and back. Both real and virtual modes are supported - whenever the kernel fails to handle TCE request, it passes it to the virtual

[PATCH 4/6] iommu: Add a function to find an iommu group by id

2013-05-06 Thread Alexey Kardashevskiy
As IOMMU groups are exposed to the user space by their numbers, the user space can use them in various kernel APIs so the kernel might need an API to find a group by its ID. As an example, QEMU VFIO on PPC64 platform needs it to associate a logical bus number (LIOBN) with a specific IOMMU group in

[PATCH 3/6] powerpc: Prepare to support kernel handling of IOMMU map/unmap

2013-05-06 Thread Alexey Kardashevskiy
The current VFIO-on-POWER implementation supports only user mode driven mapping, i.e. QEMU is sending requests to map/unmap pages. However this approach is really slow, so we want to move that to KVM. Since H_PUT_TCE can be extremely performance sensitive (especially with network adapters where eac

[PATCH 0/6] KVM: PPC: IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
This series is supposed to accelerate IOMMU operations in real and virtual mode in the host kernel for the KVM guest. The first user is VFIO however this series does not contain any VFIO related code as the connection between VFIO and the new handlers is to be made in QEMU via ioctl to the KVM fd.

[PATCH 1/6] KVM: PPC: Make lookup_linux_pte public

2013-05-06 Thread Alexey Kardashevskiy
The lookup_linux_pte() function returns a linux PTE which is needed in the process of converting KVM guest physical address into host real address in real mode. This conversion will be used by upcoming support of H_PUT_TCE_INDIRECT, as the TCE list address comes from the guest and is a guest physi

[PATCH 3/5] powerpc/vfio: Enable on POWERNV platform

2013-05-06 Thread aik
From: Alexey Kardashevskiy This initializes IOMMU groups based on the IOMMU configuration discovered during the PCI scan on POWERNV (POWER non virtualized) platform. The IOMMU groups are to be used later by the VFIO driver, which is used for PCI pass through. It also implements an API for mappi

[PATCH 1/5] iommu: Move initialization earlier

2013-05-06 Thread aik
From: Alexey Kardashevskiy The iommu_init() call initializes IOMMU internal structures and data required for the API to function such as iommu_group_alloc(). It is registered as a subsys_initcall. One of the IOMMU users is a PCI subsystem on POWER which discovers new IOMMU tables during the PCI

[PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread aik
From: Alexey Kardashevskiy The IOMMU API implements groups creating/deletion, device binding and IOMMU map/unmap operations. The PowerPC implementation uses most of the API except map/unmap operations, which are implemented on POWER using hypercalls. However, in order to link a kernel with the

[PATCH 0/5] VFIO PPC64: add VFIO support on POWERPC64

2013-05-06 Thread aik
From: Alexey Kardashevskiy The series adds support for VFIO on POWERPC in user space (such as QEMU). The in-kernel real mode IOMMU support is added by another series posted separately. As the first and main aim of this series is the POWERNV platform support, the "Enable on POWERNV platform" patc

[PATCH 5/5] powerpc/vfio: Enable on pSeries platform

2013-05-06 Thread aik
From: Alexey Kardashevskiy The enables VFIO on the pSeries platform, enabling user space programs to access PCI devices directly. Signed-off-by: Alexey Kardashevskiy Cc: David Gibson Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/pseries/iommu.c |4 drivers/iommu/Kconfig

[PATCH 4/5] powerpc/vfio: Implement IOMMU driver for VFIO

2013-05-06 Thread aik
From: Alexey Kardashevskiy VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and handling. This implements an IOMMU driver

Re: [PATCH v2 01/13] nEPT: Support LOAD_IA32_EFER entry/exit controls for L1

2013-05-06 Thread Jan Kiszka
On 2013-05-06 09:04, Jun Nakajima wrote: > Recent KVM, since http://kerneltrap.org/mailarchive/linux-kvm/2010/5/2/6261577 > switch the EFER MSR when EPT is used and the host and guest have different > NX bits. So if we add support for nested EPT (L1 guest using EPT to run L2) > and want to be able

[PATCH v2 13/13] nEPT: Inject EPT violation/misconfigration

2013-05-06 Thread Jun Nakajima
Add code to detect EPT misconfiguration and inject it to L1 VMM. Also, it injects more correct exit qualification upon EPT violation to L1 VMM. Now L1 can correctly go to ept_misconfig handler (instead of wrongly going to fast_page_fault), it will try to handle mmio page fault, if failed, it is a

[PATCH v2 12/13] nEPT: Move is_rsvd_bits_set() to paging_tmpl.h

2013-05-06 Thread Jun Nakajima
Move is_rsvd_bits_set() to paging_tmpl.h so that it can be used to check reserved bits in EPT page table entries as well. Signed-off-by: Jun Nakajima Signed-off-by: Xinhao Xu --- arch/x86/kvm/mmu.c | 8 arch/x86/kvm/paging_tmpl.h | 12 ++-- 2 files changed, 10 insertio

[PATCH v2 11/13] nEPT: Miscelleneous cleanups

2013-05-06 Thread Jun Nakajima
Some trivial code cleanups not really related to nested EPT. Signed-off-by: Nadav Har'El Signed-off-by: Jun Nakajima Signed-off-by: Xinhao Xu Reviewed-by: Paolo Bonzini --- arch/x86/kvm/vmx.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x

[PATCH v2 10/13] nEPT: Nested INVEPT

2013-05-06 Thread Jun Nakajima
If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. Therefore, when L1 call

[PATCH v2 08/13] nEPT: Some additional comments

2013-05-06 Thread Jun Nakajima
Some additional comments to preexisting code: Explain who (L0 or L1) handles EPT violation and misconfiguration exits. Don't mention "shadow on either EPT or shadow" as the only two options. Signed-off-by: Nadav Har'El Signed-off-by: Jun Nakajima Signed-off-by: Xinhao Xu --- arch/x86/kvm/vmx.c

[PATCH v2 09/13] nEPT: Advertise EPT to L1

2013-05-06 Thread Jun Nakajima
Advertise the support of EPT to the L1 guest, through the appropriate MSR. This is the last patch of the basic Nested EPT feature, so as to allow bisection through this patch series: The guest will not see EPT support until this last patch, and will not attempt to use the half-applied feature. Si

[PATCH v2 07/13] nEPT: Fix wrong test in kvm_set_cr3

2013-05-06 Thread Jun Nakajima
kvm_set_cr3() attempts to check if the new cr3 is a valid guest physical address. The problem is that with nested EPT, cr3 is an *L2* physical address, not an L1 physical address as this test expects. As the comment above this test explains, it isn't necessary, and doesn't correspond to anything a

  1   2   >