From patchwork Thu Jan 20 12:36:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 533585 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp47944imr; Thu, 20 Jan 2022 10:24:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrBJpbfYGtUEoGVsK66cgP3C5nOo5eaevTYkPHLPzG/Ell5osUTPfeT/+BLXTaUh9NUrsi X-Received: by 2002:a25:3b01:: with SMTP id i1mr400285yba.757.1642703076007; Thu, 20 Jan 2022 10:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642703076; cv=none; d=google.com; s=arc-20160816; b=RqUMYnXu/FN3j3nLWBkATj6pAQAlJW+2YFGrn1QRYAhaJrr9DkTdnOm0jgUo1FYRoM 8COMbwjL9JEspqszqatAAYOMKpda0vTtDONddctKELjCpyrCH/EIngIh79nZ9fy0aItw J7zbscK47qHKsRxvI2lekA2YtXOwryxKf1sAIaSipKt08BLysQMfVGwGZfmEUeZwBPh0 rSoi3NeYLR7wS5mTkccokggpVbz/QDRcLz9tnzvSxg0mfV4n4e6YDUVlMozw8feRn/Y+ FM2I65JD0I4loCQoxy9pyjDbTOBeLvkfEFEV1EdwJPdjE3+ihtJTMWGPChc90IpYX1Ay HVkQ== 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:to:from :dkim-signature; bh=iUwMXOyzZS8l0JUnEvs13j+GS4kFMz1hKnUNXMMSq20=; b=g7XYF8rOjBZ6N3cEyJ1HC9KS01PNRQAlC5r7spW9NIwXPeaJn/bCx1RiceG2OUA4lu gCpsEo9E0uy3NiNr105IEz81THtn1iMRf5P2gUwW3R0F7mLi3YkwXZ10Ss9y8CPXTCM/ L3Fh3uZWHXjv6LDGoZpm1GC7jMBhv4rUjQg7rh5lFr2WP3nkaWxxOgrPdh7HWu3PImSA Tns0RFgcqe2GPor235RkaAZIy32L4FphI/gZcVM7A1gGVf8a4AE7UbJkRr8oUMHtCPYQ Xp4BRpsvz5c3HZsh3xXarC4oA1XOCFaIJ4cAv+BxPTnrkv+TDlkOds5y3QQXfoF2eVr9 5/fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JQixlB1j; 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 h203si118877ywb.270.2022.01.20.10.24.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Jan 2022 10:24:35 -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=JQixlB1j; 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]:43466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAc6t-0002N9-Gc for patch@linaro.org; Thu, 20 Jan 2022 13:24:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAWgN-0004Bd-RM for qemu-devel@nongnu.org; Thu, 20 Jan 2022 07:36:52 -0500 Received: from [2a00:1450:4864:20::329] (port=52764 helo=mail-wm1-x329.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAWgL-0003Aa-A8 for qemu-devel@nongnu.org; Thu, 20 Jan 2022 07:36:50 -0500 Received: by mail-wm1-x329.google.com with SMTP id v123so11818966wme.2 for ; Thu, 20 Jan 2022 04:36:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=iUwMXOyzZS8l0JUnEvs13j+GS4kFMz1hKnUNXMMSq20=; b=JQixlB1jRuPg7W7ZH0uka6czhfbc2EaKao2hVDONCG2PPTMSUR0qTBddOJHSVHh2/v q73hHu22TVZNKvUyqiyz7VSxOvKJtOGR/KmuMfWskq8AVaf118xV8pXiU+gnXRCMYLdA nTVd7G0CxODpZIaJAWv+IM/we0x9+qY2ihMYBePD1XpCCbB5DLfAdLI+P0WJPdSLTROP Q65yg+0NpWgipwAXxj1OoR7KtUxlKpeH0OrkLb920dH7uSI87pvqtqI6hPL8KiyIyjwb SAO3H3o0wX4SEE06arlxlF4J0epoYgW/WYP3byqLWhxd+yh9IaTPCJ4tLdRS6R8mmRgA iaDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iUwMXOyzZS8l0JUnEvs13j+GS4kFMz1hKnUNXMMSq20=; b=4f12JM3xu2SIfMlpv20gDZ37MsD68Aqry3NWU8QdMav8uQWl2Rc3gxLz5COE3B3ErF weQ7oWDXuTg/d1XFpI0ohky6VufL4RH+FNOZ3Hgg0uucW/wVU85Gu+Zuj6zvE9j+uASI n6v7/htnYszSOtmglxHCrzQBpVXOcx33tBtg4y7bgcFGfek18Dxabdxa4KRCthvlIUC8 zmzqo+tOgWDB7OR3li0fcN8I0MrdxzPSKomf2clty3axAvZ3boCrvv2PcDCICnBXOVBH Ztis2yL1B2koHaYEjW9xCqWpO92wNbKIWMBFaikV9y/o4ipCFSI367ZYTLS33wPpX+wh SF/g== X-Gm-Message-State: AOAM533Ag0O+K3m4BTPDa4J845bebsuznp5AGzCOSqUzjRPBefOQnJsh 0F3rO+iiDW249qzBurrDe6wV63Ikg+Pd/g== X-Received: by 2002:a05:600c:21c6:: with SMTP id x6mr8676922wmj.135.1642682207917; Thu, 20 Jan 2022 04:36:47 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id t8sm7993324wmq.43.2022.01.20.04.36.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 04:36:47 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/38] hw/arm/virt: Add a control for the the highmem redistributors Date: Thu, 20 Jan 2022 12:36:09 +0000 Message-Id: <20220120123630.267975-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220120123630.267975-1-peter.maydell@linaro.org> References: <20220120123630.267975-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::329 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Marc Zyngier Just like we can control the enablement of the highmem PCIe region using highmem_ecam, let's add a control for the highmem GICv3 redistributor region. Similarily to highmem_ecam, these redistributors are disabled when highmem is off. Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Message-id: 20220114140741.1358263-3-maz@kernel.org Signed-off-by: Peter Maydell --- include/hw/arm/virt.h | 4 +++- hw/arm/virt-acpi-build.c | 2 ++ hw/arm/virt.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index cf5d8b83ded..c1ea17d0def 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -144,6 +144,7 @@ struct VirtMachineState { bool highmem; bool highmem_ecam; bool highmem_mmio; + bool highmem_redists; bool its; bool tcg_its; bool virt; @@ -191,7 +192,8 @@ static inline int virt_gicv3_redist_region_count(VirtMachineState *vms) assert(vms->gic_version == VIRT_GIC_VERSION_3); - return MACHINE(vms)->smp.cpus > redist0_capacity ? 2 : 1; + return (MACHINE(vms)->smp.cpus > redist0_capacity && + vms->highmem_redists) ? 2 : 1; } #endif /* QEMU_ARM_VIRT_H */ diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 449fab00805..0757c28f69c 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -947,6 +947,8 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) acpi_add_table(table_offsets, tables_blob); build_fadt_rev5(tables_blob, tables->linker, vms, dsdt); + vms->highmem_redists &= vms->highmem; + acpi_add_table(table_offsets, tables_blob); build_madt(tables_blob, tables->linker, vms); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 16369ce10e4..62bdce1eb4b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2113,6 +2113,7 @@ static void machvirt_init(MachineState *machine) virt_flash_fdt(vms, sysmem, secure_sysmem ?: sysmem); vms->highmem_mmio &= vms->highmem; + vms->highmem_redists &= vms->highmem; create_gic(vms, sysmem); @@ -2902,6 +2903,7 @@ static void virt_instance_init(Object *obj) vms->highmem_ecam = !vmc->no_highmem_ecam; vms->highmem_mmio = true; + vms->highmem_redists = true; if (vmc->no_its) { vms->its = false;