Lines Matching defs:run

206  * returns to userspace, i.e. the kernel can run with the guest's value.
1993 if (!vcpu->run->msr.error) {
1994 kvm_rax_write(vcpu, (u32)vcpu->run->msr.data);
1995 kvm_rdx_write(vcpu, vcpu->run->msr.data >> 32);
2001 return complete_emulated_insn_gp(vcpu, vcpu->run->msr.error);
2012 return static_call(kvm_x86_complete_emulated_msr)(vcpu, vcpu->run->msr.error);
2044 vcpu->run->exit_reason = exit_reason;
2045 vcpu->run->msr.error = 0;
2046 memset(vcpu->run->msr.pad, 0, sizeof(vcpu->run->msr.pad));
2047 vcpu->run->msr.reason = msr_reason;
2048 vcpu->run->msr.index = index;
2049 vcpu->run->msr.data = data;
3198 * time to disappear, and the guest to stand still or run
3668 * disallows changing feature MSRs after the vCPU has run; PMU
3669 * refresh will bug the VM if called after the vCPU has run.
7637 memcpy(vcpu->run->mmio.data, frag->data, min(8u, frag->len));
7752 vcpu->run->mmio.len = min(8u, vcpu->mmio_fragments[0].len);
7753 vcpu->run->mmio.is_write = vcpu->mmio_is_write = ops->write;
7754 vcpu->run->exit_reason = KVM_EXIT_MMIO;
7755 vcpu->run->mmio.phys_addr = gpa;
7898 vcpu->run->exit_reason = KVM_EXIT_IO;
7899 vcpu->run->io.direction = in ? KVM_EXIT_IO_IN : KVM_EXIT_IO_OUT;
7900 vcpu->run->io.size = size;
7901 vcpu->run->io.data_offset = KVM_PIO_PAGE_OFFSET * PAGE_SIZE;
7902 vcpu->run->io.count = count;
7903 vcpu->run->io.port = port;
8474 struct kvm_run *run = vcpu->run;
8488 run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
8489 run->emulation_failure.suberror = KVM_INTERNAL_ERROR_EMULATION;
8501 run->emulation_failure.flags = 0;
8504 BUILD_BUG_ON((sizeof(run->emulation_failure.insn_size) +
8505 sizeof(run->emulation_failure.insn_bytes) != 16));
8507 run->emulation_failure.flags |=
8509 run->emulation_failure.insn_size = insn_size;
8510 memset(run->emulation_failure.insn_bytes, 0x90,
8511 sizeof(run->emulation_failure.insn_bytes));
8512 memcpy(run->emulation_failure.insn_bytes, insn_bytes, insn_size);
8515 memcpy(&run->internal.data[info_start], info, sizeof(info));
8516 memcpy(&run->internal.data[info_start + ARRAY_SIZE(info)], data,
8519 run->emulation_failure.ndata = info_start + ARRAY_SIZE(info) + ndata;
8713 struct kvm_run *kvm_run = vcpu->run;
8793 struct kvm_run *kvm_run = vcpu->run;
9234 * We allow guests to temporarily run on slowing clocks,
9235 * provided we notify them after, or to run on accelerating
9639 * The vCPU has halted, e.g. executed HLT. Update the run state if the
9640 * local APIC is in-kernel, the run loop will detect the non-runnable
9650 vcpu->run->exit_reason = reason;
9814 u64 ret = vcpu->run->hypercall.ret;
9901 vcpu->run->exit_reason = KVM_EXIT_HYPERCALL;
9902 vcpu->run->hypercall.nr = KVM_HC_MAP_GPA_RANGE;
9903 vcpu->run->hypercall.args[0] = gpa;
9904 vcpu->run->hypercall.args[1] = npages;
9905 vcpu->run->hypercall.args[2] = attrs;
9906 vcpu->run->hypercall.flags = 0;
9908 vcpu->run->hypercall.flags |= KVM_EXIT_HYPERCALL_LONG_MODE;
9910 WARN_ON_ONCE(vcpu->run->hypercall.flags & KVM_EXIT_HYPERCALL_MBZ);
9953 return vcpu->run->request_interrupt_window &&
9960 struct kvm_run *kvm_run = vcpu->run;
10573 vcpu->run->exit_reason = KVM_EXIT_TPR_ACCESS;
10582 vcpu->run->exit_reason = KVM_EXIT_SHUTDOWN;
10610 vcpu->run->exit_reason = KVM_EXIT_IOAPIC_EOI;
10611 vcpu->run->eoi.vector =
10624 vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
10625 vcpu->run->system_event.type = KVM_SYSTEM_EVENT_CRASH;
10626 vcpu->run->system_event.ndata = 0;
10631 vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
10632 vcpu->run->system_event.type = KVM_SYSTEM_EVENT_RESET;
10633 vcpu->run->system_event.ndata = 0;
10640 vcpu->run->exit_reason = KVM_EXIT_HYPERV;
10641 vcpu->run->hyperv = hv_vcpu->exit;
11000 vcpu->run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
11049 struct kvm_run *run = vcpu->run;
11059 memcpy(frag->data, run->mmio.data, len);
11082 run->exit_reason = KVM_EXIT_MMIO;
11083 run->mmio.phys_addr = frag->gpa;
11085 memcpy(run->mmio.data, frag->data, min(8u, frag->len));
11086 run->mmio.len = min(8u, frag->len);
11087 run->mmio.is_write = vcpu->mmio_is_write;
11111 struct kvm_run *kvm_run = vcpu->run;
11466 vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
11467 vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION;
11468 vcpu->run->internal.ndata = 0;
11800 if (vcpu->run->kvm_valid_regs & KVM_SYNC_X86_REGS)
11801 __get_regs(vcpu, &vcpu->run->s.regs.regs);
11803 if (vcpu->run->kvm_valid_regs & KVM_SYNC_X86_SREGS)
11804 __get_sregs(vcpu, &vcpu->run->s.regs.sregs);
11806 if (vcpu->run->kvm_valid_regs & KVM_SYNC_X86_EVENTS)
11808 vcpu, &vcpu->run->s.regs.events);
11813 if (vcpu->run->kvm_dirty_regs & KVM_SYNC_X86_REGS) {
11814 __set_regs(vcpu, &vcpu->run->s.regs.regs);
11815 vcpu->run->kvm_dirty_regs &= ~KVM_SYNC_X86_REGS;
11818 if (vcpu->run->kvm_dirty_regs & KVM_SYNC_X86_SREGS) {
11819 struct kvm_sregs sregs = vcpu->run->s.regs.sregs;
11824 vcpu->run->kvm_dirty_regs &= ~KVM_SYNC_X86_SREGS;
11827 if (vcpu->run->kvm_dirty_regs & KVM_SYNC_X86_EVENTS) {
11828 struct kvm_vcpu_events events = vcpu->run->s.regs.events;
11833 vcpu->run->kvm_dirty_regs &= ~KVM_SYNC_X86_EVENTS;
11880 * Defer evaluating inhibits until the vCPU is first run, as
11886 * is guaranteed to run with a deterministic value, the request
12231 * gets a chance to run again. In the event that no KVM threads get a
12232 * chance to run, we will miss the entire elapsed period, as we'll have
12733 * guest continues to run in the source machine (for example if
13445 struct kvm_run *run = vcpu->run;
13455 memcpy(frag->data, run->mmio.data, len);
13477 run->mmio.phys_addr = frag->gpa;
13478 run->mmio.len = min(8u, frag->len);
13479 run->mmio.is_write = vcpu->mmio_is_write;
13480 if (run->mmio.is_write)
13481 memcpy(run->mmio.data, frag->data, min(8u, frag->len));
13482 run->exit_reason = KVM_EXIT_MMIO;
13516 vcpu->run->mmio.phys_addr = gpa;
13517 vcpu->run->mmio.len = min(8u, frag->len);
13518 vcpu->run->mmio.is_write = 1;
13519 memcpy(vcpu->run->mmio.data, frag->data, min(8u, frag->len));
13520 vcpu->run->exit_reason = KVM_EXIT_MMIO;
13555 vcpu->run->mmio.phys_addr = gpa;
13556 vcpu->run->mmio.len = min(8u, frag->len);
13557 vcpu->run->mmio.is_write = 0;
13558 vcpu->run->exit_reason = KVM_EXIT_MMIO;