Commit Graph
18064 Commits
Author SHA1 Message Date
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 0f32af075d x86: Report TSC skew on boot at higher log level.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-15 17:58:39 +01:00
Keir Fraser 161abf599d x86: Ensure TSC calibration stats are same across all CPUs when
running with clocksource=tsc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-15 17:57:00 +01:00
Keir Fraser 991ead8fa2 x86: No need to vcpu_update_system_time() on map_vcpu_info().
Also, ensure update_vcpu_system_time() triggers at least once for any
given vcpu, even if the TSC stamp is zero.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-15 17:56:25 +01:00
Keir Fraser cd99b8bf59 xen: Small cleanups towards allowing stricter compile warnings.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-15 16:13:46 +01:00
Keir Fraser ae1810b326 iommu: disable by default. 'iommu' on cmdline to enable.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-15 15:36:50 +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 032a69e5b7 x86: Add clocksource=tsc option.
This option should only be used on machines where TSC is known to be
synchronized across all processors.  A future TODO is to dynamically
determine if this is the case.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-15 14:04:02 +01:00
Keir Fraser 6b5149ae9a x86: platform-timer read function returns 64 bits.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-15 13:36:22 +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 533a2a2773 stubdom: enable compilation/installation by default
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-14 15:21:03 +01:00
Keir Fraser 1161d825c9 vt-d: Disable VT-d if parsing ACPI DMAR fails
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-07-14 15:20:35 +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 3eab82196b x86: PIT broadcast to fix local APIC timer stop issue for Deep C state
Local APIC timer may stop at deep C state (C3/C4...) entry. Initial
HPET broadcast working in legacy replacing mode, broke RTC intr, so
was bypassed. This patch add the logic that use platform timer (PIT)
to reenable local APIC timer at C state entry/exit.

Currently, only keep PIT enabled with 100Hz freq. The next step is
trying to dynamically enable/disable PIT while needed, and give it
lower freq.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-14 10:43:32 +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
Keir Fraser 910ece4291 vt-d: Remove the FLR logic in Xen.
The current simple logic has some issues: 1) Dstate transition is not
guaranteed to properly clear the device state; 2) the current code for
PCIe FLR is actually buggy: PCI_EXP_DEVSTA_TRPND doesn't mean the
completion of FLR; according to the PCIe spec, after issuing FLR, we
should wait at least 100ms.

The improved FLR logic will be added into xend.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-14 10:10:14 +01:00
Keir Fraser 6769cc1b63 xend: A small cleanup to the find_sysfs_mnt() of pci.py
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-07-14 10:09:25 +01:00
Keir Fraser 3eca2c8953 ioemu: sdl without OpenGl fix
Signed-off-by: Frederic Guihery <sygus@cat-lan.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-07-14 10:07:11 +01:00
Keir Fraser 96f900ef40 Choice of network interface for establishing a bridge on if NFSROOT is used
This patch fixes a problem related to machines that are booted using
nfsroot ( '/' provided via nfs). Previously the code was assuming that
nfsroot would be provided via eth0. Now this additional code checks
over which interface the nfsroot is provided after detecting that
nfsroot is actually being used. To determine from where nfsroot is
mounted I am reading the kernel command line (/proc/cmdline) and
filter for an argument starting with 'nfsroot=' and determine the nfs
server's IP address by assuming the format 'nfsroot=<ip
adddress>:<path to root>' - if there's a better way of doing this,
please let me know.  After that I determine the interface over which
this IP address would be accessed using 'ip route get <address>'. Then
I compare that interface against a previously determined default
interface and if they are equal return a value that causes an
alternative interface to be chosen.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-14 10:04:41 +01:00
Keir Fraser 121068a2ce blktap: portability cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-14 10:03:09 +01:00
Keir Fraser 658d12570b stubdom: missing fixes for old gcc
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-14 10:00:47 +01:00
Keir Fraser 0e5b7a7991 stubdom: fixes for old gcc & binutils
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-11 15:37:31 +01:00
Keir Fraser 962649c369 blktap: cleanup
Make functions w/o a prototype static and remove redundant
declaration of xs_fire_next_watch().

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-11 15:36:40 +01:00
Keir Fraser 0373c0538d libxc: remove redundant declaration of xc_copy_to_domain_page().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-11 15:35:50 +01:00
Keir Fraser 41296317a3 x86: allow control domain to limit machine addresses given to a particular guest
This allows domains which make buggy assumptions about the maximum
possible MFN to be worked around.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-07-11 12:51:26 +01:00
Keir Fraser 04e28c8d4f iommu: make interrupt remapping more generic
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-11 12:49:14 +01:00
Keir Fraser 443d1f9180 amd iommu: add interrupt remapping support
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-07-11 12:48:45 +01:00
Keir Fraser b7e17149f3 xend: Ignore errors from dying domains in RPC server
When a domain is in the process of shutting down there is a small
window when the domain is known to XenD, but it will be unable to form
an SXPR for it due it being in the middle of device hot-unplug. This
causes the 'xm list' command to totally fail with an error like

# xm list
Error: Device 0 not connected
Usage: xm list [options] [Domain, ...]

The 'xm list' command calls into the 'domains' method of
XMLRPCServer.py in XenD. This method just iterates over the list of
domains, fetching the sxpr for each in turn, but with no exception
handling. So if a single domain fails to generate an sxpr, no data is
returned even for other domains which are still functional.  This
patch simply makes XenD ignore and skip over domains which throw an
exception, logging the problematic domain.

NB, this problem only hits 'xm list' if it is configured to use the
legay XMLRPC server instead of XenAPI.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2008-07-11 12:47:50 +01:00
Keir Fraser 7acbaf60a9 vt-d: Fix Host Address Width
Host Address Width of the platform should be computed as N+1,
where N is the value reported in dmar acpi table.

Signed-off-by: Ameya Palande <2ameya@gmail.com>
2008-07-11 12:46:33 +01:00
Keir Fraser e7329de453 stubdom: do not use realpath, new in make 3.81
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-11 12:45:06 +01:00
Keir Fraser a896e816af Fix memory leak in xend
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-07-11 12:44:15 +01:00
Keir Fraser 1d36727c99 tapdisk: in case O_DIRECT fails, retry again with o_flags but
O_DIRECT, instead of fixed value O_RD_WR | O_LARGEFILE

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-11 12:43:33 +01:00
Keir Fraser 6726d096a3 ioemu: drop shadow vram
We can now actually drop the shadow vram entirely thanks to dirty page
tracking.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-11 12:33:00 +01:00
Keir Fraser f178c63b8f hvmloader, rombios: Make use of new rom-lock facility in ioemu platform device.
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-11 12:31:32 +01:00
Keir Fraser 2075af1e29 vt-d: Fixup when mapping devices on non-PCIe buses
The source-id for transactions on non-PCIe buses seem to originate
from devfn=0 on the secondary bus behind the bridge.  Map that ID as
well when assigning the device.  The ID to use in these scenarios is
not particularly well documented anywhere.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-07-10 17:33:23 +01:00
Keir Fraser d91284f888 ioemu: drop unused 4MB video memory
Since we only emulate the cirrus VGA video card which is only able to
expose 4MB video memory, we don't need more than that.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 17:29:06 +01:00
Keir Fraser ed753cd3a5 ioemu: create a rom-protect platform flag.
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-10 16:15:37 +01:00
Keir Fraser 5fd92b77dc x86 hvm: New boot option 'softtsc' to cause RDTSC to be trapped-and-emulated.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-10 15:45:18 +01:00
Keir Fraser 49ecbb58e0 stubdom: Fixes for gcc 4.2.4 32bit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 15:32:18 +01:00
Keir Fraser 51cf89ed5d x86 hvm: New hvm_op "set_mem_type" which allows marking ram page
ranges as ro, rw, or mmio_dm.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
2008-07-10 15:30:39 +01:00
Keir Fraser 4d8aa29d65 x86: Do not allow write access to p2m_ram_ro memory type.
Log and discard such access attempts.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-10 15:19:56 +01:00
Keir Fraser b1ba2dc8be PV-GRUB: Enable xfs support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 14:20:15 +01:00
Keir Fraser c5f917328e PV-GRUB: xfs support
i386 doesn't have PAE anyway.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 14:17:28 +01:00
Keir Fraser 8f96998338 stubdom: fixes to compile with qemu-xen
This adds fixes to the stub domain build into compiling Ian Jackson's
qemu-xen.  The most notable change is that mini-os headers now
#include each other through a mini-os/ prefix, so that we can turn all
-I into -isystem and still be sure that we include Mini-OS headers
(and not qemu's console.h or blktaplib's list.h for instance...).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 14:15:46 +01:00
Keir Fraser 79961b311e intel: Stricter check for cpuid feature mask MSR availability.
Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Jun Nakajima <nakajima.jun@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-10 11:26:42 +01:00
Keir Fraser 658233700e vt-d: Fix double spin_lock_irqsave().
The duplicate spin_lock_irqsave() flushes the original EFLAGS saved,
and thus disables local irqs permanently.

Signed-off-by: Xin, Xiaohui <Xiaohui.xin@intel.com>
Signed-off-by: Tian, Kevin <Kevin.Tian@intel.com>
2008-07-10 10:07:32 +01:00
Keir Fraser a4a2f4a813 Fix a couple of Grzegorz Milos copyright lines.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-10 10:02:15 +01:00