vga_update_display(s);
diff --git a/intel.c b/intel.c
new file mode 100644
-index 0000000..ef279fe
+index 0000000..8f2a225
--- /dev/null
+++ b/intel.c
-@@ -0,0 +1,525 @@
+@@ -0,0 +1,528 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include "qemu-timer.h"
+#include "console.h"
+#include "sysemu.h"
++#include "qemu-xen.h"
+
+#include "intel_reg.h"
+#include "intel.h"
+static void set_data_pointer(DisplaySurface *surf)
+{
+ surf->data = (unsigned char *)(intel_mem + intel_get_surface());
-+ memset(surf->data, 0x00, surf->linesize * IntelY);
++ if (IntelY != 4096)
++ memset(surf->data, 0x00, surf->linesize * IntelY);
+ surf->data = surf->data +
+ surf->linesize * ((IntelY - surf->height) / 2) +
+ 4 * ((IntelX - surf->width) / 2);
+ intel_have_focus = focus;
+ if (intel_have_focus) {
+ intel_get_res(&IntelX, &IntelY, &IntelPitch);
-+ memset((uint8_t *)(intel_mem + intel_get_surface()), 0,
-+ IntelPitch * IntelY);
++ if (IntelX != 4096 && IntelY != 4096)
++ memset((uint8_t *)(intel_mem + intel_get_surface()), 0,
++ IntelPitch * IntelY);
+
+ if (!guest_framebuffer)
+ intel_force_linear(0);
+ focus, IntelX, IntelY, IntelPitch);
+}
+
-+void intel_enter_leave(const char *path, void *opaque)
++static void intel_enter_leave(const char *path, void *opaque)
+{
+ int state;
+ char *tmp;