From nobody Sat May 4 00:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153731898212362.15215428059901; Tue, 18 Sep 2018 18:03:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 42E1988310; Wed, 19 Sep 2018 01:02:59 +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 D1B5F600C8; Wed, 19 Sep 2018 01:02: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 20D25180053A; Wed, 19 Sep 2018 01:02:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8J12uoZ016300 for ; Tue, 18 Sep 2018 21:02:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2BBA6308BDA2; Wed, 19 Sep 2018 01:02:56 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21620308BDA0 for ; Wed, 19 Sep 2018 01:02:54 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C78F99E614 for ; Wed, 19 Sep 2018 01:02:52 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 3E47721F85; Tue, 18 Sep 2018 21:02:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 18 Sep 2018 21:02:52 -0400 Received: from localhost.localdomain (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id 85ADEE46BC; Tue, 18 Sep 2018 21:02:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:in-reply-to:message-id:mime-version :references:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=DGxPzF43PunW744qTySip1fC2quYQc7lHxEop9/9r T4=; b=UacGLYX4lo9uw+axEzAjWerWMqGg/LAbjlfx/WYsn7Tr6Li82hRFj2Y04 Dlu7V4UQX0Q+KXQ9U2oaRv1U4+MNNJUS4cS+D7cPO7BzSJl6uKnLcGNSlxhTaSjf SYnKu22T72JvyksYRf5pQpqK8ZRn/YzZNyduy8P3cXVwiM5QHzmTP7+emnCtXPvT Tfqb55l9d/Qms1t6tD1ZE6IlE50Z1b+iwLVlHdylB3XviZdGSZAf03h9BjCXZIWB 2E3e+zaPyD4CV6riaTQWQqoBiA2TdT5/AJNLE2bmk6dkf+B8clqu9W+WJrLDM0Zm nmtjumBPVfkq5IZ7SvNZhpO9jWXSw== X-ME-Proxy: X-ME-Sender: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Wed, 19 Sep 2018 02:50:30 +0200 Message-Id: <99c2cdd2ce3627df85ea6bfc758fc6ed82310099.1537318168.git-series.marmarek@invisiblethingslab.com> In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 19 Sep 2018 01:02:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 19 Sep 2018 01:02:53 +0000 (UTC) for IP:'66.111.4.25' DOMAIN:'out1-smtp.messagingengine.com' HELO:'out1-smtp.messagingengine.com' FROM:'marmarek@invisiblethingslab.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS) 66.111.4.25 out1-smtp.messagingengine.com 66.111.4.25 out1-smtp.messagingengine.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/8] docs: add documentation of arch element of capabilities.xml 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 19 Sep 2018 01:03:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Specifically, list sub-elements and where they can be used. In addition, describe supported machine types for Xen. Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- Changes in v2: - clarify type@domain description, add a link to domain xml there --- docs/formatcaps.html.in | 22 +++++++++++++++++++++- docs/formatdomain.html.in | 11 ++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/docs/formatcaps.html.in b/docs/formatcaps.html.in index 41a9a3a..0d9c53d 100644 --- a/docs/formatcaps.html.in +++ b/docs/formatcaps.html.in @@ -91,7 +91,27 @@ =20
arch
-
This element brings some information on supported guest archit= ecture.
+
This element brings some information on supported guest + architecture. Possible subelements are: +
+
wordsize
Size of CPU word in bits, fo= r example 64.
+
emulator
Emulator (device model) path= , for + use in emulato= r + element of domain XML.
+
loader
Loader path, for use in + loader eleme= nt of domain + XML.
+
machine
Machine type, for use in + machine= + attribute of os/type element in domain XML. For example Xen + supports xenfv for HVM or xenpv for + PV.
+
domain
The type attribut= e of + this element specifies the type of hypervisor required to ru= n the + domain. Use in type + attribute of the domain root element.
+
+
=20
features
This optional element encases possible features that can be us= ed diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 1f12ab5..8189959 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -19,7 +19,8 @@

The root element required for all virtual machines is named domain. It has two attributes, the - type specifies the hypervisor used for running + type + specifies the hypervisor used for running the domain. The allowed values are driver specific, but include "xen", "kvm", "qemu", "lxc" and "kqemu". The second attribute is id which is a unique @@ -148,11 +149,11 @@ (badly named!) refers to an OS that supports the Xen 3 hypervisor guest ABI. There are also two optional attributes, arch specifying the CPU architecture to virtualization, - and machine referring to the machine - type. The Capabilities XML + and machine refe= rring + to the machine type. The Capabilities = XML provides details on allowed values for these. Since 0.0.1

-
loader
+
loader
The optional loader tag refers to a firmware blob, which is specified by absolute path, used to assist the domain creation process. It is used by Xen @@ -2621,7 +2622,7 @@ ... =20
-
emulator
+
emulator
The contents of the emulator element specify the fully qualified path to the device model emulator binary. --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 00:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153731898212360.105909676945544; Tue, 18 Sep 2018 18:03:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5D0CC83F42; Wed, 19 Sep 2018 01:02:59 +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 C5D1717B5A; Wed, 19 Sep 2018 01:02: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 205ED4BB75; Wed, 19 Sep 2018 01:02:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8J12uw7016305 for ; Tue, 18 Sep 2018 21:02:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8384B89F2A; Wed, 19 Sep 2018 01:02:56 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C18188EB3 for ; Wed, 19 Sep 2018 01:02:54 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6C76C8553D for ; Wed, 19 Sep 2018 01:02:53 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D4F8921F3C; Tue, 18 Sep 2018 21:02:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 18 Sep 2018 21:02:52 -0400 Received: from localhost.localdomain (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id 2CC17E4121; Tue, 18 Sep 2018 21:02:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:in-reply-to:message-id:mime-version :references:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=7U9kRyvFqhjKoHYjzsSk2VBUgfVKo8YE+YbahVjc3 cE=; b=XLKJNXKfrSuCgo1BSx9pGj28uZGaSr8f6SeTEMha6redUQiP7dGHDZkQe MJ5NGSxaHPm8HHixVOf9Tcm/hAxp4LniLYGe08Cegx/Qbk6U+q9n/FTlF9FvS+Gv zDDBWuzsHcoq2ioj8boAry5hjX5NqGPQ52IZqQ3csOD8v34mS4TcinTBlnOyYNQf q6pW5X6YZOvDsL19ToPtWY1iosHRmpM1YU83KSCwV9H1EFuFflQrneudVTrGc/ND w7Unl2Ti+7XInu/uQlhGp/e7sI/uVJiBbUe6fonmzXkwYAyGE3mW5z2mtsjUaBeP 7aaPz6DTQisR+j8sqkZc0iErYRbQA== X-ME-Proxy: X-ME-Sender: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Wed, 19 Sep 2018 02:50:31 +0200 Message-Id: <9381a6be578f5ea4c70a99a7c5fa31984f3da240.1537318168.git-series.marmarek@invisiblethingslab.com> In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 19 Sep 2018 01:02:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 19 Sep 2018 01:02:53 +0000 (UTC) for IP:'66.111.4.25' DOMAIN:'out1-smtp.messagingengine.com' HELO:'out1-smtp.messagingengine.com' FROM:'marmarek@invisiblethingslab.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS) 66.111.4.25 out1-smtp.messagingengine.com 66.111.4.25 out1-smtp.messagingengine.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/8] libxl: set shadow memory for any guest type, not only HVM 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 19 Sep 2018 01:03:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Otherwise starting PVH guest will result in "arch_setup_bootlate: mapping shared_info failed (pfn=3D..., rc=3D-1, errno: 12): Internal error". After this change the behavior is the same as in `xl`. Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- src/libxl/libxl_conf.c | 10 +++++----- tests/libxlxml2domconfigdata/basic-pv.json | 1 + tests/libxlxml2domconfigdata/multiple-ip.json | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 998029d..476bcbe 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -634,11 +634,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, return -1; } #endif - - /* Allow libxl to calculate shadow memory requirements */ - b_info->shadow_memkb =3D - libxl_get_required_shadow_memory(b_info->max_memkb, - b_info->max_vcpus); } else { /* * For compatibility with the legacy xen toolstack, default to pyg= rub @@ -692,6 +687,11 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, } } =20 + /* Allow libxl to calculate shadow memory requirements */ + b_info->shadow_memkb =3D + libxl_get_required_shadow_memory(b_info->max_memkb, + b_info->max_vcpus); + return 0; } =20 diff --git a/tests/libxlxml2domconfigdata/basic-pv.json b/tests/libxlxml2do= mconfigdata/basic-pv.json index 0f846da..b71c3b0 100644 --- a/tests/libxlxml2domconfigdata/basic-pv.json +++ b/tests/libxlxml2domconfigdata/basic-pv.json @@ -14,6 +14,7 @@ ], "max_memkb": 524288, "target_memkb": 524288, + "shadow_memkb": 8192, "sched_params": { =20 }, diff --git a/tests/libxlxml2domconfigdata/multiple-ip.json b/tests/libxlxml= 2domconfigdata/multiple-ip.json index 80dca82..2db98b8 100644 --- a/tests/libxlxml2domconfigdata/multiple-ip.json +++ b/tests/libxlxml2domconfigdata/multiple-ip.json @@ -14,6 +14,7 @@ ], "max_memkb": 524288, "target_memkb": 524288, + "shadow_memkb": 8192, "sched_params": { =20 }, --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 00:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1537319003316421.64858965082556; Tue, 18 Sep 2018 18:03:23 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id B6C733001702; Wed, 19 Sep 2018 01:03:21 +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 82CB251DFE; Wed, 19 Sep 2018 01:03:21 +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 369B44A472; Wed, 19 Sep 2018 01:03:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8J12vi8016329 for ; Tue, 18 Sep 2018 21:02:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id CD6E810694C6; Wed, 19 Sep 2018 01:02:57 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C45DB1001F56 for ; Wed, 19 Sep 2018 01:02:55 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 107483084042 for ; Wed, 19 Sep 2018 01:02:55 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8480521F6E; Tue, 18 Sep 2018 21:02:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 18 Sep 2018 21:02:53 -0400 Received: from localhost.localdomain (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id C91EFE47E1; Tue, 18 Sep 2018 21:02:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:in-reply-to:message-id:mime-version :references:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=iU1XlXdzTK+4hTxwbtVXaZrb2nEx1zruXpZtHawSq AU=; b=GjOd6g47IKdsJBUBNza1u5iLfVJVZrzfDrSqIlf2BYecekWg5Zb4Rk1pD i8me7lkbYSAxtPQNoDY9P36V6Lgbld2CUhrkVShtmSfohpQkBanbOBwqxLnQO8Wn wwQCXno94Cf7rghWMrtQ7wgep7dNuni5nC/ONPUzT/1ESkEBEpKmtR3dm/lj6w8+ cbY7ZBq6JIimt7n9NUmCIrjFiVhUvrv3JbzbZ7Qi3H5mGJUgpQ8IMAyaC1c3OjyW iGxQtXLGEybCs6laKmG1RH4gRhnrxEQ4Dic0WqsvpzS3N4gt6XdL++vNraT8aWer lvHeJ0Osn8ck79rysQfb55k10dzmg== X-ME-Proxy: X-ME-Sender: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Wed, 19 Sep 2018 02:50:32 +0200 Message-Id: <51c73817aa762145a4e3b5e73f635de2fd3b5028.1537318168.git-series.marmarek@invisiblethingslab.com> In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 19 Sep 2018 01:02:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 19 Sep 2018 01:02:55 +0000 (UTC) for IP:'66.111.4.25' DOMAIN:'out1-smtp.messagingengine.com' HELO:'out1-smtp.messagingengine.com' FROM:'marmarek@invisiblethingslab.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS) 66.111.4.25 out1-smtp.messagingengine.com 66.111.4.25 out1-smtp.messagingengine.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/8] libxl: prefer new location of nested_hvm in libxl_domain_build_info 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 19 Sep 2018 01:03:22 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 If available, use b_info->nested_hvm instead of b_info->u.hvm.nested_hvm. This will make nested HVM config available also for PVH domains. Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- src/libxl/libxl_conf.c | 13 ++++++++++++- tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 2 +- tests/libxlxml2domconfigdata/vnuma-hvm.json | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 476bcbe..e2bfa2f 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -455,7 +455,18 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, } } } - libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); +#ifdef LIBXL_HAVE_BUILDINFO_NESTED_HVM + libxl_defbool_set(&b_info->nested_hvm, hasHwVirt); +#else + if (hvm) { + libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); + } else { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported nested HVM setting for %s machine o= n this Xen version"), + def->os.machine); + return -1; + } +#endif } =20 if (def->cpu && def->cpu->mode =3D=3D VIR_CPU_MODE_CUSTOM) { diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json b/tests/libxl= xml2domconfigdata/fullvirt-cpuid.json index cdc8b98..d46b464 100644 --- a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json +++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json @@ -21,11 +21,11 @@ ], "sched_params": { }, + "nested_hvm": "False", "type.hvm": { "pae": "True", "apic": "True", "acpi": "True", - "nested_hvm": "False", "nographic": "True", "vnc": { "enable": "False" diff --git a/tests/libxlxml2domconfigdata/vnuma-hvm.json b/tests/libxlxml2d= omconfigdata/vnuma-hvm.json index 3b2fc5f..02c10a9 100644 --- a/tests/libxlxml2domconfigdata/vnuma-hvm.json +++ b/tests/libxlxml2domconfigdata/vnuma-hvm.json @@ -109,11 +109,11 @@ "sched_params": { =20 }, + "nested_hvm": "True", "type.hvm": { "pae": "True", "apic": "True", "acpi": "True", - "nested_hvm": "True", "vga": { "kind": "cirrus" }, --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 00:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1537318983618711.3957126438157; Tue, 18 Sep 2018 18:03:03 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 1FF028553D; Wed, 19 Sep 2018 01:03:01 +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 DC18D1882B; Wed, 19 Sep 2018 01:03:00 +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 8A5124BB7F; Wed, 19 Sep 2018 01:03:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8J12vGH016318 for ; Tue, 18 Sep 2018 21:02:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 47A9B89F2A; Wed, 19 Sep 2018 01:02:57 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C28688EB3 for ; Wed, 19 Sep 2018 01:02:57 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4BC4D8667E for ; Wed, 19 Sep 2018 01:02:56 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2772021F99; Tue, 18 Sep 2018 21:02:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 18 Sep 2018 21:02:54 -0400 Received: from localhost.localdomain (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id 6F42EE4121; Tue, 18 Sep 2018 21:02:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:in-reply-to:message-id:mime-version :references:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=cDVJwn/EG4YSOnwxcybtwGrBER2i2N/9crgN0u4aZ 9M=; b=eHqcWJWAZQtEh4yAGtqMsQaaeQLMQ2ugeAcHc9CQ2ZlDyGFw1JxQS0vuX yuuo0/DQex05roRYreiMezSwbo/4ndKgOugizkEUEMjozxI+oWyuF0yEYwtAh/Wi kbv6ol56xZDC/TNCbVG1Vl2T5zxHDmmup1AikmOvKOoc0+xqV/uGbNxHtNabbkc7 lQzMBCI5B+2ZxPTv31h+1GrwyOsg6L9RQSn69h923RiyEriX5vq5+ERb0zQvb6gR 7G1xWxJPxaD3f1Xl60lde334hlWaiK0UC3k4rEmi0YSDrDatdZimS3cTcQQK8z6y o1C3KtenAK8z5JiMVEFjit7m+2TqQ== X-ME-Proxy: X-ME-Sender: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Wed, 19 Sep 2018 02:50:33 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 19 Sep 2018 01:02:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 19 Sep 2018 01:02:56 +0000 (UTC) for IP:'66.111.4.25' DOMAIN:'out1-smtp.messagingengine.com' HELO:'out1-smtp.messagingengine.com' FROM:'marmarek@invisiblethingslab.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS) 66.111.4.25 out1-smtp.messagingengine.com 66.111.4.25 out1-smtp.messagingengine.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/8] libxl: reorder libxlMakeDomBuildInfo for upcoming PVH support 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 19 Sep 2018 01:03:01 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Make it easier to share HVM and PVH code where relevant. No functional change. Signed-off-by: Marek Marczykowski-G=C3=B3recki --- src/libxl/libxl_conf.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index e2bfa2f..f3da0ed 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -376,18 +376,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, b_info->max_memkb =3D virDomainDefGetMemoryInitial(def); b_info->target_memkb =3D def->mem.cur_balloon; if (hvm) { - char bootorder[VIR_DOMAIN_BOOT_LAST + 1]; - - libxl_defbool_set(&b_info->u.hvm.pae, - def->features[VIR_DOMAIN_FEATURE_PAE] =3D=3D - VIR_TRISTATE_SWITCH_ON); - libxl_defbool_set(&b_info->u.hvm.apic, - def->features[VIR_DOMAIN_FEATURE_APIC] =3D=3D - VIR_TRISTATE_SWITCH_ON); - libxl_defbool_set(&b_info->u.hvm.acpi, - def->features[VIR_DOMAIN_FEATURE_ACPI] =3D=3D - VIR_TRISTATE_SWITCH_ON); - if (caps && def->cpu && def->cpu->mode =3D=3D (VIR_CPU_MODE_HOST_PASSTHROU= GH)) { bool hasHwVirt =3D false; @@ -474,6 +462,20 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, "mode=3Dhost-passthrough to avoid risk of changed gue= st " "semantics when mode=3Dcustom is supported in the fut= ure"); } + } + + if (hvm) { + char bootorder[VIR_DOMAIN_BOOT_LAST + 1]; + + libxl_defbool_set(&b_info->u.hvm.pae, + def->features[VIR_DOMAIN_FEATURE_PAE] =3D=3D + VIR_TRISTATE_SWITCH_ON); + libxl_defbool_set(&b_info->u.hvm.apic, + def->features[VIR_DOMAIN_FEATURE_APIC] =3D=3D + VIR_TRISTATE_SWITCH_ON); + libxl_defbool_set(&b_info->u.hvm.acpi, + def->features[VIR_DOMAIN_FEATURE_ACPI] =3D=3D + VIR_TRISTATE_SWITCH_ON); =20 if (def->nsounds > 0) { /* --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 00:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1537319008173848.3535574937619; Tue, 18 Sep 2018 18:03:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B87D030015FC; Wed, 19 Sep 2018 01:03:25 +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 85C1B3091327; Wed, 19 Sep 2018 01:03:25 +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 42BDD18005DF; Wed, 19 Sep 2018 01:03:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8J130jH016348 for ; Tue, 18 Sep 2018 21:03:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 569357E4D0; Wed, 19 Sep 2018 01:03:00 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4AC5C7DEF0 for ; Wed, 19 Sep 2018 01:02:57 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4BBF386674 for ; Wed, 19 Sep 2018 01:02:56 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id CB5AF21F3C; Tue, 18 Sep 2018 21:02:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 18 Sep 2018 21:02:54 -0400 Received: from localhost.localdomain (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id 16554E405A; Tue, 18 Sep 2018 21:02:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:in-reply-to:message-id:mime-version :references:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=UaDPQximLLozO2NQAK9ISNnuhlel0vvUogIRtyYQ+ dU=; b=VhWFtGDw51yk8UAvGVgfhbyOM/TI8clhQbqIg/RMp19k+r7aocql/btZ9 q5bgGJXwX6b2Zz3nKhcJ8nMHowRxuw3yic48QSeSWVCmCOpK3wueTuQr8PSWF3ZG xb5nNFtvYvVHC3aLbaOTm0dP7zxUEYYBMf5WGF1MNcwSQoRLjPLm4tSIB2h9Loid IUyeEph8DsrU2XsAk1WYt0vm+wknO6cZV9GvD103aVod0hxItuBkBs/kELb1vgl1 TAM5sqIwLPLufaeFykfN8oklRqn8ZvI4vHeKGv0OWSgmL/TZeDgCl3yuwcW/K429 8N7/2NF5nsYGBKUrIlNbieyKn/P1g== X-ME-Proxy: X-ME-Sender: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Wed, 19 Sep 2018 02:50:34 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 19 Sep 2018 01:02:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 19 Sep 2018 01:02:56 +0000 (UTC) for IP:'66.111.4.25' DOMAIN:'out1-smtp.messagingengine.com' HELO:'out1-smtp.messagingengine.com' FROM:'marmarek@invisiblethingslab.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS) 66.111.4.25 out1-smtp.messagingengine.com 66.111.4.25 out1-smtp.messagingengine.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 5/8] libxl: add support for PVH 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 19 Sep 2018 01:03:26 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Since this is something between PV and HVM, it makes sense to put the setting in place where domain type is specified. To enable it, use .... It is also included in capabilities.xml, for every supported HVM guest type - it doesn't seems to be any other requirement (besides new enough Xen). Signed-off-by: Marek Marczykowski-G=C3=B3recki --- Changes in v2 proposed by Jim: - use new_arch_added var instead of i =3D=3D nr_guest_archs for clarity - improve comment - adjust for now required Xen >=3D 4.6 (remove part for Xen < 4.5) --- docs/formatcaps.html.in | 4 ++-- docs/schemas/domaincommon.rng | 1 + src/libxl/libxl_capabilities.c | 33 ++++++++++++++++++++++++++++++--- src/libxl/libxl_conf.c | 32 +++++++++++++++++++++++++++----- src/libxl/libxl_driver.c | 6 ++++-- 5 files changed, 64 insertions(+), 12 deletions(-) diff --git a/docs/formatcaps.html.in b/docs/formatcaps.html.in index 0d9c53d..b8102fd 100644 --- a/docs/formatcaps.html.in +++ b/docs/formatcaps.html.in @@ -104,8 +104,8 @@
machine
Machine type, for use in machine= attribute of os/type element in domain XML. For example Xen - supports xenfv for HVM or xenpv for - PV.
+ supports xenfv for HVM, xenpv for + PV, or xenpvh for PVHv2.
domain
The type attribut= e of this element specifies the type of hypervisor required to ru= n the domain. Use in type diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 099a949..820a7c6 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -341,6 +341,7 @@ xenpv xenfv + xenpvh diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 18596c7..446fa4c 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -57,6 +57,7 @@ struct guest_arch { virArch arch; int bits; int hvm; + int pvh; int pae; int nonpae; int ia64_be; @@ -439,6 +440,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps) int hvm =3D STRPREFIX(&token[subs[1].rm_so], "hvm"); virArch arch; int pae =3D 0, nonpae =3D 0, ia64_be =3D 0; + bool new_arch_added =3D false; =20 if (STRPREFIX(&token[subs[2].rm_so], "x86_32")) { arch =3D VIR_ARCH_I686; @@ -475,8 +477,10 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps) if (i >=3D ARRAY_CARDINALITY(guest_archs)) continue; /* Didn't find a match, so create a new one */ - if (i =3D=3D nr_guest_archs) + if (i =3D=3D nr_guest_archs) { nr_guest_archs++; + new_arch_added =3D true; + } =20 guest_archs[i].arch =3D arch; guest_archs[i].hvm =3D hvm; @@ -491,13 +495,34 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps) guest_archs[i].nonpae =3D nonpae; if (ia64_be) guest_archs[i].ia64_be =3D ia64_be; + + /* + * Xen 4.9 introduced support for the PVH guest type, which + * requires hardware virtualization support similar to the + * HVM guest type. Add a PVH guest type for each new HVM + * guest type. + */ + if ((ver_info->xen_version_major > 4 || + (ver_info->xen_version_major =3D=3D 4 && + ver_info->xen_version_minor >=3D 9)) && + hvm && new_arch_added) { + i =3D nr_guest_archs; + /* Ensure we have not exhausted the guest_archs array */ + if (nr_guest_archs >=3D ARRAY_CARDINALITY(guest_archs)) + continue; + guest_archs[nr_guest_archs].arch =3D arch; + guest_archs[nr_guest_archs].pvh =3D 1; + nr_guest_archs++; + } } } regfree(®ex); =20 for (i =3D 0; i < nr_guest_archs; ++i) { virCapsGuestPtr guest; - char const *const xen_machines[] =3D {guest_archs[i].hvm ? "xenfv"= : "xenpv"}; + char const *const xen_machines[] =3D { + guest_archs[i].hvm ? "xenfv" : + (guest_archs[i].pvh ? "xenpvh" : "xenpv")}; virCapsGuestMachinePtr *machines; =20 if ((machines =3D virCapabilitiesAllocMachines(xen_machines, 1)) = =3D=3D NULL) @@ -557,7 +582,9 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps) 1, 0) =3D=3D NULL) return -1; + } =20 + if (guest_archs[i].hvm || guest_archs[i].pvh) { if (virCapabilitiesAddGuestFeature(guest, "hap", 1, @@ -580,7 +607,7 @@ libxlMakeDomainOSCaps(const char *machine, =20 os->supported =3D true; =20 - if (STREQ(machine, "xenpv")) + if (STREQ(machine, "xenpv") || STREQ(machine, "xenpvh")) return 0; =20 capsLoader->supported =3D true; diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index f3da0ed..5541a72 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -133,8 +133,11 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx, =20 libxl_domain_create_info_init(c_info); =20 - if (def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM) { - c_info->type =3D LIBXL_DOMAIN_TYPE_HVM; + if (def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM || + (def->os.type =3D=3D VIR_DOMAIN_OSTYPE_XEN && + STREQ(def->os.machine, "xenpvh"))) { + c_info->type =3D def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM ? + LIBXL_DOMAIN_TYPE_HVM : LIBXL_DOMAIN_TYPE_PVH; switch ((virTristateSwitch) def->features[VIR_DOMAIN_FEATURE_HAP])= { case VIR_TRISTATE_SWITCH_OFF: libxl_defbool_set(&c_info->hap, false); @@ -276,7 +279,8 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, virDomainClockDef clock =3D def->clock; libxl_ctx *ctx =3D cfg->ctx; libxl_domain_build_info *b_info =3D &d_config->b_info; - int hvm =3D def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM; + bool hvm =3D def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM; + bool pvh =3D STREQ(def->os.machine, "xenpvh"); size_t i; size_t nusbdevice =3D 0; =20 @@ -284,6 +288,8 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, =20 if (hvm) libxl_domain_build_info_init_type(b_info, LIBXL_DOMAIN_TYPE_HVM); + else if (pvh) + libxl_domain_build_info_init_type(b_info, LIBXL_DOMAIN_TYPE_PVH); else libxl_domain_build_info_init_type(b_info, LIBXL_DOMAIN_TYPE_PV); =20 @@ -375,7 +381,7 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, def->mem.cur_balloon =3D VIR_ROUND_UP(def->mem.cur_balloon, 1024); b_info->max_memkb =3D virDomainDefGetMemoryInitial(def); b_info->target_memkb =3D def->mem.cur_balloon; - if (hvm) { + if (hvm || pvh) { if (caps && def->cpu && def->cpu->mode =3D=3D (VIR_CPU_MODE_HOST_PASSTHROU= GH)) { bool hasHwVirt =3D false; @@ -647,6 +653,22 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, return -1; } #endif + } else if (pvh) { + if (VIR_STRDUP(b_info->cmdline, def->os.cmdline) < 0) + return -1; + if (VIR_STRDUP(b_info->kernel, def->os.kernel) < 0) + return -1; + if (VIR_STRDUP(b_info->ramdisk, def->os.initrd) < 0) + return -1; +#ifdef LIBXL_HAVE_BUILDINFO_BOOTLOADER + if (VIR_STRDUP(b_info->bootloader, def->os.bootloader) < 0) + return -1; + if (def->os.bootloaderArgs) { + if (!(b_info->bootloader_args =3D + virStringSplit(def->os.bootloaderArgs, " \t\n", 0))) + return -1; + } +#endif } else { /* * For compatibility with the legacy xen toolstack, default to pyg= rub @@ -1230,7 +1252,7 @@ libxlMakeNic(virDomainDefPtr def, STRNEQ(l_nic->model, "netfront")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("only model 'netfront' is supported for " - "Xen PV domains")); + "Xen PV(H) domains")); return -1; } if (VIR_STRDUP(x_nic->model, l_nic->model) < 0) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index efd47a3..6287cef 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -6398,9 +6398,11 @@ libxlConnectGetDomainCapabilities(virConnectPtr conn, emulatorbin =3D "/usr/bin/qemu-system-x86_64"; =20 if (machine) { - if (STRNEQ(machine, "xenpv") && STRNEQ(machine, "xenfv")) { + if (STRNEQ(machine, "xenpv") && + STRNEQ(machine, "xenpvh") && + STRNEQ(machine, "xenfv")) { virReportError(VIR_ERR_INVALID_ARG, "%s", - _("Xen only supports 'xenpv' and 'xenfv' machin= es")); + _("Xen only supports 'xenpv', 'xenpvh' and 'xen= fv' machines")); goto cleanup; } } else { --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 00:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1537318992268621.0321802936286; Tue, 18 Sep 2018 18:03:12 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 55BEF3091D52; Wed, 19 Sep 2018 01:03:10 +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 1FAA97C395; Wed, 19 Sep 2018 01:03:10 +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 C2DFA4A46E; Wed, 19 Sep 2018 01:03:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8J12xD9016340 for ; Tue, 18 Sep 2018 21:02:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 43B941882B; Wed, 19 Sep 2018 01:02:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B11F5C2E6 for ; Wed, 19 Sep 2018 01:02:57 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 53BCD30224B6 for ; Wed, 19 Sep 2018 01:02:56 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id B8FCF21FA2; Tue, 18 Sep 2018 21:02:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 18 Sep 2018 21:02:55 -0400 Received: from localhost.localdomain (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id B223EE479F; Tue, 18 Sep 2018 21:02:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:in-reply-to:message-id:mime-version :references:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=Rw4oiOucSCG9bpES4mQAg6w1lfEhjqYnSUYWbMolm NM=; b=DADUxkvUmgQObE/4/+h9ZwDdFYn3d8I/6OwiACZFdmPr4wLMSBtwP/AwB ElboJpKgtqp+/byA+ZmS6RR7M59x70hZaSHoNrke4sGKeoKC0pr+Vjz0y4Y3ikA+ WDIex2AcfRag0YYbDxxZ2bKhTGEofZlz9az6o8VvCH6fxwuiyvh38xUA3RwjE5A9 ltVuXJVepl/gk+QH92lcq3qA8lu4l7myLasRh4NWV9uquR7cw5e0qMdwxppWR/U6 lQarmXMWfYMD2ejjFAE7QrSWtTY72wAccHjluWmtCFROvjg5k1nsJFu3h6IFXlh2 DC+AFf8GDHS8wh5Yk5uEFi2U0rqxA== X-ME-Proxy: X-ME-Sender: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Wed, 19 Sep 2018 02:50:35 +0200 Message-Id: <6fc052b0fedca1aed4a592f9c9db53bda040c278.1537318168.git-series.marmarek@invisiblethingslab.com> In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 19 Sep 2018 01:02:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 19 Sep 2018 01:02:56 +0000 (UTC) for IP:'66.111.4.25' DOMAIN:'out1-smtp.messagingengine.com' HELO:'out1-smtp.messagingengine.com' FROM:'marmarek@invisiblethingslab.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS) 66.111.4.25 out1-smtp.messagingengine.com 66.111.4.25 out1-smtp.messagingengine.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 6/8] tests: add basic Xen PVH test 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 19 Sep 2018 01:03:10 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Marek Marczykowski-G=C3=B3recki --- tests/libxlxml2domconfigdata/basic-pvh.json | 49 ++++++++++++++++++++++- tests/libxlxml2domconfigdata/basic-pvh.xml | 28 +++++++++++++- tests/libxlxml2domconfigtest.c | 1 +- 3 files changed, 78 insertions(+) create mode 100644 tests/libxlxml2domconfigdata/basic-pvh.json create mode 100644 tests/libxlxml2domconfigdata/basic-pvh.xml diff --git a/tests/libxlxml2domconfigdata/basic-pvh.json b/tests/libxlxml2d= omconfigdata/basic-pvh.json new file mode 100644 index 0000000..48365c9 --- /dev/null +++ b/tests/libxlxml2domconfigdata/basic-pvh.json @@ -0,0 +1,49 @@ +{ + "c_info": { + "type": "pvh", + "name": "test-pvh", + "uuid": "039e9ee6-4a84-3055-4c81-8ba426ae2656" + }, + "b_info": { + "max_vcpus": 4, + "avail_vcpus": [ + 0, + 1, + 2, + 3 + ], + "max_memkb": 524288, + "target_memkb": 524288, + "shadow_memkb": 8192, + "sched_params": { + + }, + "kernel": "/boot/vmlinuz", + "ramdisk": "/boot/initrd.img", + "type.pvh": { + }, + "arch_arm": { + + } + }, + "disks": [ + { + "pdev_path": "/var/lib/xen/images/test-pv.img", + "vdev": "xvda", + "backend": "qdisk", + "format": "raw", + "removable": 1, + "readwrite": 1 + } + ], + "nics": [ + { + "devid": 0, + "mac": "00:16:3e:3e:86:60", + "bridge": "br0", + "script": "/etc/xen/scripts/vif-bridge", + "nictype": "vif" + } + ], + "on_reboot": "restart" +} diff --git a/tests/libxlxml2domconfigdata/basic-pvh.xml b/tests/libxlxml2do= mconfigdata/basic-pvh.xml new file mode 100644 index 0000000..7576596 --- /dev/null +++ b/tests/libxlxml2domconfigdata/basic-pvh.xml @@ -0,0 +1,28 @@ + + test-pvh + 039e9ee6-4a84-3055-4c81-8ba426ae2656 + 524288 + 524288 + 4 + + linux + /boot/vmlinuz + /boot/initrd.img + + + destroy + restart + destroy + + + + + + + + + +