qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 4/5] Report CPUID xsave area support for CET.


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 4/5] Report CPUID xsave area support for CET.
Date: Fri, 8 Mar 2019 12:31:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 25/02/19 14:37, Yang Weijiang wrote:
> @@ -4399,12 +4399,22 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, 
> uint32_t count,
>              *ebx = xsave_area_size(env->xcr0);
>          } else if (count == 1) {
>              *eax = env->features[FEAT_XSAVE];
> +            *ecx = env->features[FEAT_XSAVE_SV_LO];
> +            *edx = env->features[FEAT_XSAVE_SV_HI];
> +            *ebx = xsave_area_size_compacted(x86_cpu_xsave_components(cpu) |
> +                    x86_cpu_xsave_sv_components(cpu));

*ebx should not be necessary, KVM computes it automatically.  In fact it
doesn't depend on x86_cpu_xsave_components and
x86_cpu_xsave_sv_components, it depends on XCR0 and MSR_IA32_XSS, so you
can just drop it.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]