From nobody Sun Nov 24 05:42:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1726499371; cv=none; d=zohomail.com; s=zohoarc; b=VZQknjU24n6bO4gEenjReXHMGUigAfkGPGDlCp9pwIfy0O1WCH2xN/pHiYCBKs1JBPtKGJ+vPgICtFO1CdXn4N34E9fWUILJubwy9SmphDGID5IHv3t/OTysPYYpauP0aL1syDC9yOR0a5XizDO0cslsp9HHv9PqCUZTIA+N/uE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726499371; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tIDS2BgSDN2sYeAiwQv8u9Oegpn8pHfzCYrmX62ewXA=; b=Ck1GcuTN0Uho0AfVsgplv79b/tpIu9RjU5TCHMKiovZUZ0c7VV9ES9JcnDp2FZA1go4MtvSAZCI5AViqQUe+jYj5kJRS1DagCqa5RSDelGcQdbPxEeVYiwryNR3cKE9UrK3NaqMspSw5mqzegsUQFvtSOZOvBlIAFdKXTeyN0oU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1726499371405612.52304628593; Mon, 16 Sep 2024 08:09:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.799583.1209587 (Exim 4.92) (envelope-from ) id 1sqDLl-0006mA-EF; Mon, 16 Sep 2024 15:09:13 +0000 Received: by outflank-mailman (output) from mailman id 799583.1209587; Mon, 16 Sep 2024 15:09:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sqDLl-0006lq-8i; Mon, 16 Sep 2024 15:09:13 +0000 Received: by outflank-mailman (input) for mailman id 799583; Mon, 16 Sep 2024 15:09:11 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sqDLj-0006Jf-FO for xen-devel@lists.xenproject.org; Mon, 16 Sep 2024 15:09:11 +0000 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [2607:f8b0:4864:20::d2a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a0340fe5-743d-11ef-a0b6-8be0dac302b0; Mon, 16 Sep 2024 17:09:10 +0200 (CEST) Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-82cec47242eso171179139f.0 for ; Mon, 16 Sep 2024 08:09:10 -0700 (PDT) Received: from gmail.com (ip190-5-140-142.intercom.com.sv. [190.5.140.142]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3a092e9005csm16897935ab.79.2024.09.16.08.09.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 08:09:08 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a0340fe5-743d-11ef-a0b6-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726499349; x=1727104149; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tIDS2BgSDN2sYeAiwQv8u9Oegpn8pHfzCYrmX62ewXA=; b=FzzBG2cAeI9OVS6ZfKSdMHbMb8qs2lb4Uzm/bb6rZEpRoGtFJI+8dnPeGGKq46FKaL DrTD9uGwtvoTasRRKsJNe1oIwq+WRJTj3nZVUHdapH1SMHWNWQxqV3sZ8l0MKPIemOKb bjT8oZm4a1Xazg2Dk5KY4VsdKjgJpYQSyt4D+Dg2rzdm7K+HjxnRbweZyQRBhFqtYlFW hMsfaJivzSPvkXrWav8F+f2KANJ7AOVzqa8B0aekYnwZUUpM+pg8G1uH28ofACLeL0Jd qEHvZU5akdQXwDrUn9K9p0zui0b7an2PdMIQ5m58WA5FLWo907zfuYEEZ7jgCX8FPBYt tRyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726499349; x=1727104149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tIDS2BgSDN2sYeAiwQv8u9Oegpn8pHfzCYrmX62ewXA=; b=FmvFo+LilFldcF7C/MJlPggb9By+avz2HYZAbII2w8ceylCPyX2xb+dwJHCfhmaoOG pGOishA+8J07A72cGGRT9xtsNnOjxigklpoi6YlUxvZdA1hcaH4T5Ompo/7C25/k6rh8 GXT1VEVzWAoPZQNY6fhExhUtXJ+FK11jVN1cT14xCqojBaJ1jHMfVlDVm3witT8qv+15 nxRs50AjXoaOCEmcU3Nxu6d4gKKP3S+Wt0IUjX4KNUtFvksAUWi4qTaHU8dZGNnppA1G RdA7PCGKjTunYS16BhP0X2ckMOiimbaLohCmsrLHMF3sunRkRfyQMNyNE7a/UYW7hNBc p+jA== X-Forwarded-Encrypted: i=1; AJvYcCVY5MUGU+9LXTiqJ6T7SMcfu/54lqqdT0bLI6g4F9xAxC26QHnEuexWNFuYf7/UkGzofUWPrgDNz0A=@lists.xenproject.org X-Gm-Message-State: AOJu0YwUmX9bm2h6S69FLcSKax0dtzqQon+8AW61InWJwz9nqJ/45i67 UHo9i9PiEtlvh/GDBrmbnq2ZqAHasF7vPwba+EKE5t5F2s9emmvC X-Google-Smtp-Source: AGHT+IE86ZuS/7NQzNvR5tLVOdqaKbQKcpupAoW/xUcVW9ix1XY+RyPuORlI+lKWYit0Zg+iCQOwZg== X-Received: by 2002:a05:6e02:12c5:b0:39f:325f:78e6 with SMTP id e9e14a558f8ab-3a0845a0d55mr130717185ab.0.1726499349478; Mon, 16 Sep 2024 08:09:09 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Cc: sstabellini@kernel.org, anthony@xenproject.org, paul@xen.org, peter.maydell@linaro.org, alex.bennee@linaro.org, edgar.iglesias@amd.com, xen-devel@lists.xenproject.org, qemu-arm@nongnu.org Subject: [PATCH v1 4/4] hw/arm: xenpvh: Enable PCI for ARM PVH Date: Mon, 16 Sep 2024 17:08:52 +0200 Message-ID: <20240916150853.1216703-5-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240916150853.1216703-1-edgar.iglesias@gmail.com> References: <20240916150853.1216703-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1726499374114116600 Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Enable PCI support for the ARM Xen PVH machine. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini --- hw/arm/xen-pvh.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c index 28af3910ea..33f0dd5982 100644 --- a/hw/arm/xen-pvh.c +++ b/hw/arm/xen-pvh.c @@ -39,6 +39,16 @@ static void xen_arm_instance_init(Object *obj) VIRTIO_MMIO_DEV_SIZE }; } =20 +static void xen_pvh_set_pci_intx_irq(void *opaque, int intx_irq, int level) +{ + XenPVHMachineState *s =3D XEN_PVH_MACHINE(opaque); + int irq =3D s->cfg.pci_intx_irq_base + intx_irq; + + if (xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level)) { + error_report("xendevicemodel_set_pci_intx_level failed"); + } +} + static void xen_arm_machine_class_init(ObjectClass *oc, void *data) { XenPVHMachineClass *xpc =3D XEN_PVH_MACHINE_CLASS(oc); @@ -69,7 +79,11 @@ static void xen_arm_machine_class_init(ObjectClass *oc, = void *data) /* Xen/ARM does not use buffered IOREQs. */ xpc->handle_bufioreq =3D HVM_IOREQSRV_BUFIOREQ_OFF; =20 + /* PCI INTX delivery. */ + xpc->set_pci_intx_irq =3D xen_pvh_set_pci_intx_irq; + /* List of supported features known to work on PVH ARM. */ + xpc->has_pci =3D true; xpc->has_tpm =3D true; xpc->has_virtio_mmio =3D true; =20 --=20 2.43.0