Commit Graph
360 Commits
Author SHA1 Message Date
Keir Fraser 55a2e36cbc x86: Add -fno-exceptions to list of possibly-supported CFLAGS for embedded targets.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-25 22:20:47 +01:00
Keir Fraser 9365b5518a hvmloader: clear the whole shared-info page when shutting down xenbus
since the contents might be in the wrong word-size for later users.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-22 15:19:25 +01:00
Keir Fraser afb0532ff0 build: Make all GIT download URLs depend correctly on GIT_HTTP={y,n}
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-21 09:02:10 +01:00
Keir Fraser ff556f73a0 hvmloader/gpxe: Add a couple of bug-fix patches from upstream gpxe
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 16:09:50 +01:00
Keir Fraser 8bced86016 hvmloader: clear the xenbus event-channel when we're done with it.
Otherwise a later xenbus client that naively waits for the rising edge
could get stuck.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-20 13:42:17 +01:00
Keir Fraser bfb32dde4f tools: Update distclean target to remove auto-gen'ed tarballs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 11:18:39 +01:00
Keir Fraser e3c0ad6c82 hvmloader: Download gpxe bits via HTTP rather than GIT protocol.
Latter is faster but won't work through all firewall setups.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 11:09:21 +01:00
Keir Fraser 762599eddf hvmloader: Build GPXE from upstream git repo, latest release tag.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 10:58:04 +01:00
Keir Fraser ba01489a10 tools: gpxe build fix for NetBSD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-07-19 15:10:20 +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 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 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
Keir Fraser d9edd37387 gpxe: Add eb-roms.h to hgignore list and build ROMs serially.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-29 13:43:18 +01:00
Keir Fraser 98ed7531a4 gpxe: Build e1000 ROM with PCI-ID matching that advertised by qemu-dm.
Also build gpxe without -Werror and require it always to be built (do
not include a pre-built binary in our source repo).

Portions of this patch are from Gianni Tedesco <gianni.tedesco@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-29 13:33:37 +01:00
Keir Fraser a6e99ed7e7 Add the USE_PLATFORM_TIMER flag to the FADT, to make w2k3 use the PMTIMER
...because the default timesource (TSC) drifts under load.

The flag is only defined in ACPI 3.0, and we provide ACPI 2.0 tables,
but Windows seems happy enough to obey it anyway.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-06-04 10:06:23 +01:00
Keir Fraser 022cf55cf1 hvmloader: Replace unportable usage of GNU head with portable awk.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-22 18:42:50 +00:00
Keir Fraser b0e6d9b53a hvmloader: fix vgatype detecting issue
When graphics card is assigned to a guest as a secondary VGA,
without gfx_passthru and emulated VGA is the primary VGA,
hvmloader misreads gfx_passthru is specified if VGA device is
found after the emulated VGA.

This patch fix this issue. If emulated VGA is found, hvmloader
preserves it and loads vgabios of the emulated VGA.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
2010-02-22 10:04:22 +00:00
Keir Fraser 819de76727 hvmloader: Fix an ACPI asl bug.
Fix an ACPI asl bug by explicitly convert PRS to buffer, otherwise PRS
would be parsed as integer if less than 32/64 bits (according to ACPI
1.0 or 2.0).

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2010-02-15 08:14:21 +00:00
Keir Fraser 5f5e014566 Vcpu hotplug: Move ACPI processor from \_PR to \_SB
Move processor from \_PR to \_SB. ACPI processor can be defined
under \_PR or \_SB. However, recently os like linux 2.6.30/32 support
cpu hotplug better for \_SB processor object.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-15 08:13:26 +00:00
Keir Fraser 98650e12c1 hvmloader: Fix parallel build of ACPI tables.
Make build.c dependency on ssdt_{pm,tpm}.h explicit, else they can be
built in the wrong order.

Also, improve naming of target DSDT structures, and specify -p option
to iasl so that all generated files for a given target have
target-unique names, hence build can proceed safely in parallel.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-12 09:16:10 +00:00
Keir Fraser 1ffced4c92 hvmloader: Fix comment style in ssdt_tpm.asl
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-12 09:14:16 +00:00
Keir Fraser 11c76718f8 hvmloader: Build a compatibility DSDT with only 15 processor objects.
Deploy this smaller DSDT where possible: this is required to boot
Windows 2000, which only supports up to 15 processors and will blue
screen if it sees more processor objects than that (even inactive
ones).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-11 22:42:18 +00:00
Keir Fraser 5f6338c27e hvmloader: Remove checked-in ready-compiled SSDT_PM and SSDT_TPM.
These can be built at the same time as the DSDT.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-11 21:49:47 +00:00
Keir Fraser e5a69893b2 hvmloader: Do not leave compiled DSDT checked in to tree.
It's big and small changes generate huge diffs. People building the
firmware will have to ensure they have iasl installed.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-11 21:21:41 +00:00
Keir Fraser e5dc62c4d4 hvmloader: Fix CPU hotplug notify handler in ACPI DSDT.
By merging PRSC and NTFY methods we simplify the code, improve
efficiency, and fix a bug where PRSC iterated 0-255 but NTDY could
only handle CPU numbers 0-127.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-03 09:16:11 +00:00
Keir Fraser 9e2b86f486 hvm: Add ACPI fixed sleep button
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
2010-01-20 20:34:19 +00:00
Keir Fraser 4bce6df7bd hvmloader: mp table fix
The bug causes noapic PAE Windows 2k3 boot failure.

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
2009-12-30 12:49:10 +00:00
Keir Fraser 16d3c5de3c hvmloader: Fix Windows XP standby with cirrus VGA
Fix it by telling OSPM don't power down vga card on entering S3
state. The trick works for XP and Windows2003, but Vista still refuse
to allow S3.

It is picked from kvm-userdapce.git commit 60e85d, author "Gleb
Natapov".

Signed-off-by: Yu Ke <ke.yu@intel.com>
2009-12-28 09:38:34 +00:00
Keir Fraser 37fddaa5fe hvmloader: Only mark LTP1 present in ACPI DSDT if parport really is there.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
2009-12-24 09:10:25 +00:00
Keir Fraser cf75018188 HVM vcpu add/remove: parse 'vcpu_avail' to firmware and set up madt
accordingly

-- currently firmware has got 'vcpus' from xend, this patch add parse
   'vcpu_avail' to firmware;
-- setup madt 'lapic' subitems of processors accoring to vcpus and
   vcpu_avail which finally come from config;

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-14 09:25:47 +00:00
Keir Fraser c70ad37a1f HVM vcpu add/remove: setup dsdt infrastructure by mk_dsdt.c for vcpu add/remove
In order to support HVM vcpu add/remove, we need set dsdt
infrastructure.
-- By using mk_dsdt.c, it auto-produce related asl code when
compiling.
-- It define processor related objects and control methods (_MAT,
_EJ0, _STA, etc).
-- It also define GPE _L02 and Notify control method for SCI
interrupt, which will trigger HVM acpi driver to add/remove cpu.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-14 09:14:26 +00:00
Keir Fraser 0dfc46719e hvmloader: Fix bug in 20510:749b5d46e7a9 (GPE notifications)
The GPE notification decision tree was inverted.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-01 14:08:27 +00:00
Keir Fraser dd14c75ad4 build: Execute mk_dsdt with path
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-11-27 07:56:38 +00:00
Keir Fraser c7679119e4 hvmloader: Auto-generate IRQ routing tables in ACPI DSDT.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-11-26 15:27:00 +00:00
Keir Fraser c3517d3d2a hvmloader: Auto-generate the lengthy pattern-based sections of ACPI DSDT.
At the same time, replace a lengthy linear GPE notification method,
with a logarithmic binary chop. Based on a patch by Simon Horman.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-11-26 13:51:16 +00:00
Keir Fraser 83371c34bc hvmloader: Advertise ECC memory in SMBIOS tables.
Microsoft's Windows logo certified hardware requires ECC; since the
SVVP certification runs the same test on the guest, Xen domains will
currently fail it.

From: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-11-25 14:04:46 +00:00
Keir Fraser f38a18594b rombios: don't busy-wait for keystrokes
Spinning waiting for the keyboard is a bit rude on a virtual
machine. Wait for an interrupt instead.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-11-23 06:47:29 +00:00
Keir Fraser 6785f5fef3 Extend the max vcpu number for HVM guest.
- Originally the max vcpu number for HVM guest is 32, this patch
 extend the number to 128 on x86_64 hypervisor. (For i386 hypervisor,
 the max vcpu number  is still 32).
 - This patch extends the mp-table size to fit more vcpus.
 - HVM PV driver should call VCPUOP_register_vcpu_info hypercall to
 initialize the vcpu info if the vcpu number is more than 32.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-10-29 14:48:28 +00:00
Keir Fraser 91cb4623df x86 hvm: Guests should scan CPUID range 40000000-4000ff00 for Xen leaves.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-09-16 08:55:23 +01:00
Keir Fraser 049607ff33 x86 passthru:: graphics passthrough
This patch supports basic gfx passthrough on xen side:
  - add a VGA type for gfx passthrough, and get the size of VGA bios
  of passthrouged gfx in hvmloader
  - add a config option 'gfx_passthru' for gfx passthrough

Signed-off-by: Ben Lin <ben.y.lin@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
2009-09-01 11:36:16 +01:00
Keir Fraser 990e56e3ec hvmloader: Regression tests need 16MB to run. Check for this.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-08-06 11:14:48 +01:00
Keir Fraser bce51ea9a8 hvmloader: Fix get_memsize() to cast high_mem_pgend to 64 bits.
Signed-off-by: Joe Jin <joe.jin@oracle.com>
2009-07-24 10:37:52 +01:00
Keir Fraser 016a8a4a48 hvmloader: Add new test for MSR_SHADOW_GS_BASE validity after SWAPGS instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-16 10:30:50 +01:00
Keir Fraser 89c6cf58e8 x86 hvm: Allow delivery of legacy 8259 interrupts to VCPUs != 0.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-01 20:22:29 +01:00
Keir Fraser 83d82e6f35 hvmloader: pass-through: multi-function PCI hot-plug
This registers information to allow guests to recognise non-zero
functions when hot-plugged.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:53:19 +01:00
Keir Fraser dcf18dfcc4 tools: don't require hardcoded firmware path in guest config file
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-23 11:23:27 +01:00