aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ioemu/target-i386-dm
Commit message (Collapse)AuthorAgeFilesLines
...
* hvm ioemu: Avoid accessing invalid pseudophysical addresses in HVMKeir Fraser2007-04-091-20/+5
| | | | | guest's memory map. Signed-off-by: Keir Fraser <keir@xensource.com>
* PV-on-HVM: Add new ioreq 'invalidate' for zapping ioemu-dm mapccahekfraser@localhost.localdomain2007-04-051-2/+5
| | | | | | | | | | | | | after balloon operations in an HVM guest. This removes the I/O port hack from the guest OS, and from ioemu. Also we flush on reservation *increases* as well as decreases. This is necessary until qemu-dm can demand-fault page mappings into existing valid buckets. Signed-off-by: Steven Hand <steven@xensource.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* hvm: x86 ioemu-dm does not need a memory-size parameter on the command line.kfraser@localhost.localdomain2007-04-041-8/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Remove hvm_drain_io() hypercall, simplify qemu main loop and do notkfraser@localhost.localdomain2007-04-041-46/+15
| | | | | | pause the domain on reboot (not necessary and defeats new deferred shutdown logic). Signed-off-by: Keir Fraser <keir@xensource.com>
* [hvm] Keep track of time offset between domain time and dom0 time.Christian Limpach2007-04-031-0/+33
| | | | | | | | | | On each rtc time update from the hvm domain, we send an ioreq request to qemu which then updates the time offset xenstore entry. The time offset is preserved across reboot and can be set on domain creation by setting the rtc_timeoffset variable in a config file. From: Andrei Petrov <andrei.petrov@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* hvm ioemu: Add support for IOREQ_TYPE_XCHG in qemu-dm.kfraser@localhost.localdomain2007-03-161-0/+15
| | | | | From: Trolle Selander <trolle.selander@gmail.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM][QEMU] Save/restore: enable HVM live migrationTim Deegan2007-03-161-1/+15
| | | | | by getting page-dirtying bitmaps from qemu-dm as well as from xen. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Save/restore: make sure all ioreqs are gone when a domain is savedTim Deegan2007-03-081-0/+21
| | | | | by pausing the domain and pulling them through. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* ioemu: Remove use of 'echo -c' in script.kfraser@localhost.localdomain2007-03-071-2/+1
| | | | | | | I've no idea what it does, and it doesn't appear to be valid on some systems. Use a more generic approach. Signed-off-by: Ben Thomas <ben@virtualiron.com>
* [HVM] Allow HVM guest to request invalidation of foreign mappings viakaf24@localhost.localdomain2007-01-271-11/+1
| | | | | an I/O port write. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* [HVM] save restore: device model supportTim Deegan2007-01-181-1/+14
| | | | | | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> qemu's save/restore including vga acceleration support
* [IOEMU] Process reset requests before returning control to the guest.Ian Campbell2007-01-031-0/+21
| | | | | | | | | | | | 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>
* [QEMU] Include pthread.h.kfraser@localhost.localdomain2006-12-211-0/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Use portable recursive mutex in qemue mapcache.Steven Hand2006-12-151-7/+28
| | | | Signed-off-by: Steven Hand <steven@xensource.com>
* Fix deadlock when accessing IO memory.Steven Hand2006-12-141-1/+1
| | | | Signed-off-by: Steven Hand <steven@xensource.com>
* [IOEMU] Locking needed to access mapcache.kfraser@localhost.localdomain2006-12-131-1/+10
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM] qemu: Add guest address-space mapping cache.kfraser@localhost.localdomain2006-12-072-5/+15
| | | | | | | | | | | | | 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>
* [HVM] Move PCI and PCI-ISA bridge setup to hvmloader.kfraser@localhost.localdomain2006-11-221-246/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM] Reworked interrupt distribution logic.kfraser@localhost.localdomain2006-11-212-1/+398
| | | | | | | | | | | | | 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>
* [HVM] Clarify ioreq interactions between Xen and qemu-dm.kfraser@localhost.localdomain2006-11-101-15/+23
| | | | | | | | | | | | | | | | | | | | | | 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>
* [HVM] Clean up IOREQ state managemnet and evtchn notifications.kfraser@localhost.localdomain2006-11-092-12/+3
| | | | | | | 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>
* [HVM] Replace shared-memory PIC state with a set-irq-level hypercall.kfraser@localhost.localdomain2006-11-071-41/+1
| | | | | | | | | | | | | | 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>
* Trivial change to look in correct location for qemu-dm when using the debug ↵kfraser@localhost.localdomain2006-11-071-1/+6
| | | | | | wrapper on a 64 bit system. Signed-off-by: Ben Thomas <ben@virtualiron.com>
* [HVM] Use correct types for guest physical addressesTim Deegan2006-10-311-31/+31
| | | | | | Guest physical addresses are not guaranteed to fit in either a pointer or an unsigned long int; use paddr_t for them. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Add support for 'add r8,m8' instruction to memory-mapped I/O.kfraser@localhost.localdomain2006-10-311-0/+18
| | | | | Signed-off-by: Kevin Tronkowski <ktronkowski@virtualiron.com> Signed-off-by: Ben Thomas <bthomas@virtualiron.com>
* [HVM] Fix qemu's test for whether physcal addresses are RAM.Tim Deegan2006-10-261-20/+30
| | | | | | HVM guests have a memory hole below 4GB, so can't just check whether addresses are < the amount of RAM allocated. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Move RTC emulation into the hypervisor.kfraser@localhost.localdomain2006-10-181-0/+107
| | | | Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
* [HVM] qemu should wait 10ms, rather than 100ms, between running its timers.Steven Smith2006-09-271-2/+2
| | | | Signed-off-by: Steven Smith <sos22@cam.ac.uk>
* [tools] Increases some of the timeoutsChristian Limpach2006-09-211-2/+2
| | | | | | | | since e.g. stealing the hotplug lock after five seconds is completely insane. From: Steven Smith <sos22@cam.ac.uk> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu/ia64] Sync ID cache only guest do DMA read.chris@kneesaa.uk.xensource.com2006-08-151-3/+3
| | | | | | | | | Fix ID cache sync time. Only when guest does DMA read, ID sync cache is needed for VTi. From: Zhang, Xiantao <xiantao.zhang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [hvm/qemu] Add HVM buffered IO writes framework to accelerate stdvga speed.chris@kneesaa.uk.xensource.com2006-08-091-24/+64
| | | | | | | | | | With this patch, win2k VMX guest boots fine on xen. Signed-off-by: Zhu Han <zhu.han@intel.com> Signed-off-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [hvm/qemu] Flip the device model over to using the new Xen event channelssos22@douglas.cl.cam.ac.uk2006-08-081-7/+12
| | | | | | | | support. Signed-off-by: Steven Smith <ssmith@xensource.com>
* [qemu] Fix reads on unreported memory addresses.chris@kneesaa.uk.xensource.com2006-07-281-2/+6
| | | | | | | | | | | The function cpu_physical_memory_rw() thinks that if an address is not mmio-related, it is assumed to be a RAM case. This is improper. When making the assumption, we should make sure the address is less than the guest physical memory size ram_size. From: Cui, Dexuan <dexuan.cui@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* IA64-specific code for new Qemuchris@kneesaa.uk.xensource.com2006-07-262-0/+24
| | | | | | | | | 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>
* Fix cirrus and rt8139 co-exist issue in new qemu-dm.chris@kneesaa.uk.xensource.com2006-07-261-1/+1
| | | | | | | | | The root cause is that if two MMIO spaces are continuous, qemu may misuse last MMIO space's read/write to handle current request. Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* Add qemu 0.8.1 based ioemu.chris@kneesaa.uk.xensource.com2006-07-126-0/+1227
| | | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* Remove qemu 0.6.1 based ioemu.chris@kneesaa.uk.xensource.com2006-07-124-962/+0
| | | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [HVM] ACPI support patch 1 of 4: main components.kaf24@firebug.cl.cam.ac.uk2006-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch support ACPI UP Guest Windows 2000, XP and 2003, based on this we are going to add more support on SMP and 64bit Windows( which are only working in ACPI mode) later. We tested: in ia32 guest: a. Installation and boot of Windows XP sp2 and 2003 server in ACPI mode b when boot to both window, no yellow mark in device manger and USB, network card and IDE DMA are working. c. clean boot (without ACPI related errors) on UP and 4 vcpu rhel4u1 SMP guest and got ioapic Interrupt assigned according to ACPI DSDT table's _PRT table's GSI. To minimize the implementation efforts to satisfy the ACPI OS installation and boot, we implemented ACPI only event logical model by emulating ACPI hardware based on PIIX4 (Intel 82371ab) by: Populating the PIIX4 ACPI bridge PCI configuration space; Adding ACPI timer (required during windows installation/boot), PM1 event register block and PM1 control register block (both are required during installation/boot, shutdown, entering and leaving PM S state if adding those features later), we provided full ACPI hardware registers above using byte/word/dword access per ACPI spec requirement. The patch also fixed many existing hvm ACPI related bugs, such as warnings when boot to ACPI UP and SMP guest Linux OS; adding new ACPI _PRT table reporting PCI IRQ routing table in PIC mode, adding new _PRT table in APIC mode, that fixed no IRQ GSI cause it is forced to shutdown when OS find new device to assign IRQ without ACPI event service; The patch also fixed the ACPI DSDT table's PCI resource conflict with guest e820 table when booting and installing ACPI Windows; we also added ACPI shutdown service by incorporating the code in ACPI "hardware enable register writer" from Ben's Virtual Iron's team's patch in changeset 9989:f8d20c3e4225. We only provide minimum power management requirement support per spec-c1 and S5 for shutdown, may be S4 (hibernating which is meaningful for user to save their working section) in the future. Please note, current patch needs to have following switches in guest configuration to enable proper ACPI support a. need to add ACPI=1 (apic=1 if boot SMP Linux guest plus vcpu= number want to test) in xmexample.hvm b. need to add USB support: USB=1 and usbdevice='device' (or ='tablet') as the pm register base is static..., I will adding dynamic ACPI FADT table for pm register base pointer later. When installing guest OS in ACPI mode, need to manually tell Windows setup program to install single core ACPI HAL: After passing the 1st screen of windows setup of install Windows, the first thing you'll see at the bottom of the screen is the option to press F6 if you need to install a SCSI or RAID controller. Don't press F6. Press F5 instead. This will take you to a separate menu of Hardware Abstraction Layer's where you can choose an appropriate HAL .The choices will be: ACPI Multiprocessor PC ACPI Uniprocessor PC Advanced Configuration and Power Interface (ACPI) PC ... Standard PC Standard PC with C-Step i486 Please select "Advanced Configuration and Power Interface (ACPI) PC" using current patch. Signed-off-by: Winston Wang <winston.l.wang@intel.com>
* [TOOLS] Introduce xc_evtchn_*() interface for interacting with /dev/xen/evtchn.kaf24@firebug.cl.cam.ac.uk2006-06-151-20/+12
| | | | | | | | No longer open the device as non-blocking: all reads immediately follow a select() on the device indicating it's ready to read. Signed-off-by: John Levon <john.levon@sun.com>
* [HVM][DM] Backport the USB support from QEMU 0.8.1 to the current Xenkaf24@firebug.cl.cam.ac.uk2006-06-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | device model. To support USB there are two new optional config lines that can be added to the guest config file: usb=1 This will enable USB without defining a specific USB device. This option is assumed and not needed if the `usbdevice' option is given. usbdevice='device' This will enable USB and also enable support for the given device. Currently, the only two devices are `mouse' (a PS/2 mouse) and `tablet' (an absolute pointing device). The advantage of `tablet' is that Windows guests will automatically recognize and support this device so specifying the config line: usbdevice='tablet' will create a mouse that works transparently with Windows guests under VNC. (Linux doesn't recognize the USB tablet yet so Linux guests under VNC will still need the Summagraphics emulation.) Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
* Remove unnecessary extra linker parameters from qemu-dm build.kaf24@firebug.cl.cam.ac.uk2006-05-151-1/+1
| | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Add rudimentary ACPI support which allows a fully virtualized domainkaf24@firebug.cl.cam.ac.uk2006-05-151-2/+2
| | | | | | | | | | | | | | | to perform a poweroff via the S5 state. This involves adding S5 information to the ASL file; adding ACPI I/O address processing to qemu and modifying the FADT to point to these specific I/O addresses. Note that this is a rudimentary implementation, which is expected to allow growth over time. Currently, only allow/detect writes to one of the PM registers, even though the S5 package specifies data for both. Currently, this is sufficient for the kernels tested. (Specifically, use of _PST, and _GST and other methods are unnecessary and not implemented.) Signed-off-by: Ben Thomas <ben@virtualiron.com>
* Sync PIT device model with latest qemu and move it to hypervisor.kaf24@firebug.cl.cam.ac.uk2006-04-191-1/+1
| | | | | Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
* build: Clean up use of .PHONYkaf24@firebug.cl.cam.ac.uk2006-04-101-0/+4
| | | | | | | | | | | | * Move .PHONY directives next to targets, this makes them a lot harder to miss * Add missing .PHONY directives * Remove nonexistent .PHONY directives * Hopefully I didn'T miss anything... Signed-Off-By: Horms <horms@verge.net.au>
* Add code to make handling domain poweroff/reboot symmetrical betweenkaf24@firebug.cl.cam.ac.uk2006-04-061-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paravirtualized and fully virtualized. This approach uses the new sched_op to handle other domains than the current domain. The new code, SCHEDOP_remote_shutdown, is very much like SCHEDOP_shutdown, but is called with the id of the domain which is to be shut down. This allows fully virtualized shutdown and para-virtualized shutdown to be identical from that point forward. A paravirtualized domain uses sched_op to shut down and set the reason code. This will send a VIRQ_DOM_EXC, which can be handled in dom0 by control software. In some ways, this resembles SIGCHILD/waitpid, and is a reasonable model. The fully virtualized case has qemu invoke xm directly. This is a different path than paravirtualized. It also removes decision and policy making choices from the rest of the control software and places it within qemu. When any dom0 logic eventually gets a VIRQ_DOM_EXC, the information about the domain is gone having been destroyed by xm. A libxenctrl wrapper, xc_shutdown_domain has been added and qemu now calls it. As a freebie, #if 0 some very verbose logging code in qemu. Totally unrelated, but as long as I was there... Signed-off-by: Ben Thomas <ben@virtualiron.com>
* Change the VNC main input loop delay from 1 second down to 10kaf24@firebug.cl.cam.ac.uk2006-03-161-2/+2
| | | | | | | | | | msec. The 1 second delay was causing significant latency problems with the mouse while there is no measurable overhead in lowering the delay down to 10 msec. Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
* Add a shadow VRAM to track changes to the real VRAM. When the guestkaf24@firebug.cl.cam.ac.uk2006-03-161-2/+9
| | | | | | | | | | | | | | | OS was given write access to the VRAM the device model tracked all VRAM changes by updating the entire screen on every output loop, causing significant overhead (a CPU bound loop in a guest slows down by about 35%) and significant mouse latency (VNC uses the same data path for mouse events and video updates). With the shadow VRAM only modified pages need to be updated and the comparison of the shadow VRAM to the real VRAM only adds ~4% overhead while eliminating the mouse latencies. Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
* More build config changes:kaf24@firebug.cl.cam.ac.uk2006-03-101-2/+2
| | | | | | | | | | - Build -O2 rather than -O3 - Build with -Wstrict-prototypes - Move target-specific generic compiler switches to Config.mk Signed-off-by: Keir Fraser <keir@xensource.com>
* Move 'debug' build option into the outermost Config.mk file.kaf24@firebug.cl.cam.ac.uk2006-03-091-2/+1
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Clean up the usage of CFLAGS. This is nice for packagers, who wouldkaf24@firebug.cl.cam.ac.uk2006-03-091-1/+1
| | | | | | | | like to control the base compilation flags from a central place. Signed-off-by: Charles Coffing <ccoffing@novell.com>