From patchwork Tue Sep 27 10:03:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 609599 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp249351pvb; Tue, 27 Sep 2022 03:23:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7A2OE2bKKHHjMxhY+yK+gRCorArrnZMW/f6hX72N0s7tdkO+8i/3UzhauVMgLNZvaLmG0l X-Received: by 2002:a05:622a:1482:b0:35b:afa9:d8a3 with SMTP id t2-20020a05622a148200b0035bafa9d8a3mr21953191qtx.621.1664274226365; Tue, 27 Sep 2022 03:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664274226; cv=none; d=google.com; s=arc-20160816; b=tV+szWyZKkFD4ov0qHOvt9JgzTu1+C3jz4xnr6uZ/R4gpsq/cAPTq6885sqObeGFAh cGYksRucjwX70pVh4ofeIbJVV0rg7z0kj2qgSbU+Wep4XW0QhGUxNgFRkXMYIaYsOHIg /FttXpjm0jKRdciJq1f9L8XmdRtNjsdcvnc00NtR9mdWBthZhG8UJ1UV92JCtLijpAh2 visjyqeM9KWP1h9IPnZoWhEiGaEy4tcNCxF36tm+yXL/2+TapxqItP1p9581wXIDTVgO tM3Y4035oiYSXFcpTsW14hPX+OdVFYQ7kcdLJjgyg+Vd+wIK/yZzpREfnz4L2hEN+Jwk 8xDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7iySBt4V5mw6rx6WYGB/cETVun6K55iadG8h/0ICVCI=; b=jTVl2zr535edZLD66Zz9XFC6FbsYWdO4b2diu74aPrY4vZSTkztfeQGga1RMtSvK6u kdSCv8GnlXKk3nU2K+SV5Ntk8lNAnTJ5yM3MypwNmr5XL7XidWyKn6R9FuRykgmJf3ep A6YXmIVdaYMGn0RmOIQeVwdO/5gZMfopgT8MPA0HxYtzIIR+vslNaMizQAh/13Qddsaw ukNtTIvBsSdHL5eZnkHI/UYxE9+W/xRQW+PwWoDfU4ZuwgAhVJ9Plg2vZuOQM9vD5UbT znaAAc2HQ41wX31eb2tcjzT5PuiTz/+T0VuUZTHm+tWjYGpw78cVSbGrnJcA0rO5J2wC z5Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wYN8Dn3/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g20-20020a05620a109400b006b92c9be3a5si445553qkk.638.2022.09.27.03.23.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Sep 2022 03:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wYN8Dn3/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7kf-0005u5-Up for patch@linaro.org; Tue, 27 Sep 2022 06:23:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7a8-0000tJ-Ll for qemu-devel@nongnu.org; Tue, 27 Sep 2022 06:12:53 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:43823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od7a5-0002V6-Iu for qemu-devel@nongnu.org; Tue, 27 Sep 2022 06:12:52 -0400 Received: by mail-wm1-x331.google.com with SMTP id r3-20020a05600c35c300b003b4b5f6c6bdso5150901wmq.2 for ; Tue, 27 Sep 2022 03:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=7iySBt4V5mw6rx6WYGB/cETVun6K55iadG8h/0ICVCI=; b=wYN8Dn3/POyFtgTlE+N7TwzRTylZ3vqDUce0hUQ2JyvICPMXJcg0O1QUokSDbifWwF k4pBmVZWraV4SYeWcd6Tm5fJTv28Dv5//Spvc2A+S+cd4ZUKfJqcjqEDeueVE7Q8/qLI waD8MuC/ifn0S3r9vKDmaQfrQPJZnwMo3A5IXidNH05yXthKpwPkQctLiNkdZGY2W/l8 pSZFO2ftMfOKnaBzquylAwM/Vofnelrou6NNb3wnEfc34d7LdPiZbNFmoc8o53R7xUYM XYCmR7D6o6QL6Do8W44S6TUmpQgsI1k8Sym4TGd9T3yG1eO2ENabxupceNm99KavsITl IZ1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=7iySBt4V5mw6rx6WYGB/cETVun6K55iadG8h/0ICVCI=; b=biFA9V0C8E+yg9DBn50NqDu8hABaNzTv5nxHiCvcbll6i+/dlg+sJQjXfMqQkmxUGO m9KzHf6VWsVdqPD6F6okr34jpHz417D5dsLxXtkCieLdKSmvWqfsAEHMGCCM2jd5/Lht Ig7RtD746dvDyy+99l7XV1LOKqWEsZQzUfbc9Txe8jpksF/4VFNzj7TMAwWUwiXEoT7Z TxL30yn9F5OcO2DS3awIr6Gk7kwH2V7y5xvm2a1a7Ycl+AdGhnQfIMJLv0U+79t3VCzW URRcyU1+zDiYG5hJ7VACKmUt3U/dYaU+spYJDaY5bdfjm4oexqH7JRPrWJ6Ck4t403Oy n89A== X-Gm-Message-State: ACrzQf3GUXcTsMdzoFSZtV/HA8f71Z8T3mvwnwPskPkzwguMLT7tYTRy 3VhksdhQ4pljazHUmowbgnaM2rIBJh2EeQ== X-Received: by 2002:a7b:c398:0:b0:3b4:9308:ffee with SMTP id s24-20020a7bc398000000b003b49308ffeemr2045144wmj.51.1664273568239; Tue, 27 Sep 2022 03:12:48 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id w6-20020adfd4c6000000b00223b8168b15sm1398387wrk.66.2022.09.27.03.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 03:12:47 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, Jean-Philippe Brucker Subject: [PATCH v2 3/8] hw/arm/virt: Use "msi-map" devicetree property for PCI Date: Tue, 27 Sep 2022 11:03:44 +0100 Message-Id: <20220927100347.176606-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220927100347.176606-1-jean-philippe@linaro.org> References: <20220927100347.176606-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The "msi-parent" property can be used on the PCI node when MSIs do not contain sideband data (device IDs) [1]. In QEMU, MSI transactions contain the requester ID, so the PCI node should use the "msi-map" property instead of "msi-parent". In our case the property describes an identity map between requester ID and sideband data. This fixes a warning when passing the DTB generated by QEMU to dtc, following a recent change to the GICv3 node: Warning (msi_parent_property): /pcie@10000000:msi-parent: property size (4) too small for cell size 1 [1] linux/Documentation/devicetree/bindings/pci/pci-msi.txt Signed-off-by: Jean-Philippe Brucker Reviewed-by: Peter Maydell Reviewed-by: Eric Auger --- hw/arm/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index ed6f1ac41e..8605f5058a 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1489,8 +1489,8 @@ static void create_pcie(VirtMachineState *vms) qemu_fdt_setprop(ms->fdt, nodename, "dma-coherent", NULL, 0); if (vms->msi_phandle) { - qemu_fdt_setprop_cells(ms->fdt, nodename, "msi-parent", - vms->msi_phandle); + qemu_fdt_setprop_cells(ms->fdt, nodename, "msi-map", + 0, vms->msi_phandle, 0, 0x10000); } qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg",