[PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-19 Thread 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 patch implements an IOMMU driver for VFIO which does map

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 11:15:36AM +0800, Xiao Guangrong wrote: > On 03/19/2013 06:16 AM, Eric Northup wrote: > > On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong > > wrote: > >> This patch tries to introduce a very simple and scale way to invalid all > >> mmio sptes - it need not walk any shadow p

Re: [PATCH v3 5/8] KVM: Recalculate destination vcpu map

2013-03-19 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:47:19PM +0800, Yang Zhang wrote: > From: Yang Zhang > > Update destination vcpu map when ioapic entry or apic(id, ldr, dfr) is changed > > Signed-off-by: Yang Zhang > --- > virt/kvm/ioapic.c | 40 ++-- > 1 files changed, 38 inser

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-19 Thread Xiao Guangrong
On 03/19/2013 03:36 PM, Gleb Natapov wrote: > On Tue, Mar 19, 2013 at 11:15:36AM +0800, Xiao Guangrong wrote: >> On 03/19/2013 06:16 AM, Eric Northup wrote: >>> On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong >>> wrote: This patch tries to introduce a very simple and scale way to invalid all

Re: [PATCH V3 WIP 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module

2013-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2013 at 08:34:44AM +0800, Asias He wrote: > +static void vhost_scsi_stop(VHostSCSI *vs, VirtIODevice *vdev) > +{ > +int ret = 0; > + > +if (!vdev->binding->set_guest_notifiers) { > +ret = vdev->binding->set_guest_notifiers(vdev->binding_opaque, > +

Re: [PATCH V3 WIP 3/3] disable vhost_verify_ring_mappings check

2013-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2013 at 08:34:45AM +0800, Asias He wrote: > --- > hw/vhost.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/vhost.c b/hw/vhost.c > index 4d6aee3..0c52ec4 100644 > --- a/hw/vhost.c > +++ b/hw/vhost.c > @@ -421,10 +421,12 @@ static void vhost_set_memory(MemoryListener

Re: [PATCH V3 WIP 3/3] disable vhost_verify_ring_mappings check

2013-03-19 Thread Asias He
On Tue, Mar 19, 2013 at 09:40:57AM +0100, Stefan Hajnoczi wrote: > On Tue, Mar 19, 2013 at 08:34:45AM +0800, Asias He wrote: > > --- > > hw/vhost.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/hw/vhost.c b/hw/vhost.c > > index 4d6aee3..0c52ec4 100644 > > --- a/hw/vhost.c > > +

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Fri, Mar 15, 2013 at 09:31:11PM +0800, Yang Zhang wrote: > From: Yang Zhang > > If posted interrupt is avaliable, then uses it to inject virtual > interrupt to guest. > > Signed-off-by: Yang Zhang > --- > arch/x86/kvm/irq.c |3 ++- > arch/x86/kvm/lapic.c | 16 +--- > arc

Re: [PATCH V3 0/2] tcm_vhost hotplug/hotunplug support

2013-03-19 Thread Paolo Bonzini
Il 18/03/2013 22:53, Michael S. Tsirkin ha scritto: > Sorry, no, I'd prefer we get userspace support in qemu in first. > If there's only a single user for this driver (kvmtool), > then it was a mistake to merge it, the right thing would be to freeze it > and look at whether we can drop it completel

[PATCH V5 1/5] virtio-scsi: redo allocation of target data

2013-03-19 Thread Wanlong Gao
From: Paolo Bonzini virtio_scsi_target_state is now empty. We will find new uses for it in the next few patches, so this patch does not drop it completely. However, having dropped the sglist flexible array member, we can turn the tgt array-of-pointers into a simple array. This simplifies the al

[PATCH V5 4/5] virtio-scsi: introduce multiqueue support

2013-03-19 Thread Wanlong Gao
From: Paolo Bonzini This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue arbitrarily. In this case the queue is chosen according

[PATCH V5 2/5] virtio-scsi: pass struct virtio_scsi to virtqueue completion function

2013-03-19 Thread Wanlong Gao
From: Paolo Bonzini This will be needed soon in order to retrieve the per-target struct. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 17 + 1 file changed, 9 insertions(+), 8 dele

[PATCH V5 3/5] virtio-scsi: push vq lock/unlock into virtscsi_vq_done

2013-03-19 Thread Wanlong Gao
From: Paolo Bonzini Avoid duplicated code in all of the callers. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --g

[PATCH V5 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-19 Thread Wanlong Gao
Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 29 + 1 file changed, 29 insertions(+)

[PATCH V5 0/5] virtio-scsi multiqueue

2013-03-19 Thread Wanlong Gao
This series implements virtio-scsi queue steering, which gives performance improvements of up to 50% (measured both with QEMU and tcm_vhost backends). This version rebased on Rusty's virtio ring rework patches. We hope this can go into virtio-next together with the virtio ring rework pathes. V5:

Re: [PATCH V5 1/5] virtio-scsi: redo allocation of target data

2013-03-19 Thread James Bottomley
On Tue, 2013-03-19 at 17:57 +0800, Wanlong Gao wrote: > From: Paolo Bonzini > > virtio_scsi_target_state is now empty. We will find new uses for it in > the next few patches, so this patch does not drop it completely. > However, having dropped the sglist flexible array member, we can turn > the

Re: [PATCH V5 1/5] virtio-scsi: redo allocation of target data

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 12:32, James Bottomley ha scritto: > On Tue, 2013-03-19 at 17:57 +0800, Wanlong Gao wrote: >> From: Paolo Bonzini >> >> virtio_scsi_target_state is now empty. We will find new uses for it in >> the next few patches, so this patch does not drop it completely. >> However, having dropp

Re: [PATCH V5 1/5] virtio-scsi: redo allocation of target data

2013-03-19 Thread James Bottomley
On Tue, 2013-03-19 at 12:45 +0100, Paolo Bonzini wrote: > Il 19/03/2013 12:32, James Bottomley ha scritto: > > On Tue, 2013-03-19 at 17:57 +0800, Wanlong Gao wrote: > >> From: Paolo Bonzini > >> > >> virtio_scsi_target_state is now empty. We will find new uses for it in > >> the next few patches,

RE: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-19: > On Fri, Mar 15, 2013 at 09:31:11PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> If posted interrupt is avaliable, then uses it to inject virtual >> interrupt to guest. >> >> Signed-off-by: Yang Zhang >> --- >> arch/x86/kvm/irq.c |3 ++- >> arch/x

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 12:11:47PM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-03-19: > > On Fri, Mar 15, 2013 at 09:31:11PM +0800, Yang Zhang wrote: > >> From: Yang Zhang > >> > >> If posted interrupt is avaliable, then uses it to inject virtual > >> interrupt to guest. > >> > >> S

RE: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-19: > On Tue, Mar 19, 2013 at 12:11:47PM +, Zhang, Yang Z wrote: >> Gleb Natapov wrote on 2013-03-19: >>> On Fri, Mar 15, 2013 at 09:31:11PM +0800, Yang Zhang wrote: From: Yang Zhang If posted interrupt is avaliable, then uses it to inject virtual

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 12:42:01PM +, Zhang, Yang Z wrote: > local_irq_disable(); > +kvm_x86_ops->posted_intr_clear_on(vcpu); > + > >>> Why is this separate from pir_to_irr syncing? > >> This is the result of discussion with Marcelo. It is more reasonable to > >>

Re: [PATCH V3 0/2] tcm_vhost hotplug/hotunplug support

2013-03-19 Thread Michael S. Tsirkin
On Tue, Mar 19, 2013 at 10:36:42AM +0100, Paolo Bonzini wrote: > Il 18/03/2013 22:53, Michael S. Tsirkin ha scritto: > > Sorry, no, I'd prefer we get userspace support in qemu in first. > > If there's only a single user for this driver (kvmtool), > > then it was a mistake to merge it, the right thi

Re: [PATCH V3 0/2] tcm_vhost hotplug/hotunplug support

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 14:45, Michael S. Tsirkin ha scritto: > On Tue, Mar 19, 2013 at 10:36:42AM +0100, Paolo Bonzini wrote: >> Il 18/03/2013 22:53, Michael S. Tsirkin ha scritto: >>> Sorry, no, I'd prefer we get userspace support in qemu in first. >>> If there's only a single user for this driver (kvmtool

Re: KVM call agenda for 2013-03-19

2013-03-19 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please send in any agenda topics you are interested in. As there are no agenda, call got cancelled. Happy hacking. 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 in

RE: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-19: > On Tue, Mar 19, 2013 at 12:42:01PM +, Zhang, Yang Z wrote: >> local_irq_disable(); >> +kvm_x86_ops->posted_intr_clear_on(vcpu); >> + > Why is this separate from pir_to_irr syncing? This is the result of discussion with Ma

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 01:59:21PM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-03-19: > > On Tue, Mar 19, 2013 at 12:42:01PM +, Zhang, Yang Z wrote: > >>local_irq_disable(); > >> + kvm_x86_ops->posted_intr_clear_on(vcpu); > >> + > > Why is this separate

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 11:06:35AM +0800, Xiao Guangrong wrote: > On 03/19/2013 04:46 AM, Marcelo Tosatti wrote: > > On Wed, Mar 13, 2013 at 12:59:12PM +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

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 04:51:04PM +0200, Gleb Natapov wrote: > On Tue, Mar 19, 2013 at 01:59:21PM +, Zhang, Yang Z wrote: > > Gleb Natapov wrote on 2013-03-19: > > > On Tue, Mar 19, 2013 at 12:42:01PM +, Zhang, Yang Z wrote: > > >> local_irq_disable(); > > >> +kvm_x86_ops-

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 02:23:59PM +0200, Gleb Natapov wrote: > On Tue, Mar 19, 2013 at 12:11:47PM +, Zhang, Yang Z wrote: > > Gleb Natapov wrote on 2013-03-19: > > > On Fri, Mar 15, 2013 at 09:31:11PM +0800, Yang Zhang wrote: > > >> From: Yang Zhang > > >> > > >> If posted interrupt is avali

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 03:29:24PM +0200, Gleb Natapov wrote: > On Tue, Mar 19, 2013 at 12:42:01PM +, Zhang, Yang Z wrote: > > local_irq_disable(); > > + kvm_x86_ops->posted_intr_clear_on(vcpu); > > + > > >>> Why is this separate from pir_to_irr syncing? > > >> This i

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 12:03:22PM -0300, Marcelo Tosatti wrote: > On Tue, Mar 19, 2013 at 02:23:59PM +0200, Gleb Natapov wrote: > > On Tue, Mar 19, 2013 at 12:11:47PM +, Zhang, Yang Z wrote: > > > Gleb Natapov wrote on 2013-03-19: > > > > On Fri, Mar 15, 2013 at 09:31:11PM +0800, Yang Zhang wr

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 05:12:55PM +0200, Gleb Natapov wrote: > On Tue, Mar 19, 2013 at 04:51:04PM +0200, Gleb Natapov wrote: > > On Tue, Mar 19, 2013 at 01:59:21PM +, Zhang, Yang Z wrote: > > > Gleb Natapov wrote on 2013-03-19: > > > > On Tue, Mar 19, 2013 at 12:42:01PM +, Zhang, Yang Z wr

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 12:13:11PM -0300, Marcelo Tosatti wrote: > On Tue, Mar 19, 2013 at 03:29:24PM +0200, Gleb Natapov wrote: > > On Tue, Mar 19, 2013 at 12:42:01PM +, Zhang, Yang Z wrote: > > > local_irq_disable(); > > > +kvm_x86_ops->posted_intr_clear_on(vcpu); > > > >>>

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 12:19:55PM -0300, Marcelo Tosatti wrote: > See the previous argument: should never enter guest mode with PIR ON bit > set. With logic above: > > context1 context2 context3 > set_bit(PI

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 12:19:55PM -0300, Marcelo Tosatti wrote: > On Tue, Mar 19, 2013 at 05:12:55PM +0200, Gleb Natapov wrote: > > On Tue, Mar 19, 2013 at 04:51:04PM +0200, Gleb Natapov wrote: > > > On Tue, Mar 19, 2013 at 01:59:21PM +, Zhang, Yang Z wrote: > > > > Gleb Natapov wrote on 2013-

[PATCH] x86: correctly initialize the CS base on reset

2013-03-19 Thread Paolo Bonzini
The CS base was initialized to 0 on VMX (wrong, but usually overridden by userspace before starting) or 0xf on SVM. The correct value is 0x, and VMX is able to emulate it now, so use it. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/svm.c | 8 +--- arch/x86/kvm/vmx.c | 1 + 2 fi

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-19 Thread Xiao Guangrong
On 03/19/2013 10:40 PM, Marcelo Tosatti wrote: > > I misunderstood the benefit of your idea (now i got it: zap root > and flush TLB guarantees vcpus will refault). What i'd like to avoid is > > memset(cache, 0, sizeof(*cache)); > kvm_mmu_init(kvm); > > I'd prefer normal operations on those data

Re: [PATCH] x86: correctly initialize the CS base on reset

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 04:30:26PM +0100, Paolo Bonzini wrote: > The CS base was initialized to 0 on VMX (wrong, but usually overridden > by userspace before starting) or 0xf on SVM. The correct value is > 0x, and VMX is able to emulate it now, so use it. > > Signed-off-by: Paolo Bonz

[PATCH] x86: let userspace inject interrupts into the local APIC

2013-03-19 Thread Paolo Bonzini
There is no way for userspace to inject interrupts into a VCPU's local APIC, which is important in order to inject INITs coming from the chipset. KVM_INTERRUPT is currently disabled when the in-kernel local APIC is used, so we can repurpose it. The shorthand destination field must contain APIC_DE

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 12:27:38PM -0300, Marcelo Tosatti wrote: > On Tue, Mar 19, 2013 at 12:19:55PM -0300, Marcelo Tosatti wrote: > > See the previous argument: should never enter guest mode with PIR ON bit > > set. With logic above: > > > > context1context2

Re: [PATCH] x86: correctly initialize the CS base on reset

2013-03-19 Thread Jan Kiszka
On 2013-03-19 16:43, Gleb Natapov wrote: > On Tue, Mar 19, 2013 at 04:30:26PM +0100, Paolo Bonzini wrote: >> The CS base was initialized to 0 on VMX (wrong, but usually overridden >> by userspace before starting) or 0xf on SVM. The correct value is >> 0x, and VMX is able to emulate it

Re: [PATCH] x86: correctly initialize the CS base on reset

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 05:41:45PM +0100, Jan Kiszka wrote: > On 2013-03-19 16:43, Gleb Natapov wrote: > > On Tue, Mar 19, 2013 at 04:30:26PM +0100, Paolo Bonzini wrote: > >> The CS base was initialized to 0 on VMX (wrong, but usually overridden > >> by userspace before starting) or 0xf on SVM.

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

2013-03-19 Thread Mihai Caraman
Move vcpu's MMU default configuration and geometry update into their own functions. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/e500_mmu.c | 59 +++ 1 files changed, 37 insertions(+), 22 deletions(-) diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch

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

2013-03-19 Thread Mihai Caraman
MMU registers were exposed to user-space using sregs interface. Add them to ONE_REG interface. Signed-off-by: Mihai Caraman --- Documentation/virtual/kvm/api.txt | 13 + arch/powerpc/include/uapi/asm/kvm.h | 14 ++ arch/powerpc/kvm/44x.c | 12 + arch/powerpc/kvm/

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

2013-03-19 Thread Scott Wood
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 @@ int kvmppc_set_sregs_e500_tlb(struct kvm_vcpu *vcpu, stru

Re: [PATCH] x86: let userspace inject interrupts into the local APIC

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 04:51:13PM +0100, Paolo Bonzini wrote: > There is no way for userspace to inject interrupts into a VCPU's > local APIC, which is important in order to inject INITs coming from > the chipset. KVM_INTERRUPT is currently disabled when the in-kernel > local APIC is used, so we

Re: [PATCH] x86: let userspace inject interrupts into the local APIC

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 19:13, Gleb Natapov ha scritto: >> > There is no way for userspace to inject interrupts into a VCPU's >> > local APIC, which is important in order to inject INITs coming from >> > the chipset. KVM_INTERRUPT is currently disabled when the in-kernel >> > local APIC is used, so we can r

Re: [PATCH] x86: let userspace inject interrupts into the local APIC

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 07:39:24PM +0100, Paolo Bonzini wrote: > Il 19/03/2013 19:13, Gleb Natapov ha scritto: > >> > There is no way for userspace to inject interrupts into a VCPU's > >> > local APIC, which is important in order to inject INITs coming from > >> > the chipset. KVM_INTERRUPT is cur

Re: [PATCH] x86: let userspace inject interrupts into the local APIC

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 19:50, Gleb Natapov ha scritto: > On Tue, Mar 19, 2013 at 07:39:24PM +0100, Paolo Bonzini wrote: >> Il 19/03/2013 19:13, Gleb Natapov ha scritto: > There is no way for userspace to inject interrupts into a VCPU's > local APIC, which is important in order to inject INITs coming

Host kernel crash at pci_find_upstream_pcie_bridge on VM exit

2013-03-19 Thread Ganesh Narayanaswamy
Hi, I am running qemu with kvm and VT-d enabled and a couple of PCI devices assigned to the guest VM. Both host and guest are running linux 2.6 kernel. The passthrough works fine, but when I exit the VM, the host kernel crashes with the following backtrace: <4>[ 5569.836893] Process qemu-sys

Re: [PATCH v2 6/8] KVM: Add reset/restore rtc_status support

2013-03-19 Thread Marcelo Tosatti
On Mon, Mar 18, 2013 at 03:24:37PM +0800, Yang Zhang wrote: > From: Yang Zhang > > reset/restore rtc_status when ioapic reset/restore. > > Signed-off-by: Yang Zhang > --- > arch/x86/kvm/lapic.c |8 > arch/x86/kvm/lapic.h |1 + > virt/kvm/ioapic.c| 33

Re: [PATCH v2 6/8] KVM: Add reset/restore rtc_status support

2013-03-19 Thread Marcelo Tosatti
On Mon, Mar 18, 2013 at 03:24:37PM +0800, Yang Zhang wrote: > From: Yang Zhang > > reset/restore rtc_status when ioapic reset/restore. > > Signed-off-by: Yang Zhang > --- > arch/x86/kvm/lapic.c |8 > arch/x86/kvm/lapic.h |1 + > virt/kvm/ioapic.c| 33

Re: Host kernel crash at pci_find_upstream_pcie_bridge on VM exit

2013-03-19 Thread Alex Williamson
On Tue, 2013-03-19 at 13:30 -0700, Ganesh Narayanaswamy wrote: > Hi, > > I am running qemu with kvm and VT-d enabled and a couple of PCI > devices assigned to the guest VM. Both host and guest are running > linux 2.6 kernel. > > The passthrough works fine, but when I exit the VM, the host kerne

[GIT PULL] KVM fixes for 3.9-rc3

2013-03-19 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fixes Andy Honig (3): KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796) KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache f

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 11:37:38PM +0800, Xiao Guangrong wrote: > On 03/19/2013 10:40 PM, Marcelo Tosatti wrote: > > > > > I misunderstood the benefit of your idea (now i got it: zap root > > and flush TLB guarantees vcpus will refault). What i'd like to avoid is > > > > memset(cache, 0, sizeof(

[GIT PULL] vfio fix for 3.9-rc4

2013-03-19 Thread Alex Williamson
Hi Linus, Please pull for the next rc. Thanks! The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9: Linux 3.9-rc2 (2013-03-10 16:54:19 -0700) are available in the git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v3.9-rc4 for you to fetch chang

Re: [PATCH v2 8/8] KVM: Use eoi to track RTC interrupt delivery status

2013-03-19 Thread Marcelo Tosatti
On Mon, Mar 18, 2013 at 03:24:39PM +0800, Yang Zhang wrote: > 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 nee

Re: Host kernel crash at pci_find_upstream_pcie_bridge on VM exit

2013-03-19 Thread Ganesh Narayanaswamy
Hi Alex, Thanks for your reply. The pci devices in question are proprietary FPGAs. Here is the lspci -tv output: -bash-4.1# lspci -tv -[:00]-+-00.0 Intel Corporation Sandy Bridge DRAM Controller +-01.0-[01-04]00.0-[02-04]--+-01.0-[03]00.0 Broadcom Corporation Device b

Re: [PATCH V5 4/5] virtio-scsi: introduce multiqueue support

2013-03-19 Thread Venkatesh Srinivas
This looks pretty good! I rather like the (lack of) locking in I/O completion (around the req count vs. target/queue binding). It is unfortunate that you need to hold the per-target lock in virtscsi_pick_vq() though; have any idea how much that lock hurts? Just two minor comments: (in struct

Re: [PATCH V3 WIP 3/3] disable vhost_verify_ring_mappings check

2013-03-19 Thread Nicholas A. Bellinger
On Tue, 2013-03-19 at 09:40 +0100, Stefan Hajnoczi wrote: > On Tue, Mar 19, 2013 at 08:34:45AM +0800, Asias He wrote: > > --- > > hw/vhost.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/hw/vhost.c b/hw/vhost.c > > index 4d6aee3..0c52ec4 100644 > > --- a/hw/vhost.c > > +++ b/hw

RE: [PATCH v2 6/8] KVM: Add reset/restore rtc_status support

2013-03-19 Thread Zhang, Yang Z
Marcelo Tosatti wrote on 2013-03-20: > On Mon, Mar 18, 2013 at 03:24:37PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> reset/restore rtc_status when ioapic reset/restore. >> >> Signed-off-by: Yang Zhang >> --- >> arch/x86/kvm/lapic.c |8 >> arch/x86/kvm/lapic.h |1 + >>

RE: [PATCH v2 6/8] KVM: Add reset/restore rtc_status support

2013-03-19 Thread Zhang, Yang Z
Marcelo Tosatti wrote on 2013-03-20: > On Mon, Mar 18, 2013 at 03:24:37PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> reset/restore rtc_status when ioapic reset/restore. >> >> Signed-off-by: Yang Zhang >> --- >> arch/x86/kvm/lapic.c |8 >> arch/x86/kvm/lapic.h |1 + >>

RE: [PATCH v2 8/8] KVM: Use eoi to track RTC interrupt delivery status

2013-03-19 Thread Zhang, Yang Z
Marcelo Tosatti wrote on 2013-03-20: > On Mon, Mar 18, 2013 at 03:24:39PM +0800, Yang Zhang wrote: >> 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: >>

[PATCH] virtio-blk: Set default serial id

2013-03-19 Thread Asias He
If user does not specify a serial id, e.g. -device virtio-blk-pci,serial="serial_id" or -drive serial="serial_id" no serial id will be assigned. Add a default serial id in this case to help identifying the disk in guest. Signed-off-by: Asias He --- hw/virtio-blk.c | 7 +++ 1 file ch

RE: [PATCH v3 5/8] KVM: Recalculate destination vcpu map

2013-03-19 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-19: > On Mon, Mar 18, 2013 at 08:47:19PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Update destination vcpu map when ioapic entry or apic(id, ldr, dfr) is >> changed >> >> Signed-off-by: Yang Zhang >> --- >> virt/kvm/ioapic.c | 40 ++