From nobody Fri Nov 29 18:45:36 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=1632401721; cv=none; d=zohomail.com; s=zohoarc; b=D0hBgWerMLo+yDtm+kOUHRvFcOLNuBEEemahDjf5YiV3auBDI2IXzAxnhbrCTMpgDF62WtI6pFCGYNlZ72vCgx6mpXhs/gOtZNHK7qkt3exPQSNkezvjb/tcMhjftRyzHEepNFbP6fZg2Dk3K0pORGnDd+joE1r51qJXDSZysLU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632401721; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7U9a60NMzbH9p0acv4bSjt13eIGtF1+DTnt5NlygFls=; b=D/VEAyaPkOhx1k83E/Ufs0nRaD9+/hbfq19j7jX+jJFBolMZImeb90pTJWoEhzBYqno1q7C9acPUo7qGRFnJ2/tC6wwnJz2kefq3MVDHj2aKWy0iZAqAxbFsFAvBhhmzzC5fW+p5gxHLX+1wWJGtQt4hBQ/3XnqV4vpYpcXSOwo= 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 1632401721209489.59138531962935; Thu, 23 Sep 2021 05:55:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.194106.345799 (Exim 4.92) (envelope-from ) id 1mTOFp-0006i3-7I; Thu, 23 Sep 2021 12:55:09 +0000 Received: by outflank-mailman (output) from mailman id 194106.345799; Thu, 23 Sep 2021 12:55:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mTOFp-0006hr-30; Thu, 23 Sep 2021 12:55:09 +0000 Received: by outflank-mailman (input) for mailman id 194106; Thu, 23 Sep 2021 12:55:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mTOFo-0004it-4U for xen-devel@lists.xenproject.org; Thu, 23 Sep 2021 12:55:08 +0000 Received: from mail-lf1-x132.google.com (unknown [2a00:1450:4864:20::132]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f66fc0e9-a9da-4562-ac96-1818e2faaa98; Thu, 23 Sep 2021 12:54:47 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id b15so25733308lfe.7 for ; Thu, 23 Sep 2021 05:54:47 -0700 (PDT) Received: from localhost.localdomain ([185.199.97.5]) by smtp.gmail.com with ESMTPSA id l7sm453584lfk.52.2021.09.23.05.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 05:54:45 -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: f66fc0e9-a9da-4562-ac96-1818e2faaa98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7U9a60NMzbH9p0acv4bSjt13eIGtF1+DTnt5NlygFls=; b=Ml9zeKG++Ld2AfqsBT77oaujf9ckmq47WrQi7mDfp3hwnG1gIz5YT7UhV7KYZCiP3G vufCvHDbRMUlQLZHIBnuzvT/unQKGI4w2EQ0IGY6Pi0gPE0Io/DwdNvSX0iiqK7s5rwS +6b/5MzhcwdHXCkdFkfD/SdllAO4IsGYyKEHsSd3MZlYovly8miq16qXQtQAOhwolWDS jUWJTJsO16yPrhvhcbDp1ErLjzeqDMHIE/WkHFQcV76aELl85nnbMFjiMK0ozg4UTt/q HPyYlxRyZ5tjcF9grNmNSFDCw27nLZ2D4NBfkcUzASz3N4jmTdTkVnVV1kiInULS7Rkr K3qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7U9a60NMzbH9p0acv4bSjt13eIGtF1+DTnt5NlygFls=; b=rNJhTzfFl+pxmtAWIbcjt0e2yXsQOTU37aSwsCYlmvAhhfk+0H5Iwyr89yAZ+m1S6Z x2l/wFr6Uix40uosyiZEVU9qaIOy870gE5HAe2SZ/ScCs/oTinq+gYVKexCAAt89S61x gS1A2XFSdAXgP/1tdWKlx5GgNQ3Da2CM17/wRB424nhzeI/Wo9sn6m4HoiGStWtvpksA gGgV9Qum14HkMZ1Pv5j5VeUXpt0CHQWWLBC42ra4wyzu17cNQDeqe5VGwTb+xEZbef/Y UgwJCDHUIb/mDhlZfGG1UVfGmpdkcs98TCk0CK1GbJ50GNpU91dgUunhXhNJ9NsiqIbR onbw== X-Gm-Message-State: AOAM530SZxYSnyja0F/y8l4emfRA9AoBcWplfVfbFvY5SihTdZuzq02Z 7Wqn3f0WeAidx+wqyAJQZosp/d2TFD7O2A== X-Google-Smtp-Source: ABdhPJzqrMZnYsb4N9IlBnYa8xgiZ3yr1gWFMLelnAwzhGFLJ2/uDp0cj6r6FbGXmwrcmNHNKRuPng== X-Received: by 2002:a2e:144a:: with SMTP id 10mr5292738lju.149.1632401686081; Thu, 23 Sep 2021 05:54:46 -0700 (PDT) From: Oleksandr Andrushchenko To: xen-devel@lists.xenproject.org Cc: julien@xen.org, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, volodymyr_babchuk@epam.com, Artem_Mygaiev@epam.com, roger.pau@citrix.com, bertrand.marquis@arm.com, rahul.singh@arm.com, Oleksandr Andrushchenko Subject: [PATCH v2 05/11] xen/arm: Mark device as PCI while creating one Date: Thu, 23 Sep 2021 15:54:32 +0300 Message-Id: <20210923125438.234162-6-andr2000@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210923125438.234162-1-andr2000@gmail.com> References: <20210923125438.234162-1-andr2000@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1632401723390100001 Content-Type: text/plain; charset="utf-8" From: Oleksandr Andrushchenko While adding a PCI device mark it as such, so other frameworks can distinguish it form DT devices. Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Stefano Stabellini --- Since v1: - Moved the assignment from iommu_add_device to alloc_pdev --- xen/drivers/passthrough/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 633e89ac1311..fc3469bc12dc 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -328,6 +328,9 @@ static struct pci_dev *alloc_pdev(struct pci_seg *pseg,= u8 bus, u8 devfn) *((u8*) &pdev->bus) =3D bus; *((u8*) &pdev->devfn) =3D devfn; pdev->domain =3D NULL; +#ifdef CONFIG_ARM + pci_to_dev(pdev)->type =3D DEV_PCI; +#endif =20 rc =3D pdev_msi_init(pdev); if ( rc ) --=20 2.25.1