From nobody Sat Feb 7 05:33:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1558015478; cv=none; d=zoho.com; s=zohoarc; b=gdO6uwbpavExtl4+iMKeOd/BHtJmbbOCjpuj5PIZItgDpxXTuDzyUwHet7gTvFKA3b2b+yKUcTy5LLtkFR3VsNnKj9h5IRx2jOwT2s3kdShQ/uVwR55yfKcEdQ6qoUVyQ1efOfMf+xJ6n6pJ315QfmhiyMQwyVQQMurnkaU3ARU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558015478; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=pKqKqaXL75NN1xQKmPbfmlPnccsVefpzSSHh2KtShXI=; b=Q3ItvY1EhgS8e0kzPZiWDwGENt5RDn8moDyBtGiHIVRZubXckFbDo2GtOtsWJDQDyyRLH7/DcBARyjI1FSH5tO2az/fYXrr/+BDKGmVqFLZakSslcFbzIugY1oVQ/KJ27g2UHvvkw8PDrHpf7W56kg1aRmtuKO1kBsRN122vICE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1558015478175187.38897290467435; Thu, 16 May 2019 07:04:38 -0700 (PDT) Received: from localhost ([127.0.0.1]:58650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRGzm-0005G3-Ub for importer@patchew.org; Thu, 16 May 2019 10:04:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRFxr-0000Po-QD for qemu-devel@nongnu.org; Thu, 16 May 2019 08:58:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRFxo-0003jE-OA for qemu-devel@nongnu.org; Thu, 16 May 2019 08:58:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:36814 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRFxo-0003fs-Is for qemu-devel@nongnu.org; Thu, 16 May 2019 08:58:24 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0B6ABAA71 for ; Thu, 16 May 2019 12:58:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: "Bernhard M. Wiedemann" To: qemu-devel@nongnu.org Date: Thu, 16 May 2019 14:58:07 +0200 Message-Id: <20190516125807.17025-1-bwiedemann@suse.de> X-Mailer: git-send-email 2.16.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-Mailman-Approved-At: Thu, 16 May 2019 10:02:44 -0400 Subject: [Qemu-devel] [PATCH] i386: Fix nested SVM on older Opterons X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Bernhard M. Wiedemann" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Without this patch, a VM on a Opteron G3 host will have the svm flag, but the kvm-amd module fails to load in there, complaining that it needs cpuid 0x8000000a I have successfully built and tested this for 3+ years in production on Opteron G3 servers. Signed-off-by: Bernhard M. Wiedemann --- target/i386/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 722c5514d4..df1d81ded8 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -2723,7 +2723,7 @@ static X86CPUDefinition builtin_x86_defs[] =3D { CPUID_EXT_SSE3, .features[FEAT_8000_0001_EDX] =3D CPUID_EXT2_LM | CPUID_EXT2_NX | CPUID_EXT2_SYSCALL, - .xlevel =3D 0x80000008, + .xlevel =3D 0x8000000A, .model_id =3D "AMD Opteron 240 (Gen 1 Class Opteron)", }, { @@ -2745,7 +2745,7 @@ static X86CPUDefinition builtin_x86_defs[] =3D { CPUID_EXT2_LM | CPUID_EXT2_NX | CPUID_EXT2_SYSCALL, .features[FEAT_8000_0001_ECX] =3D CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM, - .xlevel =3D 0x80000008, + .xlevel =3D 0x8000000A, .model_id =3D "AMD Opteron 22xx (Gen 2 Class Opteron)", }, { @@ -2770,7 +2770,7 @@ static X86CPUDefinition builtin_x86_defs[] =3D { .features[FEAT_8000_0001_ECX] =3D CPUID_EXT3_MISALIGNSSE | CPUID_EXT3_SSE4A | CPUID_EXT3_ABM | CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM, - .xlevel =3D 0x80000008, + .xlevel =3D 0x8000000A, .model_id =3D "AMD Opteron 23xx (Gen 3 Class Opteron)", }, { --=20 2.16.4