* [Qemu-devel] [PATCH] i386: Disable TOPOEXT by default on "-cpu host"
@ 2018-08-09 22:18 Eduardo Habkost
2018-08-10 7:41 ` Richard W.M. Jones
0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Habkost @ 2018-08-09 22:18 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Richard Henderson, Richard W.M. Jones, Babu Moger,
Eduardo Habkost
Enabling TOPOEXT is always allowed, but it can't be enabled
blindly by "-cpu host" because it may make guests crash if the
rest of the cache topology information isn't provided or isn't
consistent.
This addresses the bug reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1613277
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target/i386/cpu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 723e02221e..3ac627978f 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -849,6 +849,12 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
},
.cpuid_eax = 0x80000001, .cpuid_reg = R_ECX,
.tcg_features = TCG_EXT3_FEATURES,
+ /*
+ * TOPOEXT is always allowed but can't be enabled blindly by
+ * "-cpu host", as it requires consistent cache topology info
+ * to be provided so it doesn't confuse guests.
+ */
+ .no_autoenable_flags = CPUID_EXT3_TOPOEXT,
},
[FEAT_C000_0001_EDX] = {
.feat_names = {
--
2.18.0.rc1.1.g3f1ff2140
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] i386: Disable TOPOEXT by default on "-cpu host"
2018-08-09 22:18 [Qemu-devel] [PATCH] i386: Disable TOPOEXT by default on "-cpu host" Eduardo Habkost
@ 2018-08-10 7:41 ` Richard W.M. Jones
2018-08-13 13:50 ` Moger, Babu
0 siblings, 1 reply; 3+ messages in thread
From: Richard W.M. Jones @ 2018-08-10 7:41 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: qemu-devel, Paolo Bonzini, Richard Henderson, Babu Moger
On Thu, Aug 09, 2018 at 07:18:52PM -0300, Eduardo Habkost wrote:
> Enabling TOPOEXT is always allowed, but it can't be enabled
> blindly by "-cpu host" because it may make guests crash if the
> rest of the cache topology information isn't provided or isn't
> consistent.
>
> This addresses the bug reported at:
> https://bugzilla.redhat.com/show_bug.cgi?id=1613277
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> target/i386/cpu.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 723e02221e..3ac627978f 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -849,6 +849,12 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
> },
> .cpuid_eax = 0x80000001, .cpuid_reg = R_ECX,
> .tcg_features = TCG_EXT3_FEATURES,
> + /*
> + * TOPOEXT is always allowed but can't be enabled blindly by
> + * "-cpu host", as it requires consistent cache topology info
> + * to be provided so it doesn't confuse guests.
> + */
> + .no_autoenable_flags = CPUID_EXT3_TOPOEXT,
> },
> [FEAT_C000_0001_EDX] = {
> .feat_names = {
Can confirm that this fixes the problem observed on the original AMD
Phenom machine, using qemu from git (@6ad908053) + your patch.
Therefore:
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] i386: Disable TOPOEXT by default on "-cpu host"
2018-08-10 7:41 ` Richard W.M. Jones
@ 2018-08-13 13:50 ` Moger, Babu
0 siblings, 0 replies; 3+ messages in thread
From: Moger, Babu @ 2018-08-13 13:50 UTC (permalink / raw)
To: Richard W.M. Jones, Eduardo Habkost
Cc: qemu-devel, Paolo Bonzini, Richard Henderson
Looks good. Did some basic testing.
Reviewed-by: Babu Moger <babu.moger@amd.com>
> -----Original Message-----
> From: Richard W.M. Jones <rjones@redhat.com>
> Sent: Friday, August 10, 2018 2:41 AM
> To: Eduardo Habkost <ehabkost@redhat.com>
> Cc: qemu-devel@nongnu.org; Paolo Bonzini <pbonzini@redhat.com>;
> Richard Henderson <rth@twiddle.net>; Moger, Babu
> <Babu.Moger@amd.com>
> Subject: Re: [PATCH] i386: Disable TOPOEXT by default on "-cpu host"
>
> On Thu, Aug 09, 2018 at 07:18:52PM -0300, Eduardo Habkost wrote:
> > Enabling TOPOEXT is always allowed, but it can't be enabled
> > blindly by "-cpu host" because it may make guests crash if the
> > rest of the cache topology information isn't provided or isn't
> > consistent.
> >
> > This addresses the bug reported at:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1613277
> >
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> > target/i386/cpu.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> > index 723e02221e..3ac627978f 100644
> > --- a/target/i386/cpu.c
> > +++ b/target/i386/cpu.c
> > @@ -849,6 +849,12 @@ static FeatureWordInfo
> feature_word_info[FEATURE_WORDS] = {
> > },
> > .cpuid_eax = 0x80000001, .cpuid_reg = R_ECX,
> > .tcg_features = TCG_EXT3_FEATURES,
> > + /*
> > + * TOPOEXT is always allowed but can't be enabled blindly by
> > + * "-cpu host", as it requires consistent cache topology info
> > + * to be provided so it doesn't confuse guests.
> > + */
> > + .no_autoenable_flags = CPUID_EXT3_TOPOEXT,
> > },
> > [FEAT_C000_0001_EDX] = {
> > .feat_names = {
>
> Can confirm that this fixes the problem observed on the original AMD
> Phenom machine, using qemu from git (@6ad908053) + your patch.
> Therefore:
>
> Tested-by: Richard W.M. Jones <rjones@redhat.com>
>
> Thanks,
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat
> http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> virt-p2v converts physical machines to virtual machines. Boot with a
> live CD or over the network (PXE) and turn machines into KVM guests.
> http://libguestfs.org/virt-v2v
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-13 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 22:18 [Qemu-devel] [PATCH] i386: Disable TOPOEXT by default on "-cpu host" Eduardo Habkost
2018-08-10 7:41 ` Richard W.M. Jones
2018-08-13 13:50 ` Moger, Babu
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.