Commit Graph
17749 Commits
Author SHA1 Message Date
Keir Fraser 8a02aa347f vtd: More TLB flush fixes.
- Made the non-present flush testing a bit simpler.
 - Removed dma_addr_level_page_maddr().  Use a modified
   addr_to_dma_page_maddr() instead.
 - Upon mapping new context entry: flush old entry using domid 0 and
   always flush iotlb.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-28 16:14:10 +01:00
Keir Fraser 491c0ade25 iommu: Handle sibling device assignment correctly
Domctl interface is extended to allow libxc retrieve device group
information from hypervisor. Vendor-specific iommu_ops is also
extended by adding a new operation "get_device_group_id()", which is
currently a null pointer but could be implemented later for vt-d.

Error will be raised from tools side when user trying to assign PCI
device with a sibling device being driven by dom0. User will keep
being prompted until he has hidden the entire device group (at least,
the sibling devices driven by dom0) in dom0 kernel
parameter. Hopefully this framework could be flexible enough to
support both amd iommu and vt-d.

The following 2 cases are not covered by this patch, but should be
easy to handle.
* Checking for hot-plug devices (maybe we can delay calling
ImageHandler.signalDeviceModel() until all checks are done?)
* Checking for splitted device group between different passthru
domains

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-05-28 14:41:23 +01:00
Keir Fraser 32c028cd83 ioemu: set up all xenstore watches even if there are no VBDs.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-05-28 12:22:36 +01:00
Keir Fraser 61730c75ce grant_table: Flush host CPU TLBs during grant transfer.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-28 11:43:37 +01:00
Keir Fraser 435f3f8072 vtd: TLB flush fixups.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2008-05-28 10:05:57 +01:00
Keir Fraser cc8cdb7e47 hvmloader: No need to map shared_info page into the legacy VGA MMIO
hole. We can access address 0xfffff000 from 32-bit protected mode.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-28 10:02:00 +01:00
Keir Fraser 3113cc5e5f vtd: IOTLB flush fixups
On map: only flush when old PTE was valid or invalid PTE may be
cached.
On unmap: always flush old entry, but skip flush for unaffected
IOMMUs.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-28 09:31:49 +01:00
Keir Fraser ddbd09069c stubdom: Save main_thread value by moving it out from app_bss which
gets cleared.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-28 09:31:04 +01:00
Keir Fraser f9b4231a67 stubdom: make the build more generic by moving as many stubdom parts
into stubdom/ as possible.  That also permits to build all of
ioemu, c and caml stubdoms at the same time.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-28 09:30:48 +01:00
Keir Fraser 4151cc56f1 vtd: interrupt remapping for MSI/MSI-x.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-05-28 09:29:05 +01:00
Keir Fraser 99c3cae637 vtd: Fix bugs of ioapic interrupt remapping.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2008-05-28 09:28:42 +01:00
Keir Fraser 28d2d07fde minios: We do not need to pin the page tables, as they implicitly get
pinned when we point the permanent page directory to them.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-27 13:03:05 +01:00
Keir Fraser 530f24f8b1 ioemu: Force floppy disk images to be interpreted as raw.
Fixes specifying fda/fdb image names in domain configs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-27 11:51:33 +01:00
Keir Fraser 863d18e20d Revert 17731:eafb252f141.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-27 11:50:43 +01:00
Keir Fraser 09f9ad2f69 Fix 17725:c0c0f4fa8850: use type paddr_t instead of unsigned long for physcial memory address
Otherwise, the address overflows on PAE system with memory size > 4G.

Signed-off-by: Yang, Xiaowei <xiaowei.yang@intel.com>
2008-05-27 10:35:10 +01:00
Keir Fraser 91df8a74b6 xend: fix a typo in domain_migrate().
- @rtype:  ->  @type node:

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-27 10:31:55 +01:00
Keir Fraser 3ebb3ee816 xend: add a reset button to Web interface.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-27 10:31:25 +01:00
Keir Fraser 056f122d52 xend: take care of dead qemu-dm process
This patch fix xend as when fatal error happened (e.g. qemu-dm process
was killed) log error message then mark that domain as crashed, do
what specified on crashed in the domain config file. Added some code in
xend to check those crashed hvm DM status each 30 seconds.

