From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 19/50] KVM: PPC: Paravirtualize SPRG4-7, ESR, PIR, MASn Date: Sun, 08 Jan 2012 15:20:14 +0200 Message-ID: <4F09980E.5060201@redhat.com> References: <1325639448-9494-1-git-send-email-agraf@suse.de> <1325639448-9494-20-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm-ppc@vger.kernel.org, kvm list , Marcelo Tosatti , Scott Wood To: Alexander Graf Return-path: In-Reply-To: <1325639448-9494-20-git-send-email-agraf@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 01/04/2012 03:10 AM, Alexander Graf wrote: > From: Scott Wood > > This allows additional registers to be accessed by the guest > in PR-mode KVM without trapping. > > SPRG4-7 are readable from userspace. On booke, KVM will sync > these registers when it enters the guest, so that accesses from > guest userspace will work. The guest kernel, OTOH, must consistently > use either the real registers or the shared area between exits. This > also applies to the already-paravirted SPRG3. > > On non-booke, it's not clear to what extent SPRG4-7 are supported > (they're not architected for book3s, but exist on at least some classic > chips). They are copied in the get/set regs ioctls, but I do not see any > non-booke emulation. I also do not see any syncing with real registers > (in PR-mode) including the user-readable SPRG3. This patch should not > make that situation any worse. > > Signed-off-by: Scott Wood > Signed-off-by: Alexander Graf > --- > arch/powerpc/include/asm/kvm_e500.h | 8 -- > arch/powerpc/include/asm/kvm_host.h | 6 - > arch/powerpc/include/asm/kvm_para.h | 31 +++++- > arch/powerpc/kernel/asm-offsets.c | 15 ++- > arch/powerpc/kernel/kvm.c | 204 +++++++++++++++++++++++++++++------ > arch/powerpc/kvm/book3s.c | 16 ++-- > arch/powerpc/kvm/booke.c | 23 ++-- > arch/powerpc/kvm/booke_emulate.c | 12 +- > arch/powerpc/kvm/booke_interrupts.S | 18 ++- > arch/powerpc/kvm/e500.c | 24 ++-- > arch/powerpc/kvm/e500_emulate.c | 38 ++++--- > arch/powerpc/kvm/e500_tlb.c | 83 ++++++++------- > arch/powerpc/kvm/e500_tlb.h | 25 ++--- > arch/powerpc/kvm/emulate.c | 3 +- > arch/powerpc/kvm/powerpc.c | 2 +- > 15 files changed, 339 insertions(+), 169 deletions(-) > Documentation? -- error compiling committee.c: too many arguments to function