Re: [User Question] Repeated severe performance problems on guest

2013-04-19 Thread Martin Wawro
On 04/19/2013 07:59 AM, Stefan Hajnoczi wrote: Hi Stefan, BTW does the host CPU support Intel Extended Page Tables or AMD Nested Page Tables? grep 'npt\|ept' /proc/cpuinfo (I think the kvm_stat is saying EPT/NPT are not in use) Host CPU has EPT. That is virt-manager.py, exactly doing

Re: [PATCH 8/8 v3] KVM: PPC: e500: Add e6500 core to Kconfig description

2013-04-19 Thread tiejun.chen
On 04/11/2013 06:03 PM, Mihai Caraman wrote: Add e6500 core to Kconfig description. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- v3: - No change arch/powerpc/kvm/Kconfig |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/Kconfig

Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel

2013-04-19 Thread Borislav Petkov
On Thu, Apr 18, 2013 at 10:36:31AM -0300, Marcelo Tosatti wrote: IOW, something which says Enable KVM guest support should enable all the stuff needed for that. I get your point, but thats up to the person selecting the options. Ok. Or do you want to keep the current CONFIG_KVM_GUEST

vmwrite error: reg 401e value a0332340 (err 12)

2013-04-19 Thread Nikola Ciprich
Hi, on one of my boxed I'm getting (maybe) KVM related crashes.. I noticed this in dmesg: [ 50.199372] vmwrite error: reg 401e value a0332340 (err 12) [ 50.199575] Pid: 5179, comm: qemu-system-x86 Not tainted 3.0.60lb6.01 #1 [ 50.199802] Call Trace: [ 50.199950] [a031925c]

Re: KVM VM(windows xp) reseted when running geekbench for about 2 days

2013-04-19 Thread Gleb Natapov
On Fri, Apr 19, 2013 at 01:05:08AM +, Zhanghaoyu (A) wrote: On Thu, Apr 18, 2013 at 12:00:49PM +, Zhanghaoyu (A) wrote: I start 10 VMs(windows xp), then running geekbench tool on them, about 2 days, one of them was reset, I found the reset operation is done by int

Re: [PATCH] KVM/PPC: emulate ehpriv

2013-04-19 Thread Alexander Graf
On 19.04.2013, at 04:44, Tiejun Chen wrote: We can provide this emulation to simplify more extension later. Works for me, but this should really be part of a series that makes use of ehpriv. Alex Signed-off-by: Tiejun Chen tiejun.c...@windriver.com ---

[PATCH 04/17] KVM: Remove kvm_get_intr_delivery_bitmask

2013-04-19 Thread Alexander Graf
The prototype has been stale for a while, I can't spot any real function define behind it. Let's just remove it. Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_host.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH 00/17] KVM: PPC: In-kernel MPIC support with irqfd v3

2013-04-19 Thread Alexander Graf
Hi, This patch set contains a fully working implementation of the in-kernel MPIC from Scott with a few fixups and a new version of my irqfd generalization patch set. v1 - v2: - depend on CONFIG_ defines rather than __KVM defines - fix compile issues - fix the kvm_irqchip{,s} typo v2 -

[PATCH 15/17] KVM: PPC: Support irq routing and irqfd for in-kernel MPIC

2013-04-19 Thread Alexander Graf
Now that all the irq routing and irqfd pieces are generic, we can expose real irqchip support to all of KVM's internal helpers. This allows us to use irqfd with the in-kernel MPIC. Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - make mpic pointer type safe - add wmb before

[PATCH 17/17] KVM: PPC: MPIC: Restrict to e500 platforms

2013-04-19 Thread Alexander Graf
The code as is doesn't make any sense on non-e500 platforms. Restrict it there, so that people don't get wrong ideas on what would actually work. This patch should get reverted as soon as it's possible to either run e500 guests on non-e500 hosts or the MPIC emulation gains support for non-e500

[PATCH 13/17] kvm/ppc/mpic: in-kernel MPIC emulation

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Hook the MPIC code up to the KVM interfaces, add locking, etc. Signed-off-by: Scott Wood scottw...@freescale.com [agraf: add stub function for kvmppc_mpic_set_epr, non-booke, 64bit] Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - fix

[PATCH 12/17] kvm/ppc/mpic: adapt to kernel style and environment

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Remove braces that Linux style doesn't permit, remove space after '*' that Lindent added, keep error/debug strings contiguous, etc. Substitute type names, debug prints, etc. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf

[PATCH 14/17] kvm/ppc/mpic: add KVM_CAP_IRQ_MPIC

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Enabling this capability connects the vcpu to the designated in-kernel MPIC. Using explicit connections between vcpus and irqchips allows for flexibility, but the main benefit at the moment is that it simplifies the code -- KVM doesn't need vm-global

[PATCH 11/17] kvm/ppc/mpic: remove some obviously unneeded code

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Remove some parts of the code that are obviously QEMU or Raven specific before fixing style issues, to reduce the style issues that need to be fixed. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 10/17] kvm/ppc/mpic: import hw/openpic.c from QEMU

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is QEMU's hw/openpic.c from commit abd8d4a4d6dfea7ddea72f095f993e1de941614e (Update version for 1.4.0-rc0), run through Lindent with no other changes to ease merging future changes between Linux and QEMU. Remaining style issues (including those

[PATCH 16/17] KVM: PPC: MPIC: Add support for KVM_IRQ_LINE

2013-04-19 Thread Alexander Graf
Now that all pieces are in place for reusing generic irq infrastructure, we can copy x86's implementation of KVM_IRQ_LINE irq injection and simply reuse it for PPC, as it will work there just as well. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/uapi/asm/kvm.h |1 +

[PATCH 09/17] kvm: add device control API

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's any need to access device state, it is done through inflexible one-purpose-only

[PATCH 06/17] KVM: Extract generic irqchip logic into irqchip.c

2013-04-19 Thread Alexander Graf
The current irq_comm.c file contains pieces of code that are generic across different irqchip implementations, as well as code that is fully IOAPIC specific. Split the generic bits out into irqchip.c. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/Makefile |2 +-

[PATCH 08/17] KVM: Move irqfd resample cap handling to generic code

2013-04-19 Thread Alexander Graf
Now that we have most irqfd code completely platform agnostic, let's move irqfd's resample capability return to generic code as well. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/x86.c |1 - virt/kvm/kvm_main.c |3 +++ 2 files changed, 3 insertions(+), 1 deletions(-)

[PATCH 02/17] KVM: Introduce CONFIG_HAVE_KVM_IRQ_ROUTING

2013-04-19 Thread Alexander Graf
Quite a bit of code in KVM has been conditionalized on availability of IOAPIC emulation. However, most of it is generically applicable to platforms that don't have an IOPIC, but a different type of irq chip. Make code that only relies on IRQ routing, not an APIC itself, on

[PATCH 07/17] KVM: Move irq routing setup to irqchip.c

2013-04-19 Thread Alexander Graf
Setting up IRQ routes is nothing IOAPIC specific. Extract everything that really is generic code into irqchip.c and only leave the ioapic specific bits to irq_comm.c. Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_host.h |3 ++ virt/kvm/irq_comm.c | 76

[PATCH 01/17] KVM: Add KVM_IRQCHIP_NUM_PINS in addition to KVM_IOAPIC_NUM_PINS

2013-04-19 Thread Alexander Graf
The concept of routing interrupt lines to an irqchip is nothing that is IOAPIC specific. Every irqchip has a maximum number of pins that can be linked to irq lines. So let's add a new define that allows us to reuse generic code for non-IOAPIC platforms. Signed-off-by: Alexander Graf

[PATCH 03/17] KVM: Drop __KVM_HAVE_IOAPIC condition on irq routing

2013-04-19 Thread Alexander Graf
We have a capability enquire system that allows user space to ask kvm whether a feature is available. The point behind this system is that we can have different kernel configurations with different capabilities and user space can adjust accordingly. Because features can always be non existent,

[PATCH 05/17] KVM: Move irq routing to generic code

2013-04-19 Thread Alexander Graf
The IRQ routing set ioctl lives in the hacky device assignment code inside of KVM today. This is definitely the wrong place for it. Move it to the much more natural kvm_main.c. Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/assigned-dev.c | 30 --

Re: [PATCH 1/9] KVM: PPC: Book3S: Add infrastructure to implement kernel-side RTAS calls

2013-04-19 Thread Alexander Graf
On 05.04.2013, at 00:38, Paul Mackerras wrote: On Thu, Apr 04, 2013 at 11:49:55AM +0200, Alexander Graf wrote: On 04.04.2013, at 07:37, Paul Mackerras wrote: On Thu, Mar 21, 2013 at 09:52:16AM +0100, Alexander Graf wrote: +/* Platform specific hcalls, used by KVM */ +#define H_RTAS

RE: [PATCH] KVM/PPC: emulate ehpriv

2013-04-19 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Friday, April 19, 2013 5:44 PM To: Tiejun Chen Cc: kvm@vger.kernel.org mailing list; kvm-...@vger.kernel.org; Bhushan Bharat- R65777 Subject: Re: [PATCH] KVM/PPC: emulate ehpriv On 19.04.2013, at 04:44,

Re: [PATCH 15/17] KVM: PPC: Support irq routing and irqfd for in-kernel MPIC

2013-04-19 Thread Scott Wood
On 04/19/2013 09:06:26 AM, Alexander Graf wrote: diff --git a/Documentation/virtual/kvm/devices/mpic.txt b/Documentation/virtual/kvm/devices/mpic.txt index ce98e32..dadc1e0 100644 --- a/Documentation/virtual/kvm/devices/mpic.txt +++ b/Documentation/virtual/kvm/devices/mpic.txt @@ -35,3 +35,14

Re: [PATCH 8/8 v3] KVM: PPC: e500: Add e6500 core to Kconfig description

2013-04-19 Thread tiejun.chen
On 04/11/2013 06:03 PM, Mihai Caraman wrote: Add e6500 core to Kconfig description. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- v3: - No change arch/powerpc/kvm/Kconfig |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/Kconfig

Re: [PATCH] KVM/PPC: emulate ehpriv

2013-04-19 Thread Alexander Graf
On 19.04.2013, at 04:44, Tiejun Chen wrote: We can provide this emulation to simplify more extension later. Works for me, but this should really be part of a series that makes use of ehpriv. Alex Signed-off-by: Tiejun Chen tiejun.c...@windriver.com ---

[PATCH 00/17] KVM: PPC: In-kernel MPIC support with irqfd v3

2013-04-19 Thread Alexander Graf
Hi, This patch set contains a fully working implementation of the in-kernel MPIC from Scott with a few fixups and a new version of my irqfd generalization patch set. v1 - v2: - depend on CONFIG_ defines rather than __KVM defines - fix compile issues - fix the kvm_irqchip{,s} typo v2 -

[PATCH 15/17] KVM: PPC: Support irq routing and irqfd for in-kernel MPIC

2013-04-19 Thread Alexander Graf
Now that all the irq routing and irqfd pieces are generic, we can expose real irqchip support to all of KVM's internal helpers. This allows us to use irqfd with the in-kernel MPIC. Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - make mpic pointer type safe - add wmb before

[PATCH 17/17] KVM: PPC: MPIC: Restrict to e500 platforms

2013-04-19 Thread Alexander Graf
The code as is doesn't make any sense on non-e500 platforms. Restrict it there, so that people don't get wrong ideas on what would actually work. This patch should get reverted as soon as it's possible to either run e500 guests on non-e500 hosts or the MPIC emulation gains support for non-e500

[PATCH 13/17] kvm/ppc/mpic: in-kernel MPIC emulation

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Hook the MPIC code up to the KVM interfaces, add locking, etc. Signed-off-by: Scott Wood scottw...@freescale.com [agraf: add stub function for kvmppc_mpic_set_epr, non-booke, 64bit] Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - fix

[PATCH 14/17] kvm/ppc/mpic: add KVM_CAP_IRQ_MPIC

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Enabling this capability connects the vcpu to the designated in-kernel MPIC. Using explicit connections between vcpus and irqchips allows for flexibility, but the main benefit at the moment is that it simplifies the code -- KVM doesn't need vm-global

[PATCH 11/17] kvm/ppc/mpic: remove some obviously unneeded code

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Remove some parts of the code that are obviously QEMU or Raven specific before fixing style issues, to reduce the style issues that need to be fixed. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 12/17] kvm/ppc/mpic: adapt to kernel style and environment

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Remove braces that Linux style doesn't permit, remove space after '*' that Lindent added, keep error/debug strings contiguous, etc. Substitute type names, debug prints, etc. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf

[PATCH 10/17] kvm/ppc/mpic: import hw/openpic.c from QEMU

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is QEMU's hw/openpic.c from commit abd8d4a4d6dfea7ddea72f095f993e1de941614e (Update version for 1.4.0-rc0), run through Lindent with no other changes to ease merging future changes between Linux and QEMU. Remaining style issues (including those

