Displaying 3 results from an estimated 3 matches for "cmd_vm_check_ev".
2020 Jul 21
0
[PATCH v9 44/84] KVM: introspection: add KVMI_EVENT_UNHOOK
...2 allow,
"KVM_INTROSPECTION_EVENT");
}
+static void disallow_event(struct kvm_vm *vm, __s32 event_id)
+{
+ set_event_perm(vm, event_id, 0, 0);
+}
+
static void allow_event(struct kvm_vm *vm, __s32 event_id)
{
set_event_perm(vm, event_id, 1, 0);
@@ -300,13 +305,20 @@ static void cmd_vm_check_event(__u16 id, __u16 padding, int expected_err)
-r, kvm_strerror(-r), expected_err);
}
-static void test_cmd_vm_check_event(void)
+static void test_cmd_vm_check_event(struct kvm_vm *vm)
{
- __u16 invalid_id = 0xffff;
+ __u16 valid_id = KVMI_EVENT_UNHOOK, invalid_id = 0xffff;
__u16 padding =...
2020 Jul 21
0
[PATCH v9 42/84] KVM: introspection: add KVMI_VM_CHECK_COMMAND and KVMI_VM_CHECK_EVENT
...k_command(void)
+{
+ __u16 valid_id = KVMI_GET_VERSION, invalid_id = 0xffff;
+ __u16 padding = 1, no_padding = 0;
+
+ cmd_vm_check_command(valid_id, no_padding, 0);
+ cmd_vm_check_command(valid_id, padding, -KVM_EINVAL);
+ cmd_vm_check_command(invalid_id, no_padding, -KVM_ENOENT);
+}
+
+static void cmd_vm_check_event(__u16 id, __u16 padding, int expected_err)
+{
+ struct {
+ struct kvmi_msg_hdr hdr;
+ struct kvmi_vm_check_event cmd;
+ } req = {};
+ int r;
+
+ req.cmd.id = id;
+ req.cmd.padding1 = padding;
+ req.cmd.padding2 = padding;
+
+ r = do_command(KVMI_VM_CHECK_EVENT, &req.hdr, sizeof(req), NULL,...
2020 Jul 21
87
[PATCH v9 00/84] VM introspection
The KVM introspection subsystem provides a facility for applications
running on the host or in a separate VM, to control the execution of
other VMs (pause, resume, shutdown), query the state of the vCPUs (GPRs,
MSRs etc.), alter the page access bits in the shadow page tables (only
for the hardware backed ones, eg. Intel's EPT) and receive notifications
when events of interest have taken place