Re: [PATCH 3/5] KVM: PPC: Paravirtualize SPRG4-7, ESR, PIR, MASn

2011-09-05 Thread Alexander Graf
On 27.08.2011, at 01:31, Scott Wood wrote: Signed-off-by: Scott Wood scottw...@freescale.com Patch description missing. --- arch/powerpc/include/asm/kvm_e500.h |8 -- arch/powerpc/include/asm/kvm_host.h |2 - arch/powerpc/include/asm/kvm_para.h | 28 +-

Re: [PATCH 4/5] KVM: PPC: e500: eliminate a trap when entering idle

2011-09-05 Thread Alexander Graf
On 27.08.2011, at 01:31, Scott Wood wrote: KVM will respond to setting MSR[WE], no matter what is in HID0. With KVM we also know it will take effect right away, so no need for a loop, TLF_NAPPING, etc. KVM paravirt's initcall is moved before SMP init, to avoid any chance of a race when

Re: [PATCH 5/5] KVM: PPC: booke: Improve timer register emulation

2011-09-05 Thread Alexander Graf
On 27.08.2011, at 01:31, Scott Wood wrote: From: Liu Yu yu@freescale.com Decrementers are now properly driven by TCR/TSR, and the guest has full read/write access to these registers. The decrementer keeps ticking (and setting the TSR bit) regardless of whether the interrupts are

Re: [PATCH 5/5] KVM: PPC: booke: Improve timer register emulation

2011-09-06 Thread Alexander Graf
On 06.09.2011, at 05:17, Liu Yu-B13201 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Tuesday, September 06, 2011 6:45 AM To: Wood Scott-B07421 Cc: kvm-ppc@vger.kernel.org Subject: Re

Re: [PATCH v2] KVM: PPC: e500: Don't hardcode PIR=0

2011-09-06 Thread Alexander Graf
On 03.09.2011, at 00:39, Scott Wood wrote: The hardcoded behavior prevents proper SMP support. QEMU shall specify the vcpu's PIR as the vcpu id. Signed-off-by: Scott Wood scottw...@freescale.com Thanks, applied. Alex -- To unsubscribe from this list: send the line unsubscribe kvm-ppc

Re: [PATCH 5/5] KVM: PPC: booke: Improve timer register emulation

2011-09-08 Thread Alexander Graf
On 08.09.2011, at 17:34, Scott Wood wrote: On Wed, Sep 07, 2011 at 12:41:35PM +0200, Alexander Graf wrote: Yes, but why can't we do this in the vcpu thread's context so we only ever have a single instance accessing the vcpu struct? It makes a lot of things a lot easier. Why? We don't do

[PATCH] KVM: PPC: Fix build failure with HV KVM and CBE

2011-09-13 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/exceptions-64s.S |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 29ddd8b..396d080 100644 --- a/arch/powerpc/kernel/exceptions-64s.S

[PATCH 0/3] KVM: PPC: HIOR and sregs fixup

2011-09-14 Thread Alexander Graf
Alexander Graf (3): Revert KVM: PPC: Add support for explicit HIOR setting KVM: PPC: Add generic single register ioctls KVM: PPC: Add support for explicit HIOR setting Documentation/virtual/kvm/api.txt | 48 arch/powerpc/include/asm/kvm.h| 10 + arch

[PATCH 1/3] Revert KVM: PPC: Add support for explicit HIOR setting

2011-09-14 Thread Alexander Graf
This reverts commit 11d7596e18a712dc3bc29d45662ec111fd65946b. It exceeded the padding on the SREGS struct, rendering the ABI backwards-incompatible. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm.h|8 arch/powerpc/include/asm/kvm_book3s.h |2

[PATCH 3/3] KVM: PPC: Add support for explicit HIOR setting

2011-09-14 Thread Alexander Graf
the SET_ONE_REG based method, we drop the PVR logic. Signed-off-by: Alexander Graf ag...@suse.de --- Documentation/virtual/kvm/api.txt |1 + arch/powerpc/include/asm/kvm.h|2 ++ arch/powerpc/include/asm/kvm_book3s.h |2 ++ arch/powerpc/kvm/book3s_pr.c |6

Re: [PATCH 3/5] KVM: PPC: Paravirtualize SPRG4-7, ESR, PIR, MASn

