[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object
On Tue, Jul 03, 2018 at 09:55:19PM +0100, Andrew Cooper wrote: > The serialised form is made up of the leaf, subleaf and data tuple. As this > is the architectural form, it is expected not to change going forwards. > > x86_cpuid_copy_to_buffer() is implemented using Xen's regular copy_to_guest > primitives, with an API-compatible memcpy() is used for the libxc half of the > build. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> [...] > diff --git a/xen/include/public/arch-x86/xen.h > b/xen/include/public/arch-x86/xen.h > index 69ee4bc..f3bdd83 100644 > --- a/xen/include/public/arch-x86/xen.h > +++ b/xen/include/public/arch-x86/xen.h > @@ -314,6 +314,17 @@ struct xen_arch_domainconfig { > #define XEN_ACPI_GPE0_CPUHP_BIT 2 > #endif > > +/* > + * Representations of architectural CPUID information. Used as the > + * serialised version of Xen's internal representation. > + */ > +typedef struct xen_cpuid_leaf { > +#define XEN_CPUID_NO_SUBLEAF 0xffffffffu > + uint32_t leaf, subleaf; > + uint32_t a, b, c, d; > +} xen_cpuid_leaf_t; > +DEFINE_XEN_GUEST_HANDLE(xen_cpuid_leaf_t); > + Is putting this in public header while leaving CPUID_MAX_SERIALISED_LEAVES in a private header useful? How does an external user know how big a buffer it needs to provide to accommodate the return structure? Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |