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

2011-10-31 Thread Alexander Graf
On 31.10.2011, at 06:30, Avi Kivity wrote: > On 10/31/2011 09:53 AM, Alexander Graf wrote: >> This reverts commit 11d7596e18a712dc3bc29d45662ec111fd65946b. It exceeded >> the padding on the SREGS struct, rendering the ABI backwards-incompatible. > > Can't find the commit hash. Please use hashe

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

2011-10-31 Thread Scott Wood
On 10/31/2011 08:24 AM, Avi Kivity wrote: > On 10/31/2011 09:53 AM, Alexander Graf wrote: >> From: Scott Wood >> >> This implements a shared-memory API for giving host userspace access to >> the guest's TLB. >> >> >> diff --git a/Documentation/virtual/kvm/api.txt >> b/Documentation/virtual/kvm/ap

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

2011-10-31 Thread Scott Wood
On 10/31/2011 07:50 AM, Avi Kivity wrote: > On 10/31/2011 09:53 AM, Alexander Graf wrote: >> +/* sesel is index into the set, not the whole array */ >> +static void write_stlbe(struct kvmppc_vcpu_e500 *vcpu_e500, >> +struct tlbe *gtlbe, >> +struct tlbe *stlbe

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

2011-10-31 Thread Jan Kiszka
On 2011-10-31 14:36, 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 and flex

Re: [PATCH 13/14] KVM: PPC: E500: Support hugetlbfs

2011-10-31 Thread Avi Kivity
On 10/31/2011 09:53 AM, Alexander Graf wrote: > 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. > > > @@ -673,12 +674,31 @@ static inline void kvmppc_e500_shadow_map(struct

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

2011-10-31 Thread Avi Kivity
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 and flexibility of > transferring a full struct ever

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

2011-10-31 Thread Avi Kivity
On 10/31/2011 09:53 AM, Alexander Graf wrote: > This reverts commit 11d7596e18a712dc3bc29d45662ec111fd65946b. It exceeded > the padding on the SREGS struct, rendering the ABI backwards-incompatible. Can't find the commit hash. Please use hashes from the Linus tree when possible. This needs to be

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

2011-10-31 Thread Avi Kivity
On 10/31/2011 09:53 AM, Alexander Graf wrote: > From: Scott Wood > > The hardcoded behavior prevents proper SMP support. > > QEMU shall specify the vcpu's PIR as the vcpu id. > > Could also be kvm tool - we generally use the code name 'userspace' to refer to qemu (but don't rewrite the patch on t

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

2011-10-31 Thread Avi Kivity
On 10/31/2011 09:53 AM, Alexander Graf wrote: > From: Scott Wood > > This implements a shared-memory API for giving host userspace access to > the guest's TLB. > > > diff --git a/Documentation/virtual/kvm/api.txt > b/Documentation/virtual/kvm/api.txt > index 7945b0b..ab1136f 100644 > --- a/Docume

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

2011-10-31 Thread Avi Kivity
On 10/31/2011 09:53 AM, Alexander Graf wrote: > From: Scott Wood > > Delay allocation of the shadow pid until we're ready to disable > preemption and write the entry. > > @@ -507,21 +507,16 @@ static inline void kvmppc_e500_deliver_tlb_miss(struct > kvm_vcpu *vcpu, > vcpu_e500->mas7 = 0; >

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

2011-10-31 Thread Jörg Sommer
Hi Alexander, Alexander Graf hat am Mon 10. Oct, 10:09 (+0200) geschrieben: > 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! > >

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

2011-10-31 Thread Bharat Bhushan
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 Bhushan --- arch/powerpc/kvm/emulate.c |3 ++- 1 files changed, 2 insertio

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

2011-10-31 Thread Alexander Graf
From: Scott Wood Delay allocation of the shadow pid until we're ready to disable preemption and write the entry. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500_tlb.c | 36 +++- 1 files changed, 23 insertions(+), 13 deletions

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

2011-10-31 Thread Alexander Graf
From: Scott Wood The hardcoded behavior prevents proper SMP support. QEMU shall specify the vcpu's PIR as the vcpu id. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/booke.c |4 ++-- arch/powerpc/kvm/e500.c |3 --- 2 files changed, 2 insertions(+), 5 de

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

2011-10-31 Thread Alexander Graf
Until now, we always set HIOR based on the PVR, but this is just wrong. Instead, we should be setting HIOR explicitly, so user space can decide what the initial HIOR value is - just like on real hardware. We keep the old PVR based way around for backwards compatibility, but once user space uses th

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

2011-10-31 Thread Alexander Graf
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 and flexibility of transferring a full struct every time is limited. So this is a new approach to the p

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

2011-10-31 Thread Alexander Graf
From: Scott Wood The only place it makes sense to call this function already needs to have preemption disabled. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500_tlb.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/

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

2011-10-31 Thread Alexander Graf
From: Scott Wood Split out the portions of tlbe_priv that should be associated with host entries into tlbe_ref. Base victim selection on the number of hardware entries, not guest entries. For TLB1, where one guest entry can be mapped by multiple host entries, we use the host tlbe_ref for tracki

[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 --- arch/powerpc/include/asm/kvm.h|8 arch/powerpc/include/asm/kvm_book3s.h |2 -- arch/powe

[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 --- 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/powerpc/include/asm

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

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

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

2011-10-31 Thread Alexander Graf
Hi Avi / Marcelo, This is my current patch queue for ppc. Please pull. Alex The following changes since commit b796a09c5d808f4013f27ad45953db604dac18fd: Marcelo Tosatti (1): Merge remote-tracking branch 'upstream/master' into kvm-devel are available in the git repository at: git:/

[PATCH 13/14] KVM: PPC: E500: Support hugetlbfs

2011-10-31 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 Acked-by: Scott Wood --- v1 -> v2: - address scott's comments --- arch/powerpc/kvm/e500_tl

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

2011-10-31 Thread Alexander Graf
From: Scott Wood This implements a shared-memory API for giving host userspace access to the guest's TLB. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- Documentation/virtual/kvm/api.txt | 74 +++ arch/powerpc/include/asm/kvm.h | 35 +++ arch/powerpc/include/asm/kv

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

2011-10-31 Thread Alexander Graf
When syncing KVM headers with QEMU I (or whoever applies the diff) end up automatically fixing whitespaces. One of them is in kvm_para.h. It's a lot more consistent for people who don't do the whitespace fixups automatically to already have fixed headers in Linux. So remove the sparse empty line a

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

2011-10-31 Thread Alexander Graf
From: Bharat Bhushan 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 written. Signed-off-by: Bharat

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

2011-10-31 Thread Alexander Graf
When running with HV KVM and CBE config options enabled, I get build failures like the following: arch/powerpc/kernel/head_64.o: In function `cbe_system_error_hv': (.text+0x1228): undefined reference to `do_kvm_0x1202' arch/powerpc/kernel/head_64.o: In function `cbe_maintenance_hv': (.text