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

Re: [PATCH v2 3/6] libxl: introduce MSR data in libxl_cpuid_policy


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 17 Jul 2023 16:36:11 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=MfmyvjuK3TGcXoVu8TBn4BNtQvpWL548nD6P46bKv9w=; b=KL9c5VY+WLobzx04KZuQJF3lU6evOiIon0j/CNSP3SUDz0AXu6fRiX9LRWJpZK7lAKtcLFaXEykz9OZSjpNbt1FGwk0UoMGGrg2pBMC+kSLK6B3xNQULODhsjFcLvhtkZasYQUkEkktYUp/kb1bnBLcT8Isd1S+qhZubQaVtAuxS0LGQCb1H7YfprjO0F9CODdIjUxLwXvvnx1EpA7hTVMXxhjl3lL5nWrP45ok8jZnES6/i6R6U1o9A+c+u4xwfsN80jnrt5w51jrWgl76OqV/jmHlP8MfJsHWTkJ7VofkKsmTYJR4xQNZ3lwGkoLD8XwEtQh3crd0QZCrrl2yOUQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X3EjOnqP+lKa13o4QM8vjpMjt1Eud6jqD5caCm7KIK+iWyjd6IQ7DL/DxcSAtvjkRGYfjyFVhJPiKEMbVQhi4SeEhyrBXEdt+2jp9bYYgUqHASusivsk4hrWx+/UJHq86nGKuOxuEpM7x2V1zJblrc3RoNL3doWAs2ujVxj7k7s6dPSIeB/IuT1K3Vzq7uu8FPfkbtX0TCbhWRb0INw+M7R2KRxcSRkCejr+oK5UNLXz+dH23uI9AkltjSqnI7d7KKotuLOosHph6Pdg039nq0lh3lGoGxbhJQUYT/dlb0gBqfmqIM19ghbqJeLPHEU81HgUgsDZvRJPCYkkGGW6+Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Mon, 17 Jul 2023 14:36:41 +0000
  • Ironport-data: A9a23:CGaurqwxEYH+U/AomFp6t+cTxyrEfRIJ4+MujC+fZmUNrF6WrkVWm zNOUT2CM6uLNzHxfIp0ad/n/UIC75OAmtc3Tgdr+CAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8EoHUMja4mtC5QRhPK8T5TcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KVpNy /w/bwENUjCSh+S0n7TkScJJtv12eaEHPKtH0p1h5RfwKK9+BLX8GeDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjWVlVQhuFTuGIO9ltiiX8Jak1zev mvb12/4HgsbJJqUzj/tHneE37aSxHyrA9hCfFG+3v5LmHKi/2g0MRobT3+Qq6Kjrk6HX+sKf iT4/QJr98De7neDXtT7GhG1vnOAlhodQMZLVf037hmXzajZ6BrfAXILJhZebPQ2uclwQiYlv neLkMnuHidHq6CORDSW8bL8kN+pES0cLGtHYDBeSwIAuoHnuNtq1kKJSct/GqmoiNGzASv33 z2BsCk5gfMUkNIP0KK4u1vAhlpAu6T0c+L83S2PNkrN0++zTNXNi1CAgbQD0ct9EQ==
  • Ironport-hdrordr: A9a23:38eJLq3J+1Tlxvh2xIjflQqjBEIkLtp133Aq2lEZdPU0SKGlfq GV7ZMmPHrP4gr5N0tOpTntAse9qDbnhP1ICOoqTNOftWvd2FdARbsKheffKn/bak/DH4Zmvp uIGJIObeEYY2IasS77ijPIb+rJwrO8gd+VbTG19QYSceloAZsQnjuQEmygYytLrJEtP+tCKH KbjPA33gaISDAsQemQIGIKZOTHr82jruOaXfZXbyRXkDVnlFmTmcXHLyQ=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jul 12, 2023 at 05:39:01PM +0100, Anthony PERARD wrote:
> On Tue, Jul 11, 2023 at 11:22:27AM +0200, Roger Pau Monne wrote:
> > Add a new array field to libxl_cpuid_policy in order to store the MSR
> > policies.
> > 
> > Note that libxl_cpuid_policy_list_{copy,length,parse_json,gen_json}
> > are not adjusted to deal with the new MSR array now part of
> > libxl_cpuid_policy_list.
> 
> Why? Isn't this going to be an issue? Or maybe that going to be dealt
> with in a future patch?

I'm unsure what's the point of those?  The CPUID/MSR data is passed as
a migration stream record from the hypervisor, so I don't see much
point into converting it into json.  It also seems quite complex, and
can't likely we done without breaking (or adjusting) the current
format.

My plan was to leave this unimplemented and if someone is in
interested in having the data in json they can as well implement it.

Would you be OK if I add a note to the commit message that
implementing json marshalling is left to implement for interested
parties?

> > 
> > Adding the MSR data in the libxl_cpuid_policy_list type is done so
> > that existing users can seamlessly pass MSR features as part of the
> > CPUID data, without requiring the introduction of a separate
> > domain_build_info field, and a new set of handlers functions.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> >  tools/libs/light/libxl_cpuid.c    | 6 +++++-
> >  tools/libs/light/libxl_internal.h | 1 +
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/libs/light/libxl_cpuid.c b/tools/libs/light/libxl_cpuid.c
> > index 724cb4f182d4..65cad28c3ef0 100644
> > --- a/tools/libs/light/libxl_cpuid.c
> > +++ b/tools/libs/light/libxl_cpuid.c
> > @@ -40,6 +40,9 @@ void libxl_cpuid_dispose(libxl_cpuid_policy_list *pl)
> >          free(policy->cpuid);
> >      }
> >  
> > +    if (policy->msr)
> 
> You don't need to test for NULL, you can call free() in this case as
> well.

Right, thanks, will adjust.

Roger.



 


Rackspace

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