Commit Graph
17997 Commits
Author SHA1 Message Date
Keir Fraser 00a7a3bca1 stubdom: use a newlib snapshot instead of the slow cvs checkout.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-08 17:25:04 +01:00
Keir Fraser 4475f160c7 stubdom: do not build tapdisk as it it not supposed to build and we don't need it
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-08 17:15:23 +01:00
Keir Fraser 86a9fb0014 Change PCI-dump debug key: Fixes boot with debug=y and perfc=y
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-08 17:03:53 +01:00
Keir Fraser d6521a015d stubdom: fix copy/paste typo in select()
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-08 16:12:23 +01:00
Keir Fraser 2811570a7d Improve plumbing for calling external qemu builds
* Remove ioemu-dir before replacing it with a symlink so that
  switching between trees doesn't go wrong.
* Remove case-based arrangement for making XEN_ROOT absolute
  and replace with $(abspath ...) since we depend on GNU make
  anyway.
* `make clean' recurses into ioemu-dir

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-07-08 14:26:09 +01:00
Keir Fraser 3e56660c18 stubdom: Fix modified_memory size calculation
>> is less prioritized than -

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-08 12:24:14 +01:00
Keir Fraser a3de16cb53 pvSCSI: fix xend
Previous "xend" assumed initial Xenbus state would be "Connected" when
LUN hot-plug starts. However it was not guaranteed in general, and it
may cause some problems.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-08 09:28:50 +01:00
Keir Fraser eabcd59fd9 Fix passthrough of PCI capability structures.
Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
2008-07-08 09:26:58 +01:00
Keir Fraser 94b853a3d2 Revert c/s 17975 -- enumerate PCI devices in Xen allowing old dom0
kernels to work with iommu-capable platforms.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-07 16:13:53 +01:00
Keir Fraser 7728324966 MTRR virtualization for Intel EPT
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
2008-07-07 10:45:50 +01:00
Keir Fraser 1f6e08fd7d ioemu: e1000: fix a TSE bug
Previously, all data descriptors used TSE context descriptor. It's not
correct, per spec, data descriptor uses TSE bit to indicate whether
use TSE. Legacy data descripter never use TSE.

Signed-off-by; Anthony Xu <anthony.xu@intel.com>
2008-07-07 10:29:56 +01:00
Keir Fraser 4d5e3ff596 Set default domain_to_node() allocation preference before dropping
domain reference when calling alloc_domheap_pages().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-06 20:16:24 +01:00
Keir Fraser 422463bf4a Only use domain_to_node() on non-null domain pointer.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-06 17:22:58 +01:00
Keir Fraser 24342075ea numa: Extend MEMOP_ allocation functions to take a node argument.
The address_bits field will be limited to 8 bits and is now embedded
in the mem_flags member, which additionally contains the node number
(limited to 8 bit).

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-05 14:43:37 +01:00
Keir Fraser 24a06f7ce1 Update .hgignore list 2008-07-05 14:42:08 +01:00
Keir Fraser 50b74f55e0 OOS cleanup: Fixup arrays instead of fixup tables.
This patch avoids compromises with evil concepts (reverse maps) in the
shadow code and limits to a maximum value the number of writable
mappings of OOS pages.

Code is simpler and performance do not degrade.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-07-05 14:01:27 +01:00
Keir Fraser 926da77e4a stubdom: fix pass-through compilation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-05 14:00:19 +01:00
Keir Fraser e67fec4edf stubdom: fix parallel build
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-05 14:00:03 +01:00
Keir Fraser df5b09d365 Update changelog for pci add/remove physdevop hypercalls. 2008-07-05 13:58:27 +01:00
Keir Fraser 760dd6f073 stubdom: gcc-4.3 support
It seems we need to provide limits.h in the gcc-4.3 case.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-04 18:00:04 +01:00
Keir Fraser 0a5142f1de xen: Fix debug build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 17:58:40 +01:00
Keir Fraser 0bcf29eb0e Remove PCI device enumaration in VT-d code
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-07-04 17:55:33 +01:00
Keir Fraser f83baa47ec Add hypercall for adding and removing PCI devices
The add hypercall will add a new PCI device and register it.  The
remove hypercall will remove the pci_dev strucure for the device.  The
IOMMU hardware (if present) will be notifed as well.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
Signed-off-by: Joshua LeVasseur <joshua.levasseur@netronome.com>
2008-07-04 17:52:50 +01:00
Keir Fraser ffd9d82c69 Add management and locking of PCI device structures
Add functions for managing pci_dev structures.  Create a list
containing all current pci_devs.  Remove msi_pdev_list.  Create a
read-write lock protecting all pci_dev lists.  Add spinlocks for
pci_dev access.  Do necessary modifications to MSI code.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-07-04 17:52:24 +01:00
Keir Fraser f800030ddb Restructure VT-d device scope and PCI bridge handling
Create a bitmap for each device scope indicating which buses are
covered by the scope.  Upon mapping PCI-PCI bridges we now detect
whether we have a bridge to a non-PCIe bus.  If so, all devices mapped
on that bus are squashed to the requester-id of the bridge.  Bridges
to PCIe busses are ignored.  The requester-id squashing also
determines the iommu device group id for the device.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-07-04 17:51:42 +01:00
Keir Fraser 8644e176dc PCI device register/unregister + pci_dev cleanups
Move pci_dev lists from hvm to arch_domain

Move the pci_dev list from hvm to arch_domain since PCI devs are no
longer hvm specific.  Also removed locking for pci_dev lists.  Will
reintroduce them later.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-07-04 17:51:16 +01:00
Keir Fraser 170f30e9fb stubdom: Remove obsolete patch files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 17:50:31 +01:00
Keir Fraser ce5c899f22 stubdom: use host's gcc
This makes stubdom use the host's gcc instead of downloading/compiling
binutils+gcc.  That requires a bunch of changes and even uncovered a
few bugs, but saves a lot of time.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-04 17:47:11 +01:00
Keir Fraser 355b0469a8 x86: MCA support.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-04 16:27:44 +01:00
Keir Fraser b12217e141 vgabios: upgrade to CVS version
cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/vgabios
co vgabios

Patchs backported:
  - vgabios: Support VESA power management extensions. (cs 17692)
  - x86, hvm: Allow Cirrus VGA BIOS to clear framebuffer with minimal
    PIO writes. (cs 16242)

This patch fixes the bug with the IDR boot CD.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-07-04 13:02:31 +01:00
Keir Fraser 52d9d32d02 Cleanups to suspend-event-channel patches.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 12:39:18 +01:00
Keir Fraser ddfd61bd7e Fix build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 12:20:19 +01:00
Keir Fraser e2b0df4318 Revert incorrectly checked-in changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 12:17:33 +01:00
Keir Fraser 17636f47a4 Teach xc_save to use event-channel-based domain suspend if available.
If the guest provides a suspend event channel through xenstore,
xc_save will use it in preference to the old xenstore-based method.

Xend is still informed when the domain has suspended so that it can
perform device migration in parallel with last-round migration.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2008-07-04 12:00:38 +01:00
Keir Fraser 4539594d46 Add facility to get notification of domain suspend by event channel.
This event channel will be notified when the domain transitions to the
suspended state, which can be much faster than raising VIRQ_DOM_EXC
and waiting for the notification to be propagated via xenstore.

No attempt is made here to prevent multiple subscribers (last one
wins), or to detect that the subscriber has gone away. Userspace tools
should take care.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2008-07-04 12:00:24 +01:00
Keir Fraser 5552b9af81 ioemu: Support more Capability Structures (including MSI/MSI-X)
and Device Specific Registers for pt device.

I implemented following Capability Structures and Device Specific
Registers.
    * Configuration Header Type 0
        -> emulation.
           "emulation" does not mean no accessing real I/O device.
           Access real I/O device, but guest value and real value
           might be different.
    * MSI Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * MSI-X Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * PCI Express Capability Structure
        -> emulation.
    * PCI Power Management Capability Structure
        -> emulation.
    * Vital Product Data Capability Structure
        -> emulation.
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Vendor Specific Capability Structure
        -> emulation
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Device Specific Register (exclude capability structures)
        -> passthrough.
           The device drivers in guest domain are allowed to access
           Device Specific Register. So various I/O device will work.

I assigned following device to guest domain, and they worked fine.
    - PCIe NIC (MSI)
    - PCI NIC (MSI)
    - UHCI (INTx interrupt)
    - IDE Controller (INTx interrupt)

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2008-07-04 11:54:21 +01:00
Keir Fraser 2521c9ab94 x86: MSI interrupt storm avoidance.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 11:51:59 +01:00
Keir Fraser 08a42ca0b5 pvSCSI: xend changes
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-03 13:39:06 +01:00
Keir Fraser d2831c8ba9 xm-test: Remove a policy reset from acm test case
Remove the resetting of the policy from this point in the test case
since the new default policy has the '__UNLABELED__' label, which is
not expected in subsequent checks.

Signed-off-by; Stefan Berger <stefanb@us.ibm.com>
2008-07-03 11:32:10 +01:00
Keir Fraser 8d574cc772 vtpm: Add two missing quotes in the vTPM hotplug script.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-03 11:31:40 +01:00
Keir Fraser c896dc3dcc ioemu: Explicitly define certain PCI/MSI macros.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-03 10:59:43 +01:00
Keir Fraser b011be94ba Update tboot tarfile to latest version in Trusted Boot SourceForge site
Signed-off-by:  Joseph Cihula <joseph.cihula@intel.com>
2008-07-03 10:57:51 +01:00
Keir Fraser 041f09c60d [BUILD] Support cloning Linux tree from a git repository.
Integrate the linux-2.6-tip tree as linux-2.6-tip-latest

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-07-03 10:45:46 +01:00
Keir Fraser 554a3a3375 Support building of out-of-tree merged qemu from git
This provides support for building the new merged qemu from
qemu-xen.git, or from a local checkout.

The default is still to use the in-tree version, because the patchman
infrastructure for testing, and propagation from staging to
xen-unstable, needs a small amount of work to cope with git.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-07-03 10:44:13 +01:00
Keir Fraser 8e65d32968 XenAPI: Add Direct PCI Device (DPCI) Assignment Support
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-03 10:27:12 +01:00
Keir Fraser 5a940c0997 XenAPI: Add Physical PCI Device (PPCI) Support
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-03 10:26:16 +01:00
Keir Fraser fec35adc86 iommu: Fix hvm_dpci_eoi for smp guest in ioapic interrupt mode
My testing shows, for some smp guests, ent->fields.mask will not be
unmasked when hvm_dpci_eoi() is invoked at the first time. In that
case, we should rely on timeout call back to do pirq_guest_eoi() and
should not stop the per-irq timer too early.

From: Wei Wang <wei.wang2@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-02 17:28:27 +01:00
Keir Fraser 38cfc3b8d0 minios: PIRQ and MSI/MSI-X support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-02 17:26:42 +01:00
Keir Fraser 9194f26eba x86 hvm: Fix RTC handling.
1. Clean up initialisation/destruction.
 2. Better handle per-domain time-offset changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-02 17:25:05 +01:00
Keir Fraser b4d58083ca Do not allow HVM save/restore of a dying domain.
It's not a sensible thing to do, and it is easier than auditing all
state save/restore functions for safety (most importantly, racing
against domain_relinquish_resources).

Also place a spin_barrier on domain_lock after asserting d->is_dying,
allowing critical regions under the domain_lock to safely check
is_dying and avoid races with domain_relinquish_resources().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-02 17:10:52 +01:00