@@ -294,7 +294,6 @@ static void continue_new_vcpu(struct vcpu *prev)
else
/* check_wakeup_from_wait(); */
reset_stack_and_jump(return_to_new_vcpu64);
-
}
void context_switch(struct vcpu *prev, struct vcpu *next)
@@ -439,7 +439,6 @@ static void inject_abt32_exception(struct cpu_user_regs *regs,
far |= addr << 32;
WRITE_SYSREG(far, FAR_EL1);
WRITE_SYSREG(fsr, IFSR32_EL2);
-
#endif
}
else
@@ -31,7 +31,6 @@
#include <xen/hypercall.h>
#include <xen/guest_access.h>
#include <xen/event.h>
-#include <xen/paging.h>
#include <xen/cpu.h>
#include <xen/wait.h>
#include <xen/mem_access.h>
@@ -63,11 +62,9 @@
#include <asm/hvm/nestedhvm.h>
#include <asm/hvm/monitor.h>
#include <asm/hvm/ioreq.h>
-#include <asm/hvm/vmx/vmx.h>
#include <asm/altp2m.h>
#include <asm/mtrr.h>
#include <asm/apic.h>
-#include <asm/vm_event.h>
#include <public/sched.h>
#include <public/hvm/ioreq.h>
#include <public/version.h>
@@ -34,7 +34,6 @@
#include <asm/guest_access.h>
#include <asm/debugreg.h>
#include <asm/msr.h>
-#include <asm/paging.h>
#include <asm/p2m.h>
#include <asm/mem_sharing.h>
#include <asm/hvm/emulate.h>
@@ -57,7 +56,6 @@
#include <asm/hvm/nestedhvm.h>
#include <asm/altp2m.h>
#include <asm/event.h>
-#include <asm/monitor.h>
#include <public/arch-x86/cpuid.h>
static bool_t __initdata opt_force_ept;
@@ -22,7 +22,6 @@
#include <asm/monitor.h>
#include <asm/paging.h>
#include <asm/hvm/vmx/vmx.h>
-#include <asm/vm_event.h>
#include <public/vm_event.h>
int arch_monitor_init_domain(struct domain *d)
@@ -18,9 +18,6 @@
* License along with this program; If not, see <http://www.gnu.org/licenses/>.
*/
-#include <xen/sched.h>
-#include <asm/hvm/hvm.h>
-#include <asm/monitor.h>
#include <asm/vm_event.h>
/* Implicitly serialized by the domctl lock. */
@@ -23,7 +23,6 @@
#include <xen/sched.h>
#include <xen/vm_event.h>
#include <xsm/xsm.h>
-#include <public/domctl.h>
#include <asm/monitor.h>
int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
@@ -770,8 +770,10 @@ void vm_event_vcpu_unpause(struct vcpu *v)
{
int old, new, prev = v->vm_event_pause_count.counter;
- /* All unpause requests as a result of toolstack responses. Prevent
- * underflow of the vcpu pause count. */
+ /*
+ * All unpause requests as a result of toolstack responses.
+ * Prevent underflow of the vcpu pause count.
+ */
do
{
old = prev;
@@ -23,21 +23,18 @@
#include <xen/vm_event.h>
#include <public/domctl.h>
-static inline
-int vm_event_init_domain(struct domain *d)
+static inline int vm_event_init_domain(struct domain *d)
{
/* Nothing to do. */
return 0;
}
-static inline
-void vm_event_cleanup_domain(struct domain *d)
+static inline void vm_event_cleanup_domain(struct domain *d)
{
memset(&d->monitor, 0, sizeof(d->monitor));
}
-static inline
-void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v)
+static inline void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v)
{
/* Not supported on ARM. */
}
@@ -19,7 +19,6 @@
#ifndef __ASM_X86_HVM_MONITOR_H__
#define __ASM_X86_HVM_MONITOR_H__
-#include <xen/sched.h>
#include <xen/paging.h>
#include <public/vm_event.h>
@@ -23,9 +23,6 @@
#define __ASM_X86_MONITOR_H__
#include <xen/sched.h>
-#include <public/domctl.h>
-#include <asm/cpufeature.h>
-#include <asm/hvm/hvm.h>
#define monitor_ctrlreg_bitmask(ctrlreg_index) (1U << (ctrlreg_index))
@@ -20,7 +20,6 @@
#define __ASM_X86_VM_EVENT_H__
#include <xen/sched.h>
-#include <xen/vm_event.h>
int vm_event_init_domain(struct domain *d);
@@ -74,20 +74,20 @@
* VM_EVENT_FLAG_SET_EMUL_READ_DATA are set, only the latter will be honored).
*/
#define VM_EVENT_FLAG_SET_EMUL_READ_DATA (1 << 5)
- /*
- * Deny completion of the operation that triggered the event.
- * Currently only useful for MSR, CR0, CR3 and CR4 write events.
- * Requires the vCPU to be paused already (synchronous events only).
- */
+/*
+ * Deny completion of the operation that triggered the event.
+ * Currently only useful for MSR and control-register write events.
+ * Requires the vCPU to be paused already (synchronous events only).
+ */
#define VM_EVENT_FLAG_DENY (1 << 6)
/*
* This flag can be set in a request or a response
*
- * On a request, indicates that the event occurred in the alternate p2m specified by
- * the altp2m_idx request field.
+ * On a request, indicates that the event occurred in the alternate p2m
+ * specified by the altp2m_idx request field.
*
- * On a response, indicates that the VCPU should resume in the alternate p2m specified
- * by the altp2m_idx response field if possible.
+ * On a response, indicates that the VCPU should resume in the alternate p2m
+ * specified by the altp2m_idx response field if possible.
*/
#define VM_EVENT_FLAG_ALTERNATE_P2M (1 << 7)
/*
@@ -178,16 +178,16 @@ struct vm_event_regs_x86 {
* FAULT_WITH_GLA: If the violation was triggered by accessing gla
* FAULT_IN_GPT: If the violation was triggered during translating gla
*/
-#define MEM_ACCESS_R (1 << 0)
-#define MEM_ACCESS_W (1 << 1)
-#define MEM_ACCESS_X (1 << 2)
-#define MEM_ACCESS_RWX (MEM_ACCESS_R | MEM_ACCESS_W | MEM_ACCESS_X)
-#define MEM_ACCESS_RW (MEM_ACCESS_R | MEM_ACCESS_W)
-#define MEM_ACCESS_RX (MEM_ACCESS_R | MEM_ACCESS_X)
-#define MEM_ACCESS_WX (MEM_ACCESS_W | MEM_ACCESS_X)
-#define MEM_ACCESS_GLA_VALID (1 << 3)
-#define MEM_ACCESS_FAULT_WITH_GLA (1 << 4)
-#define MEM_ACCESS_FAULT_IN_GPT (1 << 5)
+#define MEM_ACCESS_R (1 << 0)
+#define MEM_ACCESS_W (1 << 1)
+#define MEM_ACCESS_X (1 << 2)
+#define MEM_ACCESS_RWX (MEM_ACCESS_R | MEM_ACCESS_W | MEM_ACCESS_X)
+#define MEM_ACCESS_RW (MEM_ACCESS_R | MEM_ACCESS_W)
+#define MEM_ACCESS_RX (MEM_ACCESS_R | MEM_ACCESS_X)
+#define MEM_ACCESS_WX (MEM_ACCESS_W | MEM_ACCESS_X)
+#define MEM_ACCESS_GLA_VALID (1 << 3)
+#define MEM_ACCESS_FAULT_WITH_GLA (1 << 4)
+#define MEM_ACCESS_FAULT_IN_GPT (1 << 5)
struct vm_event_mem_access {
uint64_t gfn;
@@ -83,7 +83,6 @@ int vm_event_monitor_traps(struct vcpu *v, uint8_t sync,
#endif /* __VM_EVENT_H__ */
-
/*
* Local variables:
* mode: C
Minor fixes: - remove some empty lines - remove some unused includes - multi-line comment fixes - 80-columns formatting fixes Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com> --- xen/arch/arm/domain.c | 1 - xen/arch/arm/traps.c | 1 - xen/arch/x86/hvm/hvm.c | 3 --- xen/arch/x86/hvm/vmx/vmx.c | 2 -- xen/arch/x86/monitor.c | 1 - xen/arch/x86/vm_event.c | 3 --- xen/common/monitor.c | 1 - xen/common/vm_event.c | 6 ++++-- xen/include/asm-arm/vm_event.h | 9 +++------ xen/include/asm-x86/hvm/monitor.h | 1 - xen/include/asm-x86/monitor.h | 3 --- xen/include/asm-x86/vm_event.h | 1 - xen/include/public/vm_event.h | 38 +++++++++++++++++++------------------- xen/include/xen/vm_event.h | 1 - 14 files changed, 26 insertions(+), 45 deletions(-)