[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RESEND v1 1/7] x86: add a flag to enable Intel processor trace
On Tue, Jan 16, 2018 at 02:12:27AM +0800, Luwei Kang wrote: > This patch add a flag to enable Intel PT (Intel processor trace). > Default value is 1 (enabled). > > Signed-off-by: Luwei Kang <luwei.kang@xxxxxxxxx> > --- > docs/misc/xen-command-line.markdown | 7 +++++++ > xen/arch/x86/cpu/Makefile | 1 + > xen/arch/x86/cpu/intel_pt.c | 27 +++++++++++++++++++++++++++ > xen/include/asm-x86/intel_pt.h | 26 ++++++++++++++++++++++++++ > 4 files changed, 61 insertions(+) > create mode 100644 xen/arch/x86/cpu/intel_pt.c > create mode 100644 xen/include/asm-x86/intel_pt.h > > diff --git a/docs/misc/xen-command-line.markdown > b/docs/misc/xen-command-line.markdown > index 781110d..95411cf 100644 > --- a/docs/misc/xen-command-line.markdown > +++ b/docs/misc/xen-command-line.markdown > @@ -1009,6 +1009,13 @@ debug hypervisor only). > ### idle\_latency\_factor > > `= <integer>` > > +### intel\_pt > +> `= <boolean>` > + > +> Default: `true` > + > +Flag to enable Intel Processor Trace. > + > ### ioapic\_ack > > `= old | new` > No document for this option? > diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile > index 74f23ae..33d7a74 100644 > --- a/xen/arch/x86/cpu/Makefile > +++ b/xen/arch/x86/cpu/Makefile > @@ -8,3 +8,4 @@ obj-y += intel.o > obj-y += intel_cacheinfo.o > obj-y += mwait-idle.o > obj-y += vpmu.o vpmu_amd.o vpmu_intel.o > +obj-y += intel_pt.o Move this after intel_cacheinfo please. We order things alphabetically. > diff --git a/xen/arch/x86/cpu/intel_pt.c b/xen/arch/x86/cpu/intel_pt.c > new file mode 100644 > index 0000000..520e0ca > --- /dev/null > +++ b/xen/arch/x86/cpu/intel_pt.c > @@ -0,0 +1,27 @@ > +/* > + * intel_pt.c: Support Intel Processor Trace Virtualization. > + * > + * Copyright (c) 2018, Intel Corporation. > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * You should have received a copy of the GNU General Public License along > with > + * this program; If not, see <http://www.gnu.org/licenses/>. > + * > + * Author: Luwei Kang <luwei.kang@xxxxxxxxx> > + */ > + > +#include <xen/types.h> > +#include <xen/cache.h> > +#include <xen/init.h> Please order the headers alphabetically. > + > +/* intel_pt: Flag to enable Intel Processor Trace (default on). */ > +bool_t __read_mostly opt_intel_pt = 1; Use plain bool and true please. > +boolean_param("intel_pt", opt_intel_pt); > diff --git a/xen/include/asm-x86/intel_pt.h b/xen/include/asm-x86/intel_pt.h > new file mode 100644 > index 0000000..2a8b579 > --- /dev/null > +++ b/xen/include/asm-x86/intel_pt.h > @@ -0,0 +1,26 @@ > +/* > + * intel_pt.h: Intel Processor Trace virtualization for HVM domain. > + * > + * Copyright (c) 2018, Intel Corporation. > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * You should have received a copy of the GNU General Public License along > with > + * this program; If not, see <http://www.gnu.org/licenses/>. > + * > + * Author: Luwei Kang <luwei.kang@xxxxxxxxx> > + */ > + > +#ifndef __ASM_X86_HVM_INTEL_PT_H_ > +#define __ASM_X86_HVM_INTEL_PT_H_ > + > +extern bool_t opt_intel_pt; > + > +#endif /* __ASM_X86_HVM_INTEL_PT_H_ */ > -- > 1.8.3.1 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |