Commit Graph
6575 Commits
Author SHA1 Message Date
Keir Fraser 2811570a7d Improve plumbing for calling external qemu builds
* Remove ioemu-dir before replacing it with a symlink so that
  switching between trees doesn't go wrong.
* Remove case-based arrangement for making XEN_ROOT absolute
  and replace with $(abspath ...) since we depend on GNU make
  anyway.
* `make clean' recurses into ioemu-dir

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-07-08 14:26:09 +01:00
Keir Fraser 3e56660c18 stubdom: Fix modified_memory size calculation
>> is less prioritized than -

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-08 12:24:14 +01:00
Keir Fraser a3de16cb53 pvSCSI: fix xend
Previous "xend" assumed initial Xenbus state would be "Connected" when
LUN hot-plug starts. However it was not guaranteed in general, and it
may cause some problems.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-08 09:28:50 +01:00
Keir Fraser eabcd59fd9 Fix passthrough of PCI capability structures.
Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
2008-07-08 09:26:58 +01:00
Keir Fraser 1f6e08fd7d ioemu: e1000: fix a TSE bug
Previously, all data descriptors used TSE context descriptor. It's not
correct, per spec, data descriptor uses TSE bit to indicate whether
use TSE. Legacy data descripter never use TSE.

Signed-off-by; Anthony Xu <anthony.xu@intel.com>
2008-07-07 10:29:56 +01:00
Keir Fraser 24342075ea numa: Extend MEMOP_ allocation functions to take a node argument.
The address_bits field will be limited to 8 bits and is now embedded
in the mem_flags member, which additionally contains the node number
(limited to 8 bit).

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-05 14:43:37 +01:00
Keir Fraser b12217e141 vgabios: upgrade to CVS version
cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/vgabios
co vgabios

Patchs backported:
  - vgabios: Support VESA power management extensions. (cs 17692)
  - x86, hvm: Allow Cirrus VGA BIOS to clear framebuffer with minimal
    PIO writes. (cs 16242)

This patch fixes the bug with the IDR boot CD.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-07-04 13:02:31 +01:00
Keir Fraser 52d9d32d02 Cleanups to suspend-event-channel patches.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 12:39:18 +01:00
Keir Fraser 17636f47a4 Teach xc_save to use event-channel-based domain suspend if available.
If the guest provides a suspend event channel through xenstore,
xc_save will use it in preference to the old xenstore-based method.

Xend is still informed when the domain has suspended so that it can
perform device migration in parallel with last-round migration.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2008-07-04 12:00:38 +01:00
Keir Fraser 4539594d46 Add facility to get notification of domain suspend by event channel.
This event channel will be notified when the domain transitions to the
suspended state, which can be much faster than raising VIRQ_DOM_EXC
and waiting for the notification to be propagated via xenstore.

No attempt is made here to prevent multiple subscribers (last one
wins), or to detect that the subscriber has gone away. Userspace tools
should take care.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2008-07-04 12:00:24 +01:00
Keir Fraser 5552b9af81 ioemu: Support more Capability Structures (including MSI/MSI-X)
and Device Specific Registers for pt device.

I implemented following Capability Structures and Device Specific
Registers.
    * Configuration Header Type 0
        -> emulation.
           "emulation" does not mean no accessing real I/O device.
           Access real I/O device, but guest value and real value
           might be different.
    * MSI Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * MSI-X Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * PCI Express Capability Structure
        -> emulation.
    * PCI Power Management Capability Structure
        -> emulation.
    * Vital Product Data Capability Structure
        -> emulation.
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Vendor Specific Capability Structure
        -> emulation
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Device Specific Register (exclude capability structures)
        -> passthrough.
           The device drivers in guest domain are allowed to access
           Device Specific Register. So various I/O device will work.

I assigned following device to guest domain, and they worked fine.
    - PCIe NIC (MSI)
    - PCI NIC (MSI)
    - UHCI (INTx interrupt)
    - IDE Controller (INTx interrupt)

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2008-07-04 11:54:21 +01:00
Keir Fraser 08a42ca0b5 pvSCSI: xend changes
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-03 13:39:06 +01:00
Keir Fraser d2831c8ba9 xm-test: Remove a policy reset from acm test case
Remove the resetting of the policy from this point in the test case
since the new default policy has the '__UNLABELED__' label, which is
not expected in subsequent checks.

Signed-off-by; Stefan Berger <stefanb@us.ibm.com>
2008-07-03 11:32:10 +01:00
Keir Fraser 8d574cc772 vtpm: Add two missing quotes in the vTPM hotplug script.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-03 11:31:40 +01:00
Keir Fraser c896dc3dcc ioemu: Explicitly define certain PCI/MSI macros.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-03 10:59:43 +01:00
Keir Fraser 554a3a3375 Support building of out-of-tree merged qemu from git
This provides support for building the new merged qemu from
qemu-xen.git, or from a local checkout.

The default is still to use the in-tree version, because the patchman
infrastructure for testing, and propagation from staging to
xen-unstable, needs a small amount of work to cope with git.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-07-03 10:44:13 +01:00
Keir Fraser 8e65d32968 XenAPI: Add Direct PCI Device (DPCI) Assignment Support
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-03 10:27:12 +01:00
Keir Fraser 5a940c0997 XenAPI: Add Physical PCI Device (PPCI) Support
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-03 10:26:16 +01:00
Keir Fraser de4e084064 stubdom: PCI passthrough support via PV-PCI
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-02 13:54:20 +01:00
Keir Fraser badc969545 ioemu: Add check for mapping MSI pirqs.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-02 09:45:18 +01:00
Keir Fraser aa506f9185 xend: Replace stray tab-indent with space-indent
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-07-02 09:42:37 +01:00
Isaku Yamahata 3819ac39eb merge with xen-unstable.hg 2008-07-02 11:30:37 +09:00
Keir Fraser b484177fb7 xenballoond (memory overcommit) scripts
See the README and conf files for more info.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2008-07-01 11:40:07 +01:00
Keir Fraser 9c28c1b8b9 ioemu: limit xen-console buffering
Set dom->buffer.max_capacity to xend configured limit.

Signed-off-by: Pat Campbell <plc@novell.com>
2008-07-01 11:38:51 +01:00
Keir Fraser 03f7fd7c9f xend: open qemu-dm logfile in append mode if log rotation is disabled by config.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-01 10:59:09 +01:00
Keir Fraser da67ff89f7 xend: improve the rotation of qemu-dm logfiles.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-01 10:58:43 +01:00
Keir Fraser 1be51142f1 x86_emulate: read/write/insn_fetch emulation hooks now all take a
pointer to emulator data buffer, and an arbitrary byte count (up to
the size of a page of memory).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-30 14:19:09 +01:00
Keir Fraser 04465fbeb9 blktap: Fall back to libcrypto if libgcrypt is not installed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-30 11:39:10 +01:00
Keir Fraser dd258ce6c0 tools/python: fix TypeError for 17903:0728459b3c8d
If `hda' is used in domU config file and domain-0 has /dev/hda,
creating a domain failed by TypeError:

  File "//usr/lib/python/xen/xend/server/blkif.py", line 84, in
