From nobody Fri Nov 22 03:17:55 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=1727981861; cv=none; d=zohomail.com; s=zohoarc; b=IrCnwB7bW1kK+7w1e/4Gy98T4cjoWzLWHCpBNATDCl2/EGYKyAHmVYAA7AzTNwI3KP09bByTfLA8GB+CilqBxqDEFw+mPHcLatUApB85Lwi3KXkMOKxYAYqbs8S+RARWJFX5j0+iyGsSnHaZYiM8nCWGQkkYWBWqU6oSqQCSEcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727981861; 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=7NqZgDSIdmym8k9v4wrElx9POiJdcsjS85l4BMSFw2Y=; b=Vx6RpRaeoR2ZaWdd0+W6G9QfeEn8IJVXjpQm15GRzB2l9MzHJ/0hDiRsFFQL7SyWFXM8TIhaE3gpdpKTXlGJ+guKSj/BGQ2dcT0CHaMqYlNATa6Akprgh9X/99NWwSnZd9xBStWuaIcI14TXbn3uQbm50u1JqGqVdLli3p3qPmc= 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 1727981861101226.1030117211086; Thu, 3 Oct 2024 11:57:41 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.809822.1222396 (Exim 4.92) (envelope-from ) id 1swR0m-0000X7-6f; Thu, 03 Oct 2024 18:57:16 +0000 Received: by outflank-mailman (output) from mailman id 809822.1222396; Thu, 03 Oct 2024 18:57:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1swR0m-0000Wb-2c; Thu, 03 Oct 2024 18:57:16 +0000 Received: by outflank-mailman (input) for mailman id 809822; Thu, 03 Oct 2024 18:57:14 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1swR0k-00082k-As for xen-devel@lists.xenproject.org; Thu, 03 Oct 2024 18:57:14 +0000 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [2a00:1450:4864:20::22e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4caddc82-81b9-11ef-99a2-01e77a169b0f; Thu, 03 Oct 2024 20:57:12 +0200 (CEST) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2fac63abf63so15451941fa.1 for ; Thu, 03 Oct 2024 11:57:12 -0700 (PDT) Received: from gmail.com (213-67-3-247-no600.tbcn.telia.com. [213.67.3.247]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2faecc13b2asm2706361fa.69.2024.10.03.11.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 11:57:11 -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: 4caddc82-81b9-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727981832; x=1728586632; 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=7NqZgDSIdmym8k9v4wrElx9POiJdcsjS85l4BMSFw2Y=; b=IFY7a/FyJzyfhvjgBBfsOp7pEBH5rtEGckImg9AlxNXtFefHzVpaop6sMdoudzwdCr orq8hPfEvEBJ+QY6acH7bTCjo+LZo4N5Uc5zKv8l19gmy7Tc8x0smLo3c74J3Fp2JhWc etpgNdAEOuK2WiSrbY/g4qjAiVN0lRuLKyUz68S2VeC2j0Dkm3B82bRk5x74tr+kk2JF cAi/QCCIz/bUrhlvBIcEtJ4q7pTuPasw7VrgxlXPqKOYMw8kNNl0Ka9jQrRmy56dKUx4 EwRTNk3CSnGzS0iB800Dc+lS2qUnMNAjvEv81PABPIuy+w428vdzCXkx744lEPGcCFCa O+3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727981832; x=1728586632; 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=7NqZgDSIdmym8k9v4wrElx9POiJdcsjS85l4BMSFw2Y=; b=JY/e9MeX4AHi5K7qlDRquLyZmtIaPATuvZ3ND/FK7FgpG4KyLMrFwJRX9chQOxwORR P/XtQaFKY5Z6q0ouezVpXyfPlrF34NfE6eRcLVWJcxVfe0aCqRCIysmIsv01iYab3De0 /cdWXNNdKL3DlT+aQBu/eIo+9C2hCpXsm+JRfjmZj/2Bgw6wzRwDd/guLzglUJvoBGci ZA8odQ6ywG7c7Rg/RTkAbwOV/aMluzg4KarWbgEfOyQizW+M3bhvOHIiHeQJgV7k2PXM WgSiOfOx1y0ot2zWFagtcI+A7RAFi1Vo9nfx2HGghD8ZKeBtV6FMolvnD8nBAC5sIzA0 ywQw== X-Forwarded-Encrypted: i=1; AJvYcCVfL0v6Y6Op8yMAhIwnye27fLalZ6jLb055ji7sslPbX+oQrDP1mZyESJxLZafDt3oz8q2TLXUdRhg=@lists.xenproject.org X-Gm-Message-State: AOJu0YwFjinsyRgngQFIpvQTmNzPw3FZUczwIAWAQajGOe20sG5YgQsa Qaad8BtYaupaLf8PX8+D4b8Q3mp/ynrDL1roaSdauPOVPiTSnZyP X-Google-Smtp-Source: AGHT+IGdtsrhdXwp14pMpvdvc+CdpPcIPMIZgK2C81T/sez5hURdlMZpHD5usN8FxM0Nz2NV9uyp/Q== X-Received: by 2002:a2e:be20:0:b0:2f5:2ba:2c99 with SMTP id 38308e7fff4ca-2faf3c1400cmr307781fa.9.1727981832153; Thu, 03 Oct 2024 11:57:12 -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, edgar.iglesias@amd.com, xen-devel@lists.xenproject.org, qemu-arm@nongnu.org Subject: [PULL v2 5/5] hw/arm: xenpvh: Enable PCI for ARM PVH Date: Thu, 3 Oct 2024 20:56:54 +0200 Message-ID: <20241003185655.1480819-6-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241003185655.1480819-1-edgar.iglesias@gmail.com> References: <20241003185655.1480819-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1727981863024116600 Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Enable PCI support for the ARM Xen PVH machine. Reviewed-by: Stefano Stabellini Signed-off-by: Edgar E. Iglesias --- 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