Re: [PATCH] kvm: x86: move tracepoints outside extended quiescent state

2015-12-11 Thread Borislav Petkov
On Thu, Dec 10, 2015 at 07:15:19PM +0100, Paolo Bonzini wrote: > Yeah, wait_lapic_expire also have to be moved before __kvm_guest_enter. Yeah, v2 doesn't splat on the Intel box anymore but the AMD box still has, and it is a different problem. With the v2 applied, it still explodes, see below.

Re: [PATCH] kvm: x86: move tracepoints outside extended quiescent state

2015-12-11 Thread Paolo Bonzini
On 11/12/2015 11:22, Borislav Petkov wrote: > On Thu, Dec 10, 2015 at 07:15:19PM +0100, Paolo Bonzini wrote: >> Yeah, wait_lapic_expire also have to be moved before __kvm_guest_enter. > > Yeah, v2 doesn't splat on the Intel box anymore but the AMD box still > has, and it is a different problem.

Re: [GIT PULL] Please pull my kvm-ppc-fixes branch

2015-12-11 Thread Paolo Bonzini
On 10/12/2015 04:12, Paul Mackerras wrote: > git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git > kvm-ppc-fixes Pulled, thanks. Paolo -- 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

Re: [PATCH] kvm: x86: move tracepoints outside extended quiescent state

2015-12-11 Thread Paolo Bonzini
On 11/12/2015 12:41, Borislav Petkov wrote: > On Fri, Dec 11, 2015 at 11:41:30AM +0100, Paolo Bonzini wrote: >> It would be a kvm hypervisor page, not a kvm guest page, hence unrelated >> to the zapping thing. > > Ah right, guest pages should be userspace addresses, come to think of > it. > >>

Re: [PATCH] kvm: x86: move tracepoints outside extended quiescent state

2015-12-11 Thread Borislav Petkov
On Fri, Dec 11, 2015 at 11:41:30AM +0100, Paolo Bonzini wrote: > You can disable it (well, make it take a few days to appear) with this: > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 484079efea5b..a9070e260c72 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c >

Re: [PATCH 01/11] qapi: Rename qjson.h to qobject-json.h

2015-12-11 Thread Paolo Bonzini
On 11/12/2015 00:53, Eric Blake wrote: > We have two different JSON visitors in the tree; and having both > named 'qjson.h' can cause include confusion. Rename the qapi > version. > > Kill trailing whitespace in the renamed tests/check-qobject-json.c > to keep checkpatch.pl happy. > >

Re: [PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko

2015-12-11 Thread Alex Bennée
Stefan Hajnoczi writes: > From: Asias He > > VM sockets vhost transport implementation. This module runs in host > kernel. As per previous checkpatch comments. > > Signed-off-by: Asias He > Signed-off-by: Stefan Hajnoczi

Re: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted-interrupts

2015-12-11 Thread Radim Krcmár
2015-12-10 01:52+, Wu, Feng: >> From: Radim Krčmář [mailto:rkrc...@redhat.com] >> (Physical xAPIC+x2APIC mode is still somewhat reasonable and xAPIC CPUs >> start with LDR=0, which means that operating system doesn't need to >> utilize mixed mode, as defined by KVM, when switching to

[PATCH backport v3.10 1/4] MIPS: KVM: Fix ASID restoration logic

2015-12-11 Thread James Hogan
commit 002374f371bd02df864cce1fe85d90dc5b292837 upstream. ASID restoration on guest resume should determine the guest execution mode based on the guest Status register rather than bit 30 of the guest PC. Fix the two places in locore.S that do this, loading the guest status from the cop0 area.

[PATCH backport v3.10..v3.14 4/4] MIPS: KVM: Uninit VCPU in vcpu_create error path

2015-12-11 Thread James Hogan
commit 585bb8f9a5e592f2ce7abbe5ed3112d5438d2754 upstream. If either of the memory allocations in kvm_arch_vcpu_create() fail, the vcpu which has been allocated and kvm_vcpu_init'd doesn't get uninit'd in the error handling path. Add a call to kvm_vcpu_uninit() to fix this. Fixes: 669e846e6c4e

[PATCH backport v3.10..v3.14 3/4] MIPS: KVM: Fix CACHE immediate offset sign extension

2015-12-11 Thread James Hogan
commit c5c2a3b998f1ff5a586f9d37e154070b8d550d17 upstream. The immediate field of the CACHE instruction is signed, so ensure that it gets sign extended by casting it to an int16_t rather than just masking the low 16 bits. Fixes: e685c689f3a8 ("KVM/MIPS32: Privileged instruction/target branch

[PATCH backport v3.12..v3.14 2/4] MIPS: KVM: Fix ASID restoration logic

2015-12-11 Thread James Hogan
commit 002374f371bd02df864cce1fe85d90dc5b292837 upstream. ASID restoration on guest resume should determine the guest execution mode based on the guest Status register rather than bit 30 of the guest PC. Fix the two places in locore.S that do this, loading the guest status from the cop0 area.

Re: kvmclock doesn't work, help?

2015-12-11 Thread Marcelo Tosatti
On Wed, Dec 09, 2015 at 01:10:59PM -0800, Andy Lutomirski wrote: > I'm trying to clean up kvmclock and I can't get it to work at all. My > host is 4.4.0-rc3-ish on a Skylake laptop that has a working TSC. > > If I boot an SMP (2 vcpus) guest, tracing says: > > qemu-system-x86-2517 [001]

Re: kvmclock doesn't work, help?

2015-12-11 Thread Marcelo Tosatti
On Wed, Dec 09, 2015 at 02:27:36PM -0800, Andy Lutomirski wrote: > On Wed, Dec 9, 2015 at 2:12 PM, Paolo Bonzini wrote: > > > > > > On 09/12/2015 22:49, Andy Lutomirski wrote: > >> On Wed, Dec 9, 2015 at 1:16 PM, Paolo Bonzini wrote: > >>> > >>> > >>> On

Re: [PATCH v3 02/22] arm64: KVM: Add a HYP-specific header file

2015-12-11 Thread Christoffer Dall
On Mon, Dec 07, 2015 at 10:53:18AM +, Marc Zyngier wrote: > In order to expose the various EL2 services that are private to > the hypervisor, add a new hyp.h file. > > So far, it only contains mundane things such as section annotation > and VA manipulation. > > Signed-off-by: Marc Zyngier

Re: [PATCH v3 06/22] arm64: KVM: Implement timer save/restore

2015-12-11 Thread Christoffer Dall
On Mon, Dec 07, 2015 at 10:53:22AM +, Marc Zyngier wrote: > Implement the timer save restore as a direct translation of > the assembly code version. > > Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall -- To unsubscribe from this

[Bug 107561] 4.2 breaks PCI passthrough in QEMU/KVM

2015-12-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=107561 --- Comment #13 from schefis...@gmail.com --- Sorry for the delay. I couldn't check sooner. Unfortunately the guest doesn't start with the patch applied. Nothing displayed (no sync signal from passthrough card). Host dmesg doesn't show any

Re: kvmclock doesn't work, help?

2015-12-11 Thread Marcelo Tosatti
On Wed, Dec 09, 2015 at 01:10:59PM -0800, Andy Lutomirski wrote: > I'm trying to clean up kvmclock and I can't get it to work at all. My > host is 4.4.0-rc3-ish on a Skylake laptop that has a working TSC. > > If I boot an SMP (2 vcpus) guest, tracing says: > > qemu-system-x86-2517 [001]

Re: [PATCH v3 11/22] arm64: KVM: Add patchable function selector

2015-12-11 Thread Christoffer Dall
On Mon, Dec 07, 2015 at 10:53:27AM +, Marc Zyngier wrote: > KVM so far relies on code patching, and is likely to use it more > in the future. The main issue is that our alternative system works > at the instruction level, while we'd like to have alternatives at > the function level. > > In

Re: kvmclock doesn't work, help?

2015-12-11 Thread Andy Lutomirski
On Thu, Dec 10, 2015 at 1:32 PM, Marcelo Tosatti wrote: > On Wed, Dec 09, 2015 at 01:10:59PM -0800, Andy Lutomirski wrote: >> I'm trying to clean up kvmclock and I can't get it to work at all. My >> host is 4.4.0-rc3-ish on a Skylake laptop that has a working TSC. >> >> If I

RE: [Patch V2 2/2] x86, mce: Need to translate GPA to HPA to inject error in guest.

2015-12-11 Thread Chen, Gong
Hi, Ashok Please add " original author by Huang Ying " at some place. Thanks. > -Original Message- > From: Raj, Ashok > Sent: Friday, December 11, 2015 3:41 AM > To: kvm@vger.kernel.org > Cc: Chen, Gong; Gleb Natapov; Paolo Bonzini; qemu-de...@nongnu.org; >

[Bug 107561] 4.2 breaks PCI passthrough in QEMU/KVM

2015-12-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=107561 --- Comment #14 from Jasen Borisov --- Can confirm. I am also hit by this bug, and my virtual machine doesn't start either. I tried applying the patch to both 4.3.0 and linux-next, and neither of those worked. -- You are

[RFC PATCH 2/3] vfio-pci: Allow to mmap sub-page MMIO BARs if all MMIO BARs are page aligned

2015-12-11 Thread Yongji Xie
Current vfio-pci implementation disallows to mmap sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio page may be shared with other BARs. But we should allow to mmap these sub-page MMIO BARs if all MMIO BARs are page aligned which leads the BARs' mmio page would not be shared with other

[RFC PATCH 1/3] powerpc/pci: Enforce all MMIO BARs to be page aligned

2015-12-11 Thread Yongji Xie
PAGE_SIZE is 64KB by default on PPC64 platform. When vfio passthrough a pci device of which MMIO BARs are smaller than 64KB(PAGE_SIZE), guest would not handle the mmio accesses to the BARs which leads to mmio emulations in host. This is because vfio would not allow to passthrough one BAR's mmio

Re: [PATCH] KVM: arm/arm64: vgic: Fix kvm_vgic_map_is_active's dist check

2015-12-11 Thread Marc Zyngier
On 10/12/15 21:46, Christoffer Dall wrote: > External inputs to the vgic from time to time need to poke into the > state of a virtual interrupt, the prime example is the architected timer > code. > > Since the IRQ's active state can be represented in two places; the LR or > the distributor, we

Re: [PATCH] x86/platform/uv: Include clocksource.h for clocksource_touch_watchdog()

2015-12-11 Thread Andy Lutomirski
On Fri, Dec 11, 2015 at 12:06 AM, Ingo Molnar wrote: > > * Andy Lutomirski wrote: > >> diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h >> index f80d70009ff8..6d7d0e52ed5a 100644 >> --- a/arch/x86/include/asm/fixmap.h >> +++

Re: [PATCH v3 4/4] VSOCK: Add Makefile and Kconfig

2015-12-11 Thread Alex Bennée
Stefan Hajnoczi writes: > From: Asias He > > Enable virtio-vsock and vhost-vsock. > > Signed-off-by: Asias He > Signed-off-by: Stefan Hajnoczi > --- > v3: > * Don't put vhost vsock driver into staging > * Add

Re: [PATCH 2/5] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2015-12-11 Thread Andy Lutomirski
On Fri, Dec 11, 2015 at 12:42 AM, Paolo Bonzini wrote: > > > On 11/12/2015 08:52, Ingo Molnar wrote: >> >> * Paolo Bonzini wrote: >>> >>> Reviewed-by: Paolo Bonzini >> >> Thanks. I've added your Reviewed-by to the 1/5 patch as well

Re: [PATCH kvm-unit-tests] x86: always inline functions called after set_exception_return

2015-12-11 Thread David Matlack
On Wed, Dec 9, 2015 at 7:02 AM, Paolo Bonzini wrote: > On 07/12/2015 21:36, David Matlack wrote: >> set_exception_return forces exceptions handlers to return to a specific >> address instead of returning to the instruction address pushed by the >> CPU at the time of the

[PATCH] x86/platform/uv: Include clocksource.h for clocksource_touch_watchdog()

2015-12-11 Thread Ingo Molnar
* Andy Lutomirski wrote: > diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h > index f80d70009ff8..6d7d0e52ed5a 100644 > --- a/arch/x86/include/asm/fixmap.h > +++ b/arch/x86/include/asm/fixmap.h > @@ -19,7 +19,6 @@ > #include > #include > #include

Re: [PATCH v3 07/22] arm64: KVM: Implement system register save/restore

2015-12-11 Thread Marc Zyngier
Hi Mario, On 11/12/15 03:24, Mario Smarduch wrote: > Hi Marc, > > On 12/7/2015 2:53 AM, Marc Zyngier wrote: >> Implement the system register save/restore as a direct translation of >> the assembly code version. >> >> Signed-off-by: Marc Zyngier >> Reviewed-by: Christoffer

Re: [PATCH 2/5] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2015-12-11 Thread Paolo Bonzini
On 11/12/2015 08:52, Ingo Molnar wrote: > > * Paolo Bonzini wrote: > >> >> >> On 10/12/2015 00:12, Andy Lutomirski wrote: >>> From: Andy Lutomirski >>> >>> The pvclock vdso code was too abstracted to understand easily and >>> excessively paranoid.

[RFC PATCH 0/3] vfio-pci: Allow to mmap sub-page MMIO BARs and MSI-X table on PPC64 platform

2015-12-11 Thread Yongji Xie
Current vfio-pci implementation disallows to mmap sub-page(size < PAGE_SIZE) MMIO BARs and MSI-X table. This is because sub-page BARs' mmio page may be shared with other BARs and MSI-X table should not be accessed directly from the guest for security reasons. But these would cause some

[RFC PATCH 3/3] vfio-pci: Allow to mmap MSI-X table if EEH is supported

2015-12-11 Thread Yongji Xie
Current vfio-pci implementation disallows to mmap MSI-X table in case that user get to touch this directly. However, EEH mechanism could ensure that a given pci device can only shoot the MSIs assigned for its PE and guest kernel also would not write to MSI-X table in pci_enable_msix() because

Re: [PATCH v3 03/22] arm64: KVM: Implement vgic-v2 save/restore

2015-12-11 Thread Christoffer Dall
On Mon, Dec 07, 2015 at 10:53:19AM +, Marc Zyngier wrote: > Implement the vgic-v2 save restore (mostly) as a direct translation > of the assembly code version. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/Makefile | 1 + > arch/arm64/kvm/hyp/Makefile

Re: [PATCH v3 04/22] KVM: arm/arm64: vgic-v3: Make the LR indexing macro public

2015-12-11 Thread Christoffer Dall
On Mon, Dec 07, 2015 at 10:53:20AM +, Marc Zyngier wrote: > We store GICv3 LRs in reverse order so that the CPU can save/restore > them in rever order as well (don't ask why, the design is crazy), s/rever/reverse/ > and yet generate memory traffic that doesn't completely suck. > > We need

Re: [PATCH v3 05/22] arm64: KVM: Implement vgic-v3 save/restore

2015-12-11 Thread Christoffer Dall
On Mon, Dec 07, 2015 at 10:53:21AM +, Marc Zyngier wrote: > Implement the vgic-v3 save restore as a direct translation of > the assembly code version. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/hyp/Makefile | 1 + > arch/arm64/kvm/hyp/hyp.h|

Re: [GIT PULL] Please pull my kvm-ppc-fixes branch

2015-12-11 Thread Paolo Bonzini
On 10/12/2015 04:12, Paul Mackerras wrote: > git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git > kvm-ppc-fixes Pulled, thanks. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info