Paravirtual Framebuffer/Keyboard
RFC PATCH 1/4 Paravirtual Framebuffer/Keyboard
# HG changeset patch
# User Anthony Liguori <[email protected]>
# Node ID 431a5f12b57f2fbc2f462523f0ff71a667837a9d
# Parent d783bdd14f2eff514e36b92ded0e3d22be7cf3d0 General plumbing for Xen Framebuffer and Keyboard. This includes:
1) Some modifications to VT setup to remove our null console hacks
2) Additional resume plumbing for framebuffer/keyboard resume
3) Modifications to the build/resume to setup shared memory and event channels for framebuffer/keyboard devices
4) Modifications to Xend to support a new vnc directive for paravirtual domains
linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c +4 -4
@@ -1752,13 +1752,13 @@#endif #endif }else { -#ifdef CONFIG_XEN_PHYSDEV_ACCESS -extern const struct consw xennull_con; -extern int console_use_vt; -#if defined(CONFIG_VGA_CONSOLE ) +#if defined(CONFIG_XEN_PHYSDEV_ACCESS ) && defined(CONFIG_VGA_CONSOLE )/* disable VGA driver */ ORIG_VIDEO_ISVGA =VIDEO_TYPE_VLFB ;#endif +#if defined(CONFIG_DUMMY_CONSOLE ) + conswitchp = &dummy_con; +#else conswitchp = &xennull_con; console_use_vt =0 ;#endif
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c +10 -0
@@ -16,6 +16,8 @@#include <linux/cpu.h> #include <linux/kthread.h> #include <asm-xen/xencons.h> +#include <linux/xenkbd.h> +#include <linux/xenfb.h> #if defined(__i386__) || defined(__x86_64__)/*
@@ -148,6 +150,8 @@ xen_start_info->store_mfn =mfn_to_pfn (xen_start_info->store_mfn); xen_start_info->console_mfn =mfn_to_pfn (xen_start_info->console_mfn); + xen_start_info->fbdev_mfn =mfn_to_pfn (xen_start_info->fbdev_mfn); + xen_start_info->kbd_mfn =mfn_to_pfn (xen_start_info->kbd_mfn);/* * We'll stop somewhere inside this hypercall. When it returns,
@@ -188,6 +192,12 @@__sti ();xencons_resume (); +#ifndef CONFIG_XEN_PRIVILEGED_GUEST +#if 1 +xenfb_resume (); +#endif +xenkbd_resume (); +#endif #ifdef CONFIG_SMP for_each_cpu (i)
tools/libxc/xc_linux_build.c +65 -2
103 lines not on this page · raw message
tools/libxc/xc_linux_restore.c +45 -0
57 lines not on this page · raw message
tools/python/xen/xend/image.py +22 -0
@@ -163,6 +163,20 @@ ostype = "linux" + def configure(self, imageConfig, deviceConfig): + ImageHandler.configure(self, imageConfig, deviceConfig) + + vnc = sxp.child_value(imageConfig, 'vnc') + + self.pid = 0 + + if vnc: + log.info('spawning vncfb: %s %s', '/usr/lib/xen/bin/vncfb', ['vncfb', str(self.vm.getDomid())]) + self.pid = os.spawnv(os.P_NOWAIT, '/usr/lib/xen/bin/vncfb', ['vncfb', str(self.vm.getDomid())]) + log.info('vncfb pid: %d', self.pid) + else: + log.info('vnc is not set (disabling)') + def buildDomain(self): store_evtchn = self.vm.getStorePort() console_evtchn = self.vm.getConsolePort()
@@ -181,6 +195,14 @@ console_evtchn = console_evtchn, cmdline = self.cmdline, ramdisk = self.ramdisk) + + def destroy(self): + import signal + if not self.pid: + return + os.kill(self.pid, signal.SIGKILL) + os.waitpid(self.pid, 0) + self.pid = 0 class VmxImageHandler(ImageHandler):
tools/python/xen/xm/create.py +2 -0
@@ -436,6 +436,8 @@ if vals.builder == 'vmx': configure_vmx(config_image, vals) + elif vals.vnc: + config_image.append(['vnc', vals.vnc]) return config_image
xen/include/public/xen.h +4 -0
@@ -408,6 +408,10 @@uint32_t store_evtchn;/* Event channel for store communication. */ unsigned long console_mfn;/* MACHINE address of console page. */ uint32_t console_evtchn;/* Event channel for console messages. */ +unsigned long fbdev_mfn; +uint32_t fbdev_evtchn; +unsigned long kbd_mfn; +uint32_t kbd_evtchn;/* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ unsigned long pt_base;/* VIRTUAL address of page directory. */ unsigned long nr_pt_frames;/* Number of bootstrap p.t. frames. */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel