From nobody Wed Nov 5 06:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499430363073247.57662120372947; Fri, 7 Jul 2017 05:26:03 -0700 (PDT) Received: from localhost ([::1]:56184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSKf-00036R-OR for importer@patchew.org; Fri, 07 Jul 2017 08:26:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSGu-0008Gp-EE for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSGr-0005pG-DA for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60192) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSGr-0005p7-71 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:05 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2A09164A52; Fri, 7 Jul 2017 12:22:04 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C414077D66; Fri, 7 Jul 2017 12:22:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2A09164A52 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cohuck@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2A09164A52 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:21:53 +0200 Message-Id: <20170707122159.24714-2-cohuck@redhat.com> In-Reply-To: <20170707122159.24714-1-cohuck@redhat.com> References: <20170707122159.24714-1-cohuck@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]); Fri, 07 Jul 2017 12:22:04 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 1/7] kvm: remove hard dependency on pci X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, zyimin@linux.vnet.ibm.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The msi routing code in kvm calls some pci functions: provide some stubs to enable builds without pci. Fixes: e1d4fb2de ("kvm-irqchip: x86: add msi route notify fn") Fixes: 767a554a0 ("kvm-all: Pass requester ID to MSI routing functions") Signed-off-by: Cornelia Huck --- hw/pci/pci-stub.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c index 36d2c430c5..ec12962d73 100644 --- a/hw/pci/pci-stub.c +++ b/hw/pci/pci-stub.c @@ -23,6 +23,7 @@ #include "monitor/monitor.h" #include "qapi/qmp/qerror.h" #include "hw/pci/pci.h" +#include "hw/pci/msi.h" #include "qmp-commands.h" =20 PciInfoList *qmp_query_pci(Error **errp) @@ -35,3 +36,14 @@ void hmp_pcie_aer_inject_error(Monitor *mon, const QDict= *qdict) { monitor_printf(mon, "PCI devices not supported\n"); } + +/* kvm-all wants this */ +MSIMessage pci_get_msi_message(PCIDevice *dev, int vector) +{ + assert(false); +} + +uint16_t pci_requester_id(PCIDevice *dev) +{ + assert(false); +} --=20 2.13.0 From nobody Wed Nov 5 06:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499430239987254.32061282693553; Fri, 7 Jul 2017 05:23:59 -0700 (PDT) Received: from localhost ([::1]:56172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSIg-00016p-Lj for importer@patchew.org; Fri, 07 Jul 2017 08:23:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSGu-0008Gq-El for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSGt-0005q1-BZ for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37136) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSGt-0005pa-55 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:07 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 12026267D4; Fri, 7 Jul 2017 12:22:06 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7DF977D66; Fri, 7 Jul 2017 12:22:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 12026267D4 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cohuck@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 12026267D4 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:21:54 +0200 Message-Id: <20170707122159.24714-3-cohuck@redhat.com> In-Reply-To: <20170707122159.24714-1-cohuck@redhat.com> References: <20170707122159.24714-1-cohuck@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.30]); Fri, 07 Jul 2017 12:22:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 2/7] s390x: chsc nt2 events are pci-only X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, zyimin@linux.vnet.ibm.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The nt2 event class is pci-only and therefore implemented in the s390x pci code. Properly stub it out for non-pci builds. Signed-off-by: Cornelia Huck --- hw/s390x/s390-pci-bus.c | 4 ++-- hw/s390x/s390-pci-bus.h | 4 ++-- target/s390x/ioinst.c | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 5651483781..eee9a04eac 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -47,7 +47,7 @@ S390pciState *s390_get_phb(void) return phb; } =20 -int chsc_sei_nt2_get_event(void *res) +int pci_chsc_sei_nt2_get_event(void *res) { ChscSeiNt2Res *nt2_res =3D (ChscSeiNt2Res *)res; PciCcdfAvail *accdf; @@ -87,7 +87,7 @@ int chsc_sei_nt2_get_event(void *res) return rc; } =20 -int chsc_sei_nt2_have_event(void) +int pci_chsc_sei_nt2_have_event(void) { S390pciState *s =3D s390_get_phb(); =20 diff --git a/hw/s390x/s390-pci-bus.h b/hw/s390x/s390-pci-bus.h index cf142a3e68..29d3da10f6 100644 --- a/hw/s390x/s390-pci-bus.h +++ b/hw/s390x/s390-pci-bus.h @@ -318,8 +318,8 @@ typedef struct S390pciState { } S390pciState; =20 S390pciState *s390_get_phb(void); -int chsc_sei_nt2_get_event(void *res); -int chsc_sei_nt2_have_event(void); +int pci_chsc_sei_nt2_get_event(void *res); +int pci_chsc_sei_nt2_have_event(void); void s390_pci_sclp_configure(SCCB *sccb); void s390_pci_sclp_deconfigure(SCCB *sccb); void s390_pci_iommu_enable(S390PCIIOMMU *iommu); diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index d5e6b8066b..a552f53167 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -599,6 +599,24 @@ static int chsc_sei_nt0_have_event(void) return 0; } =20 +static int chsc_sei_nt2_get_event(void *res) +{ +#ifdef CONFIG_PCI + return pci_chsc_sei_nt2_get_event(res); +#else + return 1; +#endif +} + +static int chsc_sei_nt2_have_event(void) +{ +#ifdef CONFIG_PCI + return pci_chsc_sei_nt2_have_event(); +#else + return 0; +#endif +} + #define CHSC_SEI_NT0 (1ULL << 63) #define CHSC_SEI_NT2 (1ULL << 61) static void ioinst_handle_chsc_sei(ChscReq *req, ChscResp *res) --=20 2.13.0 From nobody Wed Nov 5 06:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499430308055709.2806231618601; Fri, 7 Jul 2017 05:25:08 -0700 (PDT) Received: from localhost ([::1]:56176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSJm-0002D3-Bp for importer@patchew.org; Fri, 07 Jul 2017 08:25:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSGw-0008HL-56 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSGv-0005r8-5w for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45178) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSGu-0005qk-Vl for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:09 -0400 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 E151F7C83C; Fri, 7 Jul 2017 12:22:07 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8BCE7600C2; Fri, 7 Jul 2017 12:22:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E151F7C83C Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cohuck@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E151F7C83C From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:21:55 +0200 Message-Id: <20170707122159.24714-4-cohuck@redhat.com> In-Reply-To: <20170707122159.24714-1-cohuck@redhat.com> References: <20170707122159.24714-1-cohuck@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.27]); Fri, 07 Jul 2017 12:22:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 3/7] s390x/sclp: properly guard pci-specific functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, zyimin@linux.vnet.ibm.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" For non-pci builds, pci reconfiguration via sclp is not available. Don't indicate it in the sclp facilities and return an invalid command if the guest tries to issue pci configure/deconfigure. Signed-off-by: Cornelia Huck --- hw/s390x/sclp.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 83d6023894..d20baa3bbd 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -59,6 +59,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) int rnsize, rnmax; int slots =3D MIN(machine->ram_slots, s390_get_memslot_count(kvm_state= )); IplParameterBlock *ipib =3D s390_ipl_get_iplb(); + uint64_t sclp_facilities =3D SCLP_HAS_CPU_INFO; =20 CPU_FOREACH(cpu) { cpu_count++; @@ -79,8 +80,10 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) =20 prepare_cpu_entries(sclp, read_info->entries, cpu_count); =20 - read_info->facilities =3D cpu_to_be64(SCLP_HAS_CPU_INFO | - SCLP_HAS_PCI_RECONFIG); +#ifdef CONFIG_PCI + sclp_facilities |=3D SCLP_HAS_PCI_RECONFIG; +#endif + read_info->facilities =3D cpu_to_be64(sclp_facilities); =20 /* Memory Hotplug is only supported for the ccw machine type */ if (mhd) { @@ -386,10 +389,18 @@ static void sclp_execute(SCLPDevice *sclp, SCCB *sccb= , uint32_t code) sclp_c->unassign_storage(sclp, sccb); break; case SCLP_CMDW_CONFIGURE_PCI: +#ifdef CONFIG_PCI s390_pci_sclp_configure(sccb); +#else + sccb->h.response_code =3D cpu_to_be16(SCLP_RC_INVALID_SCLP_COMMAND= ); +#endif break; case SCLP_CMDW_DECONFIGURE_PCI: - s390_pci_sclp_deconfigure(sccb); +#ifdef CONFIG_PCI + sclp_c->pci_sclp_deconfigure(sccb); +#else + sccb->h.response_code =3D cpu_to_be16(SCLP_RC_INVALID_SCLP_COMMAND= ); +#endif break; default: efc->command_handler(ef, sccb, code); --=20 2.13.0 From nobody Wed Nov 5 06:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499430496138272.68938845861715; Fri, 7 Jul 2017 05:28:16 -0700 (PDT) Received: from localhost ([::1]:56192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSMn-00051O-MZ for importer@patchew.org; Fri, 07 Jul 2017 08:28:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSGx-0008Im-Nd for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSGx-0005rg-0a for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7246) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSGw-0005rQ-Qt for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:10 -0400 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 C50E67AE8B; Fri, 7 Jul 2017 12:22:09 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 65EF0600C2; Fri, 7 Jul 2017 12:22:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C50E67AE8B Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cohuck@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C50E67AE8B From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:21:56 +0200 Message-Id: <20170707122159.24714-5-cohuck@redhat.com> In-Reply-To: <20170707122159.24714-1-cohuck@redhat.com> References: <20170707122159.24714-1-cohuck@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.25]); Fri, 07 Jul 2017 12:22:09 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 4/7] s390x/ccw: create s390 phb conditionally X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, zyimin@linux.vnet.ibm.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Don't create the s390 pci host bridge for non-pci builds. Signed-off-by: Cornelia Huck --- hw/s390x/s390-virtio-ccw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 41ca6668e2..563f7702a1 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -114,7 +114,6 @@ static void ccw_init(MachineState *machine) { int ret; VirtualCssBus *css_bus; - DeviceState *dev; =20 s390_sclp_init(); s390_memory_init(machine->ram_size); @@ -126,12 +125,14 @@ static void ccw_init(MachineState *machine) s390_init_ipl_dev(machine->kernel_filename, machine->kernel_cmdline, machine->initrd_filename, "s390-ccw.img", "s390-netboot.img", true); - - dev =3D qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE); +#ifdef CONFIG_PCI + { + DeviceState *dev =3D qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE); object_property_add_child(qdev_get_machine(), TYPE_S390_PCI_HOST_BRIDG= E, OBJECT(dev), NULL); qdev_init_nofail(dev); - + } +#endif /* register hypercalls */ virtio_ccw_register_hcalls(); =20 --=20 2.13.0 From nobody Wed Nov 5 06:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499430501671577.3579044203046; Fri, 7 Jul 2017 05:28:21 -0700 (PDT) Received: from localhost ([::1]:56194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSMt-000565-Aa for importer@patchew.org; Fri, 07 Jul 2017 08:28:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSGz-0008LF-UB for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSGz-0005sp-2X for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52440) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSGy-0005sA-Pm for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:12 -0400 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 A8D1F4E049; Fri, 7 Jul 2017 12:22:11 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F5864D9E9; Fri, 7 Jul 2017 12:22:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A8D1F4E049 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cohuck@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A8D1F4E049 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:21:57 +0200 Message-Id: <20170707122159.24714-6-cohuck@redhat.com> In-Reply-To: <20170707122159.24714-1-cohuck@redhat.com> References: <20170707122159.24714-1-cohuck@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.38]); Fri, 07 Jul 2017 12:22:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 5/7] s390x/pci: fence off instructions for non-pci X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, zyimin@linux.vnet.ibm.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" If a guest running on a non-pci build issues a pci instruction, throw them an exception. Signed-off-by: Cornelia Huck --- target/s390x/kvm.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index a3d00196f4..c5c7c27a21 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -1160,6 +1160,9 @@ static int kvm_clp_service_call(S390CPU *cpu, struct = kvm_run *run) { uint8_t r2 =3D (run->s390_sieic.ipb & 0x000f0000) >> 16; =20 +#ifndef CONFIG_PCI + return -1; +#endif return clp_service_call(cpu, r2); } =20 @@ -1168,6 +1171,9 @@ static int kvm_pcilg_service_call(S390CPU *cpu, struc= t kvm_run *run) uint8_t r1 =3D (run->s390_sieic.ipb & 0x00f00000) >> 20; uint8_t r2 =3D (run->s390_sieic.ipb & 0x000f0000) >> 16; =20 +#ifndef CONFIG_PCI + return -1; +#endif return pcilg_service_call(cpu, r1, r2); } =20 @@ -1176,6 +1182,9 @@ static int kvm_pcistg_service_call(S390CPU *cpu, stru= ct kvm_run *run) uint8_t r1 =3D (run->s390_sieic.ipb & 0x00f00000) >> 20; uint8_t r2 =3D (run->s390_sieic.ipb & 0x000f0000) >> 16; =20 +#ifndef CONFIG_PCI + return -1; +#endif return pcistg_service_call(cpu, r1, r2); } =20 @@ -1188,11 +1197,17 @@ static int kvm_stpcifc_service_call(S390CPU *cpu, s= truct kvm_run *run) cpu_synchronize_state(CPU(cpu)); fiba =3D get_base_disp_rxy(cpu, run, &ar); =20 +#ifndef CONFIG_PCI + return -1; +#endif return stpcifc_service_call(cpu, r1, fiba, ar); } =20 static int kvm_sic_service_call(S390CPU *cpu, struct kvm_run *run) { +#ifndef CONFIG_PCI + return -1; +#endif /* NOOP */ return 0; } @@ -1202,6 +1217,9 @@ static int kvm_rpcit_service_call(S390CPU *cpu, struc= t kvm_run *run) uint8_t r1 =3D (run->s390_sieic.ipb & 0x00f00000) >> 20; uint8_t r2 =3D (run->s390_sieic.ipb & 0x000f0000) >> 16; =20 +#ifndef CONFIG_PCI + return -1; +#endif return rpcit_service_call(cpu, r1, r2); } =20 @@ -1212,6 +1230,9 @@ static int kvm_pcistb_service_call(S390CPU *cpu, stru= ct kvm_run *run) uint64_t gaddr; uint8_t ar; =20 +#ifndef CONFIG_PCI + return -1; +#endif cpu_synchronize_state(CPU(cpu)); gaddr =3D get_base_disp_rsy(cpu, run, &ar); =20 @@ -1224,6 +1245,9 @@ static int kvm_mpcifc_service_call(S390CPU *cpu, stru= ct kvm_run *run) uint64_t fiba; uint8_t ar; =20 +#ifndef CONFIG_PCI + return -1; +#endif cpu_synchronize_state(CPU(cpu)); fiba =3D get_base_disp_rxy(cpu, run, &ar); =20 --=20 2.13.0 From nobody Wed Nov 5 06:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499430627489593.4960655084233; Fri, 7 Jul 2017 05:30:27 -0700 (PDT) Received: from localhost ([::1]:56199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSOs-0006wH-Ky for importer@patchew.org; Fri, 07 Jul 2017 08:30:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSH4-0008Pn-VR for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSH0-0005tm-T3 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33212) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSH0-0005tL-N3 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:14 -0400 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 A57EC80491; Fri, 7 Jul 2017 12:22:13 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B27F60BE6; Fri, 7 Jul 2017 12:22:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A57EC80491 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cohuck@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A57EC80491 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:21:58 +0200 Message-Id: <20170707122159.24714-7-cohuck@redhat.com> In-Reply-To: <20170707122159.24714-1-cohuck@redhat.com> References: <20170707122159.24714-1-cohuck@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.28]); Fri, 07 Jul 2017 12:22:13 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 6/7] s390x/kvm: msi route fixup for non-pci X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, zyimin@linux.vnet.ibm.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" On non-pci builds, we cannot have a pci device for which we have to translate to adapter routes: just return -ENODEV. Signed-off-by: Cornelia Huck --- target/s390x/kvm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index c5c7c27a21..911b6da3f0 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -2351,6 +2351,7 @@ int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu) int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route, uint64_t address, uint32_t data, PCIDevice *d= ev) { +#ifdef CONFIG_PCI S390PCIBusDevice *pbdev; uint32_t idx =3D data >> ZPCI_MSI_VEC_BITS; uint32_t vec =3D data & ZPCI_MSI_VEC_MASK; @@ -2371,6 +2372,9 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_e= ntry *route, route->u.adapter.ind_offset =3D pbdev->routes.adapter.ind_offset; route->u.adapter.adapter_id =3D pbdev->routes.adapter.adapter_id; return 0; +#else + return -ENODEV; +#endif } =20 int kvm_arch_add_msi_route_post(struct kvm_irq_routing_entry *route, --=20 2.13.0 From nobody Wed Nov 5 06:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499430499251677.7149746585358; Fri, 7 Jul 2017 05:28:19 -0700 (PDT) Received: from localhost ([::1]:56193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSMr-00054y-VU for importer@patchew.org; Fri, 07 Jul 2017 08:28:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSH4-0008Pl-VE for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSH2-0005uh-PD for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60870) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSH2-0005uD-Iv for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:22:16 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8077223E6C6; Fri, 7 Jul 2017 12:22:15 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C8695D9C3; Fri, 7 Jul 2017 12:22:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8077223E6C6 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cohuck@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8077223E6C6 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:21:59 +0200 Message-Id: <20170707122159.24714-8-cohuck@redhat.com> In-Reply-To: <20170707122159.24714-1-cohuck@redhat.com> References: <20170707122159.24714-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 07 Jul 2017 12:22:15 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 7/7] s390x: refine pci dependencies X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, zyimin@linux.vnet.ibm.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We have some code that should properly depend on CONFIG_PCI. With this change, we can switch off pci for s390x by removing 'CONFIG_PCI=3Dy' from the default config. Signed-off-by: Cornelia Huck --- default-configs/s390x-softmmu.mak | 2 +- hw/s390x/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-soft= mmu.mak index b227a36179..7adaa4a4fe 100644 --- a/default-configs/s390x-softmmu.mak +++ b/default-configs/s390x-softmmu.mak @@ -1,5 +1,5 @@ CONFIG_PCI=3Dy -CONFIG_VIRTIO_PCI=3Dy +CONFIG_VIRTIO_PCI=3D$(CONFIG_PCI) CONFIG_VHOST_USER_SCSI=3D$(CONFIG_LINUX) CONFIG_VIRTIO=3Dy CONFIG_SCLPCONSOLE=3Dy diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs index a8e5575a8a..7040a2c7f2 100644 --- a/hw/s390x/Makefile.objs +++ b/hw/s390x/Makefile.objs @@ -11,7 +11,7 @@ obj-y +=3D 3270-ccw.o obj-y +=3D virtio-ccw.o obj-y +=3D css-bridge.o obj-y +=3D ccw-device.o -obj-y +=3D s390-pci-bus.o s390-pci-inst.o +obj-$(CONFIG_PCI) +=3D s390-pci-bus.o s390-pci-inst.o obj-y +=3D s390-skeys.o obj-$(CONFIG_KVM) +=3D s390-skeys-kvm.o obj-y +=3D s390-ccw.o --=20 2.13.0