From nobody Sun May 19 00:42:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166783774386747.46171028280878; Mon, 7 Nov 2022 08:15:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1os4lM-0006hn-QG; Mon, 07 Nov 2022 11:14:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os4lK-0006gR-La; Mon, 07 Nov 2022 11:14:15 -0500 Received: from gandalf.ozlabs.org ([150.107.74.76]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os4lI-0003Ri-1r; Mon, 07 Nov 2022 11:14:14 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4N5brl5SxQz4xGj; Tue, 8 Nov 2022 03:13:59 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4N5brj3GP2z4x1G; Tue, 8 Nov 2022 03:13:57 +1100 (AEDT) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org Cc: Thomas Huth , Matthew Rosato , Eric Farman , David Hildenbrand , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH for 7.2 1/2] Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property" Date: Mon, 7 Nov 2022 17:13:48 +0100 Message-Id: <20221107161349.1032730-2-clg@kaod.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107161349.1032730-1-clg@kaod.org> References: <20221107161349.1032730-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=150.107.74.76; envelope-from=SRS0=Ye/0=3H=kaod.org=clg@ozlabs.org; helo=gandalf.ozlabs.org X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667837745075100004 From: C=C3=A9dric Le Goater This reverts commit 59d1ce44396e3ad2330dc3261ff3da7ad3a16184. The "zpcii-disable" machine property is redundant with the "interpret" zPCI device property. Remove it for clarification. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Matthew Rosato --- include/hw/s390x/s390-virtio-ccw.h | 1 - hw/s390x/s390-pci-kvm.c | 4 +--- hw/s390x/s390-virtio-ccw.c | 24 ------------------------ util/qemu-config.c | 4 ---- qemu-options.hx | 8 +------- 5 files changed, 2 insertions(+), 39 deletions(-) diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-vir= tio-ccw.h index 4f8a39abda..9bba21a916 100644 --- a/include/hw/s390x/s390-virtio-ccw.h +++ b/include/hw/s390x/s390-virtio-ccw.h @@ -27,7 +27,6 @@ struct S390CcwMachineState { bool aes_key_wrap; bool dea_key_wrap; bool pv; - bool zpcii_disable; uint8_t loadparm[8]; }; =20 diff --git a/hw/s390x/s390-pci-kvm.c b/hw/s390x/s390-pci-kvm.c index 5eb7fd12e2..9134fe185f 100644 --- a/hw/s390x/s390-pci-kvm.c +++ b/hw/s390x/s390-pci-kvm.c @@ -22,9 +22,7 @@ =20 bool s390_pci_kvm_interp_allowed(void) { - return (kvm_s390_get_zpci_op() && !s390_is_pv() && - !object_property_get_bool(OBJECT(qdev_get_machine()), - "zpcii-disable", NULL)); + return kvm_s390_get_zpci_op() && !s390_is_pv(); } =20 int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool as= sist) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 560ddbb6fb..bb98d40792 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -627,21 +627,6 @@ static inline void machine_set_dea_key_wrap(Object *ob= j, bool value, ms->dea_key_wrap =3D value; } =20 -static inline bool machine_get_zpcii_disable(Object *obj, Error **errp) -{ - S390CcwMachineState *ms =3D S390_CCW_MACHINE(obj); - - return ms->zpcii_disable; -} - -static inline void machine_set_zpcii_disable(Object *obj, bool value, - Error **errp) -{ - S390CcwMachineState *ms =3D S390_CCW_MACHINE(obj); - - ms->zpcii_disable =3D value; -} - static S390CcwMachineClass *current_mc; =20 /* @@ -778,12 +763,6 @@ static void ccw_machine_class_init(ObjectClass *oc, vo= id *data) "Up to 8 chars in set of [A-Za-z0-9. ] (lower case chars conve= rted" " to upper case) to pass to machine loader, boot manager," " and guest kernel"); - - object_class_property_add_bool(oc, "zpcii-disable", - machine_get_zpcii_disable, - machine_set_zpcii_disable); - object_class_property_set_description(oc, "zpcii-disable", - "disable zPCI interpretation facilties"); } =20 static inline void s390_machine_initfn(Object *obj) @@ -792,7 +771,6 @@ static inline void s390_machine_initfn(Object *obj) =20 ms->aes_key_wrap =3D true; ms->dea_key_wrap =3D true; - ms->zpcii_disable =3D false; } =20 static const TypeInfo ccw_machine_info =3D { @@ -857,12 +835,10 @@ DEFINE_CCW_MACHINE(7_2, "7.2", true); static void ccw_machine_7_1_instance_options(MachineState *machine) { static const S390FeatInit qemu_cpu_feat =3D { S390_FEAT_LIST_QEMU_V7_1= }; - S390CcwMachineState *ms =3D S390_CCW_MACHINE(machine); =20 ccw_machine_7_2_instance_options(machine); s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAIE); s390_set_qemu_cpu_model(0x8561, 15, 1, qemu_cpu_feat); - ms->zpcii_disable =3D true; } =20 static void ccw_machine_7_1_class_options(MachineClass *mc) diff --git a/util/qemu-config.c b/util/qemu-config.c index 5325f6bf80..433488aa56 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -236,10 +236,6 @@ static QemuOptsList machine_opts =3D { .help =3D "Up to 8 chars in set of [A-Za-z0-9. ](lower case ch= ars" " converted to upper case) to pass to machine" " loader, boot manager, and guest kernel", - },{ - .name =3D "zpcii-disable", - .type =3D QEMU_OPT_BOOL, - .help =3D "disable zPCI interpretation facilities", }, { /* End of list */ } } diff --git a/qemu-options.hx b/qemu-options.hx index 911d82afa5..1e140e99e1 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -37,8 +37,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ " memory-encryption=3D@var{} memory encryption object t= o use (default=3Dnone)\n" " hmat=3Don|off controls ACPI HMAT support (default=3Do= ff)\n" " memory-backend=3D'backend-id' specifies explicitly pr= ovided backend for main RAM (default=3Dnone)\n" - " cxl-fmw.0.targets.0=3Dfirsttarget,cxl-fmw.0.targets.1= =3Dsecondtarget,cxl-fmw.0.size=3Dsize[,cxl-fmw.0.interleave-granularity=3Dg= ranularity]\n" - " zpcii-disable=3Don|off disables zPCI interpretation f= acilities (default=3Doff)\n", + " cxl-fmw.0.targets.0=3Dfirsttarget,cxl-fmw.0.targets.1= =3Dsecondtarget,cxl-fmw.0.size=3Dsize[,cxl-fmw.0.interleave-granularity=3Dg= ranularity]\n", QEMU_ARCH_ALL) SRST ``-machine [type=3D]name[,prop=3Dvalue[,...]]`` @@ -158,11 +157,6 @@ SRST :: =20 -machine cxl-fmw.0.targets.0=3Dcxl.0,cxl-fmw.0.targets.1=3Dcxl= .1,cxl-fmw.0.size=3D128G,cxl-fmw.0.interleave-granularity=3D512k - - ``zpcii-disable=3Don|off`` - Disables zPCI interpretation facilties on s390-ccw hosts. - This feature can be used to disable hardware virtual assists - related to zPCI devices. The default is off. ERST =20 DEF("M", HAS_ARG, QEMU_OPTION_M, --=20 2.38.1 From nobody Sun May 19 00:42:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667837744677555.3418229272519; Mon, 7 Nov 2022 08:15:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1os4lQ-0006ie-08; Mon, 07 Nov 2022 11:14:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os4lK-0006gP-Do; Mon, 07 Nov 2022 11:14:15 -0500 Received: from mail.ozlabs.org ([2404:9400:2221:ea00::3] helo=gandalf.ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os4lI-0003f7-2S; Mon, 07 Nov 2022 11:14:13 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4N5brp443Rz4xwy; Tue, 8 Nov 2022 03:14:02 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4N5brm1zsTz4x1G; Tue, 8 Nov 2022 03:14:00 +1100 (AEDT) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org Cc: Thomas Huth , Matthew Rosato , Eric Farman , David Hildenbrand , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH for 7.2 2/2] s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines Date: Mon, 7 Nov 2022 17:13:49 +0100 Message-Id: <20221107161349.1032730-3-clg@kaod.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107161349.1032730-1-clg@kaod.org> References: <20221107161349.1032730-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2404:9400:2221:ea00::3; envelope-from=SRS0=Ye/0=3H=kaod.org=clg@ozlabs.org; helo=gandalf.ozlabs.org X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667837746491100011 From: C=C3=A9dric Le Goater zPCI enhancement features (interpretation and forward assist) were recently introduced to improve performance on PCI passthrough devices. To maintain the same behaviour on older Z machines, deactivate the features with the associated properties. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index bb98d40792..7d80bc1837 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -844,9 +844,14 @@ static void ccw_machine_7_1_instance_options(MachineSt= ate *machine) static void ccw_machine_7_1_class_options(MachineClass *mc) { S390CcwMachineClass *s390mc =3D S390_CCW_MACHINE_CLASS(mc); + static GlobalProperty compat[] =3D { + { TYPE_S390_PCI_DEVICE, "interpret", "off", }, + { TYPE_S390_PCI_DEVICE, "forwarding-assist", "off", }, + }; =20 ccw_machine_7_2_class_options(mc); compat_props_add(mc->compat_props, hw_compat_7_1, hw_compat_7_1_len); + compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); s390mc->max_threads =3D S390_MAX_CPUS; } DEFINE_CCW_MACHINE(7_1, "7.1", false); --=20 2.38.1