From d28bc6cae670bb13c21d94b7957d786d8f93aee8 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Aug 04 2009 15:35:42 +0000 Subject: - Update to qemu-kvm-0.10.6; upstream ChangeLog: - merge qemu 0.10.6 - fix -net socket,listen - live migration: don't send gratuitous packets all at once - serial: fix lost characters after sysrq - Delete io-handler before closing fd after migration - Fix qemu_aio_flush - i386: fix cpu reset - Prevent CD-ROM eject while device is locked - Fix migration after hot remove with eepro100 - Don't start a VM after failed migration if stopped - Fix live migration under heavy IO load - Honor -S on incoming migration - Reset PS2 keyboard/mouse on reset - build and install extboot - Drop upstreamed qemu-prevent-cdrom-media-eject-while-device-is-locked.patch and qemu-fix-net-socket-list-init.patch and --- diff --git a/.cvsignore b/.cvsignore index 464409d..97f3c02 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -qemu-kvm-0.10.5.tar.gz +qemu-kvm-*.tar.gz diff --git a/01-tls-handshake-fix.patch b/01-tls-handshake-fix.patch index e06b6a8..74badd3 100644 --- a/01-tls-handshake-fix.patch +++ b/01-tls-handshake-fix.patch @@ -1,7 +1,7 @@ -From b7f419eee93569ef0c31c868fa24108d31e66bff Mon Sep 17 00:00:00 2001 +From 6b55d3e74400c9f7e71739abd0dac362a5db1dc6 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:02 +0000 -Subject: [PATCH 01/18] Fix bug in TLS authentication ("Daniel P. Berrange") +Subject: [PATCH] Fix bug in TLS authentication ("Daniel P. Berrange") This patch was previously posted here: @@ -26,12 +26,13 @@ this patch. Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 01-tls-handshake-fix.patch --- vnc.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/vnc.c b/vnc.c -index 783df80..18a7ad9 100644 +index 1d8ebe7..d6a7225 100644 --- a/vnc.c +++ b/vnc.c @@ -2105,14 +2105,6 @@ static int protocol_client_vencrypt_auth(VncState *vs, uint8_t *data, size_t len @@ -50,5 +51,5 @@ index 783df80..18a7ad9 100644 return 0; } -- -1.6.2.2 +1.6.2.5 diff --git a/02-vnc-monitor-info.patch b/02-vnc-monitor-info.patch index 8b453e3..7fa12a4 100644 --- a/02-vnc-monitor-info.patch +++ b/02-vnc-monitor-info.patch @@ -1,7 +1,7 @@ -From a3eb32f433a958afac931e04ce899d004744f5e0 Mon Sep 17 00:00:00 2001 +From b4b2ff2fbd7e6458fbfa8f2e6af7d1b668a06a1a Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:05 +0000 -Subject: [PATCH 02/18] Enhance 'info vnc' monitor output ("Daniel P. Berrange") +Subject: [PATCH] Enhance 'info vnc' monitor output ("Daniel P. Berrange") The current 'info vnc' monitor output just displays the VNC server address as provided by the -vnc command line flag. This isn't particularly useful @@ -42,12 +42,13 @@ important. Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 02-vnc-monitor-info.patch --- vnc.c | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 128 insertions(+), 11 deletions(-) diff --git a/vnc.c b/vnc.c -index 18a7ad9..3e9417d 100644 +index d6a7225..d7d9b91 100644 --- a/vnc.c +++ b/vnc.c @@ -166,19 +166,136 @@ struct VncState @@ -199,5 +200,5 @@ index 18a7ad9..3e9417d 100644 } -- -1.6.2.2 +1.6.2.5 diff --git a/03-display-keymaps.patch b/03-display-keymaps.patch index 800fbd9..0390552 100644 --- a/03-display-keymaps.patch +++ b/03-display-keymaps.patch @@ -1,7 +1,7 @@ -From 6fc44b90006f1bf4763088c4eacd1efec428759b Mon Sep 17 00:00:00 2001 +From 202790c357fcff7f1222f4e7777e0cf561b516d5 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:10 +0000 -Subject: [PATCH 03/18] Refactor keymap code to avoid duplication ("Daniel P. Berrange") +Subject: [PATCH] Refactor keymap code to avoid duplication ("Daniel P. Berrange") Each of the graphical frontends #include a .c file, for keymap code resulting in duplicated definitions & duplicated compiled code. A @@ -16,6 +16,7 @@ causing clashing definitions. Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 03-display-keymaps.patch --- Makefile | 9 +++++-- curses.c | 3 +- @@ -30,7 +31,7 @@ Signed-off-by: Mark McLoughlin create mode 100644 keymaps.h diff --git a/Makefile b/Makefile -index 6739626..58585a3 100644 +index 92eb447..f74b7eb 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,7 @@ endif @@ -286,7 +287,7 @@ index 0000000..17f6efd + +#endif /* __QEMU_KEYMAPS_H__ */ diff --git a/sdl.c b/sdl.c -index 74f084c..f0f9fc8 100644 +index 95efe8d..8b7a1fe 100644 --- a/sdl.c +++ b/sdl.c @@ -109,7 +109,6 @@ static void sdl_resize(DisplayState *ds) @@ -297,7 +298,7 @@ index 74f084c..f0f9fc8 100644 static kbd_layout_t *kbd_layout = NULL; -@@ -677,7 +676,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) +@@ -680,7 +679,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) keyboard_layout = "en-us"; #endif if(keyboard_layout) { @@ -322,7 +323,7 @@ index c9087d7..c213ef8 100644 /* ascii */ { "space", 0x020}, diff --git a/vnc.c b/vnc.c -index 3e9417d..aafefd8 100644 +index d7d9b91..969d5b0 100644 --- a/vnc.c +++ b/vnc.c @@ -35,7 +35,6 @@ @@ -333,7 +334,7 @@ index 3e9417d..aafefd8 100644 #include "d3des.h" #ifdef CONFIG_VNC_TLS -@@ -2429,9 +2428,9 @@ void vnc_display_init(DisplayState *ds) +@@ -2428,9 +2427,9 @@ void vnc_display_init(DisplayState *ds) vs->ds = ds; if (keyboard_layout) @@ -361,5 +362,5 @@ index ce355d8..2d255c9 100644 /* ascii */ { "space", 0x020}, -- -1.6.2.2 +1.6.2.5 diff --git a/04-vnc-struct.patch b/04-vnc-struct.patch index ad62501..dedfabb 100644 --- a/04-vnc-struct.patch +++ b/04-vnc-struct.patch @@ -1,7 +1,7 @@ -From c1b31361bfecd3f67e8766d8df2510c801f536f4 Mon Sep 17 00:00:00 2001 +From 35b87b5d1543c563c09361086519ebdc960d4934 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:13 +0000 -Subject: [PATCH 04/18] Move VNC structs into header file ("Daniel P. Berrange") +Subject: [PATCH] Move VNC structs into header file ("Daniel P. Berrange") This patch moves the definitions of VncState and VncDisplay structs out into a vnc.h header file. This is to allow the code for TLS @@ -12,13 +12,14 @@ and SASL auth mechanisms to be moved out of the main vnc.c file. Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 04-vnc-struct.patch --- vnc.c | 109 +---------------------------------------------- vnc.h | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 148 insertions(+), 110 deletions(-) diff --git a/vnc.c b/vnc.c -index aafefd8..a9b8d63 100644 +index 969d5b0..7fb31b6 100644 --- a/vnc.c +++ b/vnc.c @@ -3,6 +3,7 @@ @@ -322,5 +323,5 @@ index 6981606..eb33643 100644 -#endif /* __VNCTIGHT_H */ +#endif /* __QEMU_VNC_H */ -- -1.6.2.2 +1.6.2.5 diff --git a/05-vnc-tls-vencrypt.patch b/05-vnc-tls-vencrypt.patch index 695596e..a7ab000 100644 --- a/05-vnc-tls-vencrypt.patch +++ b/05-vnc-tls-vencrypt.patch @@ -1,7 +1,7 @@ -From 9d5f4a68ddb05d823ef1fde787ac027715fe1f95 Mon Sep 17 00:00:00 2001 +From af17025ce83b924f666617294606ec5ad1a9e833 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:23 +0000 -Subject: [PATCH 05/18] Move TLS auth into separate file ("Daniel P. Berrange") +Subject: [PATCH] Move TLS auth into separate file ("Daniel P. Berrange") This patch refactors the existing TLS code to make the main VNC code more managable. The code moves to two new files @@ -33,6 +33,7 @@ gnutls_send/recv. Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 05-vnc-tls-vencrypt.patch --- Makefile | 11 +- vnc-auth-vencrypt.c | 167 +++++++++++++++ @@ -48,7 +49,7 @@ Signed-off-by: Mark McLoughlin create mode 100644 vnc-tls.h diff --git a/Makefile b/Makefile -index 58585a3..7a3cad5 100644 +index f74b7eb..680939f 100644 --- a/Makefile +++ b/Makefile @@ -149,6 +149,9 @@ ifdef CONFIG_CURSES @@ -788,7 +789,7 @@ index 0000000..cda95b9 +#endif /* __QEMU_VNC_TLS_H__ */ + diff --git a/vnc.c b/vnc.c -index a9b8d63..f1c2d61 100644 +index 7fb31b6..f980d68 100644 --- a/vnc.c +++ b/vnc.c @@ -34,21 +34,6 @@ @@ -1476,7 +1477,7 @@ index a9b8d63..f1c2d61 100644 } else if (vs->vd->auth == VNC_AUTH_VNC) { VNC_DEBUG("Tell client VNC auth\n"); vnc_write_u32(vs, vs->vd->auth); -@@ -2337,61 +1883,6 @@ void vnc_display_init(DisplayState *ds) +@@ -2336,61 +1882,6 @@ void vnc_display_init(DisplayState *ds) register_displaychangelistener(ds, dcl); } @@ -1538,7 +1539,7 @@ index a9b8d63..f1c2d61 100644 void vnc_display_close(DisplayState *ds) { -@@ -2411,7 +1902,7 @@ void vnc_display_close(DisplayState *ds) +@@ -2410,7 +1901,7 @@ void vnc_display_close(DisplayState *ds) vs->auth = VNC_AUTH_INVALID; #ifdef CONFIG_VNC_TLS vs->subauth = VNC_AUTH_INVALID; @@ -1547,7 +1548,7 @@ index a9b8d63..f1c2d61 100644 #endif } -@@ -2467,7 +1958,7 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -2466,7 +1957,7 @@ int vnc_display_open(DisplayState *ds, const char *display) char *start, *end; x509 = 1; /* Require x509 certificates */ if (strncmp(options, "x509verify", 10) == 0) @@ -1556,7 +1557,7 @@ index a9b8d63..f1c2d61 100644 /* Now check for 'x509=/some/path' postfix * and use that to setup x509 certificate/key paths */ -@@ -2478,7 +1969,7 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -2477,7 +1968,7 @@ int vnc_display_open(DisplayState *ds, const char *display) char *path = qemu_strndup(start + 1, len); VNC_DEBUG("Trying certificate path '%s'\n", path); @@ -1695,5 +1696,5 @@ index eb33643..d69b295 100644 + #endif /* __QEMU_VNC_H */ -- -1.6.2.2 +1.6.2.5 diff --git a/06-vnc-sasl.patch b/06-vnc-sasl.patch index 9a7e57e..cb9d7b5 100644 --- a/06-vnc-sasl.patch +++ b/06-vnc-sasl.patch @@ -1,7 +1,7 @@ -From 95b704fb6b2a9a7f62bbbfd1b9fd2e23d1c428a5 Mon Sep 17 00:00:00 2001 +From 1b4f956f40315ecc756e34cdeb923424c7095684 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:28 +0000 -Subject: [PATCH 06/18] Add SASL authentication support ("Daniel P. Berrange") +Subject: [PATCH] Add SASL authentication support ("Daniel P. Berrange") This patch adds the new SASL authentication protocol to the VNC server. @@ -69,6 +69,7 @@ if found, unless --disable-vnc-sasl was given to override it. Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 06-vnc-sasl.patch --- Makefile | 7 +- Makefile.target | 5 + @@ -86,7 +87,7 @@ Signed-off-by: Mark McLoughlin create mode 100644 vnc-auth-sasl.h diff --git a/Makefile b/Makefile -index 7a3cad5..f5de0b6 100644 +index 680939f..13ae73d 100644 --- a/Makefile +++ b/Makefile @@ -152,6 +152,9 @@ OBJS+=vnc.o d3des.o @@ -1120,7 +1121,7 @@ index 1f113a7..9ed642c 100644 static int protocol_client_vencrypt_auth(VncState *vs, uint8_t *data, size_t len) diff --git a/vnc.c b/vnc.c -index f1c2d61..33671fd 100644 +index f980d68..3c315d6 100644 --- a/vnc.c +++ b/vnc.c @@ -68,7 +68,8 @@ static char *addr_to_string(const char *format, @@ -1433,7 +1434,7 @@ index f1c2d61..33671fd 100644 default: /* Should not be possible, but just in case */ VNC_DEBUG("Reject auth %d\n", vs->vd->auth); vnc_write_u8(vs, 1); -@@ -1932,6 +2072,10 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -1931,6 +2071,10 @@ int vnc_display_open(DisplayState *ds, const char *display) #ifdef CONFIG_VNC_TLS int tls = 0, x509 = 0; #endif @@ -1444,7 +1445,7 @@ index f1c2d61..33671fd 100644 if (!vnc_display) return -1; -@@ -1951,6 +2095,10 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -1950,6 +2094,10 @@ int vnc_display_open(DisplayState *ds, const char *display) reverse = 1; } else if (strncmp(options, "to=", 3) == 0) { to_port = atoi(options+3) + 5900; @@ -1455,7 +1456,7 @@ index f1c2d61..33671fd 100644 #ifdef CONFIG_VNC_TLS } else if (strncmp(options, "tls", 3) == 0) { tls = 1; /* Require TLS */ -@@ -1987,6 +2135,22 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -1986,6 +2134,22 @@ int vnc_display_open(DisplayState *ds, const char *display) } } @@ -1478,7 +1479,7 @@ index f1c2d61..33671fd 100644 if (password) { #ifdef CONFIG_VNC_TLS if (tls) { -@@ -1999,13 +2163,34 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -1998,13 +2162,34 @@ int vnc_display_open(DisplayState *ds, const char *display) vs->subauth = VNC_AUTH_VENCRYPT_TLSVNC; } } else { @@ -1515,7 +1516,7 @@ index f1c2d61..33671fd 100644 } else { #ifdef CONFIG_VNC_TLS if (tls) { -@@ -2027,6 +2212,16 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -2026,6 +2211,16 @@ int vnc_display_open(DisplayState *ds, const char *display) #endif } @@ -1615,5 +1616,5 @@ index d69b295..ca39c23 100644 + #endif /* __QEMU_VNC_H */ -- -1.6.2.2 +1.6.2.5 diff --git a/07-vnc-monitor-authinfo.patch b/07-vnc-monitor-authinfo.patch index a4477b3..fc99da0 100644 --- a/07-vnc-monitor-authinfo.patch +++ b/07-vnc-monitor-authinfo.patch @@ -1,7 +1,7 @@ -From 9e9226fb865ada61b8b0a6c2c5526fdedfd4d608 Mon Sep 17 00:00:00 2001 +From e61c19737387273e305a2da5c9b28fe42e2eef67 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:32 +0000 -Subject: [PATCH 07/18] Include auth credentials in 'info vnc' ("Daniel P. Berrange") +Subject: [PATCH] Include auth credentials in 'info vnc' ("Daniel P. Berrange") This patch extends the 'info vnc' monitor output to include information about the VNC client authentication credentials. @@ -30,6 +30,7 @@ Auth can be stacked, so both username & x509 dname may be shown. Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 07-vnc-monitor-authinfo.patch --- vnc-tls.c | 17 +++++++++++++++++ vnc-tls.h | 3 +++ @@ -86,7 +87,7 @@ index cda95b9..fd0a2d9 100644 int vnc_tls_client_setup(VncState *vs, int x509Creds); diff --git a/vnc.c b/vnc.c -index 33671fd..da68842 100644 +index 3c315d6..9f0e16b 100644 --- a/vnc.c +++ b/vnc.c @@ -156,6 +156,21 @@ static void do_info_vnc_client(VncState *client) @@ -130,5 +131,5 @@ index 33671fd..da68842 100644 if (vs->minor >= 8) { static const char err[] = "Authentication failed"; -- -1.6.2.2 +1.6.2.5 diff --git a/08-vnc-acl-mgmt.patch b/08-vnc-acl-mgmt.patch index 087bfb3..0564e9e 100644 --- a/08-vnc-acl-mgmt.patch +++ b/08-vnc-acl-mgmt.patch @@ -1,7 +1,7 @@ -From 5fd8471df80cfd1e868ea50125065536c8fe900c Mon Sep 17 00:00:00 2001 +From e71cbebb569fa3d9b285a03a72802609b43bd6e9 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:37 +0000 -Subject: [PATCH 08/18] Support ACLs for controlling VNC access ("Daniel P. Berrange") +Subject: [PATCH] Support ACLs for controlling VNC access ("Daniel P. Berrange") This patch introduces a generic internal API for access control lists to be used by network servers in QEMU. It adds support for checking @@ -70,6 +70,7 @@ starting up Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori Signed-off-by: Mark McLoughlin +Fedora-patch: 08-vnc-acl-mgmt.patch --- Makefile | 6 +- acl.c | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -88,7 +89,7 @@ Signed-off-by: Mark McLoughlin create mode 100644 acl.h diff --git a/Makefile b/Makefile -index f5de0b6..2af4c06 100644 +index 13ae73d..fa1afdc 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ endif @@ -736,7 +737,7 @@ index fd0a2d9..2b93633 100644 /* Paths to x509 certs/keys */ char *x509cacert; diff --git a/vnc.c b/vnc.c -index da68842..44a7746 100644 +index 9f0e16b..f797878 100644 --- a/vnc.c +++ b/vnc.c @@ -28,6 +28,7 @@ @@ -747,7 +748,7 @@ index da68842..44a7746 100644 #define VNC_REFRESH_INTERVAL (1000 / 30) -@@ -2091,6 +2092,7 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -2090,6 +2091,7 @@ int vnc_display_open(DisplayState *ds, const char *display) int sasl = 0; int saslErr; #endif @@ -755,7 +756,7 @@ index da68842..44a7746 100644 if (!vnc_display) return -1; -@@ -2147,9 +2149,28 @@ int vnc_display_open(DisplayState *ds, const char *display) +@@ -2146,9 +2148,28 @@ int vnc_display_open(DisplayState *ds, const char *display) return -1; } #endif @@ -799,5 +800,5 @@ index ca39c23..6a60f8d 100644 struct VncState -- -1.6.2.2 +1.6.2.5 diff --git a/kvm-upstream-ppc.patch b/kvm-upstream-ppc.patch index 3fe6e8a..69c41c2 100644 --- a/kvm-upstream-ppc.patch +++ b/kvm-upstream-ppc.patch @@ -1,7 +1,7 @@ -From a103fc3415c6efcd04a73ca928482fc3467e9400 Mon Sep 17 00:00:00 2001 +From d842e3222f8ce614769d1cf8227bb3b8dbf209bc Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Wed, 24 Jun 2009 14:22:57 +0100 -Subject: [PATCH 09/18] use KVM_UPSTREAM for ppc. +Subject: [PATCH] use KVM_UPSTREAM for ppc. ppc should compile with upstream qemu code, so, put these defines in ppc specific code that references kvm functions. @@ -12,6 +12,7 @@ and would break compilation. Signed-off-by: Glauber Costa Signed-off-by: Mark McLoughlin +Fedora-patch: kvm-upstream-ppc.patch --- hw/ppc440.c | 1 + hw/ppc440_bamboo.c | 1 + @@ -68,5 +69,5 @@ index e02dcb0..027c8e7 100644 //#define DEBUG_MMU -- -1.6.2.2 +1.6.2.5 diff --git a/qemu-fix-net-socket-list-init.patch b/qemu-fix-net-socket-list-init.patch deleted file mode 100644 index 8fb4dd9..0000000 --- a/qemu-fix-net-socket-list-init.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 16eed05e9fe61c502fc2f936a68c252693804541 Mon Sep 17 00:00:00 2001 -From: aliguori -Date: Tue, 21 Apr 2009 19:56:11 +0000 -Subject: [PATCH 15/18] net: Fix -net socket,listen (Jan Kiszka) - -In case no symbolic name is provided when requesting VLAN connection via -listening TCP socket ('-net socket,listen=...'), qemu crashes. This -fixes the cause. - -(cherry picked from commit ea053add700d8abe203cd79a9ffb082aee4eabc0) - -Signed-off-by: Jan Kiszka -Signed-off-by: Anthony Liguori -Signed-off-by: Mark McLoughlin ---- - net.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/net.c b/net.c -index ef3a965..fee02b8 100644 ---- a/net.c -+++ b/net.c -@@ -1658,7 +1658,7 @@ static int net_socket_listen_init(VLANState *vlan, - } - s->vlan = vlan; - s->model = strdup(model); -- s->name = strdup(name); -+ s->name = name ? strdup(name) : NULL; - s->fd = fd; - qemu_set_fd_handler(fd, net_socket_accept, NULL, s); - return 0; --- -1.6.2.2 - diff --git a/qemu-prevent-cdrom-media-eject-while-device-is-locked.patch b/qemu-prevent-cdrom-media-eject-while-device-is-locked.patch deleted file mode 100644 index 70139e0..0000000 --- a/qemu-prevent-cdrom-media-eject-while-device-is-locked.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 1941d978942be058aab8df4fafe3a5a444ee17c8 Mon Sep 17 00:00:00 2001 -From: Mark McLoughlin -Date: Wed, 27 May 2009 10:06:11 +0100 -Subject: [PATCH 16/18] Prevent CD-ROM media eject while device is locked - -Section 10.8.25 ("START/STOP UNIT Command") of SFF-8020i states that -if the device is locked we should refuse to eject if the device is -locked. - -ASC_MEDIA_REMOVAL_PREVENTED is the appropriate return in this case. - -In order to stop itself from ejecting the media it is running from, -Fedora's installer (anaconda) requires the CDROMEJECT ioctl() to fail -if the drive has been previously locked. - -See also https://bugzilla.redhat.com/501412 - -(cherry picked from commit aea2a33c73f28ecd8f10b242ecadddcc79c1c28b) - -Signed-off-by: Mark McLoughlin -Signed-off-by: Anthony Liguori ---- - block.c | 9 ++++++++- - block.h | 2 +- - hw/ide.c | 26 ++++++++++++++++++-------- - 3 files changed, 27 insertions(+), 10 deletions(-) - -diff --git a/block.c b/block.c -index 9a2873f..863897a 100644 ---- a/block.c -+++ b/block.c -@@ -1673,11 +1673,15 @@ int bdrv_media_changed(BlockDriverState *bs) - /** - * If eject_flag is TRUE, eject the media. Otherwise, close the tray - */ --void bdrv_eject(BlockDriverState *bs, int eject_flag) -+int bdrv_eject(BlockDriverState *bs, int eject_flag) - { - BlockDriver *drv = bs->drv; - int ret; - -+ if (bs->locked) { -+ return -EBUSY; -+ } -+ - if (!drv || !drv->bdrv_eject) { - ret = -ENOTSUP; - } else { -@@ -1686,7 +1690,10 @@ void bdrv_eject(BlockDriverState *bs, int eject_flag) - if (ret == -ENOTSUP) { - if (eject_flag) - bdrv_close(bs); -+ ret = 0; - } -+ -+ return ret; - } - - int bdrv_is_locked(BlockDriverState *bs) -diff --git a/block.h b/block.h -index 979781a..e1070e9 100644 ---- a/block.h -+++ b/block.h -@@ -132,7 +132,7 @@ int bdrv_is_inserted(BlockDriverState *bs); - int bdrv_media_changed(BlockDriverState *bs); - int bdrv_is_locked(BlockDriverState *bs); - void bdrv_set_locked(BlockDriverState *bs, int locked); --void bdrv_eject(BlockDriverState *bs, int eject_flag); -+int bdrv_eject(BlockDriverState *bs, int eject_flag); - void bdrv_set_change_cb(BlockDriverState *bs, - void (*change_cb)(void *opaque), void *opaque); - void bdrv_get_format(BlockDriverState *bs, char *buf, int buf_size); -diff --git a/hw/ide.c b/hw/ide.c -index 6ad1d08..9b93e7f 100644 ---- a/hw/ide.c -+++ b/hw/ide.c -@@ -359,6 +359,7 @@ - #define ASC_INCOMPATIBLE_FORMAT 0x30 - #define ASC_MEDIUM_NOT_PRESENT 0x3a - #define ASC_SAVING_PARAMETERS_NOT_SUPPORTED 0x39 -+#define ASC_MEDIA_REMOVAL_PREVENTED 0x53 - - #define CFA_NO_ERROR 0x00 - #define CFA_MISC_ERROR 0x09 -@@ -1818,18 +1819,27 @@ static void ide_atapi_cmd(IDEState *s) - break; - case GPCMD_START_STOP_UNIT: - { -- int start, eject; -+ int start, eject, err = 0; - start = packet[4] & 1; - eject = (packet[4] >> 1) & 1; - -- if (eject && !start) { -- /* eject the disk */ -- bdrv_eject(s->bs, 1); -- } else if (eject && start) { -- /* close the tray */ -- bdrv_eject(s->bs, 0); -+ if (eject) { -+ err = bdrv_eject(s->bs, !start); -+ } -+ -+ switch (err) { -+ case 0: -+ ide_atapi_cmd_ok(s); -+ break; -+ case -EBUSY: -+ ide_atapi_cmd_error(s, SENSE_NOT_READY, -+ ASC_MEDIA_REMOVAL_PREVENTED); -+ break; -+ default: -+ ide_atapi_cmd_error(s, SENSE_NOT_READY, -+ ASC_MEDIUM_NOT_PRESENT); -+ break; - } -- ide_atapi_cmd_ok(s); - } - break; - case GPCMD_MECHANISM_STATUS: --- -1.6.2.2 - diff --git a/qemu.spec b/qemu.spec index 5e02d14..e500af0 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,14 +1,14 @@ Summary: QEMU is a FAST! processor emulator Name: qemu -Version: 0.10.5 -Release: 3%{?dist} +Version: 0.10.6 +Release: 1%{?dist} # Epoch because we pushed a qemu-1.0 package Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD Group: Development/Tools URL: http://www.qemu.org/ -Source0: http://download.sourceforge.net/sourceforge/kvm/qemu-kvm-%{version}.tar.gz +Source0: http://downloads.sourceforge.net/sourceforge/kvm/qemu-kvm-%{version}.tar.gz Source1: qemu.init Source2: kvm.modules @@ -27,10 +27,8 @@ Patch11: qemu-roms-more-room.patch Patch12: qemu-roms-more-room-fix-vga-align.patch Patch13: qemu-bios-bigger-roms.patch Patch14: qemu-kvm-fix-kerneldir-includes.patch -Patch15: qemu-fix-net-socket-list-init.patch -Patch16: qemu-prevent-cdrom-media-eject-while-device-is-locked.patch -Patch17: qemu-avoid-harmless-msr-warnings.patch -Patch18: qemu-ppc-on-ppc.patch +Patch15: qemu-avoid-harmless-msr-warnings.patch +Patch16: qemu-ppc-on-ppc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel @@ -227,8 +225,6 @@ such as kvmtrace and kvm_stat. %patch14 -p1 %patch15 -p1 %patch16 -p1 -%patch17 -p1 -%patch18 -p1 %build # systems like rhel build system does not have a recent enough linker so @@ -471,6 +467,25 @@ fi %{_mandir}/man1/qemu-img.1* %changelog +* Tue Aug 4 2009 Mark McLoughlin - 2:0.10.6-1 +- Update to qemu-kvm-0.10.6; upstream ChangeLog: + - merge qemu 0.10.6 + - fix -net socket,listen + - live migration: don't send gratuitous packets all at once + - serial: fix lost characters after sysrq + - Delete io-handler before closing fd after migration + - Fix qemu_aio_flush + - i386: fix cpu reset + - Prevent CD-ROM eject while device is locked + - Fix migration after hot remove with eepro100 + - Don't start a VM after failed migration if stopped + - Fix live migration under heavy IO load + - Honor -S on incoming migration + - Reset PS2 keyboard/mouse on reset + - build and install extboot +- Drop upstreamed qemu-prevent-cdrom-media-eject-while-device-is-locked.patch + and qemu-fix-net-socket-list-init.patch and + * Wed Jun 17 2009 Mark McLoughlin - 2:0.10.5-3 - ppc-on-ppc fix (#504273) - Fix -kernel regression (#506443) diff --git a/sources b/sources index 5973caa..166a60b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e59ca20604ca8892d8f99b9fc5a159c1 qemu-kvm-0.10.5.tar.gz +704101efb98a271763342ef5b187a3bd qemu-kvm-0.10.6.tar.gz