Commit Graph
21794 Commits
Author SHA1 Message Date
Ian Jackson c8be2ccfa9 tools/misc/xenpm: provide core/package cstate residencies
According to Intel 64 and IA32 Architectures SDM 3B Appendix B, Intel
Nehalem/Westmere processors provide h/w MSR to report the core/package
cstate residencies.Extend sysctl_get_pmstat interface to pass the
core/package cstate residencies, and modify xenpm to output those
information.

[tools part of the patch]

Signed-off-by: Wei Gang <gang.wei@intel.com>
2010-07-14 16:30:42 +01:00
Ian Jackson 8929f81d2c tools/misc/xenpm: fix get-cpu-topology
fix get-cpu-topology

Signed-off-by: Wei Gang <gang.wei@intel.com>
2010-07-13 19:34:48 +01:00
Ian Jackson d524f866ca tools/ocaml: Properly adjust fields in ocaml structure to match the C layer.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-07-13 19:28:13 +01:00
Ian Jackson e94b5fc097 tools/ocaml: add a simple logger to the ocaml bindings
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-07-13 19:27:50 +01:00
Ian Jackson e4f42ed7ec tools/ocaml: register the ocaml exception so it can be used at the C level.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-07-13 19:27:33 +01:00
Ian Jackson 59135ebd28 tools/debugger/gdbsx: enabled by only x86
The changeset 21752:29e545151078 breaks ia64, since gdbsx supports
only x86.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2010-07-13 19:08:48 +01:00
Keir Fraser ddf3a0035f x86: optimize this_cpu()
Besides the .text space savings of over 2.5k on x86-64 (1.5k for
x86-32) this removes a load (plus a lea on x86-64) from various
frequently executed code paths, and finally provides a reason (other
than legibility) to prefer this_cpu() over per_cpu() in all places
where smp_processor_id() isn't being called anyway.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-13 18:17:28 +01:00
Keir Fraser d0a3c6c7a1 [IOMMU] Debug info for AMD IOMMU event log
Print out the event log entry content for debug purposes.
Additionally, when IOMMU reset event log (due to event log overflow),
we should print out the event log content for debugging.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2010-07-13 18:13:33 +01:00
Keir Fraser 917335d8b3 x86: Avoid assumptions about C struct layouts from asm code.
Largely this involves avoiding assumptions about 'struct cpu_info'.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-13 18:12:15 +01:00
Keir Fraser f65bd343b0 sysctl: Another clarification re. max_cpu_index.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-12 18:39:18 +01:00
Keir Fraser 2bdeb12ffb sysctl: Make meaning of max_cpu_index field clearer.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-12 18:33:30 +01:00
Keir Fraser 4471167789 x86, pm: provide core/package cstate residencies
According to Intel 64 and IA32 Architectures SDM 3B Appendix B, Intel
Nehalem/Westmere processors provide h/w MSR to report the core/package
cstate residencies. Extend sysctl_get_pmstat interface to pass the
core/package cstate residencies.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2010-07-12 18:30:26 +01:00
Keir Fraser 7d343d0e53 Consolidate MSI-X related definitions
Eliminate redundant ones, fix names (where so far inappropriately
referring to capability structure fields the don't really relate to),
use symbolic names instead of raw numbers, and remove an unusable one.

No functional change intended.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-12 10:48:34 +01:00
Keir Fraser b298f3d27f x86 cpufreq: Fix debug=y build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-12 10:48:04 +01:00
Keir Fraser f94b08c2f6 x86: allow the MSI-X table to reside beyond 4G even on 32-bit systems
Underlying interfaces allow this, and unduly (and silently) truncating
addresses doesn't seem nice.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-12 10:43:57 +01:00
Keir Fraser c507b36485 x86: prevent simultaneous use of MSI and MSI-X
This matches similar checks done in Linux, since no good can come from
a domain trying to enable both MSI and MSI-X on the same device at the
same time.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-12 10:43:34 +01:00
Keir Fraser 355938432e x86: fix a benign typo
Just to avoid confusing readers - no functional change.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-12 10:43:10 +01:00
Keir Fraser 049723c0de x86/cpufreq: pass pointers to cpu masks where possible
This includes replacing the bogus definition of cpumask_test_cpu()
(introduced by c/s 20073) with a Linux compatible one and replacing
the bad uses with cpu_isset().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-12 10:41:48 +01:00
Ian Jackson 827f7fe627 update QEMU_TAG to 833e7e9a4c95739429dc0c803bbbf2346f9897fd 2010-07-09 18:49:12 +01:00
Ian Jackson ec9afc69fe tools/hotplug: xencommons: xenconsoled tracing
cut and paste error lead to using the xenstored command line syntax
for xenconsoled.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-07-09 18:46:07 +01:00
Keir Fraser c415ceb08e x86 hvm: Add a hypercall to allow HVM PV drivers to insert xentrace records
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 17:16:41 +01:00
Keir Fraser b91391491c x86 hvm: Add a new HVMOP to get the current Xen system time
Xen absolute system time, so that it can use SCHEDOP_poll in a
sensible fashion.  HVM PV drivers can't use the normal PV clock
because they might have TSC offsets that hey don't know about.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 17:16:03 +01:00
Keir Fraser ecac002b16 iommu: New options iommu=dom-strict and iommu=dom0-passthrough
The former strips dom0 of its usual 1:1 mapping of all memory, and
only provides it with mappings of its own memory, like any other
domain. The latter is a new consistent name for iommu=passthrough.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-09 16:45:42 +01:00
Keir Fraser 52b8c95eae iommu: Remove pointless iommu=pv boot option.
Allow devices to always be passed through to PV domains, just as they
can be to HVM domains.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-09 15:39:35 +01:00
Keir Fraser fa1c92c8ce Merge 2010-07-09 12:35:58 +01:00
Keir Fraser 0e0a3eacbc hvmloader: customize the SMBIOS strings based on xenstore keys
...written at domain creation time by xapi.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 12:34:40 +01:00
Keir Fraser dc6c53ebb6 hvmloader: Add a xenbus frontend so it can read values from xenstore
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 12:33:57 +01:00
Keir Fraser d0b9080ba0 trace: Trace emulated RDTSC values
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-07-09 12:28:03 +01:00
Keir Fraser a4151a1aec trace: Reinstate tracing for emulated MSR reads and writes
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-07-09 12:27:45 +01:00
Keir Fraser 9627efc9a8 Eliminate unnecessary NR_CPUS-sized arrays from 't' key handler
Replace them with per-CPU data.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-09 12:25:07 +01:00
Keir Fraser 156433ce26 cpufreq: eliminate unnecessary NR_CPUS-sized arrays
Replace them with per-CPU data.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-09 12:24:41 +01:00
Keir Fraser 378405e3a8 x86/svm: eliminate unnecessary NR_CPUS-sized arrays
Replace them with per-CPU data.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-09 12:24:15 +01:00
Keir Fraser cbc585158f x86/mce: eliminate unnecessary NR_CPUS-sized arrays
Replace them with per-CPU data.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-09 12:23:52 +01:00
Keir Fraser 4d0cb9ebfd Makefile: Serialise stubdom build after tools
Currently "make stubdom" on its own fails because it depends on files
being installed by the results of "make tools".  This also means that
in some circumstances a parallel "make tools stubdom" (or "make all")
can fail due to races.  So make "make stubdom" depend on "make tools"
having completed first.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-09 12:22:52 +01:00
Keir Fraser 3130f964ba xen: allow HVM save/restore from different cpus
The hardware CPUID-levelling features level the feature flags but
don't change the CPU family/model/stepping.  Relax the HVM restore
check on family/model/stepping to printk but not veto the load, so
that VMs can be migrated between machines that have been
CPUID-levelled.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 12:22:35 +01:00
Keir Fraser c13cd8786d xen: allow HVM save/restore from different changesets
Allow HVM save/restore from different changesets of Xen.  The HVM save
records are supposed to be backwards compatible; XenServer
live-migrates between versions of Xen during upgrades.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 12:22:00 +01:00
Keir Fraser 3803ac6609 mce: Replace BUG() with a console warning in the MCE handler.
If the hardware reports corrected errors that we didn't see through
the status MSRs, complain on the console but don't BUG() the machine.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 12:21:31 +01:00
Ian Jackson 772aebeab9 tools/libxl: implement support for nomigrate option in VM profiles
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-07-08 17:54:42 +01:00
Ian Jackson 7182d1d11b tools/libxl: Read soundhw option and pass it on to qemu
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-07-08 17:53:19 +01:00
Ian Jackson a87a580e8a tools/xentrace: increase default xentrace buffer size.
increase default xentrace buffer size to reduce the number of
lost records.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 17:39:00 +01:00
Ian Jackson 84b1ed809c tools/libxl/xl: fix for short BDF (without domain specified)
Check that BDF have been parsed correctly.  Before this fix, BDF could
be parsed incorrectly if user omitted the domain.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Contributed-by: Sergey Tovpeko <tsv.devel@gmail.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-07-08 17:22:18 +01:00
Ian Jackson 28c4011332 tools/debugger/gdbsx: build enabled by default
Submitted-by: Bruce Edge <bruce.edge@gmail.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-08 16:50:34 +01:00
Keir Fraser c9de4c5c3c xend: Continue domain building even if memshr extensions are not
present in the hypervisor.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-08 09:56:10 +01:00
Keir Fraser 6dddb7b172 xen: make the shadow allocation hypercalls include the p2m memory
in the total shadow allocation. This makes the effect of allocation
changes consistent regardless of p2m activity on boot.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:52:51 +01:00
Keir Fraser fb9c01fe79 xen: use s_time_t for periodic timer deadlines.
Otherwise vcpu_periodic_timer_work() can think the next timer is in
the future (and re-issue it unchanged) while timer_softirq_action()
thinks it's in the past (and fires it immediately), leading to
livelock.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:52:34 +01:00
Keir Fraser f3e5b69ec8 rombios: use explicit SS prefix for calculated on-stack array accesses.
The bcc compiler gets constant array offsets right but does all
calculated array offsets via DS.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:52:01 +01:00
Keir Fraser 6456803dab rombios: move the stack to 0x9e000 and protect it with an e820 entry
so that we don't corrupt E820_RAM memory with stack ops in S3 wakeup.
It has to move up so the lowest contiguous RAM area is >= 512MiB.

This relies on the previous fix to let DS != SS

Signed-off-by: Paul Durrant <Paul.Durrant@citrix.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:51:40 +01:00
Keir Fraser b825e251d2 rombios: wait 30s after a failed boot
Prevents waiting forever for a keypress that may never come if boot is
unattended.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:46:09 +01:00
Keir Fraser 51d91a1c43 x86/mce: use cpu_online() instead of cpu_isset(,cpu_online_map)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-08 09:45:11 +01:00
Keir Fraser e6e5b8fba0 x86/cpufreq: check array index before use
... rather than after.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-08 09:44:46 +01:00