From: Babu Moger <babu.moger@amd.com>
To: pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com,
rkrcmar@redhat.com
Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org,
Gary.Hook@amd.com, Thomas.Lendacky@amd.com,
brijesh.singh@amd.com, babu.moger@amd.com, kash@tripleback.net
Subject: [Qemu-devel] [PATCH v4 0/5] Enable TOPOEXT to support hyperthreading on AMD CPU
Date: Mon, 12 Mar 2018 17:00:44 -0400 [thread overview]
Message-ID: <1520888449-4352-1-git-send-email-babu.moger@amd.com> (raw)
This series enables the TOPOEXT feature for AMD CPUs. This is required to
support hyperthreading on kvm guests.
This addresses the issues reported in these bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1481253
https://bugs.launchpad.net/qemu/+bug/1703506
v4:
1.Removed the checks under cpuid 0x8000001D leaf(patch #2). These check are
not necessary. Found this during internal review.
2.Added CPUID_EXT3_TOPOEXT feature for all the 17 family(patch #4). This was
found by Kash Pande during his testing.
3.Removed th hardcoded cpuid xlevel and dynamically extended if CPUID_EXT3_TOPOEXT
is supported(Suggested by Brijesh Singh).
v3:
1.Removed the patch #1. Radim mentioned that original typo problem is in
linux kernel header. qemu is just copying those files.
2.In previous version, I used the cpuid 4 definitions for AMDs cpuid leaf
0x8000001D. CPUID 4 is very intel specific and we dont want to expose those
details under AMD. I have renamed some of these definitions as generic.
These changes are in patch#1. Radim, let me know if this is what you intended.
3.Added assert to for core_id(Suggested by Radim Krčmář).
4.Changed the if condition under "L3 cache info"(Suggested by Gary Hook).
5.Addressed few more text correction and code cleanup(Suggested by Thomas Lendacky).
v2:
Fixed few more minor issues per Gary Hook's comments. Thank you Gary.
Removed the patch#1. We need to handle the instruction cache associativity
seperately. It varies based on the cpu family. I will comeback to that later.
Added two more typo corrections in patch#1 and patch#5.
v1:
Stanislav Lanci posted few patches earlier.
https://patchwork.kernel.org/patch/10040903/
Rebased his patches with few changes.
1.Spit the patches into two, separating cpuid functions
0x8000001D and 0x8000001E (Patch 2 and 3).
2.Removed the generic non-intel check and made a separate patch
with some changes(Patch 5).
3.Fixed L3_N_SETS_AMD(from 4096 to 8192) based on CPUID_Fn8000001D_ECX_x03.
Added 2 more patches.
Patch 1. Fixes cache associativity.
Patch 4. Adds TOPOEXT feature on AMD EPYC CPU.
Babu Moger (3):
target/i386: Generalize some of the macro definitions
target/i386: Enable TOPOEXT feature on AMD EPYC CPU
target/i386: Remove generic SMT thread check
Stanislav Lanci (2):
target/i386: Populate AMD Processor Cache Information
target/i386: Add support for CPUID_8000_001E for AMD
target/i386/cpu.c | 150 +++++++++++++++++++++++++++++++++++++++++-------------
target/i386/kvm.c | 29 +++++++++--
2 files changed, 142 insertions(+), 37 deletions(-)
--
1.8.3.1
next reply other threads:[~2018-03-12 21:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 21:00 Babu Moger [this message]
2018-03-12 21:00 ` [Qemu-devel] [PATCH v4 1/5] target/i386: Generalize some of the macro definitions Babu Moger
2018-03-15 19:07 ` Eduardo Habkost
2018-03-12 21:00 ` [Qemu-devel] [PATCH v4 2/5] target/i386: Populate AMD Processor Cache Information Babu Moger
2018-03-15 19:04 ` Eduardo Habkost
2018-03-16 18:00 ` Eduardo Habkost
2018-03-20 17:25 ` Moger, Babu
2018-03-20 17:54 ` Eduardo Habkost
2018-03-20 19:20 ` Moger, Babu
2018-03-21 15:58 ` Moger, Babu
2018-03-21 17:09 ` Eduardo Habkost
2018-03-21 17:12 ` Kash Pande
2018-03-21 17:47 ` Moger, Babu
2018-03-21 18:15 ` Eduardo Habkost
2018-03-21 20:07 ` Moger, Babu
2018-03-21 20:29 ` Eduardo Habkost
2018-03-27 21:36 ` Moger, Babu
2018-03-12 21:00 ` [Qemu-devel] [PATCH v4 3/5] target/i386: Add support for CPUID_8000_001E for AMD Babu Moger
2018-03-12 21:00 ` [Qemu-devel] [PATCH v4 4/5] target/i386: Enable TOPOEXT feature on AMD EPYC CPU Babu Moger
2018-03-12 21:00 ` [Qemu-devel] [PATCH v4 5/5] target/i386: Remove generic SMT thread check Babu Moger
2018-03-13 21:39 ` [Qemu-devel] [PATCH v4 0/5] Enable TOPOEXT to support hyperthreading on AMD CPU Kash Pande
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1520888449-4352-1-git-send-email-babu.moger@amd.com \
--to=babu.moger@amd.com \
--cc=Gary.Hook@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=brijesh.singh@amd.com \
--cc=ehabkost@redhat.com \
--cc=kash@tripleback.net \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).