Re: [RFC PATCH 1/2] kvm/x86: intercept guest changes to X86_CR4_LA57

2020-09-29 Thread Lai Jiangshan
On Tue, Sep 29, 2020 at 4:32 PM Sean Christopherson wrote: > > On Tue, Sep 29, 2020 at 01:32:45PM +0800, Lai Jiangshan wrote: > > On Tue, Sep 29, 2020 at 12:24 AM Sean Christopherson > > wrote: > > > > > > On Mon, Sep 28, 2020 at 04:30:46PM +0800, Lai Jiangshan wrote: > > > > From: Lai Jiangshan

Re: [RFC PATCH 1/2] kvm/x86: intercept guest changes to X86_CR4_LA57

2020-09-29 Thread Sean Christopherson
On Tue, Sep 29, 2020 at 01:32:45PM +0800, Lai Jiangshan wrote: > On Tue, Sep 29, 2020 at 12:24 AM Sean Christopherson > wrote: > > > > On Mon, Sep 28, 2020 at 04:30:46PM +0800, Lai Jiangshan wrote: > > > From: Lai Jiangshan > > > > > > When shadowpaping is enabled, guest should not be allowed > >

Re: [RFC PATCH 1/2] kvm/x86: intercept guest changes to X86_CR4_LA57

2020-09-28 Thread Lai Jiangshan
On Tue, Sep 29, 2020 at 12:24 AM Sean Christopherson wrote: > > On Mon, Sep 28, 2020 at 04:30:46PM +0800, Lai Jiangshan wrote: > > From: Lai Jiangshan > > > > When shadowpaping is enabled, guest should not be allowed > > to toggle X86_CR4_LA57. And X86_CR4_LA57 is a rarely changed > > bit, so we

Re: [RFC PATCH 1/2] kvm/x86: intercept guest changes to X86_CR4_LA57

2020-09-28 Thread Sean Christopherson
On Mon, Sep 28, 2020 at 04:30:46PM +0800, Lai Jiangshan wrote: > From: Lai Jiangshan > > When shadowpaping is enabled, guest should not be allowed > to toggle X86_CR4_LA57. And X86_CR4_LA57 is a rarely changed > bit, so we can just intercept all the attempts to toggle it > no matter shadowpaping

[RFC PATCH 1/2] kvm/x86: intercept guest changes to X86_CR4_LA57

2020-09-28 Thread Lai Jiangshan
From: Lai Jiangshan When shadowpaping is enabled, guest should not be allowed to toggle X86_CR4_LA57. And X86_CR4_LA57 is a rarely changed bit, so we can just intercept all the attempts to toggle it no matter shadowpaping is in used or not. Fixes: fd8cb433734ee ("KVM: MMU: Expose the LA57 featur