Skip to content
Commit 1051e29c authored by Sean Christopherson's avatar Sean Christopherson
Browse files

KVM: selftests: Drop superfluous switch() on vm->mode in vcpu_init_sregs()



Replace the switch statement on vm->mode in x86's vcpu_init_sregs()'s with
a simple assert that the VM has a 48-bit virtual address space.  A switch
statement is both overkill and misleading, as the existing code incorrectly
implies that VMs with LA57 would need different to configuration for the
LDT, TSS, and flat segments.  In all likelihood, the only difference that
would be needed for selftests is CR4.LA57 itself.

Reviewed-by: default avatarAckerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-14-seanjc@google.com
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 2a511ca9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment