Commit Graph
341 Commits
Author SHA1 Message Date
Tim Deegan ba0f039582 [HVM] Add expansion-ROM boot support again.
Boot info now stored at 0x9ff00; registers saved in HDD load code.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-01-08 14:24:30 +00:00
Ian Campbell 49f1cd42a1 [IOEMU] Process reset requests before returning control to the guest.
Since 12899:4ae4bdee00e Xen only pays attention the first shutdown or
reboot request for a domain.

When a reset if requested we need to make the SCHEDOP_remote_shutdown
hypercall before we return control to the guest so that it wins the
"race" with the heuristic in xen/arch/x86/hvm/hvm.c:hvm_vcpu_down()
which causes a powerdown.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-03 13:55:53 +00:00
kaf24@localhost.localdomain b8da5b43b1 [QEMU] Fix a number of signedness issues plus a typo in the version checking in vnc.c.
Signed-off-by:  Anthony Liguori <aliguori@us.ibm.com>
2006-12-28 17:11:31 +00:00
Tim Deegan a20cd2c5ce [HVM] Revert cset 13103 for now, as it is causing boot errors.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-12-22 22:57:47 +00:00
Tim Deegan 95dae30a62 [QEMU] Align VGA ram allocation
This makes the SSE-optimized vram_dirty() safe again.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-12-21 13:43:19 +00:00
Christian Limpach d158b8d4ec [qemu patches] Update patches upto changeset 13113:fd1ccd818f2c.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-12-21 11:33:15 +00:00
kfraser@localhost.localdomain 878729b1cf [QEMU] Include pthread.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-21 11:06:37 +00:00
Christian Limpach 05bc927f90 [qemu patches] Update patches upto changeset 13108:ed815cbdc90e.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-12-20 15:22:46 +00:00
Tim Deegan 15fbe9ca52 [HVM] Add expansion-ROM boot support to the ROMBIOS
This is rudimentary support for parts of the BIOS Boot Specification,
just enough to use Etherboot ROM images.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-12-20 11:57:53 +00:00
Steven Hand 43bec42d59 Use portable recursive mutex in qemue mapcache.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-12-15 17:16:55 +00:00
Steven Hand 265f7f57f6 Fix deadlock when accessing IO memory.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-12-14 12:35:23 +00:00
kfraser@localhost.localdomain 3197a62daf [IOEMU] Locking needed to access mapcache.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-13 11:01:33 +00:00
kaf24@localhost.localdomain 74d9fdb147 Merge with xen-ia64-unstable.hg 2006-12-09 14:34:53 +00:00
Christian Limpach a456fc7666 [qemu patches] Update patches upto changeset 12814:c3ad3fcfe3.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-12-08 18:37:19 +00:00
Christian Limpach 2802359071 [qemu patches] Update patches upto changeset 12756:1d32fb45e0.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-12-08 18:31:01 +00:00
awilliam@xenbuild2.aw 0741834153 merge with xen-unstable.hg 2006-12-08 09:09:18 -07:00
kfraser@localhost.localdomain 0bbc8c5421 [HVM] qemu mouse: Adds support for USB mouse/tablet status check and
restricts Universal Host Controller interrupt generating when received
NAK in interrupt transfer.

According to usb spec, USB mouse/tablet device returns NAK to host
controller if its status does not alter in interrupt transfer.
And UHC should leave a TD active when receiving NAK and execute this
incompleted TD in a subseqent frame. UHC only generates an interrupt
on complete after the TD with ICO bit is completed.

This patch make UHC & USB mouse/tablet behave consistently with spec.

Signed-off-by: Xinmei Huang <xinmei.huang@intel.com>
2006-12-07 11:52:26 +00:00
kfraser@localhost.localdomain 03b88d5789 [VTPM][HVM] Transmit the locality in which the command was sent in the
highest 3 bits of the 4 bytes prepended to each packet.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-07 11:17:28 +00:00
kfraser@localhost.localdomain 56e9db683b [HVM] qemu: Add guest address-space mapping cache.
On IA32 host or IA32 PAE host, at present, generally, we can't create
an HVM guest with more than 2G memory, because generally it's almost
impossible for Qemu to find a large enough and consecutive virtual
address space to map an HVM guest's whole physical address space.
The attached patch fixes this issue using dynamic mapping based on
little blocks of memory.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-07 11:12:52 +00:00
awilliam@xenbuild2.aw 75890339a9 [IA64] Fix Vti
Use new foreign page mapping interface

