From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface Date: Tue, 09 Mar 2010 15:19:26 +0200 Message-ID: <4B964ADE.5030200@redhat.com> References: <1268071402-27112-1-git-send-email-agraf@suse.de> <1268071402-27112-15-git-send-email-agraf@suse.de> <4B964653.6010903@redhat.com> <4B9648E8.1040404@redhat.com> <3D0D6963-FEC8-4A53-ACCE-570BEAF3721B@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: <3D0D6963-FEC8-4A53-ACCE-570BEAF3721B-l3A5Bk7waGM@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On 03/09/2010 03:12 PM, Alexander Graf wrote: > On 09.03.2010, at 14:11, Avi Kivity wrote: > > >> On 03/09/2010 03:04 PM, Alexander Graf wrote: >> >>> >>>>> + /* KVM_EXIT_OSI */ >>>>> + struct { >>>>> + __u64 gprs[32]; >>>>> + } osi; >>>>> + >>>>> +MOL uses a special hypercall interface it calls 'OSI'. To enable it, we catch >>>>> +hypercalls and exit with this exit struct that contains all the guest gprs. >>>>> + >>>>> +If exit_reason is KVM_EXIT_OSI, then the vcpu has triggered such a hypercall. >>>>> +Userspace can now handle the hypercall and when it's done modify the gprs as >>>>> +necessary. Upon guest entry all guest GPRs will then be replaced by the values >>>>> +in this struct. >>>>> + >>>>> >>>>> >>>>> >>>> That's migration unsafe. There may not be next guest entry on this host. >>>> >>>> >>> It's as unsafe as MMIO then. >>> >>> >>> >> From api.txt: >> >> >>> NOTE: For KVM_EXIT_IO and KVM_EXIT_MMIO, the corresponding operations >>> are complete (and guest state is consistent) only after userspace has >>> re-entered the kernel with KVM_RUN. The kernel side will first finish >>> incomplete operations and then check for pending signals. Userspace >>> can re-enter the guest with an unmasked signal pending to complete >>> pending operations. >>> >> > Alright - so I add KVM_EXIT_OSI there and be good? :) > Sure, just verify that the note holds for that case too. >> But we need to be migration safe. If the interface is not heavily used, let's not add complications. >> > MOL uses OSI calls instead of MMIO. So yes, it is heavily used. > > Ok. -- error compiling committee.c: too many arguments to function