Re: [PATCH 1/6] KVM: PPC: booke: use vcpu reference from thread_struct

2012-09-24 Thread Alexander Graf
On 21.08.2012, at 15:51, Bharat Bhushan wrote: > Like other places, use thread_struct to get vcpu reference. Please remove the definition of SPRN_SPRG_R/WVCPU as well. Alex > > Signed-off-by: Bharat Bhushan > --- > arch/powerpc/kernel/asm-offsets.c |2 +- > arch/powerpc/kvm/booke_inter

Re: [PATCH 6/6] KVM: booke/bookehv: Add debug stub support

2012-09-24 Thread Alexander Graf
On 21.08.2012, at 15:52, Bharat Bhushan wrote: > This patch adds the debug stub support on booke/bookehv. > Now QEMU debug stub can use hw breakpoint, watchpoint and > software breakpoint to debug guest. > > Signed-off-by: Bharat Bhushan > --- > arch/powerpc/include/asm/kvm.h| 29

Re: [PATCH 4/6] KVM: PPC: debug stub interface parameter defined

2012-09-24 Thread Alexander Graf
On 21.08.2012, at 15:51, Bharat Bhushan wrote: > This patch defines the interface parameter for KVM_SET_GUEST_DEBUG > ioctl support. Follow up patches will use this for setting up > hardware breakpoints, watchpoints and software breakpoints. > > Signed-off-by: Bharat Bhushan > --- > arch/powerp

Re: [PATCH 6/6] KVM: booke/bookehv: Add debug stub support

2012-09-24 Thread Alexander Graf
On 07.09.2012, at 00:56, Scott Wood wrote: > On 09/06/2012 09:56 AM, Bhushan Bharat-R65777 wrote: >> >> >>> -Original Message- >>> From: Wood Scott-B07421 >>> Sent: Thursday, September 06, 2012 4:57 AM >>> To: Bhushan Bharat-R65777 >>> Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org;

Re: [PATCH 10/10] KVM: PPC: Book3S HV: Fix calculation of guest phys address for MMIO emulation

2012-09-24 Thread Alexander Graf
On 21.09.2012, at 07:39, Paul Mackerras wrote: > In the case where the host kernel is using a 64kB base page size and > the guest uses a 4k HPTE (hashed page table entry) to map an emulated > MMIO device, we were calculating the guest physical address wrongly. > We were calculating a gfn as the g

Re: [PATCH 04/10] KVM: PPC: Book3S HV: Remove bogus update of physical thread IDs

2012-09-24 Thread Alexander Graf
On 21.09.2012, at 07:36, Paul Mackerras wrote: > When making a vcpu non-runnable we incorrectly changed the > thread IDs of all other threads on the core, just remove that > code. > > Signed-off-by: Benjamin Herrenschmidt > Signed-off-by: Paul Mackerras Thanks, applied to kvm-ppc-next. Alex

Re: [PATCH 03/10] KVM: PPC: Book3S HV: Fix updates of vcpu->cpu

2012-09-24 Thread Alexander Graf
On 21.09.2012, at 07:35, Paul Mackerras wrote: > This removes the powerpc "generic" updates of vcpu->cpu in load and > put, and moves them to the various backends. > > The reason is that "HV" KVM does its own sauce with that field > and the generic updates might corrupt it. The field contains th

Re: [PATCH 06/10] KVM: PPC: Book3s HV: Don't access runnable threads list without vcore lock

2012-09-24 Thread Alexander Graf
On 21.09.2012, at 07:37, Paul Mackerras wrote: > There were a few places where we were traversing the list of runnable > threads in a virtual core, i.e. vc->runnable_threads, without holding > the vcore spinlock. This extends the places where we hold the vcore > spinlock to cover everywhere that

Re: [PATCH v3 1/2] KVM: PPC: Book3S: Get/set guest SPRs using the GET/SET_ONE_REG interface

2012-09-24 Thread Alexander Graf
On 24.09.2012, at 14:16, Paul Mackerras wrote: > On Fri, Sep 21, 2012 at 11:15:51AM +0200, Alexander Graf wrote: > >> So how about something like >> >> #define kvmppc_set_reg(id, val, reg) { \ >> switch (one_reg_size(id)) { \ >> case 4: val.wval = reg; break; \ >> case 8: val.dval = reg; bre

Re: [PATCH 02/10] KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online

2012-09-24 Thread Alexander Graf
On 21.09.2012, at 07:35, Paul Mackerras wrote: > When a Book3S HV KVM guest is running, we need the host to be in > single-thread mode, that is, all of the cores (or at least all of > the cores where the KVM guest could run) to be running only one > active hardware thread. This is because of the

Re: [PATCH 01/10] KVM: PPC: Book3S HV: Provide a way for userspace to get/set per-vCPU areas

2012-09-24 Thread Alexander Graf
On 21.09.2012, at 07:33, Paul Mackerras wrote: > The PAPR paravirtualization interface lets guests register three > different types of per-vCPU buffer areas in its memory for communication > with the hypervisor. These are called virtual processor areas (VPAs). > Currently the hypercalls to regis

Re: [PATCH v3 1/2] KVM: PPC: Book3S: Get/set guest SPRs using the GET/SET_ONE_REG interface

2012-09-24 Thread Paul Mackerras
On Fri, Sep 21, 2012 at 11:15:51AM +0200, Alexander Graf wrote: > So how about something like > > #define kvmppc_set_reg(id, val, reg) { \ > switch (one_reg_size(id)) { \ > case 4: val.wval = reg; break; \ > case 8: val.dval = reg; break; \ > default: BUG(); \ > } \ > } > > case KVM_RE