From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Date: Mon, 08 Mar 2010 16:16:37 +0200 Message-ID: <4B9506C5.30606@redhat.com> References: <1267807842-3751-1-git-send-email-agraf@suse.de> <1267807842-3751-2-git-send-email-agraf@suse.de> <4B94FE41.1040904@redhat.com> <4B94FF56.9060200@suse.de> <4B9500B2.7030708@redhat.com> <4B950174.7010709@suse.de> <4B950475.1020106@redhat.com> <4B95062D.2020908@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: <4B95062D.2020908-l3A5Bk7waGM@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On 03/08/2010 04:14 PM, Alexander Graf wrote: > > We're looking at two different ifs here. > > 1) GPR Inside the PACA or not (volatile vs non-volatile) > > This is constant. Volatile registers go to the PACA; non-volatiles go to > the vcpu struct. > Okay - so no if (). > 2) GPR actually loaded in the PACA > > When we're in vcpu_load context the registers in the PACA, when not > they're in the vcpu struct > > > If you have a really easy and fast way to assure that we're always > inside a vcpu_load context, all is great. I could probably even just put > in a BUG_ON(not in vcpu_load context) and make the callers safe. But > some check needs to be done. > x86 assumes in vcpu_load() context (without even a BUG_ON()). KVM_GET_REGS and friends are responsible for this. -- error compiling committee.c: too many arguments to function