Commit Graph
6648 Commits
Author SHA1 Message Date
Keir Fraser b5ee8eb3d6 rombios: Obtain S3 wake vector from >1MB.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-29 16:03:58 +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 8d375aa174 rombios: Narrow window where BIOS area is writable, and ensure it
really *is* writable in that region. This is almost enough to get S3
working again (read-only firmware-waking-vector is still a problem).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-29 13:11:29 +01:00
Keir Fraser bfd0dbdd08 fs-back: build fixes for BSD and cleanups.
Signed-of-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-28 11:39:32 +01:00
Keir Fraser 5589b0008c xend, pci passthru: Use Dstate transition to do FLR for integrated
devices without proper FLR capability.

Currently integrated devices without proper FLR capability are not
assignable. This is not nice since actually they may be assignable,
but due to old BIOS the proper FLR capability is not exposed. We can
use the previously-used Dstate transition method to do FLR for them.
This works well and looks few issues are reported AFAIK. Maybe we can
make a black list for the (rare) integrated devices that don't work
with this method.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-28 11:29:23 +01:00
Keir Fraser 3c456fd628 xend, pci passthru: Relax the requirement of co-assignment.
Certain PCI or PCIe devices needs to be co-assigned. Currently we
require all the related devices be assigned to the same guest. This
can be relaxed to: part of them can be assgined to the same guest, and
after that, the left ones can't be assigned.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-28 11:28:45 +01:00
Keir Fraser a7d2697092 xend: Improve the error prompt when xc.test_assign_device() fails.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-28 11:27:48 +01:00
Keir Fraser f6e4baff82 Support using a specific branch or tag of ioemu-remote
With this patch you can set QEMU_TAG to check out a specific version.
When we set it, QEMU_TAG ought to be in Config.mk, I think.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-07-25 13:59:07 +01:00
Keir Fraser cead514ad8 xend: fix dual destroy
After changeset 18030 and 18064 were checked in, I found some issues
when creating HVM domains with devices assigned.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-25 13:58:23 +01:00
Keir Fraser 2406df9ada fs-backend: fix FD allocation for file creation
The creation operation also opens a file, we need to allocate a
virtual fd for that too.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-25 09:49:06 +01:00
Keir Fraser dba5b800e3 stubdom: fix do_xen_hypercall error report
call.result is an unsigned long

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-25 09:40:14 +01:00
Keir Fraser ae41a026ab minios: grant table map (gntdev) bug fixes
* Uninitialized dev_bus_addr argument to GNTTABOP_unmap_grant_ref
   results in an angry hypervisor.
 * Set errno in libxc and return -1 on error.
 * op.status is a int16_t, so it should be printed with PRId16.
 * Don't print domids[0] or refs[0] if the ptr is NULL. It's more
   polite to crash later, after the message has been printed.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
2008-07-24 17:34:50 +01:00
Keir Fraser 499da5e253 tools: use $(PREFIX) rather than hard-coding /usr
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-07-24 14:33:28 +01:00
Keir Fraser 6f79893756 tools: remove type parameter from xc_physdev_map_pirq{,_msi}()
... as it's implied by the function name.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-07-24 14:18:58 +01:00
Keir Fraser 7d0b678231 minios: grant table map (gntdev) for minios
I've implemented a grant map for mini-os to support the xc_gnttab_*()
functions, the equivalent of gntdev in linux. This is useful for my
work in putting xenstored in a stub domain.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
2008-07-24 14:14:27 +01:00
Keir Fraser b5d7ddffa7 ioemu: fix spurious track_dirty_vram warning
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-24 14:12:46 +01:00
Keir Fraser 597e548eef mini-os: select call incorrectly reports xce_handle as ready
The current implementation in minios of xc_evtchn_pending doesn't set
read=0 when there is exactly one port pending. This resulted in
select() incorrectly reporting the file descriptor as ready.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-24 14:11:47 +01:00
Keir Fraser fd6a37dbdc pv-grub: re-implement xc_map_foreign_ranges
Also get rid of va and npages members of privcmd_mmap_entry since we
do not need them any more.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-24 14:10:45 +01:00
Keir Fraser 0905190686 rombios: S3 resume data must be in EBDA.
Rombios itself is read-only.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-24 13:44:08 +01:00
Keir Fraser d4a22e75c9 blktap: Clean *.opic on 'make clean'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-24 11:19:13 +01:00
Keir Fraser 28f8960f3e libxc: Fix after xc_map_foreign_ranges() patch.
Must munmap() region after loading elf image.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-24 11:18:53 +01:00
Keir Fraser ce29ad450c libxc: Clean up xc_map_foreign_ranges() interface to hide the
underlying mmap() invocation.

From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-23 16:39:46 +01:00
Keir Fraser ebb9d5bee5 ioemu: Fix hvmloader erroneous debugging prints
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-07-22 16:03:45 +01:00
Keir Fraser 59ec6ab1b6 ioemu: fix vram tracking when !s->lfb_addr
When we don't have an LFB (standard VGA), we can not and do not need
vram tracking at all since we always get explicit dirtying.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-22 15:57:19 +01:00
Keir Fraser 33b7b2161a xend balloon: portability cleanup
Move the linux specific labels to osdep where they
belong. Modification on Solaris code ok'd by SUN (Ryan Scott).

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-22 11:55:06 +01:00
Keir Fraser 76db343592 fs-back: fix compilation error.
XC_PAGE_SIZE and XC_PAGE_MASK should be used instead of PAGE_SIZE
and PAGE_MASK.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-07-22 08:00:43 +01:00
Keir Fraser a395f12adb x86 hvm: stubdom and hvmloader always live under /usr/lib, never /usr/lib64
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-22 07:59:44 +01:00
Keir Fraser 5a932f3328 doc: Fix multi-core amd example
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-07-21 16:24:19 +01:00
Keir Fraser 518aee2780 tools: cpuid inputs must be 32 character long if hexadecimal value is
not used.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-07-21 14:03:26 +01:00
Keir Fraser 19aa4a65a3 libxc: add xc_gnttab_map_domain_grant_refs.
xc_gnttab_map_domain_grant_refs permits to simply map several pages
from the same domain.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-21 14:02:53 +01:00
Keir Fraser 418ce6a531 xend: Fix keymap handling
Patch allows keymap to be specified inside vfb description and
allows VM configured keymap setting to override XenD default

Signed-off-by: Pat Campbell <plc@novell.com>
2008-07-21 09:47:07 +01:00
Keir Fraser 2325e69721 [XSM][FLASK] Argument handling bugs in XSM:FLASK
Addresses a number of argument handling bugs in the flask_op hypercall
in the XSM:Flask module.  Thanks to Rafal Wojtczuk at McAfee for
reporting the issues and Tim Deegan at Citrix for providing an
initial patch.

This patch addresses the following issues:
 - bounds checking and validation on input arguments to flask_op
 - updated ABI/API, size and cmd are now uint32_t
 - updated userspace tools and libraries to account for ABI/API
 changes
 - implemented all copies using from/to guest, better portability
 - implemented upper bounds checking on op->cmd, op->size
 - implemented sanity checking on op->size and op->buf
 - implemented bit vector for checking from/to usage on op->cmd

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2008-07-21 09:41:36 +01:00
Keir Fraser abf1457691 fs-back: enable build by default
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 17:11:27 +01:00
Keir Fraser ce88683ac9 xend: portability cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-18 14:14:12 +01:00
Keir Fraser cd3b21408f Check phy: block device existence
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-07-18 12:44:58 +01:00
Keir Fraser fbc96ef66e pvscsi: Install vscsi script.
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-18 11:22:12 +01:00
Keir Fraser 2d7612f2fe blktap scripts: deletion of double check and permission of using /dev/sdxx
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2008-07-18 11:21:06 +01:00
Keir Fraser ddebb2820e stubdom: add example config file
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 11:19:17 +01:00
Keir Fraser 470831aeb2 ioemu: fix the devices loop.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2008-07-17 11:20:01 +01:00
Keir Fraser 004670e3ca ioemu: Fix issues when passthrough device is hot-removed from HVM domain.
When passthrough device is hot removed from HVM domain by "xm
pci-detach" command, following issues occur. The patch fixes them.

   - Allocated memory is not deallocated.
   - Unbind interrupt with invalid interrupt pin.
   - MSI-X memory mapped register area is not unmapped.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2008-07-16 11:16:48 +01:00
Keir Fraser c278e4f7bf fs-backend: do not expose file descriptors to frontend
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-16 11:13:21 +01:00
Keir Fraser 6ed3833291 xend: Fix destruction of VMMetrics objects for managed domains
While plugging a xend memory lead (c/s 18030), I introduced a bug in
the case of managed domains.  Managed domains continue to exist after
shutdown and thus should not have their associated VMMetrics object
destroyed until deleted.

The bug actually manifested by a new -> start -> shutdown -> delete
sequence of operations.  Shutdown destroyed the VMMetrics object and
delete tried to do the same :-):

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-07-16 11:12:36 +01:00
Keir Fraser bdfd5fc7d1 fs-backend: fix ioctl(BLKGETSIZE) call on 64bit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-15 18:00:13 +01:00
Keir Fraser 3123fe0fc4 fs-backend: Fix freelist implementation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-15 17:59:31 +01:00
Keir Fraser c20060b5e0 tools: Make functions static which should not be exported.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-15 15:03: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 55bfc14465 xentop: declare signal handler as static
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-14 13:26:45 +01:00
Keir Fraser 63d459b855 Revert 18025:07c7aef164 -- go back to 8MB VRAM.
We may well want it in future anyway, and changing it makes
save/restore compatibility difficult.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-14 13:13:39 +01:00
Keir Fraser 73d5acf50f xm: vt-d: Add a command "xm pci-list-assignable-devices" to list all
the assignable devices.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-14 10:12:07 +01:00
Keir Fraser 22527b8dcd xend: vt-d: improved FLR logic for pass-thru PCI devices
1) If the device is PCIe endpoint and supports PCIe FLR, we use that;
else

2) if the device is PCIe endpoint, and all functions on the
device are assigned to the same guest, we use the immediate parent
bus's Secondary Bus Reset to reset all functions of the device (here,
actually we require all the functions of the device be assigned to the
same guest); else

3) if the device is PCI endpoint and is on a host bus
(e.g. integrated devices), and if the device supports PCI Advanced
Capabilities, we use that for FLR; else

4) we use the Secondary Bus Reset (if the PCI device is behind a
PCI/PCI-X bridge, then all devices behind the uppermost such PCI/PCI-X
bridge above this device must be co-assigned).

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-14 10:11:39 +01:00