From: Alejandro Vallejo <alejandro.vallejo@cloud.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Alejandro Vallejo" <alejandro.vallejo@cloud.com>,
"Wei Liu" <wl@xen.org>,
"Anthony PERARD" <anthony.perard@citrix.com>,
"Juergen Gross" <jgross@suse.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH v2 0/3] Add CpuidUserDis support
Date: Tue, 9 May 2023 17:43:33 +0100 [thread overview]
Message-ID: <20230509164336.12523-1-alejandro.vallejo@cloud.com> (raw)
v2:
* Style changes
* Remove v1/patch3: HVM not to be addressed by this series
* Adds one patch between v1/patch1 and v1/patch2 with the vendor-specific
refactor of probe_cpuid_faulting()
Nowadays AMD supports trapping the CPUID instruction from ring>0 to ring0,
(CpuidUserDis) akin to Intel's "CPUID faulting". There is a difference in
that the toggle bit is in a different MSR and the support bit is in CPUID
itself rather than yet another MSR. This patch enables AMD hosts to use it
when supported in order to provide correct CPUID contents to PV guests.
Patch 1 merely adds definitions to various places in CPUID and MSR
Patch 2 moves vendor-specific code on probe_cpuid_faulting() to amd.c/intel.c
Patch 3 adds support for CpuidUserDis, hooking it in the probing path and
the context switching path.
Alejandro Vallejo (3):
x86: Add AMD's CpuidUserDis bit definitions
x86: Refactor conditional guard in probe_cpuid_faulting()
x86: Add support for CpuidUserDis
tools/libs/light/libxl_cpuid.c | 1 +
tools/misc/xen-cpuid.c | 2 +
xen/arch/x86/cpu/amd.c | 28 ++++++++++-
xen/arch/x86/cpu/common.c | 51 +++++++++++----------
xen/arch/x86/cpu/intel.c | 12 ++++-
xen/arch/x86/include/asm/amd.h | 1 +
xen/arch/x86/include/asm/msr-index.h | 1 +
xen/include/public/arch-x86/cpufeatureset.h | 1 +
8 files changed, 71 insertions(+), 26 deletions(-)
--
2.34.1
next reply other threads:[~2023-05-09 16:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 16:43 Alejandro Vallejo [this message]
2023-05-09 16:43 ` [PATCH v2 1/3] x86: Add AMD's CpuidUserDis bit definitions Alejandro Vallejo
2023-05-11 9:41 ` Jan Beulich
2023-05-11 10:38 ` Alejandro Vallejo
2023-05-11 10:46 ` Jan Beulich
2023-05-09 16:43 ` [PATCH v2 2/3] x86: Refactor conditional guard in probe_cpuid_faulting() Alejandro Vallejo
2023-05-11 10:57 ` Jan Beulich
2023-05-09 16:43 ` [PATCH v2 3/3] x86: Add support for CpuidUserDis Alejandro Vallejo
2023-05-11 11:05 ` Jan Beulich
2023-05-11 12:12 ` Alejandro Vallejo
2023-05-11 12:49 ` Jan Beulich
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=20230509164336.12523-1-alejandro.vallejo@cloud.com \
--to=alejandro.vallejo@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.