All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexander Graf <agraf@suse.de>, kvm-ppc@vger.kernel.org
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 0/3] KVM: Make KVM_CHECK_EXTENSION a VM ioctl
Date: Tue, 15 Jul 2014 10:02:38 +0000	[thread overview]
Message-ID: <53C4FC3E.8070209@redhat.com> (raw)
In-Reply-To: <1405357418-18125-1-git-send-email-agraf@suse.de>

Il 14/07/2014 19:03, Alexander Graf ha scritto:
> On PowerPC we have a small problem :). We can run both HV and PR style VMs
> on the same kvm fd. While this is great, it means that anything that's
> different between the two needs to have a token in form of a VM fd to find
> out which one we're asking for.
>
> The one thing where this bites us are CAPs. We ask for them on the kvm fd,
> not the vm fd. So we can only take a random guess whether the user is asking
> for HV or PR capabilities.
>
> So far we got away with this reasonably well - most people will only load one
> of the two modules and the only thing that *really* breaks is hypercall exposure
> to user space, so a PR guest will not be able to do KVM hypercalls when HV KVM
> is loaded on the host, making the magic page unavailable to it.
>
> But this still isn't a great situation to be in. Instead, we really should just
> make the CHECK_EXTENSION ioctl available at VM level. Then we know for sure
> what user space is asking for.
>
>
> Alex
>
> Alexander Graf (3):
>   KVM: Rename and add argument to check_extension
>   KVM: Allow KVM_CHECK_EXTENSION on the vm fd
>   KVM: PPC: Book3S: Provide different CAPs based on HV or PR mode
>
>  Documentation/virtual/kvm/api.txt |  5 +++-
>  arch/arm/kvm/arm.c                |  2 +-
>  arch/ia64/kvm/kvm-ia64.c          |  2 +-
>  arch/mips/kvm/mips.c              |  2 +-
>  arch/powerpc/kvm/powerpc.c        | 14 +++++++---
>  arch/s390/kvm/kvm-s390.c          |  2 +-
>  arch/x86/kvm/x86.c                |  2 +-
>  include/linux/kvm_host.h          |  2 +-
>  virt/kvm/kvm_main.c               | 59 ++++++++++++++++++++-------------------
>  9 files changed, 51 insertions(+), 39 deletions(-)
>

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Feel free to include it in your pull request.

Paolo

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexander Graf <agraf@suse.de>, kvm-ppc@vger.kernel.org
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 0/3] KVM: Make KVM_CHECK_EXTENSION a VM ioctl
Date: Tue, 15 Jul 2014 12:02:38 +0200	[thread overview]
Message-ID: <53C4FC3E.8070209@redhat.com> (raw)
In-Reply-To: <1405357418-18125-1-git-send-email-agraf@suse.de>

Il 14/07/2014 19:03, Alexander Graf ha scritto:
> On PowerPC we have a small problem :). We can run both HV and PR style VMs
> on the same kvm fd. While this is great, it means that anything that's
> different between the two needs to have a token in form of a VM fd to find
> out which one we're asking for.
>
> The one thing where this bites us are CAPs. We ask for them on the kvm fd,
> not the vm fd. So we can only take a random guess whether the user is asking
> for HV or PR capabilities.
>
> So far we got away with this reasonably well - most people will only load one
> of the two modules and the only thing that *really* breaks is hypercall exposure
> to user space, so a PR guest will not be able to do KVM hypercalls when HV KVM
> is loaded on the host, making the magic page unavailable to it.
>
> But this still isn't a great situation to be in. Instead, we really should just
> make the CHECK_EXTENSION ioctl available at VM level. Then we know for sure
> what user space is asking for.
>
>
> Alex
>
> Alexander Graf (3):
>   KVM: Rename and add argument to check_extension
>   KVM: Allow KVM_CHECK_EXTENSION on the vm fd
>   KVM: PPC: Book3S: Provide different CAPs based on HV or PR mode
>
>  Documentation/virtual/kvm/api.txt |  5 +++-
>  arch/arm/kvm/arm.c                |  2 +-
>  arch/ia64/kvm/kvm-ia64.c          |  2 +-
>  arch/mips/kvm/mips.c              |  2 +-
>  arch/powerpc/kvm/powerpc.c        | 14 +++++++---
>  arch/s390/kvm/kvm-s390.c          |  2 +-
>  arch/x86/kvm/x86.c                |  2 +-
>  include/linux/kvm_host.h          |  2 +-
>  virt/kvm/kvm_main.c               | 59 ++++++++++++++++++++-------------------
>  9 files changed, 51 insertions(+), 39 deletions(-)
>

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Feel free to include it in your pull request.

Paolo

  parent reply	other threads:[~2014-07-15 10:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 17:03 [PATCH 0/3] KVM: Make KVM_CHECK_EXTENSION a VM ioctl Alexander Graf
2014-07-14 17:03 ` Alexander Graf
2014-07-14 17:03 ` [PATCH 1/3] KVM: Rename and add argument to check_extension Alexander Graf
2014-07-14 17:03   ` Alexander Graf
2014-07-14 17:03 ` [PATCH 2/3] KVM: Allow KVM_CHECK_EXTENSION on the vm fd Alexander Graf
2014-07-14 17:03   ` Alexander Graf
2014-07-14 17:16   ` Alexander Graf
2014-07-14 17:16     ` Alexander Graf
2014-07-14 18:18   ` [PATCH v2 " Alexander Graf
2014-07-14 18:18     ` Alexander Graf
2014-07-14 17:03 ` [PATCH 3/3] KVM: PPC: Book3S: Provide different CAPs based on HV or PR mode Alexander Graf
2014-07-14 17:03   ` Alexander Graf
2014-07-15  6:50 ` [PATCH 0/3] KVM: Make KVM_CHECK_EXTENSION a VM ioctl Cornelia Huck
2014-07-15  6:50   ` Cornelia Huck
2014-07-15  7:39   ` Alexander Graf
2014-07-15  7:39     ` Alexander Graf
2014-07-15 10:02 ` Paolo Bonzini [this message]
2014-07-15 10:02   ` Paolo Bonzini

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=53C4FC3E.8070209@redhat.com \
    --to=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.