parameter will be used. The number of SPIs should match the highest interrupt
ID that will be assigned to the domain.
+=item B<trap_unmapped_accesses=BOOLEAN>
+
+An Optional boolean parameter that configures handling of accesses to unmapped
+address ranges. If enabled, guest accesses will trap. If disabled, guest
+accesses will read all bits as ones, e.g 0xFFFFFFFF for a 32bit access and
+writes will be ignored.
+
+This option is only implemented for Arm where the default is enabled.
+
=back
=head3 x86
*/
#define LIBXL_HAVE_VPMU 1
+/*
+ * LIBXL_HAVE_TRAP_UNMAPPED_ACCESSES indicates that libxl_domain_build_info
+ * has a trap_unmapped_accesses parameter, which allows the control of how
+ * accesses to unmapped adresses behave.
+ */
+#define LIBXL_HAVE_TRAP_UNMAPPED_ACCESSES 1
+
/*
* LIBXL_HAVE_PHYSINFO_CAP_GNTTAB indicates that libxl_physinfo has a
* cap_gnttab_v1/2 fields, which indicates the available grant table ABIs.
config->arch.sve_vl = d_config->b_info.arch_arm.sve_vl / 128U;
}
- /* Trap accesses to unmapped areas. */
- config->flags |= XEN_DOMCTL_CDF_trap_unmapped_accesses;
-
return 0;
}
/* ACPI is disabled by default */
libxl_defbool_setdefault(&b_info->acpi, false);
+ /* Trapping of unmapped accesses enabled by default. */
+ libxl_defbool_setdefault(&b_info->trap_unmapped_accesses, true);
+
/* Sanitise SVE parameter */
if (b_info->arch_arm.sve_vl) {
unsigned int max_sve_vl =
if (libxl_defbool_val(b_info->vpmu))
create.flags |= XEN_DOMCTL_CDF_vpmu;
+ if (libxl_defbool_val(b_info->trap_unmapped_accesses))
+ create.flags |= XEN_DOMCTL_CDF_trap_unmapped_accesses;
+
assert(info->passthrough != LIBXL_PASSTHROUGH_DEFAULT);
LOG(DETAIL, "passthrough: %s",
libxl_passthrough_to_string(info->passthrough));
("vmtrace_buf_kb", integer),
("vpmu", libxl_defbool),
+ ("trap_unmapped_accesses", libxl_defbool),
], dir=DIR_IN,
copy_deprecated_fn="libxl__domain_build_info_copy_deprecated",
if (libxl_defbool_val(d_config->b_info.arch_x86.msr_relaxed))
config->arch.misc_flags |= XEN_X86_MSR_RELAXED;
+ if (libxl_defbool_val(d_config->b_info.trap_unmapped_accesses)) {
+ LOG(ERROR, "trap_unmapped_accesses is not supported on x86\n");
+ return ERROR_FAIL;
+ }
+
return 0;
}
{
libxl_defbool_setdefault(&b_info->acpi, true);
libxl_defbool_setdefault(&b_info->arch_x86.msr_relaxed, false);
+ libxl_defbool_setdefault(&b_info->trap_unmapped_accesses, false);
if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) {
/*
if (!xlu_cfg_get_long (config, "nr_spis", &l, 0))
b_info->arch_arm.nr_spis = l;
+ xlu_cfg_get_defbool(config, "trap_unmapped_accesses",
+ &b_info->trap_unmapped_accesses, 0);
+
parse_vkb_list(config, d_config);
d_config->virtios = NULL;