Signed-off-by: Xiaowei Hu <xiaowei.hu@oracle.com>
2008-05-26 08:53:25 +01:00
Keir Fraser 2616d6e2e8 x86 hvm: Drop pagetable reference when resetting a VCPU to real mode.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-26 08:45:59 +01:00
Keir Fraser d91702d514 Fix domain names that xentop shows
When I changed the name of a domain by using xm rename command, the
name of the domain that xentop shows did not change.  This patch
reflects new domain name to the name of domains that xentop shows.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-26 08:37:43 +01:00
Keir Fraser 7ff0fc519d [IA64] remove warnings caused by c/s 17723:c684cf331f94
This patch removes the following warnings on ia64 by
including necessary header files.
On x86 the necessary files are included by recusive inclusion.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-05-26 08:27:19 +01:00
Keir Fraser 11b6a5dbe0 Fix XendAPI VM_migrate parameters
This patch removes unused resource parameter and fixes the default
value for domain_migrate. Also removes tab indent in XendOptions.py.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-26 08:26:37 +01:00
Keir Fraser 101b0e44af VT-d: flush iotlb of selective iommu when a domain's VT-d table is changed
When a domain's VT-d table is changed, only the iommus under which the
domain has assigned devices need to be flushed.

Signed-off-by: Yang, Xiaowei <xiaowei.yang@intel.com>
2008-05-26 08:25:36 +01:00
Keir Fraser 7fefb0d6ae VT-d: remove Xen and tboot range from dom0's VT-d table
This a step forward to fix the security hole introduced by dom0's 1:1
mapping VT-d table: remove the critical code and data from it. The
more flexible solution is to update dom0's VT-d table on demand as what
will be done for other PV domains. However, there could bring a
performance issue even with software optimization. Iotlb flush of some
hardware is time-consuming.

Signed-off-by: Yang, Xiaowei <xiaowei.yang@intel.com>
2008-05-26 08:24:55 +01:00
Keir Fraser a9f43ccc9e Handle IOMMU device assignment for PV guests
Added more informative error codes for device assignment domctls.
Introduced python bindings for device assignment and enable xend to
also perform IOMMU device assignment when assigning PCI devices.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:45:37 +01:00
Keir Fraser 806da17f3d Handle dynamic IOMMU map/unmap for guests
Perform IOMMU map/unmap when (a) frame type changes, (b) memory
reservation changes, and (c) a grant reference is newly mapped or
completely unmapped from a domain.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:42:02 +01:00
Keir Fraser 9df55200f7 Enable IOMMU for PV guests
Introduce 'iommu_pv' boot parameter (default off).  Added a need_iommu
flag which is set if guest has PCI devices assigned.  IOMMU page
tables are populated with current guest memory when IOMMU is first
enabled for the guest.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:37:35 +01:00
Keir Fraser ea3cb6b367 VT-d: Improve page table debug output
Ignore 'current' domain when dumping VT-d page tables.  Also add page
type summary for domain pages output.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:35:05 +01:00
Keir Fraser 70a2ba87b7 Fix iommu_unmap_page for VT-d
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:27:48 +01:00
Keir Fraser e144438c70 Remove physmap page upon granttab xfer
Mapping should be removed from current domain's p2m table when doing a
grant table transfer.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:25:04 +01:00
Keir Fraser b9920f5849 minios: Fix width of shifted 1
Shifting 1 more that 32 bits requires 1 to be long-typed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-24 09:24:25 +01:00
Keir Fraser 74c4a80c2b Cx fix - Add wrap-back calculation for 24b PM timer ticks.
Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-05-24 09:23:40 +01:00
Keir Fraser e1845bbe73 hvm: Build guest timers on monotonic system time.
Move hvm platform timers from underlying physical CPU TSC to Xen
system time and ensure domain-wide monotonicity. TSC on many systems
may skew between processors leading to 'time going backwards' messages
from some guests.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-24 09:27:03 +01:00
Keir Fraser d0f28d825e x86_emulate: Check single-step status at instruction start rather than end.
This fixes booting of FreeDOS with HIMEM.SYS enabled.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-24 08:54:59 +01:00
Keir Fraser 67ea9d3b8c rombios: Remove annoying 3-second boot delay waiting for user to hit
F10 to select boot device. This will be rarely used, and it is
possible to hit F10 before the message is displayed and the keypress
will still register. So in practice it is quite possibel to use this
boot feature reliably without needing a multi-second delay.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 11:58:08 +01:00
Keir Fraser 0f6dc9bea6 x86: Fixes to VLAPIC and S3 state resets.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 11:46:36 +01:00
Keir Fraser 2b2408c987 x86: Fix Xen boot on 8-node AMD machines
In xen/arch/x86/cpu/amd.c the function disable_c1_ramping iterates
over the northbridges using NR_CPUS as an upper bound for the number of
nodes. If there are no more northbridges found, it stops iterating.
Sadly it just adds the northbridge number to 0x18 and uses this as a
PCI device number, so probing the 9th northbridge on an 8 node system will
be caught by the newly inserted assertion in pci_conf_read in current
unstable. We fix this by first querying the number of nodes from the
first northbridge to avoid the overflow.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Verified by Mark.Johnson@sun.com
2008-05-23 11:15:19 +01:00
Keir Fraser 407c970b52 xend: Import TRIGGER_S3RESUME and HVM_PARAM_ACPI_S_STATE into XendDomain.py.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 10:57:03 +01:00
Keir Fraser 30be3112c6 rools/examples: Fix 'make install'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 10:47:16 +01:00
Keir Fraser eea031f921 Add -s --ssl option to xm migrate
This patch adds -s --ssl option to xm migrate. It will override
xend-relocation-ssl setting in /etc/xen/xend-config.sxp.

