xenstore: support building the xenstore clients statically.
This removes threading from libxenstore.a (but not libxenstore.so)
since pthreads is incompatible with static linking and none of the
command line clients require threads anyway.
It is now possible to build these utilities statically with a uclibc
toolchain which is useful for small userspace utility domains.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
x86, vmx: Enable EPT (Extended PageTable) support on new Intel processors.
We use the EPT page table as P2M (guest physical to machine
mapping), removing the linear page table when EPT is used for the
domain (see the new file p2m-ept.c). We did this by adding three
operations in the p2m_domain. If VT-d is enabled, the EPT page table
will be used as the VT-d page table as well (i.e. shared).
Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Xiaohui Xin <Xiaohui.xin@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Currently, tap:ioemu can only be used for domains which have a device
model running. This isn't the case for all domains. The most important
of the missing domains is Dom0 which needs acces e.g. to extract the
kernel from the domain's image.
tapdisk-ioemu is a tool compiled from ioemu source plus a small
wrapper which handles tap:ioemu access for domains without device
model (currently Dom0). You must start tapdisk-ioemu manually before
trying to attach a tap:ioemu disk to Dom0 at the moment. A patch to
blktapctrl will follow to automatically start tapdisk-ioemu when
needed.
Signed-off-by: Kevin Wolf <kwolf@suse.de> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
AMD IOMMU: Defer IO pagetable construction until device assignment
During HVM domain creation, I/O page tables are filled by coping p2m
entries from p2m table, which is a useless step for non-passthru
domain. This patch defers I/O page table construction until the moment
of device assignment. In case that pci devices are never assigned or
hot plugged, the unnecessary duplication will be avoided.
x86: Adjust ACPI PM1a/b event/control information retrieval
Restore the fallback to v1 fields which got removed as a side effect
of c/s 17249. Additionally, use the correct width from the tables
rather than hardcoded values. Also make the copying code more compact
by using a macro, and print the results earlier to have better
indication whether subsequent failures lead to the information
retrieved getting invalidated.
acm: Modify the default ACM boot policy so that unlabeled domains can always start
I am modifying the xen- and xend-internal default policy so that
unlabeled domains can always start. A more restrictive security policy
can then be set on top of that policy.
It has to check first if the memory to free is so big as to be freed
directly by free_pages. mini-os domains crash without this patch if
vfb is misconfigured.
- replaced VMX with HVM
- added AMD as a vendor of HVM capable processors
- removed LibVNCServer as a requirement for HVM builds
- fixed name of HVM example file
- changed default value of acpi, apic and pae options
- added hap option
- removed reference to cdrom option and integrated it into "disk"
- improved examples for disk option
- replaced vncviewer option with vncconsole
- removed obsolete ne2000 option
- replaced enable-audio with soundhw
- fixed dd usage for creating sparse files (count=0)
- remove acpi=0 hint for Windows guests
- removed reference to (obsolete?) -f option for xm create
- made shutdown advice less Linux centric
- removed comment about save/restore and migration not yet ready
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
- no need to call the colourdepth callback in text mode: the buffer
cannot be shared anyway;
- line size changes are currently undetected: since we added a
linesize parameter to the resize callback, we also need to detect
line size changes and call dpy_resize accordingly;
- 8 bit colour depth with the shared framebuffer is broken: in order
to fix it I disabled the shared buffer in vnc for the 8bit colour
depth case (it has to be done in software anyway..) and implemented
paletted colours in both opengl and sdl;
- opengl rendering is broken when there is padding in the framebuffer
lines: removing unnecessary GL_UNPACK_ALIGNMENT settings so that the
GL_UNPACK_ROW_LENGTH parameter can work properly.
hvmloader: Properly implement some more SMBIOS fields.
In particular:
- BIOS release date
- BIOS characteristics
- BIOS extended characteristics (Targeted Content Distribution is
required to be specified to pass WHQL).
- CPU speed
Based on a patch by Kamala Narasimhan <kamala.narasimhan@citrix.com>
Alex Williamson [Tue, 1 Apr 2008 15:42:52 +0000 (09:42 -0600)]
[IA64] Use ppn to store io type.
Instead of using 3 extra bits in pte to store the io type, only one bit
is used to mark the page as an IO page and the type is stored in the ppn
field. This both save 2 bits and allow many more io types.
The latest -mm kernel (2.6.25-rc3-mm1) contains v2.08 of the Linux
bzImage format which embeds an ELF file in place of the raw payload
allowing it to be extracted and used by the Xen domain builder.
It is expected that this functionality will be put forward for 2.6.26.
Keir Fraser [Mon, 31 Mar 2008 16:43:18 +0000 (17:43 +0100)]
Revert all usages of gcc's __extension__ keyword, and instead assert
that our headers are not built with __GNUC__ and __STRICT_ANSI__.
__extension__ had some weird (and buggy) behaviours when nested which
make it a risky proposition for general usage in our header
files. Better to disallow -ansi, -std=c99, and similar gcc options
when building against Xen headers.
Keir Fraser [Mon, 31 Mar 2008 15:32:33 +0000 (16:32 +0100)]
x86_64: Initialise upper half of 32-bit parameter registers when
making Target Mode BIOS call. Fixes boot problems with some buggy
BIOSes. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 31 Mar 2008 09:35:35 +0000 (10:35 +0100)]
ioemu: actually check for errors in bdrv_flush et al
bdrv_flush is declared to return void, but this is wrong because it
means that the implementations have nowhere to report their errors.
Indeed, the implementations generally ignore errors.
This patch corrects this by making it return int (implicitly, either 0
or -errno, as for other similar functions). All of the
implementations and callers are adjusted too.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Fri, 28 Mar 2008 17:50:10 +0000 (17:50 +0000)]
Clean up handling of IS_PRIV_FOR() and rcu_[un]lock_domain().
In particular this *removes* some IS_PRIV_FOR() checks. *Especially*
in particular, all domctls are executable only by dom0. Several of
them were really unsafe for execution by a stub domain as they can
affect global system resource usage.
This probably breaks stub domains. Where necessary, some of these
reversions can themselves be reverted where they are judged both
necessary and safe.
Keir Fraser [Fri, 28 Mar 2008 09:50:50 +0000 (09:50 +0000)]
ioemu: Perform emulated IDE flushes asynchronously.
Fixes 'Windows Bug Check 0x101 issue' in which a VCPU gets tied up for
so long doing a synchronous flush to disc that it misses critical
timer events.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Modified-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Thu, 27 Mar 2008 17:25:22 +0000 (17:25 +0000)]
x86_emulate: Check I/O port accesses.
Implements both CPL/IOPL and TSS-bitmap checks.
Requires changes to read/write callback hooks to disable user-access
checks when walking pagetables on behalf of GDT/LDT/TSS accesses. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
[Qemu-devel] [PATCH] qcow2: release refcount table clusters of the old
table, after growing the refcount table
http://lists.gnu.org/archive/html/qemu-devel/2007-04/msg00043.html
Keir Fraser [Thu, 27 Mar 2008 17:13:37 +0000 (17:13 +0000)]
tapdisk: Fix L1 table endianess of qcow images
Fix tapdisk to use big endian L1 tables as used by qemu/ioemu. Old
tapdisk images with native endianess are automagically converted to
big endian when the image file is opened for the first time.
Keir Fraser [Thu, 27 Mar 2008 11:39:57 +0000 (11:39 +0000)]
x86, hvm: MMIO emulations should defer domain shutdown requests until
the relevant instruction has been fully emulated (which may require
multiple round trips to qemu-dm). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 27 Mar 2008 10:52:54 +0000 (10:52 +0000)]
x86_emulate: On HVM MMIO emulation, cache the gva->pfn mapping for the
MMIO page. Speeds up Windows installation by about 20 percent. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 26 Mar 2008 15:50:45 +0000 (15:50 +0000)]
x86_emulate: HVM emulation of REP instructions should inject #PF only
if virt-to-phys lookup fails for the first repetition. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 26 Mar 2008 14:44:21 +0000 (14:44 +0000)]
ioemu: Fix L1 table endianess of qcow images created by tapdisk
The qemu/ioemu implementation of the qcow format uses a big endian L1
table. tapdisk omits the necessary conversion, so qcow images have the
wrong endianess and cannot be read by correct implementations of qcow.
This patch detects broken tapdisk images and converts their L1 tables
to big endian when the image file is opened in ioemu for the first
time. The fixed image has a new flag EXTHDR_L1_BIG_ENDIAN set in the
extended header.
Note that a converted image cannot be opened by tapdisk again.
Keir Fraser [Wed, 26 Mar 2008 13:21:42 +0000 (13:21 +0000)]
xenstored: Delay forking until after listening sockets are
opened. Also, in startup xend script, delay further startup until
xenstored initial child process has exited. This serialises xenstored
startup with that of other daemons (e.g., xenconsoled).
Keir Fraser [Wed, 26 Mar 2008 13:15:00 +0000 (13:15 +0000)]
minios: blkfront_aio_poll may reenter
if the callback calls blkfront_sync for instance.
In such a case, we would see responses and hence release grants
several times. We need to be more synchronous and stop when we detect
that we have re-entered.
This fixes HVM restore with stubdomains.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Wed, 26 Mar 2008 13:13:50 +0000 (13:13 +0000)]
minios: more assertions
- assert that we never allocate or free the same grant twice
- assert that network packets do not exceed a page
- assert that incoming network event IDs make sense
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Wed, 26 Mar 2008 09:09:16 +0000 (09:09 +0000)]
xenfb: Dynamic modes support.
Attached patch adds dynamic frame buffer size support to the xenfb PV
backend QEMU xenfb. Backend sets feature-resize and handles the
resize frame buffer event.
Corresponding frontend LINUX patch is required for functionality but
this patch is not dependent on it, preserving backwards
compatibility.