[libvirt] [PATCH 0/2] Add new CPU flags and the AMD Opteron G5 model

This series is based on the recent upstream submission of the new AMD CPU model. Peter Krempa (2): cpu: Add newly added cpu flags cpu: Add AMD Opteron G5 cpu model src/cpu/cpu_map.xml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) -- 1.7.12.4

This patch adds a few new processor feature flags. Namely: f16c rdrand lwp tbm topoext perfctr_core perfctr_nb fsgsbase bmi1 hle avx2 bmi2 erms invpcid rtm rdseed adx tce --- Based on: http://lists.nongnu.org/archive/html/qemu-devel/2012-11/msg00430.html --- src/cpu/cpu_map.xml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index f0a1f04..11d16e6 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -178,6 +178,12 @@ <feature name='avx'> <cpuid function='0x00000001' ecx='0x10000000'/> </feature> + <feature name='f16c'> + <cpuid function='0x00000001' ecx='0x20000000'/> + </feature> + <feature name='rdrand'> + <cpuid function='0x00000001' ecx='0x40000000'/> + </feature> <feature name='hypervisor'> <!-- CPUID_EXT_HYPERVISOR --> <cpuid function='0x00000001' ecx='0x80000000'/> </feature> @@ -254,21 +260,69 @@ <feature name='wdt'> <cpuid function='0x80000001' ecx='0x00002000'/> </feature> + <feature name='lwp'> + <cpuid function='0x80000001' ecx='0x00008000'/> + </feature> <feature name='fma4'> <cpuid function='0x80000001' ecx='0x00010000'/> </feature> + <feature name='tce'> + <cpuid function='0x80000001' ecx='0x00020000'/> + </feature> <feature name='cvt16'> <cpuid function='0x80000001' ecx='0x00040000'/> </feature> <feature name='nodeid_msr'> <cpuid function='0x80000001' ecx='0x00080000'/> </feature> + <feature name='tbm'> + <cpuid function='0x80000001' ecx='0x00200000'/> + </feature> + <feature name='topoext'> + <cpuid function='0x80000001' ecx='0x00400000'/> + </feature> + <feature name='perfctr_core'> + <cpuid function='0x80000001' ecx='0x00800000'/> + </feature> + <feature name='perfctr_nb'> + <cpuid function='0x80000001' ecx='0x01000000'/> + </feature> <!-- cpuid function 0x7 ecx 0x0 features --> <!-- We support only ecx 0x0 now as it's done by a workaround --> + <feature name='fsgsbase'> + <cpuid function='0x00000007' ebx='0x00000001'/> + </feature> + <feature name='bmi1'> + <cpuid function='0x00000007' ebx='0x00000008'/> + </feature> + <feature name='hle'> + <cpuid function='0x00000007' ebx='0x00000010'/> + </feature> + <feature name='avx2'> + <cpuid function='0x00000007' ebx='0x00000020'/> + </feature> <feature name='smep'> <cpuid function='0x00000007' ebx='0x00000080'/> </feature> + <feature name='bmi2'> + <cpuid function='0x00000007' ebx='0x00000100'/> + </feature> + <feature name='erms'> + <cpuid function='0x00000007' ebx='0x00000200'/> + </feature> + <feature name='invpcid'> + <cpuid function='0x00000007' ebx='0x00000400'/> + </feature> + <feature name='rtm'> + <cpuid function='0x00000007' ebx='0x00000800'/> + </feature> + <feature name='rdseed'> + <cpuid function='0x00000007' ebx='0x00040000'/> + </feature> + <feature name='adx'> + <cpuid function='0x00000007' ebx='0x00080000'/> + </feature> <feature name='smap'> <cpuid function='0x00000007' ebx='0x00100000'/> </feature> -- 1.7.12.4

--- Based on: http://lists.nongnu.org/archive/html/qemu-devel/2012-11/msg00431.html --- src/cpu/cpu_map.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 11d16e6..7ff91be 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -560,6 +560,13 @@ <feature name='xop'/> <feature name='fma4'/> </model> + + <model name='Opteron_G5'> + <model name='Opteron_G4'/> + <feature name='f16c'/> + <feature name='fma'/> + <feature name='tbm'/> + </model> </arch> <arch name='ppc64'> <!-- vendor definitions --> -- 1.7.12.4

On 11/02/2012 02:02 PM, Peter Krempa wrote:
This series is based on the recent upstream submission of the new AMD CPU model.
Peter Krempa (2): cpu: Add newly added cpu flags cpu: Add AMD Opteron G5 cpu model
src/cpu/cpu_map.xml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+)
Normally, I'm a little reluctant to commit things to libvirt regarding interaction with qemu if we don't at least have a qemu.git commit id; but in this case, the patch to qemu came from an AMD person who knows what he was doing, and qemu is very likely to take Boris' qemu counterpart patch as written. Besides, we're far enough out from 1.0.1 that we can fix things if an unexpected change occurs on the qemu side of things. ACK series, safe to apply now. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 11/02/12 21:12, Eric Blake wrote:
On 11/02/2012 02:02 PM, Peter Krempa wrote:
This series is based on the recent upstream submission of the new AMD CPU model.
Peter Krempa (2): cpu: Add newly added cpu flags cpu: Add AMD Opteron G5 cpu model
src/cpu/cpu_map.xml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+)
Normally, I'm a little reluctant to commit things to libvirt regarding interaction with qemu if we don't at least have a qemu.git commit id; but in this case, the patch to qemu came from an AMD person who knows what he was doing, and qemu is very likely to take Boris' qemu counterpart patch as written. Besides, we're far enough out from 1.0.1 that we can fix things if an unexpected change occurs on the qemu side of things.
ACK series, safe to apply now.
Thanks, I've pushed the series. I will be monitoring the qemu-devel mailing list for acceptance of the patches. Peter
participants (2)
-
Eric Blake
-
Peter Krempa