Re: [PATCH v2] KVM: PPC: Rework wqp conditional code

2012-03-13 Thread Marcelo Tosatti
On Tue, Mar 13, 2012 at 10:35:01PM +0100, Alexander Graf wrote: > On PowerPC, we sometimes use a waitqueue per core, not per thread, > so we can't always use the vcpu internal waitqueue. > > This code has been generalized by Christoffer Dall recently, but > unfortunately broke compilation for Powe

[PATCH v2] KVM: PPC: Rework wqp conditional code

2012-03-13 Thread Alexander Graf
On PowerPC, we sometimes use a waitqueue per core, not per thread, so we can't always use the vcpu internal waitqueue. This code has been generalized by Christoffer Dall recently, but unfortunately broke compilation for PowerPC. At the time the helper function is defined, struct kvm_vcpu is not de

[PATCH] KVM: PPC: Emulate tw and td instructions

2012-03-13 Thread Alexander Graf
There are 4 conditional trapping instructions: tw, twi, td, tdi. The ones with an i take an immediate comparison, the others compare two registers. All of them arrive in the emulator when the condition to trap was successfully fulfilled. Unfortunately, we were only implementing the i versions so f

[PATCH] KVM: PPC: Rework wqp conditional code

2012-03-13 Thread Alexander Graf
On PowerPC, we sometimes use a waitqueue per core, not per thread, so we can't always use the vcpu internal waitqueue. This code has been generalized by Christoffer Dall recently, but unfortunately broke compilation for PowerPC. At the time the helper function is defined, struct kvm_vcpu is not de

Re: [Android-virt] [PATCH v4] KVM: Factor out kvm_vcpu_kick to arch-generic code

2012-03-13 Thread Alexander Graf
On 13.03.2012, at 21:47, Christoffer Dall wrote: > On Tue, Mar 13, 2012 at 4:34 PM, Alexander Graf wrote: >> >> On 08.03.2012, at 22:44, Christoffer Dall wrote: >> >>> Any news on the status of this? >>> >>> On Thu, Feb 9, 2012 at 8:45 PM, Alexander Graf wrote: On 10.02.2012, at 0

Re: [Android-virt] [PATCH v4] KVM: Factor out kvm_vcpu_kick to arch-generic code

2012-03-13 Thread Christoffer Dall
On Tue, Mar 13, 2012 at 4:34 PM, Alexander Graf wrote: > > On 08.03.2012, at 22:44, Christoffer Dall wrote: > >> Any news on the status of this? >> >> On Thu, Feb 9, 2012 at 8:45 PM, Alexander Graf wrote: >>> >>> On 10.02.2012, at 02:40, Christoffer Dall wrote: >>> The kvm_vcpu_kick function

Re: [PATCH v4] KVM: Factor out kvm_vcpu_kick to arch-generic code

2012-03-13 Thread Alexander Graf
On 08.03.2012, at 22:44, Christoffer Dall wrote: > Any news on the status of this? > > On Thu, Feb 9, 2012 at 8:45 PM, Alexander Graf wrote: >> >> On 10.02.2012, at 02:40, Christoffer Dall wrote: >> >>> The kvm_vcpu_kick function performs roughly the same funcitonality on >>> most all archite

Re: [PATCH] kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM

2012-03-13 Thread Alexander Graf
Am 13.03.2012 um 21:09 schrieb Benjamin Herrenschmidt : > On Tue, 2012-03-13 at 14:47 +0100, Alexander Graf wrote: > >>> +++ b/arch/powerpc/include/asm/kvm_host.h >>> @@ -183,10 +183,14 @@ struct kvm_arch { >>>unsigned long lpcr; >>>unsigned long rmor; >>>struct kvmppc_rma_info *rm

Re: [PATCH] kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM

2012-03-13 Thread Benjamin Herrenschmidt
On Tue, 2012-03-13 at 14:47 +0100, Alexander Graf wrote: > > +++ b/arch/powerpc/include/asm/kvm_host.h > > @@ -183,10 +183,14 @@ struct kvm_arch { > > unsigned long lpcr; > > unsigned long rmor; > > struct kvmppc_rma_info *rma; > > - struct list_head spapr_tce_tables; > > unsigne

Re: [PATCH] kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM

2012-03-13 Thread Alexander Graf
On 13.03.2012, at 03:49, Benjamin Herrenschmidt wrote: > There is nothing in the code for emulating TCE tables in the kernel > that prevents it from working on "PR" KVM... other than ifdef's and > location of the code. > > This renames book3s_64_vio_hv.c to book3s_64_vio.c and moves the > bulk o