[libvirt] [PATCH] cpu: Add Intel Haswell cpu model

The new model supports following features in addition to those supported by SandyBridge: fma, movbe, fsgsbase, bmi1, hle, avx2, smep, bmi2, erms, invpcid, rtm --- Based on: https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg01328.html --- src/cpu/cpu_map.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 7ff91be..eb69a34 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -495,6 +495,22 @@ <feature name='rdtscp'/> </model> + <model name='Haswell'> + <model name='SandyBridge'/> + <feature name='fma'/> + <feature name='pcid'/> + <feature name='movbe'/> + <feature name='fsgsbase'/> + <feature name='bmi1'/> + <feature name='hle'/> + <feature name='avx2'/> + <feature name='smep'/> + <feature name='bmi2'/> + <feature name='erms'/> + <feature name='invpcid'/> + <feature name='rtm'/> + </model> + <!-- AMD CPUs --> <model name='athlon'> <model name='pentiumpro'/> -- 1.8.0

On 11/22/2012 03:05 PM, Peter Krempa wrote:
The new model supports following features in addition to those supported by SandyBridge:
fma, movbe, fsgsbase, bmi1, hle, avx2, smep, bmi2, erms, invpcid, rtm
missing 'pcid' flag
--- Based on: https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg01328.html --- src/cpu/cpu_map.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 7ff91be..eb69a34 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -495,6 +495,22 @@ <feature name='rdtscp'/> </model>
+ <model name='Haswell'> + <model name='SandyBridge'/> + <feature name='fma'/> + <feature name='pcid'/> + <feature name='movbe'/> + <feature name='fsgsbase'/> + <feature name='bmi1'/> + <feature name='hle'/> + <feature name='avx2'/> + <feature name='smep'/> + <feature name='bmi2'/> + <feature name='erms'/> + <feature name='invpcid'/> + <feature name='rtm'/> + </model> + <!-- AMD CPUs --> <model name='athlon'> <model name='pentiumpro'/>
According to the qemu patch, the model should be only adding features, but I see rdtscp disappeared between SandyBridge and Haswell. The question is whether this is QEMU bug or not, do you have any info on that? If not, maybe we should cross-post ask in qemu-devel. We also include 'sep' and 'fpu' on top of these things, but I recall some conversation about qemu dropping 'sep' from some models lately, but I have no idea about 'fpu' flag handling there either. Martin

On 11/22/12 15:52, Martin Kletzander wrote:
On 11/22/2012 03:05 PM, Peter Krempa wrote:
The new model supports following features in addition to those supported by SandyBridge:
fma, movbe, fsgsbase, bmi1, hle, avx2, smep, bmi2, erms, invpcid, rtm
missing 'pcid' flag
Ah, yeah, thanks for pointing out.
--- Based on: https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg01328.html --- src/cpu/cpu_map.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 7ff91be..eb69a34 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -495,6 +495,22 @@ <feature name='rdtscp'/> </model>
+ <model name='Haswell'> + <model name='SandyBridge'/> + <feature name='fma'/> + <feature name='pcid'/> + <feature name='movbe'/> + <feature name='fsgsbase'/> + <feature name='bmi1'/> + <feature name='hle'/> + <feature name='avx2'/> + <feature name='smep'/> + <feature name='bmi2'/> + <feature name='erms'/> + <feature name='invpcid'/> + <feature name='rtm'/> + </model> + <!-- AMD CPUs --> <model name='athlon'> <model name='pentiumpro'/>
According to the qemu patch, the model should be only adding features, but I see rdtscp disappeared between SandyBridge and Haswell. The question is whether this is QEMU bug or not, do you have any info on that? If not, maybe we should cross-post ask in qemu-devel.
We also include 'sep' and 'fpu' on top of these things, but I recall some conversation about qemu dropping 'sep' from some models lately, but I have no idea about 'fpu' flag handling there either.
Thanks for pointing that out on the qemu-devel list: https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg02400.html
Martin

On 11/22/2012 04:48 PM, Peter Krempa wrote:
On 11/22/12 15:52, Martin Kletzander wrote:
On 11/22/2012 03:05 PM, Peter Krempa wrote: [...] According to the qemu patch, the model should be only adding features, but I see rdtscp disappeared between SandyBridge and Haswell. The question is whether this is QEMU bug or not, do you have any info on that? If not, maybe we should cross-post ask in qemu-devel.
We also include 'sep' and 'fpu' on top of these things, but I recall some conversation about qemu dropping 'sep' from some models lately, but I have no idea about 'fpu' flag handling there either.
Thanks for pointing that out on the qemu-devel list:
https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg02400.html
I think we can safely assume the patch will make it in a few days, but to be sure I'm giving you an ACK for when the patch gets into qemu's upstream. Martin

On 11/23/12 09:16, Martin Kletzander wrote:
On 11/22/2012 04:48 PM, Peter Krempa wrote:
On 11/22/12 15:52, Martin Kletzander wrote:
On 11/22/2012 03:05 PM, Peter Krempa wrote: [...] According to the qemu patch, the model should be only adding features, but I see rdtscp disappeared between SandyBridge and Haswell. The question is whether this is QEMU bug or not, do you have any info on that? If not, maybe we should cross-post ask in qemu-devel.
We also include 'sep' and 'fpu' on top of these things, but I recall some conversation about qemu dropping 'sep' from some models lately, but I have no idea about 'fpu' flag handling there either.
Thanks for pointing that out on the qemu-devel list:
https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg02400.html
I think we can safely assume the patch will make it in a few days, but to be sure I'm giving you an ACK for when the patch gets into qemu's upstream.
Martin
I pushed the patch now. Eduardo's patch got an ack and should make it into qemu 1.3. Peter
participants (2)
-
Martin Kletzander
-
Peter Krempa