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

Re: [PATCH] x86/CPUID: fill all fields in x86_cpuid_policy_fill_native()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 Jun 2020 15:37:05 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m/XzEBPQQXzXR08MRCb0HnUC8pEe4WsH9GVfgMfzLyg=; b=LIbNbh9jkrDW15nalNhKHGFHmBBqhTRY7yd4/5P3Ixvwnj79WRmIExW8uVS28S78SGgq5LS9CHHLB3k/PFxQbj3B067tq/omj61CNM2ndwXc+K3fwaCREZp9WCYtlcP1No5Ex5qLLhNTYiuWYhp9EuACpCmxmupCiAjs146KuB3EmREP3aOSIwZ4Js/7Mbzci+P8KiE9Lp6xU8fuBiAXZgtyn5wxZbGnqN6kLl6LpYLKwQNXzs7I7L+IILzmmk+jl5wPKMSlzeoz/S3mucP4/B8jxdcv/D4HPhDn8cruIaZmt/ZHEO2iMabtIwOMu4uMu4oTK/26V34cCWO0uwwjTQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=luoqD8AUmefMtjd1uCfObt8rOR8iOYE1AdTTaRgrF0EyJpBteLvoWm3/QqbNbK75ahkLOXfZrLF4dX20+03sWYiPlQv0CWgvhpPhK3imaoBOg9Q2MZV4IZAcjoJ6TUmbOT6EGYMaUSaj9hrsw3XyFCfkOuzzh+a/XhiyMMd13XA9QFdDfQWScorhvaUJeFOxankM2UgISref1lfORoXn3+Wof5ghI5Q9xiXvQNYKV0WQ5U70LdrXLJf3ApoJFr7W8biWvztlYTtTVCrsHXtaDH+yZNc/0nNuozNJmKKs6ls92Qe9p/4VBBgzxZeXf08NUcArfCW+yAHfjYQclkRdGw==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 22 Jun 2020 13:37:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.06.2020 14:39, Andrew Cooper wrote:
> On 22/06/2020 13:09, Jan Beulich wrote:
>> Coverity validly complains that the new call from
>> tools/tests/cpu-policy/test-cpu-policy.c:test_cpuid_current() leaves
>> two fields uninitialized, yet they get then consumed by
>> x86_cpuid_copy_to_buffer(). (All other present callers of the function
>> pass a pointer to a static - and hence initialized - buffer.)
>>
>> Coverity-ID: 1464809
>> Fixes: c22ced93e167 ("tests/cpu-policy: Confirm that CPUID serialisation is 
>> sorted")
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> --- a/xen/lib/x86/cpuid.c
>> +++ b/xen/lib/x86/cpuid.c
>> @@ -176,6 +176,10 @@ void x86_cpuid_policy_fill_native(struct
>>                            ARRAY_SIZE(p->extd.raw) - 1); ++i )
>>          cpuid_leaf(0x80000000 + i, &p->extd.raw[i]);
>>  
>> +    /* Don't report leaves from possible lower level hypervisor. */
> 
> ", for now."
> 
> This will change in the future.

I was pondering at that moment whether to add it, but then I didn't
think we'd want to let shine through lower level hypervisor info.
But yes, I've added it, because it won't be wrong to say "for now",
even if it end up being for much longer.

> With this, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Thanks, Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.