[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [qemu patches] Update patches upto changeset 15032:8f510bf078c7.



# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Date 1178810547 -3600
# Node ID 07b1e917c9d8146af0acefd1f039b57729c841af
# Parent  31a3f83d1610180191a440e3cc582d5b7159bbda
[qemu patches] Update patches upto changeset 15032:8f510bf078c7.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 tools/ioemu/patches/qemu-infrastructure            |   27 ---
 tools/ioemu/patches/vnc-access-monitor-vt          |   14 -
 tools/ioemu/patches/vnc-listen-specific-interface  |  184 ---------------------
 tools/ioemu/patches/vnc-fix-text-display-shift-key |   11 +
 4 files changed, 11 insertions(+), 225 deletions(-)

diff -r 31a3f83d1610 -r 07b1e917c9d8 tools/ioemu/patches/qemu-infrastructure
--- a/tools/ioemu/patches/qemu-infrastructure   Thu May 10 16:05:31 2007 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-Index: ioemu/cpu-all.h
-===================================================================
---- ioemu.orig/cpu-all.h       2007-05-03 19:00:05.000000000 +0100
-+++ ioemu/cpu-all.h    2007-05-03 19:00:55.000000000 +0100
-@@ -828,6 +828,23 @@
- int cpu_inl(CPUState *env, int addr);
- #endif
- 
-+#if defined(__i386__) || defined(__x86_64__)
-+static __inline__ void atomic_set_bit(long nr, volatile void *addr)
-+{
-+        __asm__ __volatile__(
-+                "lock ; bts %1,%0"
-+                :"=m" (*(volatile long *)addr)
-+                :"dIr" (nr));
-+}
-+static __inline__ void atomic_clear_bit(long nr, volatile void *addr)
-+{
-+        __asm__ __volatile__(
-+                "lock ; btr %1,%0"
-+                :"=m" (*(volatile long *)addr)
-+                :"dIr" (nr));
-+}
-+#endif
-+
- /* memory API */
- 
- extern uint64_t phys_ram_size;
diff -r 31a3f83d1610 -r 07b1e917c9d8 tools/ioemu/patches/vnc-access-monitor-vt
--- a/tools/ioemu/patches/vnc-access-monitor-vt Thu May 10 16:05:31 2007 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-Index: ioemu/vnc.c
-===================================================================
---- ioemu.orig/vnc.c   2007-05-03 19:50:17.000000000 +0100
-+++ ioemu/vnc.c        2007-05-03 19:54:29.000000000 +0100
-@@ -33,6 +33,10 @@
- #include "vnc_keysym.h"
- #include "keymaps.c"
- 
-+#define XK_MISCELLANY
-+#define XK_LATIN1
-+#include <X11/keysymdef.h>
-+
- typedef struct Buffer
- {
-     size_t capacity;
diff -r 31a3f83d1610 -r 07b1e917c9d8 
tools/ioemu/patches/vnc-fix-text-display-shift-key
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ioemu/patches/vnc-fix-text-display-shift-key        Thu May 10 
16:22:27 2007 +0100
@@ -0,0 +1,13 @@
+Index: ioemu/vnc.c
+===================================================================
+--- ioemu.orig/vnc.c   2007-05-10 15:11:44.000000000 +0100
++++ ioemu/vnc.c        2007-05-10 15:11:44.000000000 +0100
+@@ -993,7 +993,7 @@
+ 
+ static void key_event(VncState *vs, int down, uint32_t sym)
+ {
+-    if (sym >= 'A' && sym <= 'Z')
++    if (sym >= 'A' && sym <= 'Z' && is_graphic_console())
+       sym = sym - 'A' + 'a';
+     do_key_event(vs, down, sym);
+ }
diff -r 31a3f83d1610 -r 07b1e917c9d8 
tools/ioemu/patches/vnc-listen-specific-interface
--- a/tools/ioemu/patches/vnc-listen-specific-interface Thu May 10 16:05:31 
2007 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-# HG changeset patch
-# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
-# Node ID a95dfbc8dca8ecddcb9be51d78f446b0fa461892
-# Parent  8959876abbe319963974fab21dda7185e0ad84e6
-[HVM/vncserver] Implement a 'vnclisten' option to limit the interface
-that the VNC server from qemu listens on. 
-
-Defaults to only listen on 127.0.0.1
-
-The old behaviour (listen on all interfaces) can be restored, by
-- changing the system-wide default in /etc/xen/xend-config.sxp by adding:
-(vnc-listen '0.0.0.0')
-- changing individual domain config files by adding:
-vnclisten="0.0.0.0"
-
-Also allows specifying the hostname associated with an interface to limit
-to that interface.
-
-Signed-off-by:  Daniel P. Berrange <berrange@xxxxxxxxxx>
-
-Index: ioemu/vl.c
-===================================================================
---- ioemu.orig/vl.c    2007-05-09 14:12:16.000000000 +0100
-+++ ioemu/vl.c 2007-05-09 14:12:43.000000000 +0100
-@@ -133,6 +133,7 @@
- int nographic;
- int vncviewer;
- int vncunused;
-+struct sockaddr_in vnclisten_addr;
- const char* keyboard_layout = NULL;
- int64_t ticks_per_sec;
- int boot_device = 'c';
-@@ -3008,10 +3009,22 @@
-     return -1;
- }
- 
-+int parse_host(struct sockaddr_in *saddr, const char *buf)
-+{
-+    struct hostent *he;
-+
-+    if ((he = gethostbyname(buf)) != NULL) {
-+        saddr->sin_addr = *(struct in_addr *)he->h_addr;
-+    } else {
-+        if (!inet_aton(buf, &saddr->sin_addr))
-+            return -1;
-+    }
-+    return 0;
-+}
-+
- int parse_host_port(struct sockaddr_in *saddr, const char *str)
- {
-     char buf[512];
--    struct hostent *he;
-     const char *p, *r;
-     int port;
- 
-@@ -3022,14 +3035,8 @@
-     if (buf[0] == '\0') {
-         saddr->sin_addr.s_addr = 0;
-     } else {
--        if (isdigit(buf[0])) {
--            if (!inet_aton(buf, &saddr->sin_addr))
--                return -1;
--        } else {
--            if ((he = gethostbyname(buf)) == NULL)
--                return - 1;
--            saddr->sin_addr = *(struct in_addr *)he->h_addr;
--        }
-+        if (parse_host(saddr, buf) == -1)
-+            return -1;
-     }
-     port = strtol(p, (char **)&r, 0);
-     if (r == p)
-@@ -6313,6 +6320,7 @@
-          "-vnc display    start a VNC server on display\n"
-            "-vncviewer      start a vncviewer process for this domain\n"
-            "-vncunused      bind the VNC server to an unused port\n"
-+           "-vnclisten      bind the VNC server to this address\n"
- #ifndef _WIN32
-          "-daemonize      daemonize QEMU after initializing\n"
- #endif
-@@ -6410,6 +6418,7 @@
-     QEMU_OPTION_acpi,
-     QEMU_OPTION_vncviewer,
-     QEMU_OPTION_vncunused,
-+    QEMU_OPTION_vnclisten,
- };
- 
- typedef struct QEMUOption {
-@@ -6490,6 +6499,7 @@
-     { "vnc", HAS_ARG, QEMU_OPTION_vnc },
-     { "vncviewer", 0, QEMU_OPTION_vncviewer },
-     { "vncunused", 0, QEMU_OPTION_vncunused },
-+    { "vnclisten", HAS_ARG, QEMU_OPTION_vnclisten },
- 
-     /* temporary options */
-     { "usb", 0, QEMU_OPTION_usb },
-@@ -6889,6 +6899,8 @@
- 
-     nb_nics = 0;
-     /* default mac address of the first network interface */
-+
-+    memset(&vnclisten_addr.sin_addr, 0, sizeof(vnclisten_addr.sin_addr));
-     
-     /* init debug */
-     sprintf(qemu_dm_logfilename, "/var/log/xen/qemu-dm.%ld.log", 
(long)getpid());
-@@ -7280,6 +7292,9 @@
-             case QEMU_OPTION_vncunused:
-                 vncunused++;
-                 break;
-+            case QEMU_OPTION_vnclisten:
-+                parse_host(&vnclisten_addr, optarg);
-+                break;
-             }
-         }
-     }
-@@ -7563,7 +7578,8 @@
-         dumb_display_init(ds);
-     } else if (vnc_display != NULL || vncunused != 0) {
-       int vnc_display_port;
--      vnc_display_port = vnc_display_init(ds, vnc_display, vncunused);
-+      vnc_display_port = vnc_display_init(ds, vnc_display, vncunused,
-+                                          &vnclisten_addr);
-       if (vncviewer)
-           vnc_start_viewer(vnc_display_port);
-     } else {
-Index: ioemu/vl.h
-===================================================================
---- ioemu.orig/vl.h    2007-05-09 14:12:16.000000000 +0100
-+++ ioemu/vl.h 2007-05-09 14:12:43.000000000 +0100
-@@ -37,6 +37,8 @@
- #include <unistd.h>
- #include <fcntl.h>
- #include <sys/stat.h>
-+#include <sys/socket.h>
-+#include <sys/types.h>
- #include "xenctrl.h"
- #include "xs.h"
- #include <xen/hvm/e820.h>
-@@ -928,7 +930,7 @@
- void cocoa_display_init(DisplayState *ds, int full_screen);
- 
- /* vnc.c */
--int vnc_display_init(DisplayState *ds, const char *display, int find_unused);
-+int vnc_display_init(DisplayState *ds, const char *display, int find_unused, 
struct sockaddr_in *iaddr);
- void do_info_vnc(void);
- int vnc_start_viewer(int port);
- 
-Index: ioemu/vnc.c
-===================================================================
---- ioemu.orig/vnc.c   2007-05-09 14:12:21.000000000 +0100
-+++ ioemu/vnc.c        2007-05-09 14:12:43.000000000 +0100
-@@ -1270,10 +1270,9 @@
- 
- extern int parse_host_port(struct sockaddr_in *saddr, const char *str);
- 
--int vnc_display_init(DisplayState *ds, const char *arg, int find_unused)
-+int vnc_display_init(DisplayState *ds, const char *arg, int find_unused, 
struct sockaddr_in *iaddr)
- {
-     struct sockaddr *addr;
--    struct sockaddr_in iaddr;
- #ifndef _WIN32
-     struct sockaddr_un uaddr;
- #endif
-@@ -1334,8 +1333,8 @@
-     } else
- #endif
-     {
--      addr = (struct sockaddr *)&iaddr;
--      addrlen = sizeof(iaddr);
-+      addr = (struct sockaddr *)iaddr;
-+      addrlen = sizeof(*iaddr);
- 
-       vs->lsock = socket(PF_INET, SOCK_STREAM, 0);
-       if (vs->lsock == -1) {
-@@ -1343,12 +1342,12 @@
-           exit(1);
-       }
- 
--      if (parse_host_port(&iaddr, arg) < 0) {
-+      if (parse_host_port(iaddr, arg) < 0) {
-           fprintf(stderr, "Could not parse VNC address\n");
-           exit(1);
-       }
-           
--      iaddr.sin_port = htons(ntohs(iaddr.sin_port) + 5900);
-+      iaddr->sin_port = htons(ntohs(iaddr->sin_port) + 5900);
- 
-       reuse_addr = 1;
-       ret = setsockopt(vs->lsock, SOL_SOCKET, SO_REUSEADDR,
-@@ -1361,7 +1360,7 @@
- 
-     while (bind(vs->lsock, addr, addrlen) == -1) {
-       if (find_unused && errno == EADDRINUSE) {
--          iaddr.sin_port = htons(ntohs(iaddr.sin_port) + 1);
-+          iaddr->sin_port = htons(ntohs(iaddr->sin_port) + 1);
-           continue;
-       }
-       fprintf(stderr, "bind() failed\n");
-@@ -1378,7 +1377,7 @@
-       exit(1);
-     }
- 
--    return ntohs(iaddr.sin_port);
-+    return ntohs(iaddr->sin_port);
- }
- 
- int vnc_start_viewer(int port)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.