From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 2/3] xenoprof: fix up ability to disable it Date: Wed, 17 Feb 2016 14:55:08 +0000 Message-ID: <56C489CC.7070704@citrix.com> References: <1455719856-20465-1-git-send-email-cardoe@cardoe.com> <1455719856-20465-3-git-send-email-cardoe@cardoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1455719856-20465-3-git-send-email-cardoe@cardoe.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Doug Goldstein , xen-devel@lists.xen.org Cc: Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 17/02/16 14:37, Doug Goldstein wrote: > diff --git a/xen/include/asm-x86/xenoprof.h b/xen/include/asm-x86/xenoprof.h > index b006ddc..c78e8cf 100644 > --- a/xen/include/asm-x86/xenoprof.h > +++ b/xen/include/asm-x86/xenoprof.h > @@ -67,9 +67,33 @@ void xenoprof_backtrace(struct vcpu *, const struct cpu_user_regs *, > "xenoprof/x86 with autotranslated mode enabled" \ > "isn't supported yet\n"); \ > } while (0) > + > +#ifdef CONFIG_XENOPROF > int passive_domain_do_rdmsr(unsigned int msr, uint64_t *msr_content); > int passive_domain_do_wrmsr(unsigned int msr, uint64_t msr_content); > void passive_domain_destroy(struct vcpu *v); > +#else > +static inline int passive_domain_do_rdmsr(unsigned int msr, > + uint64_t *msr_content) > +{ > + (void)msr; > + (void)msr_content; You don't need these inside a static inline. The callsite of the static inline will cause the parameters to be evaluated. They are needed for macros, as macros end up being a transformation of the text at the callsite itself. ~Andrew > + return 0; > +} > + > +static inline int passive_domain_do_wrmsr(unsigned int msr, > + uint64_t *msr_content) > +{ > + (void)msr; > + (void)msr_content; > + return 0; > +} > + > +static inline void passive_domain_destroy(struct vcpu *v) > +{ > + (void)v; > +} > +#endif > > #endif /* __ASM_X86_XENOPROF_H__ */ >