Signed-off-by: Xu Anthony <Anthony.xu@intel.com>
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-12-06 02:34:46 -07:00
awilliam@xenbuild.aw 9d64d3ff83 merge with xen-unstable.hg 2006-12-05 10:01:15 -07:00
Ewan Mellor bb34321ece Tidy.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 18:05:32 +00:00
Ewan Mellor 4a0a4459e9 Fix numpad handling in QEMU's VNC server. The keymaps that we have include
information on which keys change depending upon the numlock setting, but
this isn't being used.  By forcing numlock on and off as necessary, when
receiving these keysyms through the VNC connection, we ensure that the
server's numlock status is the same as the client's.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 17:52:33 +00:00
awilliam@xenbuild.aw 793cb77839 merge with xen-unstable.hg 2006-12-04 08:24:41 -07:00
kfraser@localhost.localdomain a52cacaef9 [QEMU] Error reporting in IDE device model.
Following on from my patch to make blktap report I/O errors back to
guest OS, a similar problem exists in the QEMU codebase. The IDE
driver never reports I/O errors during read/write operations back to
the guest OS. Instead all I/O operations are reported as
succesfull. If, for example, the host FS holding the disk image fills
up, then writes may fail due to lack of space. Since the guest OS
never sees these failures, it assumes all is well & will continue
writing. Eventually this can lead to severe & unrecoverable filesystem
corruption.

The attached patch fixes QEMU ide driver such that any failure of a
read or write operation sets the appropriate IDE status/error
registers. Having read the ATA-6 spec I think the most compliant
behaviour is to set the status register to 'READY_STAT | ERR_STAT',
and the error register to ABRT_ERR. There is already a convenience
function ide_abort_command() in the QEMU codebase which does just
this, so the attached patch simply calls that function.

With this patch the guest OS sees the I/O failure & the kernel logs
IDE errors and then retries the operation. This at least ensures that
the guest can be shutdown the out of space issue in the host corrected
and the guest restarted, without any serious filesystem damage having
occurred.

From: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-04 09:29:26 +00:00
awilliam@xenbuild.aw d8b39738aa [IA64] Change to new interrupt deliver mechanism.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2006-12-01 11:40:57 -07:00
kfraser@localhost.localdomain 2a7916e953 [QEMU] Do shift-key processing in QEMU monitor terminal when connected via VNC.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-11-30 17:47:50 +00:00
kfraser@localhost.localdomain 671ac0de22 [QEMU] usb-uhci: Data buffer is too small
The data buffer is only 1280 bytes long but the user-supplied length
can be as large as 0x7ff.  This patch extends the buffer to 2048
bytes.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-11-30 17:33:11 +00:00
kfraser@localhost.localdomain c669da88e2 [QEMU] Simpler workaround for guest writes to PCI config
space that extend past byte 0xff.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-30 17:32:16 +00:00
kfraser@localhost.localdomain 2b87d5adbb [QEMU] pci: Unaligned config read/write overflow
The default config read/write handlers allows a 4-byte read/write at
address 255.  This can clobber the field after the config area.  This
happens to be the PCIBus pointer in the PCIDevice structure.

This patch stops this from reducing the read/write to the (largest
multiple of 2) number of bytes within the config area.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-11-28 13:46:10 +00:00
kfraser@localhost.localdomain b63e5446b8 [XEN] Cleanups to phys/mach address handling.
1. Balloon driver does not need to set M2P entry.
    This is done by the populate_physmap hypercall.

 2. Xen now translates foreign mappings from GMFN->MFN.
    Tools are simplified because of this.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 14:20:44 +00:00
kfraser@localhost.localdomain d81e62bebd [QEMU] fdc: Limit sector size to 16K
In fdctrl_start_transfer the sector size field (fifo[5]) is not
checked for overflows.  This allows an arbitrarily large sector size
to be used, which can in turn result in a negative data_len field that
is then used for DMA transfers.

This can lead to the corrpuption of qemu state because some subsequent
checks on the transfer length is conducted using signed integers.

This patch limits the value fifo[5] to 7 which is the standard limit
on floppy sector size.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-11-27 10:09:19 +00:00
kfraser@localhost.localdomain bbfa22f8c9 [HVM] Move PCI and PCI-ISA bridge setup to hvmloader.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-22 17:50:20 +00:00
PeterJohnston 9fd9cc0666 [QEMU] Add TCP_NODELAY to tcp connections exporting serial ports.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-11-22 09:52:48 -07:00
kfraser@localhost.localdomain d46c9ce0d7 [HVM] Reworked interrupt distribution logic.
TODO:
 1. Fix IO-APIC ID to not conflict with LAPIC IDS.
 2. Fix i8259 device model (seems to work already though!).
 3. Add INTSRC overrides in MPBIOS and ACPI tables so
    that PCI legacy IRQ routing always ends up at an
    IO-APIC input with level trigger. Restricting link
    routing to {5,6,10,11} and setting overrides for all
    four of those would work.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-21 19:22:25 +00:00
kfraser@localhost.localdomain 329f3fcc6e [QEMU] rtl8139: Disallow chaining above 64K
As it stands the 8139C+ TX chaining is only bounded by realloc failure.
This is contrary to how the real hardware operates.  It also has DoS
potential when ioemu runs in dom0.

This patch makes any attempt to chain a frame beyond 64K fail
immediately.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-11-17 10:34:08 +00:00
kfraser@localhost.localdomain 9f941deb84 [TOOLS] Provide common LFS CFLAGS/LDFLAGS additions in Rules.mk.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-17 09:54:48 +00:00
Ewan Mellor a948d5c0c0 Fix clobbering bug when hde is specified; QEMU only supports up to hdd, but
hde is accepted and writes off the end of some tables.

