[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 1/5] Support for running secondary emulators
This patch series adds the ioreq server interface which I mentioned in my talk at the Xen developer summit in Edinburgh at the end of last year. The code is based on work originally done by Julien Grall but has been re-written to allow existing versions of QEMU to work unmodified. The code is available in my xen.git [1] repo on xenbits, under the 'savannah' branch, and I have also written a demo emulator to test the code, which can be found in my demu.git [2] repo. The modifications are broken down as follows: Patch #1 basically just moves some code around to make subsequent patches more obvious. The patch also removes the has_dm flag in hvememul_do_io() as it is no longer necessary to special-case PVH domains in this way. (The I/O can be completed by hvm_send_assist_req() later, which it is discovered there is no shared ioreq page). Patch #2 again is largely code movement, from various places into a new hvm_ioreq_server structure. There should be no functional change at this stage as the ioreq server is still created at domain initialisation time (as were its contents prior to this patch). Patch #3 is the first functional change. The ioreq server struct initialisation is now deferred until something actually tries to play with the HVM parameters which reference it. In practice this is QEMU, which needs to read the ioreq pfns so it can map them. Patch #4 is the big one. This moves from a single ioreq server per domain to a list. The server that is created when the HVM parameters are reference is given id 0 and is considered to be the 'catch all' server which is, after all, how QEMU is used. Any secondary emulator, created using the new API in xenctrl.h, will have id 1 or above and only gets ioreqs when I/O hits one of its registered IO ranges or PCI devices. Patch #5 pulls the PCI hotplug controller emulation into Xen. This is necessary to allow a secondary emulator to hotplug a PCI device into the VM. The code implements the controller in the same way as upstream QEMU and thus the variant of the DSDT ASL used for upstream QEMU is retained. There are no modifications to libxl to actually invoke a secondary emulator at this stage. The only changes made are simply to increase the number of special pages reserved for a VM to allow the use of more than one emulator and call the new PCI hotplug API when attaching or detaching PCI devices. The demo emulator can simply be invoked from a shell and will hotplug its device onto the PCI bus (and remove it again when it's killed). The emulated device is not an awful lot of use at this stage - it appears as a SCSI controller with one IO BAR and one MEM BAR and has no intrinsic functionality... but then it is only supposed to be demo :-) Paul [1] http://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git [2] http://xenbits.xen.org/gitweb/?p=people/pauldu/demu.git _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |