aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/xenoprof.c
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
* xenoprof: avoid division by 0Tim Deegan2013-02-151-4/+7
| | | | | | | Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* xen/xsm: Add xsm_default parameter to XSM hooksDaniel De Graaf2013-01-111-1/+1
| | | | | | | | | | | | | | Include the default XSM hook action as the first argument of the hook to facilitate quick understanding of how the call site is expected to be used (dom0-only, arbitrary guest, or device model). This argument does not solely define how a given hook is interpreted, since any changes to the hook's default action need to be made identically to all callers of a hook (if there are multiple callers; most hooks only have one), and may also require changing the arguments of the hook. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Keir Fraser <keir@xen.org>
* streamline guest copy operationsJan Beulich2012-12-101-6/+3
| | | | | | | | | | | | - use the variants not validating the VA range when writing back structures/fields to the same space that they were previously read from - when only a single field of a structure actually changed, copy back just that field where possible - consolidate copying back results in a few places Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when appropriateStefano Stabellini2012-10-171-4/+4
| | | | | | | | | | | | 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>
* make all (native) hypercalls consistently have "long" return typeJan Beulich2012-08-101-1/+4
| | | | | | | | | for common and x86 ones at least, to address the problem of storing zero-extended values into the multicall result field otherwise. Reported-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* oprofile: don't pass around redundant, easily derived argumentsJan Beulich2012-03-081-9/+8
| | | | | | | | | | | 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>
* replace bogus gdprintk() uses with {,d}printk()Jan Beulich2012-02-161-2/+2
| | | | | | | | | | | 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>
* xenoprof: Use uint64_t explicitly for internal callsGeorge Dunlap2012-01-261-3/+3
| | | | | | | | | | | | | A recent changeset to make XENOPROF_ESCAPE_CODE consistent across 32- and 64-bit builds caused a build failure, because values were passed through functions as "unsigned long". Replace these with uint64_t explicitly. Also remove redundant function prototype from perfmon.c, now that it's in a header file. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* use xzalloc in common codeJan Beulich2011-10-041-7/+2
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: Include headers that are actually needed, drop everything else.Christoph Egger2011-05-201-0/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* [IA64] xenoprof: fix ia64 buildKeir Fraser2010-08-061-3/+0
| | | | | | | 21902:2c6ae364ed7b ("xenoprofile: Add IBS support") breaks ia64. This patch fixes it. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* xenoprofile: Add IBS supportKeir Fraser2010-08-021-0/+17
| | | | | | | | | 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>
* xenoprof: Fix support for active domainsKeir Fraser2009-12-161-1/+2
| | | | | | | | | If a user tries to use opcontrol with option --active-domains in dom0 and then run opcontrol in a guest, no samples are generated. When the guest calls the xenoprof interface it resets the internal Xenoprof state machine and profiling does not start Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
* Scattered code arrangement cleanups.Keir Fraser2009-10-071-0/+1
| | | | | | | | - remove redundant declarations - add/move prototypes to headers - move things where they belong to Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* x86_64: allow more vCPU-s per guestKeir Fraser2009-06-181-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the shared info layout is fixed, guests are required to use VCPUOP_register_vcpu_info prior to booting any vCPU beyond the traditional limit of 32. MAX_VIRT_CPUS, being an implemetation detail of the hypervisor, is no longer being exposed in the public headers. The tools changes are clearly incomplete (and done only so things would build again), and the current state of the tools (using scalar variables all over the place to represent vCPU bitmaps) very likely doesn't permit booting DomU-s with more than the traditional number of vCPU-s. Testing of the extended functionality was done with Dom0 (96 vCPU-s, as well as 128 vCPU-s out of which the kernel elected - by way of a simple kernel side patch - to use only some, resulting in a sparse bitmap). ia64 changes only to make things build, and build-tested only (and the tools part only as far as the build would go without encountering unrelated problems in the blktap code). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: Fix event-channel access for 32-bit HVM guests.Keir Fraser2009-03-031-1/+1
| | | | | | Based on a patch by Joe Jin <joe.jin@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Allow memflags to be specified to alloc_xenheap_pages().Keir Fraser2009-01-281-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenoprof: Fix code indentation.Keir Fraser2009-01-261-17/+17
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_64: Widen page counts to avoid overflow.Keir Fraser2009-01-261-2/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenoprof: dom0 hypercall could trigger Xen NULL-pointer accessKeir Fraser2009-01-211-12/+17
| | | | Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
* x86, hvm, xenoprof: Add fully support of HVM guest to xenoprofile on Intel P6.Keir Fraser2008-10-271-1/+1
| | | | Signed-off-by: Ronghui Duan <ronghui.duan@intel.com>
* vmx: Enable Core 2 Duo Performance Counters in HVM guestKeir Fraser2008-01-301-0/+41
| | | | Signed-off-by: Haitao Shan <haitao.shan@intel.com>
* xenoprof: flush remaining smples when sampling is stopped.Keir Fraser2007-12-141-0/+17
| | | | | | | | | | Xenoprof notifies guest kernel via VIRQ_XENOPROF when sampled. But it does coarsly based on heuristic so that sometimes VIRQ_XENOPROF isn't delivered resulting in that oprofile daemon collects no sample. To avoid that situation, always send VIRQ_XENOPROF when sampling is stopped. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* Xen Security Modules: XSMkfraser@localhost.localdomain2007-08-311-0/+5
| | | | Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
* [XEN] replace shadow_* with paging_* in common codeTim Deegan2007-07-201-3/+3
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* xenoprof: Fix initialisation. Much can be done at boot-time, askfraser@localhost.localdomain2007-07-101-24/+24
| | | | | | indicated by the fact that the low-level functiosn are marked '__init'. Signed-off-by: Keir Fraser <keir@xensource.com>
* Add backtrace support to xenoprof.kfraser@localhost.localdomain2007-06-071-34/+101
| | | | | Signed-off-by: Amitabha Roy <amitabha.roy@gmail.com> Reviewed-by: Jose Renato G Santos <joserenato.santos@hp.com>
* Rename find_domain_by_id() to get_domain_by_id().kaf24@localhost.localdomain2007-01-261-2/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Enable compatibility mode operation for HYPERVISOR_xenoprof_op.Emmanuel Ackaouy2007-01-051-25/+43
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* [XENOPROF] Fix buffer sharing with auto-translate guests.kfraser@localhost.localdomain2006-12-191-1/+1
| | | | Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
* [XENOPROFILE] fix shared_xenoprof_page_with_guest() and cleanup.kfraser@localhost.localdomain2006-11-281-34/+38
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* [XENOPROFILE] removed unused gmaddr argument.kfraser@localhost.localdomain2006-11-271-9/+5
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* [XENOPROFILE] Make xenoprof arch-generic with dynamic mapping/unmapping xenoprofkfraser@localhost.localdomain2006-11-221-27/+89
| | | | | | | | | | | | | | buffer support and auto translated mode support. renamed xenoprof_get_buffer::buf_maddr, xenoprof_passive::buf_maddr to xenoprof_get_buffer::buf_gmaddr, xenoprof_passive::buf_gmaddr to support auto translated mode. With auto translated mode enabled, it is gmaddr, not maddr. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Simplify the share function. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XENOPROFILE] Replace x86 specific code in xen/common/xenoprof.ckfraser@localhost.localdomain2006-11-221-39/+11
| | | | | | | - replace nmi_ prefix with xenoprof_arch_ prefix - move config_counter to xen/arch/x86/oprofile/xenoprof.c Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* [XENOPROFILE] Move code under xen/arch/x86/oprofile to xen/common.kfraser@localhost.localdomain2006-11-221-0/+709
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>