From Hiromichi Itou <ito@begi.net>.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-11-16 11:11:17 +00:00
kfraser@localhost.localdomain a7601b3d65 [IA64] Fix weird behaviour when configuring >3G memory for a VTI domain.
Signed-off-by, Anthony Xu < anthony.xu@intel.com >
2006-11-14 10:46:34 +00:00
kfraser@localhost.localdomain 1ec2a5bbca [IOEMU] Simply fake-bios init of the piix4acpi device.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-13 14:25:48 +00:00
kfraser@localhost.localdomain f923f3a5f1 [HVM][IA64] Due to IPF Guest Firmware will enumerate PCI, shutdown in
IPF doesn't work This patch makes shutdown work for IPF.

Signed-off-by, Anthony Xu <anthony.xu@intel.com>
2006-11-13 14:20:26 +00:00
kfraser@localhost.localdomain 10967e5464 [IOEMU] Fix Linux smp guest hangs with complaint "BUG: soft lock detected on CPU#0"
When console=ttyS0 in guest grub configuration and serial='pty' in vmx
configure file. The root cause to this bug is the characteristic of
PTY emulator in Qemu. PTY has write/read end with some buffer. Write
to a buffer will be failed after the buffer is full until read end
reads the data from buffer.

Previous to changeset 12026, write to serial port would fail quietly
when buffer for pty is full. With changeset 12026, write to serial
port would retry 3 times in 300ms if failed, even without notifying
guest using serial irq. Smp guest will hang, waiting for an
interrupt. For SMP guest, a watchdog thread should be executed
periodically, otherwise soft lockup is detected. With this patch, an
upper threshold of total consecutive retries is added and serial
interrupt would be sent after retry 3 times for each write request,
even if failed.

Signed-off-by: Xinmei Huang <xinmei.huang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-13 09:46:05 +00:00
kaf24@localhost.localdomain e4ecc8e7f7 qemu error message for xc_domain_translate_gpfn_list() failure incorrect
Signed-off-by: Russell Blaine <russell.blaine@sun.com>
2006-11-11 01:19:26 +00:00
kfraser@localhost.localdomain 74e1fab601 [HVM] Clarify ioreq interactions between Xen and qemu-dm.
Mainly this involves placing appropriate barriers before
updating the shared state variable, and after reading from it. The
model is that it is state switches that drive the transfer of data to
and fro in the shared ioreq structure. So writers should wmb() before
updating the variable; readers should rmb() after seeing a state
change.

These barriers aren't actually required given the current code
structure since the communication flow is really driven by
event-channel notifications, which happen to provide a sufficient
barrier. However, relying on this for all time and on all
architectures seems foolish and the barriers have negligible cost
compared with the totoal ioreq round-trip latency. Also the model of
communications being driven by the shared-memory state variable more
closely matches other inter-domain protocols (where there is usually a
shared-memory producer index), and is hence a model we are familiar
with and likely to implement correctly.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-10 10:30:38 +00:00
kfraser@localhost.localdomain 139d9ae4ec [HVM] Clean up IOREQ state managemnet and evtchn notifications.
Based on a patch from Xin Li <xin.b.li@intel.com>. Changed
significantly on the Xen side -- not as cut down as the original
patch: this one keeps the xen_event_channel 'API' unchanged.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-09 17:23:58 +00:00
kfraser@localhost.localdomain adf5b4e341 [IA64][VMX] Fix 3G memory limit for VTi domain.
Signed-off-by : Zhang xiantao <xiantao.zhang@intel.com>
2006-11-09 13:28:45 +00:00
kasai.takanori@jp.fujitsu.com 41002e30c7 Add the Japanese keymap for VNC Server.
Signed-off-by: Takanori Kasai < kasai.takanori@jp.fujitsu.com >
2006-11-08 09:38:06 +00:00
kfraser@localhost.localdomain 25f5b0ff15 [HVM] Replace shared-memory PIC state with a set-irq-level hypercall.
This simplifies the IRQ logic significantly and avoids the bogus
hvm_pic_assist() on domain resume path.

There is more work to be done here. At least:
 1. set-irq-level should really be set-interrupt-wire-level. Wire
    state needs to be distinguished from PIC (in particular, PIC IRR)
    state.
 2. Hypercalls can be batched in qemu and pushed down in one
    multicall.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-07 13:13:52 +00:00
kfraser@localhost.localdomain c020f83b78 Trivial change to look in correct location for qemu-dm when using the debug wrapper on a 64 bit system.
Signed-off-by: Ben Thomas <ben@virtualiron.com>
2006-11-07 09:32:02 +00:00
kfraser@localhost.localdomain 8082f8f784 [HVM] Move shadow initialisation into domain-creation hypercall.
Allocate HVM guest memory in the libxc builder function rather
than in xend. Clean up fall out from these changes.

Todo: Fix ia64. Move PV builder to same model (it should allocate the
memory rather than xend doing so -- then it can avoid using
xc_get_pfn_list()).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-01 18:37:23 +00:00