When mix deploy xen 3.2 and xen 3.3 servers, it's convenient to have a
command line option rather than modify /etc/xen/xend-config.sxp every
time.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 10:42:11 +01:00
Keir Fraser d6f7e230eb Make ssl relocation server listen on different port
This patch makes ssl relocation server listen on 8003 if enabled.

Whether to start ssl relocation server now controlled by
xend-relocation-ssl-server. So ssl and non-ssl relocation server can
run simultaneously. You can also only start ssl server or only start
non-ssl relocation server.

When mix deploy xen 3.2 server (has no ssl support) and 3.3 servers,
start ssl and non-ssl relocation server simultaneously can keep
backward compatibility.

It's also more reasonable to have separate ports for ssl and non-ssl.

In this patch, also renames xend-relocation-tls to xend-relocation-ssl.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 10:41:44 +01:00
Keir Fraser 1580fd56fd tboot, s3: Fix S3 issue of Xen and tboot, since the structure
acpi_sleep_info is changed but some of the code in Xen is not
synchronized up with this change, which causes Xen S3 failure.

Signed-off-by: Shane Wang <shane.wang@intel.com>
2008-05-23 09:48:44 +01:00
Keir Fraser 80a73755d2 Remove xend-config-xenapi.sxp and xm-config-xenapi.xml
The contents of these two files are duplicate of xend-config.sxp and
xm-config.xml. They only add maintaining burdens to developers.

This patch removes them permanently.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 09:47:45 +01:00
Keir Fraser d18d24fd1e stubdom: fix constructors/destructors in 64bit mode
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:57 +01:00
Keir Fraser 700f9d1bcf stubdom: fix and clean pthread minimal support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:43 +01:00
Keir Fraser 8543c562dd stubdom: complete libxc support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:23 +01:00
Keir Fraser 45ea543412 xend: fix automatic vcpu NUMA placement
The automatic NUMA placement code (find_relaxed_node) in
XendDomainInfo.py contains several bugs:
1. The domain just created shall not be considered in the load
calculation.
2. Nodes with too less memory for the domain must be considered during
the load calculation phase and abandoned later, currently these nodes
win with a load of 0.
3. CPUs which are offline shall not be considered in load calculation.
4. (Integer-)Dividing the load value by the number of cores per node
may conceal subtle load differences resulting in a non-optimal node to
be chosen.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2008-05-22 15:11:06 +01:00
Keir Fraser a93dfae74e libxc: drop double un?lock_pages definition to fix static linking
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:09:49 +01:00
Keir Fraser cf6e75bd08 stubdom: support constructors and destructors
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:09:08 +01:00
Keir Fraser 178dcab520 ioemu: drop unused shared_vram variable
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:08:48 +01:00