From patchwork Wed Oct 11 18:59:52 2023 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: 731978 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp575844wrv; Wed, 11 Oct 2023 12:02:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHk34f9/a6HQhOyxZsTQO2iLXppxPtDj9XQjfr3NPthZcOK3jP1EjhSfxd0/sumKHzN7yYj X-Received: by 2002:ad4:4f8e:0:b0:65a:fe44:d9cb with SMTP id em14-20020ad44f8e000000b0065afe44d9cbmr21564621qvb.37.1697050921523; Wed, 11 Oct 2023 12:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697050921; cv=none; d=google.com; s=arc-20160816; b=dgQXQD3A5Vo5SSS58SQy6A9dM9SVJoHZx7uLM9d9aOJctIAO+QPI8YJSoS2W4PgTtW wU4QX9y+aOgzRWH7ZMJCe7nc0zVQ4Yivf8jdRnbjub+tdIpTOpJvxZ5OEJwqPXGnP1Iz oP8KpefxNckjyTy+dym8ow5gGnXTiJEtn01SI/FvpvoIhUY07E8BCPYLQq0HCuA6IcOJ bTMeIwtV/u6UgXYcgKrezI+RaaOOkkzd4n1dbES3Qdr36wMEZlpTDqUmJyMtWCaUYWzo mShwwpVr6SWNUTfimQvCJ1m6pr6DKkhR6sRdEkT9wgHjhO1C2xowfG74alNCz8mMOfFc Upvg== 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=l6MUwrIZuL3QLaIXRnF54jX+sS97LzvHV1xQT7hr7ns=; fh=g2weSW4wmn5Q/Q+UHuFwOJzOUsIwDadO5EJQrd/nfHY=; b=Wx0JYaB5T8RxlpF7fg85yo6HG/3SDszZ/jfcoAEucdR6h3W/jhgGACdEC0fhxfVVez Zq2arPKaM+a373nE2XCypMT+FWQ0rRUJCX+0jVZ+CycWGuzWZfIxEwWYqbf7nKAbrS1T zz4gK+l0hHtzptc9zrl9+XUW1Elsi6WUhYaeMK4vIua69ytcecupi5RNnpAN2kLDTbpq 25LUn/bmomZV7K2UBQV43s3uoF6vjd5x0DFXmQKo0WHv6o3M3SKXfr1PRtzDXcCjbzBr irg/znDxwqrtJWmcTmj7UQVj6CwdADbx+X7xJwbC44n5irOJYBFBu1vBv4guo0E1Tku8 EGyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GTc0IaJ3; 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 g4-20020a0cdf04000000b0064f45b8c035si9599387qvl.374.2023.10.11.12.02.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 12:02:01 -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=GTc0IaJ3; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqeRM-0001IX-0G; Wed, 11 Oct 2023 15:00:16 -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 1qqeRK-0001IH-KI for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:15 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqeRH-0006zb-JG for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:14 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-53406799540so390274a12.1 for ; Wed, 11 Oct 2023 12:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697050809; x=1697655609; 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=l6MUwrIZuL3QLaIXRnF54jX+sS97LzvHV1xQT7hr7ns=; b=GTc0IaJ3fDiq6zFHk/F+wNyH/wbBZWB7Gkw38ngZDVgHCF6ACC7kAaQq2b5/L+V3OV A1ZmIUidkDawk+TTHm9KWdwQOpoyIVRGo8q5O7hi4BLQPmuXRrL1RHUW3nYXrtqL7+Mh 8DF7ZD02nz7iMTm9CWU3v8+JWMKzPqZql7REOhXtJgGsSNuHS69XfopogbRaT/9C6y4t +ikqrQRUqUDSl+Cp/wNBKjwEa0NWMT85/P98hBzl7WminmdS7C9VOqZpr5MY+MtHc0ba mu1t6QDJnWwblfQGxu2T7LobuusmsMkyXPVebh4PvZkTRm6nnh6yWg8B4rxWhmVmCiPT PjKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697050809; x=1697655609; 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=l6MUwrIZuL3QLaIXRnF54jX+sS97LzvHV1xQT7hr7ns=; b=TezE6qBdk0IZsgQrE91gLAj689XpU7kNM/jj5ChaaHH6QP3U4emNic6XNwTM7N/Kc7 oLqzG6xPyKMAt6AoRvKZcxSDUBhkoWsdXDwZOSVUslMxOVoxFxqKkbzuyYWI7wBaqZKW Wlh38eewrjoUqy/3P6fpAmPNgB8zv5PH19hKsIdQTSadjShGi0H1DkjFv/0eLth2Wa6N cf7i0ukXi9EFxuxKIe+/vzTamm/NufiGABL6aMjOGK9wYSX+4XGg8TXL0tt3GKtiIHUX r1S1+kNXA4Ovj7R2f7Q3y6q6w4SCwc5TSzm1FYzF60zkcUaREk3lFYiZLFJMadUlHjMT w6rw== X-Gm-Message-State: AOJu0Yxj1eao+pwib0iZ3LAxNoX1rCCY2nA3l4Z9ChIUMcA+TLYImePH hLCBrvIqoN7xSF0C9MsA4H1h4junoZ4ssY+LDEM= X-Received: by 2002:a05:6402:b0f:b0:536:aead:3486 with SMTP id bm15-20020a0564020b0f00b00536aead3486mr15614316edb.40.1697050808830; Wed, 11 Oct 2023 12:00:08 -0700 (PDT) Received: from m1x-phil.lan (mdq11-h01-176-173-161-48.dsl.sta.abo.bbox.fr. [176.173.161.48]) by smtp.gmail.com with ESMTPSA id r15-20020aa7c14f000000b0053448f23b33sm9148637edp.93.2023.10.11.12.00.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Oct 2023 12:00:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , =?utf-8?q?Herv=C3=A9_Poussine?= =?utf-8?q?au?= , Artyom Tarasenko , "Michael S. Tsirkin" , Huacai Chen , qemu-ppc@nongnu.org, Mark Cave-Ayland , Jiaxun Yang Subject: [PATCH 2/4] hw/isa/lpc_ich9: Access memory regions via pci_address_space[_io]() Date: Wed, 11 Oct 2023 20:59:52 +0200 Message-ID: <20231011185954.10337-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011185954.10337-1-philmd@linaro.org> References: <20231011185954.10337-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 PCI functions are plugged on a PCI bus. They can only access external memory regions via the bus. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bernhard Beschow --- hw/isa/lpc_ich9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 3f59980aa0..213b667f9b 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -707,8 +707,8 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) return; } - isa_bus = isa_bus_new(DEVICE(d), get_system_memory(), get_system_io(), - errp); + isa_bus = isa_bus_new(DEVICE(d), pci_address_space(d), + pci_address_space_io(d), errp); if (!isa_bus) { return; }