[PATCH 16/17] KVM: PPC: MPIC: Add support for KVM_IRQ_LINE

2013-04-19 Thread Alexander Graf
Now that all pieces are in place for reusing generic irq infrastructure, we can copy x86's implementation of KVM_IRQ_LINE irq injection and simply reuse it for PPC, as it will work there just as well. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/uapi/asm/kvm.h |1 +

[PATCH 09/17] kvm: add device control API

2013-04-19 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's any need to access device state, it is done through inflexible one-purpose-only

[PATCH 06/17] KVM: Extract generic irqchip logic into irqchip.c

2013-04-19 Thread Alexander Graf
The current irq_comm.c file contains pieces of code that are generic across different irqchip implementations, as well as code that is fully IOAPIC specific. Split the generic bits out into irqchip.c. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/Makefile |2 +-

[PATCH 08/17] KVM: Move irqfd resample cap handling to generic code

2013-04-19 Thread Alexander Graf
Now that we have most irqfd code completely platform agnostic, let's move irqfd's resample capability return to generic code as well. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/x86.c |1 - virt/kvm/kvm_main.c |3 +++ 2 files changed, 3 insertions(+), 1 deletions(-)

[PATCH 02/17] KVM: Introduce CONFIG_HAVE_KVM_IRQ_ROUTING

2013-04-19 Thread Alexander Graf
Quite a bit of code in KVM has been conditionalized on availability of IOAPIC emulation. However, most of it is generically applicable to platforms that don't have an IOPIC, but a different type of irq chip. Make code that only relies on IRQ routing, not an APIC itself, on

[PATCH 05/17] KVM: Move irq routing to generic code

2013-04-19 Thread Alexander Graf
The IRQ routing set ioctl lives in the hacky device assignment code inside of KVM today. This is definitely the wrong place for it. Move it to the much more natural kvm_main.c. Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/assigned-dev.c | 30 --

[PATCH 07/17] KVM: Move irq routing setup to irqchip.c

2013-04-19 Thread Alexander Graf
Setting up IRQ routes is nothing IOAPIC specific. Extract everything that really is generic code into irqchip.c and only leave the ioapic specific bits to irq_comm.c. Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_host.h |3 ++ virt/kvm/irq_comm.c | 76

[PATCH 01/17] KVM: Add KVM_IRQCHIP_NUM_PINS in addition to KVM_IOAPIC_NUM_PINS

2013-04-19 Thread Alexander Graf
The concept of routing interrupt lines to an irqchip is nothing that is IOAPIC specific. Every irqchip has a maximum number of pins that can be linked to irq lines. So let's add a new define that allows us to reuse generic code for non-IOAPIC platforms. Signed-off-by: Alexander Graf

[PATCH 03/17] KVM: Drop __KVM_HAVE_IOAPIC condition on irq routing

2013-04-19 Thread Alexander Graf
We have a capability enquire system that allows user space to ask kvm whether a feature is available. The point behind this system is that we can have different kernel configurations with different capabilities and user space can adjust accordingly. Because features can always be non existent,

RE: [PATCH] KVM/PPC: emulate ehpriv

2013-04-19 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Friday, April 19, 2013 5:44 PM To: Tiejun Chen Cc: k...@vger.kernel.org mailing list; kvm-ppc@vger.kernel.org; Bhushan Bharat- R65777 Subject: Re: [PATCH] KVM/PPC: emulate ehpriv On 19.04.2013, at 04:44,

Re: [PATCH 15/17] KVM: PPC: Support irq routing and irqfd for in-kernel MPIC

2013-04-19 Thread Scott Wood
On 04/19/2013 09:06:26 AM, Alexander Graf wrote: diff --git a/Documentation/virtual/kvm/devices/mpic.txt b/Documentation/virtual/kvm/devices/mpic.txt index ce98e32..dadc1e0 100644 --- a/Documentation/virtual/kvm/devices/mpic.txt +++ b/Documentation/virtual/kvm/devices/mpic.txt @@ -35,3 +35,14

Re: [PATCH 16/17] KVM: PPC: MPIC: Add support for KVM_IRQ_LINE

2013-04-19 Thread Scott Wood
On 04/19/2013 09:06:27 AM, Alexander Graf wrote: Now that all pieces are in place for reusing generic irq infrastructure, we can copy x86's implementation of KVM_IRQ_LINE irq injection and simply reuse it for PPC, as it will work there just as well. Signed-off-by: Alexander Graf