Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1719120 > unrolled thread
| Started by | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| First post | 2017-08-24 12:20 +0200 |
| Last post | 2017-08-25 02:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/3] KVM, pkeys: fix handling of PKRU across migration Paolo Bonzini <pbonzini@redhat.com> - 2017-08-24 12:20 +0200
Re: [PATCH 0/3] KVM, pkeys: fix handling of PKRU across migration Yang Zhang <yang.zhang.wz@gmail.com> - 2017-08-25 02:50 +0200
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2017-08-24 12:20 +0200 |
| Subject | [PATCH 0/3] KVM, pkeys: fix handling of PKRU across migration |
| Message-ID | <uhXoZ-563-5@gated-at.bofh.it> |
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. 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(-) -- 1.8.3.1
[toc] | [next] | [standalone]
| From | Yang Zhang <yang.zhang.wz@gmail.com> |
|---|---|
| Date | 2017-08-25 02:50 +0200 |
| Message-ID | <uiaYW-5od-19@gated-at.bofh.it> |
| In reply to | #1719120 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web