2011-09-19 Thread Alexander Graf
On 15.09.2011, at 20:26, Scott Wood wrote: On 09/05/2011 05:28 PM, Alexander Graf wrote: + /* +* SPRG4-7 are user-readable, so we can't keep these +* consistent between the magic page and the real +* registers. We provide space in case the guest +* can deal

Re: [PATCH 5/5] KVM: PPC: booke: Improve timer register emulation

2011-09-19 Thread Alexander Graf
On 15.09.2011, at 22:52, Scott Wood wrote: On 09/08/2011 10:39 AM, Alexander Graf wrote: On 08.09.2011, at 17:34, Scott Wood wrote: On Wed, Sep 07, 2011 at 12:41:35PM +0200, Alexander Graf wrote: Yes, but why can't we do this in the vcpu thread's context so we only ever have a single

[PATCH] KVM: PPC: E500: Support hugetlbfs

2011-09-19 Thread Alexander Graf
With hugetlbfs support emerging on e500, we should also support KVM backing its guest memory by it. This patch adds support for hugetlbfs into the e500 shadow mmu code. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 22 ++ 1 files changed, 22

Re: [PATCH] KVM: PPC: E500: Support hugetlbfs

2011-09-24 Thread Alexander Graf
On 22.09.2011, at 08:50, Liu Yu-B13201 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Tuesday, September 20, 2011 7:36 AM To: kvm-ppc@vger.kernel.org Cc: k...@vger.kernel.org Subject

Re: [PATCH 5/5] KVM: PPC: booke: Improve timer register emulation

2011-09-27 Thread Alexander Graf
On 27.09.2011, at 18:01, Bhushan Bharat-R65777 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Tuesday, September 27, 2011 1:45 PM To: Wood Scott-B07421 Cc: Liu Yu-B13201; Wood Scott-B07421

Re: [PATCH] KVM: PPC: E500: Support hugetlbfs

2011-10-05 Thread Alexander Graf
On 05.10.2011, at 18:06, Scott Wood wrote: On 10/05/2011 09:37 AM, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index ec17148..1dd96a9 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -24,6 +24,7 @@ #include

Re: kernel BUG at include/linux/kvm_host.h:603!

2011-10-10 Thread Alexander Graf
Hi Jörg, On 07.10.2011, at 23:10, Jörg Sommer wrote: Hi, I've got this backtrace: [130902.709711] [ cut here ] [130902.709747] kernel BUG at include/linux/kvm_host.h:603! Ouch. This means that preemption is broken in KVM for PPC. To quickly get things working on

Re: [PATCH] PPC: Fix race in mtmsr paravirt implementation

2011-10-13 Thread Alexander Graf
Am 13.10.2011 um 07:40 schrieb Bharat Bhushan r65...@freescale.com: The current implementation of mtmsr and mtmsrd are racy in that it does: * check (int_pending == 0) --- host sets int_pending = 1 --- * write shared page * done while instead we should check for int_pending after

Re: [PATCH] PPC: Fix race in mtmsr paravirt implementation

2011-10-13 Thread Alexander Graf
On 10/13/2011 11:22 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, October 13, 2011 2:36 PM To: Bhushan Bharat-R65777 Cc:kvm-ppc@vger.kernel.org;bharatb.ya...@gmail.com; Bhushan Bharat- R65777 Subject: Re: [PATCH] PPC

Re: [PATCH V2] PPC: Fix race in mtmsr paravirt implementation

2011-10-13 Thread Alexander Graf
On 10/13/2011 11:47 AM, Bharat Bhushan wrote: The current implementation of mtmsr and mtmsrd are racy in that it does: * check (int_pending == 0) --- host sets int_pending = 1--- * write shared page * done while instead we should check for int_pending after the shared page is

Re: magic page API

2011-10-17 Thread Alexander Graf
Am 17.10.2011 um 18:54 schrieb Yoder Stuart-B08248 b08...@freescale.com: The magic page hcall API and related data structure fields has the following: unsigned long magic_page_pa; /* phys addr to map the magic page to */ unsigned long magic_page_ea; /* effect. addr to map the

Re: magic page API

2011-10-17 Thread Alexander Graf
Am 17.10.2011 um 21:42 schrieb Yoder Stuart-B08248 b08...@freescale.com: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, October 17, 2011 2:33 PM To: Yoder Stuart-B08248 Cc: kvm-ppc@vger.kernel.org Subject: Re: magic page API Am 17.10.2011 um

Re: [PATCH] KVM: booke: Do Not start decrementer when SPRN_DEC set 0

2011-10-20 Thread Alexander Graf
On 17.10.2011, at 20:37, Bharat Bhushan wrote: As per specification the decrementer interrupt not happen when DEC is written with 0. So we should not start hrtimer with timeout = 0 as well. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/emulate.c |8

Re: [PATCH]KVM: Fix DEC truncation for greater than 0xffff_ffff/1000

2011-10-20 Thread Alexander Graf
On 18.10.2011, at 10:05, Bharat Bhushan wrote: kvmppc_emulate_dec() uses dec_nsec of type unsigned long and does below calculation: dec_nsec = vcpu-arch.dec; dec_nsec *= 1000; This will truncate if DEC value vcpu-arch.dec is greater than 0x_/1000. For example :

Re: [PATCH] KVM: booke: Do Not start decrementer when SPRN_DEC set 0

2011-10-20 Thread Alexander Graf
On 20.10.2011, at 10:43, Bhushan Bharat-R65777 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Thursday, October 20, 2011 10:40 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org

Re: [PATCH] KVM: booke: Do Not start decrementer when SPRN_DEC set 0

2011-10-20 Thread Alexander Graf
On 20.10.2011, at 10:15, Bhushan Bharat-R65777 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Thursday, October 20, 2011 10:40 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org

[PATCH 07/14] KVM: PPC: Fix build failure with HV KVM and CBE

2011-10-31 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/exceptions-64s.S |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 29ddd8b..396d080 100644 --- a/arch/powerpc/kernel/exceptions-64s.S

[PATCH 14/14] PPC: Fix race in mtmsr paravirt implementation

2011-10-31 Thread Alexander Graf
. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/kvm_emul.S | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/kvm_emul.S b/arch/powerpc/kernel/kvm_emul.S index f2b1b25

[PATCH 12/14] KVM: Fix whitespace in kvm_para.h

2011-10-31 Thread Alexander Graf
at the end of kvm_para.h and everyone's happy. Reported-by: Blue Swirl blauwir...@gmail.com Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_para.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h index

[PULL 00/14] ppc patch queue 2011-10-31

2011-10-31 Thread Alexander Graf
://github.com/agraf/linux-2.6.git kvm-ppc-next Alexander Graf (7): KVM: PPC: Fix build failure with HV KVM and CBE Revert KVM: PPC: Add support for explicit HIOR setting KVM: PPC: Add generic single register ioctls KVM: PPC: Add support for explicit HIOR setting KVM

[PATCH 05/14] KVM: PPC: e500: tlbsx: fix tlb0 esel

2011-10-31 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com It should contain the way, not the absolute TLB0 index. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[PATCH 11/14] KVM: PPC: Whitespace fix for kvm.h

2011-10-31 Thread Alexander Graf
kvm.h had sparse whitespace at the end of the line. Clean it up so syncing with QEMU gets easier. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm.h b/arch

[PATCH 03/14] KVM: PPC: e500: clear up confusion between host and guest entries

2011-10-31 Thread Alexander Graf
the host tlbe_ref for tracking page references. For the guest TLB0 entries, we still track it with gtlb_priv, to avoid having to retranslate if the entry is evicted from the host TLB but not the guest TLB. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 08/14] Revert KVM: PPC: Add support for explicit HIOR setting

2011-10-31 Thread Alexander Graf
This reverts commit 11d7596e18a712dc3bc29d45662ec111fd65946b. It exceeded the padding on the SREGS struct, rendering the ABI backwards-incompatible. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm.h|8 arch/powerpc/include/asm/kvm_book3s.h |2

[PATCH 06/14] KVM: PPC: e500: Don't hardcode PIR=0

2011-10-31 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The hardcoded behavior prevents proper SMP support. QEMU shall specify the vcpu's PIR as the vcpu id. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |4 ++-- arch/powerpc

[PATCH 01/14] KVM: PPC: e500: don't translate gfn to pfn with preemption disabled

2011-10-31 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Delay allocation of the shadow pid until we're ready to disable preemption and write the entry. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 36

Re: Current kernel fails to compile with KVM on PowerPC

2011-11-07 Thread Alexander Graf
On 07.11.2011, at 21:16, Avi Kivity a...@redhat.com wrote: On 11/07/2011 09:48 PM, Jörg Sommer wrote: Hello everybody, I'm trying to build the kernel with the git commit-id 31555213f03bca37d2c02e10946296052f4ecfcd, but it fails Alex, can we set up some buildbots for the ppc family,

Re: [PATCH 04/14] KVM: PPC: e500: MMU API

2011-11-10 Thread Alexander Graf
On 11/01/2011 05:16 PM, Scott Wood wrote: On 11/01/2011 03:58 AM, Avi Kivity wrote: On 10/31/2011 10:12 PM, Scott Wood wrote: +4.59 KVM_DIRTY_TLB + +Capability: KVM_CAP_SW_TLB +Architectures: ppc +Type: vcpu ioctl +Parameters: struct kvm_dirty_tlb (in) +Returns: 0 on success, -1 on error +

Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls

2011-11-10 Thread Alexander Graf
On 10/31/2011 02:36 PM, Avi Kivity wrote: On 10/31/2011 09:53 AM, Alexander Graf wrote: Right now we transfer a static struct every time we want to get or set registers. Unfortunately, over time we realize that there are more of these than we thought of before and the extensibility

Re: [PATCH v2] KVM: booke: Do Not start decrementer when SPRN_DEC set 0

2011-11-10 Thread Alexander Graf
On 10/31/2011 09:52 AM, Bharat Bhushan wrote: As per specification the decrementer interrupt not happen when DEC is written with 0. Also when DEC is zero, no decrementer running. So we should not start hrtimer for decrementer when DEC = 0. Signed-off-by: Bharat

Re: [PATCH] powerpc/kvm: annotate kvm_rma_init as __init

2011-11-10 Thread Alexander Graf
On 11/08/2011 12:29 AM, Nishanth Aravamudan wrote: kvm_rma_init() is only called at boot-time, by setup_arch, which is also __init. Signed-off-by: Nishanth Aravamudann...@us.ibm.com Thanks, applied to kvm-ppc-next. Alex diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c

Re: [PATCH] powerpc/kvm: fix build with older toolchains

2011-11-10 Thread Alexander Graf
On 11/08/2011 12:36 AM, Nishanth Aravamudan wrote: Fix KVM build for older toolchains (found with .powerpc64-unknown-linux-gnu-gcc (crosstool-NG-1.8.1) 4.3.2): AS arch/powerpc/kvm/book3s_hv_rmhandlers.o arch/powerpc/kvm/book3s_hv_rmhandlers.S: Assembler messages:

Re: [PATCH] KVM: PPC: booke: check for signals in kvmppc_vcpu_run

2011-11-11 Thread Alexander Graf
On 11/08/2011 11:11 PM, Scott Wood wrote: Currently we check prior to returning from a lightweight exit, but not prior to initial entry. book3s already does a similar test. Signed-off-by: Scott Woodscottw...@freescale.com --- arch/powerpc/kvm/booke.c | 10 +- 1 files changed, 9

Re: [PATCH] KVM: PPC: e500: Casting (void *) value returned by kmalloc is useless

2011-11-11 Thread Alexander Graf
On 11/11/2011 04:24 PM, Thomas Meyer wrote: Am Freitag, den 11.11.2011, 15:05 +0100 schrieb Alexander Graf: On 11/08/2011 08:15 PM, Thomas Meyer wrote: From: Thomas Meyertho...@m3y3r.de Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap

Re: [PATCH] KVM: PPC: booke: check for signals in kvmppc_vcpu_run

2011-11-11 Thread Alexander Graf
On 11/11/2011 04:32 PM, Scott Wood wrote: On Fri, Nov 11, 2011 at 03:09:17PM +0100, Alexander Graf wrote: On 11/08/2011 11:11 PM, Scott Wood wrote: Currently we check prior to returning from a lightweight exit, but not prior to initial entry. book3s already does a similar test. Signed-off

Re: [PATCH] powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

2011-11-11 Thread Alexander Graf
On 11/11/2011 03:03 AM, Michael Neuling wrote: Currently kvmppc_start_thread() tries to wake other SMT threads via xics_wake_cpu(). Unfortunately xics_wake_cpu only exists when CONFIG_SMP=Y so when compiling with CONFIG_SMP=N we get: arch/powerpc/kvm/built-in.o: In function

Re: [PATCH] KVM: PPC: protect use of kvmppc_h_pr

2011-11-11 Thread Alexander Graf
On 11/08/2011 06:17 PM, Andreas Schwab wrote: kvmppc_h_pr is only available if CONFIG_KVM_BOOK3S_64_PR. Signed-off-by: Andreas Schwabsch...@linux-m68k.org Thanks, applied to kvm-ppc-next. Alex -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to

Re: [PATCH] KVM: PPC: move compute_tlbie_rb to book3s_64 common header

2011-11-11 Thread Alexander Graf
On 11/08/2011 06:08 PM, Andreas Schwab wrote: compute_tlbie_rb is only used on ppc64 and cannot be compiled on ppc32. Signed-off-by: Andreas Schwabsch...@linux-m68k.org Thanks, applied to kvm-ppc-next. Alex -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a

Re: [PATCH 3/6] KVM: PPC: booke: Check for MSR[WE] in prepare_to_enter

2011-11-14 Thread Alexander Graf
On 14.11.2011, at 18:22, Scott Wood scottw...@freescale.com wrote: On 11/14/2011 07:13 AM, Alexander Graf wrote: On 11/09/2011 01:23 AM, Scott Wood wrote: +/* Check pending exceptions and deliver one, if possible. */ +void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu

Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls

2011-11-15 Thread Alexander Graf
On 10.11.2011, at 18:35, Marcelo Tosatti wrote: On Thu, Nov 10, 2011 at 05:49:42PM +0100, Alexander Graf wrote: Documentation/virtual/kvm/api.txt | 47 ++ arch/powerpc/kvm/powerpc.c| 51 + include/linux/kvm.h

[PATCH 3.2] Revert KVM: PPC: Add support for explicit HIOR setting

2011-11-17 Thread Alexander Graf
This reverts commit a15bd354f083f20f257db450488db52ac27df439. It exceeded the padding on the SREGS struct, rendering the ABI backwards-incompatible. Conflicts: arch/powerpc/kvm/powerpc.c include/linux/kvm.h --- arch/powerpc/include/asm/kvm.h|8

Re: [PATCH 0/6] KVM: PPC: mostly booke: race and idle fixes, paravirt

2011-11-18 Thread Alexander Graf
On 09.11.2011, at 01:22, Scott Wood wrote: The first couple patches are some minor reorganization of the checking done prior to entering the guest, which should avoid some races relative to exception qeueing, and give us a more clearly-named place (which later patches in the series use) to

Re: [PATCH v2] KVM: PPC: booke: Improve timer register emulation

2011-11-18 Thread Alexander Graf
On 17.11.2011, at 23:39, Scott Wood wrote: Decrementers are now properly driven by TCR/TSR, and the guest has full read/write access to these registers. The decrementer keeps ticking (and setting the TSR bit) regardless of whether the interrupts are enabled with TCR. The decrementer

Re: [RFC PATCH 0/11] KVM: PPC: Update Book3S HV memory handling

2011-11-18 Thread Alexander Graf
On 16.11.2011, at 23:50, Paul Mackerras wrote: This series of patches updates the Book3S-HV KVM code that manages the guest hashed page table (HPT) to enable several things: * MMIO emulation and MMIO pass-through * Use of small pages (4kB or 64kB, depending on config) to back the guest

Re: [PATCH] KVM: PPC: Apply paravirt to all vcpu

2011-11-22 Thread Alexander Graf
On 22.11.2011, at 10:55, Liu Yu yu@freescale.com wrote: Previously, only primary vcpu get enabled paravirt. Please fix it the other way around. Thd hypercall is CPU local and should stay that way, so we have to call it on each vcpu inside the guest. Alex Signed-off-by: Liu Yu

Re: [PATCH] KVM: PPC: Apply paravirt to all vcpu

2011-11-22 Thread Alexander Graf
On 22.11.2011, at 12:19, Liu Yu-B13201 b13...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, November 22, 2011 7:14 PM To: Liu Yu-B13201 Cc: kvm-ppc@vger.kernel.org; Liu Yu-B13201 Subject: Re: [PATCH] KVM: PPC: Apply

Re: [PATCH] KVM: PPC: Apply paravirt to all vcpu

