Lines Matching defs:exception

494 	unsigned nr = vcpu->arch.exception.nr;
495 bool has_payload = vcpu->arch.exception.has_payload;
496 unsigned long payload = vcpu->arch.exception.payload;
516 * exception should clear DR6.RTM. This makes the payload
537 vcpu->arch.exception.has_payload = false;
538 vcpu->arch.exception.payload = 0;
551 if (!vcpu->arch.exception.pending && !vcpu->arch.exception.injected) {
555 * On vmentry, vcpu->arch.exception.pending is only
562 WARN_ON_ONCE(vcpu->arch.exception.pending);
563 vcpu->arch.exception.injected = true;
573 vcpu->arch.exception.pending = true;
574 vcpu->arch.exception.injected = false;
576 vcpu->arch.exception.has_error_code = has_error;
577 vcpu->arch.exception.nr = nr;
578 vcpu->arch.exception.error_code = error_code;
579 vcpu->arch.exception.has_payload = has_payload;
580 vcpu->arch.exception.payload = payload;
586 /* to check exception */
587 prev_nr = vcpu->arch.exception.nr;
599 * exception.pending = true so that the double fault
602 vcpu->arch.exception.pending = true;
603 vcpu->arch.exception.injected = false;
604 vcpu->arch.exception.has_error_code = true;
605 vcpu->arch.exception.nr = DF_VECTOR;
606 vcpu->arch.exception.error_code = 0;
607 vcpu->arch.exception.has_payload = false;
608 vcpu->arch.exception.payload = 0;
610 /* replace previous exception with a new one in a hope
612 exception */
656 vcpu->arch.exception.nested_apf =
658 if (vcpu->arch.exception.nested_apf) {
742 struct x86_exception exception;
747 real_gfn = mmu->translate_gpa(vcpu, ngpa, access, &exception);
4221 * Do not cause an interrupt window exit if an exception
4230 !vcpu->arch.exception.pending);
4370 * an exception payload and handle after a KVM_GET_VCPU_EVENTS. Since we
4371 * opportunistically defer the exception payload, deliver it if the
4376 vcpu->arch.exception.pending && vcpu->arch.exception.has_payload)
4382 * isn't advanced, we should expect to encounter the exception
4385 if (kvm_exception_is_soft(vcpu->arch.exception.nr)) {
4386 events->exception.injected = 0;
4387 events->exception.pending = 0;
4389 events->exception.injected = vcpu->arch.exception.injected;
4390 events->exception.pending = vcpu->arch.exception.pending;
4397 events->exception.injected |=
4398 vcpu->arch.exception.pending;
4400 events->exception.nr = vcpu->arch.exception.nr;
4401 events->exception.has_error_code = vcpu->arch.exception.has_error_code;
4402 events->exception.error_code = vcpu->arch.exception.error_code;
4403 events->exception_has_payload = vcpu->arch.exception.has_payload;
4404 events->exception_payload = vcpu->arch.exception.payload;
4449 if (events->exception.pending)
4450 events->exception.injected = 0;
4454 events->exception.pending = 0;
4458 if ((events->exception.injected || events->exception.pending) &&
4459 (events->exception.nr > 31 || events->exception.nr == NMI_VECTOR))
4469 vcpu->arch.exception.injected = events->exception.injected;
4470 vcpu->arch.exception.pending = events->exception.pending;
4471 vcpu->arch.exception.nr = events->exception.nr;
4472 vcpu->arch.exception.has_error_code = events->exception.has_error_code;
4473 vcpu->arch.exception.error_code = events->exception.error_code;
4474 vcpu->arch.exception.has_payload = events->exception_has_payload;
4475 vcpu->arch.exception.payload = events->exception_payload;
6097 struct x86_exception *exception)
6105 t_gpa = vcpu->arch.mmu->gva_to_gpa(vcpu, gpa, access, exception);
6111 struct x86_exception *exception)
6114 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, exception);
6118 struct x86_exception *exception)
6122 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, exception);
6126 struct x86_exception *exception)
6130 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, exception);
6135 struct x86_exception *exception)
6137 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, 0, exception);
6142 struct x86_exception *exception)
6149 exception);
6174 struct x86_exception *exception)
6183 exception);
6200 struct x86_exception *exception)
6210 memset(exception, 0, sizeof(*exception));
6212 exception);
6218 struct x86_exception *exception, bool system)
6226 return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, exception);
6240 struct x86_exception *exception)
6248 exception);
6270 unsigned int bytes, struct x86_exception *exception,
6280 access, exception);
6284 unsigned int bytes, struct x86_exception *exception)
6290 PFERR_WRITE_MASK, exception);
6332 gpa_t *gpa, struct x86_exception *exception,
6352 *gpa = vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, exception);
6446 struct x86_exception *exception,
6468 ret = vcpu_mmio_gva_to_gpa(vcpu, addr, &gpa, exception, write);
6498 struct x86_exception *exception,
6516 rc = emulator_read_write_onepage(addr, val, now, exception,
6528 rc = emulator_read_write_onepage(addr, val, bytes, exception,
6553 struct x86_exception *exception)
6556 exception, &read_emultor);
6563 struct x86_exception *exception)
6566 exception, &write_emultor);
6584 struct x86_exception *exception)
6649 return emulator_write_emulated(ctxt, addr, new, bytes, exception);
7024 &ctxt->exception);
7168 if (ctxt->exception.vector == PF_VECTOR)
7169 return kvm_inject_emulated_page_fault(vcpu, &ctxt->exception);
7171 if (ctxt->exception.error_code_valid)
7172 kvm_queue_exception_e(vcpu, ctxt->exception.vector,
7173 ctxt->exception.error_code);
7175 kvm_queue_exception(vcpu, ctxt->exception.vector);
7219 ctxt->exception.vector = -1;
7438 kvm_run->debug.arch.exception = DB_VECTOR;
7460 * processor will not generate this exception after the instruction
7482 kvm_run->debug.arch.exception = DB_VECTOR;
7540 * (and wrong) when emulating on an intercepted fault-like exception[*], as
7615 * exception should not be encountered during decode.
7617 WARN_ON_ONCE(ctxt->exception.vector == UD_VECTOR ||
7618 exception_type(ctxt->exception.vector) == EXCPT_TRAP);
7657 ctxt->exception.address = cr2_or_gpa;
7666 ctxt->exception.address = 0;
7718 exception_type(ctxt->exception.vector) == EXCPT_TRAP) {
8454 &ctxt->exception);
8504 trace_kvm_inj_exception(vcpu->arch.exception.nr,
8505 vcpu->arch.exception.has_error_code,
8506 vcpu->arch.exception.error_code,
8507 vcpu->arch.exception.injected);
8509 if (vcpu->arch.exception.error_code && !is_protmode(vcpu))
8510 vcpu->arch.exception.error_code = false;
8521 if (vcpu->arch.exception.injected) {
8527 * exception. Exceptions and interrupts are recognized at
8534 * execution, i.e. a pending fault-like exception means the
8539 else if (!vcpu->arch.exception.pending) {
8549 WARN_ON_ONCE(vcpu->arch.exception.injected &&
8550 vcpu->arch.exception.pending);
8565 if (vcpu->arch.exception.pending) {
8568 * value pushed on the stack. Trap-like exception and all #DBs
8576 if (exception_type(vcpu->arch.exception.nr) == EXCPT_FAULT)
8580 if (vcpu->arch.exception.nr == DB_VECTOR) {
8590 vcpu->arch.exception.pending = false;
8591 vcpu->arch.exception.injected = true;
8653 WARN_ON(vcpu->arch.exception.pending);
9742 vcpu->arch.exception.pending = false;
10021 if (vcpu->arch.exception.pending)
11041 if (vcpu->arch.exception.pending)
11277 vcpu->arch.exception.pending))