[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 2/3] xenoprof: fix up ability to disable it



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__ */
>  

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.