KVM: selftests: Check that the palette table exists before using it

Check that the palette table exists before using it. The maximum number of
AMX palette tables is enumerated by CPUID.1DH:EAX. Assert that the palette
used in amx_test, CPUID.1DH.1H, does not exceed that maximum.

Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Link: https://lore.kernel.org/r/20230221163655.920289-13-mizhang@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
Aaron Lewis 2023-02-21 16:36:54 +00:00 • committed by Sean Christopherson
commit d32fb07142
2 changed files with 6 additions and 0 deletions