KVM: selftests: Init x86's segments during VM creation
authorSean Christopherson <seanjc@google.com>
Thu, 14 Mar 2024 23:26:36 +0000 (16:26 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 29 Apr 2024 19:55:21 +0000 (12:55 -0700)
commit0f53a0245068e09b3b31e7f43ace0ab9edd066ef
tree5e59c531e4d01f51944dd16d2ccde50527f6fee6
parentf18ef97fc60217f648a910835c895cf27ba75a03
KVM: selftests: Init x86's segments during VM creation

Initialize x86's various segments in the GDT during creation of relevant
VMs instead of waiting until vCPUs come along.  Re-installing the segments
for every vCPU is both wasteful and confusing, as is installing KERNEL_DS
multiple times; NOT installing KERNEL_DS for GS is icing on the cake.

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