From nobody Wed Mar 12 13:18:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741082489315304.7402653251711; Tue, 4 Mar 2025 02:01:29 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 3A1D6149B; Tue, 4 Mar 2025 05:01:28 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 222421456; Tue, 4 Mar 2025 05:00:25 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 535F41353; Tue, 4 Mar 2025 04:11:26 -0500 (EST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 67DAC1423 for ; Tue, 4 Mar 2025 04:11:24 -0500 (EST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2233622fdffso101412705ad.2 for ; Tue, 04 Mar 2025 01:11:24 -0800 (PST) Received: from localhost.localdomain (c-73-225-60-39.hsd1.wa.comcast.net. [73.225.60.39]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-223501fb05bsm90644925ad.96.2025.03.04.01.11.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Mar 2025 01:11:22 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741079483; x=1741684283; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qjn/D+ktLjfZOfD4LUhK1R+9/YS0FkasxYsAaaV8+kQ=; b=GkWT9n89flmxnRoIrrM7Dr2ZoAZ+JBSKg81SgO3iFYK2A52jgiiaC2vC0z/HR54Kn6 Cr+t9ZRabgNtNkWSSUDzcqhnXSHub7RpZyXx4igRZiqvxpvyBnuRaB4/T/add0dpl1pn W6F+mUi75ZgrpNr0acJTjqwP5MEAKEU6oIHNNKZ2ZI+EFrU+mvlD+HCgLNbrvUd0+rIM h0hujVJ4PtmQwoYXm4YXKbDwU0/sEFZNUzPWCM++z1VadXBAaP1NC2LKM9iOMeuoezUQ 7SU36+Nhf6cy/Bz6d9lYKwQ+N+o/ezO8Rjgcjk2o2EGjYl/IFaKd7slW46lIGZidPO5n UoWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741079483; x=1741684283; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Qjn/D+ktLjfZOfD4LUhK1R+9/YS0FkasxYsAaaV8+kQ=; b=OMqPRXUd/+retLImoffTaB2e7Gh+Su+/Gcqm13tsMX3eSWAJ7v4sp/iTz3K6EhQdtr Pkriv3UfD0eBWDsLlGSCs6NIJp7bqB7zOriULfZE0y26SpcBMvWhun6iBebR4oFml5xG OP1iAyElev12cHl2b7CVlYAfJcFRvbt73WkjOVjW9/SmBvXeDZ2q54fuya5kV6A7Xwhp DLxx2WFpU2zFwzMVi3hhXH43RWhzEPQnuy7oDcBwwRtznfEt2H6xi+zWIK4QTZb5NJY8 siztuXOmCWJrRGs9fMhX7s7Uwa5j8JRcLXa7a1eoogFs+zfWUOIakO+gq4KS3TH7vFp4 ntkQ== X-Gm-Message-State: AOJu0YyENqtpG0TzHMRX5yZReE+KeDycFuZD4Hm8afBh6YAW0yGXsGkk zuZ0ThCBTKIYFVuk833ZO8RIefoso7Ak/4jhEccMxIJPoSlusfBtbRI3QzZJ X-Gm-Gg: ASbGncusZzfulGZpecjMbQBqa20KTUVgT/8G8z/pLKJdxvFiLvu4cVN5Nd5GBsT/VQp v/W6APozJcgd/FBgXn7Phw2p16rJyUnBHkVeUWXYpMFUwEm8xiW0rNzvl+Ll3Q/jP0D35Aj5aDL hmJ4c7PlIj7ClzpRGNGvqylEX8VAEiDzwnBQZl222k8xsPJtUtxLQsR4Scj94VOkzKz/M1UiAxt PZf1YGh2Y8slGTaSa9U00p2G6lcFN2dB+URqxTozRlez7Jkd4uTBLcBcWeXIe93YZwTwDZmY2xo fMhC8NGKKEq6R75uFJUgof4ESegu1JPzT01qjxCQ90db0pUAPt7sAqIwZS/ePr4H4fKYsQ0edIB WzPKm/KJQu2H8SoqH39bxGsxnjKNnf2aTFGC1VvyfrKakA7Vq X-Google-Smtp-Source: AGHT+IHHsoLNGk8rxd59Rq1BEPcfwrHomXOcenLZ1/i1obIbcxRyFpKFAg9Luz9uv3DODHxLeWcy1Q== X-Received: by 2002:a17:903:1790:b0:21f:71b4:d2aa with SMTP id d9443c01a7336-22368fa54b4mr310494295ad.5.1741079482751; Tue, 04 Mar 2025 01:11:22 -0800 (PST) From: Will To: devel@lists.libvirt.org Subject: [PATCH] libxl_conf: Implement hyperv domain flags for Xen Date: Tue, 4 Mar 2025 01:11:13 -0800 Message-ID: <20250304091114.91199-1-tcosprojects@gmail.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MailFrom: tcosprojects@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 Message-ID-Hash: O4FZBTKLRIHTN2C2UKNSZVA4LXLMS5S4 X-Message-ID-Hash: O4FZBTKLRIHTN2C2UKNSZVA4LXLMS5S4 X-Mailman-Approved-At: Tue, 04 Mar 2025 10:00:22 -0500 CC: Will X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741082491989019000 Content-Type: text/plain; charset="utf-8" Adds support for configuring flags for domains running under Xen. The following flags, making use of QEMU's existing flags, are now configurable for Xen: vapic, synic, stimer, frequencies, tlbflush and ipi Tests have been added validating translation to libxl's viridian flags Updated docs section on flags to note support and to specify which flags work with Xen Signed-off-by: Will --- NEWS.rst | 5 + docs/formatdomain.rst | 20 +-- src/libxl/libxl_conf.c | 90 ++++++++++ .../viridian-hvm-full.json | 101 ++++++++++++ .../viridian-hvm-full.xml | 45 +++++ .../viridian-hvm-none.json | 89 ++++++++++ .../viridian-hvm-none.xml | 36 ++++ .../libxlxml2domconfigdata/viridian-hvm.json | 99 +++++++++++ tests/libxlxml2domconfigdata/viridian-hvm.xml | 42 +++++ .../viridian-passthrough.json | 155 ++++++++++++++++++ .../viridian-passthrough.xml | 37 +++++ tests/libxlxml2domconfigtest.c | 9 + 12 files changed, 718 insertions(+), 10 deletions(-) create mode 100644 tests/libxlxml2domconfigdata/viridian-hvm-full.json create mode 100644 tests/libxlxml2domconfigdata/viridian-hvm-full.xml create mode 100644 tests/libxlxml2domconfigdata/viridian-hvm-none.json create mode 100644 tests/libxlxml2domconfigdata/viridian-hvm-none.xml create mode 100644 tests/libxlxml2domconfigdata/viridian-hvm.json create mode 100644 tests/libxlxml2domconfigdata/viridian-hvm.xml create mode 100644 tests/libxlxml2domconfigdata/viridian-passthrough.json create mode 100644 tests/libxlxml2domconfigdata/viridian-passthrough.xml diff --git a/NEWS.rst b/NEWS.rst index 9c940b1a81..d6ad961f56 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,11 @@ v11.2.0 (unreleased) =20 * **New features** =20 + * Support for configuration of ```` flags for Xen domains. + + The following flags are now configurable for Xen: ``vapic``, ``synic``, + ``stimer``, ``frequencies``, ``tlbflush`` and ``ipi``. + * **Improvements** =20 * **Bug fixes** diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index cbe378e61d..4162ae7930 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -2084,31 +2084,31 @@ are: based virtualization drivers, such as LXC. ``hyperv`` Enable various features improving behavior of guests running Microsoft - Windows. + Windows. :since:`Since 11.2.0` some of these flags are also available f= or Xen domains running Microsoft Windows. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Feature Description = Value Since =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D - relaxed Relax constraints on timers = on, off :since:`1.0.0 = (QEMU 2.0)` - vapic Enable virtual APIC = on, off :since:`1.1.0 = (QEMU 2.0)` + relaxed Relax constraints on timers = on, off :since:`1.0.0 = (QEMU 2.0), 11.2.0 (Xen, always on)` + vapic Enable virtual APIC = on, off :since:`1.1.0 = (QEMU 2.0), 11.2.0 (Xen)` spinlocks Enable spinlock support = on, off; retries - at least 4095 :since:`1.1.0 = (QEMU 2.0)` - vpindex Virtual processor index = on, off :since:`1.3.3 = (QEMU 2.5)` + vpindex Virtual processor index = on, off :since:`1.3.3 = (QEMU 2.5), 11.2.0 (Xen, always on)` runtime Processor time spent on running guest code and on behal= f of guest code on, off :since:`1.3.3 = (QEMU 2.5)` - synic Enable Synthetic Interrupt Controller (SynIC) = on, off :since:`1.3.3 = (QEMU 2.6)` - stimer Enable SynIC timers, optionally with Direct Mode suppor= t on, off; direct - on,off :since:`1.3.3 = (QEMU 2.6), direct mode 5.7.0 (QEMU 4.1)` + synic Enable Synthetic Interrupt Controller (SynIC) = on, off :since:`1.3.3 = (QEMU 2.6), 11.2.0 (Xen)` + stimer Enable SynIC timers, optionally with Direct Mode suppor= t on, off; direct - on,off :since:`1.3.3 = (QEMU 2.6), direct mode 5.7.0 (QEMU 4.1), 11.2.0 (Xen, on/off only)` reset Enable hypervisor reset = on, off :since:`1.3.3 = (QEMU 2.5)` vendor_id Set hypervisor vendor id = on, off; value - string, up to 12 characters :since:`1.3.3 = (QEMU 2.5)` - frequencies Expose frequency MSRs = on, off :since:`4.7.0 = (QEMU 2.12)` + frequencies Expose frequency MSRs = on, off :since:`4.7.0 = (QEMU 2.12), 11.2.0 (Xen)` reenlightenment Enable re-enlightenment notification on migration = on, off :since:`4.7.0 = (QEMU 3.0)` - tlbflush Enable PV TLB flush support = on, off; direct - on,off; extended - on,off :since:`4.7.0 = (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0)` - ipi Enable PV IPI support = on, off :since:`4.10.0= (QEMU 3.1)` + tlbflush Enable PV TLB flush support = on, off; direct - on,off; extended - on,off :since:`4.7.0 = (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0), 11.2.0 (Xen, on/= off only)` + ipi Enable PV IPI support = on, off :since:`4.10.0= (QEMU 3.1), 11.2.0 (Xen)` evmcs Enable Enlightened VMCS = on, off :since:`4.10.0= (QEMU 3.1)` avic Enable use Hyper-V SynIC with hardware APICv/AVIC = on, off :since:`8.10.0= (QEMU 6.2)` emsr_bitmap Avoid unnecessary updates to L2 MSR Bitmap upon vmexits= . on, off :since:`10.7.0= (QEMU 7.1)` xmm_input Enable XMM Fast Hypercall Input = on, off :since:`10.7.0= (QEMU 7.1)` =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =20 - :since:`Since 8.0.0`, the hypervisor can be configured further by setti= ng + :since:`Since 8.0.0 (QEMU) Since 11.2.0 (Xen)`, the hypervisor can be c= onfigured further by setting the ``mode`` attribute to one of the following values: =20 ``custom`` diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index c404226e43..d79cf93573 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -582,6 +582,96 @@ libxlMakeDomBuildInfo(virDomainDef *def, VIR_TRISTATE_SWITCH_ON); #endif =20 +#ifdef LIBXL_HAVE_BUILDINFO_HVM_VIRIDIAN_ENABLE_DISABLE + if (def->features[VIR_DOMAIN_FEATURE_HYPERV] !=3D VIR_DOMAIN_HYPER= V_MODE_NONE) { + libxl_bitmap_alloc(ctx, &b_info->u.hvm.viridian_enable, + LIBXL_BUILDINFO_HVM_VIRIDIAN_ENABLE_DISABLE= _WIDTH); + + switch ((virDomainHyperVMode) def->features[VIR_DOMAIN_FEATURE= _HYPERV]) { + case VIR_DOMAIN_HYPERV_MODE_CUSTOM: + // Base is required by Xen to enable any other flag + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, LIBXL_VIR= IDIAN_ENLIGHTENMENT_BASE); + // Enable crash ctl register by default to allow guest log= s to reach Xen + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, LIBXL_VIR= IDIAN_ENLIGHTENMENT_CRASH_CTL); + break; + case VIR_DOMAIN_HYPERV_MODE_PASSTHROUGH: + libxl_bitmap_set_any(&b_info->u.hvm.viridian_enable); + break; + case VIR_DOMAIN_HYPERV_MODE_NONE: + case VIR_DOMAIN_HYPERV_MODE_LAST: + default: + virReportEnumRangeError(virDomainHyperVMode, + def->features[VIR_DOMAIN_FEATURE_H= YPERV]); + return -1; + } + + for (i =3D 0; i < VIR_DOMAIN_HYPERV_LAST; i++) { + switch ((virDomainHyperv) i) { + case VIR_DOMAIN_HYPERV_VPINDEX: + case VIR_DOMAIN_HYPERV_RELAXED: + // Already set by base flag + break; + case VIR_DOMAIN_HYPERV_SYNIC: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_SYNIC); + } + break; + case VIR_DOMAIN_HYPERV_STIMER: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + // STIMER implies synic and clock features + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_STIMER); + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_SYNIC); + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_TIME_REF_COUNT); + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_REFERENCE_TSC); + } + break; + case VIR_DOMAIN_HYPERV_VAPIC: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_APIC_ASSIST); + } + break; + case VIR_DOMAIN_HYPERV_FREQUENCIES: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_FREQ); + } + break; + case VIR_DOMAIN_HYPERV_TLBFLUSH: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_HCALL_REMOTE_TLB_FLUSH); + } + break; + case VIR_DOMAIN_HYPERV_IPI: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + libxl_bitmap_set(&b_info->u.hvm.viridian_enable, L= IBXL_VIRIDIAN_ENLIGHTENMENT_HCALL_IPI); + } + break; + case VIR_DOMAIN_HYPERV_SPINLOCKS: + case VIR_DOMAIN_HYPERV_VENDOR_ID: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + const char *name =3D virDomainHypervTypeToString(i= ); + VIR_WARN("Hyper-v flag '%s' is specified per-domai= n but is a global Xen setting and will be ignored.", name); + } + break; + case VIR_DOMAIN_HYPERV_RUNTIME: + case VIR_DOMAIN_HYPERV_RESET: + case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: + case VIR_DOMAIN_HYPERV_EVMCS: + case VIR_DOMAIN_HYPERV_AVIC: + case VIR_DOMAIN_HYPERV_EMSR_BITMAP: + case VIR_DOMAIN_HYPERV_XMM_INPUT: + if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + const char *name =3D virDomainHypervTypeToString(i= ); + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Hyper-v enlightenment feature '%1$s' is not= supported for Xen domains."), name); + } + break; + case VIR_DOMAIN_HYPERV_LAST: + break; + } + } + } +#endif + /* copy SLIC table path to acpi_firmware */ b_info->u.hvm.acpi_firmware =3D g_strdup(def->os.slic_table); =20 diff --git a/tests/libxlxml2domconfigdata/viridian-hvm-full.json b/tests/li= bxlxml2domconfigdata/viridian-hvm-full.json new file mode 100644 index 0000000000..5cb69f7b5d --- /dev/null +++ b/tests/libxlxml2domconfigdata/viridian-hvm-full.json @@ -0,0 +1,101 @@ +{ + "c_info": { + "type": "hvm", + "name": "test-hvm", + "uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b" + }, + "b_info": { + "max_vcpus": 4, + "avail_vcpus": [ + 0, + 1, + 2, + 3 + ], + "max_memkb": 1048576, + "target_memkb": 1048576, + "video_memkb": 8192, + "shadow_memkb": 1234, + "device_model_version": "qemu_xen", + "device_model": "/bin/true", + "sched_params": { + + }, + "apic": "True", + "acpi": "True", + "type.hvm": { + "pae": "True", + "viridian_enable": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "vga": { + "kind": "cirrus" + }, + "vnc": { + "enable": "True", + "listen": "0.0.0.0", + "findunused": "False" + }, + "sdl": { + "enable": "False" + }, + "spice": { + + }, + "boot": "c", + "rdm": { + + } + }, + "arch_arm": { + + } + }, + "disks": [ + { + "pdev_path": "/var/lib/xen/images/test-hvm.img", + "vdev": "hda", + "backend": "qdisk", + "format": "raw", + "removable": 1, + "readwrite": 1 + } + ], + "nics": [ + { + "devid": 0, + "mac": "00:16:3e:66:12:b4", + "bridge": "br0", + "script": "/etc/xen/scripts/vif-bridge", + "nictype": "vif_ioemu" + } + ], + "vfbs": [ + { + "devid": -1, + "vnc": { + "enable": "True", + "listen": "0.0.0.0", + "findunused": "False" + }, + "sdl": { + "enable": "False" + } + } + ], + "vkbs": [ + { + "devid": -1 + } + ], + "on_reboot": "restart" +} diff --git a/tests/libxlxml2domconfigdata/viridian-hvm-full.xml b/tests/lib= xlxml2domconfigdata/viridian-hvm-full.xml new file mode 100644 index 0000000000..17f5ed5209 --- /dev/null +++ b/tests/libxlxml2domconfigdata/viridian-hvm-full.xml @@ -0,0 +1,45 @@ + + test-hvm + None + 2147d599-9cc6-c0dc-92ab-4064b5446e9b + 1048576 + 1048576 + 4 + destroy + restart + destroy + + + hvm + /usr/lib/xen/boot/hvmloader + + + + + + + + + + + + + + + + + + /bin/true + + + + + + + + +