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:11:04 +0200 Message-ID: <4B9648E8.1040404@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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:24662 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751509Ab0CINLJ (ORCPT ); Tue, 9 Mar 2010 08:11:09 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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. >> Is using KVM_[GS]ET_REGS problematic for some reason? >> > It's two additional ioctls for no good reason. We know the interface, so we can model towards it. > But we need to be migration safe. If the interface is not heavily used, let's not add complications. -- error compiling committee.c: too many arguments to function From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Date: Tue, 09 Mar 2010 13:11:04 +0000 Subject: Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface Message-Id: <4B9648E8.1040404@redhat.com> List-Id: References: <1268071402-27112-1-git-send-email-agraf@suse.de> <1268071402-27112-15-git-send-email-agraf@suse.de> <4B964653.6010903@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org 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. >> Is using KVM_[GS]ET_REGS problematic for some reason? >> > It's two additional ioctls for no good reason. We know the interface, so we can model towards it. > But we need to be migration safe. If the interface is not heavily used, let's not add complications. -- error compiling committee.c: too many arguments to function