Commit Graph
1011 Commits
Author SHA1 Message Date
Keir Fraser 8bcb3b3622 minios: let events get mixed
since events do not need to be counted

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-06 16:29:01 +01:00
Keir Fraser 4fe64c6d1b shadow: track video RAM dirty bits
This adds a new HVM op that enables tracking dirty bits of a range of
video RAM.  The idea is to optimize just for the most common case
(only one guest mapping, with sometimes some temporary other
mappings), which permits to keep the overhead on shadow as low as
possible.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-02 15:08:27 +01:00
Keir Fraser b2870e0a21 libxc foreign address translation bug
In the xc_translate_foreign_address function from libxc, there is a
check on the page directory entry to see if the page is 4K or 4M.
However, the check is looking at bit 3, when it should be looking at
bit 7.  This patch fixes the problem.

Signed-off-by: Bryan D. Payne <bryan@thepaynes.cc>
2008-05-02 13:46:16 +01:00
Keir Fraser 1d45c8ef8c x86 hvm cpuid: fix some problem with the hvm's cpuid configuration.
- When we overwrite a cpuid's input, apply the default policy
    for the other registers.
  - For the python binding, get unsigned long instead long.
  - Fix the multiple inputs cpuid's configuration parsing.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-05-01 16:08:36 +01:00
Keir Fraser 85715f4bc7 MSI 5/6: add MSI support to passthrough HVM domain
Currently it only inercept access to MSI config space, no MSI-x support.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:33:03 +01:00
Keir Fraser ca0074e519 MSI 2/6: change the pirq to be per-domain
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:30:22 +01:00
Keir Fraser 5f14a87ceb x86, hvm: Guest CPUID configuration.
CPUID's replies are now pre-calculated in libxc and given to the
hypervisor via a new domctl.

There are two parts to this feature:
   - We can overwrite cpuid's replies.
   - We can check that a vm is compatible with a host's processor.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-25 13:44:45 +01:00
Keir Fraser d5a22fa12f vmx: Fix address of EPT identity-map pagetable that is passed from the
domain builder down to the hypervisor.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-24 14:33:42 +01:00
Keir Fraser 98892a5e57 tools: Build fixes for *BSD.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 16:07:30 +01:00
Keir Fraser 8a7227082a libxenguest: Fix a typo.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-11 09:07:58 +01:00
Keir Fraser 1386e66a6e 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.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 17:49:25 +01:00
Keir Fraser 3cb6817ad5 libxc: Leave portability of xg_memalign() as in original patch, rather
than following ioemu/osdep.c. This unbreaks build of readnotes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 16:54:44 +01:00
Keir Fraser 43650c346e 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.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 16:31:16 +01:00
Keir Fraser 9e4828ca8b x86 libxc: Fix mlock sizes in libxc around vcpu context hypercalls
backing off to the old behaviour if we fail.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 16:24:46 +01:00
Keir Fraser 2434aa5074 lsevtchn: Simple tool to list event channel states for a domain.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2008-04-09 16:11:34 +01:00
Keir Fraser be4ba13470 hvm: Allocate memory for hvm domains in batches.
Without this change, dom0 is unresponsive while the hvm domain's
physmap is populated in xen.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 15:25:16 +01:00
Keir Fraser 1a74322648 save/restore: Batch contiguous page-sized writes together during domain save.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 15:19:09 +01:00
Keir Fraser e90bc46da3 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>
2008-04-09 11:30:32 +01:00
Alex Williamson 0590d4e4cf merge with xen-unstable.hg 2008-04-01 11:29:03 -06:00
Keir Fraser f3bf1dc168 x86: Support loading Linux bzImage v2.08 and up.
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.

