From patchwork Tue Nov 26 11:22:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 845569 Delivered-To: patch@linaro.org Received: by 2002:a5d:6989:0:b0:382:43a8:7b94 with SMTP id g9csp155841wru; Tue, 26 Nov 2024 03:26:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWuX9iAo3ezPZ3tlzD26I2XqtNcTFoty++hIyoaQTcRE+DZYow7bFihK5hwEMSkiloZVlESPQ==@linaro.org X-Google-Smtp-Source: AGHT+IEpu11aUF7Sa3V9UIaqHA5q1/B/mGAYY2tYQQTTejhAkO0K3TnJ/PWfR+gHneG3xuZT1DLy X-Received: by 2002:a05:620a:408d:b0:7b1:51df:115a with SMTP id af79cd13be357-7b5146108b1mr2498266985a.49.1732620413111; Tue, 26 Nov 2024 03:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732620413; cv=none; d=google.com; s=arc-20240605; b=XqIZXPVx/ABI16REWv43o0TDrLrMmyOlreNdNBKyOkqWbxuscjPx4LuB3ufPTvGCM9 9KkA4W9Qck547tg8axyjAv83hoANo/wt363IkWv5wDmPxnO/d7lFJyBqIfMrao5NVOtz q03NvaPShx6uh6Z9mVqQqcafWVamEd9QacTOl3QkeFlA5BVHd6NH3RPKAOjuJ4CEFtap l8Lc+RKzQIJD22fCufFLy288MeGjeBQYYgOqN3TNSJeRPBJNLDPIPwXqOEVip+119VYI bJFfCR472CsnB5HWV2lVRWGA+27vuUtHtfXgFBgbNyUVOyU6ZcbUKhdmpy7VraXVgyAZ JWlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=531OAHe2E6s/gjTEfxFCkh/CSUMa49twfx2TRTu9rug=; fh=siS/4HMv/4Bjpv+J3MqwgZ5TPB6jtxhL8giIGJt6+cQ=; b=h2CIGm6gPB79yfaqKeFcFN5l8zM6G2faljUuJnHpsYC760kc2XqCQsYvPmF6h4oLsm YWQvuuVQJkBpXeYmNNQvnF3e/GpKBxEfu/2QX3GbNZty87CTkMb71OfCiN09hBSF2wv/ BBobLyLWxQ/9T2X72npaSoNIgTdWRO6IKJK8PutrUsG+vc2VFlVXVxiavgbyBVaMYMMk l3xtD3draTPcJNubVWNM4hutISWNvJqfMyzlDJZzYfylHoHvlRsUtssGAEnXek2l0slB OBsGIQa0TOLoBnLuP1TjwRibZB7igpa+xPouTQ32DyZKa6BhbVhqQvSbaoX4PezCA2wi A80g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fu1eq2LP; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b6654f554dsi713858385a.358.2024.11.26.03.26.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Nov 2024 03:26:53 -0800 (PST) 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=fu1eq2LP; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFtfP-00046v-To; Tue, 26 Nov 2024 06:23:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFten-0003wR-Ny for qemu-devel@nongnu.org; Tue, 26 Nov 2024 06:23:06 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFtek-0002ka-Dm for qemu-devel@nongnu.org; Tue, 26 Nov 2024 06:23:01 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4349cc45219so22497515e9.3 for ; Tue, 26 Nov 2024 03:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732620173; x=1733224973; darn=nongnu.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=531OAHe2E6s/gjTEfxFCkh/CSUMa49twfx2TRTu9rug=; b=fu1eq2LPLYZFT1JFRqcrq/dgHJLG4aatbxi8h011QprBw2hhsCeLOZuP4mY49Yj2vo G5dN0v9kl10AbhDFyveVoQaWbtJ6HDuP6d5FhR5lZAVvEQS9IdjWN8wty6q9vfBAn0HY 5WV/y6/Ez293S4CuXmjrGcKPRxn2wFmoPkkqtZmVCo7wuNup6EbaWK1FsaQ9wzf2J+WJ hm7/zlIcB3IMCWpNuF5DTTahZ0R2NVdnZU/e0t0IZGDFuXYiTImu3W9y7Cj3sySbVOIo XQ5qP5+mvy+djvuLimbVju0cY9CSiwzbqoQq85ljoICpo5tlzAa6M4WafrrytTuqfe6i c4cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732620173; x=1733224973; 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=531OAHe2E6s/gjTEfxFCkh/CSUMa49twfx2TRTu9rug=; b=Z4HAqTi0Ugd016pjq49vk2Ac5kDoVI7hvokqAiyRS2lj+xQbd5+NokG1FGYhZxYF/9 OvVoih4NbS1w06NWuewUfimOr5MPItyKFapO/OBegeuqI5hc9sfVxQQBEjPH49jBYcbM 4ct1CnpwwZ7DTm7kM9dHFmTu8sMJmi0LIWkvaggAKr+GkIpbMIjvCcni3ZlV1Z8atcPU 8LxvwuJcHw9zwkSSFBfVOQK1PeAF19wo38mBYAC9WJaj2FexupShQB04gumwAGhKB1iT Xh4Q8R6WKPkvTTuz8XJ/GGz82yywrrQND4WXS+m/qRh8XIc3tVDiWxy3Do4wNZG8M4x5 isew== X-Gm-Message-State: AOJu0YxjAuBeXg+CRTHTiwKiq5H+QQn432yBgOXl6kfnQRMk0oNYbBWs WYKNcmXGsoQBO51E6egNJbVpE5MGMTE+JWH2frHAO/cyodaP2OvhnJkAzWD3NgwrQNT5Wo9uBUl g X-Gm-Gg: ASbGncsTF2c0do+eVhsGbKDO6LCfjbUufsTLmfiDGyIgCszALqW4hPdSAzU7N0ZCEod 4vq+VlzCF65zK+LmyQHYo+2tvy2v2wA46gcTDS2BusG6IiaN+MpyuEO4xhaKtbFZ0V5qqDH6f/B XaIERx9M1/Nmv0mroGrhr+17y0HNTUK4ps0vs7o2+MFqLNNSPyYlmw5stlkLh+XFkyKKZJe87Ep dQX1koD0Cxafo+UBVgJVII49aWKummrer681kJ+ofSu6pPA3rG0+sqYIGTNKKTqZ9Xs331/ X-Received: by 2002:a05:600c:154d:b0:434:a815:2b57 with SMTP id 5b1f17b1804b1-434a8152d9dmr7809555e9.20.1732620173600; Tue, 26 Nov 2024 03:22:53 -0800 (PST) Received: from localhost.localdomain ([176.176.143.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434a4faf750sm25527775e9.10.2024.11.26.03.22.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 26 Nov 2024 03:22:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, Thomas Huth , "Michael S. Tsirkin" , qemu-riscv@nongnu.org, Marcel Apfelbaum , Peter Maydell , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.0 v2 05/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_internal_init() Date: Tue, 26 Nov 2024 12:22:04 +0100 Message-ID: <20241126112212.64524-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241126112212.64524-1-philmd@linaro.org> References: <20241126112212.64524-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@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-bounces+patch=linaro.org@nongnu.org Have pci_root_bus_internal_init() callers set the 'bar_at_addr_0_refused' argument. No logical change. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/pci.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 27b66583e54..8eacb8f82fc 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -529,7 +529,8 @@ static bool machine_refuses_bar_at_addr_0(void) static void pci_root_bus_internal_init(PCIBus *bus, DeviceState *parent, MemoryRegion *mem, MemoryRegion *io, - uint8_t devfn_min) + uint8_t devfn_min, + bool bar_at_addr_0_refused) { assert(PCI_FUNC(devfn_min) == 0); bus->devfn_min = devfn_min; @@ -537,7 +538,7 @@ static void pci_root_bus_internal_init(PCIBus *bus, DeviceState *parent, bus->address_space_mem = mem; bus->address_space_io = io; bus->flags |= PCI_BUS_IS_ROOT; - if (machine_refuses_bar_at_addr_0()) { + if (bar_at_addr_0_refused && machine_refuses_bar_at_addr_0()) { bus->flags |= PCI_BUS_BAR_AT_ADDR0_REFUSED; } @@ -563,7 +564,8 @@ void pci_root_bus_init(PCIBus *bus, size_t bus_size, DeviceState *parent, uint8_t devfn_min, const char *typename) { qbus_init(bus, bus_size, typename, parent, name); - pci_root_bus_internal_init(bus, parent, mem, io, devfn_min); + pci_root_bus_internal_init(bus, parent, mem, io, devfn_min, + true); } PCIBus *pci_root_bus_new(DeviceState *parent, const char *name, @@ -573,7 +575,8 @@ PCIBus *pci_root_bus_new(DeviceState *parent, const char *name, PCIBus *bus; bus = PCI_BUS(qbus_new(typename, parent, name)); - pci_root_bus_internal_init(bus, parent, mem, io, devfn_min); + pci_root_bus_internal_init(bus, parent, mem, io, devfn_min, + true); return bus; }