aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/multicall.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
* xen: more XEN_GUEST_HANDLE_PARAM substitutionsStefano Stabellini2012-10-171-1/+1
| | | | | | | | | | 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>
* trace: trace hypercalls inside a multicallDavid Vrabel2012-10-031-0/+16
| | | | | | | | | | Add a trace record for every hypercall inside a multicall. These use a new event ID (with a different sub-class ) so they may be filtered out if only the calls into hypervisor are of interest. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* multicall: don't ignore failure from __copy_to_guest() upon preemptionJan Beulich2011-11-111-17/+16
| | | | | | | | At once adjust perf counter updates to also count calls from here even if a guest memory access failed. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* Make multicall state per-vcpu rather than per-cpuKeir Fraser2010-11-161-2/+1
| | | | | | | This is a prerequisite for allowing guest descheduling within a hypercall. Signed-off-by: Keir Fraser <keir@xen.org>
* Fix preemption of multicalls in compat mode.Ian Campbell2007-05-301-0/+4
| | | | | | | | | | | | | | | | mcs->call (struct multicall_entry) always needs to be translated into mcs->compat_call (struct compat_multicall_entry) when a multicall is preempted in compat mode. Previously this translation only occured for those hypercalls which explicitly called hypercall_xlat_continuation() which doesn't cover all hypercalls which could potentially be preempted. Change hypercall_xlat_continuation() to only translate only the hypercall arguments themselves and not the multicall_entry layout. Translate the layout for all hypercalls in in compat_multicall() instead. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* xen: Make all performance counter per-cpu, avoiding the need to updatekfraser@localhost.localdomain2007-03-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | them with atomic (locked) ops. Conversion here isn't complete in the sense that many places still use the old per-CPU accessors (which are now redundant). Since the patch is already rather big, I'd prefer replacing those in a subsequent patch. While doing this, I also converted x86's multicall macros to no longer require inclusion of asm-offsets.h in the respective C file (on IA64 the use of asm-offsets.h in C sources seems more wide spread, hence there I rather used IA64_ prefixes for the otherwise conflicting performance counter indices). On x86, a few counter increments get moved a little, to avoid duplicate counting of preempted hypercalls. Also, a few counters are being added. IA64 changes only compile-tested, hence somebody doing active IA64 work may want to have a close look at those changes. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Enable compatibility mode operation for HYPERVISOR_multicall.Emmanuel Ackaouy2007-01-051-1/+4
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* [XEN] Some cleanups to the log-level stuff. Largely thiskaf24@localhost.localdomain2006-10-271-1/+1
| | | | | | | | is a rename and slight interface change to DPRINTK (now replaced by dprintk() and gdprintk()). Also shuffle some log-level definitions around and tweak the semantics of the upper threshold. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Logging parameters for common code.kaf24@localhost.localdomain2006-10-271-1/+1
| | | | Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* Remove redundant performance counters.Steven Hand2006-08-241-1/+0
| | | | Signed-off-by: Steven Hand <steven@xensource.com>
* [XEN] Make multicall info explicitly PER_CPU.kaf24@firebug.cl.cam.ac.uk2006-08-081-2/+2
| | | | | | | | | Also remove cacheline alignment in a few places. We leave the common timer and schedule_data structures aligned because they may be accessed randomly by remoted CPUs: at least we can contain cacheline bouncing to just the offending structures. Signed-off-by: Keir Fraser <keir@xensource.com>
* Rename *GUEST_HANDLE to *XEN_GUEST_HANDLE.kaf24@firebug.cl.cam.ac.uk2006-04-271-1/+1
| | | | | Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* Implement guest_access routines for copying to/from a sub-field of a structure.kaf24@firebug.cl.cam.ac.uk2006-03-081-21/+17
| | | | | | | | Use this as part of a tidy-up of the multicall hypercall. Signed-off-by: Keir Fraser <keir@xensource.com>
* Upgrade all hypercalls to use the new guest_handle interface (on the Xen side).kaf24@firebug.cl.cam.ac.uk2006-03-071-22/+11
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Sketch a new interface for transferring hypercall arguments in memory.kaf24@firebug.cl.cam.ac.uk2006-02-281-2/+2
| | | | | | | | | | | | | | | | | | Instead of manipulating guest virtual addresses, 'guest handles' are passed across the hypercall interface, which may only be manipulated via the interface exported by guest_access.h. So far this has only been applied to the memory_op hypercall. The interfaces are still subject to change. Other hypercalls can be updated after the interface is agreed upon. Also cleaned up the hypercall_create_continuation() interface to take a format string and different-typed varargs (they do not all need to be castable to longs). Signed-off-by: Keir Fraser <keir@xensource.com>
* Clean up grant-table code and replace uses of get_userkaf24@firebug.cl.cam.ac.uk2006-02-151-1/+3
| | | | | | | | | and put_user in common code. This is an attempt to narrow the uaccess API before it gets replaced. Signed-off-by: Keir Fraser <keir@xensource.com>
* Uniform definition of do_iret prototype. Use 'struct foo'kaf24@firebug.cl.cam.ac.uk2006-01-271-2/+2
| | | | | | | | in various places instead of 'foo_t'. Signed-off-by: Keir Fraser <keir@xensource.com>
* Clean up and fix hypercall macros in XenLinux: we must assume thatkaf24@firebug.cl.cam.ac.uk2005-08-261-0/+12
| | | | | | | | | | | | | | | | | all register parameters are clobbered on return. Furthermore, multicall arrays are clobbered on return from a multicall (only the result field can be trusted!). These restrictions are enforced by debug builds of Xen in the following ways: 1. On completion of a multicall, the call array is overwritten with garbage before writing in the result fields. 2. On completion of a hypercall, all parameter registers are overwritten with garbage. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1653 (429f7931iJ8kgS9qBlBbtyY9irorQA)cl349@firebug.cl.cam.ac.uk2005-06-021-0/+1
| | | | | | | Many files: More include cleanups towards "include where it's used". Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* bitkeeper revision 1.1649 (429f6bb65KQm70mnFwO33ykh9n1qag)cl349@firebug.cl.cam.ac.uk2005-06-021-0/+1
| | | | | | | | | | | | | sched.h: g/c unneeded include. Many files: Rename xen/slab.h to xen/xmalloc.h and fix resulting fallout. xmalloc.h: Rename: xen/include/xen/slab.h -> xen/include/xen/xmalloc.h sched.h, multicall.c, dom_mem_ops.c, asm-offsets.c: cleanup incorrect includes. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* bitkeeper revision 1.1627 (429dabd8oit_vtykkoDno8W9TS973g)cl349@firebug.cl.cam.ac.uk2005-06-011-1/+1
| | | | | | | multicall.c: Put multicall result in result field instead of args[5]. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* bitkeeper revision 1.1381 (426ccd3chFZ3jThNSK9--Zvf3r2fug)kaf24@firebug.cl.cam.ac.uk2005-04-251-2/+2
| | | | | | | No longer disable format checking for printf/printk statements. This required a whole bunch of cleanups to get the build working again. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1327 (42650c157OdzpVLoIU2uHsYHltTfYg)kaf24@firebug.cl.cam.ac.uk2005-04-191-2/+1
| | | | | | | Remove unused VERIFY_READ and VERIFY_WRITE parameters from the access_ok, user-space memory check macros. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.1.58 (42288505tf22vxeNSISpP2B48DpV5A)kaf24@scramble.cl.cam.ac.uk2005-03-041-0/+1
| | | | | | Fix the Emacs 'local variables' block to include required end stmt. Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
* bitkeeper revision 1.1236.1.14 (421db08d6LIbanwxXMIaE6u0X5DIbQ)kaf24@scramble.cl.cam.ac.uk2005-02-241-1/+9
| | | | | | Move Emacs mode lines to end of files, out of the way. Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
* bitkeeper revision 1.1159.212.115 (4207c574hv18R_VTm-3a9w_AZzNBWw)kaf24@scramble.cl.cam.ac.uk2005-02-071-2/+2
| | | | | | Force hypercall continuation arguments to size of longs. Signed-off-by: keir.fraser@cl.cam.ac.uk
* bitkeeper revision 1.1159.212.95 (4204aa0ee0re5Xx1zWrJ9ejxzgRs3w)kaf24@scramble.cl.cam.ac.uk2005-02-051-0/+1
| | | | | | | Various cleanups. Remove PDB pending simpler GDB stub and/or NetBSD debugger. Force emacs mode to appropriate tabbing in various files. Signed-off-by: keir.fraser@cl.cam.ac.uk
* bitkeeper revision 1.1159.187.19 (41a65822miLPeexZ6MOkyk4Usl-Rpw)kaf24@scramble.cl.cam.ac.uk2004-11-251-1/+7
| | | | | Fix multicall preemption.
* bitkeeper revision 1.1159.187.17 (41a63c69lFw9w4Qh2aZDluR-6MdrkQ)kaf24@scramble.cl.cam.ac.uk2004-11-251-2/+1
| | | | | | More hypercall preemption fixes. do_mmu_update() now correctly remembers the foreigndom across preempt/resume.
* bitkeeper revision 1.1159.187.15 (41a61537tODn12flBND8W6jum0b79Q)kaf24@scramble.cl.cam.ac.uk2004-11-251-0/+76
Fix hypercall preemption. At the same time I reimplemented most of the multi-hypercall in arch-independent C code.