Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Jan Beulich
>>> On 05.07.18 at 15:39, wrote: > On 05/07/18 09:40, Jan Beulich wrote: > On 04.07.18 at 18:23, wrote: >>> On 04/07/18 09:51, Jan Beulich wrote: >>> On 04.07.18 at 10:42, wrote: > On Tue, Jul 03, 2018 at 09:55:19PM +0100, Andrew Cooper wrote: >> --- a/xen/include/public/arch-x86

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Andrew Cooper
On 05/07/18 09:40, Jan Beulich wrote: On 04.07.18 at 18:23, wrote: >> On 04/07/18 09:51, Jan Beulich wrote: >> On 04.07.18 at 10:42, wrote: On Tue, Jul 03, 2018 at 09:55:19PM +0100, Andrew Cooper wrote: > --- a/xen/include/public/arch-x86/xen.h > +++ b/xen/include/public/arc

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Andrew Cooper
On 05/07/18 09:46, Jan Beulich wrote: On 04.07.18 at 18:46, wrote: >> On 04/07/18 10:01, Jan Beulich wrote: >> On 03.07.18 at 22:55, wrote: --- a/xen/common/libx86/cpuid.c +++ b/xen/common/libx86/cpuid.c @@ -34,6 +34,100 @@ const uint32_t *x86_cpuid_lookup_deep_deps(uint32

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Andrew Cooper
On 05/07/18 09:11, Wei Liu wrote: > On Wed, Jul 04, 2018 at 05:46:29PM +0100, Andrew Cooper wrote: >> On 04/07/18 10:01, Jan Beulich wrote: >> On 03.07.18 at 22:55, wrote: --- a/xen/common/libx86/cpuid.c +++ b/xen/common/libx86/cpuid.c @@ -34,6 +34,100 @@ const uint32_t *x86_cpu

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Jan Beulich
>>> On 04.07.18 at 18:46, wrote: > On 04/07/18 10:01, Jan Beulich wrote: > On 03.07.18 at 22:55, wrote: >>> --- a/xen/common/libx86/cpuid.c >>> +++ b/xen/common/libx86/cpuid.c >>> @@ -34,6 +34,100 @@ const uint32_t *x86_cpuid_lookup_deep_deps(uint32_t >>> feature) >>> } >>> >>> /* >>> +

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Jan Beulich
>>> On 04.07.18 at 18:23, wrote: > On 04/07/18 09:51, Jan Beulich wrote: > On 04.07.18 at 10:42, wrote: >>> On Tue, Jul 03, 2018 at 09:55:19PM +0100, Andrew Cooper wrote: --- a/xen/include/public/arch-x86/xen.h +++ b/xen/include/public/arch-x86/xen.h @@ -314,6 +314,17 @@ struct

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Wei Liu
On Wed, Jul 04, 2018 at 05:46:29PM +0100, Andrew Cooper wrote: > On 04/07/18 10:01, Jan Beulich wrote: > On 03.07.18 at 22:55, wrote: > >> --- a/xen/common/libx86/cpuid.c > >> +++ b/xen/common/libx86/cpuid.c > >> @@ -34,6 +34,100 @@ const uint32_t *x86_cpuid_lookup_deep_deps(uint32_t > >> fe

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-05 Thread Wei Liu
On Wed, Jul 04, 2018 at 05:23:56PM +0100, Andrew Cooper wrote: > On 04/07/18 09:51, Jan Beulich wrote: > On 04.07.18 at 10:42, wrote: > >> On Tue, Jul 03, 2018 at 09:55:19PM +0100, Andrew Cooper wrote: > >>> --- a/xen/include/public/arch-x86/xen.h > >>> +++ b/xen/include/public/arch-x86/xen.h

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-04 Thread Andrew Cooper
On 04/07/18 10:01, Jan Beulich wrote: On 03.07.18 at 22:55, wrote: >> --- a/xen/common/libx86/cpuid.c >> +++ b/xen/common/libx86/cpuid.c >> @@ -34,6 +34,100 @@ const uint32_t *x86_cpuid_lookup_deep_deps(uint32_t >> feature) >> } >> >> /* >> + * Copy a single cpuid_leaf into a provided xe

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-04 Thread Andrew Cooper
On 04/07/18 09:51, Jan Beulich wrote: On 04.07.18 at 10:42, wrote: >> On Tue, Jul 03, 2018 at 09:55:19PM +0100, Andrew Cooper wrote: >>> --- 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

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-04 Thread Jan Beulich
>>> On 03.07.18 at 22:55, wrote: > --- a/xen/common/libx86/cpuid.c > +++ b/xen/common/libx86/cpuid.c > @@ -34,6 +34,100 @@ const uint32_t *x86_cpuid_lookup_deep_deps(uint32_t > feature) > } > > /* > + * Copy a single cpuid_leaf into a provided xen_cpuid_leaf_t buffer, > + * performing boundar

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-04 Thread Jan Beulich
>>> On 04.07.18 at 10:42, wrote: > On Tue, Jul 03, 2018 at 09:55:19PM +0100, Andrew Cooper wrote: >> --- 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 >>

Re: [Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-04 Thread Wei Liu
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 >

[Xen-devel] [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object

2018-07-03 Thread Andrew Cooper
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