* [Qemu-devel] Pentium Pro Feature Bugs
@ 2019-04-01 3:36 tedheadster
2019-04-01 5:35 ` Thomas Huth
0 siblings, 1 reply; 9+ messages in thread
From: tedheadster @ 2019-04-01 3:36 UTC (permalink / raw)
To: qemu-devel
I just noticed this in the code regarding MMX and I wonder if it is correct:
target/i386/cpu.c:
#define PPRO_FEATURES (CPUID_FP87 | CPUID_DE | CPUID_PSE | CPUID_TSC | \
CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_PGE | CPUID_CMOV | \
CPUID_PAT | CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | \
CPUID_PAE | CPUID_SEP | CPUID_APIC)
The problem I see is that the PentiumPro never supported the MMX
instruction extensions (oddly supported in the the Pentium MMX), nor
the even later SSE (Pentium III) and SSE2 (Pentium 4) features.
Also, the Pentium Pro never officially supported SYSENTER/SYSEXIT
(CPUID_SEP), though they originally intended to. Intel discovered
shortly before the product release that the hardware didn't work
correctly, so they never documented it as a feature to prevent its
use.
Should these be removed?
- Matthew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-04-01 3:36 [Qemu-devel] Pentium Pro Feature Bugs tedheadster
@ 2019-04-01 5:35 ` Thomas Huth
2019-04-01 7:28 ` Paolo Bonzini
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Huth @ 2019-04-01 5:35 UTC (permalink / raw)
To: whiteheadm, qemu-devel; +Cc: Paolo Bonzini, Eduardo Habkost, Michael S. Tsirkin
On 01/04/2019 05.36, tedheadster wrote:
> I just noticed this in the code regarding MMX and I wonder if it is correct:
>
> target/i386/cpu.c:
>
> #define PPRO_FEATURES (CPUID_FP87 | CPUID_DE | CPUID_PSE | CPUID_TSC | \
> CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_PGE | CPUID_CMOV | \
> CPUID_PAT | CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | \
> CPUID_PAE | CPUID_SEP | CPUID_APIC)
>
> The problem I see is that the PentiumPro never supported the MMX
> instruction extensions (oddly supported in the the Pentium MMX), nor
> the even later SSE (Pentium III) and SSE2 (Pentium 4) features.
>
> Also, the Pentium Pro never officially supported SYSENTER/SYSEXIT
> (CPUID_SEP), though they originally intended to. Intel discovered
> shortly before the product release that the hardware didn't work
> correctly, so they never documented it as a feature to prevent its
> use.
>
> Should these be removed?
Looking at the output of "qemu-system-x86_64 -cpu help", it seems to me
like QEMU does not emulate the Pention Pro at all. So maybe we should
simply rename that macro to "QEMU32_FEATURES" or something similar?
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-04-01 5:35 ` Thomas Huth
@ 2019-04-01 7:28 ` Paolo Bonzini
2019-05-17 0:30 ` tedheadster
0 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2019-04-01 7:28 UTC (permalink / raw)
To: Thomas Huth, whiteheadm, qemu-devel; +Cc: Eduardo Habkost, Michael S. Tsirkin
On 01/04/19 07:35, Thomas Huth wrote:
> On 01/04/2019 05.36, tedheadster wrote:
>> I just noticed this in the code regarding MMX and I wonder if it is correct:
>>
>> target/i386/cpu.c:
>>
>> #define PPRO_FEATURES (CPUID_FP87 | CPUID_DE | CPUID_PSE | CPUID_TSC | \
>> CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_PGE | CPUID_CMOV | \
>> CPUID_PAT | CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | \
>> CPUID_PAE | CPUID_SEP | CPUID_APIC)
>>
>> The problem I see is that the PentiumPro never supported the MMX
>> instruction extensions (oddly supported in the the Pentium MMX), nor
>> the even later SSE (Pentium III) and SSE2 (Pentium 4) features.
>>
>> Also, the Pentium Pro never officially supported SYSENTER/SYSEXIT
>> (CPUID_SEP), though they originally intended to. Intel discovered
>> shortly before the product release that the hardware didn't work
>> correctly, so they never documented it as a feature to prevent its
>> use.
>>
>> Should these be removed?
>
> Looking at the output of "qemu-system-x86_64 -cpu help", it seems to me
> like QEMU does not emulate the Pention Pro at all. So maybe we should
> simply rename that macro to "QEMU32_FEATURES" or something similar?
Yes, I agree.
Paolo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-04-01 7:28 ` Paolo Bonzini
@ 2019-05-17 0:30 ` tedheadster
2019-05-17 2:57 ` Paolo Bonzini
2019-05-17 18:15 ` Eduardo Habkost
0 siblings, 2 replies; 9+ messages in thread
From: tedheadster @ 2019-05-17 0:30 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Thomas Huth, Michael S. Tsirkin, Matthew Whitehead,
Eduardo Habkost, qemu-devel
Paolo,
I am running the kvm32 machine and I see a problem. Here is the
output of /proc/cpuinfo :
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
cmov constant_tsc
I see something rather important missing: cpuid.
A lot of stuff breaks without cpuid, and I am fairly sure that qemu is
supposed to 'hard code' in support for it. It is present with both my
i486 and i586 virtual machines.
- Matthew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-05-17 0:30 ` tedheadster
@ 2019-05-17 2:57 ` Paolo Bonzini
2019-05-17 3:01 ` tedheadster
2019-05-17 18:15 ` Eduardo Habkost
1 sibling, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2019-05-17 2:57 UTC (permalink / raw)
To: whiteheadm; +Cc: Thomas Huth, Michael S. Tsirkin, qemu-devel, Eduardo Habkost
On 17/05/19 02:30, tedheadster wrote:
> Paolo,
> I am running the kvm32 machine and I see a problem. Here is the
> output of /proc/cpuinfo :
>
> flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
> cmov constant_tsc
>
> I see something rather important missing: cpuid.
>
> A lot of stuff breaks without cpuid, and I am fairly sure that qemu is
> supposed to 'hard code' in support for it. It is present with both my
> i486 and i586 virtual machines.
>
> - Matthew
>
That's weird... The cpuid flag does not come from QEMU, it is a "soft"
flag determined by trying to toggle EFLAGS.ID and EFLAGS.ID behaves the
same for all CPU models. What else do you see in /proc/cpuinfo?
Paolo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-05-17 2:57 ` Paolo Bonzini
@ 2019-05-17 3:01 ` tedheadster
0 siblings, 0 replies; 9+ messages in thread
From: tedheadster @ 2019-05-17 3:01 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Thomas Huth, Michael S. Tsirkin, Matthew Whitehead,
Eduardo Habkost, qemu-devel
On Thu, May 16, 2019 at 10:57 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 17/05/19 02:30, tedheadster wrote:
> > Paolo,
> > I am running the kvm32 machine and I see a problem. Here is the
> > output of /proc/cpuinfo :
> >
> > flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
> > cmov constant_tsc
> >
> > I see something rather important missing: cpuid.
> >
> > A lot of stuff breaks without cpuid, and I am fairly sure that qemu is
> > supposed to 'hard code' in support for it. It is present with both my
> > i486 and i586 virtual machines.
> >
> > - Matthew
> >
>
> That's weird... The cpuid flag does not come from QEMU, it is a "soft"
> flag determined by trying to toggle EFLAGS.ID and EFLAGS.ID behaves the
> same for all CPU models. What else do you see in /proc/cpuinfo?
>
> Paolo
Here is all of /proc/cpuinfo
processor : 7
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Common 32-bit KVM processor
stepping : 1
microcode : 0x1
cpu MHz : 2394.405
cache size : 16384 KB
physical id : 7
siblings : 1
core id : 0
cpu cores : 1
apicid : 7
initial apicid : 7
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
stant_tsc : fpu vme de pse tsc msr pae mce cx8 apic
mtrr pge mca cmov cons
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips : 4789.21
clflush size : 32
cache_alignment : 32
address sizes : 32 bits physical, 0 bits virtual
power management:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-05-17 0:30 ` tedheadster
2019-05-17 2:57 ` Paolo Bonzini
@ 2019-05-17 18:15 ` Eduardo Habkost
2019-05-17 20:06 ` tedheadster
1 sibling, 1 reply; 9+ messages in thread
From: Eduardo Habkost @ 2019-05-17 18:15 UTC (permalink / raw)
To: whiteheadm; +Cc: Paolo Bonzini, Thomas Huth, qemu-devel, Michael S. Tsirkin
On Thu, May 16, 2019 at 08:30:27PM -0400, tedheadster wrote:
> Paolo,
> I am running the kvm32 machine and I see a problem. Here is the
> output of /proc/cpuinfo :
>
> flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
> cmov constant_tsc
>
> I see something rather important missing: cpuid.
>
> A lot of stuff breaks without cpuid, and I am fairly sure that qemu is
> supposed to 'hard code' in support for it. It is present with both my
> i486 and i586 virtual machines.
Are you running the same kernel version on all VMs?
X86_FEATURE_CPUID was added in Linux v4.11.
--
Eduardo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-05-17 18:15 ` Eduardo Habkost
@ 2019-05-17 20:06 ` tedheadster
2019-05-17 20:40 ` Eduardo Habkost
0 siblings, 1 reply; 9+ messages in thread
From: tedheadster @ 2019-05-17 20:06 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Paolo Bonzini, Thomas Huth, Michael S. Tsirkin, Matthew Whitehead,
qemu-devel
On Fri, May 17, 2019 at 2:15 PM Eduardo Habkost <ehabkost@redhat.com> wrote:
> Are you running the same kernel version on all VMs?
> X86_FEATURE_CPUID was added in Linux v4.11.
>
Eduardo,
I am running a 4.9.162 virtual machine (very intentionally, the
drivers I need got broken in 4.11) inside of a 5.1.2 host.
X86_FEATURE_CPUID is certainly defined in
arch/x86/kernel/cpu/capflags.c but nothing much seems to be done with
it.
The whole reason this came up is I was running 'perf top' on the
virtual host and it was spending the most kernel time calling cpuid(),
which seemed wrong.
- Matthew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Pentium Pro Feature Bugs
2019-05-17 20:06 ` tedheadster
@ 2019-05-17 20:40 ` Eduardo Habkost
0 siblings, 0 replies; 9+ messages in thread
From: Eduardo Habkost @ 2019-05-17 20:40 UTC (permalink / raw)
To: whiteheadm; +Cc: Paolo Bonzini, Thomas Huth, qemu-devel, Michael S. Tsirkin
On Fri, May 17, 2019 at 04:06:20PM -0400, tedheadster wrote:
> On Fri, May 17, 2019 at 2:15 PM Eduardo Habkost <ehabkost@redhat.com> wrote:
> > Are you running the same kernel version on all VMs?
> > X86_FEATURE_CPUID was added in Linux v4.11.
> >
>
> Eduardo,
> I am running a 4.9.162 virtual machine (very intentionally, the
> drivers I need got broken in 4.11) inside of a 5.1.2 host.
That would explain why you don't see cpuid on /proc/cpuinfo.
v4.9.162 doesn't have the flag.
>
> X86_FEATURE_CPUID is certainly defined in
> arch/x86/kernel/cpu/capflags.c but nothing much seems to be done with
> it.
I don't see X86_FEATURE_CPUID in v4.9.162, which kernel source
version are you looking at?
>
> The whole reason this came up is I was running 'perf top' on the
> virtual host and it was spending the most kernel time calling cpuid(),
> which seemed wrong.
Which process was doing it?
--
Eduardo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-05-17 20:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 3:36 [Qemu-devel] Pentium Pro Feature Bugs tedheadster
2019-04-01 5:35 ` Thomas Huth
2019-04-01 7:28 ` Paolo Bonzini
2019-05-17 0:30 ` tedheadster
2019-05-17 2:57 ` Paolo Bonzini
2019-05-17 3:01 ` tedheadster
2019-05-17 18:15 ` Eduardo Habkost
2019-05-17 20:06 ` tedheadster
2019-05-17 20:40 ` Eduardo Habkost
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.