getDeviceDetails
    (device_path, devid) = blkif.blkdev_name_to_number(dev)
TypeError: unpack non-sequence

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2008-06-30 10:02:21 +01:00
Keir Fraser 2bb1ceab62 Fix up python breakage for blkdev_name_to_number
Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-30 10:01:44 +01:00
Keir Fraser 53a29c4ca7 blktap: link against libgcrypt rather than libcrypto
tapdisk, part of blktap, links against libcrypto. tapdisk includes
GPLv2 (tapaio.c) and other licensed code (block-qcow.c). The license
of OpenSSL is considered incompatible with the GPL by many
people. This patch changes them to link against libgcrypt, which is
LGPL.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-06-30 10:00:53 +01:00
Keir Fraser 7d03c1bec2 stubdom: add live migration support by having ioemu just notify the
hypervisor about memory changes.

The impact on disk performance is typically making it from 71.5MBps
down to 70.5Mbps during the live migration. The impact on network
performance is actually even hard to measure.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-30 09:57:27 +01:00
Keir Fraser bbc24abfb2 tools/python: blkdev_name_to_number fixes
Rework blkdev_name_to_number to allow the tools to attach xvd disks
beyond xvdp.

 1.  Adds the handling for the /dev/xvd[q-z] and /dev/xvd[a-i][a-z]
     extended devices

 2.  Changes blkdev_name_to_number() to return a tuple of (xenbus,
     devnum), and then deals with the resulting fallout.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-27 16:09:58 +01:00
Keir Fraser 4fe815abd1 blktap: Extend userland busid to 32 bits
Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-27 16:08:56 +01:00
Keir Fraser da43e50cb3 hvm rombios: Move function calls out of 'post' function section
Through recent additions to the rombios the code section of the post
function has filled up considerably. When I enable the BX_TCGBIOS
compile time option the BIOS crashes since the post section code
(starts at $e05b) spills over into the nmi entry point (starts at
$e2c3). as86 doesn't cause an error when building.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-27 14:43:29 +01:00
Keir Fraser 60b316162b ioemu: Clean up after cset 17646:e3b13e1ecf6c
Remove redundant code.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2008-06-27 14:16:53 +01:00
Keir Fraser 9a5fd91e50 hvmloader: Set up any Intel ICH for legacy IDE.
Signed-off-by: Li Zhang <li.zhang@intel.com>
2008-06-27 14:15:11 +01:00
Keir Fraser c8af9ce961 tapdisk: Fix qcow2 for images > 2 GB
Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-06-27 14:03:52 +01:00
Keir Fraser 947835578c [IA64] compilation fix caused by 17880:d3a87899985d
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-20 12:26:23 +01:00
Keir Fraser a1b2027c86 Compilation fix for x86_64 caused by 17880:d3a87899985d.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-06-20 12:18:10 +01:00
Keir Fraser 50bddc9307 libxc: The following patch replace the libxc interface to use
vcpu_guest_context_any_t (which is both 32 and 64 bits) instead of
vcpu_guest_context_t.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-06-19 16:15:05 +01:00
Keir Fraser 8da3809869 ioemu: Fix usbdevice parameter to encode vbd type.
usbdevice = "disk:<filename>"
expect a raw device (as this probably is the most usual case) and
   usbdevice = "disk-qcow:<filename>"
expect a COW image (autodetected, probably qcow2).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-06-18 11:55:34 +01:00
Keir Fraser cc5871d6da ioemu: generic PCI device config-space emulation
This patch is an extension for qemu-dm to enable emulation of generic
PCI devices. The information for the PCI devices can be passed by
command line parameter.

The command line parameter is "-pciemulation" followed by the
information which contains a label and hex value of the configuration
registers separated by ":".

The configuration registers for each PCI device are below.
vendorid
deviceid
command
status
revision
classcode
headertype
subvendorid
subsystemid
interruputline
interruptpin

This is an example of command line parameter.

 -pciemulation hba1:1240:0780:0002:0:0:010000:0:10b5:0777:05:1

Signed-off-by: Shinji Matsumoto <smatsumoto@marathontechnologies.com>
2008-06-18 09:40:39 +01:00
Keir Fraser 0a8346854e ioemu: Disable format auto-probing in monitor command change
Format auto-probing of writable images is a security hole.  The last
known remaining instance is monitor command change.  Disable probing
there and use raw.  This breaks change for images in all other
formats.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2008-06-18 09:39:14 +01:00
Keir Fraser 5201eb72cb doc: Describes a generic 686 via the cpuid configure.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-06-18 09:37:40 +01:00
Keir Fraser a2c7db64f5 Add PV-GRUB
This fetches GRUB1 sources, applies the {graphical, print function,
save default, and ext3_256byte} patches from debian, and applies a
patch to make it work on x86_64 and port it to Mini-OS.  By using
libxc, PV-GRUB can then "kexec" the loaded kernel from inside the
domain itself, hence permitting to avoid the security-concerned
pygrub.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-18 09:36:47 +01:00
Keir Fraser dbd56b5c30 minios,stubdom: Add OBJ_DIR parameter to compile outside sources,
which permits to easily compile mini-os in various flavors. Also clean
some parts of stubdom build.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-17 09:36:25 +01:00
Keir Fraser 96d7365113 ioemu: move xenfb frontend (used by stubdom) to its own file, since it
does not really belong to hw/, but to /, like sdl.c and vnc.c.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-17 09:35:36 +01:00
Keir Fraser 8b53284ae7 [ACM] Pass uuid to created policy
A UUID needs to be passed to the created policy.

Signed-off-by: stefan Berger <stefanb@us.ibm.com>
2008-06-13 13:55:50 +01:00
Keir Fraser 639bf0b3c7 [ACM] Enable labeling of resources as inaccessible
Enable the labeling of (disk-type) resources with the special label
__INACCESSIBLE__ to prevent unlabeled domains from accessing them.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-13 13:55:19 +01:00