Signed-off-by : Ian Campbell <ijc@hellion.org.uk>
2008-04-01 10:09:33 +01:00
Alex Williamson 152d0f4ee0 merge with xen-unstable.hg 2008-03-20 12:35:40 -06:00
Keir Fraser f966bc9fc5 libxc: Remove permute() function from xc_domain_save().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-19 12:41:48 +00:00
Keir Fraser 8491525fc2 ia64: Fix ACPI header inclusion into libxc.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2008-03-18 21:05:47 +00:00
Keir Fraser 4097715c73 save/restore: Permute saved memory with 2MB chunk size.
The memory permutation cause a slow down in case of a save/restore
(bug 1143). It works better when the mixing is done with 2MB chunks.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-03-18 19:36:43 +00:00
Keir Fraser 86d8fe5e6a libxc: Variable-size gntdev support
This patch adds the ability to set the number of slots that may be
used for mapping grant references, using the gntdev user-space grant
reference mapping driver.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
2008-03-18 15:00:33 +00:00
Keir Fraser b9d1950675 minios: Fix lost events
evtchn_bind_interdomain used to clear any already pending event before
binding a handler, because else the handler may be called before it is
ready. That however leads to missed events, which I had to workaround
for the HVM case.

This changes the semantics of bind_evtchn, and thus of all the
event channel binding functions (bind_virq, evtchn_alloc_unbound,
evtchn_bind_interdomain) into not unmasking the event itself, hence
letting the caller initialize properly before unmasking the port (e.g.
record the port number in an appropriate place).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-18 11:29:18 +00:00
Alex Williamson d83888dbab [IA64] Remove bogus hypercall arg
privcmd_hypercall_t only has 5 args.  This causes a build failure
with gcc-4.3.  Fixes bugzilla #1186.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2008-03-10 11:55:40 -06:00
Alex Williamson 0385705bff [IA64] Initialize guest register to valid value
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2008-03-10 11:52:25 -06:00
Alex Williamson 353849ca81 [IA64] Clear console page for sioemu
This fixes a bug: by using pfn 0 for console, the page was not cleared,
sometimes causing the domain to fail to boot.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2008-02-25 06:27:21 -07:00
Alex Williamson 10d08139c5 merge with xen-unstable.hg 2008-02-19 11:14:40 -07:00
Alex Williamson abb091258c [IA64] Self IO EMUlator - tools part
Signed-off-by: Tristan Gingold <tgingold@free.fr>
2008-02-19 08:12:28 -07:00
Keir Fraser 3bbf83843c Enable HVM guest VT-d device hotplug via a simple ACPI hotplug device model.
** Currently only 2 virtual hotplug pci slots(6~7) are created so more
   than 2 vtd dev can't be hotplugged, but we can easily extend it in
   future.

Three new commands are added:
"xm pci-list domid" show the current assigned vtd device, like:
VSlt  domain   bus   slot   func
0x6      0x0  0x02   0x00    0x0

"xm pci-detach" hot remove the specified vtd device by the virtual
slot, like:
xm pci-detach EdwinHVMDomainVtd 6

"xm pci-attach DomainID dom bus dev func [vslot]" hot add a new vtd
device in the vslot. If no vslot specified, a free slot will be picked
up. e.g. to insert '0000:03:00.0':
xm pci-attach EdwinHVMDomainVtd 0 3 0 0

** guest pci hotplug
linux: pls. use 2.6.X and enable ACPI PCI hotplug ( Bus options=> PCI
hotplug => ACPI PCI hotplug driver )
windows: 2000/xp/2003/vista are all okay

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2008-02-15 14:13:17 +00:00
Alex Williamson e38c4f55fe merge with xen-unstable.hg 2008-02-14 09:34:27 -07:00
Alex Williamson 80e45574b2 [IA64] Cleanup in xc_ia64_linux_save.c
xc_ia64_shadow_control() is not needed any more
since xc_shadow_control() was xencommized.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-02-13 10:35:56 -07:00
Keir Fraser cbd2de3952 Tools: fix save/restore of 32-bit PV guests with 64-bit tools
by removing some obvious typos, handling CR3 folding and hvirt_start
based on guest word-size, and understanding 32-bit INVALID_MFN.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-02-13 10:43:13 +00:00
Keir Fraser 6e30359431 Make stubdom/Makefile override XEN_OS to MiniOS, and add
config/MiniOS.mk. Add PTHREAD_LIBS to configs (usually holding
-lpthread).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-12 15:03:07 +00:00
Keir Fraser 0243b256d6 Add stubdomain support. See stubdom/README for usage details.
- Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in
  arch_limits.h so as to permit getting them from there without
  pulling all the internal Mini-OS defines.
- Setup a xen-elf cross-compilation environment in stubdom/cross-root
- Add a POSIX layer on top of Mini-OS by linking against the newlib C
  library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c
- Cross-compile zlib and libpci too.
- Add an xs.h-compatible layer on top of Mini-OS' xenbus.
- Cross-compile libxc with an additional xc_minios.c and a few things
  disabled.
- Cross-compile ioemu with an additional block-vbd, but without sound,
  tpm and other details.  A few hacks are needed:
  - Align ide and scsi buffers at least on sector size to permit
  direct transmission to the block backend. While we are at it, just
  page-align it to possibly save a segment. Also, limit the scsi
  buffer size because of limitations of the block paravirtualization
  protocol.
  - Allocate big tables dynamically rather that letting them go to
  bss: when Mini-OS gets installed in memory, bss is not lazily
  allocated, and doing so during Mini-OS is unnecessarily trick while
  we can simply use malloc.
- Had to change the Mini-OS compilation somehow, so as to export
  Mini-OS compilation flags to the Makefiles of libxc and ioemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-12 14:35:39 +00:00
Keir Fraser 67bfbd67d1 libxenctrl headers should not pollute macro namespace with
mb/rmb/wmb. Instead add a xen_ prefix. Modify Xen's public headers to
expect the prefixed names instead of bare mb/rmb/wmb, but gate this
expectation on a bump of __XEN_INTERFACE_VERSION__.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-12 11:37:45 +00:00
Keir Fraser ce49af7f2c xend: Remove redundant xc.domain_setcpuweight() all the way down to libxenctrl.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-11 10:15:07 +00:00
Alex Williamson c5df471dc7 [IA64] Fix live migration
In live migration, a domain is paused and *entire* memory is copied
after pre-copy phase.
(i.e. live migration is not live)

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-02-07 09:19:53 -07:00
Alex Williamson 8b74529532 [IA64] Fix maximum_gpfn hypercall
HVM livemigation fails without this patch.

according to x86 side:
http://xenbits.xensource.com/xen-unstable.hg?rev/55d0a5c70986

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-02-05 09:36:48 -07:00
Keir Fraser aba29a98bc libxc: Fix the third argument of bitmap_64_to_byte in xc_tbuf_set_cpu_mask
Signed-off-by: Eric Liu <eric.e.liu@intel.com>
2008-01-31 09:39:44 +00:00
Keir Fraser aa0833890b libxc: Push parallel build of libraries down to a new phony target, as
'build' is already loaded with library dependencies on ia64.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-27 17:03:35 +00:00
Keir Fraser 9f602ddea9 libxc: Remove duplicate zlib check.
It is already checked in tools/check/check_zlib.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:53:56 +00:00
Keir Fraser be5fbf9a7f Move generation of public header hierarchy into the tools.
This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 10:38:44 +00:00
Keir Fraser 111eac9793 Use VPATH instead of symlinks for libelf inclusion into libxenctrl.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 10:15:38 +00:00
Keir Fraser 47fcfcb75b New XEN_DOMCTL_set_target
Stubdomains (and probably other domain disagregation elements too)
need to be able to tinker with another domain.  This adds IS_PRIV_FOR
that extends IS_PRIV by allowing domains to have privileges over a
given "target" domain.  XEN_DOMCTL_set_target permits to set this
"target". A new 'target' configuration option makes the domain builder
use it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-23 13:21:44 +00:00
Alex Williamson bf44bd24aa merge with xen-unstable.hg (staging) 2008-01-22 08:30:40 -07:00
Keir Fraser 2faf0fc95c Add INCLUDEDIR. Use it.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:30:21 +00:00
Keir Fraser c8107e1564 Apply PREFIX directly to LIBDIR.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:29:11 +00:00