[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 6 of 6 V6] libxl: Introduce a new guest config file parameter
# HG changeset patch # User Wei Wang <wei.wang2@xxxxxxx> # Date 1331210225 -3600 # Node ID 4c16ebeae0adace4493299b2f6d9c74ce8e6f889 # Parent 0a1de2dea27370d71d2572869d363d9e5833648e libxl: Introduce a new guest config file parameter Use guest_iommu = {1,0} to enable or disable guest iommu emulation. Default value is 0. Regression tests have been done to make sure it does not break non-iommuv2 systems. Signed-off-by: Wei Wang <wei.wang2@xxxxxxx> Acked-by: Ian Jackson<ian.jackson@xxxxxxxxxxxxx> diff -r 0a1de2dea273 -r 4c16ebeae0ad docs/man/xl.cfg.pod.5 --- a/docs/man/xl.cfg.pod.5 Thu Mar 08 13:37:02 2012 +0100 +++ b/docs/man/xl.cfg.pod.5 Thu Mar 08 13:37:05 2012 +0100 @@ -851,6 +851,11 @@ certainly belong in a more appropriate s Enable graphics device PCI passthrough. XXX which device is passed through ? +=item B<guest_iommu=BOOLEAN> + +Enable a virtual iommu device for hvm guest. It should be enabled to +passthrough AMD HD7900 series GPGPU. + =item B<nomigrate=BOOLEAN> Disable migration of this domain. This enables certain other features diff -r 0a1de2dea273 -r 4c16ebeae0ad tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Thu Mar 08 13:37:02 2012 +0100 +++ b/tools/libxl/libxl_create.c Thu Mar 08 13:37:05 2012 +0100 @@ -146,6 +146,7 @@ int libxl__domain_build_info_setdefault( libxl_defbool_setdefault(&b_info->u.hvm.hpet, true); libxl_defbool_setdefault(&b_info->u.hvm.vpt_align, true); libxl_defbool_setdefault(&b_info->u.hvm.nested_hvm, false); + libxl_defbool_setdefault(&b_info->u.hvm.guest_iommu, false); libxl_defbool_setdefault(&b_info->u.hvm.incr_generationid, false); libxl_defbool_setdefault(&b_info->u.hvm.usb, false); libxl_defbool_setdefault(&b_info->u.hvm.xen_platform_pci, true); @@ -237,13 +238,15 @@ int libxl__domain_build(libxl__gc *gc, vments[4] = "start_time"; vments[5] = libxl__sprintf(gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000); - localents = libxl__calloc(gc, 7, sizeof(char *)); + localents = libxl__calloc(gc, 9, sizeof(char *)); localents[0] = "platform/acpi"; localents[1] = libxl_defbool_val(info->u.hvm.acpi) ? "1" : "0"; localents[2] = "platform/acpi_s3"; localents[3] = libxl_defbool_val(info->u.hvm.acpi_s3) ? "1" : "0"; localents[4] = "platform/acpi_s4"; localents[5] = libxl_defbool_val(info->u.hvm.acpi_s4) ? "1" : "0"; + localents[6] = "guest_iommu"; + localents[7] = libxl_defbool_val(info->u.hvm.guest_iommu) ? "1" : "0"; break; case LIBXL_DOMAIN_TYPE_PV: diff -r 0a1de2dea273 -r 4c16ebeae0ad tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Thu Mar 08 13:37:02 2012 +0100 +++ b/tools/libxl/libxl_types.idl Thu Mar 08 13:37:05 2012 +0100 @@ -268,6 +268,7 @@ libxl_domain_build_info = Struct("domain ("vpt_align", libxl_defbool), ("timer_mode", libxl_timer_mode), ("nested_hvm", libxl_defbool), + ("guest_iommu", libxl_defbool), ("incr_generationid",libxl_defbool), ("nographic", libxl_defbool), ("stdvga", libxl_defbool), diff -r 0a1de2dea273 -r 4c16ebeae0ad tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu Mar 08 13:37:02 2012 +0100 +++ b/tools/libxl/xl_cmdimpl.c Thu Mar 08 13:37:05 2012 +0100 @@ -749,6 +749,7 @@ static void parse_config_data(const char } xlu_cfg_get_defbool(config, "nestedhvm", &b_info->u.hvm.nested_hvm, 0); + xlu_cfg_get_defbool(config, "guest_iommu", &b_info->u.hvm.guest_iommu, 0); break; case LIBXL_DOMAIN_TYPE_PV: { _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |