From patchwork Thu Jun 16 14:06:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corneliu ZUZU X-Patchwork-Id: 9181003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E366960760 for ; Thu, 16 Jun 2016 14:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3022280B0 for ; Thu, 16 Jun 2016 14:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C723128357; Thu, 16 Jun 2016 14:08:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CAD18280B0 for ; Thu, 16 Jun 2016 14:08:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDXwN-00042G-C2; Thu, 16 Jun 2016 14:06:39 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDXwM-000423-NE for xen-devel@lists.xen.org; Thu, 16 Jun 2016 14:06:38 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id CF/F1-09256-E62B2675; Thu, 16 Jun 2016 14:06:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsUSfTxjoW7upqR wg2MNshZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8aj60eYCuZZVbT982pgPKffxcjJISTgIfFu 5x7GLkYuIHsto8SpQx+YIBInGSUOH+CBKdpy4yBUfDWjxNd2NhCbTUBb4tyhe2BxEQFpiWufL 4MNYhb4yShxvvcQcxcjB4ewgK7E7ZnlIDUsAqoSJ5asYAexeQVcJJp6L4GVSAjISSy4kA4S5h RwlfiwdyIbSFgIqKTrYCRIWEIgR+LzxC6oaimJ/61KIIskBJawSKx4MIUFokZG4tHEm2wTGIU WMDKsYlQvTi0qSy3SNdZLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgMPwYg2MHY 8c/pEKMkB5OSKG99fVK4EF9SfkplRmJxRnxRaU5q8SFGGQ4OJQlet41AOcGi1PTUirTMHGAkw KQlOHiURHj5QdK8xQWJucWZ6RCpU4yKUuK8/zYAJQRAEhmleXBtsOi7xCgrJczLCHSIEE9Bal FuZgmq/CtGcQ5GJWFeHpDxPJl5JXDTXwEtZgJabDM9HmRxSSJCSqoBqOu+kuWbYqetDM4FYW3 iPqzp+Xe1DrBGJoqzf3ogk7A4/Ud+fo+fnmrN76r9O/+c/Vb7uVtI0f/lfVlb3YAjYs9T459+ bCq44Z58/B7j9aRImYm/G/u5r/O9bbPjqL05yVO12kFwVfeL8t2zph+NqLZ53alutmLzzNciN cGTjb+yhLg1XFNiKc5INNRiLipOBADG3xqsuQIAAA== X-Env-Sender: czuzu@bitdefender.com X-Msg-Ref: server-13.tower-21.messagelabs.com!1466085996!19414931!1 X-Originating-IP: [91.199.104.161] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 56538 invoked from network); 16 Jun 2016 14:06:37 -0000 Received: from mx01.bbu.dsd.mx.bitdefender.com (HELO mx01.bbu.dsd.mx.bitdefender.com) (91.199.104.161) by server-13.tower-21.messagelabs.com with DHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 16 Jun 2016 14:06:37 -0000 Received: (qmail 19601 invoked from network); 16 Jun 2016 17:06:36 +0300 Received: from unknown (HELO mx-sr.buh.bitdefender.com) (10.17.80.103) by mx01.bbu.dsd.mx.bitdefender.com with AES256-GCM-SHA384 encrypted SMTP; 16 Jun 2016 17:06:36 +0300 Received: from smtp01.buh.bitdefender.com (unknown [10.17.80.75]) by mx-sr.buh.bitdefender.com (Postfix) with ESMTP id 66C207FC36 for ; Thu, 16 Jun 2016 17:06:36 +0300 (EEST) Received: (qmail 28447 invoked from network); 16 Jun 2016 17:06:36 +0300 Received: from unknown (HELO czuzu-dev-vm.clj.bitdefender.biz) (czuzu@bitdefender.com@91.199.104.243) by smtp01.buh.bitdefender.com with SMTP; 16 Jun 2016 17:06:36 +0300 From: Corneliu ZUZU To: xen-devel@lists.xen.org Date: Thu, 16 Jun 2016 17:06:38 +0300 Message-Id: <1466085998-7473-1-git-send-email-czuzu@bitdefender.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1466085888-7428-1-git-send-email-czuzu@bitdefender.com> References: <1466085888-7428-1-git-send-email-czuzu@bitdefender.com> X-BitDefender-Scanner: Clean, Agent: BitDefender qmail 3.1.6 on smtp01.buh.bitdefender.com, sigver: 7.65934 X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: Build: [Engines: 2.15.6.911, Dats: 424498, Stamp: 3], Multi: [Enabled, t: (0.000010, 0.007325)], BW: [Enabled, t: (0.000008,0.000001)], RBL DNSBL: [Disabled], APM: [Enabled, Score: 500, t: (0.005159), Flags: BB9BAF5C; NN_NO_CONTENT_TYPE; NN_LEGIT_SUMM_400_WORDS; NN_NO_LINK_NMD; NN_LEGIT_BITDEFENDER; NN_LEGIT_S_SQARE_BRACKETS; NN_LEGIT_MAILING_LIST_TO], SGN: [Enabled, t: (0.014624)], URL: [Enabled, t: (0.000005)], RTDA: [Enabled, t: (0.021859), Hit: No, Details: v2.4.2; Id: 2m1ghic.1akqq6llh.pngg], total: 0(775) X-BitDefender-CF-Stamp: none Cc: Stefano Stabellini , Razvan Cojocaru , Andrew Cooper , Julien Grall , Tamas K Lengyel , Jan Beulich Subject: [Xen-devel] [PATCH 1/7] minor (formatting) fixes X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Minor fixes: - fix 80-columns formatting in some places - remove some empty lines - remove some unused includes - add 2 comments Signed-off-by: Corneliu ZUZU --- xen/arch/arm/domain.c | 1 - xen/arch/arm/traps.c | 1 - xen/arch/x86/hvm/event.c | 1 + xen/common/monitor.c | 1 - xen/include/asm-arm/vm_event.h | 12 ++++++------ xen/include/asm-x86/hvm/event.h | 2 -- xen/include/asm-x86/monitor.h | 3 --- xen/include/asm-x86/vm_event.h | 3 +++ xen/include/public/vm_event.h | 36 ++++++++++++++++++------------------ xen/include/xen/vm_event.h | 1 - 10 files changed, 28 insertions(+), 33 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 1365b4a..d31f821 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -274,7 +274,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 aa3e3c2..7fa2ae5 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/event.c b/xen/arch/x86/hvm/event.c index 56c5514..9c51890 100644 --- a/xen/arch/x86/hvm/event.c +++ b/xen/arch/x86/hvm/event.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/xen/common/monitor.c b/xen/common/monitor.c index d950a7c..b30857a 100644 --- a/xen/common/monitor.c +++ b/xen/common/monitor.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h index 014d9ba..05c3027 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. */ } @@ -59,6 +56,9 @@ static inline void vm_event_fill_regs(vm_event_request_t *req) /* Not supported on ARM. */ } +/* + * Monitor vm-events. + */ static inline uint32_t vm_event_monitor_get_capabilities(struct domain *d) { uint32_t capabilities = 0; diff --git a/xen/include/asm-x86/hvm/event.h b/xen/include/asm-x86/hvm/event.h index 03f7fee..504bd66 100644 --- a/xen/include/asm-x86/hvm/event.h +++ b/xen/include/asm-x86/hvm/event.h @@ -19,8 +19,6 @@ #ifndef __ASM_X86_HVM_EVENT_H__ #define __ASM_X86_HVM_EVENT_H__ -#include -#include #include enum hvm_event_breakpoint_type diff --git a/xen/include/asm-x86/monitor.h b/xen/include/asm-x86/monitor.h index d367099..7a662f9 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 0470240..df8e98d 100644 --- a/xen/include/asm-x86/vm_event.h +++ b/xen/include/asm-x86/vm_event.h @@ -44,6 +44,9 @@ void vm_event_set_registers(struct vcpu *v, vm_event_response_t *rsp); void vm_event_fill_regs(vm_event_request_t *req); +/* + * Monitor vm-events. + */ static inline uint32_t vm_event_monitor_get_capabilities(struct domain *d) { uint32_t capabilities = 0; diff --git a/xen/include/public/vm_event.h b/xen/include/public/vm_event.h index 9270d52..586f43b 100644 --- a/xen/include/public/vm_event.h +++ b/xen/include/public/vm_event.h @@ -74,19 +74,19 @@ * 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. - */ +/* + * Deny completion of the operation that triggered the event. + * Currently only useful for MSR and control-register write events. + */ #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) /* @@ -177,16 +177,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 beda9fe..a10ee40 100644 --- a/xen/include/xen/vm_event.h +++ b/xen/include/xen/vm_event.h @@ -85,7 +85,6 @@ void vm_event_monitor_guest_request(void); #endif /* __VM_EVENT_H__ */ - /* * Local variables: * mode: C