mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: junkang.fjk@alibaba-inc.com, yang.zhang.wz@gmail.com
Subject: Re: [PATCH 2/3] KVM: x86: simplify handling of PKRU
Date: Thu, 24 Aug 2017 20:00:13 +0200	[thread overview]
Message-ID: <2a26e2e2-4866-4ac8-7bb3-4c2158479328@redhat.com> (raw)
In-Reply-To: <1503569573-55057-3-git-send-email-pbonzini@redhat.com>

On 24.08.2017 12:12, Paolo Bonzini wrote:
> Move it to struct kvm_arch_vcpu, replacing guest_pkru_valid with a
> simple comparison against the host value of the register.  The write of
> PKRU in addition can be skipped if the guest has not enabled the feature.
> Once we do this, we need not test OSPKE in the host anymore, because
> guest_CR4.PKE=1 implies host_CR4.PKE=1.
> 
> The static PKU test is kept to elide the code on older CPUs.

>From what I can tell, this looks good to me!


-- 

Thanks,

David

  reply	other threads:[~2017-08-24 18:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 10:12 [PATCH 0/3] KVM, pkeys: fix handling of PKRU across migration Paolo Bonzini
2017-08-24 10:12 ` [PATCH 1/3] KVM: x86: block guest protection keys unless the host has them enabled Paolo Bonzini
2017-08-24 17:54   ` David Hildenbrand
2017-08-24 10:12 ` [PATCH 2/3] KVM: x86: simplify handling of PKRU Paolo Bonzini
2017-08-24 18:00   ` David Hildenbrand [this message]
2017-08-24 10:12 ` [PATCH 3/3] KVM, pkeys: do not use PKRU value in vcpu->arch.guest_fpu.state Paolo Bonzini
2017-08-25  0:43 ` [PATCH 0/3] KVM, pkeys: fix handling of PKRU across migration Yang Zhang
     [not found]   ` <CAFv8KnHxM-ozJ0xLvUD+x50B-GTAN_TB9520RLeNn5H2RVXiSA@mail.gmail.com>
2017-09-11 10:01     ` Paolo Bonzini
2017-08-28  2:50 ` Yang Zhang

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=2a26e2e2-4866-4ac8-7bb3-4c2158479328@redhat.com \
    --to=david@redhat.com \
    --cc=junkang.fjk@alibaba-inc.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yang.zhang.wz@gmail.com \
    /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

all inboxes | Powered by JetHome®