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

Re: [PATCH 15/21] libs/guest: obtain a compatible cpu policy from two input ones


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 9 Apr 2021 12:56:21 +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-SenderADCheck; bh=mHuXdYiIiqfW70ZQbMwQD1nDL2ufASXx4a3Q3N+euqg=; b=EM+immKPdW79Ceu4uxAruz8XE8CMfhRMZbtq5UP0JK6nFvq/x46I136oEzVI6emgIPTJaT6qbRH1fPzikkCOuyizb1VxkHND/jgQriy2TNi7ahC57xN+BAAFHsiUzH1r3ShZeDbTMbO+WX0lpoI/Veqwh7Nz5LK1h/1ZYAtZtFE+0Zw06UMg/99xshnNoVaWHTVEnHosJTjU+PCNi0P8JIYmvCFe67gsTu6g462ItYs8zCyFLktirnjNPqimfWIvbhxX7lHhR4lGUnRa0CoJwYvfT+eE0EASpGpoHyLZFYR0sZ79cE6pma61y4upnnJAXHu94PGOH8LcYrSw4omO0w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YwdCYCYvaGqGX6y8sLEANfnTsKeDhWQLoD2W6XdIp0iaRKQ+aQr9zWfqq9pnfx98Lc5tH/jvfFfH0yaLcWF5YT0NI73UVCdapPYQ3O/nSUviURojhc4EJ1T0Pek/FsxZ5U1NQ87aaUbBiHs7900559df30PcVFiGhaaEW3xA49olMulOg6LKLm86D9rp0qGP8EIAKQCnJq6fJEhj9TgEqv+eqUdD/QND19RSz4Zh+X0yKSQ3jEQwjHWo8fxnW4euHYzakBz17WsQ6CpRjvXUXyxftz4+zHixwTWC7Cgufh27gdk4q/sw1vdys81iz0cSPNNLOubdzC4W7dgh/59pDA==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Fri, 09 Apr 2021 10:56:51 +0000
  • Ironport-hdrordr: A9a23:EThsv6nNK1M0V3FGGCgLgiPJd2jpDfP+imdD5ilNYBxZY6Wkvu izgfUW0gL1gj4NWHcm3euNIrWEXGm0z/NIyKMaVI3DYCDNvmy0IIZ+qbbz2jGIIVybysdx94 dFN5J/Btr5EERgga/BijWQPt48zLC8n5yAqvzZyx5WIz1CT4FFw0NHBh2AEktwLTM2YKYRMJ aH/MJIq36BVB0sH6eGL0IIVeTCuNHH/aiOCXI7LiUq9RWUineQ4KP6eiLy4j4lTzhNzb0+mF K18TDR26PLiZCG4y6Z7UD/xdB8mNztytxMbfb89/Q9G3HXpSuDIKhkU72GljgprO+o80ZCqq ixnz4Qe/5dxlmUUmapoQb8+wSI6kdQ11bSjWW2rFGmgcvlSCk0A8BM7LgpDCfx2g4bk/xXlI dotljp0KZ/PFf7swnWo+XsbVVMkHG5pHIz+NRj9EB3YM8lR5J66bAE8Fg9KuZnIAvKrLoJPc NJF8/m6PNfYTqhHgrkl1gq+tCqU3gpdy32O3Qqi4iQ2zhSqnhz01EV8swZhmsB75IwUfB/lp z5Dpg=
  • Ironport-sdr: tHsTcTozPTuDfvOgVmgYz6TAA6hvHR92EREwUJfx16ohPaTYXSqrBrUcrFep3SGcPeXa2Y6O2W uk1Zy3KUKfI9vtfwVr1nFhNQHWCr8AzvD7+kUY1DqVhJ0v/CU12DvPLB+gid27b8fGZNVhiS2Q iTHjtKzuEMpQJO/AKbU+wcKwMBwt/Jao/YVJ13cNfditVRPIGIJuJD0UuSdKwBmY5GYzPtUB2t QBm5mMph3IFQ+2LYBSOVEXpLjV/CrbfT2bt0W3CcLlb9pRU2GpUASHM9+E/TdLGmF4OvepeQfM eNs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Apr 01, 2021 at 05:26:03PM +0100, Andrew Cooper wrote:
> On 23/03/2021 09:58, Roger Pau Monne wrote:
> > Introduce a helper to obtain a compatible cpu policy based on two
> > input cpu policies. Currently this is done by and'ing all CPUID leaves
> > and MSR entries, except for MSR_ARCH_CAPABILITIES which has the RSBA
> > bit or'ed.
> >
> > The _AC macro is pulled from libxl_internal.h into xen-tools/libs.h
> > since it's required in order to use the msr-index.h header.
> >
> > Note there's no need to place this helper in libx86, since the
> > calculation of a compatible policy shouldn't be done from the
> > hypervisor.
> >
> > No callers of the interface introduced.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> I think this wants to be in libx86, because we'll want it to replace the
> opencoded derivation logic in init_cpuid()

I think you mean init_domain_cpuid_policy or recalculate_cpuid_policy?
I cannot find any init_cpuid.

I'm not convinced we need this in libx86 for the hypervisor, as I
don't know exactly how we would use it there. I expect the hypervisor
to validate policies provided by the toolstack, but not for it to
create such policies unless for very specific domains (ie: dom0 or
similar) which shouldn't require any leveling.

I'm happy to place it libx86, but I think I need to understand better
why it needs to be there.

> Also, we absolutely want to unit test it.  (I could have sworn I already
> started some work there - maybe its hidden in one of my WIP branches).

I don't think we have unit tests for the xenguest library?

Thanks, Roger.



 


Rackspace

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