Commit Graph
17980 Commits
Author SHA1 Message Date
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
Keir Fraser de4e084064 stubdom: PCI passthrough support via PV-PCI
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-02 13:54:20 +01:00
Keir Fraser dac6f79804 pciif: do not depend on linux' msix_entries
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-02 13:37:16 +01:00
Keir Fraser 85b9d198e0 x86: Remove inline declaration to fix build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-02 10:56:37 +01:00
Keir Fraser badc969545 ioemu: Add check for mapping MSI pirqs.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-02 09:45:18 +01:00
Keir Fraser 94ab7ad96b x86: Fix MSI cleanup.
Fixes bugzilla bug #1279.

From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-02 09:44:09 +01:00
Keir Fraser aa506f9185 xend: Replace stray tab-indent with space-indent
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-07-02 09:42:37 +01:00
Isaku Yamahata 3819ac39eb merge with xen-unstable.hg 2008-07-02 11:30:37 +09:00
Keir Fraser 1e25c34bdc minios: proper frees are now handled, so drop the FIXME comment
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-01 14:50:35 +01:00
Keir Fraser 38e7a8f94f x86_emulate: (Almost) complete FPU emulation.
Provide emulation for all FPU instructions except fsave/frstore &
fnstenv/fldenv.

While the main purpose of the patch is to avoid current and future
"gotchas" on FPU intructions used by various OS boot-loaders, it is
complete enough to run DOS realmode FPU applications and benchmarks,
but don't expect to set any speed records.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-01 13:27:41 +01:00
Keir Fraser f1ba06c0f4 VT-d: Fix queue invalidation
Correct invalidate_sync(), and clean up qinval_setup().

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-07-01 11:41:43 +01:00
Keir Fraser 920bd99d37 VT-d: Do CLFLUSH after updating IRTE entries
Like root, context and DMA remap page table, interrupt remap table
also needs CLFLUSH after any update.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-07-01 11:40:55 +01:00
Keir Fraser b484177fb7 xenballoond (memory overcommit) scripts
See the README and conf files for more info.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2008-07-01 11:40:07 +01:00
Keir Fraser 9c28c1b8b9 ioemu: limit xen-console buffering
Set dom->buffer.max_capacity to xend configured limit.

Signed-off-by: Pat Campbell <plc@novell.com>
2008-07-01 11:38:51 +01:00
Keir Fraser 03f7fd7c9f xend: open qemu-dm logfile in append mode if log rotation is disabled by config.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-01 10:59:09 +01:00
Keir Fraser da67ff89f7 xend: improve the rotation of qemu-dm logfiles.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-01 10:58:43 +01:00
Keir Fraser 1be51142f1 x86_emulate: read/write/insn_fetch emulation hooks now all take a
pointer to emulator data buffer, and an arbitrary byte count (up to
the size of a page of memory).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-30 14:19:09 +01:00
Keir Fraser 04465fbeb9 blktap: Fall back to libcrypto if libgcrypt is not installed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-30 11:39:10 +01:00