KVM: selftests: Fold x86's descriptor tables helpers into vcpu_init_sregs()
authorSean Christopherson <seanjc@google.com>
Thu, 14 Mar 2024 23:26:33 +0000 (16:26 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 29 Apr 2024 19:55:18 +0000 (12:55 -0700)
commit23ef21f58cf8bbecbe479015ef79baa15a0da0b8
tree540e4c7f3a627a5c709ec61e615b3a7c89b650d4
parent1051e29cb9156789e908ab9565f59e7aba470d60
KVM: selftests: Fold x86's descriptor tables helpers into vcpu_init_sregs()

Now that the per-VM, on-demand allocation logic in kvm_setup_gdt() and
vcpu_init_descriptor_tables() is gone, fold them into vcpu_init_sregs().

Note, both kvm_setup_gdt() and vcpu_init_descriptor_tables() configured the
GDT, which is why it looks like kvm_setup_gdt() disappears.

Opportunistically delete the pointless zeroing of the IDT limit (it was
being unconditionally overwritten by vcpu_init_descriptor_tables()).

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-15-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/lib/x86_64/processor.c