aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ioemu/hw
Commit message (Collapse)AuthorAgeFilesLines
...
* [TPM] TIS dm suspend code fixkfraser@localhost.localdomain2007-02-061-4/+9
| | | | | | | This fixes a bug in the TPM TIS device model's state suspend code and adds some casts to variables to avoid compiler warnings. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [QEMU] Unmap video RAM before telling the guest to free it.Tim Deegan2007-02-051-15/+14
| | | | | | This avoids a lot of "freeing in-use page" errors. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Allow HVM guest to request invalidation of foreign mappings viakaf24@localhost.localdomain2007-01-271-8/+3
| | | | | an I/O port write. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* [QEMU] Clear TD status field explicitly when it's fetched.kfraser@localhost.localdomain2007-01-241-0/+8
| | | | | | | | | | | | | | | | | In current Qemu-dm, UHC will set some status bits of TD in status updating stage, but never process the status bit if relevant condition does not occur, leaving it as it is. When a TD is fetched with some status bits are set to 1, it will return to Guest OS with these bits set to 1 even this TD is executed successfully. Some Windows OS, e.g. Windows 2000, will check status bits of TD in UHC interrupt routine, treat it as a unsuccessful one if some status bits are set to 1 and discard the data. Other Windows OS just check USBSTS of UHC, ignoring status field of TD unless the value of USBSTS indicates occurrence of error. With this patch, USB mouse/tablet in Windows 2000 works correctly. Signed-off-by: Xinmei Huang <xinmei.huang@intel.com>
* [ioemu] fix build - prototype for static function needs to be static.Christian Limpach2007-01-181-1/+2
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [HVM] save restore: device model supportTim Deegan2007-01-183-0/+57
| | | | | | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> qemu's save/restore including vga acceleration support
* [HVM] Add expansion-ROM boot support again.Tim Deegan2007-01-081-0/+2
| | | | | Boot info now stored at 0x9ff00; registers saved in HDD load code. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Revert cset 13103 for now, as it is causing boot errors.Tim Deegan2006-12-221-2/+0
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [QEMU] Align VGA ram allocationTim Deegan2006-12-212-3/+9
| | | | | This makes the SSE-optimized vram_dirty() safe again. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Add expansion-ROM boot support to the ROMBIOSTim Deegan2006-12-201-0/+2
| | | | | | 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>
* [HVM] qemu mouse: Adds support for USB mouse/tablet status check andkfraser@localhost.localdomain2006-12-072-16/+39
| | | | | | | | | | | | | | | 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>
* [VTPM][HVM] Transmit the locality in which the command was sent in thekfraser@localhost.localdomain2006-12-071-3/+9
| | | | | highest 3 bits of the 4 bytes prepended to each packet. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [QEMU] Error reporting in IDE device model.kfraser@localhost.localdomain2006-12-041-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [QEMU] usb-uhci: Data buffer is too smallkfraser@localhost.localdomain2006-11-301-1/+1
| | | | | | | | 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>
* [QEMU] Simpler workaround for guest writes to PCI configkfraser@localhost.localdomain2006-11-301-16/+8
| | | | | space that extend past byte 0xff. Signed-off-by: Keir Fraser <keir@xensource.com>
* [QEMU] pci: Unaligned config read/write overflowkfraser@localhost.localdomain2006-11-281-8/+16
| | | | | | | | | | | 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>
* [QEMU] fdc: Limit sector size to 16Kkfraser@localhost.localdomain2006-11-271-1/+1
| | | | | | | | | | | | | | | 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>
* [QEMU] rtl8139: Disallow chaining above 64Kkfraser@localhost.localdomain2006-11-171-4/+4
| | | | | | | | | | | 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>
* [IOEMU] Simply fake-bios init of the piix4acpi device.kfraser@localhost.localdomain2006-11-132-12/+8
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM][IA64] Due to IPF Guest Firmware will enumerate PCI, shutdown inkfraser@localhost.localdomain2006-11-131-2/+10
| | | | | | IPF doesn't work This patch makes shutdown work for IPF. Signed-off-by, Anthony Xu <anthony.xu@intel.com>
* [IOEMU] Fix Linux smp guest hangs with complaint "BUG: soft lock detected on ↵kfraser@localhost.localdomain2006-11-131-6/+20
| | | | | | | | | | | | | | | | | | | | | | | 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>
* [HVM] Fix Qemu-dm serial issues:kfraser@localhost.localdomain2006-10-301-7/+37
| | | | | | | | | | 1. Retry transmit via a polling timer if a byte cannot be written immediately to its destination. 2. Turn off output processing of raw serial lines. Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [QEMU] Add a TIS device model compliant to the 1.2 TPM specification.kaf24@localhost.localdomain2006-10-272-0/+1117
| | | | | | | | | | | | | | | | | | | It implements all registers necessary to make the Linux TIS driver work (tpm_tis.c). All of the basic registers supported by this type of device are implemented. Also the locality selection has been implemented, but has not been tested. The legacy registers as described in the specification are not supported. Current caveat: The device has so far not yet been integrated with the virtual TPM available in the repository. It will require changes to the virtual TPM spawned by the vTPM manager to offer an additional message interface. The TIS interface itself then needs to have an additional transport implemented. (see vTPMTransmit array). The relevant specification for the device model can be found here: https://www.trustedcomputinggroup.org/groups/pc_client/TCG_PCClientTPMSpecification_1-20_1-00_FINAL.pdf Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [QEMU] ne2000: Stop memory access beyond bufferkaf24@localhost.localdomain2006-10-271-2/+33
| | | | | | | | | | | | | | | | | | As a program that runs in dom0 which serves users from guests, the qemu drivers need to be vigilant to the input that comes from the guests since they may be malicious. As it is there are multiple ways to get ne2000 to read/write memory beyond the 48K buffer that it has allocated for each adapter. This patch checks the addresses and prevents this from occuring. The boundary is checked each time since it's changed for every packet received while the other parameters are only changed (by the guest) during setup. Signed-off: Herbert Xu <herbert@gondor.apana.org.au>
* [HVM] Windows HCT requires non-zero subvendor details in platform PCI device.kfraser@localhost.localdomain2006-10-191-1/+7
| | | | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* [HVM] Enable DMA mode for CD-ROM IDE ATAPI interface.kfraser@localhost.localdomain2006-10-181-2/+2
| | | | Signed-off-by: Winston Wang <winston.l.wang@intel.com
* [HVM] Rate limit guest accesses to the qemu virtual serial port. This stopsSteven Smith2006-09-251-0/+68
| | | | | | grub's boot menu from hammering dom0. Signed-off-by: Steven Smith <sos22@cam.ac.uk>
* [HVM] Reduce VNC overhead, by (a) only scanning framebuffer when a clientSteven Smith2006-09-211-6/+7
| | | | | | | is connected, and (b) fixing an overflow bug in the scanning code which prevented the dirty bit from ever getting cleared. Signed-off-by: Steven Smith <sos22@cam.ac.uk>
* [HVM] Use the right, PCI SIG assigned, vendor ID for xensource rather thanSteven Smith2006-09-211-3/+3
| | | | | | just making one up. Signed-off-by: Steven Smith <sos22@cam.ac.uk>
* [qemu] Fix PCI config header space writes and set Subsystem-Vendor ID fields.Christian Limpach2006-08-283-0/+17
| | | | | | | | | | Fix failure in Windows HCT's PCI-Compliance-Test by invalidating the writing to read-only/reserved fields in PCI configuration space header and giving Subsystem-Vendor-ID field a valid value via copying Vendor-ID field into it. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* [qemu] hdparm tunable IDE write cache for HVMChristian Limpach2006-08-201-0/+17
| | | | | | | | | | | | | | qemu 0.8.2 has a flush callback to the storage backends, so now it is possible to implement hdparm tunable IDE write cache enable/disable for guest domains, allowing people to pick speed or data consistency on a case by case basis. As an added benefit, really large LBA48 IOs will now no longer be broken up into smaller IOs on the host side. From: Rik van Riel <riel@redhat.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Allow booting from more than one device.Christian Limpach2006-08-201-18/+26
| | | | | | | | | | The rombios supports trying to boot from more than one device and then falling back. Set 'boot=dc' in your config file to try booting first from the CD and then the hard drive. Based on a patch from: Jeremy Katz <katzj@redhat.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Support HVM guests with more than 3.75G memory.Christian Limpach2006-08-171-1/+1
| | | | | | | | | | | | | | | | | | | Changes are: 1) M2P table and e820 table are changed to skip address space from HVM_RAM_LIMIT_BELOW_4G to 4G. 2) shared io page location, when less than HVM_RAM_LIMIT_BELOW_4G memory, it's the last page of RAM as today, or it's the last page of HVM_RAM_LIMIT_BELOW_4G RAM. 3) in qemu-dm address space from HVM_RAM_LIMIT_BELOW_4G to 4G are stuffed with mfns starting from 4G, so the 1:1 mapping can still works. This is ugly, but another limit check patch as changeset 10757 will prevent qemu-dm to access this range. This ugly stuffing will be removed when the patch to remove 1:1 mapping from qemu-dm gets accepted in the future. Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Add the xen platform device to the qemu PCI bus.chris@kneesaa.uk.xensource.com2006-08-172-0/+141
| | | | | | | | Useful functionality will come later. Signed-off-by: Steven Smith <ssmith@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Move acpi to devfn 2, so that it matches the fadt.chris@kneesaa.uk.xensource.com2006-08-092-10/+7
| | | | | | Based on feedback from: Wang, Winston L <winston.l.wang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] HVM acpi port init update.chris@kneesaa.uk.xensource.com2006-08-092-5/+5
| | | | | | | | Removed the acpi port depency on USB exist. Based on a patch from: Winston Wang <winston.l.wang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Disable qemu's acpi support.chris@kneesaa.uk.xensource.com2006-08-091-1/+5
| | | | | | Based on a patch from: Wang, Winston L <winston.l.wang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Update ioemu to qemu 0.8.2. (.CVS files)chris@kneesaa.uk.xensource.com2006-08-072-72/+89
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Update ioemu to qemu 0.8.2.chris@kneesaa.uk.xensource.com2006-08-0749-2583/+11012
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Add missing semicolon.chris@kneesaa.uk.xensource.com2006-08-041-1/+1
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Update acpi timer to not use a qemu timer.chris@kneesaa.uk.xensource.com2006-08-041-113/+34
| | | | | | | | | Compute the acpi timer's value when it is accessed instead of using a qemu timer to keep it uptodate. From: Wang, Winston L <winston.l.wang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Add switch to control whether acpi bridge is enabled.chris@kneesaa.uk.xensource.com2006-08-041-1/+1
| | | | | Signed-off-by: Winston Wang <winston.l.wang@intel.com>
* [qemu] Use xenstore to configure ioemu block devices.chris@kneesaa.uk.xensource.com2006-08-031-0/+1
| | | | | | | | | | | | | - read ioemu block device config from xenstore - don't require the ioemu: prefix on block devices any longer - allow change of media associated with cdrom drives - replace cdrom= option by :cdrom suffix on regular block device config: 'file:/root/mytest.iso,hdc:cdrom,r' - don't create default cdrom drive anymore - to create default empty cdrom drive use: ',hdc:cdrom,r' Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* Rename all the CVS directories to .CVS. We want to keep the references toemellor@leeni.uk.xensource.com2006-08-014-0/+0
| | | | | | | | upstream QEMU, but they can be confusing when they are called CVS. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* [qemu] Add missing vga_bios_init call.chris@kneesaa.uk.xensource.com2006-07-271-0/+2
| | | | | | From: Zhang, Xiantao <xiantao.zhang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Initialize vga from within qemu for when the bios doesn't do so.chris@kneesaa.uk.xensource.com2006-07-261-0/+130
| | | | | | | | | | | | | On xen/x86, vga bios is copied to 0xC0000 by guest firmware. However on ia64 platform, native firmware depends on some initialization vga state at power on and so does guest firmware. That's why that vga bios initialization stub is required for vti domain, to match platform requirement. Signed-off-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* IA64-specific code for new Qemuchris@kneesaa.uk.xensource.com2006-07-261-0/+4
| | | | | | | | | Due to some ia64 patches aren't checked into xen-unstable.hg. I reversed related logic. Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Fix HVM guests with more than 2G RAM on x86_64,chris@kneesaa.uk.xensource.com2006-07-261-1/+2
| | | | | | | | where "startx" will cause qemu dm to die. Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* Add qemu 0.8.1 based ioemu.chris@kneesaa.uk.xensource.com2006-07-1276-0/+44726
| | | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* Remove qemu 0.6.1 based ioemu.chris@kneesaa.uk.xensource.com2006-07-1249-30501/+0
| | | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>