[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.
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
I have added CONFIG_PASSTHROUGH in ioemu/Makefile.target and
ioemu/hw/pc.c in attached vtd_tools2.patch. This should turn off
libpci usage by default until user specifically enables it.
This can be safely check-in without breaking builds for people who do
not care about pass-through devices. I will try to think of a better
way to enable this.
Signed-off-by: Allen Kay <allen.m.kay@intel.com> Signed-off-by: Guy Zana <guy@neocleus.com>
Ian Jackson [Fri, 23 May 2008 17:43:27 +0000 (18:43 +0100)]
Fix COW extendability for vulnerability fix.
(Thanks to report from Daniel Berrange.
Corresponds to my email to xen-devel of 2008-02-27
Subject: Re: [Xen-devel] [PATCH] ioemu block device extent checks.)
Ian Jackson [Fri, 23 May 2008 17:20:55 +0000 (18:20 +0100)]
Merge changes from xen-unstable 17647 with relevant upstream changes.
Now we consider ourselves up to date with
(a) upstream as recorded by git
(b) xen-unstable 17647:f12724194ec6
This was achieved by copying these files
console.c
console.h
hw/cirrus_vga.c
hw/cirrus_vga_rop.h
hw/cirrus_vga_rop2.h
hw/vga.c
hw/vga_int.h
verbatim from the crazy branch vga-reverse-merge, current head
commit cc011fdf74a616fec9ab6841026c5e7121c0dce3.
We have effectively overwritten these files from qemu with those
from xen-unstable and then cherry-picked changes from qemu mainline.
Ian Jackson [Mon, 19 May 2008 15:21:52 +0000 (16:21 +0100)]
Send unit_attention on cd-rom not_ready to ready transition
Patch sends a UNIT_ATTENTION(6), MEDIUM_MAY_HAVE_CHANGED(0x28) sense
when cdrom transitions from not ready to ready.
I used the following documentation:
ATA Packet interface for CD-ROMS, SFF8020i.pdf. See state diagram Figure
12, page 82 and Table 44 -recommended Sense Key, ASC
With patch in place HVM win2008 server guest sees the CD/DVD contents
have changed when the media is switched.
Ian Jackson [Fri, 16 May 2008 16:04:57 +0000 (17:04 +0100)]
pci.c: restore bus-level pci interrupt state via pci_set_irq
This change abolishes pcibus_save. Instead we use an invariant - that
device interrupts are supposed to be reflected in the bus interrupt
state - to restore the bus interrupt state.
This makes the code smaller and removes one way in which a savefile
could be corrupted (eg, if it had been generated by a buggy emulator).
It also means that systems which do some of their own PCI bus
emulation and thus reflect PCI bus state elsewhere (eg CPU acclerators
such as Xen) get notified of the PCI bus interrupt level, via
pci_set_irq's call to bus->set_irq.
Ian Jackson [Fri, 16 May 2008 16:01:12 +0000 (17:01 +0100)]
register_savevm etc.: make save function optional
This allows a device to provide only a loading function, not a saving
function.
This is useful if a later version of an emulation restores its state
in some other way (eg by having a different device name, or by
exploiting invariants in the state); when this happens it is still
necessary to load or skip the information when it is found in old
savefiles.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 14 May 2008 15:55:37 +0000 (16:55 +0100)]
Do not kill ioemu if undefined LSI-SCI registers are read.
Imported changeset from xen-unstable:
changeset: 14902:a7bd11fd5b1b6f4a82135db09dfe654e8966fabe
user: kfraser@localhost.localdomain
date: Tue Apr 24 12:12:48 2007 +0100
files: tools/ioemu/hw/lsi53c895a.c
description:
qemu: Do not kill ioemu if undefined LSI-SCI registers are read. Just
return zeroes. This path is triggered by ASPI8DOS.SYS in DRDOS. Signed-off-by: Keir Fraser <keir@xensource.com>
However, this behaviour change was inexplicably made conditional on
CONFIG_DM. I have removed the conditionality.
Merge was relatively straightforward. Specific comments follow:
hw/serial.c
Have kept the Xen rate limiting rather than
the qemu version. The Xen version does an overall
rate limit but doesn't adjust according to the
baud rate. The qemu version is just a maximum
burst (so no overall capacity limit) but does
depend on the baud rate.
vl.c
Several dummy functions helpfully moved into
target-* directories; I put them in a new
i386-dm/machine.c for now.
edgar_igl [Tue, 13 May 2008 10:59:14 +0000 (10:59 +0000)]
CRIS: Improve TLB management and handle delayslots at page boundaries.
* Dont flush the entire qemu tlb when the $pid changes. Instead we go through
the guests TLB and choose entries that need to be flushed.
* Add env->dslot and handle delayslots at pageboundaries.
* Remove some unused code.