2011-11-22 Thread Alexander Graf
On 22.11.2011, at 19:36, Scott Wood scottw...@freescale.com wrote: On 11/22/2011 05:27 AM, Alexander Graf wrote: On 22.11.2011, at 12:19, Liu Yu-B13201 b13...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, November

Re: [PATCH] KVM: PPC: Apply paravirt to all vcpu

2011-11-22 Thread Alexander Graf
On 22.11.2011, at 22:11, Yoder Stuart-B08248 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Tuesday, November 22, 2011 2:45 PM To: Wood Scott-B07421 Cc: Liu Yu-B13201; kvm-ppc

Re: [PATCH] KVM: PPC: Apply paravirt to all vcpu

2011-11-25 Thread Alexander Graf
On 25.11.2011, at 07:52, Liu Yu-B13201 b13...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, November 23, 2011 5:28 AM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Liu Yu-B13201; kvm-ppc@vger.kernel.org Subject: Re

Re: KVM: PPC: booke: Improve timer register emulation breaks Book3s HV

2011-12-06 Thread Alexander Graf
On 06.12.2011, at 12:43, Paul Mackerras wrote: On Tue, Dec 06, 2011 at 03:03:00PM +1100, Paul Mackerras wrote: I'm not sure why yet, but commit 8a97c432 (KVM: PPC: booke: Improve timer register emulation) in Alex's kvm-ppc-next branch is breaking Book3S HV KVM on POWER7. Guest cpus fail to

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-06 Thread Alexander Graf
On 07.12.2011, at 01:32, Matt Evans m...@ozlabs.org wrote: On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to update Documentation/virtual/kvm/api.txt . What are the cases where it happens? Well, on PPC the internal

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-06 Thread Alexander Graf
On 07.12.2011, at 08:19, Matt Evans m...@ozlabs.org wrote: On 07/12/11 17:34, Sasha Levin wrote: On Wed, 2011-12-07 at 17:17 +1100, Matt Evans wrote: On 06/12/11 19:20, Sasha Levin wrote: Why is it getting moved out of generic code? This is used to determine the maximum amount of vcpus

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 15:25, Avi Kivity a...@redhat.com wrote: On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 15:12, Avi Kivity a...@redhat.com wrote: On 12/07/2011 08:44 AM, Alexander Graf wrote: On 07.12.2011, at 01:32, Matt Evans m...@ozlabs.org wrote: On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 16:25, Sasha Levin levinsasha...@gmail.com wrote: On Wed, 2011-12-07 at 16:00 +0100, Alexander Graf wrote: On 07.12.2011, at 15:25, Avi Kivity a...@redhat.com wrote: On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07

