From nobody Sat Apr 20 05:06:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1684964360; cv=none; d=zohomail.com; s=zohoarc; b=Rn53y3hCFIpUKPwqRbht1am5caH9M6gZ05CHFz9lyVeWxa/Tqa0e1YEc4i7G+WVtJqLm6oUVNRGcavDHE3P0yVQc3Bgy+7baL0XycS807Fg+E1Qs8ZocU+OwdYO6sG7YL5STMcxNZi3nS3W6Q2In83WKEhP1VGLRiBL1wsrZ0VE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684964360; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=AUO90UBe71SkpZIfWV8EzkIO+rLdrI0LhpU1LRLk90Q=; b=V00QQocB2DEdOAAUwJuz5ka2iN1+vtpuLDkycGi1e1i5VyGy+7EJxx/Ew9pFdD2Ce9jJR2dfaDz8z0DgvRZmp3hLKGFJTYaL3jcSeku/I+zz0TY3mSkoBo+IZiD3LJDoDBJ8e/y3Usk2vluTWp1qtlKrfyiRH52eESb+aa2aKDk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684964359713534.204903346879; Wed, 24 May 2023 14:39:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1wBu-00081v-Pe; Wed, 24 May 2023 17:38:42 -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 1q1wBm-000811-W5 for qemu-devel@nongnu.org; Wed, 24 May 2023 17:38:35 -0400 Received: from forwardcorp1b.mail.yandex.net ([178.154.239.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1wBi-0001Ko-Ht for qemu-devel@nongnu.org; Wed, 24 May 2023 17:38:33 -0400 Received: from mail-nwsmtp-smtp-corp-main-26.myt.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-26.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:286:0:640:8489:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTP id 187A060C08; Thu, 25 May 2023 00:38:21 +0300 (MSK) Received: from davydov-max-nux.yandex-team.ru (unknown [2a02:6b8:b081:b42e::1:1f]) by mail-nwsmtp-smtp-corp-main-26.myt.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id mbOCj30OrKo0-Gxw8ht4E; Thu, 25 May 2023 00:38:20 +0300 Precedence: bulk X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1684964300; bh=AUO90UBe71SkpZIfWV8EzkIO+rLdrI0LhpU1LRLk90Q=; h=Message-Id:Date:Cc:Subject:To:From; b=QOtlW9uxZLaVOoGdQtqJDT9hsagyVZnq7twWwlGYP6GqAESe2WqymNKmJpnQ6IZMZ 2koIrmN3Z8i2lOKxTE84XKuqPDUpCv6jnf7K8dSV1njInK+izbbXrWGl1ZVxsBboyZ 1LXwKFXv8AGLZBWy0sTF32HgQ+VOQ6K1ZnQKFd7A= Authentication-Results: mail-nwsmtp-smtp-corp-main-26.myt.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Maksim Davydov To: qemu-devel@nongnu.org Cc: davydov-max@yandex-team.ru, yc-core@yandex-team.ru, babu.moger@amd.com, pbonzini@redhat.com, richard.henderson@linaro.org, xiaoyao.li@intel.com, mst@redhat.com Subject: [PATCH] target/i386: EPYC-Rome model without XSAVES Date: Thu, 25 May 2023 00:37:48 +0300 Message-Id: <20230524213748.8918-1-davydov-max@yandex-team.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.154.239.136; envelope-from=davydov-max@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1684964361949100001 Content-Type: text/plain; charset="utf-8" Based on the kernel commit "b0563468ee x86/CPU/AMD: Disable XSAVES on AMD family 0x17", host system with EPYC-Rome can clear XSAVES capability bit. In another words, EPYC-Rome host without XSAVES can occur. Thus, we need an EPYC-Rome cpu model (without this feature) that matches the solution of fixing this erratum Signed-off-by: Maksim Davydov --- target/i386/cpu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a61cd6d99d1f..1242bd541a53 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4466,6 +4466,16 @@ static const X86CPUDefinition builtin_x86_defs[] =3D= { }, .cache_info =3D &epyc_rome_v3_cache_info }, + { + .version =3D 4, + .props =3D (PropValue[]) { + /* Erratum 1386 */ + { "model-id", + "AMD EPYC-Rome-v4 Processor (no XSAVES)" }, + { "xsaves", "off" }, + { /* end of list */ } + }, + }, { /* end of list */ } } }, --=20 2.25.1