RE: GPF in intel_pmu_lbr_reset() with qemu -cpu host

2014-03-26 Thread Wu, Feng
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of Peter Wu > Sent: Sunday, March 23, 2014 6:00 AM > To: Gleb Natapov > Cc: Venkatesh Srinivas; Peter Zijlstra; Ingo Molnar; Andi Kleen; Linux Kernel > Developers List; H. Peter Anvin; kv

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Christian Borntraeger
On 25/03/14 13:37, Paolo Bonzini wrote: > Il 25/03/2014 04:19, Gonglei (Arei) ha scritto: >> Based on discussions in: >> http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 >> >> About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but >> unfortunately >> it looks li

Questions about interrupt injection

2014-03-26 Thread 缪天翔
Hi all, I want to implement a virtual pci device in qemu and when needed inject a virtual interrupt into the running guest. However, possibly this action would fail and crash the guest VM especially when the workload in guest is heavy. Qemu report the following errors: >KVM: entry failed, hardwar

RE: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Gonglei (Arei)
> > Based on discussions in: > > http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 > > > > About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but > unfortunately > > it looks like SRCU's grace period is no better than RCU. > > Really? This is not what Christian

[Bug 72381] [Nested] L1 call trace when create windows 7 guest as L2 guest.

2014-03-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=72381 --- Comment #2 from robert...@intel.com --- Tried this case: L0 94b3ffcd + L1 94b3ffcd , L1 panic. -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe kvm"

