All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Quan Xu <quan.xu0@gmail.com>, Yang Zhang <yang.zhang.wz@gmail.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	junkang.fjk@alibaba-inc.com
Subject: Re: [PATCH 0/3] KVM, pkeys: fix handling of PKRU across migration
Date: Mon, 11 Sep 2017 12:01:08 +0200	[thread overview]
Message-ID: <9acf0ff2-01c7-d5d2-f2f7-8b716555954f@redhat.com> (raw)
In-Reply-To: <CAFv8KnHxM-ozJ0xLvUD+x50B-GTAN_TB9520RLeNn5H2RVXiSA@mail.gmail.com>

On 28/08/2017 03:32, Quan Xu wrote:
> 
> Paolo, I have verified this patch set..

Thanks!  In the end I managed to use QEMU's SVM emulation to convince
myself that the code was correct, so it is already included in Linux 4.13.

Paolo

> Tested-by: Quan Xu <quan.xu0@gmail.com <mailto:quan.xu0@gmail.com>>
> 
> 2017-08-25 8:43 GMT+08:00 Yang Zhang <yang.zhang.wz@gmail.com
> <mailto:yang.zhang.wz@gmail.com>>:
> 
>     On 2017/8/24 18:12, Paolo Bonzini wrote:
> 
>         The host pkru is restored right after vcpu exit (commit 1be0e61), so
>         KVM_GET_XSAVE will return the host PKRU value instead.  In general,
>         the PKRU value in vcpu->arch.guest_fpu.state cannot be trusted.
> 
>         Series as follows:
> 
>         1) fix independent bug which would cause an oops
> 
>         2) remove an unnecessary abstraction
> 
>         3) fix the bug
> 
>         Please test the patches, as I don't have the affected hardware. 
>         Note
>         that I need the results before tomorrow in order to send these
>         patches
>         to Linus before going on vacation.
> 
> 
>     hi Quan
> 
>     Can you help to test Paolo's patch?
> 
> 
>         Thanks,
> 
>         Paolo
> 
> 
>         Paolo Bonzini (3):
>            KVM: x86: block guest protection keys unless the host has
>         them enabled
>            KVM: x86: simplify handling of PKRU
>            KVM, pkeys: do not use PKRU value in vcpu->arch.guest_fpu.state
> 
>           arch/x86/include/asm/fpu/internal.h |  6 +++---
>           arch/x86/include/asm/kvm_host.h     |  1 +
>           arch/x86/kvm/cpuid.c                |  2 +-
>           arch/x86/kvm/kvm_cache_regs.h       |  5 -----
>           arch/x86/kvm/mmu.h                  |  2 +-
>           arch/x86/kvm/svm.c                  |  7 -------
>           arch/x86/kvm/vmx.c                  | 25 ++++++++-----------------
>           arch/x86/kvm/x86.c                  | 17 ++++++++++++++---
>           8 files changed, 28 insertions(+), 37 deletions(-)
> 
> 
> 
>     -- 
>     Yang
>     Alibaba Cloud Computing
> 
> 

  parent reply	other threads:[~2017-09-11 10:01 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
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 [this message]
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=9acf0ff2-01c7-d5d2-f2f7-8b716555954f@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=junkang.fjk@alibaba-inc.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quan.xu0@gmail.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 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.