Re: [PATCH v8 1/2] x86/kexec: add a new atomic notifier list for kdump

2012-11-26 Thread Gleb Natapov
On Mon, Nov 26, 2012 at 09:08:54AM -0600, Eric W. Biederman wrote: > Zhang Yanfei writes: > > > This patch adds an atomic notifier list named crash_notifier_list. > > Currently, when loading kvm-intel module, a notifier will be registered > > in the list to enable vmcss loaded on all cpus to be V

Re: [PATCH v8 1/2] x86/kexec: add a new atomic notifier list for kdump

2012-11-26 Thread Gleb Natapov
On Mon, Nov 26, 2012 at 11:43:10AM -0600, Eric W. Biederman wrote: > Gleb Natapov writes: > > > On Mon, Nov 26, 2012 at 09:08:54AM -0600, Eric W. Biederman wrote: > >> Zhang Yanfei writes: > >> > >> > This patch adds an atomic notifier list named c

Re: [Qemu-devel] [PATCH 0/4] AER-KVM: Error containment of PCI pass-thru devices assigned to KVM guests

2012-11-26 Thread Gleb Natapov
On Mon, Nov 26, 2012 at 09:46:12PM -0200, Marcelo Tosatti wrote: > On Tue, Nov 20, 2012 at 02:09:46PM +, Pandarathil, Vijaymohan R wrote: > > > > > > > -Original Message- > > > From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > > > Sent: Tuesday, November 20, 2012 5:41 AM > > > To: P

Re: [PATCH v9 1/2] x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary

2012-11-27 Thread Gleb Natapov
Eric, can you ACK it? On Tue, Nov 27, 2012 at 11:26:02AM +0800, Zhang Yanfei wrote: > This patch provides a way to VMCLEAR VMCSs related to guests > on all cpus before executing the VMXOFF when doing kdump. This > is used to ensure the VMCSs in the vmcore updated and > non-corrupted. > > Signed-o

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 01:15:25PM +0800, Li Zhong wrote: > I noticed some warnings complaining about dynticks_nesting value, like > > [ 267.545032] [ cut here ] > [ 267.545032] WARNING: at kernel/rcutree.c:382 rcu_eqs_enter+0xab/0xc0() > [ 267.545032] Hardware name: Bo

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 03:38:14PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Li Zhong : > > I noticed some warnings complaining about dynticks_nesting value, like > > > > [ 267.545032] [ cut here ] > > [ 267.545032] WARNING: at kernel/rcutree.c:382 rcu_eqs_enter+0xab/

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Gleb Natapov : > > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an exception. > > Ok. > There seem to be a bug in kvm_async_pf_task_wait(). Using > idle_cpu(cpu) to find out if the cur

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 05:51:12PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Gleb Natapov : > > On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote: > >> 2012/11/27 Gleb Natapov : > >> > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an excep

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 06:30:32PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Gleb Natapov : > > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c > > index 4180a87..636800d 100644 > > --- a/arch/x86/kernel/kvm.c > > +++ b/arch/x86/kernel/kvm.c &

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 07:12:40PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Gleb Natapov : > > On Tue, Nov 27, 2012 at 06:30:32PM +0100, Frederic Weisbecker wrote: > >> 2012/11/27 Gleb Natapov : > >> > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: > > So I still want to remove it. And later if it shows that we really needs > > rcu somewhere in this code path, maybe we could use RCU_NONIDLE() to > > protect it. ( The suspicious RCU usage reported in commit > > c5e015d4949aa6

Re: [PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 11:15:13AM +0800, Xiao Guangrong wrote: > On 11/28/2012 07:32 AM, Marcelo Tosatti wrote: > > On Tue, Nov 27, 2012 at 11:13:11AM +0800, Xiao Guangrong wrote: > +static bool reexecute_instruction(struct kvm_vcpu *vcpu, unsigned long > cr2) > { > -

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Gleb Natapov
On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: > On 11/27/2012 06:41 AM, Marcelo Tosatti wrote: > > >> > >> - return false; > >> +again: > >> + page_fault_count = ACCESS_ONCE(vcpu->kvm->arch.page_fault_count); > >> + > >> + /* > >> + * if emulation was due to access to shadow

Re: [RFC][PATCH 2/2] fix kvm's use of __pa() on percpu areas

2012-11-28 Thread Gleb Natapov
On Thu, Nov 29, 2012 at 12:53:56AM +, Dave Hansen wrote: > > In short, it is illegal to call __pa() on an address holding > a percpu variable. The times when this actually matters are > pretty obscure (certain 32-bit NUMA systems), but it _does_ > happen. It is important to keep KVM guests w

Re: [RFC][PATCH 2/2] fix kvm's use of __pa() on percpu areas

2012-11-29 Thread Gleb Natapov
On Thu, Nov 29, 2012 at 09:47:30AM +0200, Gleb Natapov wrote: > On Thu, Nov 29, 2012 at 12:53:56AM +, Dave Hansen wrote: > > > > In short, it is illegal to call __pa() on an address holding > > a percpu variable. The times when this actually matters are > > pre

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 03:25:07PM +0100, Frederic Weisbecker wrote: > 2012/11/28 Gleb Natapov : > > On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: > >> Yes but if rcu_irq_*() calls are fine to be called there, and I > >> believe they are because

Re: [PATCH V3 RFC 2/2] kvm: Handle yield_to failure return code for potential undercommit case

2012-11-29 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 10:40:56AM +0530, Raghavendra K T wrote: > On 11/28/2012 06:42 AM, Marcelo Tosatti wrote: > > > >Don't understand the reasoning behind why 3 is a good choice. > > Here is where I came from. (explaining from scratch for > completeness, forgive me :)) > In moderate overcommit

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Gleb Natapov
On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: > 2012/11/29 Li Zhong : > > On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: > >> > With rcu_user_exit() at the beginning, now rcu_irq_enter() only protects > >> > the cpu idle eqs, but it's not good to call rcu_irq_e

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-30 Thread Gleb Natapov
On Fri, Nov 30, 2012 at 04:36:46PM +0800, Li Zhong wrote: > On Thu, 2012-11-29 at 19:25 +0200, Gleb Natapov wrote: > > On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: > > > 2012/11/29 Li Zhong : > > > > On Wed, 2012-11-28 at 13:55 +0

Re: [RFC PATCH v3] Add rcu user eqs exception hooks for async page fault

2012-11-30 Thread Gleb Natapov
On Fri, Nov 30, 2012 at 05:18:41PM +0800, Li Zhong wrote: > This patch adds user eqs exception hooks for async page fault page not > present code path, to exit the user eqs and re-enter it as necessary. > > Async page fault is different from other exceptions that it may be > triggered from idle p

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

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: > On 03/17/2013 11:02 PM, Gleb Natapov wrote: > > On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: > >> This patch tries to introduce a very simple and scale way to invalid all > >> mmio s

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

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: > On 03/18/2013 05:13 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: > >> On 03/17/2013 11:02 PM, Gleb Natapov wrote: > >>> On Fri, Mar 15, 2013 at 11:29:53

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: > On 03/18/2013 07:19 PM, Paolo Bonzini wrote: > > Il 15/03/2013 16:29, Xiao Guangrong ha scritto: > >> +/* > >> + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of > >> + * generation, the bits of bits 52 ~ bit 61 are used as >

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

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: > On 03/18/2013 08:46 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: > >> On 03/18/2013 05:13 PM, Gleb Natapov wrote: > >>> On Mon, Mar 18, 2013 at 04:08:50

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

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 09:25:10PM +0800, Xiao Guangrong wrote: > On 03/18/2013 09:19 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: > >> On 03/18/2013 08:46 PM, Gleb Natapov wrote: > >>> On Mon, Mar 18, 2013 at 08:29:29

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] x86: correctly initialize the CS base on reset

2013-03-19 Thread Gleb Natapov
d-off-by: Paolo Bonzini Reviewed-by: Gleb Natapov > --- > arch/x86/kvm/svm.c | 8 +--- > arch/x86/kvm/vmx.c | 1 + > 2 files changed, 2 insertions(+), 7 deletions(-) > > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 7219a40..7a46c1f 100644 > --- a/arch/x

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

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 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 >

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

2013-03-20 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 09:22:33PM +0100, Paolo Bonzini wrote: > 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 u

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-21 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 06:58:41PM -0500, Scott Wood wrote: > On 03/14/2013 07:13:46 PM, Kevin Hilman wrote: > >The new context tracking subsystem unconditionally includes kvm_host.h > >headers for the guest enter/exit macros. This causes a compile > >failure when KVM is not enabled. > > > >Fix by

Re: [PATCH v2 4/7] KVM: MMU: delete shadow page from hash list in kvm_mmu_prepare_zap_page

2013-03-21 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 04:30:24PM +0800, Xiao Guangrong wrote: > Move deletion shadow page from the hash list from kvm_mmu_commit_zap_page to > kvm_mmu_prepare_zap_page, we that we can free the shadow page out of mmu-lock. > > Also, delete the invalid shadow page from the hash list since this pag

Re: [PATCH v3 0/3] AER-KVM: Error containment of VFIO devices assigned to KVM guests

2013-02-03 Thread Gleb Natapov
Please use "git send-email --thread --no-chain-reply-to" when sending patch series. On Sun, Feb 03, 2013 at 02:10:08PM +, Pandarathil, Vijaymohan R wrote: > > Add support for error containment when a VFIO device assigned to a KVM > guest encounters an error. This is for PCIe devices/drivers t

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Gleb Natapov
On Sun, Feb 03, 2013 at 04:36:11PM +, Blue Swirl wrote: > On Sun, Feb 3, 2013 at 2:10 PM, Pandarathil, Vijaymohan R > wrote: > > - Create eventfd per vfio device assigned to a guest and register an > > event handler > > > > - This fd is passed to the vfio_pci driver t

Re: [PATCH v3] KVM: MMU: lazily drop large spte

2013-02-05 Thread Gleb Natapov
ccess can > be avoid > > The idea is from Avi: > | As I mentioned before, write-protecting a large spte is a good idea, > | since it moves some work from protect-time to fault-time, so it reduces > | jitter. This removes the need for the return value. > > Signed-off-by:

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Gleb Natapov
On Tue, Feb 05, 2013 at 09:05:19AM +, Pandarathil, Vijaymohan R wrote: > > > > -Original Message- > > From: Gleb Natapov [mailto:g...@redhat.com] > > Sent: Tuesday, February 05, 2013 12:05 AM > > To: Blue Swirl > > Cc: Pandarathil, Vijaymohan R; A

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Gleb Natapov
On Tue, Feb 05, 2013 at 10:59:41AM +, Pandarathil, Vijaymohan R wrote: > > > > -Original Message- > > From: Gleb Natapov [mailto:g...@redhat.com] > > Sent: Tuesday, February 05, 2013 1:21 AM > > To: Pandarathil, Vijaymohan R > > Cc: Blue Swirl; A

Re: [PATCH v3 0/3] KVM: MMU: simple cleanups

2013-02-05 Thread Gleb Natapov
st split them from the previous patchset for good review. > > Thanks! Reviewed-by: Gleb Natapov -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Gleb Natapov
On Tue, Feb 05, 2013 at 12:05:11PM +, Pandarathil, Vijaymohan R wrote: > > > > -Original Message- > > From: linux-pci-ow...@vger.kernel.org [mailto:linux-pci- > > ow...@vger.kernel.org] On Behalf Of Gleb Natapov > > Sent: Tuesday, February 05, 20

Re: [PATCH v3 0/5] KVM: MMU: unify and cleanup the code of walking pte list

2013-02-05 Thread Gleb Natapov
emove the remained "goto restart" in > kvm_set_pte_rmapp > - improve the changelog > Reviewed-by: Gleb Natapov -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Gleb Natapov
On Tue, Feb 05, 2013 at 06:37:35AM -0700, Alex Williamson wrote: > On Tue, 2013-02-05 at 12:05 +, Pandarathil, Vijaymohan R wrote: > > > > > -Original Message- > > > From: linux-pci-ow...@vger.kernel.org [mailto:linux-pci- > > > ow...@vger.k

Re: [PATCH linux-next] x86/kvm: Fix compile warning in kvm_register_steal_time()

2013-02-11 Thread Gleb Natapov
On Tue, Feb 05, 2013 at 07:57:22PM -0700, Shuah Khan wrote: > Fix the following compile warning in kvm_register_steal_time(): > CC arch/x86/kernel/kvm.o > arch/x86/kernel/kvm.c: In function ‘kvm_register_steal_time’: > arch/x86/kernel/kvm.c:302:3: warning: format ‘%lx’ expects argument of ty

Re: [PATCH linux-next] x86/kvm: Fix compile warning in kvm_register_steal_time()

2013-02-11 Thread Gleb Natapov
On Mon, Feb 11, 2013 at 11:04:39AM +0100, Ingo Molnar wrote: > > * Gleb Natapov wrote: > > > On Tue, Feb 05, 2013 at 07:57:22PM -0700, Shuah Khan wrote: > > > Fix the following compile warning in kvm_register_steal_time(): > > > CC arch/x86/kernel/kvm.

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-04-02 Thread Gleb Natapov
On Mon, Mar 25, 2013 at 02:14:20PM -0700, Kevin Hilman wrote: > Gleb Natapov writes: > > > On Sun, Mar 24, 2013 at 02:44:26PM +0100, Frederic Weisbecker wrote: > >> 2013/3/21 Gleb Natapov : > >> > Isn't is simpler for kernel/context_tracking.c to define emp

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > > > With KVM, MMIO is much slower than PIO, due to the need to > > do page walk and emulation. But with EPT, it does not have to be: we > > know the address from the VMCS so if

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:09:53PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 13:04, Michael S. Tsirkin wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> > >>> With KVM, MMIO is much slower than

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:22:09PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:08, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> &g

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:08, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> &g

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:38, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:08, Gleb Natapov wrote: > >> >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:45, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:38, Gleb Natapov wrote: > >> >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 03:06:42PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:56, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:45, Gleb Natapov wrote: > >> >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 05:36:40PM +0200, Alexander Graf wrote: > > > > #define GOAL (1ull << 30) > > > >do { > >iterations *= 2; > >t1 = rdtsc(); > > > >for (i = 0; i < iterations; ++i) > >func(); >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 06:36:30PM +0300, Michael S. Tsirkin wrote: > > processor : 0 > > vendor_id : AuthenticAMD > > cpu family : 16 > > model : 8 > > model name : Six-Core AMD Opteron(tm) Processor 8435 > > stepping: 0 > > cpu MHz : 800.000 > > cache size : 5

Re: [PATCH 0/2] kvm: IOMMU read-only mapping support

2013-01-28 Thread Gleb Natapov
On Tue, Jan 29, 2013 at 11:06:43AM +0800, Xiao Guangrong wrote: > On 01/28/2013 06:59 PM, Gleb Natapov wrote: > > On Fri, Jan 25, 2013 at 11:28:40AM +0800, Xiao Guangrong wrote: > >> On 01/25/2013 09:17 AM, Takuya Yoshikawa wrote: > >>> On Thu, 24 Jan 2013 15:03:

Re: [PATCH 0/11] ksm: NUMA trees and page migration

2013-01-29 Thread Gleb Natapov
On Mon, Jan 28, 2013 at 05:07:15PM -0800, Hugh Dickins wrote: > On Mon, 28 Jan 2013, Andrew Morton wrote: > > On Fri, 25 Jan 2013 17:53:10 -0800 (PST) > > Hugh Dickins wrote: > > > > > Here's a KSM series > > > > Sanity check: do you have a feeling for how useful KSM is? > > Performance/space i

Re: [PATCH v2 06/12] KVM: MMU: introduce a static table to map guest access to spte access

2013-01-29 Thread Gleb Natapov
On Mon, Jan 28, 2013 at 11:07:58PM -0200, Marcelo Tosatti wrote: > On Mon, Jan 28, 2013 at 10:07:15PM -0200, Marcelo Tosatti wrote: > > On Fri, Jan 25, 2013 at 10:46:31AM +0800, Xiao Guangrong wrote: > > > On 01/25/2013 08:15 AM, Marcelo Tosatti wrote: > > > > On Wed, Jan 23, 2013 at 06:07:20PM +08

Re: [PATCH V3 RESEND RFC 0/2] kvm: Improving undercommit scenarios

2013-01-29 Thread Gleb Natapov
On Tue, Jan 22, 2013 at 01:08:54PM +0530, Raghavendra K T wrote: > In some special scenarios like #vcpu <= #pcpu, PLE handler may > prove very costly, because there is no need to iterate over vcpus > and do unsuccessful yield_to burning CPU. > > The first patch optimizes all the yield_to by bail

Re: [PATCH 1/3] x86: KVM: Fix warnings by returning bool

2013-01-29 Thread Gleb Natapov
On Sun, Jan 27, 2013 at 05:40:00PM +0100, Emil Goode wrote: > The function pointer x2apic_available in struct hypervisor_x86 is > supposed to point to functions that return bool. This patch changes > the return type of the kvm_para_available function to bool. > > Sparse warnings: > > arch/x86/ker

Re: [PATCH] x86, x2apic: Only WARN on broken BIOSes inside a virtual guest

2013-01-31 Thread Gleb Natapov
On Thu, Jan 31, 2013 at 11:40:35AM -0500, Don Zickus wrote: > In commit "41750d3 x86, x2apic: Enable the bios request for x2apic optout" > it was explained how OEMs are trying to opt out of using x2apics. > > That commit moved code around and screamed with a WARN if the BIOS > opted out of x2apic

Re: [PATCH] x86, x2apic: Only WARN on broken BIOSes inside a virtual guest

2013-01-31 Thread Gleb Natapov
On Thu, Jan 31, 2013 at 02:34:27PM -0500, Don Zickus wrote: > On Thu, Jan 31, 2013 at 08:52:00PM +0200, Gleb Natapov wrote: > > > http://www.invisiblethingslab.com/resources/2011/Software%20Attacks%20on%20Intel%20VT-d.pdf > > > > > > After talking with folks, t

Re: [PATCH v2 05/12] KVM: MMU: introduce vcpu_adjust_access

2013-01-24 Thread Gleb Natapov
On Wed, Jan 23, 2013 at 06:06:36PM +0800, Xiao Guangrong wrote: > Introduce it to split the code of adjusting pte_access from the large > function of set_spte > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c | 63 > +--- > 1 files ch

Re: [PATCH v2 01/12] KVM: MMU: lazily drop large spte

2013-01-27 Thread Gleb Natapov
On Wed, Jan 23, 2013 at 06:04:17PM +0800, Xiao Guangrong wrote: > Do not drop large spte until it can be insteaded by small pages so that > the guest can happliy read memory through it > > The idea is from Avi: > | As I mentioned before, write-protecting a large spte is a good idea, > | since it m

Re: [PATCH v2 10/12] KVM: MMU: unify the code of walking pte list

2013-01-27 Thread Gleb Natapov
On Wed, Jan 23, 2013 at 06:09:34PM +0800, Xiao Guangrong wrote: > Walking parent spte and walking ramp have same logic, this patch introduces > for_each_spte_in_pte_list to integrate their code > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c | 199 > ++---

Re: [PATCH 02/18] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v5

2013-01-27 Thread Gleb Natapov
dress review feedback > v3: Ignore the bits when no CPUID. No #GP. Force raw events with TSX bits. > v4: Use reserved bits for #GP > v5: Remove obsolete argument > Signed-off-by: Andi Kleen Acked-by: Gleb Natapov I suppose it will go through tip tree with all the other patches this o

Re: [PATCH 0/2] kvm: IOMMU read-only mapping support

2013-01-27 Thread Gleb Natapov
On Thu, Jan 24, 2013 at 03:03:57PM -0700, Alex Williamson wrote: > A couple patches to make KVM IOMMU support honor read-only mappings. > This causes an un-map, re-map when the read-only flag changes and > makes use of it when setting IOMMU attributes. Thanks, > > Alex > Applied, thanks. > ---

Re: [PATCH 0/2] kvm: IOMMU read-only mapping support

2013-01-28 Thread Gleb Natapov
On Fri, Jan 25, 2013 at 11:28:40AM +0800, Xiao Guangrong wrote: > On 01/25/2013 09:17 AM, Takuya Yoshikawa wrote: > > On Thu, 24 Jan 2013 15:03:57 -0700 > > Alex Williamson wrote: > > > >> A couple patches to make KVM IOMMU support honor read-only mappings. > >> This causes an un-map, re-map when

Re: [PATCH 0/5] [v3] fix illegal use of __pa() in KVM code

2013-02-25 Thread Gleb Natapov
On Sun, Feb 24, 2013 at 04:28:58PM -0500, Peter Hurley wrote: > > On Tue, 2013-01-22 at 13:24 -0800, Dave Hansen wrote: > > This series fixes a hard-to-debug early boot hang on 32-bit > > NUMA systems. It adds coverage to the debugging code, > > adds some helpers, and eventually fixes the origina

[GIT PULL] KVM ARM compilation fixes for the 3.9 merge window

2013-02-25 Thread Gleb Natapov
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fixes. They fix ARM KVM compilation breakage due to changes from kvm.git. Marc Zyngier (3): ARM: KVM: fix kvm_arch_{prepare,commit}_memory_region ARM: KVM: Rename KVM_MEMO

[GIT PULL] KVM fixe for 3.9

2013-02-28 Thread Gleb Natapov
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fix. Peter Hurley (1): x86/kvm: Fix pvclock vsyscall fixmap arch/x86/kernel/pvclock.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Gleb

Re: [Bisected][-next-20130204+] [x86/kvm] udevd:[97]: segfault at ffffffffff5fd020 ip 00007fff069e277f sp 00007fff068c9ef8 error d

2013-02-19 Thread Gleb Natapov
On Mon, Feb 18, 2013 at 08:12:21PM -0500, Peter Hurley wrote: > On Mon, 2013-02-18 at 19:59 -0300, Marcelo Tosatti wrote: > > On Wed, Feb 13, 2013 at 06:57:09AM -0500, Peter Hurley wrote: > > > On Wed, 2013-02-13 at 12:51 +0200, Gleb Natapov wrote: > > > > On Tue, Fe

Re: general protection fault in do_msgrcv [3.8]

2013-02-20 Thread Gleb Natapov
On Wed, Feb 20, 2013 at 12:23:22PM +0400, Stanislav Kinsbursky wrote: > 19.02.2013 22:04, Dave Jones пишет: > >general protection fault: [#1] PREEMPT SMP DEBUG_PAGEALLOC > >Modules linked in: can af_rxrpc binfmt_misc scsi_transport_iscsi ax25 > >ipt_ULOG decnet nfc appletalk x25 rds ipx p8023

Re: [PATCH] x86: kvm: reset the bootstrap processor when it gets an INIT

2013-03-12 Thread Gleb Natapov
On Tue, Mar 12, 2013 at 10:25:35AM +0100, Jan Kiszka wrote: > On 2013-03-11 20:30, Gleb Natapov wrote: > > On Mon, Mar 11, 2013 at 08:01:30PM +0100, Jan Kiszka wrote: > >> On 2013-03-11 19:51, Gleb Natapov wrote: > >>>>> On Intel: > >>>>>

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

2013-03-17 Thread Gleb Natapov
On Fri, Mar 15, 2013 at 11:29:53PM +0800, 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 pages and hold mmu-lock > > KVM maintains a global mmio invalid generation-number which is stored in > kvm->arch.mmi

Re: [PATCH RFC 1/1] kvm: Use vcpu_id as pivot instead of last boosted vcpu in PLE handler

2012-09-02 Thread Gleb Natapov
On Thu, Aug 30, 2012 at 12:51:01AM +0530, Raghavendra K T wrote: > The idea of starting from next vcpu (source of yield_to + 1) seem to work > well for overcomitted guest rather than using last boosted vcpu. We can also > remove per VM variable with this approach. > > Iteration for eligible c

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-10-04 Thread Gleb Natapov
On Wed, Oct 03, 2012 at 04:56:57PM +0200, Avi Kivity wrote: > On 10/03/2012 04:17 PM, Raghavendra K T wrote: > > * Avi Kivity [2012-09-30 13:13:09]: > > > >> On 09/30/2012 01:07 PM, Gleb Natapov wrote: > >> > On Sun, Sep 30, 2012 at 10:18:17AM +0200, Avi Kivit

Re: [06/31] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation

2012-10-04 Thread Gleb Natapov
On Tue, Oct 02, 2012 at 11:48:26PM -, Andi Kleen wrote: > From: Andi Kleen > > This is not arch perfmon, but older CPUs will just ignore it. This makes > it possible to do at least some TSX measurements from a KVM guest > > Cc: a...@redhat.com > Signed-off-by: Andi Kleen > > --- > arch/x86

Re: [PATCH 06/34] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v2

2012-10-23 Thread Gleb Natapov
On Tue, Oct 23, 2012 at 02:36:05PM +0200, Peter Zijlstra wrote: > On Thu, 2012-10-18 at 16:19 -0700, Andi Kleen wrote: > > From: Andi Kleen > > > > This is not arch perfmon, but older CPUs will just ignore it. This makes > > it possible to do at least some TSX measurements from a KVM guest > > P

Re: [06/34] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v2

2012-10-23 Thread Gleb Natapov
On Thu, Oct 18, 2012 at 11:19:14PM -, Andi Kleen wrote: > static inline u8 fixed_en_pmi(u64 ctrl, int idx) > @@ -400,7 +407,7 @@ int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, u32 index, u64 > data) > } else if ((pmc = get_gp_pmc(pmu, index, MSR_P6_EVNTSEL0))) { >

Re: [06/34] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v2

2012-10-24 Thread Gleb Natapov
On Tue, Oct 23, 2012 at 03:20:39PM +0200, Andi Kleen wrote: > On Tue, Oct 23, 2012 at 03:05:09PM +0200, Gleb Natapov wrote: > > On Thu, Oct 18, 2012 at 11:19:14PM -, Andi Kleen wrote: > > > static inline u8 fixed_en_pmi(u64 ctrl, int idx) > > > @@ -400,7 +407,7 @@

Re: [PATCH 05/32] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v3

2012-10-31 Thread Gleb Natapov
On Tue, Oct 30, 2012 at 05:33:56PM -0700, Andi Kleen wrote: > From: Andi Kleen > > This is not arch perfmon, but older CPUs will just ignore it. This makes > it possible to do at least some TSX measurements from a KVM guest > You are ignoring my reviews. > Cc: a...@redhat.com > Cc: g...@redhat.

Re: [PATCH 05/32] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v3

2012-10-31 Thread Gleb Natapov
On Wed, Oct 31, 2012 at 11:32:48AM +0100, Andi Kleen wrote: > On Wed, Oct 31, 2012 at 12:27:01PM +0200, Gleb Natapov wrote: > > On Tue, Oct 30, 2012 at 05:33:56PM -0700, Andi Kleen wrote: > > > From: Andi Kleen > > > > > > This is not arch perfmon, but older

Re: [GIT PULL] Linux KVM tool for v3.7-rc0

2012-10-31 Thread Gleb Natapov
On Tue, Oct 23, 2012 at 10:20:34AM +0800, Asias He wrote: > On Mon, Oct 22, 2012 at 6:16 PM, Gleb Natapov wrote: > > On Mon, Oct 22, 2012 at 11:24:19AM +0200, Avi Kivity wrote: > >> On 10/21/2012 05:39 PM, Pekka Enberg wrote: > >> > > >> > On Sun, Oct 21

Re: [PATCH] x86, add hypervisor name to dump_stack() [v4]

2012-11-01 Thread Gleb Natapov
st, > the in-kernel hypervisors now have a single registration point > and set x86_hyper. We can use this to output additional debug > information during a panic/oops/stack trace. > > Signed-off-by: Prarit Bhargava > Cc: Avi Kivity > Cc: Gleb Natapov > Cc: Alex William

Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

2012-07-25 Thread Gleb Natapov
On Wed, Jul 25, 2012 at 10:35:46PM +0200, Peter Zijlstra wrote: > On Tue, 2012-07-24 at 18:15 +0200, Robert Richter wrote: > > David, > > > > On 24.07.12 08:20:19, David Ahern wrote: > > > On 7/23/12 12:13 PM, Arnaldo Carvalho de Melo wrote: > > > > Em Fri, Jul 20, 2012 at 05:25:53PM -0600, David

Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

2012-07-26 Thread Gleb Natapov
On Thu, Jul 26, 2012 at 10:07:37AM +0200, Peter Zijlstra wrote: > On Thu, 2012-07-26 at 08:50 +0300, Gleb Natapov wrote: > > On Wed, Jul 25, 2012 at 10:35:46PM +0200, Peter Zijlstra wrote: > > > On Tue, 2012-07-24 at 18:15 +0200, Robert Richter wrote: > > > > David, &

Re: [PATCH v3 1/7] KVM: MMU: fix release noslot pfn

2012-09-23 Thread Gleb Natapov
On Fri, Sep 21, 2012 at 02:57:19PM +0800, Xiao Guangrong wrote: > We can not directly call kvm_release_pfn_clean to release the pfn > since we can meet noslot pfn which is used to cache mmio info into > spte > Wouldn't it be better to move the check into kvm_release_pfn_clean()? > Signed-off-by:

Re: [PATCH v3 1/7] KVM: MMU: fix release noslot pfn

2012-09-24 Thread Gleb Natapov
On Mon, Sep 24, 2012 at 12:59:32PM +0800, Xiao Guangrong wrote: > On 09/23/2012 05:13 PM, Gleb Natapov wrote: > > On Fri, Sep 21, 2012 at 02:57:19PM +0800, Xiao Guangrong wrote: > >> We can not directly call kvm_release_pfn_clean to release the pfn > >> since we can me

Re: [PATCH v3 1/7] KVM: MMU: fix release noslot pfn

2012-09-24 Thread Gleb Natapov
On Mon, Sep 24, 2012 at 07:49:37PM +0800, Xiao Guangrong wrote: > On 09/24/2012 07:24 PM, Gleb Natapov wrote: > > On Mon, Sep 24, 2012 at 12:59:32PM +0800, Xiao Guangrong wrote: > >> On 09/23/2012 05:13 PM, Gleb Natapov wrote: > >>> On Fri, Sep 21, 2012 at 02:57:19

Re: [PATCH 05/33] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v3

2012-10-30 Thread Gleb Natapov
On Fri, Oct 26, 2012 at 01:29:47PM -0700, Andi Kleen wrote: > From: Andi Kleen > > This is not arch perfmon, but older CPUs will just ignore it. This makes > it possible to do at least some TSX measurements from a KVM guest > > Cc: a...@redhat.com > Cc: g...@redhat.com > v2: Various fixes to add

Re: [PATCH V12 3/5] kvm : Fold pv_unhalt flag into GET_MP_STATE ioctl to aid migration

2013-08-25 Thread Gleb Natapov
On Wed, Aug 07, 2013 at 12:40:36AM +0530, Raghavendra K T wrote: > On 08/07/2013 12:02 AM, Eric Northup wrote: > > > >If this is about migration correctness, could it get folded into the > >previous patch 2/5, so that there's not a broken commit which could > >hurt bisection? > > Yes. It could be.

Re: [PATCH V13 0/4] Paravirtualized ticket spinlocks for KVM host

2013-08-26 Thread Gleb Natapov
On Mon, Aug 26, 2013 at 02:18:32PM +0530, Raghavendra K T wrote: > > This series forms the kvm host part of paravirtual spinlock > based against kvm tree. > > Please refer to https://lkml.org/lkml/2013/8/9/265 for > kvm guest and Xen, x86 part merged to -tip spinlocks. > > Please note that:

Re: [PATCH 0/2] kvm: use anon_inode_getfd() with O_CLOEXEC flag

2013-08-26 Thread Gleb Natapov
On Sat, Aug 24, 2013 at 10:14:06PM +0200, Yann Droneaud wrote: > Hi, > > Following a patchset asking to change calls to get_unused_flag() [1] > to use O_CLOEXEC, Alex Williamson [2][3] decided to change VFIO > to use the flag. > > Since it's a related subsystem to KVM, using O_CLOEXEC for > file

Re: [PATCH v2] tile: support KVM for tilegx

2013-08-26 Thread Gleb Natapov
On Sun, Aug 25, 2013 at 09:26:47PM -0400, Chris Metcalf wrote: > On 8/25/2013 7:39 AM, Gleb Natapov wrote: > > On Mon, Aug 12, 2013 at 04:24:11PM -0400, Chris Metcalf wrote: > >> This change provides the initial framework support for KVM on tilegx. > >> Basic vir

Re: [PATCH 02/10] KVM: PPC: reserve a capability number for multitce support

2013-08-26 Thread Gleb Natapov
On Wed, Aug 14, 2013 at 10:51:14AM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2013-08-01 at 14:44 +1000, Alexey Kardashevskiy wrote: > > This is to reserve a capablity number for upcoming support > > of H_PUT_TCE_INDIRECT and H_STUFF_TCE pseries hypercalls > > which support mulptiple DMA map/un

Re: [PATCH 02/10] KVM: PPC: reserve a capability number for multitce support

2013-08-26 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 02:19:58PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-08-26 at 15:37 +0300, Gleb Natapov wrote: > > > Gleb, any chance you can put this (and the next one) into a tree to > > > "lock in" the numbers ? > > > > > Applie

Re: [PATCH 02/10] KVM: PPC: reserve a capability number for multitce support

2013-08-26 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 02:22:42PM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2013-08-27 at 14:19 +1000, Benjamin Herrenschmidt wrote: > > On Mon, 2013-08-26 at 15:37 +0300, Gleb Natapov wrote: > > > > Gleb, any chance you can put this (and the next one) into a tree to

Re: [PATCH v8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-27 Thread Gleb Natapov
On Thu, Aug 15, 2013 at 05:49:26PM +1000, Alexey Kardashevskiy wrote: > This is to reserve a capablity number for upcoming support > of VFIO-IOMMU DMA operations in real mode. > > The last ioctl in the group which KVM_CREATE_SPAPR_TCE_IOMMU is added to > is 0xac, the next two numbers are taken - 0

Re: [PATCH v8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 06:42:18PM +1000, Alexey Kardashevskiy wrote: > On 08/27/2013 05:56 PM, Gleb Natapov wrote: > > On Thu, Aug 15, 2013 at 05:49:26PM +1000, Alexey Kardashevskiy wrote: > >> This is to reserve a capablity number for upcoming support > >> of VFIO-I

Re: [PATCH v8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-27 Thread Gleb Natapov
On Wed, Aug 28, 2013 at 11:26:31AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2013-08-28 at 10:51 +1000, Alexey Kardashevskiy wrote: > > The ioctl I made up is basically a copy of KVM_CREATE_SPAPR_TCE which does > > the same thing for emulated devices and it is there for quite a while but > > i

  1   2   3   4   5   6   7   8   >