x86, hvm: If an MMIO handler returns X86EMUL_RETRY we must still
complete the dummy I/O request-response cycle. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
The new upstream xen/pci.h has a name conflict with our modified
linux/pci.h and shows up earlier in the include search path. Since
our usage of linux/pci.h is limited, rename to linux/linux-pci.h to
avoid duplicate names and cleanup the few users.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Change tasklet implementation so that tasklet_kill() does not have to
busy-wait for softirq work to start. This reduces the possibility of
deadlocks, but the implementation is now less efficient. For the
current few users of tasklets this does not matter.
x86: Emulate accesses to PCI window registers cf8/cfc to synchronise
with accesses by teh hypervisor itself. All users of cf8/cfc go
through new access functions which take the appropriate spinlock.
Based on a patch by Haitao Shan <haitao.shan@intel.com>
x86/64 compat: Replace hypervisor BUG_ON() with a cleaner hypercall failure.
While trying to run a 32-bit PV domU on a 64-bit hypervisor, I
triggered an assert in the hypervisor. The assert dealt with the
maximum number of grants that a domU can have. I made the hypervisor
a bit more graceful by returning an error rather than asserting.
Signed-off-by: Michael Abd-El-Malek <mabdelmalek@cmu.edu>
100HZ PIT timer interrupt set a 10ms upper limit for C state
residency, which makes Xen not power friendly. This patch disable PIT
timer interrupt in the conditions:
- CPU has APIC support, and
- PIT is not used as platform time source
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
libxc: Move xg_memalign() into a proper source file, so that it
definitely does not leak out of tools/libxc. Return to the
ioemu/osdep.c way of checking for posix_memalign() as this works on
Solaris.
save/restore: Use page-aligned allocations for hypercall args that are
mlock()ed across other hypercall invocations, to avoid aliasing with
other hypercall arguments, causing spurious unlocking.
ioemu: Fix rtl8139 emulation so that reboot works correctly in 64-bit
Windows VMs. Return an error if the guest OS tries to transmit a
packet with the transmitter disabled, so that it doesn't spin forever
waiting for it to complete.
Signed-off-by: Steven Smith <Steven.Smith@eu.citrix.com>
Allows TLB entries to be retained across VM entry and VM exit, and Xen
can now identify distinct address spaces through a new
virtual-processor ID (VPID) field of the VMCS.
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>
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.