[PATCH 3/4] KVM: PPC: Use get/set for to_svcpu to help preemption

2011-12-09 Thread Alexander Graf
to disable preemption while accessing the shadow vcpu fields in the PACA. That way we can run preemptible and everyone's happy! Reported-by: Jörg Sommer jo...@alea.gnuu.de Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h| 76

[PATCH 2/4] KVM: PPC: Book3s: PR: No irq_disable in vcpu_run

2011-12-09 Thread Alexander Graf
let's remove that disable and be happy. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 8e4f800..40ce940 100644 --- a/arch/powerpc

[PATCH 4/4] KVM: PPC: align vcpu_kick with x86

2011-12-09 Thread Alexander Graf
Our vcpu kick implementation differs a bit from x86 which resulted in us not disabling preemption during the kick. Get it a bit closer to what x86 does. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions

Re: [PATCH 4/4] KVM: PPC: align vcpu_kick with x86

2011-12-09 Thread Alexander Graf
On 09.12.2011, at 19:19, Scott Wood scottw...@freescale.com wrote: On 12/09/2011 09:26 AM, Alexander Graf wrote: Our vcpu kick implementation differs a bit from x86 which resulted in us not disabling preemption during the kick. Get it a bit closer to what x86 does. Disabling preemption

Re: [PATCH 4/4] KVM: PPC: align vcpu_kick with x86

2011-12-09 Thread Alexander Graf
On 09.12.2011, at 20:15, Scott Wood wrote: On 12/09/2011 01:10 PM, Alexander Graf wrote: On 09.12.2011, at 19:19, Scott Wood scottw...@freescale.com wrote: On 12/09/2011 09:26 AM, Alexander Graf wrote: Our vcpu kick implementation differs a bit from x86 which resulted in us

Re: [PATCH 1/4] KVM: PPC: Book3s: PR: Disable preemption in vcpu_run

2011-12-09 Thread Alexander Graf
On 09.12.2011, at 19:19, Scott Wood wrote: On 12/09/2011 09:26 AM, Alexander Graf wrote: When entering the guest, we want to make sure we're not getting preempted away, so let's disable preemption on entry, but enable it again while handling guest exits. Reported-by: Jörg Sommer jo

Re: Current kernel fails to compile with KVM on PowerPC

2011-12-11 Thread Alexander Graf
On 11.12.2011, at 16:16, Jörg Sommer wrote: Alexander Graf hat am Tue 22. Nov, 22:29 (+0100) geschrieben: On 22.11.2011, at 21:04, Jörg Sommer wrote: Jörg Sommer hat am Mon 07. Nov, 20:48 (+0100) geschrieben: I'm trying to build the kernel with the git commit-id

Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls

2011-12-19 Thread Alexander Graf
On 23.11.2011, at 13:47, Marcelo Tosatti wrote: On Wed, Nov 16, 2011 at 12:45:45AM +0100, Alexander Graf wrote: On 10.11.2011, at 18:35, Marcelo Tosatti wrote: On Thu, Nov 10, 2011 at 05:49:42PM +0100, Alexander Graf wrote: Documentation/virtual/kvm/api.txt | 47

Re: [PATCH 2/3] KVM: booke: Add booke206 TLB trace

2011-12-19 Thread Alexander Graf
On 29.11.2011, at 02:20, Scott Wood wrote: From: Liu Yu yu@freescale.com Missing patch description. Alex Signed-off-by: Liu Yu yu@freescale.com [scottw...@freescale.com: made mas2 64-bit, and added mas8 init] Signed-off-by: Scott Wood scottw...@freescale.com ---

Re: [PATCH v3 04/14] KVM: PPC: Keep page physical addresses in per-slot arrays

2011-12-19 Thread Alexander Graf
On 12.12.2011, at 23:28, Paul Mackerras wrote: This allocates an array for each memory slot that is added to store the physical addresses of the pages in the slot. This array is vmalloc'd and accessed in kvmppc_h_enter using real_vmalloc_addr(). This allows us to remove the ram_pginfo field

Re: [PATCH v3 12/14] KVM: Add barriers to allow mmu_notifier_retry to be used locklessly

2011-12-19 Thread Alexander Graf
On 12.12.2011, at 23:37, Paul Mackerras wrote: This adds an smp_wmb in kvm_mmu_notifier_invalidate_range_end() and an smp_rmb in mmu_notifier_retry() so that mmu_notifier_retry() will give the correct answer when called without kvm-mmu_lock being held. PowerPC Book3S HV KVM wants to use a

