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

Re: [PATCH v5 05/12] libs/guest: allow fetching a specific MSR entry from a cpu policy


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 6 Dec 2021 16:27:25 +0100
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1BNddKplu6/hbDUq0SSdInku9dxv92u8Dvp6sZ+8eYg=; b=HcHalbZBaV5FqLXasUY2K5xiylQbZM78i9uW7y3VQvBIcCthaoJEGX5IMGOAO3605cRBHPsDgY4C83ODQ9gauBxBIwQUveJ8zDLoT/eSAell1sTXxlzsvtXBWxTK9hAQkCRYHf3z/CwZeoNCff/UXAa5lBpDVmBBH+aL2WFSC0vf8Xucu9FTLH2HoL1umxawD0CSM/eENMl6OjqtgPXj352zzCNOnBh/p397rjrMpPm2n4vo59LM633ocBIBl8JUvF6DPdjq554SKW9D0YlxpGsl2MDLW3uBz2NiK0YWNsEeRwMPTlzO8NZKIwkBfB1tG8j4r5JNw9P+u/3CXhcY7w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ao5Ewfm5gi0L3XIVRO68MjZb03Js4ejeb8MXWExKyxclWW4MMg+yrSIUP7gSjtKqIiqi9eT8AdNeQkDEVjhklv7JImydcOxbZPESSQqK0nJ/4AtuN7cCoyf8QtFhymAEs5/TtfllAPW+085UCpm3jKwr1LeudJreQZF2nJKa30PD6e/rdyfXUcZadabZqurXewUJ44lnn7cEu84RlT1jZLYJrzOj4ReejsF3EvvRDSoAGAr2buahQS5PfKQ58ZfILQi4S9EykbnUfzsp1UEiR6153V7ODwTbKw+XYcSDYOnb+0cUuiTsxMziMCVctOcZX0MTsB0QYNu2FZz9GSXH5A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 06 Dec 2021 15:27:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.11.2021 16:33, Roger Pau Monne wrote:
> --- a/tools/libs/guest/xg_cpuid_x86.c
> +++ b/tools/libs/guest/xg_cpuid_x86.c
> @@ -878,6 +878,26 @@ int xc_cpu_policy_get_cpuid(xc_interface *xch, const 
> xc_cpu_policy_t *policy,
>      return 0;
>  }
>  
> +int xc_cpu_policy_get_msr(xc_interface *xch, const xc_cpu_policy_t *policy,
> +                          uint32_t msr, xen_msr_entry_t *out)
> +{
> +    const uint64_t *val;
> +
> +    *out = (xen_msr_entry_t){};

Unless there's a specific reason for the divergence, this just-in-
case initialization should imo be consistently there (or absent)
in both the MSR and the CPUID function.

Jan




 


Rackspace

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