From: Corneliu ZUZU Date: Fri, 8 Jul 2016 07:49:23 +0000 (+0200) Subject: minor fixes (formatting, comments, unused includes etc.) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~822 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5200cead3ec350e9fc0a2991383775bf5dd0624a;p=xen.git minor fixes (formatting, comments, unused includes etc.) Minor fixes: - remove some empty lines - remove some unused includes - multi-line comment fixes - 80-columns formatting fixes Signed-off-by: Corneliu ZUZU Acked-by: Razvan Cojocaru Acked-by: Julien Grall Acked-by: Jan Beulich --- diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 6ce4645898..61fc08e4ea 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -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) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 44926caa80..fb017037bb 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -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 diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index f7e09d2767..7f990870f3 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -63,7 +62,6 @@ #include #include #include -#include #include #include #include diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index df19579bd6..0776d12c41 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c index a5ef750bbb..e938ca3d28 100644 --- a/xen/arch/x86/vm_event.c +++ b/xen/arch/x86/vm_event.c @@ -18,9 +18,6 @@ * License along with this program; If not, see . */ -#include -#include -#include #include /* Implicitly serialized by the domctl lock. */ diff --git a/xen/common/monitor.c b/xen/common/monitor.c index 5fce61ebee..c73d1d5ca9 100644 --- a/xen/common/monitor.c +++ b/xen/common/monitor.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c index b321d4cff5..941345b0c3 100644 --- a/xen/common/vm_event.c +++ b/xen/common/vm_event.c @@ -769,8 +769,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; diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h index a3fc4ce1b4..ccc4b6027e 100644 --- a/xen/include/asm-arm/vm_event.h +++ b/xen/include/asm-arm/vm_event.h @@ -23,21 +23,18 @@ #include #include -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. */ } diff --git a/xen/include/asm-x86/hvm/monitor.h b/xen/include/asm-x86/hvm/monitor.h index 8e1426fb47..1c8ec6c200 100644 --- a/xen/include/asm-x86/hvm/monitor.h +++ b/xen/include/asm-x86/hvm/monitor.h @@ -19,7 +19,6 @@ #ifndef __ASM_X86_HVM_MONITOR_H__ #define __ASM_X86_HVM_MONITOR_H__ -#include #include enum hvm_monitor_debug_type diff --git a/xen/include/asm-x86/monitor.h b/xen/include/asm-x86/monitor.h index a9db3c0c49..0501ca2b5b 100644 --- a/xen/include/asm-x86/monitor.h +++ b/xen/include/asm-x86/monitor.h @@ -23,9 +23,6 @@ #define __ASM_X86_MONITOR_H__ #include -#include -#include -#include #define monitor_ctrlreg_bitmask(ctrlreg_index) (1U << (ctrlreg_index)) diff --git a/xen/include/asm-x86/vm_event.h b/xen/include/asm-x86/vm_event.h index 026f42e477..7e6adffbfa 100644 --- a/xen/include/asm-x86/vm_event.h +++ b/xen/include/asm-x86/vm_event.h @@ -20,7 +20,6 @@ #define __ASM_X86_VM_EVENT_H__ #include -#include /* * Should we emulate the next matching instruction on VCPU resume diff --git a/xen/include/public/vm_event.h b/xen/include/public/vm_event.h index 7bfe6cc4f3..8c29968787 100644 --- a/xen/include/public/vm_event.h +++ b/xen/include/public/vm_event.h @@ -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) /* @@ -180,16 +180,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; diff --git a/xen/include/xen/vm_event.h b/xen/include/xen/vm_event.h index 42bd9f659c..c09f723ba6 100644 --- a/xen/include/xen/vm_event.h +++ b/xen/include/xen/vm_event.h @@ -77,7 +77,6 @@ void vm_event_vcpu_unpause(struct vcpu *v); #endif /* __VM_EVENT_H__ */ - /* * Local variables: * mode: C