> On 17 May 2024, at 14:33, Roger Pau Monne <roger....@citrix.com> wrote:
> 
> Enabling it using an HVM param is fragile, and complicates the logic when
> deciding whether options that interact with altp2m can also be enabled.
> 
> Leave the HVM param value for consumption by the guest, but prevent it from
> being set.  Enabling is now done using and additional altp2m specific field in
> xen_domctl_createdomain.
> 
> Note that albeit only currently implemented in x86, altp2m could be 
> implemented
> in other architectures, hence why the field is added to 
> xen_domctl_createdomain
> instead of xen_arch_domainconfig.
> 
> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> ---
> Changes since v2:
> - Introduce a new altp2m field in xen_domctl_createdomain.
> 
> Changes since v1:
> - New in this version.
> ---
> tools/libs/light/libxl_create.c     | 23 ++++++++++++++++++++++-
> tools/libs/light/libxl_x86.c        | 26 ++++++++++++--------------
> tools/ocaml/libs/xc/xenctrl_stubs.c |  2 +-
> xen/arch/arm/domain.c               |  6 ++++++
> xen/arch/x86/domain.c               | 22 ++++++++++++++++++++++
> xen/arch/x86/hvm/hvm.c              | 23 ++++++++++++++++++++++-
> xen/include/public/domctl.h         | 20 +++++++++++++++++++-
> xen/include/public/hvm/params.h     |  9 ++-------
> 8 files changed, 106 insertions(+), 25 deletions(-)

> 
> diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c 
> b/tools/ocaml/libs/xc/xenctrl_stubs.c
> index 2b6d3c09dfa0..c6da9bb09137 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -257,7 +257,7 @@ CAMLprim value stub_xc_domain_create(value xch_val, value 
> wanted_domid, value co
> #if defined(__i386__) || defined(__x86_64__)
> 
> /* Quick & dirty check for ABI changes. */
> - BUILD_BUG_ON(sizeof(cfg) != 64);
> + BUILD_BUG_ON(sizeof(cfg) != 68);
> 

Acked-by: Christian Lindig <christian.lin...@cloud.com>



Reply via email to