From: Alexander Graf Subject: Re: [PATCH 27/27] KVM: PPC: Add Documentation about PV interface Date: Sun, 4 Jul 2010 11:04:11 +0200 Message-ID: <79514591-DCC1-4D9E-AFB7-AA985ADF3C0F@suse.de> References: <1277980982-12433-1-git-send-email-agraf@suse.de> <1277980982-12433-28-git-send-email-agraf@suse.de> <1278196909.4200.389.camel@pasglop> Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: Segher Boessenkool , linuxppc-dev , KVM list , kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Benjamin Herrenschmidt Return-path: In-Reply-To: <1278196909.4200.389.camel@pasglop> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On 04.07.2010, at 00:41, Benjamin Herrenschmidt wrote: > On Fri, 2010-07-02 at 18:27 +0200, Segher Boessenkool wrote: >>> +To find out if we're running on KVM or not, we overlay the PVR >>> register. Usually >>> +the PVR register contains an id that identifies your CPU type. If, >>> however, you >>> +pass KVM_PVR_PARA in the register that you want the PVR result in, >>> the register >>> +still contains KVM_PVR_PARA after the mfpvr call. >>> + >>> + LOAD_REG_IMM(r5, KVM_PVR_PARA) >>> + mfpvr r5 >>> + [r5 still contains KVM_PVR_PARA] >> >> I love this part :-) > > Me not :-) > > It should be in the device-tree instead, or something like that. Enough > games with PVR... My biggest concern about putting things in the device-tree is that I was trying to keep things as separate as possible. Why does the firmware have to know that it's running in KVM? Why do I have to patch 3 projects (Linux, OpenBIOS, Qemu) when I could go with patching a single one (Linux)? Alex