Received: from eggs.gnu.org ([209.51.188.92]:41074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkXAb-0001iK-TZ for qemu-devel@nongnu.org; Fri, 18 Jan 2019 11:39:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkXAb-00061j-6n for qemu-devel@nongnu.org; Fri, 18 Jan 2019 11:39:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59388) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gkXAb-0005wE-0u for qemu-devel@nongnu.org; Fri, 18 Jan 2019 11:39:01 -0500 Date: Fri, 18 Jan 2019 14:38:56 -0200 From: Eduardo Habkost Message-ID: <20190118163856.GE4136@habkost.net> References: <20190103100234.450-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190103100234.450-1-vkuznets@redhat.com> Subject: Re: [Qemu-devel] [PATCH] i386: Enable NPT and NRIPSAVE for AMD CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vitaly Kuznetsov Cc: qemu-devel@nongnu.org, Paolo Bonzini , Richard Henderson , Marcelo Tosatti , Radim =?utf-8?B?S3LEjW3DocWZ?= On Thu, Jan 03, 2019 at 11:02:34AM +0100, Vitaly Kuznetsov wrote: > Modern AMD CPUs support NPT and NRIPSAVE features and KVM exposes these > when present. NRIPSAVE apeared somewhere in Opteron_G3 lifetime (e.g. > QuadCore AMD Opteron 2378 has is but QuadCore AMD Opteron HE 2344 doesn't), > NPT was introduced a bit earlier. > > Add the FEAT_SVM leaf to Opteron_G4/G5 and EPYC/EPYC-IBPB cpu models. > > Signed-off-by: Vitaly Kuznetsov > --- > target/i386/cpu.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > index 677a3bd5fb..eb8f9079a6 100644 > --- a/target/i386/cpu.c > +++ b/target/i386/cpu.c > @@ -2766,6 +2766,8 @@ static X86CPUDefinition builtin_x86_defs[] = { > CPUID_EXT3_3DNOWPREFETCH | CPUID_EXT3_MISALIGNSSE | > CPUID_EXT3_SSE4A | CPUID_EXT3_ABM | CPUID_EXT3_SVM | > CPUID_EXT3_LAHF_LM, > + .features[FEAT_SVM] = > + CPUID_SVM_NPT | CPUID_SVM_NRIPSAVE, Same issue as the previous EPYC patch: you need npt=off and nrip-save=off on pc_compat_3_1. (Sorry again for taking so long to review this) > [...] -- Eduardo