mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
KVM: x86: Do timer initialization after XCR0 configuration
Move kvm_arch_init()'s call to kvm_timer_init() down a few lines below the XCR0 configuration code. A future patch will move hardware setup into kvm_arch_init() and slot in vendor hardware setup before the call to kvm_timer_init() so that timer initialization (among other stuff) doesn't need to be unwound if vendor setup fails. XCR0 setup on the other hand needs to happen before vendor hardware setup. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20221130230934.1014142-8-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e43f576225
commit
1935542a04
|
|
@ -9341,13 +9341,13 @@ int kvm_arch_init(void *opaque)
|
|||
if (r)
|
||||
goto out_free_percpu;
|
||||
|
||||
kvm_timer_init();
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_XSAVE)) {
|
||||
host_xcr0 = xgetbv(XCR_XFEATURE_ENABLED_MASK);
|
||||
kvm_caps.supported_xcr0 = host_xcr0 & KVM_SUPPORTED_XCR0;
|
||||
}
|
||||
|
||||
kvm_timer_init();
|
||||
|
||||
if (pi_inject_timer == -1)
|
||||
pi_inject_timer = housekeeping_enabled(HK_TYPE_TIMER);
|
||||
#ifdef CONFIG_X86_64
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user