Skip to contentSkip to conversation

i386: hvf: Explicitly set CR4 guest/host mask

PATCH In review Roman Bolshakov 3 participants 5 messages Jul 14, 2020 – Jul 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386: hvf: Explicitly set CR4 guest/host mask

Removal of register reset omitted initialization of CR4 guest/host mask. x86_64 guests aren't booting without it.

Fixes 5009ef22c6bb2 ("i386: hvf: Don't duplicate register reset")
---
 target/i386/hvf/vmx.h | 1 +
 1 file changed, 1 insertion(+)
target/i386/hvf/vmx.h +1 -0
index 75ba1e2a5f..587b1b8375 100644
@@ -166,6 +166,7 @@ static inline void macvm_set_cr4(hv_vcpuid_t vcpu, uint64_t cr4)
 
     wvmcs(vcpu, VMCS_GUEST_CR4, guest_cr4);
     wvmcs(vcpu, VMCS_CR4_SHADOW, cr4);
+    wvmcs(vcpu, VMCS_CR4_MASK, CR4_VMXE);
 
     hv_vcpu_invalidate_tlb(vcpu);
     hv_vcpu_flush(vcpu);
Signature · 1 line
2.26.1
#1 lore raw
Quoted 6 lines · Roman Bolshakov

Removal of register reset omitted initialization of CR4 guest/host mask. x86_64 guests aren't booting without it.

Fixes 5009ef22c6bb2 ("i386: hvf: Don't duplicate register reset")

If one has a chance to test or review it, it'd be very helpful. That'd allow to include it in RC0.

Thanks,
Roman

#2 lore raw

Hi Roman, please ask Peter to apply it directly because I won't be able to send a pull request in the next couple of weeks.

Paolo

Il mar 14 lug 2020, 12:39 Roman Bolshakov <[email protected]> ha scritto:

Quoted 15 lines · Roman Bolshakov
Quoted 6 lines

Removal of register reset omitted initialization of CR4 guest/host mask. x86_64 guests aren't booting without it.

Fixes 5009ef22c6bb2 ("i386: hvf: Don't duplicate register reset")

If one has a chance to test or review it, it'd be very helpful. That'd allow to include it in RC0.

Thanks,
Roman

#3 lore raw
Quoted 19 lines · Paolo Bonzini

Hi Roman, please ask Peter to apply it directly because I won't be able to send a pull request in the next couple of weeks.

Paolo

Il mar 14 lug 2020, 12:39 Roman Bolshakov <[email protected]> ha scritto:

Quoted 11 lines · Roman Bolshakov
Quoted 6 lines

Removal of register reset omitted initialization of CR4 guest/host mask. x86_64 guests aren't booting without it.

Fixes 5009ef22c6bb2 ("i386: hvf: Don't duplicate register reset")

If one has a chance to test or review it, it'd be very helpful. That'd allow to include it in RC0.

I'll queue it for my -rc1 pull request.

Signature · 1 line
Eduardo
#4 lore raw
Quoted 17 lines · Eduardo Habkost
Quoted 16 lines · Paolo Bonzini

Hi Roman, please ask Peter to apply it directly because I won't be able to send a pull request in the next couple of weeks.

Paolo

Il mar 14 lug 2020, 12:39 Roman Bolshakov <[email protected]> ha scritto:

Quoted 8 lines · Roman Bolshakov
Quoted 6 lines

Removal of register reset omitted initialization of CR4 guest/host mask. x86_64 guests aren't booting without it.

Fixes 5009ef22c6bb2 ("i386: hvf: Don't duplicate register reset")
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

If one has a chance to test or review it, it'd be very helpful. That'd allow to include it in RC0.

I'll queue it for my -rc1 pull request.

Thanks!

-Roman