Coverage Report

Created: 2017-10-25 09:10

/root/src/xen/xen/include/xen/vm_event.h
Line
Count
Source (jump to first uncovered line)
1
/******************************************************************************
2
 * vm_event.h
3
 *
4
 * Common interface for memory event support.
5
 *
6
 * Copyright (c) 2009 Citrix Systems, Inc. (Patrick Colp)
7
 *
8
 * This program is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; either version 2 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
23
#ifndef __VM_EVENT_H__
24
#define __VM_EVENT_H__
25
26
#include <xen/sched.h>
27
#include <public/vm_event.h>
28
29
/* Clean up on domain destruction */
30
void vm_event_cleanup(struct domain *d);
31
32
/* Returns whether a ring has been set up */
33
bool_t vm_event_check_ring(struct vm_event_domain *ved);
34
35
/* Returns 0 on success, -ENOSYS if there is no ring, -EBUSY if there is no
36
 * available space and the caller is a foreign domain. If the guest itself
37
 * is the caller, -EBUSY is avoided by sleeping on a wait queue to ensure
38
 * that the ring does not lose future events.
39
 *
40
 * However, the allow_sleep flag can be set to false in cases in which it is ok
41
 * to lose future events, and thus -EBUSY can be returned to guest vcpus
42
 * (handle with care!).
43
 *
44
 * In general, you must follow a claim_slot() call with either put_request() or
45
 * cancel_slot(), both of which are guaranteed to
46
 * succeed.
47
 */
48
int __vm_event_claim_slot(struct domain *d, struct vm_event_domain *ved,
49
                          bool_t allow_sleep);
50
static inline int vm_event_claim_slot(struct domain *d,
51
                                      struct vm_event_domain *ved)
52
0
{
53
0
    return __vm_event_claim_slot(d, ved, 1);
54
0
}
Unexecuted instantiation: domctl.c:vm_event_claim_slot
Unexecuted instantiation: domain.c:vm_event_claim_slot
Unexecuted instantiation: mem_access.c:vm_event_claim_slot
Unexecuted instantiation: monitor.c:vm_event_claim_slot
Unexecuted instantiation: vm_event.c:vm_event_claim_slot
Unexecuted instantiation: pci.c:vm_event_claim_slot
Unexecuted instantiation: emulate.c:vm_event_claim_slot
Unexecuted instantiation: vmcs.c:vm_event_claim_slot
Unexecuted instantiation: p2m.c:vm_event_claim_slot
Unexecuted instantiation: p2m-pt.c:vm_event_claim_slot
Unexecuted instantiation: mem_paging.c:vm_event_claim_slot
Unexecuted instantiation: mem_sharing.c:vm_event_claim_slot
Unexecuted instantiation: nested_hap.c:vm_event_claim_slot
Unexecuted instantiation: nested_ept.c:vm_event_claim_slot
55
56
static inline int vm_event_claim_slot_nosleep(struct domain *d,
57
                                              struct vm_event_domain *ved)
58
0
{
59
0
    return __vm_event_claim_slot(d, ved, 0);
60
0
}
Unexecuted instantiation: domctl.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: domain.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: mem_access.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: monitor.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: vm_event.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: pci.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: emulate.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: vmcs.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: p2m.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: p2m-pt.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: mem_paging.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: mem_sharing.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: nested_hap.c:vm_event_claim_slot_nosleep
Unexecuted instantiation: nested_ept.c:vm_event_claim_slot_nosleep
61
62
void vm_event_cancel_slot(struct domain *d, struct vm_event_domain *ved);
63
64
void vm_event_put_request(struct domain *d, struct vm_event_domain *ved,
65
                          vm_event_request_t *req);
66
67
int vm_event_get_response(struct domain *d, struct vm_event_domain *ved,
68
                          vm_event_response_t *rsp);
69
70
void vm_event_resume(struct domain *d, struct vm_event_domain *ved);
71
72
int vm_event_domctl(struct domain *d, struct xen_domctl_vm_event_op *vec,
73
                    XEN_GUEST_HANDLE_PARAM(void) u_domctl);
74
75
void vm_event_vcpu_pause(struct vcpu *v);
76
void vm_event_vcpu_unpause(struct vcpu *v);
77
78
void vm_event_fill_regs(vm_event_request_t *req);
79
void vm_event_set_registers(struct vcpu *v, vm_event_response_t *rsp);
80
81
void vm_event_monitor_next_interrupt(struct vcpu *v);
82
83
#endif /* __VM_EVENT_H__ */
84
85
/*
86
 * Local variables:
87
 * mode: C
88
 * c-file-style: "BSD"
89
 * c-basic-offset: 4
90
 * indent-tabs-mode: nil
91
 * End:
92
 */