[libvirt] [PATCH] cpu: Add support for clflushopt and tsc_adjust Intel features

Corresponding QEMU commits: clflushopt f7fda280948a5e74aeb076ef346b991ecb173c56 tsc_adjust 7b458bfd12a71b3da6b531daedc417492c9334e0 Signed-off-by: Alexander Burluka <aburluka@virtuozzo.com> --- src/cpu/cpu_map.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 0b6d424..08aded2 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -293,6 +293,9 @@ <feature name='fsgsbase'> <cpuid function='0x00000007' ebx='0x00000001'/> </feature> + <feature name='tsc_adjust'> + <cpuid function='0x00000007' ebx='0x00000002'/> + </feature> <feature name='bmi1'> <cpuid function='0x00000007' ebx='0x00000008'/> </feature> @@ -332,6 +335,9 @@ <feature name='smap'> <cpuid function='0x00000007' ebx='0x00100000'/> </feature> + <feature name='clflushopt'> + <cpuid function='0x00000007' ebx='0x00800000'/> + </feature> <feature name='avx512pf'> <!-- AVX-512 Prefetch --> <cpuid function='0x00000007' ebx='0x04000000'/> </feature> -- 1.8.3.1

On Sat, May 14, 2016 at 13:06:56 +0300, Alexander Burluka wrote:
Corresponding QEMU commits: clflushopt f7fda280948a5e74aeb076ef346b991ecb173c56 tsc_adjust 7b458bfd12a71b3da6b531daedc417492c9334e0
Signed-off-by: Alexander Burluka <aburluka@virtuozzo.com> --- src/cpu/cpu_map.xml | 6 ++++++ 1 file changed, 6 insertions(+)
ACK and pushed, thanks. Jirka

Hello, I would like to add support for the next CPU features which presents in QEMU - xsaveopt, xsavec, xgetbv1, xsaves. These features were introduced in QEMU commit 0bb0b2d2fe7f645ddaf1f0ff40ac669c9feb4aa1. I was confused by comment in src/cpu/cpu_map.xml: ... <!-- We support only ecx 0x0 now as it's done by a workaround --> ... Is this comment is still actual? This feature set needs ecx 0x1. I can see that it was a temporary solution in commit by Peter Krempa 012f9b19ef3812884e207dc431571502de4cebce. Does these features addtion require CPU detection improvement? Or can I simply put them into src/cpu/cpu_map.xml? Thank you -- Regards, Alexander Burluka

On Thu, May 19, 2016 at 19:56:18 +0300, Alexander Burluka wrote:
Hello,
I would like to add support for the next CPU features which presents in QEMU - xsaveopt, xsavec, xgetbv1, xsaves. These features were introduced in QEMU commit 0bb0b2d2fe7f645ddaf1f0ff40ac669c9feb4aa1. I was confused by comment in src/cpu/cpu_map.xml: ... <!-- We support only ecx 0x0 now as it's done by a workaround --> ... Is this comment is still actual? This feature set needs ecx 0x1. I can see that it was a temporary solution in commit by Peter Krempa 012f9b19ef3812884e207dc431571502de4cebce. Does these features addtion require CPU detection improvement? Or can I simply put them into src/cpu/cpu_map.xml?
Yeah, the CPU detection code needs to be improved to support features which require more than just eax set when running CPUID instruction. I'm currently working on adding more CPUID tests (and data) to libvirt and I'll take that as the opportunity to add support for these new features. Jirka

On Fri, May 20, 2016 at 09:29:38AM +0200, Jiri Denemark wrote:
On Thu, May 19, 2016 at 19:56:18 +0300, Alexander Burluka wrote:
Hello,
I would like to add support for the next CPU features which presents in QEMU - xsaveopt, xsavec, xgetbv1, xsaves. These features were introduced in QEMU commit 0bb0b2d2fe7f645ddaf1f0ff40ac669c9feb4aa1. I was confused by comment in src/cpu/cpu_map.xml: ... <!-- We support only ecx 0x0 now as it's done by a workaround --> ... Is this comment is still actual? This feature set needs ecx 0x1. I can see that it was a temporary solution in commit by Peter Krempa 012f9b19ef3812884e207dc431571502de4cebce. Does these features addtion require CPU detection improvement? Or can I simply put them into src/cpu/cpu_map.xml?
Yeah, the CPU detection code needs to be improved to support features which require more than just eax set when running CPUID instruction.
I'm currently working on adding more CPUID tests (and data) to libvirt and I'll take that as the opportunity to add support for these new features.
Jirka
Thank you, I will follow mailing list -- Regards, Alexander Burluka
participants (2)
-
Alexander Burluka
-
Jiri Denemark