aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/sysctl.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: move XEN_SYSCTL_physinfo, XEN_SYSCTL_numainfo and ↵Stefano Stabellini2013-02-151-114/+9
| | | | | | | | | | | | | | | | | | | | | XEN_SYSCTL_topologyinfo to common code Move XEN_SYSCTL_physinfo, XEN_SYSCTL_numainfo and XEN_SYSCTL_topologyinfo from x86/sysctl.c to common/sysctl.c. The implementation of XEN_SYSCTL_physinfo is mostly generic but needs to fill in few arch specific details: introduce arch_do_physinfo to do that. The implementation of XEN_SYSCTL_physinfo relies on two global variables: total_pages and cpu_khz. Make them available on ARM. Implement node_spanned_pages and __node_distance on ARM, assuming 1 numa node for now. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen/xsm: Add xsm_default parameter to XSM hooksDaniel De Graaf2013-01-111-2/+2
| | | | | | | | | | | | | | 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>
* xen: sysctl XSM hook removalDaniel De Graaf2013-01-111-13/+0
| | | | | | | | | A number of the sysctl XSM hooks have no parameters or only pass the operation ID, making them redundant with the xsm_sysctl hook. Remove these redundant hooks. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* streamline guest copy operationsJan Beulich2012-12-101-3/+5
| | | | | | | | | | | | - 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-1/+1
| | | | | | | | | | | | 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>
* xsm: Add missing access checksDaniel De Graaf2011-12-181-0/+14
| | | | | | | | | Actions requiring IS_PRIV should also require some XSM access control in order for XSM to be useful in confining multiple privileged domains. Add XSM hooks for new hypercalls and sub-commands that are under IS_PRIV but not currently under any access checks. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* eliminate first_cpu() etcJan Beulich2011-11-081-1/+1
| | | | | | | | This includes the conversion from for_each_cpu_mask() to for_each-cpu(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
* allocate CPU sibling and core maps dynamicallyJan Beulich2011-10-211-2/+2
| | | | | | | | | | ... 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>
* xen: remove extern function declarations from C files.Tim Deegan2011-05-261-2/+1
| | | | | | | | Move all extern declarations into appropriate header files. This also fixes up a few places where the caller and the definition had different signatures. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* x86: On CPU online/offline from dom0, try flushing RCU work on EBUSY.Keir Fraser2011-01-141-3/+24
| | | | | | | | | Although the caller should react appropriately to EBUSY, if the error is due to pending RCU work then we can help things along by executing rcu_barrier() and then retrying. To this end, this changeset is an optimisation only. Signed-off-by: Keir Fraser <keir@xen.org>
* x86 sysctl: Remove unused CPU hotplug status stuff.Keir Fraser2011-01-141-23/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* sysctl: Return physinfo.max_{cpu,node}_id as maximum *possible* IDs.Keir Fraser2010-08-131-2/+2
| | | | | | | | | In particular, this fixes setting vcpu affinities via libxl. Previously, the affinity mask would be narrowed to the maximum currently-online CPU. So future hotplugged CPUs could not be expressed. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Move cpu hotplug routines into common cpu.c file.Keir Fraser2010-05-141-0/+1
| | | | | | | | | Also simplify the locking (reverting to use if spin_trylock, as returning EBUSY/EAGAIN seems unavoidable after all). In particular this should continue to ensure that stop_machine_run() does not have cpu_online_map change under its feet. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Clean up numa-info sysctl.Keir Fraser2010-04-131-45/+20
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Topology-info sysctl cleanups.Keir Fraser2010-04-131-40/+13
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* sysctl: Remove sockets_per_node field from physinfo command.Keir Fraser2010-04-131-3/+0
| | | | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* libxl: Fix the build by reinstating some sysctl.physinfo fields.Keir Fraser2010-04-081-4/+7
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Host Numa information in dom0Keir Fraser2010-04-071-11/+127
| | | | | | | | | | 'xm info' command now also gives the cpu topology & host numa information. This will be later used to build guest numa support. The patch basically changes physinfo sysctl, and adds topology_info & numa_info sysctls, and also changes the python & libxc code accordingly. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* sysctl: Return max_node_id rather than nr_nodes from physinfo command.Keir Fraser2010-01-061-1/+1
| | | | | | Python extension continues to synthesise a nr_nodes value. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Move cpu_{sibling,core}_map into per-CPU spaceKeir Fraser2009-07-131-2/+2
| | | | | | | | | | | 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 page-scrub lists and async scrubbing.Keir Fraser2009-07-021-1/+1
| | | | | | | | The original user for this was domain destruction. Now that this is preemptible all the way back up to dom0 userspace, asynchrony is better iontroduced at that level, if at all, imo. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add CPU status info and a status call to the CPU on/offline sysctls.Keir Fraser2009-03-171-1/+23
| | | | Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
* x86: Add sysctl for cpu online/offlineKeir Fraser2008-09-221-0/+25
| | | | Signed-off-by: Shan Haitao <haitao.shan@intel.com>
* Fix XEN_SYSCTL_physinfo to handle NUMA info properly.Keir Fraser2008-05-141-5/+14
| | | | | Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: Obtain platform capabilities via physinfo sysctl.Keir Fraser2008-04-011-5/+9
| | | | | Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Replace sysctl.physinfo.sockets_per_node with more directly usefulKeir Fraser2007-10-191-3/+1
| | | | | | | | sysctl.physinfo.nr_cpus. This also avoids miscalculation of sockets_per_node by Xen where the number of CPUs in the system is clipped. From: Elizabeth Kon <eak@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Xen Security Modules: XSMkfraser@localhost.localdomain2007-08-311-0/+5
| | | | Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
* Extended the physinfo sysctl to export NUMA cpu_to_node topology info.kfraser@localhost.localdomain2007-07-061-6/+26
| | | | | | Print this in 'xm info'. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] New paging-assistance interface.Tim Deegan2007-02-141-1/+0
| | | | | | | | | | | Adds paging_* functions, wrapping the existing shadow_* ones, so that later hardware paging assistance can be hooked in at this level. Separates p2m maintenance code into its own files. Adjusts shadow code to comply with the new interfaces. Changes all callers in arch/x86 to use the new interfaces. Signed-off-by: Wei Huang <Wei.Huang2@amd.com> Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* Make domctl/sysctl interfaces 32-/64-bit invariant.kfraser@localhost.localdomain2007-01-241-6/+2
| | | | | | | This kills off a fair amount of unpleasant CONFIG_COMPAT shimming and avoids needing to keep the compat paths in sync as these interfaces continue to develop. Signed-off-by: Keir Fraser <keir@xensource.com>
* Enable compatibility mode operation for HYPERVISOR_sysctl.Emmanuel Ackaouy2007-01-051-2/+6
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Replace dom0_ops hypercall with three new hypercalls:kfraser@localhost.localdomain2006-08-251-0/+77
1. platform_op -- used by dom0 kernel to perform actions on the hardware platform (e.g., MTRR access, microcode update, platform quirks, ...) 2. domctl -- used by management tools to control a specified domain 3. sysctl -- used by management tools for system-wide actions Benefits include more sensible factoring of actions to hypercalls. Also allows tool compatibility to be tracked separately from the dom0 kernel. The assumption is that it will be easier to replace libxenctrl, libxenguest and Xen as a matched set if the dom0 kernel does not need to be replaced too (e.g., because that would require vendor revalidation). From here on we hope to maintain dom0 kernel compatibility. This promise is not extended to tool compatibility beyond the existing guarantee that compatibility will not be broken within a three-level stable release [3.0.2, 3.0.3, etc.]. Signed-off-by: Keir Fraser <keir@xensource.com>