Commit Graph
21770 Commits
Author SHA1 Message Date
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
Keir Fraser 876e14ee83 Merge 2010-07-06 17:58:37 +01:00
Ian Jackson 1b54711eae tools/libxl: revert 15bcf57fcf24 (disable_migrate)
That patch is entirely wrong.  xc_domain_disable_migrate does not work
like that, and the config parameter is misnamed.
2010-07-06 17:38:19 +01:00
Ian Jackson 62996c01c1 tools/ocaml: Fix up ocaml build for timer_mode, hpet and vpt_align
c/s da46b25cf17d broke the ocaml build.  This fixes it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-06 17:31:04 +01:00
Ian Jackson dcb2947e81 tools/libxl: support the "disable_migrate" domain config option
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
2010-07-06 17:22:39 +01:00
Ian Jackson 0a34b3481d tools/libxl: allow setting of timer_mode, hpet and vpt_align parameters
Implement parsing for timer_mode, hpet and vpt_align parameters.

These are all HVM only parameters and hpet/vpt_align are boolean so
change types and place in hvm union accordingly. Also HPET is x86 only
on principle so make this compile-time conditional on arch as-is
viridian.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
2010-07-06 16:55:49 +01:00
Keir Fraser ef3e6c7d75 x86: eliminate unused "quad_local_to_mp_bus_id"
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-06 16:55:02 +01:00
Keir Fraser 9e3ba38157 rombios: fix implicit assumption that DS == SS
by passing boot device info by value, not by reference.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-06 16:51:54 +01:00
Keir Fraser 5bcc7775a7 rombios: pause for a keypress after a failed boot
rombios: inform the user and pause for a keypress after a failed boot
rather than powering off immediately.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-06 16:49:59 +01:00
Ian Jackson 0c85cce09c tools/hotplug: locking.sh script: fix lock directory remains on error bug
_release_lock should be used instead of release_lock.
sigerr is introduced so that it can be redefined by
xen-hotplug-common.sh to a version which writes error status to xenstore.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2010-07-06 13:10:14 +01:00
Ian Jackson 2157eba42a tools/xenstore: add XS_RESTRICT operation to C xenstore client libs.
The OCaml xenstored supports the XS_RESTRICT operation, which
deprivileges a dom0 xenstore connection so it can only affect one
domain's entries.   Add the relevant definitions to the C libraries
so that callers can use it.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-06 11:57:20 +01:00
Ian Jackson f2402d342d Merge 2010-07-06 11:54:40 +01:00
Keir Fraser 621441dcd1 Add an exact-node request flag for mem allocations.
Signed-off-by : Dulloor <dulloor@gmail.com>
2010-07-05 08:40:26 +01:00
Keir Fraser 52ff658b7e x2APIC: improve enabling logic
This patch masks PIC and IOAPIC RTE's before x2APIC enabling, unmask
and restore them after x2APIC enabling. It also really enables
interrupt remapping before x2APIC enabling instead of just checking
interrupt remapping setting. This patch also handles all x2APIC
configuration including BIOS settings and command line
settings. Especially, it handles that BIOS hands over in x2APIC mode
(when there is apic id > 255). It checks if x2APIC is already enabled
by BIOS. If already enabled, it will disable interrupt remapping and
queued invalidation first, then enable them again.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2010-07-05 08:31:29 +01:00
Keir Fraser 19fbbfffdc x2APIC/VT-d: improve interrupt remapping and queued invalidation enabling and disabling
x2APIC depends on interrupt remapping, so interrupt remapping needs to
be enabled before x2APIC. Usually x2APIC is not enabled
(x2apic_enabled=0) when enable interrupt remapping, although x2APIC
will be enabled later. So it needs to pass a parameter to set
interrupt mode in intremap_enable, instead of checking
x2apic_enable. This patch adds a parameter "eim" to intremap_enable to
achieve it.  Interrupt remapping and queued invalidation are already
enabled when enable x2apic, so it needn't to enable them again when
setup iommu. This patch checks if interrupt remapping and queued
invalidation are already enable or not, and won't enable them if
already enabled. It does the similar in disabling, that's to say don't
disable them if already disabled.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2010-07-05 08:30:25 +01:00
Keir Fraser 600814950b x2APIC/VT-d: allocate iommu when create a drhd
A drhd is created when parse ACPI DMAR table, but drhd->iommu is not
allocated until iommu setup. But iommu is needed by x2APIC which will
enable interrupt remapping before iommu setup. This patch allocates
iommu when create drhd. And then drhd->ecap can be removed because
it's the same as iommu->ecap.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2010-07-05 08:29:10 +01:00
Keir Fraser 34b9ec5289 VT-d: No need to emulate WBINVD when force snooping feature available
There is no cache coherency issue if VT-d engine's force snooping
feature available.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
2010-07-05 08:28:08 +01:00
Keir Fraser 093e295b3c VMX: fix ept pages free up when ept superpage split fails:
1) implement ept super page split in a recursive way to
   form an ept sub tree before real installation;
2) free an ept sub tree also in a recursive way.
3) change ept_next_level last input parameter from shift
   bits # to next walk level;

Signed-off-by: Xin Li <xin.li@intel.com>
2010-07-05 08:27:26 +01:00
Keir Fraser 712b05770c trace: insert compiler memory barriers
This is to ensure fields shared writably with Dom0 get read only once
for any consistency checking followed by actual calculations.

I realized there was another multiple-read issue, a fix for which is
also included (which at once simplifies __insert_record()).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-07-05 08:24:18 +01:00
Keir Fraser 2604adda4f AMD OSVW (OS Visible Workaround) for Xen
This path enables AMD OSVW (OS Visible Workaround) feature for
Xen. New AMD errata will have a OSVW id assigned in the future. OS is
supposed to check OSVW status MSR to find out whether CPU has a
specific erratum. Legacy errata are also supported in this patch:
traditional family/model/stepping approach will be used if OSVW
feature isn't applicable.  This patch is adapted from Hans Rosenfeld's
patch submitted to Linux kernel.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Hans Rosenfeld <hands.rosenfeld@amd.com>
Acked-by: Jan Beulich <jbeulich@novell.com>
2010-07-02 19:04:57 +01:00
Keir Fraser 2156299cf0 x86: Fix (bogus) use-before-initialise compiler warning.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-02 19:03:16 +01:00
Keir Fraser 8f0aaeab8a VMX: cleanup ept_set_entry:
1) more strict input parameters checking;
2) better comments;
3) fewer variable;
4) change direct_mmio type to bool_t.

Signed-off-by: Xin Li <xin.li@intel.com>
2010-07-02 19:00:04 +01:00
Keir Fraser faba8d7d41 Remove stale file xen/arch/x86/hvm/vmx/vpmu.c
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-02 18:59:36 +01:00
Keir Fraser ee310a9ca9 io: make shared ring pad field less enticing for users by adding a __ prefix
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
Cc: Dongxiao Xu <dongxiao.xu@intel.com>
2010-07-02 18:58:28 +01:00
Keir Fraser 1b9cecdb88 blktap2: make protocol specific usage of shared sring explicit
I don't think protocol specific data really belongs in this header
but since it is already there and we seem to be stuck with it let's at
least make the users explicit lest people get caught out by future new
fields moving the pad field around.

This is the Xen portion of this change. The kernel portion will be
sent separately. There is no dependency between the two.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
Cc: Dongxiao Xu <dongxiao.xu@intel.com>
2010-07-02 18:58:02 +01:00