aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ioemu/vl.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-10-25 14:35:04 +0100
committerKeir Fraser <keir@xensource.com>2007-10-25 14:35:04 +0100
commit3bc128ebcfa8358e19f5de8ab0707ecd17cca85a (patch)
tree15ebd4756af419f0c3ef05d66fb0245ce9e960f2 /tools/ioemu/vl.c
parent5bfefa417d59a4f7ec8a5ebff21f8fd2709eaaea (diff)
downloadxen-3bc128ebcfa8358e19f5de8ab0707ecd17cca85a.tar.gz
xen-3bc128ebcfa8358e19f5de8ab0707ecd17cca85a.tar.bz2
xen-3bc128ebcfa8358e19f5de8ab0707ecd17cca85a.zip
pv-qemu 2/10: Add a QEMU machine type for paravirt guests
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>
Diffstat (limited to 'tools/ioemu/vl.c')
-rw-r--r--tools/ioemu/vl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/ioemu/vl.c b/tools/ioemu/vl.c
index 34a52c5ad0..1187f0cd39 100644
--- a/tools/ioemu/vl.c
+++ b/tools/ioemu/vl.c
@@ -193,7 +193,7 @@ extern int vcpus;
int xc_handle;
-char domain_name[64] = "Xen-HVM-no-name";
+char domain_name[64] = "Xen-no-name";
extern int domid;
char vncpasswd[64];
@@ -6700,6 +6700,7 @@ void register_machines(void)
qemu_register_machine(&isapc_machine);
#else
qemu_register_machine(&xenfv_machine);
+ qemu_register_machine(&xenpv_machine);
#endif
#elif defined(TARGET_PPC)
qemu_register_machine(&heathrow_machine);
@@ -7446,7 +7447,7 @@ int main(int argc, char **argv)
break;
case QEMU_OPTION_domainname:
snprintf(domain_name, sizeof(domain_name),
- "Xen-HVM-%s", optarg);
+ "Xen-%s", optarg);
break;
case QEMU_OPTION_d:
domid = atoi(optarg);