]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Use kvm_has_feat() to check if FEAT_SSBS is advertised to the guest
authorShaoqin Huang <shahuang@redhat.com>
Tue, 23 Jul 2024 07:20:01 +0000 (03:20 -0400)
committerMarc Zyngier <maz@kernel.org>
Sun, 25 Aug 2024 16:48:44 +0000 (17:48 +0100)
commite8d164974cfa46fe5ec87869c8a7113641f322d5
treec2c6eb57a4b4e262d789a11afc54cb2597691617
parentffe68b2d19a5a84440fea99a732cfc3b157559eb
KVM: arm64: Use kvm_has_feat() to check if FEAT_SSBS is advertised to the guest

Currently KVM use cpus_have_final_cap() to check if FEAT_SSBS is
advertised to the guest. But if FEAT_SSBS is writable and isn't
advertised to the guest, this is wrong.

Update it to use kvm_has_feat() to check if FEAT_SSBS is advertised
to the guest, thus the KVM can do the right thing if FEAT_SSBS isn't
advertised to the guest.

Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
Link: https://lore.kernel.org/r/20240723072004.1470688-3-shahuang@redhat.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hypercalls.c