From: Alexander Graf Subject: Re: [RFC PATCH 01/10] KVM: PPC: BOOK3S: PR: Fix PURR and SPURR emulation Date: Fri, 31 Jan 2014 11:47:44 +0100 Message-ID: <5C99D2BA-7E11-4012-B3BD-9B01F4F865ED@suse.de> References: <1390927455-3312-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1390927455-3312-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <52E92D15.8000901@suse.de> <87y51wjv0w.fsf@linux.vnet.ibm.com> Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: Ben Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, kvm-ppc , kvm-devel To: "Aneesh Kumar K.V" Return-path: In-Reply-To: <87y51wjv0w.fsf@linux.vnet.ibm.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 31.01.2014, at 11:38, Aneesh Kumar K.V wrote: > Alexander Graf writes: > >> On 01/28/2014 05:44 PM, Aneesh Kumar K.V wrote: >>> We definitely don't need to emulate mtspr, because both the registers >>> are hypervisor resource. >> >> This patch description doesn't cover what the patch actually does. It >> changes the implementation from "always tell the guest it uses 100%" to >> "give the guest an accurate amount of cpu time spent inside guest >> context". > > Will fix that > >> >> Also, I think we either go with full hyp semantics which means we also >> emulate the offset or we go with no hyp awareness in the guest at all >> which means we also don't emulate SPURR which is a hyp privileged >> register. > > Can you clarify this ? In the 2.06 ISA SPURR is hypervisor privileged. That changed for 2.07 where it became supervisor privileged. So I suppose your patch is ok. When reviewing those patches I only had 2.06 around because power.org was broken. Alex