Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217890/?format=api
{ "id": 2217890, "url": "http://patchwork.ozlabs.org/api/patches/2217890/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260330211859.19317-8-deller@kernel.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260330211859.19317-8-deller@kernel.org>", "list_archive_url": null, "date": "2026-03-30T21:18:54", "name": "[07/11] hw/pci-host/astro: Add GMMIO mapping", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "71cb31b05d7a4240f357a19e4a66e64827471fe6", "submitter": { "id": 87076, "url": "http://patchwork.ozlabs.org/api/people/87076/?format=api", "name": "Helge Deller", "email": "deller@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260330211859.19317-8-deller@kernel.org/mbox/", "series": [ { "id": 498097, "url": "http://patchwork.ozlabs.org/api/series/498097/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498097", "date": "2026-03-30T21:18:54", "name": "HPPA Patches for qemu-v11", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498097/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217890/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217890/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=IQAB5j75;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fl3zd4sshz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 08:19:41 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w7K0w-0000p2-RR; Mon, 30 Mar 2026 17:19:14 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1w7K0v-0000oU-6u\n for qemu-devel@nongnu.org; Mon, 30 Mar 2026 17:19:13 -0400", "from tor.source.kernel.org ([172.105.4.254])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1w7K0t-0003kP-My\n for qemu-devel@nongnu.org; Mon, 30 Mar 2026 17:19:12 -0400", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by tor.source.kernel.org (Postfix) with ESMTP id 4D62D6013C;\n Mon, 30 Mar 2026 21:19:11 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 26590C2BCB1;\n Mon, 30 Mar 2026 21:19:09 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1774905551;\n bh=sg/+n0PQffkkyD0RFYrCjE0ggu+1Qtabt56HcTC9mb8=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=IQAB5j75dPHQrDJOBgWyJC1p3p6jKUHoFvs9vQ27X6r7D0U4VIEmtRIXZq2XnRaDK\n GEYYj9hgbgzT2+XNEqEyI+g/uegEdprMVyZwRRlXZK1u8q3DSQzLSe62Zve5mLhy0B\n CGQH82KmiYDl0iC2aWMKLn0RTQdMpVB61lF6vIf7HvkOfwTFfgMFlLaPCYL7ZMmh8t\n dQbm9J2l7ScZaC1ltvQCDUjzTedFJW9VjMGsewEnzhtTiNplQpsddfFKgCyNEBSI9z\n M3+xrGfYsrEExAJv6Pb7dfqyONVkZf8J5/BmpY11m769/v0yWr6O7LaxQGL/OfN7SR\n jYuxmsXPcptlQ==", "From": "Helge Deller <deller@kernel.org>", "To": "qemu-devel@nongnu.org", "Cc": "deller@gmx.de,\n\tRichard Henderson <richard.henderson@linaro.org>", "Subject": "[PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping", "Date": "Mon, 30 Mar 2026 23:18:54 +0200", "Message-ID": "<20260330211859.19317-8-deller@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260330211859.19317-1-deller@kernel.org>", "References": "<20260330211859.19317-1-deller@kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=172.105.4.254; envelope-from=deller@kernel.org;\n helo=tor.source.kernel.org", "X-Spam_score_int": "-5", "X-Spam_score": "-0.6", "X-Spam_bar": "/", "X-Spam_report": "(-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1,\n SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Helge Deller <deller@gmx.de>\n\nImplement the GMMIO mapping.\n\nSigned-off-by: Helge Deller <deller@gmx.de>\n---\n hw/pci-host/astro.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 70 insertions(+), 1 deletion(-)", "diff": "diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c\nindex e1d73258c4..8c61c696bd 100644\n--- a/hw/pci-host/astro.c\n+++ b/hw/pci-host/astro.c\n@@ -14,7 +14,6 @@\n * - All user-added devices are currently attached to the first\n * Elroy (PCI bus) only for now. To fix this additional work in\n * SeaBIOS and this driver is needed. See \"user_creatable\" flag below.\n- * - GMMIO (Greater than 4 GB MMIO) register\n */\n \n #define TYPE_ASTRO_IOMMU_MEMORY_REGION \"astro-iommu-memory-region\"\n@@ -660,6 +659,73 @@ static void adjust_LMMIO_DIRECT_mapping(AstroState *s, unsigned int reg_index)\n memory_region_set_enabled(lmmio_alias, true);\n }\n \n+static void adjust_GMMIO_mapping(AstroState *s)\n+{\n+ MemoryRegion *gmmio;\n+ uint64_t map_addr, map_size, align_mask;\n+ uint32_t map_route, map_enabled, i;\n+\n+ gmmio = &s->gmmio;\n+ map_addr = s->ioc_ranges[(0x378 - 0x300) / 8]; /* GMMIO_DIST_BASE */\n+ map_enabled = map_addr & 1;\n+ map_addr &= MAKE_64BIT_MASK(32, 8);\n+ s->ioc_ranges[(0x378 - 0x300) / 8] = map_addr | map_enabled;\n+\n+ map_route = s->ioc_ranges[(0x388 - 0x300) / 8] >> 58; /* GMMIO_DIST_ROUTE */\n+ map_route = MIN(MAX(map_route, 29), 33); /* between 4-16 GB total */\n+ map_size = 1ULL << map_route; /* size of each mapping */\n+ align_mask = ~(map_size - 1);\n+\n+ /* make sure the lmmio region is initially turned off */\n+ if (gmmio->enabled) {\n+ memory_region_set_enabled(gmmio, false);\n+ }\n+\n+ /* do sanity checks and calculate mmio size */\n+ map_addr &= align_mask;\n+\n+ /* exit if disabled */\n+ if (!map_enabled) {\n+ return;\n+ }\n+\n+ if (!gmmio->name) {\n+ memory_region_init_io(gmmio, OBJECT(s), &unassigned_io_ops, s,\n+ \"GMMIO\", ROPES_PER_IOC * map_size);\n+ memory_region_add_subregion_overlap(get_system_memory(),\n+ map_addr, gmmio, 1);\n+ }\n+\n+ memory_region_set_address(gmmio, map_addr);\n+ memory_region_set_size(gmmio, ROPES_PER_IOC * map_size);\n+ memory_region_set_enabled(gmmio, true);\n+\n+ for (i = 0; i < ELROY_NUM; i++) {\n+ MemoryRegion *alias;\n+ ElroyState *elroy;\n+ int rope;\n+\n+ elroy = s->elroy[i];\n+ alias = &elroy->gmmio_alias;\n+ rope = elroy_rope_nr[i];\n+ if (alias->enabled) {\n+ memory_region_set_enabled(alias, false);\n+ }\n+\n+ if (!alias->name) {\n+ memory_region_init_alias(alias, OBJECT(elroy),\n+ \"gmmio-alias\", &elroy->pci_mmio, 0, map_size);\n+ memory_region_add_subregion_overlap(gmmio, rope * map_size,\n+ alias, 2);\n+ }\n+\n+ memory_region_set_address(alias, rope * map_size);\n+ memory_region_set_alias_offset(alias, map_addr + rope * map_size);\n+ memory_region_set_size(alias, map_size);\n+ memory_region_set_enabled(alias, true);\n+ }\n+}\n+\n static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,\n uint64_t *data, unsigned size,\n MemTxAttrs attrs)\n@@ -775,6 +841,9 @@ static MemTxResult astro_chip_write_with_attrs(void *opaque, hwaddr addr,\n if (addr >= 0x360 && addr <= 0x370 + 7) {\n adjust_LMMIO_mapping(s);\n }\n+ if (addr >= 0x378 && addr <= 0x388 + 7) {\n+ adjust_GMMIO_mapping(s);\n+ }\n break;\n case 0x10200:\n case 0x10220:\n", "prefixes": [ "07/11" ] }