From nobody Fri Apr 26 04:59:23 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.zoho.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 1499137461273216.2326575835848; Mon, 3 Jul 2017 20:04:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36878624B3; Tue, 4 Jul 2017 03:04:19 +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 075B5171C9; Tue, 4 Jul 2017 03:04:18 +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 1ADA31803B26; Tue, 4 Jul 2017 03:04:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6434CUt015997 for ; Mon, 3 Jul 2017 23:04:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3DC456E8D1; Tue, 4 Jul 2017 03:04:12 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3589C6E8D0 for ; Tue, 4 Jul 2017 03:04:11 +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 AEE54C060205 for ; Tue, 4 Jul 2017 03:04:09 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 3234F20BB3; Mon, 3 Jul 2017 23:04:09 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 03 Jul 2017 23:04:09 -0400 Received: from devel-3rdparty.localdomain (89-70-103-23.dynamic.chello.pl [89.70.103.23]) by mail.messagingengine.com (Postfix) with ESMTPA id 797AE24726; Mon, 3 Jul 2017 23:04:08 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 36878624B3 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 36878624B3 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hBrU3NCe" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AEE54C060205 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=marmarek@invisiblethingslab.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AEE54C060205 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:x-sasl-enc; s=fm1; bh=I8815fYLT8J/LsW5BhMwtOSRggW3UW w+2NP49oqnQR0=; b=hBrU3NCeo5+/NQUu1EmhLdVWF+OCEj+zv81SVtI8ZXFg94 OGUDlXC0hmS/pRVEn83iqyeRKWuPmaJJaQ+n5TEfi4bVniffOUUTLvTME5Jh1OlZ oGfQ0AVGLhYNjChQxts8MZFepMOhxtPUvRRCKhUdX5zEBiRp7+ardLPzoVVJ6LL9 lv1h9h6kp/EJmJowG/DPGRDjp4MQxmzNVHgM0pLyl508z3iSwJ04KscIwe3z2wLT yP2MrqLTnbEfJE2zXNmcOGDVi2GVK+47Pkc+EJEq7WhUc6yEK9qH1c0gJTJ+HX6/ mxmzoKLPIi6Nnp6QPq8A04dmthdZSCc1r1PiVsBA== X-ME-Sender: X-Sasl-enc: gaiiborvSLxMAjMMWz7me75GqF4On0jO+THlDROD/KeP 1499137448 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Tue, 4 Jul 2017 05:03:44 +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 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 03:04:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 03:04:09 +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.32 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL) 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.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/4] cpu: define sub-leaf 0 for leaf 7 in cpu_map.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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 04 Jul 2017 03:04:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 CPUID leaf 7 is sub-leaf aware. Add missing attribute. Signed-off-by: Marek Marczykowski-G=C3=B3recki --- Changes since v1: - format ecx_in=3D'0x00' --- src/cpu/cpu_map.xml | 58 +++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 29b5b59..8e7ac49 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -195,93 +195,93 @@ =20 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + =20 - + - + - + =20 - + - + =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 Fri Apr 26 04:59:23 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.zoho.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 1499137461150141.33418163905117; Mon, 3 Jul 2017 20:04:21 -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 46BD287649; Tue, 4 Jul 2017 03:04:19 +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 10BA06EC9F; Tue, 4 Jul 2017 03:04:19 +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 A8F621804753; Tue, 4 Jul 2017 03:04:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6434DW8016007 for ; Mon, 3 Jul 2017 23:04:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 20D916128D; Tue, 4 Jul 2017 03:04:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1AC2261293 for ; Tue, 4 Jul 2017 03:04:11 +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 76ACE7EBDE for ; Tue, 4 Jul 2017 03:04:10 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id F2EE820BBF; Mon, 3 Jul 2017 23:04:09 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 03 Jul 2017 23:04:09 -0400 Received: from devel-3rdparty.localdomain (89-70-103-23.dynamic.chello.pl [89.70.103.23]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C9E0246E8; Mon, 3 Jul 2017 23:04:09 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 46BD287649 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 46BD287649 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="EH79Ftu2" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 76ACE7EBDE Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=marmarek@invisiblethingslab.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 76ACE7EBDE 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:x-sasl-enc; s=fm1; bh=68RPiMzTYb9rubUAt6Wg2guuypldcf v9qBnQX/Oioic=; b=EH79Ftu2kg7Jp/sBF4ncXSTbwI6QUyWAt26spu5Cw4uRAv mu8raZM4R4+0P63VoWYxtRJdbRlUdiVjGL5PcvkQajo9X7T5yw6VOkzE0ftw45CN AfDzgoIqQhNxB+JXq25cSx9wP/6JTtkJB6yfjY0GdqTWH4FmI/Grwcx2ZqShHca8 Mwo1/n2rczmmioJSv/p7KGKbelqFub68HJU71+ZLfa2fbxOLNiiXF4Ga10W6HrUA Fj50Uno55w/uQU/q+xRSp4WeBnXAJTS9Hra97zr/FpPd0mX9rveAdVfzImgUjYX6 JUR/+tJHGVvHY/B1/H18bw3GqZ2P+AbWu6EyF6zw== X-ME-Sender: X-Sasl-enc: 2BsjZfLVqHbiSag1qwIESEVAAJMKS+2mlmtbC8Ubgf1h 1499137449 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Tue, 4 Jul 2017 05:03:45 +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 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 04 Jul 2017 03:04:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 04 Jul 2017 03:04:10 +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.32 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL) 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.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/4] libxl: add support for CPUID features policy 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.26]); Tue, 04 Jul 2017 03:04:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Convert CPU features policy into libxl cpuid policy settings. Use new ("libxl") syntax, which allow to enable/disable specific bits, using host CPU as a base. For this reason, accept only "host-passthrough" mode. Libxl do not have distinction between "force" and "required" policy (there is only "force") and also between "forbid" and "disable" (there is only "disable"). So, merge them appropriately. If anything, "require" and "forbid" should be enforced outside of specific driver. Signed-off-by: Marek Marczykowski-G=C3=B3recki --- Changes since v1: - use new ("libxl") syntax to set only bits explicitly mentioned in domain XML --- src/libxl/libxl_conf.c | 77 ++++++++++++++++++++++++++++++++++++++++--- src/libxl/libxl_conf.h | 1 +- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index a0a53c2..0cf51a8 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -291,6 +291,44 @@ libxlMakeChrdevStr(virDomainChrDefPtr def, char **buf) return 0; } =20 +static const char *libxlTranslateCPUFeature(const char *virCPUFeatureName) +{ + /* libxl use different names for some CPUID bits */ + if (STREQ(virCPUFeatureName, "cx16")) + return "cmpxchg16"; + if (STREQ(virCPUFeatureName, "cid")) + return "cntxid"; + if (STREQ(virCPUFeatureName, "ds_cpl")) + return "dscpl"; + if (STREQ(virCPUFeatureName, "pclmuldq")) + return "pclmulqdq"; + if (STREQ(virCPUFeatureName, "pni")) + return "sse3"; + if (STREQ(virCPUFeatureName, "ht")) + return "htt"; + if (STREQ(virCPUFeatureName, "pn")) + return "psn"; + if (STREQ(virCPUFeatureName, "clflush")) + return "clfsh"; + if (STREQ(virCPUFeatureName, "sep")) + return "sysenter"; + if (STREQ(virCPUFeatureName, "cx8")) + return "cmpxchg8"; + if (STREQ(virCPUFeatureName, "nodeid_msr")) + return "nodeid"; + if (STREQ(virCPUFeatureName, "cr8legacy")) + return "altmovcr8"; + if (STREQ(virCPUFeatureName, "lahf_lm")) + return "lahfsahf"; + if (STREQ(virCPUFeatureName, "cmp_legacy")) + return "cmplegacy"; + if (STREQ(virCPUFeatureName, "fxsr_opt")) + return "ffxsr"; + if (STREQ(virCPUFeatureName, "pdpe1gb")) + return "page1gb"; + return virCPUFeatureName; +} + static int libxlMakeDomBuildInfo(virDomainDefPtr def, libxl_ctx *ctx, @@ -376,10 +414,18 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, def->features[VIR_DOMAIN_FEATURE_ACPI] =3D=3D VIR_TRISTATE_SWITCH_ON); =20 - if (caps && - def->cpu && def->cpu->mode =3D=3D (VIR_CPU_MODE_HOST_PASSTHROU= GH)) { + if (caps && def->cpu) { bool hasHwVirt =3D false; bool svm =3D false, vmx =3D false; + char xlCPU[32]; + + if (def->cpu->mode !=3D (VIR_CPU_MODE_HOST_PASSTHROUGH)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported cpu mode '%s'"), + virCPUModeTypeToString(def->cpu->mode)); + return -1; + } + =20 if (ARCH_IS_X86(def->os.arch)) { vmx =3D virCPUCheckFeature(caps->host.arch, caps->host.cpu= , "vmx"); @@ -394,20 +440,43 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, =20 case VIR_CPU_FEATURE_DISABLE: case VIR_CPU_FEATURE_FORBID: + snprintf(xlCPU, + sizeof(xlCPU), + "%s=3D0", + libxlTranslateCPUFeature( + def->cpu->features[i].name)); + if (libxl_cpuid_parse_config(&b_info->cpuid, x= lCPU)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported cpu feature '%s'"), + def->cpu->features[i].name); + return -1; + } if ((vmx && STREQ(def->cpu->features[i].name, = "vmx")) || - (svm && STREQ(def->cpu->features[i].name, = "svm"))) + (svm && STREQ(def->cpu->features[i].na= me, "svm"))) hasHwVirt =3D false; break; =20 case VIR_CPU_FEATURE_FORCE: case VIR_CPU_FEATURE_REQUIRE: + snprintf(xlCPU, + sizeof(xlCPU), + "%s=3D1", + libxlTranslateCPUFeature( + def->cpu->features[i].name)); + if (libxl_cpuid_parse_config(&b_info->cpuid, x= lCPU)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported cpu feature '%s'"), + def->cpu->features[i].name); + return -1; + } + break; case VIR_CPU_FEATURE_OPTIONAL: case VIR_CPU_FEATURE_LAST: break; } } + libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); } - libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); } =20 if (def->nsounds > 0) { diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 264df11..8d89ccd 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -60,6 +60,7 @@ # define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump" # define LIBXL_CHANNEL_DIR LIBXL_LIB_DIR "/channel/target" # define LIBXL_BOOTLOADER_PATH "pygrub" +# define LIBXL_DEFAULT_CPUID_REG_CONFIG "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" =20 =20 typedef struct _libxlDriverPrivate libxlDriverPrivate; --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 26 04:59:23 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.zoho.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 1499137479286431.89034926792726; Mon, 3 Jul 2017 20:04:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9F1E80C0C; Tue, 4 Jul 2017 03:04:37 +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 C15D36FF1F; Tue, 4 Jul 2017 03:04:37 +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 7A2DF4A492; Tue, 4 Jul 2017 03:04:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6434DeV016006 for ; Mon, 3 Jul 2017 23:04:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1E9065D96B; Tue, 4 Jul 2017 03:04:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 199AA6128F for ; Tue, 4 Jul 2017 03:04:12 +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 64F4F3B73C for ; Tue, 4 Jul 2017 03:04:11 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E2DB720BBC; Mon, 3 Jul 2017 23:04:10 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 03 Jul 2017 23:04:10 -0400 Received: from devel-3rdparty.localdomain (89-70-103-23.dynamic.chello.pl [89.70.103.23]) by mail.messagingengine.com (Postfix) with ESMTPA id 1AC45246E8; Mon, 3 Jul 2017 23:04:09 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E9F1E80C0C Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E9F1E80C0C Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Vy68Z2kO" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 64F4F3B73C Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=marmarek@invisiblethingslab.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 64F4F3B73C 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:x-sasl-enc; s=fm1; bh=VsC0Q0DgvNVeFwc+TbIF0YFtsV3x9D 7YD3matmyGLyM=; b=Vy68Z2kOp99/BVJkV8yYhrCHZJdLmyvQtp+heDprq8SJfG Je0d0AxWCa/BU6ILblXZYFf28jaht/abXdeCD059zEP2r2X3pLQ2KpDODye2XluX MMEcosGGAteR5cx1oM4LZ17W89zIejB4shijyq3PxMRK08U/z9F/i/2AJ4bYqowG qNKji62PbOvl8+YEP237D0ABnArH1T17zjqrCOsYREs7+lm8QY9ilN7qrFM+qh5/ 6SHSXdNWyuzBjEgp+bL9VTbiVKpQI9IaqSPndRmNFHLI9KCKZwX6de4GS/8NBINU amLv1gHq1h6hBTr+iN7GEWqVWOrGoNGOJjzW2o0Q== X-ME-Sender: X-Sasl-enc: 3Ab0Dgg8s33uuUrRbkizAz/CWzyNMSxyYNHg+yv23j0H 1499137450 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Tue, 4 Jul 2017 05:03:46 +0200 Message-Id: <2ecf81e208c75ae08a13d904a871863cc4221e56.1499137349.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 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 04 Jul 2017 03:04:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 04 Jul 2017 03:04:11 +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.32 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL) 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.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/4] tests: switch libxlxml2domconfig test to use testXLInintCaps 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 04 Jul 2017 03:04:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 As name suggests, it's a better choice for libxl test. Important differences: - advertise x86_64 guests support - initialize host CPU caps Signed-off-by: Marek Marczykowski-G=C3=B3recki --- Changes since v1: - new patch, applicable over Jim's test suite for libxl_domain_config generator Cc: Jim Fehlig --- tests/libxlxml2domconfigdata/basic-pv.xml | 2 +- tests/libxlxml2domconfigtest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libxlxml2domconfigdata/basic-pv.xml b/tests/libxlxml2dom= configdata/basic-pv.xml index b3bc601..eba3cc6 100644 --- a/tests/libxlxml2domconfigdata/basic-pv.xml +++ b/tests/libxlxml2domconfigdata/basic-pv.xml @@ -6,7 +6,7 @@ 4 pygrub - linux + linux destroy diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c index d943cf2..ecdb1fe 100644 --- a/tests/libxlxml2domconfigtest.c +++ b/tests/libxlxml2domconfigtest.c @@ -173,7 +173,7 @@ mymain(void) return EXIT_FAILURE; } =20 - if ((xencaps =3D testXenCapsInit()) =3D=3D NULL) + if ((xencaps =3D testXLInitCaps()) =3D=3D NULL) return EXIT_FAILURE; =20 # define DO_TEST(name) \ --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 26 04:59:23 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.zoho.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 1499137461398429.00467339192517; Mon, 3 Jul 2017 20:04:21 -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 4626A7DCE9; Tue, 4 Jul 2017 03:04:19 +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 CD1FD6EC9D; Tue, 4 Jul 2017 03:04:18 +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 8BECD1800C94; Tue, 4 Jul 2017 03:04:17 +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 v6434FBk016037 for ; Mon, 3 Jul 2017 23:04:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7DFAC74AD6; Tue, 4 Jul 2017 03:04:15 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7663E171C9 for ; Tue, 4 Jul 2017 03:04:13 +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 586533DE3E for ; Tue, 4 Jul 2017 03:04:12 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D64F220BBF; Mon, 3 Jul 2017 23:04:11 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 03 Jul 2017 23:04:11 -0400 Received: from devel-3rdparty.localdomain (89-70-103-23.dynamic.chello.pl [89.70.103.23]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C2FB246E8; Mon, 3 Jul 2017 23:04:10 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4626A7DCE9 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4626A7DCE9 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="bbMoXTL4" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 586533DE3E Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=marmarek@invisiblethingslab.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 586533DE3E 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:x-sasl-enc; s=fm1; bh=sLpfTLYkTdl7H7b9cKmm4GkEQNNf8q Qk921+KEZDaTI=; b=bbMoXTL4DglLtqIZnwVe40EAlDi2Ylo+/i4mXF8B/DkGl1 jGiV4s8EphXEqyDw0KGW7MNKEmJzwLf17L8ysu9A8+KPCPZtE1hc+dBsRQ6YPjpC e94cbYo/98odhpSXVP4DtURTjs48srVuFN/TkSmbBkdxRTxHVR70RqakJqcku3Hg h6b+I71iWvNe4NfhlJOzA7OxNOIDX0wClx9DYGCEatCU1evMzu/1pgzzWivxxrTb 9BIC0+K2YH5R+kfIDdX/qKzU4q6UvnIrfPliKVLy1jiG5k0AhsCpnMXUa6pyAKbY ETl/o9kGseVex/Z1S3PEehkL7jYl2cAOsg7xtUsQ== X-ME-Sender: X-Sasl-enc: hQ51vXVvlHCWcN4oM72BdjED+QWetUfn48i19D4EjtZk 1499137451 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Tue, 4 Jul 2017 05:03:47 +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 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Jul 2017 03:04:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Jul 2017 03:04:12 +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.32 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL) 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.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/4] tests: check CPU features handling in libxl driver 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.27]); Tue, 04 Jul 2017 03:04:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Test enabling/disabling individual CPU features and also setting nested HVM support, which is also controlled by CPU features node. Signed-off-by: Marek Marczykowski-G=C3=B3recki --- Changes since v1: - rewritten to Jim's test suite for libxl_domain_config generator Cc: Jim Fehlig --- tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 64 +++++++++++++++++- tests/libxlxml2domconfigdata/fullvirt-cpuid.xml | 37 ++++++++++- tests/libxlxml2domconfigtest.c | 1 +- 3 files changed, 102 insertions(+) create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.json create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.xml diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json b/tests/libxl= xml2domconfigdata/fullvirt-cpuid.json new file mode 100644 index 0000000..234e592 --- /dev/null +++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json @@ -0,0 +1,64 @@ +{ + "c_info": { + "type": "hvm", + "name": "XenGuest2", + "uuid": "c7a5fdb2-cdaf-9455-926a-d65c16db1809" + }, + "b_info": { + "max_vcpus": 1, + "avail_vcpus": [ + 0 + ], + "max_memkb": 592896, + "target_memkb": 403456, + "video_memkb": 8192, + "shadow_memkb": 5656, + "cpuid": [ + { + "leaf": 1, + "ecx": "xxxxxxxxxxxxxxxxxxxxxxxxxx0xxxx0", + "edx": "xxxxxxxxxxxxxxxxxxxxxxxxxxx1xxxx" + } + ], + "sched_params": { + "weight": 1000 + }, + "type.hvm": { + "pae": "True", + "apic": "True", + "acpi": "True", + "vga": { + + }, + "nested_hvm": "False", + "vnc": { + "enable": "False" + }, + "sdl": { + "enable": "False" + }, + "spice": { + + }, + "boot": "c", + "rdm": { + + } + }, + "arch_arm": { + + } + }, + "disks": [ + { + "pdev_path": "/dev/HostVG/XenGuest2", + "vdev": "hda", + "backend": "phy", + "format": "raw", + "removable": 1, + "readwrite": 1 + } + ], + "on_reboot": "restart", + "on_crash": "restart" +} diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid.xml b/tests/libxlx= ml2domconfigdata/fullvirt-cpuid.xml new file mode 100644 index 0000000..e9eba2e --- /dev/null +++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid.xml @@ -0,0 +1,37 @@ + + XenGuest2 + c7a5fdb2-cdaf-9455-926a-d65c16db1809 + 592896 + 403456 + 1 + + hvm + + + + + + + + + + + + + destroy + restart + restart + + + + + +
+ + + + + + diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c index ecdb1fe..1627e9e 100644 --- a/tests/libxlxml2domconfigtest.c +++ b/tests/libxlxml2domconfigtest.c @@ -189,6 +189,7 @@ mymain(void) DO_TEST("basic-pv"); DO_TEST("basic-hvm"); DO_TEST("moredevs-hvm"); + DO_TEST("fullvirt-cpuid"); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list