From nobody Sat Nov 15 05:19:42 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1755724878; cv=none; d=zohomail.com; s=zohoarc; b=ZjlXBD7BS9vi0rpSYzg2Z8NnOKRKga1IHOdqSSZO8qI2meqAgxB7K2VWQpf4+fZ4d/gCJPvJhrzGINmrfDGw776VOGxTjLWrHhy1NswrlwPlsf0bzbplPdDFzBQcIedYLOtRCnw7ytMMEbCL22ryASsWmlteCq4PNGmb8w1GHGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755724878; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8JUtot82YvSwyf3aXIjcJBWwXAuoQGNyUhMh8fZ0EZY=; b=XPsNi7mayjgozFQKcH92YKuis3VQjcJG725EIe2M6NR6zDnvCpXU/d+AxPhHwrGaZRHDwN2sdsrScIK9j7jBU1qJDx5uuHmlGD1KFSTyVn9NEz5Zo28oLyshWxAH56pjpqscKdRKKYJwLkTfeS3lc+4nNZNyxtRgjkHqwnzvS7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1755724878110931.8042073048164; Wed, 20 Aug 2025 14:21:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uoqDy-0005Lc-0K; Wed, 20 Aug 2025 17:20:02 -0400 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 1uoqDv-0005Jk-Tw; Wed, 20 Aug 2025 17:19:59 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoqDu-00051J-AE; Wed, 20 Aug 2025 17:19:59 -0400 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-61a2a5b06cdso647554a12.1; Wed, 20 Aug 2025 14:19:57 -0700 (PDT) Received: from Provence.localdomain (dynamic-2a02-3100-249c-be00-0219-99ff-feb2-2458.310.pool.telefonica.de. [2a02:3100:249c:be00:219:99ff:feb2:2458]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-61a755d9cfasm4161182a12.9.2025.08.20.14.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Aug 2025 14:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755724796; x=1756329596; 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=8JUtot82YvSwyf3aXIjcJBWwXAuoQGNyUhMh8fZ0EZY=; b=KP4hnxjv78mMp71ZA8MKofgqCJPLZDwD3wcWMCEwgXH84kxqNM/wgca3rDe84DxTMa DaxilM/YBoYLt1fFDpOBhNquLrU5Nj9eLQ3V29REJj9zoYyqzYOnOwnvaTzF15TgpkgV ZTKs9+qQ+Vpo759VgCecnpd8NkicgVaNI4hNrjLYaUgjbYyggYOshyNxR6V0prduXfT2 EXdJVFtW3z1eKFtdh+euWxRRQffdYtYh+SfiiA5DmVDJe2mR5H4rxwl+gRlgX8UGFjdI 96YoHMVaX0IHtirlP5n9SFYUnH/rVxKQVAkEkLMaCon5MDAuDRWgWY8NU5490FKnEOlf L7Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755724796; x=1756329596; 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=8JUtot82YvSwyf3aXIjcJBWwXAuoQGNyUhMh8fZ0EZY=; b=NNl/7lMEw+2fBkLYAKg6iKcU63eV6s3JDQ3AI0iSVyEGgDFi6nq4WByeZoJGKF5URC q4z5+x2/nnfiBeQKpoM/VIN0IsquFTVIHu6E7ZSbVuL5TtCjGupPNbOGZ931smbF5ewG a4IMIoxEgFa9pjl08fTJ8NeZ0lI1MHb+7YnWYHCcbPVjLQ49kb0y3c0AMMPzELQf4VXw NWOkADRMxpgJYwaDCr6yBRHXj7tEhQvAXIpnxkaw6TqjNOWV8RfXaK/w+jdD1PPUzL7I +1RmlNYyhvOBhzsGeulRhaM3dNdNIHFBhq57xSe38ZOYDKb1PI3HtiqWtE2IIzdOeGB+ 60pg== X-Forwarded-Encrypted: i=1; AJvYcCVg+TpB946OwDJtVZCxEsppShebMA8T5MFTeV3V9y5veE4FgiSt8+Bj+LK1O6vRbolF4N/A0rMujg==@nongnu.org X-Gm-Message-State: AOJu0Yx8dCbtD5spT1eUHZR0NisVi43z7rpuVRgdh5uQFkIXGtnFCZZx y2Vnu3ERVeCTQnm/NY+p006hGSjYJFDafsO+QOCWnRXBT12/3O/l66CTlHtKNAIl X-Gm-Gg: ASbGncvDZ5md26DpIXHTjLpsYNhSMZoR38KZqe9UCepsGrKBOKZza3VwYJu6cl6rSjs XTTRFrPLAMBmxY9gAdYOi4AcMxKIC+MlVaL/wjlSatpWKOCJj5bEKs4dUwzXuloRCa80hFjcAv/ pOzoaRXwhLTnYYFWkVxJ5aHv76WberGoCBYkvW9oTVVlMzIjmazfhLnYTj1X+r+5+/pudVgnWQG ZqAny1OEDKotEOk0Ur7xcp4NNZykv87AbX404I24m3tDTCZDJoEooRqrcqhlsZuu03hdEvIFDNx tT2OOJDJsezTMQtzJbe8sb6erVmewDXj9YkiN6aAcjOrda+pD3RECP3h/SfAMovq4QZ7dWxhBWl QFLd/JQdebIB3qIucUFo3rt2Ci0NRPYhXOLluD50jX9hpJrP5m26pedkLi7DEnHJCqKeiFwcJww Iccq3iHizjEPfkWW1XeDrX3iTrN9zurMtQN88hfCIClBY= X-Google-Smtp-Source: AGHT+IFt58OrVR9gr38S9PgFLB8xA861Rr+G7Xsrqf4pF6NeMy4JJbmTpaxhffrkWfRt3MCCjraLBw== X-Received: by 2002:a05:6402:2551:b0:61a:8e5c:f4ef with SMTP id 4fb4d7f45d1cf-61bf872606cmr117418a12.18.1755724796135; Wed, 20 Aug 2025 14:19:56 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Peter Maydell , Andrey Smirnov , qemu-arm@nongnu.org, Bernhard Beschow , Guenter Roeck Subject: [PATCH 07/10] hw/pci-host/designware: Don't map PCI memory space into PCI inbound window Date: Wed, 20 Aug 2025 23:19:29 +0200 Message-ID: <20250820211932.27302-8-shentey@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250820211932.27302-1-shentey@gmail.com> References: <20250820211932.27302-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=shentey@gmail.com; helo=mail-ed1-x531.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, FREEMAIL_FROM=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1755724879723116600 Content-Type: text/plain; charset="utf-8" The real device has a default mapping which disappears as soon as an inbound iATU is configured. Furthermore, inbound and outbound mappings are entirely defined by iATUs. Remove the hardcoded mapping of PCI memory space to match real hardware. Note that the device model attempts to implement the default inbound mapping by reusing an inbound iATU. However, Linux clears all iATUs during boot, including the one purposefully set up by the device model, resulting in no default mapping. This will be fixed in the next patch. Signed-off-by: Bernhard Beschow --- hw/pci-host/designware.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c index 1e29b7e6be..2fd60a4817 100644 --- a/hw/pci-host/designware.c +++ b/hw/pci-host/designware.c @@ -703,8 +703,6 @@ static void designware_pcie_host_realize(DeviceState *d= ev, Error **errp) OBJECT(s), "pcie-bus-address-space-root", UINT64_MAX); - memory_region_add_subregion(&s->pci.address_space_root, - 0x0, &s->pci.memory); address_space_init(&s->pci.address_space, &s->pci.address_space_root, "pcie-bus-address-space"); --=20 2.50.1