public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface
Date: Tue, 09 Mar 2010 15:00:03 +0200	[thread overview]
Message-ID: <4B964653.6010903@redhat.com> (raw)
In-Reply-To: <1268071402-27112-15-git-send-email-agraf@suse.de>

On 03/08/2010 08:03 PM, Alexander Graf wrote:
> MOL uses its own hypercall interface to call back into userspace when
> the guest wants to do something.
>
> So let's implement that as an exit reason, specify it with a CAP and
> only really use it when userspace wants us to.
>
> The only user of it so far is MOL.
>
> Signed-off-by: Alexander Graf<agraf@suse.de>
>
> ---
>
> v1 ->  v2:
>
>    - Add documentation for OSI exit struct
> ---
>   Documentation/kvm/api.txt             |   13 +++++++++++++
>   arch/powerpc/include/asm/kvm_book3s.h |    5 +++++
>   arch/powerpc/include/asm/kvm_host.h   |    2 ++
>   arch/powerpc/kvm/book3s.c             |   24 ++++++++++++++++++------
>   arch/powerpc/kvm/powerpc.c            |   12 ++++++++++++
>   include/linux/kvm.h                   |    6 ++++++
>   6 files changed, 56 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
> index 6a19ab6..b2129e8 100644
> --- a/Documentation/kvm/api.txt
> +++ b/Documentation/kvm/api.txt
> @@ -932,6 +932,19 @@ s390 specific.
>
>   powerpc specific.
>
> +		/* 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.

Is using KVM_[GS]ET_REGS problematic for some reason?

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-03-09 13:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 18:03 [PATCH 00/15] KVM: PPC: MOL bringup patches Alexander Graf
2010-03-08 18:03 ` [PATCH 02/15] KVM: PPC: Allow userspace to unset the IRQ line Alexander Graf
     [not found]   ` <1268071402-27112-3-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-09 12:50     ` Avi Kivity
     [not found]       ` <4B964412.8030708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-09 12:54         ` Alexander Graf
     [not found]           ` <954C5195-A8E4-4CA5-8D5E-AA21E2E21C5B-l3A5Bk7waGM@public.gmane.org>
2010-03-09 13:05             ` Avi Kivity
2010-03-08 18:03 ` [PATCH 04/15] KVM: PPC: Book3S_32 guest MMU fixes Alexander Graf
2010-03-08 18:03 ` [PATCH 06/15] KVM: PPC: Don't reload FPU with invalid values Alexander Graf
     [not found] ` <1268071402-27112-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-08 18:03   ` [PATCH 01/15] KVM: PPC: Ensure split mode works Alexander Graf
2010-03-08 18:03   ` [PATCH 03/15] KVM: PPC: Make DSISR 32 bits wide Alexander Graf
2010-03-08 18:03   ` [PATCH 05/15] KVM: PPC: Split instruction reading out Alexander Graf
2010-03-08 18:03   ` [PATCH 07/15] KVM: PPC: Load VCPU for register fetching Alexander Graf
2010-03-08 18:03   ` [PATCH 08/15] KVM: PPC: Implement mfsr emulation Alexander Graf
2010-03-08 18:03   ` [PATCH 12/15] KVM: PPC: Implement alignment interrupt Alexander Graf
2010-03-08 18:03   ` [PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu Alexander Graf
2010-03-09 12:56     ` Avi Kivity
2010-03-09 13:01       ` Alexander Graf
2010-03-09 13:09         ` Avi Kivity
2010-03-08 18:03   ` [PATCH 14/15] KVM: PPC: Add OSI hypercall interface Alexander Graf
2010-03-09 13:00     ` Avi Kivity [this message]
2010-03-09 13:04       ` Alexander Graf
2010-03-09 13:11         ` Avi Kivity
2010-03-09 13:12           ` Alexander Graf
     [not found]             ` <3D0D6963-FEC8-4A53-ACCE-570BEAF3721B-l3A5Bk7waGM@public.gmane.org>
2010-03-09 13:19               ` Avi Kivity
     [not found]                 ` <4B964ADE.5030200-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-09 13:20                   ` Alexander Graf
2010-03-08 18:03   ` [PATCH 15/15] KVM: PPC: Make build work without CONFIG_VSX/ALTIVEC Alexander Graf
2010-03-08 18:03 ` [PATCH 09/15] KVM: PPC: Implement BAT reads Alexander Graf
2010-03-08 18:03 ` [PATCH 10/15] KVM: PPC: Make XER load 32 bit Alexander Graf
2010-03-08 18:03 ` [PATCH 11/15] KVM: PPC: Implement emulation for lbzux and lhax Alexander Graf
2010-03-08 18:06 ` [PATCH 00/15] KVM: PPC: MOL bringup patches Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B964653.6010903@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox