From nobody Thu May 2 12:14:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586831947; cv=none; d=zohomail.com; s=zohoarc; b=BVZ+cWDsrKddsHdMhGuScZv6OYle5EnlhB6w7aRy+g95rvKAbOg/SrDg8S/w4YIKyNvRpC+1bSC35L/2e//OF32qTMpVhjqf/k3uLvDOa5Sn9vBXfU187TtEIV0gHuy8yDzQ2B318FlXVdZ8YkW/mI5Pdk4gVHKsTNfvCTQfsEE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586831947; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5ttHbvFZTmcF47WefFWhVY0MoYBLe/fHqEAjx0SZNSw=; b=J3226lQuJoMYyZ1V1Hx4TXkD8HPLBGCKMuve5iXqR7u3+Ku6Ryo/2HkJ4/IhhLV0z9zRr9wQqlifxwRHsBomZsvZuUT1gEsKAGDmzhkPcefBhWPRvsY67rMXK88nASolAeT68zRcwbpe99yENlW8RBLxRQ4C9wzCH1VmOEP30sY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1586831947549307.97460633638866; Mon, 13 Apr 2020 19:39:07 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-279-wtRfq_fSMRG_cHcjpI50WA-1; Mon, 13 Apr 2020 22:39:03 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 93E5F107ACC7; Tue, 14 Apr 2020 02:38:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6A17A116D84; Tue, 14 Apr 2020 02:38:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 24A8C1809567; Tue, 14 Apr 2020 02:38:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03E2bWpJ022216 for ; Mon, 13 Apr 2020 22:37:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 14BFD2026D69; Tue, 14 Apr 2020 02:37:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 107B42026D68 for ; Tue, 14 Apr 2020 02:37:29 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B67FA185A78F for ; Tue, 14 Apr 2020 02:37:29 +0000 (UTC) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-286-WXF6K1c1PYueqDNHWzH3Cg-1; Mon, 13 Apr 2020 22:37:27 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id C3FD39C1; Mon, 13 Apr 2020 22:37:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 13 Apr 2020 22:37:26 -0400 Received: from localhost.localdomain (ip5b412221.dynamic.kabel-deutschland.de [91.65.34.33]) by mail.messagingengine.com (Postfix) with ESMTPA id A87B83060066; Mon, 13 Apr 2020 22:37:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586831946; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5ttHbvFZTmcF47WefFWhVY0MoYBLe/fHqEAjx0SZNSw=; b=GwiedQNfU0iJTH3xbi+XVisSVq0H1zK7QLjbmX8DAnWYXPVKc7N8UAQcrmSXnkrKsbunHM hl5oFXO09ahwqzsGBexsa6zhDRTWPo7/IGr8snyv7rE+kPr1djGUV/mN7pV7WVZ3rS24W5 fHVB1aPQ7ZNonCPtqY+QBpNe00P21ig= X-MC-Unique: wtRfq_fSMRG_cHcjpI50WA-1 X-MC-Unique: WXF6K1c1PYueqDNHWzH3Cg-1 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfedtgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucffohhmrghinhephhhtmhhlrdhi nhenucfkphepledurdeihedrfeegrdeffeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhi nhhgshhlrggsrdgtohhm X-ME-Proxy: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Subject: [PATCH v2 1/4] conf: add xen specific feature: e820_host Date: Tue, 14 Apr 2020 04:37:04 +0200 Message-Id: <4b30267da39a0c5bcc21c7d551c03e96433da617.1586831743.git-series.marmarek@invisiblethingslab.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03E2bWpJ022216 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" e820_host is a Xen-specific option, only available for PV domains, that provides the domain a virtual e820 memory map based on the host one. It is required when using PCI passthrough and is generally considered safe for any PV kernel. e820_host is silently ignored if set in HVM domain configuration. See xl.cfg(5) man page in the Xen documentation for more details. Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- Changes in v2: - add documentation - use virXMLPropString - add enum entries at the end --- docs/formatdomain.html.in | 20 +++++++- docs/schemas/domaincommon.rng | 16 +++++- src/conf/domain_conf.c | 102 +++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 9 +++- src/qemu/qemu_validate.c | 1 +- 5 files changed, 148 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 6f43976..11d970c 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2061,6 +2061,9 @@ <hidden state=3D'on'/> <hint-dedicated state=3D'on'/> </kvm> + <xen> + <e820_host state=3D'on'/> + </xen> <pvspinlock state=3D'on'/> <gic version=3D'2'/> <ioapic driver=3D'qemu'/> @@ -2242,6 +2245,23 @@ +
xen
+
Various features to change the behavior of the Xen hypervisor. + + + + + + + + + + + + + +
FeatureDescriptionValueSince
e820_hostExpose the host e820 to the guest (PV only)on, off6.3.0
+
pmu
Depending on the state attribute (values on, off, default on) enable or disable the diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 65d6580..2b5f844 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5349,6 +5349,9 @@ + + + @@ -6337,6 +6340,19 @@ =20 + + + + + + + + + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8e81463..473adea 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -173,6 +173,7 @@ VIR_ENUM_IMPL(virDomainFeature, "nested-hv", "msrs", "ccf-assist", + "xen", ); =20 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, @@ -206,6 +207,11 @@ VIR_ENUM_IMPL(virDomainKVM, "hint-dedicated", ); =20 +VIR_ENUM_IMPL(virDomainXen, + VIR_DOMAIN_XEN_LAST, + "e820_host" +); + VIR_ENUM_IMPL(virDomainMsrsUnknown, VIR_DOMAIN_MSRS_UNKNOWN_LAST, "ignore", @@ -20862,6 +20868,7 @@ virDomainDefParseXML(xmlDocPtr xml, case VIR_DOMAIN_FEATURE_HYPERV: case VIR_DOMAIN_FEATURE_KVM: case VIR_DOMAIN_FEATURE_MSRS: + case VIR_DOMAIN_FEATURE_XEN: def->features[val] =3D VIR_TRISTATE_SWITCH_ON; break; =20 @@ -21172,6 +21179,51 @@ virDomainDefParseXML(xmlDocPtr xml, VIR_FREE(nodes); } =20 + if (def->features[VIR_DOMAIN_FEATURE_XEN] =3D=3D VIR_TRISTATE_SWITCH_O= N) { + int feature; + int value; + if ((n =3D virXPathNodeSet("./features/xen/*", ctxt, &nodes)) < 0) + goto error; + + for (i =3D 0; i < n; i++) { + feature =3D virDomainXenTypeFromString((const char *)nodes[i]-= >name); + if (feature < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported Xen feature: %s"), + nodes[i]->name); + goto error; + } + + switch ((virDomainXen) feature) { + case VIR_DOMAIN_XEN_E820_HOST: + if (!(tmp =3D virXMLPropString(nodes[i], "state"))) { + virReportError(VIR_ERR_XML_ERROR, + _("missing 'state' attribute for " + "Xen feature '%s'"), + nodes[i]->name); + goto error; + } + + if ((value =3D virTristateSwitchTypeFromString(tmp)) <= 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid value of state argument " + "for Xen feature '%s'"), + nodes[i]->name); + goto error; + } + + VIR_FREE(tmp); + def->xen_features[feature] =3D value; + break; + + /* coverity[dead_error_begin] */ + case VIR_DOMAIN_XEN_LAST: + break; + } + } + VIR_FREE(nodes); + } + if (def->features[VIR_DOMAIN_FEATURE_SMM] =3D=3D VIR_TRISTATE_SWITCH_O= N) { int rv =3D virDomainParseScaledValue("string(./features/smm/tseg)", "string(./features/smm/tseg/@un= it)", @@ -23173,6 +23225,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefP= tr src, case VIR_DOMAIN_FEATURE_PRIVNET: case VIR_DOMAIN_FEATURE_HYPERV: case VIR_DOMAIN_FEATURE_KVM: + case VIR_DOMAIN_FEATURE_XEN: case VIR_DOMAIN_FEATURE_PVSPINLOCK: case VIR_DOMAIN_FEATURE_PMU: case VIR_DOMAIN_FEATURE_VMPORT: @@ -23344,6 +23397,30 @@ virDomainDefFeaturesCheckABIStability(virDomainDef= Ptr src, } } =20 + /* xen */ + if (src->features[VIR_DOMAIN_FEATURE_XEN] =3D=3D VIR_TRISTATE_SWITCH_O= N) { + for (i =3D 0; i < VIR_DOMAIN_XEN_LAST; i++) { + switch ((virDomainXen) i) { + case VIR_DOMAIN_XEN_E820_HOST: + if (src->xen_features[i] !=3D dst->xen_features[i]) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("State of Xen feature '%s' differs: " + "source: '%s', destination: '%s'"), + virDomainXenTypeToString(i), + virTristateSwitchTypeToString(src->xen_= features[i]), + virTristateSwitchTypeToString(dst->xen_= features[i])); + return false; + } + + break; + + /* coverity[dead_error_begin] */ + case VIR_DOMAIN_XEN_LAST: + break; + } + } + } + /* kvm */ if (src->features[VIR_DOMAIN_FEATURE_KVM] =3D=3D VIR_TRISTATE_SWITCH_O= N) { for (i =3D 0; i < VIR_DOMAIN_KVM_LAST; i++) { @@ -28959,6 +29036,31 @@ virDomainDefFormatFeatures(virBufferPtr buf, virBufferAddLit(&childBuf, "\n"); break; =20 + case VIR_DOMAIN_FEATURE_XEN: + if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ON) + break; + + virBufferAddLit(&childBuf, "\n"); + virBufferAdjustIndent(&childBuf, 2); + for (j =3D 0; j < VIR_DOMAIN_XEN_LAST; j++) { + switch ((virDomainXen) j) { + case VIR_DOMAIN_XEN_E820_HOST: + if (def->xen_features[j]) + virBufferAsprintf(&childBuf, "<%s state=3D'%s'/>\n= ", + virDomainXenTypeToString(j), + virTristateSwitchTypeToString( + def->xen_features[j])); + break; + + /* coverity[dead_error_begin] */ + case VIR_DOMAIN_XEN_LAST: + break; + } + } + virBufferAdjustIndent(&childBuf, -2); + virBufferAddLit(&childBuf, "\n"); + break; + case VIR_DOMAIN_FEATURE_CAPABILITIES: for (j =3D 0; j < VIR_DOMAIN_PROCES_CAPS_FEATURE_LAST; j++) { if (def->caps_features[j] !=3D VIR_TRISTATE_SWITCH_ABSENT) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index aad3f82..0374494 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1814,6 +1814,7 @@ typedef enum { VIR_DOMAIN_FEATURE_NESTED_HV, VIR_DOMAIN_FEATURE_MSRS, VIR_DOMAIN_FEATURE_CCF_ASSIST, + VIR_DOMAIN_FEATURE_XEN, =20 VIR_DOMAIN_FEATURE_LAST } virDomainFeature; @@ -1860,6 +1861,12 @@ typedef enum { } virDomainMsrsUnknown; =20 typedef enum { + VIR_DOMAIN_XEN_E820_HOST =3D 0, + + VIR_DOMAIN_XEN_LAST +} virDomainXen; + +typedef enum { VIR_DOMAIN_CAPABILITIES_POLICY_DEFAULT =3D 0, VIR_DOMAIN_CAPABILITIES_POLICY_ALLOW, VIR_DOMAIN_CAPABILITIES_POLICY_DENY, @@ -2484,6 +2491,7 @@ struct _virDomainDef { int hyperv_features[VIR_DOMAIN_HYPERV_LAST]; int kvm_features[VIR_DOMAIN_KVM_LAST]; int msrs_features[VIR_DOMAIN_MSRS_LAST]; + int xen_features[VIR_DOMAIN_XEN_LAST]; unsigned int hyperv_spinlocks; int hyperv_stimer_direct; virGICVersion gic_version; @@ -3529,6 +3537,7 @@ VIR_ENUM_DECL(virDomainGraphicsSpiceMouseMode); VIR_ENUM_DECL(virDomainGraphicsVNCSharePolicy); VIR_ENUM_DECL(virDomainHyperv); VIR_ENUM_DECL(virDomainKVM); +VIR_ENUM_DECL(virDomainXen); VIR_ENUM_DECL(virDomainMsrsUnknown); VIR_ENUM_DECL(virDomainRNGModel); VIR_ENUM_DECL(virDomainRNGBackend); diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 971e4a9..cb0ff8d 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -302,6 +302,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, } break; =20 + case VIR_DOMAIN_FEATURE_XEN: case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: case VIR_DOMAIN_FEATURE_HAP: --=20 git-series 0.9.1 From nobody Thu May 2 12:14:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586831953; cv=none; d=zohomail.com; s=zohoarc; b=I8PudQ3ghvkZqQ2jRHxXsuYtQ/l/ptvJaMmOTz++qgrWAVuTXZcb6fgwBRXcOYnXvucetQ4+NfKTWMeUfI2cmjIETkIRZFKDHcf7gyMhg5SkHtpQ1lOkDMv3vxlOJ17IMrfI6qAdFXOAcy8r/im3T/m6WsAn9HH0QGdO8A7bilQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586831953; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KrdfTlntPymqu/CjMJLAA83ywMh+8MVrnJBxm1nRX8o=; b=X9QwNMedrcKL8UmOa8zrvYND/6DOtGrdJH4pkwllGPTuofdg8W+da7vRJxazERQtI/6tq2eFfp/BHI7NborPQo43Rpiye4SXc6y1qm+s7zTjSeyiCwxNMjQDhHDrYglEKJo64incIGZMO/B1xSgNs1ZOMIdRn6L/J4YrweZQfdc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1586831953421761.5778899420071; Mon, 13 Apr 2020 19:39:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-474-0E-f3zCBNZi3H4Kdv01wKA-1; Mon, 13 Apr 2020 22:39:09 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 799258018A4; Tue, 14 Apr 2020 02:39:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 472C2116D82; Tue, 14 Apr 2020 02:39:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E3D1493068; Tue, 14 Apr 2020 02:39:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03E2bWU5022224 for ; Mon, 13 Apr 2020 22:37:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6D41A2166B2B; Tue, 14 Apr 2020 02:37:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 691FA2166B2A for ; Tue, 14 Apr 2020 02:37:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6FBEF101A55E for ; Tue, 14 Apr 2020 02:37:30 +0000 (UTC) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-xRO5CrTdMCCLwMDzuQ8pEg-1; Mon, 13 Apr 2020 22:37:28 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 8FEFA9C5; Mon, 13 Apr 2020 22:37:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 13 Apr 2020 22:37:26 -0400 Received: from localhost.localdomain (ip5b412221.dynamic.kabel-deutschland.de [91.65.34.33]) by mail.messagingengine.com (Postfix) with ESMTPA id 70005306005C; Mon, 13 Apr 2020 22:37:25 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586831952; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KrdfTlntPymqu/CjMJLAA83ywMh+8MVrnJBxm1nRX8o=; b=MiXBk8g1sIs02UkaGSxY/oMJvH881lhv8NFxH2GV8l7uuWu3ykRrxW8NUzo35nwAqoVgpw 0VGkHhwnU0gR85S1o6lagwLiXb/1HcwIYlcqEzLQpogniXy+Z4gxkVKB4Ti8FI6uGbDDJ1 aXfLTPIGfcp+f2vDYSDGKAtkgqgimQg= X-MC-Unique: 0E-f3zCBNZi3H4Kdv01wKA-1 X-MC-Unique: xRO5CrTdMCCLwMDzuQ8pEg-1 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfedtgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucfkphepledurdeihedrfeegrdef feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg hrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Subject: [PATCH v2 2/4] libxl: make use of e820_host feature Date: Tue, 14 Apr 2020 04:37:05 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03E2bWU5022224 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- src/libxl/libxl_conf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index b3f67f8..05d671b 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -692,6 +692,20 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, b_info->u.pv.kernel =3D g_strdup(def->os.kernel); } b_info->u.pv.ramdisk =3D g_strdup(def->os.initrd); + + if (def->features[VIR_DOMAIN_FEATURE_XEN] =3D=3D VIR_TRISTATE_SWIT= CH_ON) { + switch ((virTristateSwitch) def->xen_features[VIR_DOMAIN_XEN_E= 820_HOST]) { + case VIR_TRISTATE_SWITCH_ON: + libxl_defbool_set(&b_info->u.pv.e820_host, true); + break; + case VIR_TRISTATE_SWITCH_OFF: + libxl_defbool_set(&b_info->u.pv.e820_host, false); + break; + case VIR_TRISTATE_SWITCH_ABSENT: + case VIR_TRISTATE_SWITCH_LAST: + break; + } + } } =20 /* only the 'xen' balloon device model is supported */ --=20 git-series 0.9.1 From nobody Thu May 2 12:14:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586831958; cv=none; d=zohomail.com; s=zohoarc; b=TT14kMKc+MIG5XgjCPs68PlACq6REltZ1rmw9m2B1UhdKjKzSvfWQtq8XEJ/WGjIOFAX+rWckv3xcvjnSozIYb5cey47NGqRRhrDw8vQVMeapuu1dTeWScZ8WSCRwoCL/IMe8RQHMVteP53rXEFnMmnu4g7PDTsA5TwGFeLf4Ko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586831958; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5H3h6UgqSwyeUZjV9/eK9WlfaozkCXZi6fSk5QWw1GY=; b=PpxMwykcF4pTeYZ6z+JLPksJOhbcNCM4FtQ1Zi5l2t5RCiZcZc7OsX6iDDQJbspSikeFnN56taTb6p3XMWVjg22i3ZZ/k//ptrm2udhgGHOWa8erg3eBNQTxxkCCJmn2bQwgvbBCD5mIQPzTfdz9c19xbKibmztvMvRWw+Ph4Pw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1586831958979737.6708278879787; Mon, 13 Apr 2020 19:39:18 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-lqXSpYHNP-S0cyRvfdFejQ-1; Mon, 13 Apr 2020 22:39:15 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DB98F1400; Tue, 14 Apr 2020 02:39:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A960060BE0; Tue, 14 Apr 2020 02:39:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 564CC93097; Tue, 14 Apr 2020 02:39:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03E2bXop022238 for ; Mon, 13 Apr 2020 22:37:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 20E1810F8E15; Tue, 14 Apr 2020 02:37:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CFEF10F8E13 for ; Tue, 14 Apr 2020 02:37:33 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 02961800299 for ; Tue, 14 Apr 2020 02:37:33 +0000 (UTC) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-123-k0FUeDGQPnS2byApopKXUA-1; Mon, 13 Apr 2020 22:37:28 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 538CA9E0; Mon, 13 Apr 2020 22:37:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 13 Apr 2020 22:37:27 -0400 Received: from localhost.localdomain (ip5b412221.dynamic.kabel-deutschland.de [91.65.34.33]) by mail.messagingengine.com (Postfix) with ESMTPA id 3843C3060060; Mon, 13 Apr 2020 22:37:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586831957; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5H3h6UgqSwyeUZjV9/eK9WlfaozkCXZi6fSk5QWw1GY=; b=gY9Kr3s0ddWvS5PsBti9O572OxlrntgmNSp2ZFzTfzZRIIw87HWKctpy4ytKwUMyO9hAl9 kDbZ7uL83jquxT6P4zeavxpf1/ZE43mH3TMryLtkvJ+4o5CwcEvmGSBgiqDpUQ3K91V/zv 0PZ32W4keGeBXEx+TBUJzovB68mrETI= X-MC-Unique: lqXSpYHNP-S0cyRvfdFejQ-1 X-MC-Unique: k0FUeDGQPnS2byApopKXUA-1 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfedtgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucfkphepledurdeihedrfeegrdef feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg hrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Subject: [PATCH v2 3/4] xenconfig: parse e820_host option Date: Tue, 14 Apr 2020 04:37:06 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03E2bXop022238 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- src/libxl/xen_common.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index 9a385eb..bbb9739 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -592,6 +592,13 @@ xenParseCPUFeatures(virConfPtr conf, =20 def->clock.timers[def->clock.ntimers - 1] =3D timer; } + } else { + if (xenConfigGetBool(conf, "e820_host", &val, 0) < 0) { + return -1; + } else if (val) { + def->features[VIR_DOMAIN_FEATURE_XEN] =3D VIR_TRISTATE_SWITCH_= ON; + def->xen_features[VIR_DOMAIN_XEN_E820_HOST] =3D VIR_TRISTATE_S= WITCH_ON; + } } =20 return 0; @@ -2138,6 +2145,12 @@ xenFormatCPUFeatures(virConfPtr conf, virDomainDefPt= r def) (def->features[VIR_DOMAIN_FEATURE_VIRIDIAN] = =3D=3D VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) return -1; + } else { + if (def->features[VIR_DOMAIN_FEATURE_XEN] =3D=3D VIR_TRISTATE_SWIT= CH_ON) { + if (def->xen_features[VIR_DOMAIN_XEN_E820_HOST] =3D=3D VIR_TRI= STATE_SWITCH_ON) + if (xenConfigSetInt(conf, "e820_host", 1) < 0) + return -1; + } } =20 for (i =3D 0; i < def->clock.ntimers; i++) { --=20 git-series 0.9.1 From nobody Thu May 2 12:14:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586831929; cv=none; d=zohomail.com; s=zohoarc; b=KerrLvzeuKJaZsShuFCWcjOJBb+ezoh3USxoWdjfAAkivezrwBI5UFA+sIFDPl8HGWitIgPTFDXIPT+eu/7RW7/hzQ/m8tc4JTUHcU1Audr6B5p3LasOcNhRlxkt1aL8SHsVRSTiN/dhYKpDbEDLFnQyu+vkZnuQOiuyo2Rqn3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586831929; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Hn3JSP6Vk+DopR22z+GSsC+/7lSpSPC9pHIAtD0RUm4=; b=bvluefHGRM3FyYjoIgqO+oz3GBsVvvL76k+uUu3g8rk+VZ0GuPjWVhcVU31gc0T1uVudnno3U3fDwuNaybh/lLwO6fivfkS6I7YBFwZcNXWsJDi/USeXDjxLkFOEz3Ghdmj4G237NbegmkTAW6WDLJG3fMTvaBk8VouCOVSMY8Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1586831929869693.5363600259135; Mon, 13 Apr 2020 19:38:49 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-42-3HHn6cphPvSr9Dgx_d-pQw-1; Mon, 13 Apr 2020 22:38:46 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EE33107ACC7; Tue, 14 Apr 2020 02:38:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9688110002B0; Tue, 14 Apr 2020 02:38:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A70C293097; Tue, 14 Apr 2020 02:38:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03E2bWjI022217 for ; Mon, 13 Apr 2020 22:37:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 33D1D2093CED; Tue, 14 Apr 2020 02:37:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FDF22026D68 for ; Tue, 14 Apr 2020 02:37:32 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0CD6A101A55F for ; Tue, 14 Apr 2020 02:37:32 +0000 (UTC) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-221-4zk7aDppPImrtTtlg9qg_Q-1; Mon, 13 Apr 2020 22:37:29 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 19B199EA; Mon, 13 Apr 2020 22:37:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 13 Apr 2020 22:37:28 -0400 Received: from localhost.localdomain (ip5b412221.dynamic.kabel-deutschland.de [91.65.34.33]) by mail.messagingengine.com (Postfix) with ESMTPA id 011413060066; Mon, 13 Apr 2020 22:37:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586831928; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Hn3JSP6Vk+DopR22z+GSsC+/7lSpSPC9pHIAtD0RUm4=; b=eFOk4UHUXP0Ex2TzWOZx0A5R/sU2LnLMbhGDnFoMTNVuS6liA9uCccoE72t52MnDN3GRkF TOiGjlQzWDXG3sMpAI1ytbxQfHwm3dt29fx4nsYesf/Md9pvXgT+T6KzFERgrqMpqucBKx KoXubw/h5jdV3alD6MjKM7lpb+KeNSs= X-MC-Unique: 3HHn6cphPvSr9Dgx_d-pQw-1 X-MC-Unique: 4zk7aDppPImrtTtlg9qg_Q-1 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfedtgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucfkphepledurdeihedrfeegrdef feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg hrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Subject: [PATCH v2 4/4] tests: check e820_host option handling Date: Tue, 14 Apr 2020 04:37:07 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03E2bWjI022217 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- tests/xlconfigdata/test-paravirt-e820_host.cfg | 13 +++++++- tests/xlconfigdata/test-paravirt-e820_host.xml | 37 +++++++++++++++++++- tests/xlconfigtest.c | 1 +- 3 files changed, 51 insertions(+) create mode 100644 tests/xlconfigdata/test-paravirt-e820_host.cfg create mode 100644 tests/xlconfigdata/test-paravirt-e820_host.xml diff --git a/tests/xlconfigdata/test-paravirt-e820_host.cfg b/tests/xlconfi= gdata/test-paravirt-e820_host.cfg new file mode 100644 index 0000000..b9e5a48 --- /dev/null +++ b/tests/xlconfigdata/test-paravirt-e820_host.cfg @@ -0,0 +1,13 @@ +name =3D "XenGuest1" +uuid =3D "45b60f51-88a9-47a8-a3b3-5e66d71b2283" +maxmem =3D 512 +memory =3D 512 +vcpus =3D 4 +e820_host =3D 1 +localtime =3D 0 +on_poweroff =3D "preserve" +on_reboot =3D "restart" +on_crash =3D "preserve" +vif =3D [ "mac=3D5a:36:0e:be:00:09" ] +bootloader =3D "/usr/bin/pygrub" +disk =3D [ "format=3Dqcow2,vdev=3Dxvda,access=3Drw,backendtype=3Dqdisk,tar= get=3D/var/lib/xen/images/debian/disk.qcow2" ] diff --git a/tests/xlconfigdata/test-paravirt-e820_host.xml b/tests/xlconfi= gdata/test-paravirt-e820_host.xml new file mode 100644 index 0000000..955a780 --- /dev/null +++ b/tests/xlconfigdata/test-paravirt-e820_host.xml @@ -0,0 +1,37 @@ + + XenGuest1 + 45b60f51-88a9-47a8-a3b3-5e66d71b2283 + 524288 + 524288 + 4 + /usr/bin/pygrub + + linux + + + + + + + + preserve + restart + preserve + + + + + + + + + + + + + + + + + + diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 8faef16..8ea2503 100644 --- a/tests/xlconfigtest.c +++ b/tests/xlconfigtest.c @@ -300,6 +300,7 @@ mymain(void) DO_TEST("vif-multi-ip"); DO_TEST("usb"); DO_TEST("usbctrl"); + DO_TEST("paravirt-e820_host"); =20 testXLFreeDriver(driver); =20 --=20 git-series 0.9.1