Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from PVCLOCK_COUNTS_FROM_ZERO.

2015-09-20 Thread Marcelo Tosatti
On Fri, Sep 18, 2015 at 05:54:28PM +0200, Radim Krčmář wrote: > This patch series will be disabling PVCLOCK_COUNTS_FROM_ZERO flag and is > RFC because I haven't explored many potential problems or tested it. The justification to disable PVCLOCK_COUNTS_FROM_ZERO is because you haven't explored

[PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-20 Thread Andy Lutomirski
This demotes an OOPS and likely panic due to a failed non-"safe" MSR access to a WARN_ON_ONCE and a return of zero (in the RDMSR case). We still write a pr_info entry unconditionally for debugging. To be clear, this type of failure should *not* happen. This patch exists to minimize the chance of

[PATCH v2 2/2] x86/msr: Set the return value to zero when native_rdmsr_safe fails

2015-09-20 Thread Andy Lutomirski
This will cause unchecked native_rdmsr_safe failures to return deterministic results. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/msr.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h

[PATCH v2 0/2] x86/msr: MSR access failure changes

2015-09-20 Thread Andy Lutomirski
This applies on top of my earlier paravirt MSR series. Changes from v1: - Return zero instead of poison on bad RDMSRs. Andy Lutomirski (2): x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops x86/msr: Set the return value to zero when native_rdmsr_safe fails

Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-20 Thread Andy Lutomirski
On Sep 20, 2015 5:15 PM, "Linus Torvalds" wrote: > > On Sun, Sep 20, 2015 at 5:02 PM, Andy Lutomirski wrote: > > This demotes an OOPS and likely panic due to a failed non-"safe" MSR > > access to a WARN_ON_ONCE and a return of zero (in the RDMSR

Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-20 Thread Linus Torvalds
On Sun, Sep 20, 2015 at 5:02 PM, Andy Lutomirski wrote: > This demotes an OOPS and likely panic due to a failed non-"safe" MSR > access to a WARN_ON_ONCE and a return of zero (in the RDMSR case). > We still write a pr_info entry unconditionally for debugging. No, this is wrong.

Re: [PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-20 Thread David Gibson
On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote: > Access to the kvm->buses (like with the kvm_io_bus_read() and -write() > functions) has to be protected via the kvm->srcu lock. > The kvmppc_h_logical_ci_load() and -store() functions are missing > this lock so far, so let's add it

Re: [PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-20 Thread David Gibson
On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote: > Access to the kvm->buses (like with the kvm_io_bus_read() and -write() > functions) has to be protected via the kvm->srcu lock. > The kvmppc_h_logical_ci_load() and -store() functions are missing > this lock so far, so let's add it

Re: [PATCH 0/2] VFIO: Accept IOMMU group (PE) ID

2015-09-20 Thread David Gibson
On Sat, Sep 19, 2015 at 04:22:47PM +1000, David Gibson wrote: > On Fri, Sep 18, 2015 at 09:47:32AM -0600, Alex Williamson wrote: > > On Fri, 2015-09-18 at 16:24 +1000, Gavin Shan wrote: > > > This allows to accept IOMMU group (PE) ID from the parameter from userland > > > when handling EEH

[RFC PATCH v2] os-android: Add support to android platform

2015-09-20 Thread Houcheng Lin
This is patch to build qemu for android platfrom. The building uses NDK r10 cross-compilation toolchain with following changes: - install qemu dependent libraries - upgrade bionic libc - add mssing includes, scsi/sg.h, in toolchain - make a symbolic link

Re: [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-20 Thread David Gibson
On Thu, Sep 17, 2015 at 10:49:41AM +0200, Thomas Huth wrote: > The PAPR interface defines a hypercall to pass high-quality > hardware generated random numbers to guests. Recent kernels can > already provide this hypercall to the guest if the right hardware > random number generator is available.

RE: [PATCH v9 17/18] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-09-20 Thread Wu, Feng
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Saturday, September 19, 2015 12:07 AM > To: Wu, Feng; Alex Williamson; j...@8bytes.org; Marcelo Tosatti > Cc: io...@lists.linux-foundation.org; linux-ker...@vger.kernel.org;

Re: [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-20 Thread David Gibson
On Fri, Sep 18, 2015 at 11:05:52AM +0200, Greg Kurz wrote: > On Thu, 17 Sep 2015 10:49:41 +0200 > Thomas Huth wrote: > > > The PAPR interface defines a hypercall to pass high-quality > > hardware generated random numbers to guests. Recent kernels can > > already provide this

Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-09-20 Thread Wanpeng Li
On 9/21/15 10:51 AM, Xiao Guangrong wrote: Thanks for your report and analysis, Janusz! On 09/19/2015 01:48 AM, Janusz wrote: W dniu 18.09.2015 o 12:07, Laszlo Ersek pisze: On 09/18/15 11:37, Janusz wrote: Hello, I am writting about this patch that was posted by Xiao:

Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-09-20 Thread Xiao Guangrong
On 09/21/2015 11:30 AM, Wanpeng Li wrote: On 9/21/15 10:51 AM, Xiao Guangrong wrote: Thanks for your report and analysis, Janusz! On 09/19/2015 01:48 AM, Janusz wrote: W dniu 18.09.2015 o 12:07, Laszlo Ersek pisze: On 09/18/15 11:37, Janusz wrote: Hello, I am writting about this patch

Re: [PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-20 Thread Paolo Bonzini
On 21/09/2015 03:37, David Gibson wrote: > On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote: >> Access to the kvm->buses (like with the kvm_io_bus_read() and >> -write() functions) has to be protected via the kvm->srcu lock. >> The kvmppc_h_logical_ci_load() and -store() functions

Re: [PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-20 Thread Paolo Bonzini
On 21/09/2015 03:37, David Gibson wrote: > On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote: >> Access to the kvm->buses (like with the kvm_io_bus_read() and >> -write() functions) has to be protected via the kvm->srcu lock. >> The kvmppc_h_logical_ci_load() and -store() functions

Re: [PATCH] kvm: svm: reset mmu on VCPU reset

2015-09-20 Thread Xiao Guangrong
On 09/18/2015 09:39 PM, Igor Mammedov wrote: When INIT/SIPI sequence is sent to VCPU which before that was in use by OS, VMRUN might fail with: KVM: entry failed, hardware error 0x EAX= EBX= ECX= EDX=06d3 ESI= EDI= EBP=

Re: include/linux/kvm_host.h:488 suspicious rcu_dereference_check() usage!

2015-09-20 Thread Paolo Bonzini
On 20/09/2015 18:48, Borislav Petkov wrote: > [26421.584526] walk_shadow_page_get_mmio_spte: detect reserved bits on spte, > addr 0xb8000, dump hierarchy: > [26421.593927] -- spte 0x3e5a22027 level 4. > [26421.598228] -- spte 0x38a00b027 level 3. > [26421.602505] -- spte 0x387334027

[PATCH] KVM: x86: put vcpu_create under kvm->srcu critical section

2015-09-20 Thread Paolo Bonzini
This is needed in case vcpu_create wants to access the memslots array. Fixes this lockdep splat: [26421.303750] === [26421.307952] [ INFO: suspicious RCU usage. ] [26421.312161] 4.3.0-rc1+ #1 Not tainted [26421.312161] --- [26421.312162]

Re: [PATCH 0/2] VFIO: Accept IOMMU group (PE) ID

2015-09-20 Thread David Gibson
On Sat, Sep 19, 2015 at 04:22:47PM +1000, David Gibson wrote: > On Fri, Sep 18, 2015 at 09:47:32AM -0600, Alex Williamson wrote: > > On Fri, 2015-09-18 at 16:24 +1000, Gavin Shan wrote: > > > This allows to accept IOMMU group (PE) ID from the parameter from userland > > > when handling EEH

Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-09-20 Thread Xiao Guangrong
Thanks for your report and analysis, Janusz! On 09/19/2015 01:48 AM, Janusz wrote: W dniu 18.09.2015 o 12:07, Laszlo Ersek pisze: On 09/18/15 11:37, Janusz wrote: Hello, I am writting about this patch that was posted by Xiao: http://www.spinics.net/lists/kvm/msg119044.html and this:

RE: [PATCH v9 17/18] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-09-20 Thread Wu, Feng
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Monday, September 21, 2015 1:33 PM > To: Wu, Feng; Alex Williamson; j...@8bytes.org; Marcelo Tosatti > Cc: io...@lists.linux-foundation.org; linux-ker...@vger.kernel.org; KVM

Re: rdmsr_safe in Linux PV (under Xen) gets an #GP:Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-20 Thread Andy Lutomirski
On Fri, Sep 18, 2015 at 12:04 PM, Borislav Petkov wrote: > On Fri, Sep 18, 2015 at 08:20:46AM -0700, Andy Lutomirski wrote: >> In any event, Borislav, you must have typed rdmsr_safe for a reason :) > > Wasn't me: > > 6c62aa4a3c12 ("x86: make amd.c have 64bit support code") > > I

Re: [PATCH v9 17/18] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-09-20 Thread Paolo Bonzini
On 21/09/2015 04:16, Wu, Feng wrote: > I tested the above patch you suggested, it works fine. Thank you! So > do I need to resend a new version or you can handle it in your tree? I will handle it. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message

include/linux/kvm_host.h:488 suspicious rcu_dereference_check() usage!

2015-09-20 Thread Borislav Petkov
Hey Paolo, just triggered this on rc1+tip with a 32-bit guest: [26421.303750] === [26421.307952] [ INFO: suspicious RCU usage. ] [26421.312161] 4.3.0-rc1+ #1 Not tainted [26421.312161] --- [26421.312162] include/linux/kvm_host.h:488

Re: [Qemu-devel] [RFC PATCH v2] os-android: Add support to android platform

2015-09-20 Thread Alex Bennée
Houcheng Lin writes: > This is patch to build qemu for android platfrom. The building > uses NDK r10 cross-compilation toolchain with following > changes: > > - install qemu dependent libraries > - upgrade bionic libc > - add mssing includes, scsi/sg.h, in