|
@@ -5065,6 +5065,10 @@ static int handle_exception(struct kvm_vcpu *vcpu)
|
|
}
|
|
}
|
|
|
|
|
|
if (is_invalid_opcode(intr_info)) {
|
|
if (is_invalid_opcode(intr_info)) {
|
|
|
|
+ if (is_guest_mode(vcpu)) {
|
|
|
|
+ kvm_queue_exception(vcpu, UD_VECTOR);
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
er = emulate_instruction(vcpu, EMULTYPE_TRAP_UD);
|
|
er = emulate_instruction(vcpu, EMULTYPE_TRAP_UD);
|
|
if (er != EMULATE_DONE)
|
|
if (er != EMULATE_DONE)
|
|
kvm_queue_exception(vcpu, UD_VECTOR);
|
|
kvm_queue_exception(vcpu, UD_VECTOR);
|