Commit Graph
18206 Commits
Author SHA1 Message Date
Keir Fraser fbaecffa06 io passthru: fix a bug when assigning a SATA CDROM or DISK
Signed-off-by: Li Zhang <li.zhang@intel.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
2008-08-01 09:45:36 +01:00
Keir Fraser 0ae64c2ff8 minios: Error case when unbinding unknown port in xc_evtchn_unbind is
missing a return statement.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
2008-08-01 09:38:25 +01:00
Keir Fraser e5ba23a1d9 FSIF: extend protocol to multi-grant requests and multi-page ring
To improve throughput and inline the stat response.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-01 09:37:10 +01:00
Keir Fraser ee449f80fd stubdom: update documentation
stubdom/ is now compiled and installed by default
HVM+IOEMU-stubdom can not boot if dom0 has to be ballooned.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-01 09:36:18 +01:00
Keir Fraser 0f74052786 pass IOEMU_CONFIGURE_CROSS to ioemu-remote/xen-setup
Add --cpu to IOEMU_CONFIGURE_CROSS since otherwise qemu uses the
output of `uname -m` even for cross-building.  Pass
IOEMU_CONFIGURE_CROSS to xen-setup which passes it on to
ioemu/configure.

Signed-off-by: Aron Griffis <aron@hp.com>
2008-07-31 16:13:22 +01:00
Keir Fraser 00a02b0a94 AMD IOMMU: spin_uinlock() on early return path.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-31 15:38:09 +01:00
Keir Fraser 12e36600a0 pv-on-hvm: Update for linux-2.6.18-xen.hg:623:2866e6af50
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-31 15:34:58 +01:00
Keir Fraser 43154830c3 AMD IOMMU: Miscellaneous fixes and cleanups.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-31 13:37:29 +01:00
Keir Fraser 05717d5f9e AMD IOMMU: Add deallocation for interrupt remapping table.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-31 13:36:45 +01:00
Keir Fraser d0313903e4 AMD IOMMU: Remove pci scanning, parse acpi structures to detect iommu hardware.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-31 13:36:14 +01:00
Keir Fraser a1ea8c8321 AMD IOMMU: Remove device range register access, parse acpi structures
to acquire IO topology.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-31 13:35:41 +01:00
Keir Fraser 5b84e1c395 AMD IOMMU: Since device id covered by each iommu can never overlap,
use a global device table instead of allocating private tables for
each iommu. Migrate a few functions from pci_amd_iommu.c

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-31 13:35:00 +01:00
Keir Fraser f1b5be9017 xm on xenapi: Enable 'xm pci-{att,det}ach' commands to be executed via xen-api.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-31 13:31:15 +01:00
Keir Fraser fc57b9025f xm on xenapi: Add missing support for creating pci-assigned domains
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-31 13:30:59 +01:00
Keir Fraser adacb92a2b mini-os: make init_pcifront fail early if there is no backend
Else, we would leave entries in xenstore, which disturbs xend.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-31 13:30:24 +01:00
Keir Fraser dfad53d5fe xend: Fix portability issue of lspci option.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-31 12:39:56 +01:00
Keir Fraser 52c456a522 hvm builder: Cleaner sp_extents allocation
We do not need more than count elements in the sp_extents array.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-31 12:38:32 +01:00
Keir Fraser e00bff2cd3 x86: Handle p2m_ram_ro with HAP
I realized that I had failed to cover the hardware assisted paging
case in my earlier p2m_ram_ro patches. This should fix it.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
2008-07-31 12:11:00 +01:00
Keir Fraser 27dce33fed Update Xen version for 3.3.0-rc3-pre 2008-07-31 11:55:19 +01:00
Keir Fraser d821be5478 Added tag 3.3.0-rc2 for changeset dde12ff94c96331668fe38a7b09506fa94d03c34 2008-07-31 11:54:29 +01:00
Keir Fraser 24d680b3e0 Update Xen version for 3.3.0-rc2. 3.3.0-rc2 2008-07-31 11:54:22 +01:00
Keir Fraser 0a72f4c6f8 firmware: Fix build dependencies.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-31 11:51:14 +01:00
Keir Fraser 1e7e2bbc26 Remove vtd_hw_check().
Since we have separate VT-d page tables, actually we don't need the
checking.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-31 11:14:23 +01:00
Keir Fraser 120785c177 evtchn: Avoid spurious event-channel notifications across unbind/bind.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Huacai Chen <huacai.chen@intel.com>
2008-07-31 11:13:30 +01:00
Keir Fraser 1b45fb4c12 vtd: Fix bug #1306: Dom0 hangs when destroying guest with MSI NIC assigned
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-07-31 09:51:06 +01:00
Keir Fraser 438f8cbed5 stubdom: fix make clean ; make
make should not have to regenerate the libxc and ioemu directories
since that is part of the mk-headers target.  Use the subdirectory
clean targets instead to clean just the object files.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-31 09:49:28 +01:00
Keir Fraser c7e9fa23fd vtd: Add a debug key 'V' to dump some iommu info.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-31 09:48:46 +01:00
Keir Fraser cd1f9abc4a Allow xm to spawn vnc viewer
The new merged qemu no longer has the ability to spawn a vnc viewer
process in the bowels of the xend/qemu stack.  In this patch we
provide support for this use case in a different manner - one more
akin to the mechanism used for `xm console' and `xm create -c'.

We introduce new xm options:
   xm create --vncviewer [--vncviewer-autopass]
   xm vncviewer [--vncviewer-autopass]

These spawn a VNC viewer, obtaining the relevant information
(including the port number and if you tell it your viewer supports it
the password to use) directly from xenstore.

Like xm console it waits in the foreground for the vnc port to become
available; the timeout case isn't handled as well as it might be - it
just causes the whole program (xm) to die with `Alarm clock' but this
is difficult to deal with given the current structure of the xs Python
lowlevel interface, which doesn't provide a timeout on the call to
wait for a xenstore watch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-07-30 16:22:45 +01:00
Keir Fraser fb044093f6 grant_table: Remove compat-shim BUG_ON() which can fail if
GMFN==INVALID (~0UL).

Found by Diego Ongaro <diego.ongaro@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-30 15:25:09 +01:00
Keir Fraser 24c47cc182 firmware: Fix CFLAGS -I directives.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-30 10:55:06 +01:00
Keir Fraser 5a168d3d82 rombios: Simplify and clarify POST code a little.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-30 10:02:11 +01:00
Keir Fraser d508c764f1 ioemu: fix warnings in pass-through.h and pass-through.c
This patch backports following changes of ioemu-remote to ioemu.
It fixs warning in tools/ioemu/hw/pass-through.h and
tools/ioemu/hw/pass-through.c.

commit 30f00a0284a5ee356de6f6095e52173f2234145b
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date:   Fri Jul 18 16:02:23 2008 +0100

    hw/pass-through.c: pt_unregister_regions returns void

    It only ever falls off the end, and its return value is not used
    by its one caller.

    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>


commit 439836900dad41f66234d2a14981aa2a90d4d346
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date:   Tue Jul 22 11:55:18 2008 +0100

    Add missing cast for printf of maddr


commit cf5b00e6b714eb5f900d55471d85956b09cb8fd9
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date:   Thu Jul 24 13:57:10 2008 +0100

    pass-through.h: Sprinkle some #ifdefs to cope with pciutils-dev
    versions

    Some versions of pciutils-dev contain #defines which others are
    lacking.
    To avoid spurious compiler warnings we add some #ifdefs.  *sigh*

    Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2008-07-30 09:26:06 +01:00
Keir Fraser cada0c18f8 vtd: Move dom0 RMRR check to intel_iommu_remove_device()
If put dom0 RMRR check in domain_context_unmap_one(), the devices with
RMRR cannot be assigned to other domain, becuase
domain_context_unmap_one() won't unmap context for them, and dom0
always owns them. This patch moves the check to intel_iommu_remove_device()
which is only called by dom0 hypercall.  This not only guarantees
keeping RMRR mappings for dom0 during its booting, but also won't
impact device assignment.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-07-30 09:25:07 +01:00
Keir Fraser 1a1af72f08 pygrub: Add 64bit library path to pygrub default search path.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-30 09:23:47 +01:00
Keir Fraser 78130b8a28 xm, xenapi: Fix a problem in xm client for domain shutdown
Xm did not shut down domains anymore when run in xen-api mode due to a
'None' parameter being passed to xend when looking up a domain. This
fixes the problem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-30 09:23:11 +01:00
Keir Fraser cacc71b173 xm: Enable a bootloader when using XM via Xen-API
This enables the usage of a bootloader, i.e., pygrub, when starting a
domain using xm in Xen-API mode.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-30 09:22:24 +01:00
Keir Fraser 70a3fcfc59 x86: Fix the build after c/s 18163 (5fbcbee355e2)
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-30 09:20:42 +01:00
Keir Fraser dd6832985c xenconsoled: replace gettimeofday with clock_gettime
Currently if someone changes the date on the host, xenconsoled may
behave incorrectly due to the use of gettimeofday for the rate control
algorithm. For example I was able to hang the console connected to a
guest just setting the date forward 20 years. To solve the problem we
need to use a time source that doesn't change start point, that is
clock_gettime with CLOCK_MONOTONIC. The only bad side effect is that
it introduces a dependency to librt, but I think is well worth it.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-07-30 09:18:35 +01:00
Keir Fraser 67e5041100 rombios: Remove dead code.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-29 17:00:29 +01:00
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 b232ed1a39 Change Px control protection corresponding to changeset 18125
xen changeset 18125(ab1d7db3facb) changed some px init logic, which
has some effect to Px statistic and S3 suspend/resume logic.
This patch change Px control protection corresponding to changeset
18125.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2008-07-29 13:27:29 +01:00
Keir Fraser e8ea651a7a x86, hvm: Fix issue with user-mode writes to read-only memory.
This patch fixes an issue where a guest could get stuck if a write to
memory marked p2m_ram_ro happened from user mode. It would get
misinterpreted as a user-mode page-table write, and the "dummy write"
emulation necessary to skip over the instruction never got done. In
looking into this, I also discovered that the user-mode page-table
check is done in two places, the second (in emulate_map_dest) of which
can never be reached and is just a waste of cycles. Tim Deegan
requested that rather than completely removing that code, I'd leave it
in for debug-builds with an added warning-print.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
2008-07-29 13:24:57 +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 5c23498926 x86: reprogram LAPIC timer in pit_broadcast_exit
Thus to remove possible timer expiring delay caused by deep C state
LAPIC timer stopping.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-07-29 10:42:30 +01:00
Keir Fraser ef5cb4e6a0 vtd: Fix some dmar bugs
In acpi_parse_one_drhd(), remove return directly when only one
INCLUDE_ALL check fails, so that avoid memory leak. In addition,
remove "dmaru->scope.devices_cnt == 0 && !dmaru->include_all" check,
due to PCI-PCI bridges are not counted.

This patch fixes bug #1307.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-07-29 10:41:41 +01:00
Keir Fraser 06efa7c664 x86: fix a few page table handling issues
- adjust_guest_l?e() shouldn't be called on non-guest entries
- unadjust_guest_l3e() should be called in the back-out loop of
  alloc_l3_table()
- create_pae_xen_mappings() and pae_flush_pgd() shouldn't be called in
  the failure case of mod_l3_entry()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-07-29 10:05:32 +01:00
Keir Fraser 043521fecd Fix ia64 build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-29 09:57:14 +01:00
Keir Fraser accacb43cb Simplify 'dma heap' logic.
1. Only useful for NUMA systems, so turn it off on non-NUMA systems by
   default.
2. On NUMA systems, by default relate the DMA heap size to NUMA node 0
   memory size (so that not all of node 0's memory ends up being 'DMA
   heap').
3. Remove the 'dma emergency pool'. It's less useful now that running
   out of low memory isn;t as fatal as it used to be (e.g., when we
   needed to be able to allocate low-memory PAE page directories).

Based on patches by Andre Przywara and Xiaowei Yang.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-28 16:40:30 +01:00
Keir Fraser f5219467e7 Default dma_bitsize is 30.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-28 16:06:03 +01:00