From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: Re: [PATCH v16 2/3] i386: Enable TOPOEXT feature on AMD EPYC CPU Date: Thu, 21 Jun 2018 15:29:20 -0300 Message-ID: <20180621182920.GW7451@localhost.localdomain> References: <1529443919-67509-1-git-send-email-babu.moger@amd.com> <1529443919-67509-3-git-send-email-babu.moger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: geoff@hostfission.com, kvm@vger.kernel.org, mst@redhat.com, kash@tripleback.net, mtosatti@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, rth@twiddle.net To: Babu Moger Return-path: Content-Disposition: inline In-Reply-To: <1529443919-67509-3-git-send-email-babu.moger@amd.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On Tue, Jun 19, 2018 at 05:31:58PM -0400, Babu Moger wrote: > Enable TOPOEXT feature on EPYC CPU. This is required to support > hyperthreading on VM guests. Also extend xlevel to 0x8000001E. > > Disable topoext on PC_COMPAT_2_12 and keep xlevel 0x8000000a. > > Signed-off-by: Babu Moger > --- > include/hw/i386/pc.h | 8 ++++++++ > target/i386/cpu.c | 10 ++++++---- > 2 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index fc8dedc..d0ebeb9 100644 > --- a/include/hw/i386/pc.h > +++ b/include/hw/i386/pc.h > @@ -303,6 +303,14 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); > .driver = TYPE_X86_CPU,\ > .property = "legacy-cache",\ > .value = "on",\ > + },{\ > + .driver = TYPE_X86_CPU,\ > + .property = "topoext",\ > + .value = "off",\ > + },{\ > + .driver = "EPYC-" TYPE_X86_CPU,\ > + .property = "xlevel",\ > + .value = stringify(0x8000000a),\ > }, EPYC-IBPB is missing, I will add it when committing. Thanks! -- Eduardo