Re: [PATCH v3 00/14] KVM: PPC: Update Book3S HV memory handling

2011-12-19 Thread Alexander Graf
On 12.12.2011, at 23:23, Paul Mackerras wrote: This series of patches updates the Book3S-HV KVM code that manages the guest hashed page table (HPT) to enable several things: * MMIO emulation and MMIO pass-through * Use of small pages (4kB or 64kB, depending on config) to back the guest

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-20 Thread Alexander Graf
On 07.12.2011, at 08:19, Matt Evans wrote: On 07/12/11 17:34, Sasha Levin wrote: On Wed, 2011-12-07 at 17:17 +1100, Matt Evans wrote: On 06/12/11 19:20, Sasha Levin wrote: Why is it getting moved out of generic code? This is used to determine the maximum amount of vcpus supported by the

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-20 Thread Alexander Graf
On 07.12.2011, at 09:29, Sasha Levin wrote: On Wed, 2011-12-07 at 18:28 +1100, Matt Evans wrote: On 07/12/11 18:24, Alexander Graf wrote: On 07.12.2011, at 08:19, Matt Evans m...@ozlabs.org wrote: On 07/12/11 17:34, Sasha Levin wrote: On Wed, 2011-12-07 at 17:17 +1100, Matt Evans wrote

Re: [PATCH] KVM: PPC: Add KVM_CAP_NR_VCPUS and KVM_CAP_MAX_VCPUS

2011-12-20 Thread Alexander Graf
On 20.12.2011, at 16:32, Sasha Levin wrote: On Tue, 2011-12-20 at 16:17 +0100, Alexander Graf wrote: On 08.12.2011, at 03:55, Matt Evans wrote: PPC KVM lacks these two capabilities, and as such a userland system must assume a max of 4 VCPUs (following api.txt). With these, a userland

Re: [PATCH V3 2/2] kvm tools: Create arch-specific kvm_cpu__emulate_{mm}io()

2011-12-23 Thread Alexander Graf
On 13.12.2011, at 07:21, Matt Evans wrote: Different architectures will deal with MMIO exits differently. For example, KVM_EXIT_IO is x86-specific, and I/O cycles are often synthesised by steering into windows in PCI bridges on other architectures. This patch calls arch-specific

Re: [PATCH] KVM: Move gfn_to_memslot() to kvm_host.h

2011-12-23 Thread Alexander Graf
On 20.12.2011, at 10:21, Paul Mackerras wrote: This moves gfn_to_memslot(), and the functions it calls, that is, search_memslots() and __gfn_to_memslot(), from kvm_main.c to kvm_host.h so that gfn_to_memslot() can be called from non-modular code even when KVM is a module. On powerpc, the

Re: [PATCH] KVM: PPC: e500: include linux/export.h

2011-12-23 Thread Alexander Graf
On 21.12.2011, at 01:43, Scott Wood wrote: This is required for THIS_MODULE. We recently stopped acquiring it via some other header. Signed-off-by: Scott Wood scottw...@freescale.com Thanks, applied to kvm-ppc-next. Alex -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v2] KVM: PPC: booke: Add booke206 TLB trace

2011-12-23 Thread Alexander Graf
On 21.12.2011, at 01:42, Scott Wood wrote: From: Liu Yu yu@freescale.com The existing kvm_stlb_write/kvm_gtlb_write were a poor match for the e500/book3e MMU -- mas1 was passed as tid, mas2 was limited to unsigned int which will be a problem on 64-bit, mas3/7 got split up rather than

Re: Current kernel fails to compile with KVM on PowerPC

2011-12-24 Thread Alexander Graf
On 24.12.2011, at 12:13, Jörg Sommer wrote: Jörg Sommer hat am Sat 24. Dec, 11:31 (+0100) geschrieben: Alexander Graf hat am Fri 23. Dec, 14:50 (+0100) geschrieben: On 20.12.2011, at 21:27, Jörg Sommer wrote: Jörg Sommer hat am Mon 07. Nov, 20:48 (+0100) geschrieben: CHK include/linux

[PULL 0/7] avi patch queue 2011-12-25

2011-12-25 Thread Alexander Graf
The following changes since commit 08a95a511af91a2a6c42f2a8f13b99402a39e84b: Alex Williamson (1): kvm: Device assignment permission checks are available in the git repository at: git://github.com/agraf/linux-2.6.git for-avi Alexander Graf (2): KVM: PPC: Whitespace fix for kvm.h

[PATCH 6/7] powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

