lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MWHPR11MB1245BC0FA24DE0565D6952AAA97C9@MWHPR11MB1245.namprd11.prod.outlook.com>
Date:   Tue, 21 Dec 2021 06:42:11 +0000
From:   "Liu, Jing2" <jing2.liu@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
CC:     "Christopherson,, Sean" <seanjc@...gle.com>,
        "Nakajima, Jun" <jun.nakajima@...el.com>,
        "Tian, Kevin" <kevin.tian@...el.com>,
        "jing2.liu@...ux.intel.com" <jing2.liu@...ux.intel.com>,
        "Zeng, Guang" <guang.zeng@...el.com>,
        "Wang, Wei W" <wei.w.wang@...el.com>,
        "Zhong, Yang" <yang.zhong@...el.com>
Subject: RE: [PATCH v2 22/23] kvm: x86: Disable interception for IA32_XFD on
 demand

On 12/20/2021 5:07 PM, Paolo Bonzini wrote:
> 
> On 12/17/21 16:30, Jing Liu wrote:
> > +++ b/arch/x86/kvm/x86.c
> > @@ -3686,6 +3686,9 @@ int kvm_set_msr_common(struct kvm_vcpu
> *vcpu, struct msr_data *msr_info)
> >   			return 1;
> >
> >   		fpu_update_guest_xfd(&vcpu->arch.guest_fpu, data);
> > +
> > +		if (data && kvm_x86_ops.set_xfd_passthrough)
> > +			static_call(kvm_x86_set_xfd_passthrough)(vcpu);
> >   		break;
> >   	case MSR_IA32_XFD_ERR:
> 
> 
> Please instead add a "case" to vmx_set_msr:

OK, it seems the passthrough setup is preferred in vmx.c.
Do we also want a case in vmx_get_msr (for patch 11), even though
no specific handling there?

Thanks,
Jing


> 
> 	case MSR_IA32_XFD:
> 		ret = kvm_set_msr_common(vcpu, msr_info);
> 		if (!ret && data) {
> 			vmx_disable_intercept_for_msr(vcpu,
> MSR_IA32_XFD, MSR_TYPE_RW);
> 			vcpu->arch.xfd_out_of_sync = true;
> 		}
> 		break;
> 
> Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