On 16/03/2018 16:51, Radim Krčmář wrote: >> + if (!vmx->rmode.vm86_active && is_gp_fault(intr_info)) { > Do we have some guarantees that the backdoor ports are never going to be > used while vmx->rmode.vm86_active? While vmx->rmode.vm86_active, handle_rmode_exception simply runs the emulator whenever it sees a #GP, so that works too (except for not having EMULTYPE_NO_UD_ON_FAIL). Paolo > Thanks. > >> + WARN_ON_ONCE(!enable_vmware_backdoor); >> + er = emulate_instruction(vcpu, >> + EMULTYPE_VMWARE | EMULTYPE_NO_UD_ON_FAIL); >> + if (er == EMULATE_USER_EXIT) >> + return 0; >> + else if (er != EMULATE_DONE) >> + kvm_queue_exception_e(vcpu, GP_VECTOR, error_code); >> + return 1; >> + }