2011-12-25 Thread Alexander Graf
': book3s_hv.c:(.text+0xa1e0): undefined reference to `.xics_wake_cpu' The following should be fine since kvmppc_start_thread() shouldn't called to start non-zero threads when SMP=N since threads_per_core=1. Signed-off-by: Michael Neuling mi...@neuling.org Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 4/7] KVM: PPC: move compute_tlbie_rb to book3s_64 common header

2011-12-25 Thread Alexander Graf
From: Andreas Schwab sch...@linux-m68k.org compute_tlbie_rb is only used on ppc64 and cannot be compiled on ppc32. Signed-off-by: Andreas Schwab sch...@linux-m68k.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h| 33

[PATCH 5/7] KVM: PPC: protect use of kvmppc_h_pr

2011-12-25 Thread Alexander Graf
From: Andreas Schwab sch...@linux-m68k.org kvmppc_h_pr is only available if CONFIG_KVM_BOOK3S_64_PR. Signed-off-by: Andreas Schwab sch...@linux-m68k.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff

[PATCH 7/7] KVM: PPC: e500: include linux/export.h

2011-12-25 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is required for THIS_MODULE. We recently stopped acquiring it via some other header. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.c |1 + 1 files changed, 1 insertions

[PATCH 3/7] powerpc/kvm: annotate kvm_rma_init as __init

2011-12-25 Thread Alexander Graf
From: Nishanth Aravamudan n...@us.ibm.com kvm_rma_init() is only called at boot-time, by setup_arch, which is also __init. Signed-off-by: Nishanth Aravamudan n...@us.ibm.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_hv_builtin.c |2 +- 1 files changed, 1

Re: [PULL 0/7] avi patch queue 2011-12-25

2011-12-25 Thread Alexander Graf
On 25.12.2011, at 12:03, Avi Kivity a...@redhat.com wrote: On 12/25/2011 12:58 PM, Alexander Graf wrote: Hi Avi, Here are a couple compile/trivial fixes for PPC KVM. Please make sure they all get to 3.2, worst case through -stable. I left out all the other fine commits that would

Re: Current kernel fails to compile with KVM on PowerPC

2011-12-26 Thread Alexander Graf
On 25.12.2011, at 12:01, Jörg Sommer wrote: Alexander Graf hat am Sat 24. Dec, 18:05 (+0100) geschrieben: On 24.12.2011, at 12:13, Jörg Sommer wrote: Jörg Sommer hat am Sat 24. Dec, 11:31 (+0100) geschrieben: Alexander Graf hat am Fri 23. Dec, 14:50 (+0100) geschrieben: On 20.12.2011, at 21

Re: [PATCH] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-02 Thread Alexander Graf
On 26.12.2011, at 14:22, Avi Kivity wrote: On 12/20/2011 11:21 AM, Paul Mackerras wrote: This moves gfn_to_memslot(), and the functions it calls, that is, search_memslots() and __gfn_to_memslot(), from kvm_main.c to kvm_host.h so that gfn_to_memslot() can be called from non-modular code even

Re: [PATCH 1/2] KVM: PPC: epapr: Add idle hcall support for host

2012-01-03 Thread Alexander Graf
On 03.01.2012, at 15:01, Avi Kivity wrote: On 12/31/2011 08:16 AM, Liu Yu wrote: Add a new field opt_feature in struct kvm_ppc_pvinfo to tell userspace whether it support hcall idle. diff --git a/include/linux/kvm.h b/include/linux/kvm.h index c107fae..5af21f3 100644 ---

[PATCH 02/50] KVM: PPC: e500: Eliminate preempt_disable in local_sid_destroy_all

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The only place it makes sense to call this function already needs to have preemption disabled. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |4 +--- 1 files changed, 1

[PULL 00/50] ppc patch queue 2012-01-04

2012-01-03 Thread Alexander Graf
://github.com/agraf/linux-2.6 into next are available in the git repository at: git://github.com/agraf/linux-2.6.git kvm-ppc-next Alexander Graf (8): KVM: PPC: Add generic single register ioctls KVM: PPC: Add support for explicit HIOR setting KVM: PPC: E500: Support hugetlbfs

[PATCH 13/50] KVM: PPC: booke: check for signals in kvmppc_vcpu_run

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Currently we check prior to returning from a lightweight exit, but not prior to initial entry. book3s already does a similar test. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c

[PATCH 16/50] KVM: PPC: booke: Check for MSR[WE] in prepare_to_enter

2012-01-03 Thread Alexander Graf
to do. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 28 ++-- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index feaefc4

[PATCH 15/50] KVM: PPC: Move prepare_to_enter call site into subarch code

2012-01-03 Thread Alexander Graf
any interrupt disabling of this sort (plus it has several additional call sites), so I'm deferring the book3s fix to someone more familiar with that code. book3s behavior should be unchanged by this patch. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag

<    2   3   4   5   6   7   8   9   10   11   >