* [PATCH] KVM: selftests: Ignore CPUID.0DH.1H in get_cpuid_test
@ 2021-05-19 21:13 David Matlack
2021-05-19 21:14 ` David Matlack
2021-05-24 12:31 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: David Matlack @ 2021-05-19 21:13 UTC (permalink / raw)
To: kvm; +Cc: Paolo Bonzini, Andrew Jones, Vitaly Kuznetsov, David Matlack
Similar to CPUID.0DH.0H this entry depends on the vCPU's XCR0 register
and IA32_XSS MSR. Since this test does not control for either before
assigning the vCPU's CPUID, these entries will not necessarily match
the supported CPUID exposed by KVM.
This fixes get_cpuid_test on Cascade Lake CPUs.
Signed-off-by: David Matlack <dmatlack@google.com>
---
tools/testing/selftests/kvm/x86_64/get_cpuid_test.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c b/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
index 9b78e8889638..8c77537af5a1 100644
--- a/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
+++ b/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
@@ -19,7 +19,12 @@ struct {
u32 function;
u32 index;
} mangled_cpuids[] = {
+ /*
+ * These entries depend on the vCPU's XCR0 register and IA32_XSS MSR,
+ * which are not controlled for by this test.
+ */
{.function = 0xd, .index = 0},
+ {.function = 0xd, .index = 1},
};
static void test_guest_cpuids(struct kvm_cpuid2 *guest_cpuid)
--
2.31.1.751.gd2f1c929bd-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: selftests: Ignore CPUID.0DH.1H in get_cpuid_test
2021-05-19 21:13 [PATCH] KVM: selftests: Ignore CPUID.0DH.1H in get_cpuid_test David Matlack
@ 2021-05-19 21:14 ` David Matlack
2021-05-24 12:31 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: David Matlack @ 2021-05-19 21:14 UTC (permalink / raw)
To: kvm list; +Cc: Paolo Bonzini, Andrew Jones, Vitaly Kuznetsov, Jim Mattson
On Wed, May 19, 2021 at 2:13 PM David Matlack <dmatlack@google.com> wrote:
>
> Similar to CPUID.0DH.0H this entry depends on the vCPU's XCR0 register
> and IA32_XSS MSR. Since this test does not control for either before
> assigning the vCPU's CPUID, these entries will not necessarily match
> the supported CPUID exposed by KVM.
>
> This fixes get_cpuid_test on Cascade Lake CPUs.
>
> Signed-off-by: David Matlack <dmatlack@google.com>
Apologies, forgot to add:
Suggested-by: Jim Mattson <jmattson@google.com>
> ---
> tools/testing/selftests/kvm/x86_64/get_cpuid_test.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c b/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
> index 9b78e8889638..8c77537af5a1 100644
> --- a/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
> @@ -19,7 +19,12 @@ struct {
> u32 function;
> u32 index;
> } mangled_cpuids[] = {
> + /*
> + * These entries depend on the vCPU's XCR0 register and IA32_XSS MSR,
> + * which are not controlled for by this test.
> + */
> {.function = 0xd, .index = 0},
> + {.function = 0xd, .index = 1},
> };
>
> static void test_guest_cpuids(struct kvm_cpuid2 *guest_cpuid)
> --
> 2.31.1.751.gd2f1c929bd-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: selftests: Ignore CPUID.0DH.1H in get_cpuid_test
2021-05-19 21:13 [PATCH] KVM: selftests: Ignore CPUID.0DH.1H in get_cpuid_test David Matlack
2021-05-19 21:14 ` David Matlack
@ 2021-05-24 12:31 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2021-05-24 12:31 UTC (permalink / raw)
To: David Matlack, kvm; +Cc: Andrew Jones, Vitaly Kuznetsov
On 19/05/21 23:13, David Matlack wrote:
> Similar to CPUID.0DH.0H this entry depends on the vCPU's XCR0 register
> and IA32_XSS MSR. Since this test does not control for either before
> assigning the vCPU's CPUID, these entries will not necessarily match
> the supported CPUID exposed by KVM.
>
> This fixes get_cpuid_test on Cascade Lake CPUs.
>
> Signed-off-by: David Matlack <dmatlack@google.com>
> ---
> tools/testing/selftests/kvm/x86_64/get_cpuid_test.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c b/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
> index 9b78e8889638..8c77537af5a1 100644
> --- a/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/get_cpuid_test.c
> @@ -19,7 +19,12 @@ struct {
> u32 function;
> u32 index;
> } mangled_cpuids[] = {
> + /*
> + * These entries depend on the vCPU's XCR0 register and IA32_XSS MSR,
> + * which are not controlled for by this test.
> + */
> {.function = 0xd, .index = 0},
> + {.function = 0xd, .index = 1},
> };
>
> static void test_guest_cpuids(struct kvm_cpuid2 *guest_cpuid)
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-24 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 21:13 [PATCH] KVM: selftests: Ignore CPUID.0DH.1H in get_cpuid_test David Matlack
2021-05-19 21:14 ` David Matlack
2021-05-24 12:31 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).