From patchwork Fri Sep 30 13:35:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 610944 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1536224pvb; Fri, 30 Sep 2022 06:47:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7UALRzeI3V9FWla//PnZx7BvSLpBkCrcJlk+IRzmX6Aawq/rxksWl+eFT854LJ/tmDIsmI X-Received: by 2002:ac8:4e52:0:b0:35d:4be1:9979 with SMTP id e18-20020ac84e52000000b0035d4be19979mr6690812qtw.675.1664545642669; Fri, 30 Sep 2022 06:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664545642; cv=none; d=google.com; s=arc-20160816; b=EZvFIBrJLw2qfLlMVSKuWcbNSpJxf+ILeDWL8lXIub3LZVKk9KULEuxAZTwksESMAZ oFRObSe1ybEn17YDhZTcBkR5jEPUY7eq75fRS0X/Btg2V4G/hqSSn0SRcqMg/FajmHky Ga33KyNeKZ7UvqCIQ/bGDstyjhGpAp4QKYhhiZvIC0Z928PiK19069Q3fb7TLAFJ8eFS SM54jkeDeWc5gVFppfJCiZQGrrYSW6t1g4U8x5BZcMrLeRM473BcqeMV6IP0nraHPKzh F9ZxvCO/8316mRgQ0v8Me3xuWXawOMRYDm3Kjq3v3BAjuNkXdg26gBGxQTR2KQ9NCbr2 PwTA== 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:to:from :dkim-signature; bh=bEjgbbis8HDtfHwdnQyjjDEk0rJVjNDHCCAMGdaHTE8=; b=sTq0mEE4oYDfm0Q+T5ZaG2m76lg+Zp1h6XVIw8QFZfJCQf9mzGpKj4i4ORfllY7Gs1 gjvmHpgHFLk5sttayyOrHWSekybWvYQ3NK6VNLRps64CpoIYjsUBEPLfD3UPUx+4xTXV /cgwe8uNYcLoBQyJNnNpCgSnLF3D2rNBXA1ddGRppxyDTYduuq2Z7RrLA76iUl8MIVNF jsrbFwdX4rD+yIDUDpiFz+ahfPnncPmbM79Cn8U9MWWRdmacJSSsV9rOCNo8eh5C0kZ/ eGXmYYGdquoULwBC/0/J3lMwCh7a8+j56gUDJJFxbNj2xffgSz3BeWLCpdU+XTS2QzR+ /IXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pbWqfiwy; 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 f12-20020ac8464c000000b0035d5b03088fsi964928qto.267.2022.09.30.06.47.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Sep 2022 06:47:22 -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=pbWqfiwy; 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]:49150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeGMM-0003S0-6Q for patch@linaro.org; Fri, 30 Sep 2022 09:47:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeGAo-0000E4-BZ for qemu-devel@nongnu.org; Fri, 30 Sep 2022 09:35:26 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:42859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeGAj-0006V9-Ua for qemu-devel@nongnu.org; Fri, 30 Sep 2022 09:35:26 -0400 Received: by mail-wm1-x32f.google.com with SMTP id o20-20020a05600c4fd400b003b4a516c479so2263401wmq.1 for ; Fri, 30 Sep 2022 06:35:21 -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:to:from:from:to:cc:subject:date; bh=bEjgbbis8HDtfHwdnQyjjDEk0rJVjNDHCCAMGdaHTE8=; b=pbWqfiwyqiwpF2/TnGMRK6K7nAUpBXcKchoqsTB2Y0mnyi+3QFjt3+m/q6pgBua+1S seMWYZ3WEW0ZZkSjy17ODk9ji2EREtvwgR9QX0PANl+Ekz/0mEVZMoxV9TK/5+2c1l4j I2obtGv37uUo3q9qo2eKt+Ea+6fKqGcWCyCRh9Dng9f2Y3CDLmjJx6D9HdEpP/2Y5YD+ qjA6SmKxRNki3nANACjD8XXxfvdE8MIIIbiuhf59wet4qvbfDIuZ4hsebjapK53DqNEm XIKH/0ZYho7VEgYlrluf8kvB3KWUjpkLQ6v0qQEmBTf3wsqiTpxij4f6Z2SLFIG83dyC AYsQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date; bh=bEjgbbis8HDtfHwdnQyjjDEk0rJVjNDHCCAMGdaHTE8=; b=rDXarXTGwWrNsEhOYDOJUC0ZrhK3kPNknT3nMwK4umYliua7m3qFwG0PlP+GGj1MXY oFpzmabkJmDAbIpN3hqDUcTo8I9ELymvnJY0clbA7tvAEUlCoY0Frx5GhJH5PozwpdyH aq83+k4rXdRrVHBP2+Jfj2p3GYILD2ybxoTEV+VuM1oqHYAdHQagCRx0V1kBdmXN3Lko zoITb/eydxYf/Jm22V++KZLSox12jGfhIToc5o0cbSbRF6zK3JlLous4GjXM9l58fxAF cm8i/tgckRTVGYNUBMPIen2qWyFICjmvIEfjtSo8Xuae5fB5Cy91JZcxOiiaLRcYUjPL EUKQ== X-Gm-Message-State: ACrzQf2+oYuAEiizw5eRGXDEX2YDCS94+1bdcd+tIjtsIZsAFat1057F AI+IOcLO6Z2gS9/5V+GXmU7MLwSPUHeIlA== X-Received: by 2002:a7b:c392:0:b0:3b4:acef:3523 with SMTP id s18-20020a7bc392000000b003b4acef3523mr6027973wmj.37.1664544920490; Fri, 30 Sep 2022 06:35:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q12-20020adfcd8c000000b0021e4829d359sm1982551wrj.39.2022.09.30.06.35.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 06:35:20 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/10] hw/arm/virt: Use "msi-map" devicetree property for PCI Date: Fri, 30 Sep 2022 14:35:09 +0100 Message-Id: <20220930133511.2112734-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220930133511.2112734-1-peter.maydell@linaro.org> References: <20220930133511.2112734-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32f.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=ham 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" From: Jean-Philippe Brucker 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 Message-id: 20220927100347.176606-4-jean-philippe@linaro.org Signed-off-by: Peter Maydell --- 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 41b88dd1444..b67ba0f2a10 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1490,8 +1490,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",