Ian Jackson [Wed, 9 Jul 2008 11:32:09 +0000 (12:32 +0100)]
Store pty name in xenstore for the benefit of the tools.
This is a rather intrusive patch, because we need a mechanism to get
the ptsname out of the guts of the qemu startup code. This is a
first cut of such a thing which might eventually go upstream.
The main new interface is chr_getname, a new CharDriverState method.
If implemented it returns "<type> <name>" where currently "<type>" is
"pty" for ptys. If not implemented the function pointer may be null.
We import store_dev_info from xen-unstable (17987:9b35ae586cb8) and
eviscerate it appropriately.
Ian Jackson [Wed, 9 Jul 2008 10:38:33 +0000 (11:38 +0100)]
Do not rebuild every time ./xen-setup is run.
This involves saving config-host.h while we rerun config and
regenerate it, putting the saved version back, and then installing
the new version only if it has changed.
Ian Jackson [Tue, 8 Jul 2008 09:29:37 +0000 (10:29 +0100)]
fix disk format security vulnerability; do not guess format for qcow vbds
These are the accidentally dropped hunks of xen-unstable 17606 and 17646.
Particularly, 17606 is important:
* make the xenstore reader in qemu-dm's startup determine which
of qemu's block drivers to use according to the xenstore
backend `type' field. This `type' field typically comes from
the front of the drive mapping string in ioemu. The
supported cases are:
xm config file string `type' image format qemu driver
phy:[/dev/]<device> phy raw image bdrv_raw
file:<filename> file raw image bdrv_raw
tap:aio:<filename> tap raw image bdrv_raw
tap:qcow:<image> tap not raw autoprobe
tap:<cow-fmt>:<image> tap named format bdrv_<cow-fmt>
It is still necessary to autoprobe when the image is specified as
`tap:qcow:<image>', because qemu distinguishes `qcow' and `qcow2'
whereas blktap doesn't; `qcow' in xenstore typically means what
qemu calls qcow2. This is OK because qemu can safely distinguish
the different cow formats provided we know it's not a raw image.
Ian Jackson [Mon, 7 Jul 2008 14:30:10 +0000 (15:30 +0100)]
Fix remaining missing changes to update to xen-unstable 17958.
We had accidentally dropped some changes from 17737 to 17831.
Fixed by in xen-unstable:
hg update 17737
patch -p1 < vga-patch-from-xen-unstable-17737:c93a913c221f
hg diff -r 17831 tools/ioemu >patch
and then in qemu.git:
patch -R -U -p3 <.../patch
and fix up conflicts, which were:
Makefile.target - stubdom changes, defer for now
hw/vga.c - one easy fixup, one change already in our tree
hw/xenfb.c - already done completely earlier, so discard changes
Ian Jackson [Fri, 4 Jul 2008 15:35:26 +0000 (16:35 +0100)]
Merge with xen-unstable tip 17958
This was achieved with
hg diff -r{17831,17958} tools/ioemu
and feeding the result to patch and fixing up conflicts.
As an exception, xenfb.c was done the other way around:
* hg update 17737, apply vga-patch-from-xen-unstable-17737\:c93a913c221f
* diff that against git 79a235b20a6833fe5bdc78b52921cdd2ad12f284
(current qemu-xen tip)
* cp hg 17958's xenfb.c into git, apply patch from above, fixing up
changes; one change dropped (removal of call to fbfront_resize
in xenfb_pv_resize_shared)
Ian Jackson [Wed, 2 Jul 2008 17:38:07 +0000 (18:38 +0100)]
qemu-xen: Fix extendable images
bdrv_file_open should specify raw image format instead of
guessing. This fixes a segfault when bdrv_open2 wants to access
drv->flags. bdrv_file_open is used at least by qcow2.
Additionally, move the extensible flag from bdrv_host_device to
bdrv_raw. qcow2 wants to open the image file as an extensible file.
Ian Jackson [Tue, 1 Jul 2008 17:45:10 +0000 (18:45 +0100)]
blktap: Automatically start tapdisk-ioemu on demand
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.
Ian Jackson [Thu, 19 Jun 2008 09:21:17 +0000 (10:21 +0100)]
Set VNC password from xenstore.
Upstream doesn't appear to have a way to set the password other than
from the monitor, so we introduce this which is a bit messy.
When upstream's new option/config parsing is merged, we should make a
patch for upstream with a config option to read the password out of a
file or fd, and use that.
Ian Jackson [Thu, 12 Jun 2008 17:21:08 +0000 (18:21 +0100)]
New scriptarg=... -net parameter allows passing of an argument to the script.
Previously, network scripts would have to do all of their work based
only on the script name and interface name. If the script's behaviour
is supposed to be different for different network interfaces this
might involve constructing a special script for each interface with
the associated need to delete it etc.
With this patch it is possible to specify
-net=...,scriptarg=<extra-info>
which gets passed as a $2 to the qemu-ifup script.
Ian Jackson [Wed, 4 Jun 2008 17:14:41 +0000 (18:14 +0100)]
Update to xen-unstable 17737 plus ds->resize_shared vs. ds_resize
This one commit contains two substantial sets of changes:
* All changes from xen-unstable from 17647 to 17737:c93a913c221f
* Shared display buffer API revamp
Patch from Stefano Stabellini <stefano.stabellini@eu.citrix.com>, to
do shared display buffer stuff with a different (backward-compatible)
API which avoids having to change all of the other display hardware
models. Stefano tells me this patch is likely to break stubdom in
its current state.
The commit is the result of applying Stefano's patch to xen-unstable
hg 17737, then running hg diff -r17647 tools/ioemu, applying the
output to the git tree with patch, and fixing up the conflicts (which
were easy).
To make future merges easier, I have included Stefano's patch rebased
to 17737 (the result of hg diff -r17737 from the above hg tree) here,
so that the base point for a future merge to a new xen-unstable tip is
easy to recreate.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 4 Jun 2008 15:39:35 +0000 (16:39 +0100)]
Add includes for xenstore.c for now.
We plan to get rid of xenstore.c, but for now to get helper2.c to
compile I've copied the declarations for functions in xenstore.c from
xen-unstable 17737:c93a913c221f.
Ian Jackson [Mon, 2 Jun 2008 14:37:15 +0000 (15:37 +0100)]
Initialise vga_ram_addr to 0.
This is not used in the Xen case. In xen-unstable NULL is passed
directly in the calls to the various vga_init functions; in this
version we set vga_ram_addr to 0 as that's textually a smaller change.
[QEMU-DM] Modem control line & msl/mcr register support.
This patch enables handling of the modem/flow control lines of a
serial port when the backend for the virtual port is a physical serial
port. During initialization, it tries to load the msr with the
detected status from the real port (this is consistent with physical
uart, which starts with its msr values set according to the status of
the modem status lines). If the ioctl returns -ENOTSUP, then the code
assumes the backend is not a real serial port and will disable any
further attempts to manipulate or read the physical port's line
status.
It's tries to be as "correct" as possible in its msr/msl handling,
with the exception of modem line status change interrupts. A real
16550 uart apparently have a delay time of 250ns between when a modem
status line changes and the IRQ line goes high. In this patch, an
"idle" port is polled for line status changes only if the guest has
enabled UART_IER_MSI is enabled, and only polled every 10 ms.