From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 02/18] KVM: PPC: Enable MMIO to do 64 bits, fprs and qprs Date: Sun, 07 Feb 2010 14:29:29 +0200 Message-ID: <4B6EB229.8090502@redhat.com> References: <1265298925-31954-1-git-send-email-agraf@suse.de> <1265298925-31954-3-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alexander Graf Return-path: In-Reply-To: <1265298925-31954-3-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On 02/04/2010 05:55 PM, Alexander Graf wrote: > Right now MMIO access can only happen for GPRs and is at most 32 bit wide. > That's actually enough for almost all types of hardware out there. > > Unfortunately, the guest I was using used FPU writes to MMIO regions, so > it ended up writing 64 bit MMIOs using FPRs and QPRs. > > So let's add code to handle those odd cases too. > > Signed-off-by: Alexander Graf > --- > arch/powerpc/include/asm/kvm.h | 7 +++++++ > arch/powerpc/include/asm/kvm_ppc.h | 2 +- > arch/powerpc/kvm/powerpc.c | 24 ++++++++++++++++++++++-- > 3 files changed, 30 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h > index 81f3b0b..548376c 100644 > --- a/arch/powerpc/include/asm/kvm.h > +++ b/arch/powerpc/include/asm/kvm.h > @@ -77,4 +77,11 @@ struct kvm_debug_exit_arch { > struct kvm_guest_debug_arch { > }; > > +#define REG_MASK 0x001f > +#define REG_EXT_MASK 0xffe0 > +#define REG_GPR 0x0000 > +#define REG_FPR 0x0020 > +#define REG_QPR 0x0040 > +#define REG_FQPR 0x0060 > These names seem too generic to belong in asm/kvm.h - some application could use the same names. Please add a KVM_ prefix. -- error compiling committee.c: too many arguments to function