.mp_state = KVM_MP_STATE_STOPPED,
};
- vcpu_set_mp_state(vm, vcpuid, &mp_state);
+ vcpu_mp_state_set(vm, vcpuid, &mp_state);
}
static struct kvm_vm *setup_vm(void *guest_code)
vcpu_ioctl(vm, vcpu_id, KVM_ENABLE_CAP, &enable_cap);
}
-static inline void vcpu_set_guest_debug(struct kvm_vm *vm, uint32_t vcpuid,
+static inline void vcpu_guest_debug_set(struct kvm_vm *vm, uint32_t vcpuid,
struct kvm_guest_debug *debug)
{
vcpu_ioctl(vm, vcpuid, KVM_SET_GUEST_DEBUG, debug);
}
-static inline void vcpu_set_mp_state(struct kvm_vm *vm, uint32_t vcpuid,
+static inline void vcpu_mp_state_get(struct kvm_vm *vm, uint32_t vcpuid,
+ struct kvm_mp_state *mp_state)
+{
+ vcpu_ioctl(vm, vcpuid, KVM_GET_MP_STATE, mp_state);
+}
+static inline void vcpu_mp_state_set(struct kvm_vm *vm, uint32_t vcpuid,
struct kvm_mp_state *mp_state)
{
vcpu_ioctl(vm, vcpuid, KVM_SET_MP_STATE, mp_state);
/* Setup the MP state */
mp_state.mp_state = 0;
- vcpu_set_mp_state(vm, vcpuid, &mp_state);
+ vcpu_mp_state_set(vm, vcpuid, &mp_state);
}
/*
}
#define CLEAR_DEBUG() memset(&debug, 0, sizeof(debug))
-#define APPLY_DEBUG() vcpu_set_guest_debug(vm, VCPU_ID, &debug)
+#define APPLY_DEBUG() vcpu_guest_debug_set(vm, VCPU_ID, &debug)
#define CAST_TO_RIP(v) ((unsigned long long)&(v))
#define SET_RIP(v) do { \
vcpu_regs_get(vm, VCPU_ID, ®s); \
vcpu_args_set(vm, VCPU_ID, 3, svm_gva, (uint64_t)is_nmi, (uint64_t)idt_alt_vm);
memset(&debug, 0, sizeof(debug));
- vcpu_set_guest_debug(vm, VCPU_ID, &debug);
+ vcpu_guest_debug_set(vm, VCPU_ID, &debug);
struct kvm_run *run = vcpu_state(vm, VCPU_ID);
struct ucall uc;