aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ioemu/hw
Commit message (Collapse)AuthorAgeFilesLines
...
* pv-qemu 6/10: Merge private & public xenfb structsKeir Fraser2007-10-253-91/+70
| | | | | | | | | | | This patch merges the public & private structs from the paravirt FB into a single struct. Since QEMU is the only consumer of this code there is no need for the artifical pub/priv split. Merging the two will make it possible to more tightly integrate with QEMU's event loop and do asynchronous non-blocking negoiation with the frontend devices (see next patch). Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* pv-qemu 5/10: Refactor QEMU console integrationKeir Fraser2007-10-253-267/+280
| | | | | | | | This patch moves a bunch of code out of the xen_machine_pv.c file and into the xenfb.c file. This is simply a re-factoring to facilitate the two patches which follow. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* pv-qemu 4/10: Refactor xenfb event handlersKeir Fraser2007-10-253-167/+94
| | | | | | | | This patch is a simple code re-factoring to move the event loop integration directly into the xenfb.c file. It is to facilitate the patches which follow. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* pv-qemu: Remove standalone xenfb codeKeir Fraser2007-10-253-1/+859
| | | | | | | | | | | This patch removes all trace of the standalone paravirt framebuffer daemon. With this there is no longer any requirement for LibVNCServer. Everything is handled by the QEMU device model. The xenfb.c and xenfb.h files are now moved (without code change) into tools/ioemu/hw/ & the temporary Makefile hack from the previous patch is removed. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* pv-qemu 2/10: Add a QEMU machine type for paravirt guestsKeir Fraser2007-10-251-0/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a paravirt machine type to QEMU. This can be requested by passing the arg '-M xenpv' to qemu-dm. Aside from -d, and -domain-name, the only other args that are processed are the VNC / SDL graphics related args. Any others will be ignored. A tweak to helper2.c was made to stop it setting up a file handler watch when there are no CPUs registered. The paravirt machine is in hw/xen_machine_pv.c and registers an instance of the xenfb class, integrating it with the QEMU event loop and key/mouse handlers. A couple of methods were adding to xenfb.h to allow direct access to the file handles for xenstore & the event channel. The vfbif.py device controller is modified to launch qemu-dm instead of the old xen-vncfb / sdlfb daemons. When receiving framebuffer updates from the guest, the update has to be copied into QEMU's copy of the framebuffer. This is because QEMU stores the framebuffer in the format that is native to the SDL display, or VNC client. This is not neccessarily the same as the guest framebuffer which is always 32bpp. If there is an exact depth match we use memcpy for speed, but in the non-matching case we have to fallback to slow code to convert pixel formats. It fully supports all features of the paravirt framebuffer including the choice between absolute & relative pointers. The overall VIRT memory image size is about same as old xen-vncfb, but the resident memory size is a little increased due to copy of the framebuffer & some QEMU static state overhead. Most of this is shared across QEMU processes. To avoid both moving the xenfb.c and making changes to it in the same patch, this just uses a Makefile hack to link against the xenfb.o from the tools/xenfb/ directory. This will be removed in the following patch. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* pv-qemu 1/10: Add a QEMU machine type for fullvirt guestsKeir Fraser2007-10-251-0/+295
| | | | | | | | | | | | This patch does a (no functional change) re-arrangement of the code for starting up a fully virtualized guest. In particular it creates a new QEMU machine type for Xen fullyvirt guests which can be specified with '-M xenfv'. For compatibility this is in fact made to be the default. The code for setting up memory maps is moved out of vl.c, and into hw/xen_machine_fv.c. This is basically to ensure that it can be easily skipped when we add a paravirt machine type in the next patch. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* hvm, vt-d: Add memory cache-attribute pinning domctl for HVMKeir Fraser2007-10-231-0/+6
| | | | | | guests. Use this to pin virtual framebuffer VRAM as attribute WB, even if guest tries to map with other attributes. Signed-off-by: Disheng Su <disheng.su@intel.com>
* vt-d: Fix PCI=device parsing.Keir Fraser2007-10-221-4/+4
| | | | Signed-off-by: Weidong Han <weidong.han@intel.com>
* ia64: make buffered pio aware of save/restore.Keir Fraser2007-10-221-5/+58
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* hvm: Fix PCI-passthru string parsing.Keir Fraser2007-10-201-34/+10
| | | | | Fixes crash of xend during HVM domain ccreation. Signed-off-by: Keir Fraser <keir@xensource.com>
* vt-d: Detect and report failure to assign a pass-thru PCI device.Keir Fraser2007-10-191-42/+43
| | | | Signed-off-by: Weidong Han <weidong.han@intel.com>
* tools: Remove bogus external uses of xc_private.h. Clean up libflask.Keir Fraser2007-10-181-1/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* ioemu: security fixes for not-built or not-default-configured subsystems.Keir Fraser2007-09-263-6/+17
| | | | | | | Patches originally proposed by S. Caglar Onur and cleaned up for xen-unstable by Robert Buchholz <rbu@gentoo.org>. Signed-off-by: Keir Fraser <keir@xensource.com>
* PCI passthru: tools changes (generic and vt-d)kfraser@localhost.localdomain2007-09-143-5/+565
| | | | | | | | | | | | | 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>
* xc_map_foreign_pages(), a convenient alternative to xc_map_foreign_batch()kfraser@localhost.localdomain2007-09-071-1/+1
| | | | | | | | | xc_map_foreign_batch() can succeed partially. It is awkward to use when you're only interested in complete success. Provide new xc_map_foreign_pages() convenience function for that kind of use. Also convert two obvious calls to use it. Signed-off-by: Markus Armbruster <armbru@redhat.com>
* qemu: Allow more IDE power management.kfraser@localhost.localdomain2007-08-301-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Made the QEMU IDE disk tolerate more power-mgmt commands, specifically: WIN_SETFEATURE(EN_AAM) - enable automatic acoustic mgmt WIN_SETFEATURE(DIS_AAM) - disable automatic acoustic mgmt WIN_SETFEATURE(DIS_APM) - disable automatic power mgmt WIN_STANDBY WIN_SETIDLE1 WIN_SLEEPNOW1 WIN_STANDBY2 WIN_SETIDLE2 WIN_SLEEPNOW2 WIN_STANDBYNOW2 These are all essentially no-ops, like existing support for EN_RLA (enable read lookahead) and WIN_STANDBYNOW1. This fixes a crash in the SLES9-SP3 64bit kernel when the powersaved was started (with ACPI or ACM). This guest really only needs EN_AAM, DIS_APM, and WIN_SETIDLE1 support, but the others seemed sensible to include. I've excluded EN_APM since I'm unsure of what that's agreeing to do. It's probably ok to include. Signed-off-by: Ben Guthro <bguthro@virtualiron.com> Signed-off-by: David Lively <dlively@virtualiron.com>
* ioemu: Avoid struct members clashing with POSIX apiskfraser@localhost.localdomain2007-08-281-12/+12
| | | | | | | | | | | | | | The TPM code in tools/ioemu/hw/tpm_tis.c has a struct containing a number of function pointers with names open, close, read, write which are the same as various POSIX apis already #included in the file. POSIX allows these functions to be defined as macros and latest GCC/glibc does indeed define them as macros depending on compiler flags. This causes compile errors when deferencing the struct members. The solution is either to change calls like ctx->open () to be (* ctx->open) (), or simply to rename the struct members. Since this struct was only used inside that one file I simply renamed them. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* ioemu: error checkin when setting up the Cirrus Logic video device.kfraser@localhost.localdomain2007-08-281-1/+6
| | | | | | | | | | set_mm_mapping() may fail because of xc_domain_populate_physmap(). In this case, we should not blindly go on; the xc_map_foreign_batch() that follows will cause a page fault and, at best, get mapped in a zeroed page from the dom0 (which is not what we want). While I'm in here, fix a memory leak on an error path. Signed-off-by: Chris Lalancette <clalance@redhat.com>
* [HVM] Control qemu's state-save via xenstore, instead of SIGUSR1Tim Deegan2007-07-241-2/+0
| | | | | | | This lets us verify that qemu has indeed stopped processing before we start saving guest memory. Also allow qemu to continue processing after the save has happened, instead of exiting immediately. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Qemu rtl8139: correct rx CRC calculationTim Deegan2007-07-161-5/+4
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Qemu rtl8139: correct ring-buffer wrapping.Tim Deegan2007-07-161-1/+1
| | | | | The rx DMA should never overrun when it hits the end of a 64k buffer Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* Make QEMU consistently report write caching support for emulated IDEkfraser@localhost.localdomain2007-07-111-1/+2
| | | | | | | | | | | | | | | | | drives to fix a hang during SLES 9 HVM guest installation. Without this, the SLES 9 installer kernels (32 and 64 bit) were getting inconsistent information from QEMU as to whether the (emulated) IDE drives support write caching (which they do). So part of the kernel thought write caching was enabled (and enabled the usage of barrier writes) and part of it didn't, which triggered a bug in which the same barrier write is submitted over and over again ... Fixed by setting another bit in the WIN_IDENTIFY (IDE drive "identify" command) response to indicate we really, truly support write caching. Signed-off-by: David Lively <dlively@virtualiron.com> Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
* Fix TPM support in HVM domainskfraser@localhost.localdomain2007-05-151-5/+20
| | | | | Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: Peter Yang <peisen.yang@intel.com>
* hvm: Fix ACPI shutdown, broken by my previous changeset.Keir Fraser2007-05-121-10/+14
| | | | | | | | | | | | | | | | | It turns out that although PIIX4 hardware defines the S5 type code to be 000, all OSes will discover the correct code by evlauating an \_Sx object in the ACPI DSDT. And we set the type code in that object to be 111. So this patch keeps the other cleanups made to the piix4acpi.c file, but switches back to checking for code 111. It also makes it clearer in both the ioemu code and in the dsdt source code where these magic numbers come from. Let's hope noone actually has the true PIIX4 type codes hardcoded (it's highly doubtful that anyone would). Signed-off-by: Keir Fraser <keir@xensource.com>
* hvm: Fix emulation of PIIX4 PMCNTRL register for soft power-off.Keir Fraser2007-05-121-66/+16
| | | | | The type code needs to be 000, not 111 (which is a reserved value). Signed-off-by: Keir Fraser <keir@xensource.com>
* [qemu] Remove unused -timeoffset option.Christian Limpach2007-05-102-35/+8
| | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Sync data to disk if write cache is disabled.Christian Limpach2007-05-101-0/+3
| | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Fix typo in previous ia64 build fix (my fault).Christian Limpach2007-05-091-1/+1
| | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu] Fix ia64 build.Christian Limpach2007-05-091-0/+1
| | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* [ioemu] Update to qemu 0.90.Christian Limpach2007-05-0973-4296/+6892
| | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* hvm ioemu: Fix SCSI initialisation after c/s 14942.kfraser@localhost.localdomain2007-04-261-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* hvm ioemu: Do not initialise the LSI SCSI interface if no SCSI discskfraser@localhost.localdomain2007-04-251-4/+5
| | | | | are attached to the guest. Signed-off-by: Keir Fraser <keir@xensource.com>
* [qemu-dm] Check for null pointer in dma handler function pointer.Christian Limpach2007-04-241-0/+2
| | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* [qemu-dm] Add bounds checks for cirrus bitblit memory accesses.Christian Limpach2007-04-243-39/+101
| | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* qemu: Do not kill ioemu if undefined LSI-SCI registers are read. Justkfraser@localhost.localdomain2007-04-241-0/+5
| | | | | return zeroes. This path is triggered by ASPI8DOS.SYS in DRDOS. Signed-off-by: Keir Fraser <keir@xensource.com>
* Provide the use of SCSI disks in HVM domains. Currently there is akfraser@localhost.localdomain2007-04-111-1/+11
| | | | | | | maximum of 7 scsi disks and an ide disk must still be used to boot. Signed-off-by: Natasha Jarymowycz <natasha@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* PV-on-HVM: Add new ioreq 'invalidate' for zapping ioemu-dm mapccahekfraser@localhost.localdomain2007-04-051-7/+1
| | | | | | | | | | | | | 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] Save/restore: fix missing return code in USB restoreTim Deegan2007-03-291-0/+1
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Save/restore: Allow save/restore of multiple NICsTim Deegan2007-03-293-12/+16
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xenource.com>
* [HVM] Save/restore: backport pcnet save/restore from qemu tip.Tim Deegan2007-03-291-0/+56
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Save/restore: Save the ACPI PM control register in qemuTim Deegan2007-03-291-0/+18
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Intercept ACPI pm-timer registersTim Deegan2007-03-261-230/+13
| | | | | | | Bring the PM1a_STS and PM1a_EN registers into Xen and use them to deliver SCI to the guest before it sees the MSB of the pm-timer change. Also correct some of the semantics of the registers. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* add usb device save/restore in qemuTim Deegan2007-03-145-0/+143
| | | | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
* [HVM] Save/restore: make sure all ioreqs are gone when a domain is savedTim Deegan2007-03-081-8/+49
| | | | | by pausing the domain and pulling them through. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Save/restore: back-port IDE controller save routine from current qemu.Tim Deegan2007-03-081-0/+115
| | | | | | Also, send an interrupt and an error code to the guest on restore if we dropped an active request when we saved. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* hvm/ia64: Fix IDE PIO acceleration.kfraser@localhost.localdomain2007-03-011-2/+2
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* Accelerate IDE PIO on HVM/IA64 [1/3]kfraser@localhost.localdomain2007-02-271-0/+125
| | | | | | Add a bufferring mechanism for IDE PIO in qemu. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* hvm, vtpm: Fix wait for an outstanding response.kfraser@localhost.localdomain2007-02-191-0/+2
| | | | | | | Post the interrupt upon reception of the response and adapt the state machine. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [VTPM] Add a missing initialization of a state variable in the TISkfraser@localhost.localdomain2007-02-151-0/+1
| | | | | | | device model so that the first response received after a resume is not aborted. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* hvm: Add PCI subsystem ID to emulated devices.kfraser@localhost.localdomain2007-02-073-2/+12
| | | | | | | This patch adds the PCI Subsystem ID 5853:0001 to the virtual devices emulated by qemu (ide, nic, vga). Signed-off-by: Gerd Hoffmann <kraxel@suse.de>