aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/oprofile
Commit message (Collapse)AuthorAgeFilesLines
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-211-1/+1
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* x86: Add Xenoprofile support for AMD Family16hSuravee Suthikulpanit2013-02-121-0/+4
| | | | | | | | | Add Xenoprofile support for AMD Family16h. The corresponded OProfile patch has already been submitted to OProfile mailing list. (http://marc.info/?l=oprofile-list&m=136036136017302&w=2 ). Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/oprofile: adjust CPU specific initializationJan Beulich2012-12-101-30/+1
| | | | | | | | | | Drop support for 32-bit only CPU models as well as those that can be dealt with by the arch_perfmon bits. Models 14 and 15 remain as questionable (I'm not 100% positive that these don't support 64-bit mode). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: more XEN_GUEST_HANDLE_PARAM substitutionsStefano Stabellini2012-10-171-1/+4
| | | | | | | | | | More substitutions in this patch, not as obvious as the ones in the previous patch. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen: replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when appropriateStefano Stabellini2012-10-171-3/+3
| | | | | | | | | | | | Note: these changes don't make any difference on x86. Replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when it is used as an hypercall argument. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86/oprof: adjust off-by-one counter range checksJan Beulich2012-10-171-2/+2
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/xenoprof: fix kernel/user mode detection for HVMJacob Shin2012-10-151-6/+16
| | | | | | | | | | | | | | | While trying oprofile under Xen, I noticed that HVM passive domain's kernel addresses were showing up as user application. It turns out under HVM get_cpu_user_regs()->cs contains 0x0000beef. Signed-off-by: Jacob Shin <jacob.shin@amd.com> Don't cast away const-ness. Use SS instead of CS to determine ring. Special-case real and protected mode. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* printk: prefer %#x et at over 0x%xJan Beulich2012-09-212-5/+4
| | | | | | | | | Performance is not an issue with printk(), so let the function do minimally more work and instead save a byte per affected format specifier. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: Remove CONFIG_COMPAT ifdef'ery from arch/x86 -- it is always defined.Keir Fraser2012-09-121-4/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* xen: Remove x86_32 build target.Keir Fraser2012-09-122-24/+4
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86: explicitly mark __initdata variables as used when building with clang.Tim Deegan2012-04-111-1/+1
| | | | | | | | | | | | This stops LLVM from replacing it with a different, auto-generated variable as part of an optimization. (The auto-generated variable ends up in the normal data section.) Remove stray __read_mostly annotations on declarations that this unmasked. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* oprofile: don't pass around redundant, easily derived argumentsJan Beulich2012-03-082-18/+17
| | | | | | | | | | | Passing both a struct vcpu pointer and the corresponding struct domain one is simply pointless, especially when intermediate functions just forward it without themselves making use of the already obtained value. Also constify a few function parameters. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/xenoprof: fix 32-bit guest stack handling after c/s 24537:3c0a533d3af0Jan Beulich2012-03-061-17/+24
| | | | | | | | | | | | 32-bit guests don't have 64-bit precudrure return addresses - both elements of struct frame_head_32bit should be 32 bits wide, not just the frame link pointer. Further, consolidate the whole handling here (also in the native size guest case) to properly use guest handles and guest memory accessors. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* replace bogus gdprintk() uses with {,d}printk()Jan Beulich2012-02-161-4/+4
| | | | | | | | | | | When the subject domain is not the current one (e.g. during domctl or HVM save/restore handling), use of gdprintk() is questionable at best, as it won't give the intended information on what domain is affected. Use plain printk() or dprintk() instead, but keep things (mostly) as guest messages by using XENLOG_G_*. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* CONFIG: remove CONFIG_SMP #ifdefsAndrew Cooper2012-02-092-17/+2
| | | | | | | | CONFIG_SMP is always enabled and !CONFIG_SMP is not supported. So simplify the code a little by removing all #ifdefs. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* vpmu: Rename PASSIVE_DOMAIN_ALLOCATEDDietmar Hahn2012-02-092-6/+7
| | | | | | | | This patch renames the define PASSIVE_DOMAIN_ALLOCATED to follow the same scheme of the other defines. Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> Committed-by: Keir Fraser <keir@xen.org>
* vpmu: Remove unnecessary spaces at the end of linesDietmar Hahn2012-02-092-34/+34
| | | | | Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> Committed-by: Keir Fraser <keir@xen.org>
* vpmu: Use macros to access struct vpmu_struct.flagsDietmar Hahn2012-02-092-7/+7
| | | | | | | | | | This patch introduces some macros realising the access to the item 'flags' in the struct vpmu_struct (see xen/include/asm-x86/hvm/vpmu.h). Only bits within 'flags' are set/reset/checked. Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> Committed-by: Keir Fraser <keir@xen.org>
* xenoprof: Handle 32-bit guest stacks properly in a 64-bit hypervisorGeorge Dunlap2012-01-231-7/+41
| | | | | | | | | | | | | The dump_guest_backtrace() function attempted to walk the stack based on the assumption that the guest and hypervisor pointer sizes were the same; thus any 32-bit guest running under 64-bit hypervisor would have unreliable results. In 64-bit mode, read the 32-bit stack frame properly. Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* xenoprof: Adjust indentationGeorge Dunlap2012-01-231-44/+44
| | | | | | | | | Bring indentation into Xen hypervisor standard coding style. No functional changes. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* remove the use of -Wno-unused-valueJan Beulich2011-12-131-1/+1
| | | | | | | | It has been hiding actual mistakes, and there are not too many changes necessary to make things build without suppressing this warning. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* allocate CPU sibling and core maps dynamicallyJan Beulich2011-10-211-1/+1
| | | | | | | | | | ... thus reducing the per-CPU data area size back to one page even when building for large NR_CPUS. At once eliminate the old __cpu{mask,list}_scnprintf() helpers. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* introduce and use nr_cpu_ids and nr_cpumask_bitsJan Beulich2011-10-211-1/+1
| | | | | | | | | | | | | | | The former is the runtime equivalent of NR_CPUS (and users of NR_CPUS, where necessary, get adjusted accordingly), while the latter is for the sole use of determining the allocation size when dynamically allocating CPU masks (done later in this series). Adjust accessors to use either of the two to bound their bitmap operations - which one gets used depends on whether accessing the bits in the gap between nr_cpu_ids and nr_cpumask_bits is benign but more efficient. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* use xzalloc in x86 codeJan Beulich2011-10-041-2/+1
| | | | | | | This includes the removal of a redundant memset() from microcode_amd.c. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* PCI multi-seg: config space accessor adjustmentsJan Beulich2011-09-221-3/+3
| | | | Signed-off-by: Jan Beulich <jbeulich@suse.com>
* xen: remove more declarations from C files.Tim Deegan2011-05-273-2/+4
| | | | | | | | | | This patch moves some more, mostly data, extern declarations into header files. I haven't been as strict as I was with functions; in particular there are a number of declarations of assembler labels that are only used in one place. I've also left a few compat-mode tricks, and all the magic in symbols.c Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* xen: Include headers that are actually needed, drop everything else.Christoph Egger2011-05-204-5/+7
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenoprof: Add support for AMD Family 15h processorsJacob Shin2011-05-093-14/+52
| | | | | | | | | | | | | AMD Family 15h CPU mirrors legacy K7 performance monitor counters to a new location, and adds 2 new counters. This patch updates xenoprof to take advantage of the new counters. Signed-off-by: Jacob Shin <jacob.shin@amd.com> Rename fam15h -> amd_fam15h in a few places, as suggested by Jan Beulich. Signed-off-by: Keir Fraser <keir@xen.org>
* xenoprof: Update cpu_type to sync with upstream oprofileJacob Shin2011-05-091-4/+4
| | | | | | | Update xenoprof's cpu_type to match upstream oprofile. Currently AMD Family 11h ~ Family 15h are broken due to string mismatches. Signed-off-by: Jacob Shin <jacob.shin@amd.com>
* x86: clean up AMD Fam10 xenoprof IBS codeKeir Fraser2010-11-042-29/+24
| | | | | | | | Arrange for (almost) no code to be generated for x86-32, where the functionality is disabled anyway. Properly __init-annotate the code. Remove some pointless bits. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xenoprofile: Disable IBS on x86_32Keir Fraser2010-08-061-0/+4
| | | | | | | | Extended PCI configuration space is not accessible on 32 bit systems. This patch disables IBS feature on 32 bit to avoid IBSCTL(0x1cc) accesses. Signed-off-by: Wei Wang <wei.wang2@amd.com>
* xenoprofile: Add IBS supportKeir Fraser2010-08-024-0/+375
| | | | | | | | | Add IBS support for AMD family 10h processors. The major implementation is derived from latest Linux. Two hypercalls are added, which is necessary for IBS feature detection and user mode parameter read. Signed-off-by: Wei Wang <wei.wang2@amd.com>
* x86 oprofile: use rdmsrl/wrmsrlKeir Fraser2010-06-293-140/+140
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* x86: use rdmsrl/wrmsrlKeir Fraser2010-06-242-18/+5
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* x86 hvm: msr-handling cleanupKeir Fraser2010-06-101-12/+7
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Add MSR support for various feature AMD processor families.Keir Fraser2010-05-151-0/+12
| | | | Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
* Remove many uses of cpu_possible_map and iterators over NR_CPUS.Keir Fraser2010-05-141-4/+1
| | | | | | | The significant remaining culprits for x86 are credit2, hpet, and percpu-area subsystems. To be dealt with in a separate patch. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* VPMU: Migrate vpmu files into public foldersKeir Fraser2010-05-131-1/+1
| | | | Signed-off-by: Wei Wang <wei.wang2@amd.com>
* Miscellaneous data placement adjustmentsKeir Fraser2009-10-283-5/+5
| | | | | | | Make various data items const or __read_mostly where possible/reasonable. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Scattered code arrangement cleanups.Keir Fraser2009-10-074-19/+0
| | | | | | | | - remove redundant declarations - add/move prototypes to headers - move things where they belong to Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenoprof: force use of architectural perfmon instead of the CPUKeir Fraser2009-09-151-0/+15
| | | | | | | | specific event set, which may be not supported by oprofile user space tool yet. Signed-off-by: Yang Zhang <yang.zhang@intel.com> Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
* xenoprof: support Intel's architectural perfmon registers.Keir Fraser2009-09-153-48/+134
| | | | | | | One benefit is that more perfmon counters can be used on Nehalem. Signed-off-by: Yang Zhang <yang.zhang@intel.com> Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
* xenoprof: add support for Core i7 and Atom.Keir Fraser2009-09-151-4/+10
| | | | | Signed-off-by: Yang Zhang <yang.zhang@intel.com> Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
* Move cpu_{sibling,core}_map into per-CPU spaceKeir Fraser2009-07-131-1/+1
| | | | | | | | | | | These cpu maps get read from all CPUs, so apart from addressing the square(nr_cpus) growth of these objects, they also get moved into the previously introduced read-mostly sub-section of the per-CPU section, in order to not need to waste a full cacheline in order to align (and properly pad) them, which would be undue overhead on systems with low NR_CPUS. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Remove unused 'retry' parameter from on_selected_cpus() etc.Keir Fraser2009-05-271-5/+5
| | | | | | | Remove the unused "retry" parameter of on_selected_cpus(), on_each_cpu(), smp_call_function(), and smp_call_function_single(). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86, hvm: Fix double-free of vpmu->contextKeir Fraser2009-03-191-0/+2
| | | | | | | | | | When `opcontrol --shutdown' is called after xenoprof is used on Dom0, the vpmu owner becomes PMU_OWNER_NONE. So it is possible to acquire the owner as PMU_OWNER_HVM and to allocate vpmu->context twice. As a result, the hypervisor panics because of double-alloc/free of vpmu->context. Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
* x86: Make the num_siblings CPU parameter per-CPU.Keir Fraser2009-01-222-3/+3
| | | | | | | | | While it is unlikely that a system has a different number of siblings for different physical CPUs, make this parameter per-CPU for consistency, and deal with the (so far theoretical) case that this is different per CPU package. Signed-off-by: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
* xenoprof: The checks in the function passive_domain_do_rdmsr() wereKeir Fraser2009-01-151-16/+16
| | | | | | | | | | | not sufficient. Also the same checks were done in the function passive_domain_do_wrmsr(). So these common checks are moved in a new single function passive_domain_msr_op_checks(). Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* xenoprof: Add support for Intel Dunnington cores.Keir Fraser2008-12-181-4/+5
| | | | | Signed-off-by: Xiaowei Yang <Xiaowei.yang@intel.com> Signed-off-by: Ting Zhou <ting.g.zhou@intel.com>
* xenoprof: Small fixes.Keir Fraser2008-10-281-1/+1
| | | | | Signed-off-by: Ronghui Duan <ronghui.duan@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>