From patchwork Thu Oct 21 15:25:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516062 Delivered-To: patch@linaro.org Received: by 2002:ac0:bf50:0:0:0:0:0 with SMTP id o16csp32053imj; Thu, 21 Oct 2021 08:47:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLXvDpJ1flpqaayKjY+HdizjbH9Yln8LWnb2HtZTKjEyqY8Si3mdaDrvHlP0Czd8JzjbNE X-Received: by 2002:a05:6830:2f3:: with SMTP id r19mr5522620ote.226.1634831272265; Thu, 21 Oct 2021 08:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634831272; cv=none; d=google.com; s=arc-20160816; b=gxFNIa5xySPaD1Gpl5XvROPu72XU3+I2x297rqtIoE4FlMOOwKZ3G1/wepIkkUtgNG ljpObXuCSeg1FRemLzQeZ0cvbLkMS8klTbuRyxJk0+y8NCzQOqA0kIZ5yGJ1a3suLUOv gTwVtRYRUsT5mGbw/upcheiNAQE8Lfvf4YB+SqwT0pmPnAC8bubcYsbyVW8aqghm+KRu QHXHRTiIsALaVNkHgnXm6T/GiT0EGI86SLUpU4UE6wSLyxofqhwuZALthIaWRGoBEreI ZJmBHW29e3niU8xrTZUbn7nQ/GsYlVbamOYm5rkMuduVmCoj5YnuM17Q+pFbVgL7miI6 iviQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=Zq+vUL3+l8EwtzFQ0nupHEnvpxTTs/A/ZF3RDm4/SUA=; b=P8UG8JsM/UpgjvP8qDHrhRod5n9iABNxAas7Js3uODu6dMlvY5k5/TLqGyykHBfT3y vePEUHlHc2YwdzEUDHDMks4ikw4U7eUhFdqPBBGLBjwi4vUNhUIPiTm3aeQM+BLjVqnu /bikG/xhPkuAxmicuSl+J2nM4Lz66gLLBNBgPB462dIKNPFodoE3T8gJuHHQI7EVmJO7 oRXDbb01SpoKl/sgPhuiPuxY6mrkQMRFXC6UWMNRPWuvotdnzKkX19/Y3g7OL0N0M4JE 8VBQRO0tvSveapBFI7qnouSmUjuK7mAvzgMe1WLYPbtiAFYvLqwtC3Q4y5nMQSvCseZq WXCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P864iVT3; 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 o43si6011961ota.232.2021.10.21.08.47.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Oct 2021 08:47:52 -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=P864iVT3; 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]:54584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdaIJ-0006u0-Iu for patch@linaro.org; Thu, 21 Oct 2021 11:47:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdZx6-0000Iv-E2 for qemu-devel@nongnu.org; Thu, 21 Oct 2021 11:25:56 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:36362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdZx2-0002Wn-Nc for qemu-devel@nongnu.org; Thu, 21 Oct 2021 11:25:56 -0400 Received: by mail-pf1-x42f.google.com with SMTP id m26so966193pff.3 for ; Thu, 21 Oct 2021 08:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zq+vUL3+l8EwtzFQ0nupHEnvpxTTs/A/ZF3RDm4/SUA=; b=P864iVT3ZhO7qiP9K9ZMnWLKgOdh0EGZmmtWcg4ytTiBgtrFepdLTipbp6BNAOmWcD 6M36GV78S6/m8RhxWIaaBoLQhvcDOs11pJiz4WcUeNWoGzhuFbbgJ7+IrR0DGIhLF9Db 4G9IBa5t6vbCqrfgx7LB9P+o25PgCWKyCKUGj9XC8R85U0UQutYkqT3XJf+upQ8O7xaK JfnE604rqrPgBPDh27HA2SGmvCsKfSNloKpzUlD9cOLGlxIueNqdYbEs0Z9o+LodgZiB nUVdju+cg+AtqIMGVAjwW0gy1eOHKMJdhHpex4sCjVIXqWyjyla4NLlw5WhlM6xc1PuB N9qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zq+vUL3+l8EwtzFQ0nupHEnvpxTTs/A/ZF3RDm4/SUA=; b=ZuO9dWG5zMWv/I/j3+WFlrXyY+JScqKwqntODXZAIhrdrJMclBYyB7l4rruI8YsDjW HXQPwh/MoAsFj+128svXXlNabPr5YFHLJZWDHYR2lidJuFcX8SaJHfWQOvNbAopWxyDn NlGwi8CqzCXKFYCH2YxpHLxERi1IeVT2AWrh11IUbgvPkA/3rc+H8JuKRNGUvxnKXHO5 odpY9Wa0fPO7uwak1eeiv7mUaqxL3jbL4A/mJC5AyQ4zjsOejzmbm5Uq9IN7++r5LFf2 Tel0eYUQAEBBcep+v94O7pMURh+anqM0w0MbmukgqpOHbumwaw1qAiPipmRNiS1+McrZ Vv0Q== X-Gm-Message-State: AOAM532CDKnVXlzAhNK0BKk2EjtwUkm7j8YK3flnj6RDTkIkAHr45spa XM+2f0N79/dn1c7lO1ebfL1GUgLv6qpKCQ== X-Received: by 2002:a62:9215:0:b0:44c:4de1:f777 with SMTP id o21-20020a629215000000b0044c4de1f777mr6144791pfd.31.1634829951350; Thu, 21 Oct 2021 08:25:51 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id y3sm5676257pge.44.2021.10.21.08.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 08:25:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 12/19] hw/arm/virt: Only describe cpu topology since virt-6.2 Date: Thu, 21 Oct 2021 08:25:34 -0700 Message-Id: <20211021152541.781175-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211021152541.781175-1-richard.henderson@linaro.org> References: <20211021152541.781175-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yanan Wang , Andrew Jones Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Yanan Wang On existing older machine types, without cpu topology described in ACPI or DT, the guest will populate one by default. With the topology described, it will read the information and set up its topology as instructed, but that may not be the same as what was getting used by default. It's possible that an user application has a dependency on the default topology and if the default one gets changed it will probably behave differently. Based on above consideration we'd better only describe topology information to the guest on 6.2 and later machine types. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Message-Id: <20211020142125.7516-2-wangyanan55@huawei.com> Signed-off-by: Richard Henderson --- include/hw/arm/virt.h | 4 +++- hw/arm/virt.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index b461b8d261..dc6b66ffc8 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -125,11 +125,13 @@ struct VirtMachineClass { bool claim_edge_triggered_timers; bool smbios_old_sys_ver; bool no_highmem_ecam; - bool no_ged; /* Machines < 4.2 has no support for ACPI GED device */ + bool no_ged; /* Machines < 4.2 have no support for ACPI GED device */ bool kvm_no_adjvtime; bool no_kvm_steal_time; bool acpi_expose_flash; bool no_secure_gpio; + /* Machines < 6.2 have no support for describing cpu topology to guest */ + bool no_cpu_topology; }; struct VirtMachineState { diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 4160d49688..15e8d8cf4a 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2816,6 +2816,7 @@ static void virt_machine_6_1_options(MachineClass *mc) virt_machine_6_2_options(mc); compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len); mc->smp_props.prefer_sockets = true; + vmc->no_cpu_topology = true; /* qemu ITS was introduced with 6.2 */ vmc->no_tcg_its = true;