RE: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Gonglei (Arei)
> On my system I have HZ=100 and lots of CPUs. So RCUs "every cpu has > scheduled" > is certainly slower than SRCUs algorithm > (/* > * We use an adaptive strategy for synchronize_srcu() and especially for > * synchronize_srcu_expedited(). We spin for a fixed time period > * (defined below) to

Re: Preparing kvm/next for first pull request of 3.15 merge window

2014-03-26 Thread Paolo Bonzini
Il 26/03/2014 04:51, Paul Mackerras ha scritto: > I would like to know from ARM and PPC maintainers *now* (before the > merge window opens) what will be in 3.15. Also, PPC guys, please > make sure the pull requests will be based on commit e724f080f5dd > (KVM: PPC: Book3S HV: Fix register usage w

Re: Preparing kvm/next for first pull request of 3.15 merge window

2014-03-26 Thread Paolo Bonzini
Il 25/03/2014 21:35, Christian Borntraeger ha scritto: On 25/03/14 18:29, Paolo Bonzini wrote: Also, the pull requests I got in the last couple of months were a bit messy, and I'm already fearing that Linus notices. In the future, I'll tag kvm-3.x-base (e.g. kvm-3.16-base) when I open kvm/next,

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Paolo Bonzini
Il 26/03/2014 09:22, Gonglei (Arei) ha scritto: Yes, previously I was using synchronize_srcu, which is not good. When I changed it to synchronize_srcu_expedited, grace period delay is much better than synchronize_srcu. Though in our tests, we can still see some impact of KVM_SET_GSI_ROUTING ioctl

Re: GPF in intel_pmu_lbr_reset() with qemu -cpu host

2014-03-26 Thread Paolo Bonzini
Il 26/03/2014 08:23, Wu, Feng ha scritto: Is there a solution for this issue right now? I also met this GPF crash. Can you attach your .config? 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: Preparing kvm/next for first pull request of 3.15 merge window

2014-03-26 Thread Greg Kurz
On Wed, 26 Mar 2014 10:19:52 +0100 Paolo Bonzini wrote: > Il 26/03/2014 04:51, Paul Mackerras ha scritto: > >> > I would like to know from ARM and PPC maintainers *now* (before the > >> > merge window opens) what will be in 3.15. Also, PPC guys, please > >> > make sure the pull requests will be b

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Christian Borntraeger
On 26/03/14 09:22, Gonglei (Arei) wrote: > Without patches, ping time can jump from 0.3ms to 2ms-30ms. With > synchronize_srcu > patch, ping time is worse. With synchronize_srcu_expedited patch, ping time > is > overall good, though sometimes ping time jump to 1ms-3ms. Just to understand what

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Michael S. Tsirkin
On Wed, Mar 26, 2014 at 08:22:29AM +, Gonglei (Arei) wrote: > > > Based on discussions in: > > > http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 > > > > > > About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but > > unfortunately > > > it looks like SRCU's g

Re: Preparing kvm/next for first pull request of 3.15 merge window

2014-03-26 Thread Paul Mackerras
On Wed, Mar 26, 2014 at 10:19:52AM +0100, Paolo Bonzini wrote: > Il 26/03/2014 04:51, Paul Mackerras ha scritto: > >>> I would like to know from ARM and PPC maintainers *now* (before the > >>> merge window opens) what will be in 3.15. Also, PPC guys, please > >>> make sure the pull requests will b

[PATCH] KVM: vmx: fix MPX detection

2014-03-26 Thread Paolo Bonzini
kvm_x86_ops is still NULL at this point. Since kvm_init_msr_list cannot fail, it is safe to initialize it before the call. Reported-by: Fengguang Wu Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini --- arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v4] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-26 Thread David Miller
From: Zoltan Kiss Date: Fri, 21 Mar 2014 10:31:34 + > skb_zerocopy can copy elements of the frags array between skbs, but it doesn't > orphan them. Also, it doesn't handle errors, so this patch takes care of that > as well, and modify the callers accordingly. skb_tx_error() is also added to >

Re: [PATCH v4] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-26 Thread David Miller
From: David Miller Date: Wed, 26 Mar 2014 15:59:58 -0400 (EDT) > From: Zoltan Kiss > Date: Fri, 21 Mar 2014 10:31:34 + > >> skb_zerocopy can copy elements of the frags array between skbs, but it >> doesn't >> orphan them. Also, it doesn't handle errors, so this patch takes care of that >>

Re: [PATCH 3/3] KVM: nVMX: check for null vmcs12 when L1 does invept

2014-03-26 Thread Bandan Das
Jan Kiszka writes: > On 2014-03-22 17:43, Bandan Das wrote: >> Jan Kiszka writes: >> >>> On 2014-03-20 21:58, Bandan Das wrote: Jan Kiszka writes: > On 2014-03-20 04:28, Bandan Das wrote: >> Some L1 hypervisors such as Xen seem to be calling invept after >> vmclear or bef

Re: [PATCH 3/4] KVM: PPC: Alow kvmppc_get_last_inst() to fail

2014-03-26 Thread Scott Wood
On Thu, 2014-02-20 at 18:30 +0200, Mihai Caraman wrote: > diff --git a/arch/powerpc/kvm/book3s_paired_singles.c > b/arch/powerpc/kvm/book3s_paired_singles.c > index a59a25a..80c533e 100644 > --- a/arch/powerpc/kvm/book3s_paired_singles.c > +++ b/arch/powerpc/kvm/book3s_paired_singles.c > @@ -640,1

Re: [PATCH 4/4] KVM: PPC: Bookehv: Get vcpu's last instruction for emulation

2014-03-26 Thread Scott Wood
On Thu, 2014-02-20 at 18:30 +0200, Mihai Caraman wrote: > Load external pid (lwepx) instruction faults (when called from > KVM with guest context) needs to be handled by KVM. This implies > additional code in DO_KVM macro to identify the source of the > exception (which oiginate from KVM host rathe

[PATCH v5] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-26 Thread Zoltan Kiss
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the callers so they will signal the failed delivery towards the c

Re: [PATCH v4] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-26 Thread Zoltan Kiss
On 26/03/14 20:12, David Miller wrote: From: David Miller Date: Wed, 26 Mar 2014 15:59:58 -0400 (EDT) From: Zoltan Kiss Date: Fri, 21 Mar 2014 10:31:34 + skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this p

Massive read only kvm guests when backing file was missing

2014-03-26 Thread Alejandro Comisario
Hi List! Hope some one can help me, we had a big issue in our cloud the other day, a couple of our openstack regions ( +2000 kvm guests with qcow2 ) went read only filesystem from the guest side because the backing files directory (the openstack _base directory) was compromised and the data was los

[PATCH 3/4] KVM: Add SMAP support when setting CR4

2014-03-26 Thread Feng Wu
This patch adds SMAP handling logic when setting CR4 for guests Signed-off-by: Feng Wu --- arch/x86/kvm/cpuid.h | 8 arch/x86/kvm/mmu.c | 22 +++--- arch/x86/kvm/mmu.h | 2 ++ arch/x86/kvm/x86.c | 6 ++ 4 files changed, 35 insertions(+), 3 deletions(-) diff

[PATCH 2/4] KVM: Remove SMAP bit from CR4_RESERVED_BITS.

2014-03-26 Thread Feng Wu
This patch removes SMAP bit from CR4_RESERVED_BITS. Signed-off-by: Feng Wu --- arch/x86/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index ae5d783..b673925 100644 --- a/arch/x86/includ

[PATCH 4/4] KVM: Disable SMAP for guests in EPT realmode and EPT unpaging mode

2014-03-26 Thread Feng Wu
SMAP is disabled if CPU is in non-paging mode in hardware. However KVM always uses paging mode to emulate guest non-paging mode with TDP. To emulate this behavior, SMAP needs to be manually disabled when guest switches to non-paging mode. Signed-off-by: Feng Wu --- arch/x86/kvm/vmx.c | 10 ++

[PATCH 0/4] KVM: enable Intel SMAP for KVM

2014-03-26 Thread Feng Wu
Supervisor Mode Access Prevention (SMAP) is a new security feature disclosed by Intel, please refer to the following document: http://software.intel.com/sites/default/files/319433-014.pdf Every access to a linear address is either a supervisor-mode access or a user-mode access. All accesses pe

[PATCH 1/4] KVM: expose SMAP feature to guest

2014-03-26 Thread Feng Wu
This patch exposes SMAP feature to guest Signed-off-by: Feng Wu --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index c697625..deb5f9b 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -303,7 +

Re: Massive read only kvm guests when backing file was missing

2014-03-26 Thread Michael S. Tsirkin
On Wed, Mar 26, 2014 at 11:08:03PM -0300, Alejandro Comisario wrote: > Hi List! > Hope some one can help me, we had a big issue in our cloud the other > day, a couple of our openstack regions ( +2000 kvm guests with qcow2 ) > went read only filesystem from the guest side because the backing > files