From: Amit Shah Subject: Re: [PATCH] Refactor hypercall infrastructure (v2) Date: Mon, 3 Dec 2007 14:16:51 +0530 Message-ID: <200712031416.51710.amit.shah@qumranet.com> References: <11898788932902-git-send-email-aliguori@us.ibm.com> <200712021917.28706.amit.shah@qumranet.com> <475339A6.9020207@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Avi Kivity To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <475339A6.9020207-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> Content-Disposition: inline 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 * Anthony Liguori wrote: > Amit Shah wrote: > > * Anthony Liguori wrote: > > =A0 > > > >> This patch refactors the current hypercall infrastructure to better > >> support live migration and SMP. =A0It eliminates the hypercall page by > >> trapping the UD exception that would occur if you used the wrong > >> hypercall instruction for the underlying architecture and replacing it > >> with the right one lazily. = > > > > This doesn't work right for SVM. It keeps looping indefinitely; on a > > kvm_stat run, I get about 230,000 light vm exits per second, with the > > hypercall never returning to the guest. > > > > ... > > =A0 > > What are you using to issue the hypercall? + r =3D kvm_hypercall1(KVM_PV_PCI_DEVICE, page_gfn); Setup is done by: + if (!kvm_para_available()) { + printk(KERN_ERR "KVM paravirt support not available\n"); + r =3D -ENODEV; + goto out_dereg; + } I also couldn't get the has_feature to work properly. See: http://lkml.org/lkml/2007/11/7/129 I had to change the hypercall address to 0f 01 d9 for it to get working. > > Regards, > > Anthony Liguori ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4