Commit Graph
32 Commits
Author SHA1 Message Date
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 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 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 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 83833d973b rombios: Indirect through 32-bit jump table from within the 32-bit bios.
This gets rid of shenanigans with relocating the jump table around the
place.

Also clean up bios_info table while we are updating it.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-23 14:32:41 +00:00
Keir Fraser e3a9e577ae hvmloader: Reserve BIOS memory and VGA memory at top of 4GB memory hole.
To make memory management easier in hvmloader, defer building a
generic E820 map until the end of hvmloader bootstrap.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 16:59:21 +00:00
Keir Fraser 54562e0cdf hvmloader: Simplify access to hvm_info_table.
Also require the table to be present.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 13:49:05 +00:00
Keir Fraser d818f3cb7c hvm: Use main memory for video memory.
When creating an HVM domain, if e.g. another domain is created before
qemu allocates video memory, the extra 8MB memory ballooning is not
available any more, because it got consumed by the other domain.

This fixes it by taking video memory from the main memory:

- make hvmloader use e820_malloc to reserve some of the main memory
  and notify ioemu of its address through the Xen platform PCI card.
- add XENMAPSPACE_mfn to the xen_add_to_physmap memory op, to allow
  ioemu to move the MFNs between the original position and the PCI
  mapping, when LFB acceleration is disabled/enabled
- add a remove_from_physmap memory op, to allow ioemu to unmap it
  completely for the case of old guests with acceleration disabled.
- add xc_domain_memory_translate_gpfn_list to libxc to allow ioemu to
  get the MFNs of the video memory.
- have xend save the PCI memory space instead of ioemu: if a memory
  page is there, the guest can access it like usual memory, so xend
  can safely be responsible to save it.  The extra benefit is that
  live migration will apply the logdirty optimization there too.
- handle old saved images, populating the video memory from ioemu if
  really needed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 14:53:39 +01:00
Keir Fraser 64a86b092f hvmloader: Debug build incorporates HVM environment tests which must
pass for the HVM guest to successfully boot.

Currently only one test (REP INS across page boundaries) but more will
be added in future.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-21 15:18:05 +01:00
Keir Fraser 3c1221fce3 hvmloader: Load ACPI tables outside BIOS area, so they are writable by
OSPM (particularly the S3 firmware_waking_vector).

TODO: rombios must enter protected mode to fetch the vector on S3 resume.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-29 15:10:58 +01:00
Keir Fraser 7eb8d34c18 tools: Declare functions static where they should be, and provide
proper prototypes for others as required.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-15 13:19:26 +01:00
Keir Fraser 1eaea3f0b6 hvmloader: Framework for multiprocessor initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 16:39:00 +01:00
Keir Fraser f541851c79 hvmloader: Small cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-14 14:10:11 +01:00
Keir Fraser 75d2b7df30 hvmloader: Properly implement some more SMBIOS fields.
In particular:
 - BIOS release date
 - BIOS characteristics
 - BIOS extended characteristics (Targeted Content Distribution is
   required to be specified to pass WHQL).
 - CPU speed

Based on a patch by Kamala Narasimhan <kamala.narasimhan@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-01 17:21:05 +01:00
kfraser@localhost.localdomain 22f2674542 hvmloader: Clarify relationship between xen_domain_handle_t and SMBIOS uuid field.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-24 16:32:56 +01:00
Keir Fraser ebb19b1cc8 hvm: e820 public header cleanup.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-10 19:49:44 +01:00
kfraser@localhost.localdomain 56d126ace6 hvmloader: Place SMBIOS tables at 0xE9000. Previous location was lower
than nay native system would place them.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-26 16:45:06 +01:00
Keir Fraser f7ffac81ac hvmloader: Fix ROMBIOS highmem relocation. Only SHF_ALLOC sections
should be relocated. SHT_NOBITS must be handled properly (space
explicitly allocated and zeroed).
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-19 21:06:29 +01:00
Keir Fraser e5baa1aa0c hvmloader: Simplify e820_malloc() interface and improve
implementation. Strip unnecessary sections from the highmem bios
extension elf image.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-19 19:22:12 +01:00
Keir Fraser 36200329b1 hvmloader: More simplification of highmem bios relocation code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-16 23:56:26 +00:00
Keir Fraser b54ada182d General hvmloader cleanups and write memory fields of CMOS with
correct values.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-16 23:34:24 +00:00
kaf24@localhost.localdomain dd59dfdfb1 This patch adds a 32bit gateway to the Bochs BIOS. The 32 bit code is
compiled with gcc and linked into the hvmloader as a byte-array.
Hvmloader allocates memory (rounded up to next 64kb) from the e820
table
below 4GB, copies and relocates the 32bit code in the allocated area
and
copies a jumptable (located in a section '.biosjumptable') pointing to
the 'exported' functions into the Bochs BIOS's memory area to link the
two code sections. The memory area has been reserved and can be
identified with the signature '___JMPT'.

In the Bochs BIOS only stub functions are provided. These load the
index
of a particular function in the jump table, switch to protected mode
and
call the function in the high memory area.  The stack is prepared such
that functions compiled by gcc can just pick the parameters from the
stack as usual - this means that the 16bit real-mode return address is
taken off the stack. The stub functions should have the same signature
as those in 32bit space. For ABI compatibility reasons parameters
inside
the Bochs BIOS stubs should all be 32bit wide.

This patch includes a test function that calls three gcc-compiled
functions in the high memory area and displays their success status.
Simple tests are done doing multiplication and addition of 32-bit
numbers and reading and modification of a static variable. These
functions test the interface and the relocation code. The test code is
removed in patch part 3.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-01-26 16:30:48 +00:00
kfraser@localhost.localdomain db08b83ada [HVMLOADER][ACPI] Move SSDT initialisation to acpi/ dir.
This kills off a few hundred lines of unnecessary code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-28 15:47:52 +00:00
kfraser@localhost.localdomain da38d1f64b [HVM] Re-introduce the 'apic' configuration option, default to 1.
Also simplify the HVM builder interface by doing more work in
the python wrapper, and fix mapping of shared_info page after the
change to map foreign pages by GMFN rather than MFN.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 17:49:41 +00:00
kaf24@localhost.localdomain 938cee9d41 [HVM] Dynamically build ACPI-table data block.
Only emit MP tables and MADT for multi-processor guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-26 17:37:28 +00:00
kaf24@localhost.localdomain 00a70f44a6 [HVM] Update VPIC device model for new interrupt delivery code.
Move BSP VLAPIC initialisation to hvmloader.
Remove callback_irq update hack from Linux unmodified drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-26 13:37:27 +00:00
kfraser@localhost.localdomain bbfa22f8c9 [HVM] Move PCI and PCI-ISA bridge setup to hvmloader.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-22 17:50:20 +00:00
kfraser@localhost.localdomain 9fd9787b0e [HVMLOADER][VTPM] Add support for a TCG ACPI table.
The ACPI table is generated if the probing for the TIS interface
succeeds. I cleaned up the ACPI signatures in acpi2_0.h to be more
readable.

The specification for the layout of these ACPI tables can be found here:
https://www.trustedcomputinggroup.org/groups/server/TCG_ACPIGeneralSpecification_1-00_1-00_FINAL.pdf

Extensions to the Bochs BIOS that use these ACPI extensions will follow.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-11-17 10:24:22 +00:00
kaf24@localhost.localdomain 10a74ed0a2 [HVM] [SMBIOS] Duplicate UUID into serial number in SMBIOS tables.
Windows zeroes out the UUID in the SMBIOS tables, but the identifier
is often needed by systems management code.  Duplicating the UUID
as the virtual system's serial number should help.

Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
2006-08-28 12:59:07 +01:00
kfraser@localhost.localdomain 318ac791f9 Add utilities needed for SMBIOS generation to hvmloader.
Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
2006-08-14 17:28:25 +01:00
kfraser@localhost.localdomain 5eeca68ffd [HVMLOADER] HVM loader initialises hypercall shim and uses
it to interrogate Xen version information. Also add support
for HVM hypercall execution on 64-bit host.

Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-04 20:30:12 +01:00