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] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276A5116B76143CB694D1738C4B9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date:   Wed, 5 Jan 2022 04:03:33 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "Zhong, Yang" <yang.zhong@...el.com>
CC:     "x86@...nel.org" <x86@...nel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...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>,
        "corbet@....net" <corbet@....net>,
        "shuah@...nel.org" <shuah@...nel.org>,
        "Nakajima, Jun" <jun.nakajima@...el.com>,
        "jing2.liu@...ux.intel.com" <jing2.liu@...ux.intel.com>,
        "Liu, Jing2" <jing2.liu@...el.com>,
        "Zeng, Guang" <guang.zeng@...el.com>,
        "Wang, Wei W" <wei.w.wang@...el.com>
Subject: RE: [PATCH v4 18/21] kvm: x86: Add support for getting/setting
 expanded xstate buffer

> From: Paolo Bonzini <pbonzini@...hat.com>
> Sent: Wednesday, January 5, 2022 4:46 AM
> 
> On 1/4/22 20:46, Sean Christopherson wrote:
> > On Wed, Dec 29, 2021, Yang Zhong wrote:
> >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> >> index bdf89c28d2ce..76e1941db223 100644
> >> --- a/arch/x86/kvm/x86.c
> >> +++ b/arch/x86/kvm/x86.c
> >> @@ -4296,6 +4296,11 @@ int kvm_vm_ioctl_check_extension(struct kvm
> *kvm, long ext)
> >>   		else
> >>   			r = 0;
> >>   		break;
> >> +	case KVM_CAP_XSAVE2:
> >> +		r = kvm->vcpus[0]->arch.guest_fpu.uabi_size;
> >
> > a) This does not compile against kvm/queue.
> >
> >     arch/x86/kvm/x86.c: In function ‘kvm_vm_ioctl_check_extension’:
> >     arch/x86/kvm/x86.c:4317:24: error: ‘struct kvm’ has no member named
> ‘vcpus’
> >      4317 |                 r = kvm->vcpus[0]->arch.guest_fpu.uabi_size;
> >
> > b) vcpu0 is not guaranteed to be non-NULL at this point.
> 
> Yang, you can post an incremental patch for this.  You can use the
> highest bit of the guest-permitted xcr0 (i.e. the OR of KVM's supported
> XCR0 an the guest-permitted dynamic features) and pass it to cpuid(0xD).
> 

Will do, except one correction that 'OR' should be 'AND' here. 😊

Thanks
Kevin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