1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Description: add iopl() back so vmmouse_detect will work in kvm again.
Origin: upstream, reverses http://cgit.freedesktop.org/xorg/driver/xf86-input-vmmouse/commit/?id=bcdec3d0cd4434770cd841c33c030e0d7203881f
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525039
Index: xserver-xorg-input-vmmouse/tools/vmmouse_detect.c
===================================================================
--- xserver-xorg-input-vmmouse.orig/tools/vmmouse_detect.c
+++ xserver-xorg-input-vmmouse/tools/vmmouse_detect.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <signal.h>
+#include <sys/io.h>
#include "vmmouse_client.h"
#ifdef HAVE_CONFIG_H
@@ -53,6 +54,11 @@
signal(SIGSEGV, segvCB);
#if defined __i386__ || defined __x86_64__
+ /*
+ * To access i/o ports above 0x3ff, we need to be in iopl(3).
+ */
+
+ iopl(3);
if (VMMouseClient_Enable()) {
VMMouseClient_Disable();
return 0;
|