From patchwork Wed Oct 11 18:59:51 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: 731974 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp574961wrv; Wed, 11 Oct 2023 12:00:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5iI3pRK+KNDxKgTVWouW5rpKF0Y9NpNSwUFXXranCU7QasUubdljibacOhNw7GeynxaEJ X-Received: by 2002:ac8:5fc1:0:b0:418:162e:6a5d with SMTP id k1-20020ac85fc1000000b00418162e6a5dmr25178989qta.67.1697050827037; Wed, 11 Oct 2023 12:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697050827; cv=none; d=google.com; s=arc-20160816; b=IiIQapK69nafkk404KN/vS1Ck0AQov+CpC7mQlJoBbVfztq47sE9mLOY+JbBt+Voof FQ/jQcs1udDFXr1UmLnhJvaaLclu7zYOkR7+SMwpbeNLIfvqEX5fUNyKzDtQkJBGg2dR ENExzZfBuRyGpjxgmD+lM/Hwz15Td+uVwcVEuY4MB1PrZvQuSotWNERtHMSY7UiqBac3 IZwTnZPZsxlyvO1VyqkOTPobTZ43TkEhlvjhe0x1iEg5uwIL7sSbPs70+Tw1qJZMX4zn /6XouZTgJ2hMg0NkbkHLilR/085d4bVvjqVUh1MEt4mIaiFJ74L5/rtzBg0InXu4jf38 cMCw== 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=95NXK9svro6UdjqzIzFp76/dqqWwIIEkSGDMLJ7hSbk=; fh=g2weSW4wmn5Q/Q+UHuFwOJzOUsIwDadO5EJQrd/nfHY=; b=fvXPom+sK9mxZm3xcm1q15LhzVNyWVzQCCnJuNAPeN+hKMoeLdKZUeM/W4gGvBFvE0 RWltd9L8SqzbBhGvNVf5E6TnlWtv93d/EFU0FVX5j4LlknC4/ep4rXSTVpNBLkbOOx4p 7oa9com6HADil57PdIz1tN0Lf8VexZYdAdbwMvAbzJFiBaXscl4pEGyBVb98towuZsMC P2++ZTOjJwvgTh3gLYtf2bjqFSxGEP1BoCyv8P9gZjoFKXWEAqM3wdTG/0+1YkqI2gO6 dUN2toFM4slkx/enV/GXuDJsyKEpQ58+Kka+Q2axjYQ12st7YW7o6iXxuST0Is77X0lZ /ihA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YtEN4ryT; 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 i18-20020ac85e52000000b004180b2c7741si9936064qtx.85.2023.10.11.12.00.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 12:00:27 -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=YtEN4ryT; 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 1qqeRF-0001HY-J3; Wed, 11 Oct 2023 15:00:10 -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 1qqeRD-0001H0-B9 for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:07 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqeRB-0006nb-3l for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:07 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-53b8f8c6b1fso396002a12.0 for ; Wed, 11 Oct 2023 12:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697050803; x=1697655603; 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=95NXK9svro6UdjqzIzFp76/dqqWwIIEkSGDMLJ7hSbk=; b=YtEN4ryTGNfhG/2xb36yFPQD8ETa7d0Q0PK8I42HIVl7rDuCZgShq44+00X8h4kr4K QxPaoEMw0vGmlz62ZH0lnTuBRwfwshWLbUpRl8wcyTK2pr+KsaO+gF9clUaCM2vR+BFi 9QiAxSOsZ1GdjtMizzaPKGWN6Tog8phOh3GUv36WJJQisOwW3Ftgt2wyK40oNIHxA4fA T8V3DjPUv7DHf3Qbl6e3M/zRIa1dWGj+x+WRBsl3a/vIv8OXHfl31pqcZVIPIPn7U1AI JM/XlxiSZBNGfSBU8lwP1I4bSDOm81rDNfEAvP5ENZ2qxDcpuph30k+FNX8muug1T4BD I+Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697050803; x=1697655603; 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=95NXK9svro6UdjqzIzFp76/dqqWwIIEkSGDMLJ7hSbk=; b=tTzAhBDWZizoVUFxqNxK/SSZq8ZpL07jWaFtAXicwPoQvAdjrgBk4HyqkK2RuDi4ly 02t2HvP3GWv6nMHrd7J6LHjHLdve11dbows/9mWtnZMJrxpUUcBNzHClCtOIWhVuj1NU WqnqJbSPFWNGWW5EQ3z7CmY3/Y8F/Gg7dZtYesHzaNvjlpgDBOXCXWGA+DHKMrh4pji4 rSu2RTTeym27Q1z291rWYlfKpHeffORWTbp61UkN5sGUbxfWmXGyq1/YkeCsRnVsnU+d cJ0sFga1eP9PK0IUCJpJlg31lgWlUcNB9tLFZUbx7DcM3p47Td+DB7jrfx3nbKrqZTW6 AvEA== X-Gm-Message-State: AOJu0YyzrfK0K9c27y86pVflhdSenYWfARtE4tA0paVmjWTVZbxrYczn baq4+KLSRLRq2wmdLRjjJQnBSwtaOaUUpGvzOA8= X-Received: by 2002:aa7:c409:0:b0:530:a925:77a6 with SMTP id j9-20020aa7c409000000b00530a92577a6mr19319492edq.8.1697050803034; Wed, 11 Oct 2023 12:00:03 -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 bm15-20020a0564020b0f00b005346925a474sm9218292edb.43.2023.10.11.12.00.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Oct 2023 12:00:02 -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 1/4] hw/isa/i82378: Access memory regions via pci_address_space() Date: Wed, 11 Oct 2023 20:59:51 +0200 Message-ID: <20231011185954.10337-2-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::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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/i82378.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index 63e0857208..95b45d0178 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -76,7 +76,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp) pci_config_set_interrupt_pin(pci_conf, 1); /* interrupt pin 0 */ - isabus = isa_bus_new(dev, get_system_memory(), + isabus = isa_bus_new(dev, pci_address_space(pci), pci_address_space_io(pci), errp); if (!isabus) { return; 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; } From patchwork Wed Oct 11 18:59:53 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: 731975 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp575250wrv; Wed, 11 Oct 2023 12:01:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqCWeP/cRleJnTeNC2iQaR8db3sWe07EeRemspXudawhEN14SM9Tg2DMc08LOuRYiBjGgO X-Received: by 2002:a05:6102:8c:b0:44d:453c:a838 with SMTP id t12-20020a056102008c00b0044d453ca838mr17695772vsp.5.1697050859125; Wed, 11 Oct 2023 12:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697050859; cv=none; d=google.com; s=arc-20160816; b=Kr/Y2SSHqoOhRjlCG3HDZUMOGxaTHlZ+9tob+1vUyQKmRawJHvd2Kc9ZNr5GOJ2yt+ jfwmkAA+OqM3NBypYIrslXkx3cDSu2PzKp367xTi9vl4Fk+jvrHe8tqG+yxd3ZcGjXKG CwOqS3m4wK3RVy9Yy5VqNvc70twtBJs2ur8ar3MiHF/ZFKCK961X8uLN6Ez5IO5cIp8q Ap+FtaTBWpSRDXqRdoRshndLjC8uBbo5lbvh8qom1oPD4MHPvD66DwrEzX/7EbL6DEIA wlxkCBmfYFz7KiXzfA1BNp9ajQId/MaPCsxnrBkhgAmUymRMz4tCVtYmPqofB5KC1TYp isgw== 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=QUM2nwqmw9SH+qUH3W/mCq9cH7GldJMBYoc4FaiK2EI=; fh=g2weSW4wmn5Q/Q+UHuFwOJzOUsIwDadO5EJQrd/nfHY=; b=guABopjKOcRW30kR7aoUetomOSkocQvPlk4SeTVpHSNzB1C7znCAz52wwO0mMoKEPS 7LzmHB0RSaVzRo7FCg94JC0IfanOqE5wlfIYkQEY9qA91BRFGCCu1v3v2lSv9gvZ07m/ 2RJxS6bg+93x83n1JRUbbcFxehlNAsU2iGtCNSzBNvHy5sP8OmG3zmATDjKenfK2sMM9 5FHslveSX6r22Wl4SEQNOT6DJrEDWoEgaO9fwf0EIOxLegIvL6GZ4mUp/NhinNSgkETx dDlTrmiBhGEUOBOSt490WoeyBfFnuOKreD3Npiaur0DylVsWgpFfY4oorIGhL71h8Ldp juow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kzt3Hue5; 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 p24-20020a67f318000000b00452e6391860si73165vsf.349.2023.10.11.12.00.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 12:00:59 -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=Kzt3Hue5; 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 1qqeRS-0001Lx-E3; Wed, 11 Oct 2023 15:00:23 -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 1qqeRP-0001JP-IV for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:19 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqeRN-00072C-Vf for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:19 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9b64b98656bso25323766b.0 for ; Wed, 11 Oct 2023 12:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697050815; x=1697655615; 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=QUM2nwqmw9SH+qUH3W/mCq9cH7GldJMBYoc4FaiK2EI=; b=Kzt3Hue5txekYjomGbQk3KWl5DpJR5rnn+/NwyOdoGIiHwUJJx+RzbPdu8L4EcGBzp TXp2CuANuU2VQ1FIU2/qOFo3q5NqvCQG0K8e2y6miaekRmBCEWqkkC4f12LLHndHbuV6 k7GfM9qk2TOOiwBSeke/HsfJqdAerzrSl5tZRMUBQzMH9Pb14xEQL3Y55Nd7nhEPdWl3 nQEPxAKbn4N6ccJLa2zBp7iCb0DVPpWUsF4zPAvkmGc0w6mNF0slxcRpnynvl2jXVeHJ UwwW5cn0X/m2K2SV5bOiiz5asfoOdS4Frl7kHZ2qkGqQjKYzu7yidf164Yj4SKKqnhMW 4ZVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697050815; x=1697655615; 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=QUM2nwqmw9SH+qUH3W/mCq9cH7GldJMBYoc4FaiK2EI=; b=klIldHvPf0nnzZAYPtwHfg+JAr39eFjY+uyHVcNs/O6RM/uw6S6rzlB8mVTdR2Sty8 Q3jmI2mAlyHqRJa4U/3Bx9aVl59Mlx8BTF2cYihe7yFyoKSmAOeUAI3G7rpMMuaXe5lt lybOZNz8O4el2Pexj6QO0GakYZhQ8j7NJXscVdI29TvrP5PPK0aSk2VRzsN4Q3pI52ga mGG+qCaJixcPal/hHs9X3VD18QoFZxjPjI2tefrIGsDRj5xHjIwA9bp6BVciwo6hejw8 w7XJalxLFK85q9TuAar9pnigRuYI9v45bf3NLoruNy6mQxYnewFdNP1dbBFC/4/IQI8n SMlA== X-Gm-Message-State: AOJu0YxL+ZUi5ymU5K+pnS7vfl3V/TCtzCiqmsTXzweMsuz76BDPet72 dO3SSU+e43I/1Ub1U0U5yWo0/iqaBz0Cdo8iGhY= X-Received: by 2002:a17:907:77c9:b0:9b2:6d09:847c with SMTP id kz9-20020a17090777c900b009b26d09847cmr17990861ejc.10.1697050814822; Wed, 11 Oct 2023 12:00:14 -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 dx12-20020a170906a84c00b009b977bea1dcsm10105270ejb.23.2023.10.11.12.00.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Oct 2023 12:00:14 -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 3/4] hw/pci-host/bonito: Access memory regions via pci_address_space[_io]() Date: Wed, 11 Oct 2023 20:59:53 +0200 Message-ID: <20231011185954.10337-4-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::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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-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/pci-host/bonito.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index ee6cb85e97..50bde57862 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -700,14 +700,14 @@ static void bonito_pci_realize(PCIDevice *dev, Error **errp) /* Map PCI IO Space 0x1fd0 0000 - 0x1fd1 0000 */ memory_region_init_alias(&s->bonito_pciio, OBJECT(s), "isa_mmio", - get_system_io(), 0, BONITO_PCIIO_SIZE); + pci_address_space_io(dev), 0, BONITO_PCIIO_SIZE); sysbus_init_mmio(sysbus, &s->bonito_pciio); sysbus_mmio_map(sysbus, 5, BONITO_PCIIO_BASE); /* add pci local io mapping */ memory_region_init_alias(&s->bonito_localio, OBJECT(s), "IOCS[0]", - get_system_io(), 0, 256 * KiB); + pci_address_space_io(dev), 0, 256 * KiB); sysbus_init_mmio(sysbus, &s->bonito_localio); sysbus_mmio_map(sysbus, 6, BONITO_DEV_BASE); create_unimplemented_device("IOCS[1]", BONITO_DEV_BASE + 1 * 256 * KiB, @@ -719,7 +719,7 @@ static void bonito_pci_realize(PCIDevice *dev, Error **errp) memory_region_init_alias(pcimem_alias, NULL, "pci.mem.alias", &bs->pci_mem, 0, BONITO_PCIHI_SIZE); - memory_region_add_subregion(get_system_memory(), + memory_region_add_subregion(pci_address_space(dev), BONITO_PCIHI_BASE, pcimem_alias); create_unimplemented_device("PCI_2", (hwaddr)BONITO_PCIHI_BASE + BONITO_PCIHI_SIZE, From patchwork Wed Oct 11 18:59:54 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: 731977 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp575778wrv; Wed, 11 Oct 2023 12:01:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFtq2kNjiSZp/EzpszH7c9RSGUGQa2sBulXxdm0fqEf1O3VUnIZ1+sbn3eO4EceUi2Ye7Y X-Received: by 2002:a05:6808:159c:b0:3a8:512a:41b8 with SMTP id t28-20020a056808159c00b003a8512a41b8mr26931226oiw.21.1697050915463; Wed, 11 Oct 2023 12:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697050915; cv=none; d=google.com; s=arc-20160816; b=KDX8HN3uChmxbbn6y7BijrMNbnBsZTHHi8SxiiYqo3VWzjH/owc+IJVm/k+zZfX9U+ yeNVBGg6jCpd4Ae5yb2V1Uksez6FhwybF7eHXit9pYenXAdpxf+COEXPRjrJxVzjpTx8 LA5ldGE+LwpFwxwIay0OrGytj7/gEnB63QWQUtoXKaz1MhA2JSehhN6YHpqFFb0CIGtZ DzVsO2ngjpzBeiHNfHUXRWqLYBEpcR/fnNVKKxxq1Te45HmLVH1fu/JVeSuMxMhEwzDi kkppZpoPuHP74ClNX3Tj63cV3+c9wAFLoBcMm5/A8FQ4Zh+epH/D8wBMUSSFnAB8j9ET nznQ== 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=86EtloM2wmtdVgnAFS0+ABlwjRMBULfnIB1IMEYHyFk=; fh=g2weSW4wmn5Q/Q+UHuFwOJzOUsIwDadO5EJQrd/nfHY=; b=0QiUvCkh2kPBZM0h+emFFqQhD8Wiz53lma5iaHhgWeXulI6RCHWupcYUMldfzxxloG kd4sO+Ln5eIKqTK7JJfHLwjh9Oaw6W3zqEb+1RY4mZmsNQwVWD8FKmlxBpXCVL+Rg+7X 4f9SMaKUaJQbnBT22Ew00G9Uu5CBLeDPa2L7Gs/na8NWChTyMsfSmH4s3F2gfUomfT2M h+R9V+/PuRyO6xe8ppfVRAfa6DZHpOazxn5QpU5HnAUWGinKHdwTS+m+5NrLtccf7Uzg NSc7zyDYLJH4fNMtt/g9QqZFIVvWqh+2ZMqrVigS7HOYvStg0zA+qLIgRFFvkUBQrHCS UQ0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ihe9aOSP; 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 i20-20020a67e2d4000000b00452d3e9e8afsi65127vsm.699.2023.10.11.12.01.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 12:01:55 -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=Ihe9aOSP; 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 1qqeRY-0001QK-Du; Wed, 11 Oct 2023 15:00:28 -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 1qqeRV-0001Mr-7i for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:25 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqeRS-00074I-Js for qemu-devel@nongnu.org; Wed, 11 Oct 2023 15:00:24 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-31f71b25a99so149650f8f.2 for ; Wed, 11 Oct 2023 12:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697050821; x=1697655621; 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=86EtloM2wmtdVgnAFS0+ABlwjRMBULfnIB1IMEYHyFk=; b=Ihe9aOSPe72bUZQ5mALMbUcZ/CdRxJdjBMZQECjSjJvB7LwubsuQu46h99Hjpwgcx3 DhXjE6tEWgfdeMdziqd/vJ1AjmSiLqP74+JM1LmGGjlnTaPogJnz1FQqhTCN+FyKL071 YhzhGZ3doUA4C9t/lNfNkd6BNa7Ocm/a1ScnY7SRKlknjFWAXmojgQ1yk1UtmNXff0Qc IKVU3xQYSPOomDxbogKZ1s5znm8koh08P8xBvCHlEF0KuqvpprOGZQIjldZYSaPr2ejK PQTmIqUN51eE6Rt61HAjMoFrvq2IXYD49sATrlyQLN8R1dqDvg+wIQQ+KT6AuvLOdYhO YYlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697050821; x=1697655621; 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=86EtloM2wmtdVgnAFS0+ABlwjRMBULfnIB1IMEYHyFk=; b=JG2bfKu2RdQIu0U57HwZL4h7j2PBLRCe67BQT7MQ1tupJuBVwjEUdqAGfxTljVCjsy hNH6NgL1Ke3QkYW+DDJQW+eVu6+RrBborTR9tYW6oftVyBei1ZxLsd7qzHRFSRDKXYq5 aM4hkCylVezIfN3Nf0gHnQBi6oTrGC0zT3WjH4e5FtQH6XTw8TYh2m5UEZu/9H8r5U+w dBK+k4mI+qThrCGymRW5YcIkQeODUe32yOconfHVe+C081kpe/1ujQP+iTYYtw38hxfb ToGYPxPce5g+TIwVe9ae0Xf0ClGeW81uyNd8BP0DN2DQiItfyqU7bNF6MxEHLYIJfPjk Xirg== X-Gm-Message-State: AOJu0YxepK8jJqXN4G9ZYv+2t5J57JK66JrZX8BShSq/zrCjOLna6CwR XNC9aQcq99/D04E5uLxHW5H60VW9VZqUjBbo8rg= X-Received: by 2002:adf:db09:0:b0:324:8839:cdf6 with SMTP id s9-20020adfdb09000000b003248839cdf6mr20048110wri.53.1697050820990; Wed, 11 Oct 2023 12:00:20 -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 d13-20020a056402400d00b0053def18ee8bsm633090eda.20.2023.10.11.12.00.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Oct 2023 12:00:20 -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 4/4] hw/sparc64/ebus: Access memory regions via pci_address_space_io() Date: Wed, 11 Oct 2023 20:59:54 +0200 Message-ID: <20231011185954.10337-5-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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-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: Mark Cave-Ayland --- hw/sparc64/sun4u.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d908a38f73..c871170378 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -360,11 +360,11 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) pci_dev->config[0x09] = 0x00; // programming i/f pci_dev->config[0x0D] = 0x0a; // latency_timer - memory_region_init_alias(&s->bar0, OBJECT(s), "bar0", get_system_io(), - 0, 0x1000000); + memory_region_init_alias(&s->bar0, OBJECT(s), "bar0", + pci_address_space_io(pci_dev), 0, 0x1000000); pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar0); - memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", get_system_io(), - 0, 0x8000); + memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", + pci_address_space_io(pci_dev), 0, 0x8000); pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->bar1); }