From nobody Wed May 8 02:19:07 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1548438934860165.03705404655227; Fri, 25 Jan 2019 09:55:34 -0800 (PST) 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 E6C938AE45; Fri, 25 Jan 2019 17:55:30 +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 95F3D6E3F6; Fri, 25 Jan 2019 17:55:30 +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 281233F954; Fri, 25 Jan 2019 17:55:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0PHtGl7013649 for ; Fri, 25 Jan 2019 12:55:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 93B7E183E9; Fri, 25 Jan 2019 17:55:16 +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 8C24660930 for ; Fri, 25 Jan 2019 17:55:06 +0000 (UTC) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3947BDF7 for ; Fri, 25 Jan 2019 17:55:04 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id u18so7533347lff.10 for ; Fri, 25 Jan 2019 09:55:04 -0800 (PST) Received: from kloomba.my.domain ([213.147.206.177]) by smtp.gmail.com with ESMTPSA id f20-v6sm1604651ljk.33.2019.01.25.09.55.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 09:55:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9FrOXZ0Q2VpjtqG2fm1UItXY7PpZ4vWe1CvYyEZEVdY=; b=uXejEjxdferPt3KScjCINtMpjO+h56vt5jnBZmhcoJSzm/9y6RmjdxN37C7RdcLxFh EecmmC4XIQng4sxI5ML0YYXFCoiQVrXTcNh0Kru9dpGwm6IMaUiuRK704HjdUAJhXjNB EW9UzpezeOpWgO7klfLK4zObNF/gbFum+Zyfq47/F69yC3guE0HlC/eLfwOWmC/3CxL2 PqOjYTl24lt1bOFsEBciQh+g+/NEVSWQfqSICGf9qZxc9aPxvBK8u1UaT5xGeXubpjoc HJG7g6nuN9GA3IOXCPAcVbzgXSzeZ3cKyqWdHRmBKpx8kPbnumXb4bGGxzAdHEa+BoSk lYog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9FrOXZ0Q2VpjtqG2fm1UItXY7PpZ4vWe1CvYyEZEVdY=; b=lg5Z0U6ZrOR1ZZtgJAoca/vxvlomG+ChUmk4CE6f2HQ7kL7lMqNQk39G+pW92X/XIB 9L0nfBzboz09ZMBXEA5A//FRkIsm7vwMgAarebyPXUF4uVX9c7yY1G+kO+mU3a1R03KB n921/9ii6D7pG4MJgbBWrljIP7r2J81tkbXIY+gXcCV9eVKV+wZIvrlxbNQgl8Kz6qut i/KHeZe0eMTXQ7sZ4YUdLa3E7K/AZPfAeSKZXqEn3OE3NTrNFP/a5xnpfrFpnuvBU4LW t1d0uUFt1dG3DOdShmeb18FYXJviHyPhTSznQht9zdA9e/t968jEwrJCiC3STIv0sdrp +vzw== X-Gm-Message-State: AJcUukdpGDZEKyKSQG/ASIPrBoZ/fBq0abauVsnM3K93D9F1Vb+WJTkX FJftpl+LL6hSWItmSpqSozwMkTZU X-Google-Smtp-Source: ALg8bN7f4vNTJl+RelxNkYrPEDIMF/Cv6lNrIbg1DJUXvywmwIoiBNYlVAKO1j7j+K2YBtie02WliA== X-Received: by 2002:a19:59c2:: with SMTP id n185mr9116151lfb.118.1548438902838; Fri, 25 Jan 2019 09:55:02 -0800 (PST) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 25 Jan 2019 21:54:44 +0400 Message-Id: <20190125175446.12288-2-bogorodskiy@gmail.com> In-Reply-To: <20190125175446.12288-1-bogorodskiy@gmail.com> References: <20190125175446.12288-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 25 Jan 2019 17:55:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 25 Jan 2019 17:55:05 +0000 (UTC) for IP:'209.85.167.65' DOMAIN:'mail-lf1-f65.google.com' HELO:'mail-lf1-f65.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.167.65 mail-lf1-f65.google.com 209.85.167.65 mail-lf1-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH 1/3] conf: introduce 'msrs' feature 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-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.25]); Fri, 25 Jan 2019 17:55:33 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Introduce the 'msrs' feature element that controls Model Specific Registers related behaviour. At this moment it allows only single tunable attribute "ignoreUnknownWrites": Which tells hypervisor to ignore accesses to unimplemented Model Specific Registers. The only user of that for now is going to be the bhyve driver. Signed-off-by: Roman Bogorodskiy --- docs/formatdomain.html.in | 1 + docs/schemas/domaincommon.rng | 14 ++++++++++++++ src/conf/domain_conf.c | 33 +++++++++++++++++++++++++++++++++ src/conf/domain_conf.h | 8 ++++++++ src/qemu/qemu_domain.c | 1 + 5 files changed, 57 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7f07bb7f55..b6496c63db 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2010,6 +2010,7 @@ <tlbflush state=3D'on'/> <ipi state=3D'on'/> <evmcs state=3D'on'/> + <msrs ignoreUnknownWrites=3D'yes'/> </hyperv> <kvm> <hidden state=3D'on'/> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index aa50eac424..e9dd99ab3a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4994,6 +4994,9 @@ + + + @@ -5242,6 +5245,17 @@ =20 + + + + + yes + no + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 22979e6c4e..c8ec3a9011 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -153,6 +153,7 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST, "vmcoreinfo", "htm", "nested-hv", + "msrs", ); =20 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_= LAST, @@ -20232,6 +20233,7 @@ virDomainDefParseXML(xmlDocPtr xml, case VIR_DOMAIN_FEATURE_PRIVNET: case VIR_DOMAIN_FEATURE_HYPERV: case VIR_DOMAIN_FEATURE_KVM: + case VIR_DOMAIN_FEATURE_MSRS: def->features[val] =3D VIR_TRISTATE_SWITCH_ON; break; =20 @@ -20520,6 +20522,26 @@ virDomainDefParseXML(xmlDocPtr xml, def->tseg_specified =3D rv; } =20 + if (def->features[VIR_DOMAIN_FEATURE_MSRS] =3D=3D VIR_TRISTATE_SWITCH_= ON) { + if ((node =3D virXPathNode("./features/msrs", ctxt)) =3D=3D NULL) + goto error; + + if (!(tmp =3D virXMLPropString(node, "ignoreUnknownWrites"))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("missing ignoreUnknownWrites attribute for fe= ature '%s'"), + virDomainFeatureTypeToString(VIR_DOMAIN_FEATURE= _MSRS)); + goto error; + } + + if ((def->msrs_features[VIR_DOMAIN_MSRS_IGNORE_UNKNOWN_WRITES] =3D= virTristateBoolTypeFromString(tmp)) <=3D 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown ignoreUnknownWrites value '%s'"), + tmp); + goto error; + } + VIR_FREE(tmp); + } + if ((n =3D virXPathNodeSet("./features/capabilities/*", ctxt, &nodes))= < 0) goto error; =20 @@ -22582,6 +22604,9 @@ virDomainDefFeaturesCheckABIStability(virDomainDefP= tr src, } break; =20 + case VIR_DOMAIN_FEATURE_MSRS: + break; + case VIR_DOMAIN_FEATURE_LAST: break; } @@ -28647,6 +28672,14 @@ virDomainDefFormatInternal(virDomainDefPtr def, } break; =20 + case VIR_DOMAIN_FEATURE_MSRS: + if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ON) + break; + + virBufferAsprintf(buf, "= \n", + virTristateBoolTypeToString(def->msrs_fe= atures[VIR_DOMAIN_MSRS_IGNORE_UNKNOWN_WRITES])); + break; + /* coverity[dead_error_begin] */ case VIR_DOMAIN_FEATURE_LAST: break; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index f1e6e4e8b7..36926d5e1d 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1782,6 +1782,7 @@ typedef enum { VIR_DOMAIN_FEATURE_VMCOREINFO, VIR_DOMAIN_FEATURE_HTM, VIR_DOMAIN_FEATURE_NESTED_HV, + VIR_DOMAIN_FEATURE_MSRS, =20 VIR_DOMAIN_FEATURE_LAST } virDomainFeature; @@ -1813,6 +1814,12 @@ typedef enum { VIR_DOMAIN_KVM_LAST } virDomainKVM; =20 +typedef enum { + VIR_DOMAIN_MSRS_IGNORE_UNKNOWN_WRITES =3D 0, + + VIR_DOMAIN_MSRS_LAST +} virDomainMsrs; + typedef enum { VIR_DOMAIN_CAPABILITIES_POLICY_DEFAULT =3D 0, VIR_DOMAIN_CAPABILITIES_POLICY_ALLOW, @@ -2466,6 +2473,7 @@ struct _virDomainDef { int caps_features[VIR_DOMAIN_CAPS_FEATURE_LAST]; int hyperv_features[VIR_DOMAIN_HYPERV_LAST]; int kvm_features[VIR_DOMAIN_KVM_LAST]; + int msrs_features[VIR_DOMAIN_MSRS_LAST]; unsigned int hyperv_spinlocks; virGICVersion gic_version; virDomainHPTResizing hpt_resizing; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f42903a343..f484814977 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4030,6 +4030,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def, case VIR_DOMAIN_FEATURE_PMU: case VIR_DOMAIN_FEATURE_VMPORT: case VIR_DOMAIN_FEATURE_VMCOREINFO: + case VIR_DOMAIN_FEATURE_MSRS: case VIR_DOMAIN_FEATURE_LAST: break; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 02:19:07 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1548438925016435.19716761191705; Fri, 25 Jan 2019 09:55:25 -0800 (PST) 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 15A15C09942B; Fri, 25 Jan 2019 17:55: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 C88351821F; Fri, 25 Jan 2019 17:55:20 +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 767F941FB9; Fri, 25 Jan 2019 17:55:20 +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 x0PHtDxJ013639 for ; Fri, 25 Jan 2019 12:55:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 14B6E179DA; Fri, 25 Jan 2019 17:55:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BCD95D9D6 for ; Fri, 25 Jan 2019 17:55:07 +0000 (UTC) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1498A8AE75 for ; Fri, 25 Jan 2019 17:55:06 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id n18-v6so9079044lji.7 for ; Fri, 25 Jan 2019 09:55:05 -0800 (PST) Received: from kloomba.my.domain ([213.147.206.177]) by smtp.gmail.com with ESMTPSA id f20-v6sm1604651ljk.33.2019.01.25.09.55.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 09:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q9T3gK8ZR56RTpDmPyQcv0zf+F/SBRfgqeEY1CQ0YUM=; b=HTgqTVBf0AoUzh3LPg/wAp/x7EoncX+YLXv9BIUv2hycfoYztBEetnTLJpwPgRFw5b ZkTenez5uAbrU3xplv360tKSGptywwLH1It7m2ufN4H9gZkP1z8VORDH2XNTYFB+rntx oUTAwAuPYbKqLoLbgE3pQgxnHniNI9AlMleokKUlN1yKVxPtSZDE2HbJ55nIL72CZDgg lINZAtRtLtFmoug/D2db4UQJJDHyrfiRUlT8sPrt7Bx/ew/vD32Dt4djOKDWqz1YNQTv THPaCZvOAIb8NBND5d1R7c8kyX9DKBJAqUFSKyEqum6ouZ+H4tWbdMGJDB4Vx9PtbJL4 qbAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q9T3gK8ZR56RTpDmPyQcv0zf+F/SBRfgqeEY1CQ0YUM=; b=Re561tuZ4FTx31k/PFrheE1Xz5WgnnCswHfHbxMcUj0ets1JAdwTz80lZV1CzhOOH3 THU4/A806zsVRXYgjye2DF7iIj2irIhiTjDBIQweSP2+aRd7VPoH3o0mKIjHBlKHqVrX GPWnlHNKR9/y+yHpox+l0FVGxxSFBoZPFsYDflS+PR949Ic4prA1PFqWVd4UfCddZ7AQ IREdOW9tADbpBopIVMl+61flKdrOG4xFf00DeF7vzllRaKiS8Nhv/+bN5r+1AgD9rlEJ UjXRPucfLtthX4jaWqwW9jvWbWB+3qCfGMb1P/Ihyncc/aIwPBbl5/ts/CebtT7HzHgw 2Y1g== X-Gm-Message-State: AJcUukffwr113EuzzQY3ZnGeZ/OQJtjryNg5nudqPhX8vRpAuWTG4D5a uzAOp0IdgqSt0zarBqQ1Cr40+vri X-Google-Smtp-Source: ALg8bN78ab0Yd1f4VQUl3W8C+95+lhclMwEMxt6p+RL/ocQQRgYmHls+ilas/zphokHwN9Wzg3tOvg== X-Received: by 2002:a2e:3a04:: with SMTP id h4-v6mr10448519lja.81.1548438904049; Fri, 25 Jan 2019 09:55:04 -0800 (PST) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 25 Jan 2019 21:54:45 +0400 Message-Id: <20190125175446.12288-3-bogorodskiy@gmail.com> In-Reply-To: <20190125175446.12288-1-bogorodskiy@gmail.com> References: <20190125175446.12288-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 25 Jan 2019 17:55:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 25 Jan 2019 17:55:06 +0000 (UTC) for IP:'209.85.208.194' DOMAIN:'mail-lj1-f194.google.com' HELO:'mail-lj1-f194.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.208.194 mail-lj1-f194.google.com 209.85.208.194 mail-lj1-f194.google.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH 2/3] bhyve: implement MSRs ignore unknown writes feature 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-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.31]); Fri, 25 Jan 2019 17:55:23 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Implement the MSRs ignore unkown writes feature that's specified using: ... ... in the domain XML. In bhyve, it's just passing '-w' command line argument to the bhyve(8) executable. Signed-off-by: Roman Bogorodskiy --- docs/drvbhyve.html.in | 16 +++++++++ src/bhyve/bhyve_command.c | 4 +++ .../bhyvexml2argvdata/bhyvexml2argv-msrs.args | 10 ++++++ .../bhyvexml2argv-msrs.ldargs | 3 ++ .../bhyvexml2argvdata/bhyvexml2argv-msrs.xml | 26 ++++++++++++++ tests/bhyvexml2argvtest.c | 1 + .../bhyvexml2xmlout-msrs.xml | 36 +++++++++++++++++++ tests/bhyvexml2xmltest.c | 1 + 8 files changed, 97 insertions(+) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-msrs.xml create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-msrs.xml diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in index b4d7df2edb..5d67bf358e 100644 --- a/docs/drvbhyve.html.in +++ b/docs/drvbhyve.html.in @@ -462,5 +462,21 @@ Example:

</domain> =20 +

Ignoring unknown MSRs writes

+ +

Some guests might require ignoring unknown Model Specific Registers (MS= Rs) writes. +Since 5.1.0 it's possible to switch this on u= sing:

+
+<domain type=3D"bhyve">
+    ...
+  <features>
+    <msrs ignoreUnknownWrites=3D'yes'/>
+  </features>
+    ...
+</domain>
+
+ +

By default unknown writes are not ignored.

+ diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 84fda08943..ae2d989a95 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -505,6 +505,10 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, virCommandAddArg(cmd, "-A"); /* Create an ACPI table */ if (def->features[VIR_DOMAIN_FEATURE_APIC] =3D=3D VIR_TRISTATE_SWITCH_= ON) virCommandAddArg(cmd, "-I"); /* Present ioapic to the guest */ + if (def->features[VIR_DOMAIN_FEATURE_MSRS] =3D=3D VIR_TRISTATE_SWITCH_= ON) { + if (def->msrs_features[VIR_DOMAIN_MSRS_IGNORE_UNKNOWN_WRITES] =3D= =3D VIR_TRISTATE_SWITCH_ON) + virCommandAddArg(cmd, "-w"); + } =20 switch (def->clock.offset) { case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args b/tests/bhyvex= ml2argvdata/bhyvexml2argv-msrs.args new file mode 100644 index 0000000000..dbe377421b --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args @@ -0,0 +1,10 @@ +/usr/sbin/bhyve \ +-c 1 \ +-m 214 \ +-w \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-s 2:0,ahci,hd:/tmp/freebsd.img \ +-s 3:0,virtio-net,faketapdev,mac=3D52:54:00:b9:94:02 bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs b/tests/bhyv= exml2argvdata/bhyvexml2argv-msrs.ldargs new file mode 100644 index 0000000000..32538b558e --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs @@ -0,0 +1,3 @@ +/usr/sbin/bhyveload \ +-m 214 \ +-d /tmp/freebsd.img bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.xml b/tests/bhyvexm= l2argvdata/bhyvexml2argv-msrs.xml new file mode 100644 index 0000000000..7543eb682c --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.xml @@ -0,0 +1,26 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + + hvm + + + + + + + + + +
+ + + + + +
+ + + diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index d1b486fa64..5ea5b26466 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -210,6 +210,7 @@ mymain(void) DO_TEST("vnc-autoport"); DO_TEST("cputopology"); DO_TEST_FAILURE("cputopology-nvcpu-mismatch"); + DO_TEST("msrs"); =20 /* Address allocation tests */ DO_TEST("addr-single-sata-disk"); diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-msrs.xml b/tests/bhy= vexml2xmloutdata/bhyvexml2xmlout-msrs.xml new file mode 100644 index 0000000000..dcf53703bf --- /dev/null +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-msrs.xml @@ -0,0 +1,36 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + + + + +
+ + + +
+ + + + + +
+ + + diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index 6aaeab741e..916bf38c66 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -110,6 +110,7 @@ mymain(void) DO_TEST_DIFFERENT("vnc-vgaconf-off"); DO_TEST_DIFFERENT("vnc-vgaconf-io"); DO_TEST_DIFFERENT("vnc-autoport"); + DO_TEST_DIFFERENT("msrs"); =20 /* Address allocation tests */ DO_TEST_DIFFERENT("addr-single-sata-disk"); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 02:19:07 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1548438938903328.8917944635805; Fri, 25 Jan 2019 09:55:38 -0800 (PST) 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 BE99D144046; Fri, 25 Jan 2019 17:55:35 +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 782FE60BF1; Fri, 25 Jan 2019 17:55:35 +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 13EBF18033A1; Fri, 25 Jan 2019 17:55:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0PHtG95013650 for ; Fri, 25 Jan 2019 12:55:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 94090183FC; Fri, 25 Jan 2019 17:55:16 +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 8C60918782 for ; Fri, 25 Jan 2019 17:55:08 +0000 (UTC) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 61E009F748 for ; Fri, 25 Jan 2019 17:55:07 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id u18so7533473lff.10 for ; Fri, 25 Jan 2019 09:55:07 -0800 (PST) Received: from kloomba.my.domain ([213.147.206.177]) by smtp.gmail.com with ESMTPSA id f20-v6sm1604651ljk.33.2019.01.25.09.55.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 09:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9Fw5m5/mkPIxftlpiec+qeu6FtO6HuIrJ+AWUS9AiSY=; b=lG8fNssFY0mlwnBrqnBIJpdNad/PTLDgze9po5+A0kIjYOgPxJKOibW7cp5gDiGgXi 7yXgbG3cUl994BJuCxo10yETq+L9AP5nZNpq4M/xruCz3bhiS5ZFdnfeeoTTNWvBKdpI iSAaAT6yweEVlv2ip3jWFG8LLNNixhqRQddxckOknnQ7DKHHmUeoanIPUwYDMopUq4uG 3dkCDh7DbGAAVkGbzPy7KrDfl8DrJGVHACpV6bZZ2sPwFpfwofGmo8g0thUasm9vHGLj iCe5h5df/UqlItrNPSwckUwAiQLLdfCS8o1asEF9MTtoJjC/PdVLHtinbitaKhaIb8/1 h+ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9Fw5m5/mkPIxftlpiec+qeu6FtO6HuIrJ+AWUS9AiSY=; b=UC5d6D+6b2w4XD5CisauF8DrPREd+AYv6HAQF5qIQNeQxxGX7s1E8ZWuv2zOFFeZrt lj+pGlqWMK9njdhnb4m1alJs4JImH+Tm6nRGOQAk88OlfYSN6TQ1VhS46+pVNOW3xPdy V6yMt/BRPjM2Z58K0xTLpJbUAptP/FBQ0KuvfhLzhR4zU2uVGGRnjgf7+AS0S/B6zzPh nzpYAaz3zK55BqVEj9GO/PKc756hvtopPUErPoK39CdDbehnb5l/FN5/PF5BR+MlY7Un 8iEz41Z32D/ePfqSDs8u6bs2u8CvW3QR5BQQCSC1Dz6AVY9omd4hYVCfhVg8ArlViruf JZxw== X-Gm-Message-State: AJcUukdqjarTPN2+uY9GcYtbXCAF4lmw2dKPrFav6CNCqIc81fIcYi1u qYEWH9fxO3zcEAi6Qd0nOhTbX/V9 X-Google-Smtp-Source: ALg8bN6GvgAn9tCVboT2sBFRPf+mlQag3j356ET+iwaRg/FtekFu7niNq9Mu31/kxOB2qQv8bTmc3g== X-Received: by 2002:a19:280f:: with SMTP id o15mr9829577lfo.0.1548438905390; Fri, 25 Jan 2019 09:55:05 -0800 (PST) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 25 Jan 2019 21:54:46 +0400 Message-Id: <20190125175446.12288-4-bogorodskiy@gmail.com> In-Reply-To: <20190125175446.12288-1-bogorodskiy@gmail.com> References: <20190125175446.12288-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 25 Jan 2019 17:55:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 25 Jan 2019 17:55:07 +0000 (UTC) for IP:'209.85.167.65' DOMAIN:'mail-lf1-f65.google.com' HELO:'mail-lf1-f65.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.167.65 mail-lf1-f65.google.com 209.85.167.65 mail-lf1-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH 3/3] news: document bhyve msrs feature 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-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.38]); Fri, 25 Jan 2019 17:55:36 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Describe bhyve's ignoring unknown MSRs writes feature introduced by commit 525918ac5c. Signed-off-by: Roman Bogorodskiy --- docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index bc11791d03..2acb51a082 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -63,6 +63,17 @@ capabilities whether KVM nesting support is available. + + + bhyve: support for ignoring unknown MSRs writes + + + A new features element <msrs ignoreUnknownWrites=3D'yes'/>= was + introduced and the bhyve driver supports it to control unknown + Model Specific Registers (MSRs) writes. + + +
--=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list