From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] Refactor hypercall infrastructure Date: Fri, 14 Sep 2007 16:46:30 -0500 Message-ID: <46EB0136.6080105@codemonkey.ws> References: <11897991353793-git-send-email-aliguori@us.ibm.com> <46EAF4C6.8090903@goop.org> <46EAF6FC.80207@codemonkey.ws> <46EAFBA0.4020503@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Avi Kivity To: Jeremy Fitzhardinge Return-path: In-Reply-To: <46EAFBA0.4020503-TSDbQ3PG+2Y@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Jeremy Fitzhardinge wrote: > Anthony Liguori wrote: > >> The whole point of using the instruction is to allow hypercalls to be >> used in many locations. This has the nice side effect of not >> requiring a central hypercall initialization routine in the guest to >> fetch the hypercall page. A PV driver can be completely independent >> of any other code provided that it restricts itself to it's hypercall >> namespace. >> > > I see. So you take the fault, disassemble the instruction, see that its > another CPU's vmcall instruction, and then replace it with the current > CPU's vmcall? > Yup. >> Xen is currently using 0/1/2. I had thought it was only using 0/1. >> The intention was not to squash Xen's current CPUID usage so that it >> would still be possible for Xen to make use of the guest code. Can we >> agree that Xen won't squash leaves 3/4 or is it not worth trying to be >> compatible at this point? >> > > No, the point is that you're supposed to work out which hypervisor it is > from the signature in leaf 0, and then the hypervisor can put anything > it wants in the other leaves. > Yeah, see, the initial goal was to make it possible to use the KVM paravirtualizations on other hypervisors. However, I don't think this is really going to be possible in general so maybe it's better to just use leaf 0. I'll let others chime in before sending a new patch. Regards, Anthony Liguori > J > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/