From: Eduardo Habkost <ehabkost@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
stable@vger.kernel.org, Yazen Ghannam <yazen.ghannam@amd.com>,
Brijesh Singh <brijesh.singh@amd.com>
Subject: Re: [PATCH] KVM: SVM: fix trashing of MSR_TSC_AUX
Date: Thu, 7 Jul 2016 13:27:55 -0300 [thread overview]
Message-ID: <20160707162755.GD4131@thinpad.lan.raisama.net> (raw)
In-Reply-To: <20160707160146.GH13648@pd.tnic>
On Thu, Jul 07, 2016 at 06:01:46PM +0200, Borislav Petkov wrote:
> On Thu, Jul 07, 2016 at 03:16:21PM +0200, Paolo Bonzini wrote:
> > Eduardo is the one to answer, but usually we add features to QEMU
> > before the processors are released (typically as soon as KVM supports
> > them). So with a new enough QEMU this in theory should not be
> > necessary.
> >
> > Adding a new feature that's not in a CPU model and that's not
> > associated to new state is really trivial:
>
> Cool.
>
> Btw, how about something like this?
>
> Specifically, I'd like to test RAS features on the new upcoming AMD
> Zen CPU and I've defined one from the stuff we know so far from kernel
> patches.
You mean KVM kernel patches? I assume the features require
additional KVM code to support them in guests. In that case, why
wouldn't the kernel return them in GET_SUPPORTED_CPUID? Then you
won't need filter=off.
>
> The "filter=off" thing I've added in case I want to disable
> x86_cpu_filter_features() but it works just fine without it when I boot
> with -cpu Zen. So I can remove it too.
>
> Would something like that be acceptable?
About filter=off: not sure. Do we really have valid use cases to
enable a feature even if the kernel reports it as unsupported in
GET_SUPPORTED_CPUID?
Specifically about the feature names, I have some question below:
>
> We can continue improving on this as features become known and even
> implement some functionality in qemu/kvm as time allows.
>
> ---
> From: Borislav Petkov <bp@suse.de>
> Date: Tue, 5 Jul 2016 16:12:18 +0200
> Subject: [PATCH] Zen emu: first working version
>
> Boot with "-c Zen,filter=off" to disable CPUID bits filtering.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> target-i386/cpu.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> target-i386/cpu.h | 7 +++++++
> 2 files changed, 66 insertions(+), 1 deletion(-)
>
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 3bd3cfc3ad16..cc9c97457387 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -307,6 +307,17 @@ static const char *cpuid_6_feature_name[] = {
> NULL, NULL, NULL, NULL,
> };
>
> +static const char *smca_feature_name[] = {
> + "overflow_recov", "succor", NULL, "smca",
Do those features introduce additional state that need migration
support? If they do, you need to add them to
feature_word_info[FEAT_8000_0007_EBX].unmigratable_flags until
migration support is implemented.
> + NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL,
> +};
> +
> #define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE)
> #define PENTIUM_FEATURES (I486_FEATURES | CPUID_DE | CPUID_TSC | \
> CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_MMX | CPUID_APIC)
> @@ -449,6 +460,11 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
> .cpuid_eax = 6, .cpuid_reg = R_EAX,
> .tcg_features = TCG_6_EAX_FEATURES,
> },
> + [FEAT_8000_0007_EBX] = {
> + .feat_names = smca_feature_name,
> + .cpuid_eax = 0x80000007,
> + .cpuid_reg = R_EBX,
> + },
> };
>
> typedef struct X86RegisterInfo32 {
[...]
--
Eduardo
next prev parent reply other threads:[~2016-07-07 16:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 13:43 [PATCH] KVM: SVM: fix trashing of MSR_TSC_AUX Paolo Bonzini
2016-07-06 14:18 ` Borislav Petkov
2016-07-06 14:29 ` Paolo Bonzini
2016-07-07 10:41 ` Borislav Petkov
2016-07-07 11:01 ` Paolo Bonzini
2016-07-07 11:47 ` Borislav Petkov
2016-07-07 12:28 ` Paolo Bonzini
2016-07-07 12:47 ` Borislav Petkov
2016-07-07 13:16 ` Paolo Bonzini
2016-07-07 16:01 ` Borislav Petkov
2016-07-07 16:17 ` Paolo Bonzini
2016-07-07 16:27 ` Eduardo Habkost [this message]
2016-07-07 17:04 ` Borislav Petkov
2016-07-07 17:43 ` Eduardo Habkost
2016-07-08 11:09 ` Borislav Petkov
2016-07-08 11:15 ` Paolo Bonzini
2016-07-08 12:55 ` Borislav Petkov
2016-07-06 15:00 ` kbuild test robot
2016-07-15 12:15 ` Radim Krčmář
2016-07-15 12:30 ` Paolo Bonzini
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=20160707162755.GD4131@thinpad.lan.raisama.net \
--to=ehabkost@redhat.com \
--cc=bp@alien8.de \
--cc=brijesh.singh@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=stable@vger.kernel.org \
--cc=yazen.ghannam@amd.com \
/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.