>>> On 05.01.17 at 16:02, wrote:
> On 05/01/17 14:52, Jan Beulich wrote:
> On 05.01.17 at 15:28, wrote:
>>> What else would you suggest? One way or another (better shown in the
>>> context of the following patch), we need one block per
On 05/01/17 14:52, Jan Beulich wrote:
On 05.01.17 at 15:28, wrote:
>> On 05/01/17 13:51, Jan Beulich wrote:
@@ -333,21 +340,50 @@ void guest_cpuid(const struct vcpu *v, unsigned int
leaf,
unsigned int subleaf, struct cpuid_leaf
>>> On 05.01.17 at 15:28, wrote:
> On 05/01/17 13:51, Jan Beulich wrote:
>>> @@ -333,21 +340,50 @@ void guest_cpuid(const struct vcpu *v, unsigned int
>>> leaf,
>>> unsigned int subleaf, struct cpuid_leaf *res)
>>> {
>>> const struct domain *d =
On 05/01/17 13:51, Jan Beulich wrote:
>
>> @@ -333,21 +340,50 @@ void guest_cpuid(const struct vcpu *v, unsigned int
>> leaf,
>> unsigned int subleaf, struct cpuid_leaf *res)
>> {
>> const struct domain *d = v->domain;
>> +const struct cpuid_policy *p = d->arch.cpuid;
>>> On 04.01.17 at 13:39, wrote:
> @@ -306,6 +310,9 @@ void recalculate_cpuid_policy(struct domain *d)
> if ( !d->disable_migrate && !d->arch.vtsc )
> __clear_bit(X86_FEATURE_ITSC, fs);
>
> +if ( p->basic.max_leaf < 0xd )
XSTATE_CPUID
> @@ -333,21
Clamp the toolstack-providied max_leaf values in recalculate_cpuid_policy(),
causing the per-domain policy to have guest-accurate data.
Have guest_cpuid() exit early if a requested leaf is out of range, rather than
falling into the legacy path.
Signed-off-by: Andrew Cooper