Re: [PATCH v3 8/8] KVM:X86: Add user-space read/write interface for CET MSRs.

2019-03-08 Thread Sean Christopherson
On Thu, Feb 28, 2019 at 05:41:52PM +0800, Yang Weijiang wrote: > On Thu, Feb 28, 2019 at 08:32:49AM -0800, Sean Christopherson wrote: > > On Mon, Feb 25, 2019 at 09:27:16PM +0800, Yang Weijiang wrote: ... > > > static int __msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs *msrs, > > > -

Re: [PATCH v3 8/8] KVM:X86: Add user-space read/write interface for CET MSRs.

2019-02-28 Thread Yang Weijiang
On Thu, Feb 28, 2019 at 08:32:49AM -0800, Sean Christopherson wrote: > On Mon, Feb 25, 2019 at 09:27:16PM +0800, Yang Weijiang wrote: > > The Guest MSRs are stored in fpu storage area, they are > > operated by XSAVES/XRSTORS, so use kvm_load_guest_fpu > > to restore them is a convenient way to let

Re: [PATCH v3 8/8] KVM:X86: Add user-space read/write interface for CET MSRs.

2019-02-28 Thread Sean Christopherson
On Mon, Feb 25, 2019 at 09:27:16PM +0800, Yang Weijiang wrote: > The Guest MSRs are stored in fpu storage area, they are > operated by XSAVES/XRSTORS, so use kvm_load_guest_fpu > to restore them is a convenient way to let KVM access > them. After finish operation, need to restore Host MSR >

[PATCH v3 8/8] KVM:X86: Add user-space read/write interface for CET MSRs.

2019-02-25 Thread Yang Weijiang
The Guest MSRs are stored in fpu storage area, they are operated by XSAVES/XRSTORS, so use kvm_load_guest_fpu to restore them is a convenient way to let KVM access them. After finish operation, need to restore Host MSR contents by kvm_put_guest_fpu. Signed-off-by: Yang Weijiang ---