lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230913092646.5b087871@gandalf.local.home>
Date:   Wed, 13 Sep 2023 09:26:46 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Juergen Gross <jgross@...e.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        virtualization@...ts.linux-foundation.org,
        linux-trace-kernel@...r.kernel.org, Ajay Kaher <akaher@...are.com>,
        Alexey Makhalov <amakhalov@...are.com>,
        VMware PV-Drivers Reviewers <pv-drivers@...are.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH 2/3] x86/xen: move paravirt lazy code

On Wed, 13 Sep 2023 13:38:27 +0200
Juergen Gross <jgross@...e.com> wrote:

> diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h
> index 44a3f565264d..0577f0cdd231 100644
> --- a/include/trace/events/xen.h
> +++ b/include/trace/events/xen.h
> @@ -6,26 +6,26 @@
>  #define _TRACE_XEN_H
>  
>  #include <linux/tracepoint.h>
> -#include <asm/paravirt_types.h>
> +#include <asm/xen/hypervisor.h>
>  #include <asm/xen/trace_types.h>
>  
>  struct multicall_entry;
>  
>  /* Multicalls */
>  DECLARE_EVENT_CLASS(xen_mc__batch,
> -	    TP_PROTO(enum paravirt_lazy_mode mode),
> +	    TP_PROTO(enum xen_lazy_mode mode),
>  	    TP_ARGS(mode),
>  	    TP_STRUCT__entry(
> -		    __field(enum paravirt_lazy_mode, mode)
> +		    __field(enum xen_lazy_mode, mode)
>  		    ),
>  	    TP_fast_assign(__entry->mode = mode),
>  	    TP_printk("start batch LAZY_%s",
> -		      (__entry->mode == PARAVIRT_LAZY_MMU) ? "MMU" :
> -		      (__entry->mode == PARAVIRT_LAZY_CPU) ? "CPU" : "NONE")
> +		      (__entry->mode == XEN_LAZY_MMU) ? "MMU" :
> +		      (__entry->mode == XEN_LAZY_CPU) ? "CPU" : "NONE")

There's helper functions that make the above easier to implement as well as
exports the symbols so that user space can parse this better:

TRACE_DEFINE_ENUM(XEN_LAZY_NONE);
TRACE_DEFINE_ENUM(XEN_LAZY_MMU);
TRACE_DEFINE_ENUM(XEN_LAZY_CPU);

[..]

  	    TP_printk("start batch LAZY_%s",
		      __print_symbolic(mode,
				       { XEN_LAZY_NONE, "NONE" },
				       { XEN_LAZY_MMU,  "MMU   },
				       { XEN_LAZY_CPU,  "CPU"  }))

Then user space parsers that read the raw data can convert these events
into something humans can read.

-- Steve

>  	);
>  #define DEFINE_XEN_MC_BATCH(name)			\
>  	DEFINE_EVENT(xen_mc__batch, name,		\
> -		TP_PROTO(enum paravirt_lazy_mode mode),	\
> +		TP_PROTO(enum xen_lazy_mode mode),	\
>  		     TP_ARGS(mode))
>  
>  DEFINE_XEN_MC_BATCH(xen_mc_batch);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