Sync patches from git

remotes/origin/f11
Mark McLoughlin 2009-08-17 08:08:56 +00:00
parent 8841355697
commit 3eb78ffd37
26 changed files with 419 additions and 218 deletions

View File

@ -1,14 +1,17 @@
From 934b71abf1b908f720811a44ad5411cfc1a4ca37 Mon Sep 17 00:00:00 2001 From 6e80c60b89728de28267242f7373ecf553e40bc1 Mon Sep 17 00:00:00 2001
From: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Thu, 28 May 2009 13:15:57 +0000 Date: Thu, 28 May 2009 13:15:57 +0000
Subject: [PATCH 1/1] Avoid broken networking with new QEMU/KVM >= 86 Subject: [PATCH] Avoid broken networking with new QEMU/KVM >= 86
(cherry picked from commit 2afc3bfd8b779ddba974da9d66d6ea337fc91c01)
Fedora-patch: libvirt-0.6.2-avoid-broken-networking-with-newer-qemu.patch
--- ---
src/qemu_conf.c | 4 ++-- src/qemu_conf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-) 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu_conf.c b/src/qemu_conf.c diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 93dc0b7..a04d216 100644 index fc0e772..99f13c6 100644
--- a/src/qemu_conf.c --- a/src/qemu_conf.c
+++ b/src/qemu_conf.c +++ b/src/qemu_conf.c
@@ -658,8 +658,8 @@ qemudNetworkIfaceConnect(virConnectPtr conn, @@ -658,8 +658,8 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
@ -23,5 +26,5 @@ index 93dc0b7..a04d216 100644
if (!(retval = strdup(tapfdstr))) if (!(retval = strdup(tapfdstr)))
goto no_memory; goto no_memory;
-- --
1.6.0.6 1.6.2.5

View File

@ -1,10 +1,11 @@
From 4db7474b0c1907e877d7206edeb4d73962971096 Mon Sep 17 00:00:00 2001 From 6635abc3bbe54e6b0168182805de92cd70d125e4 Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com> From: Daniel Veillard <veillard@redhat.com>
Date: Tue, 12 May 2009 15:31:22 +0000 Date: Tue, 12 May 2009 15:31:22 +0000
Subject: [PATCH 1/1] * src/network_driver.c: enable bridges which are not up Subject: [PATCH] * src/network_driver.c: enable bridges which are not up without an IP address, patch by Ludwig Nussel
without an IP address, patch by Ludwig Nussel
Daniel
(cherry picked from commit e978774ec67f4b062b1f65e5c76a13193a9430eb)
Fedora-patch: libvirt-0.6.2-bring-up-ipless-bridge.patch
--- ---
src/network_driver.c | 9 +++------ src/network_driver.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-) 1 files changed, 3 insertions(+), 6 deletions(-)
@ -44,5 +45,5 @@ index a17a769..a163b15 100644
network->def->bridge, virStrerror(err, ebuf, sizeof ebuf)); network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
} }
-- --
1.6.0.6 1.6.2.5

View File

@ -1,13 +1,19 @@
commit 8feb499ba2c3625632210c997b49f5df515c05d4 From f793cd9b7220145b6df8086d77db4fdc035d680b Mon Sep 17 00:00:00 2001
Author: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Tue Aug 4 18:13:09 2009 +0100 Date: Tue, 4 Aug 2009 18:13:09 +0100
Subject: [PATCH] Fix escaping of 8-bit high characters
Fix escaping of 8-bit high characters Fix https://bugzilla.redhat.com/show_bug.cgi?id=479517
Fix https://bugzilla.redhat.com/show_bug.cgi?id=479517 * src/buf.c: Cast to 'unsigned char' before doing compare to
avoid rejecting 8-bit high characters
* src/buf.c: Cast to 'unsigned char' before doing compare to (cherry picked from commit 8feb499ba2c3625632210c997b49f5df515c05d4)
avoid rejecting 8-bit high characters
Fedora-patch: libvirt-0.6.2-buf-locale-escape.patch
---
src/buf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/buf.c b/src/buf.c diff --git a/src/buf.c b/src/buf.c
index 259175d..c802aa2 100644 index 259175d..c802aa2 100644
@ -22,3 +28,6 @@ index 259175d..c802aa2 100644
(*cur == '\r')) { (*cur == '\r')) {
/* /*
* default case, just copy ! * default case, just copy !
--
1.6.2.5

View File

@ -1,19 +1,23 @@
From fbd16cecc72494e8a9450f38197221f2f50c9d0e Mon Sep 17 00:00:00 2001 From 182a3cac2b4339e988802eb02279e7ab4c883c67 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Thu, 16 Apr 2009 15:56:27 +0000 Date: Thu, 16 Apr 2009 15:56:27 +0000
Subject: [PATCH 1/1] Don't log monitor output to domain log file. Subject: [PATCH] Don't log monitor output to domain log file.
It's logged via the logging system already. Prefix monitor debug output with vm It's logged via the logging system already. Prefix monitor debug output with vm
name. name.
(cherry picked from commit 5caa1e0eb050a12fe8ed02cf635bb672a56cdb6f)
Fedora-patch: libvirt-0.6.2-do-not-log-monitor-output.patch
--- ---
src/qemu_driver.c | 60 +++++++++++++++++++++------------------------------- src/qemu_driver.c | 60 +++++++++++++++++++++-------------------------------
1 files changed, 24 insertions(+), 36 deletions(-) 1 files changed, 24 insertions(+), 36 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 79ee072..f5b5fa5 100644 index 5ca3d20..cb738b2 100644
--- a/src/qemu_driver.c --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c +++ b/src/qemu_driver.c
@@ -1710,27 +1710,11 @@ qemudMonitorCommandExtra(const virDomainObjPtr vm, @@ -1706,27 +1706,11 @@ qemudMonitorCommandExtra(const virDomainObjPtr vm,
goto error; goto error;
} }
} }
@ -42,7 +46,7 @@ index 79ee072..f5b5fa5 100644
return -1; return -1;
} }
@@ -2463,7 +2447,7 @@ static int qemudDomainGetMemoryBalloon(virConnectPtr conn, @@ -2461,7 +2445,7 @@ static int qemudDomainGetMemoryBalloon(virConnectPtr conn,
goto cleanup; goto cleanup;
} }
@ -51,7 +55,7 @@ index 79ee072..f5b5fa5 100644
if ((offset = strstr(reply, BALLOON_PREFIX)) != NULL) { if ((offset = strstr(reply, BALLOON_PREFIX)) != NULL) {
unsigned int memMB; unsigned int memMB;
char *end; char *end;
@@ -2517,7 +2501,7 @@ static int qemudDomainSetMemoryBalloon(virConnectPtr conn, @@ -2515,7 +2499,7 @@ static int qemudDomainSetMemoryBalloon(virConnectPtr conn,
/* If the command failed qemu prints: 'unknown command' /* If the command failed qemu prints: 'unknown command'
* No message is printed on success it seems */ * No message is printed on success it seems */
@ -60,7 +64,7 @@ index 79ee072..f5b5fa5 100644
if (strstr(reply, "\nunknown command:")) { if (strstr(reply, "\nunknown command:")) {
/* Don't set error - it is expected memory balloon fails on many qemu */ /* Don't set error - it is expected memory balloon fails on many qemu */
ret = 0; ret = 0;
@@ -2812,7 +2796,7 @@ static int qemudDomainSave(virDomainPtr dom, @@ -2810,7 +2794,7 @@ static int qemudDomainSave(virDomainPtr dom,
goto cleanup; goto cleanup;
} }
@ -69,7 +73,7 @@ index 79ee072..f5b5fa5 100644
/* If the command isn't supported then qemu prints: /* If the command isn't supported then qemu prints:
* unknown command: migrate" */ * unknown command: migrate" */
@@ -3658,7 +3642,7 @@ static int qemudDomainChangeEjectableMedia(virConnectPtr conn, @@ -3662,7 +3646,7 @@ static int qemudDomainChangeEjectableMedia(virConnectPtr conn,
/* If the command failed qemu prints: /* If the command failed qemu prints:
* device not found, device is locked ... * device not found, device is locked ...
* No message is printed on success it seems */ * No message is printed on success it seems */
@ -78,7 +82,7 @@ index 79ee072..f5b5fa5 100644
if (strstr(reply, "\ndevice ")) { if (strstr(reply, "\ndevice ")) {
qemudReportError (conn, dom, NULL, VIR_ERR_OPERATION_FAILED, qemudReportError (conn, dom, NULL, VIR_ERR_OPERATION_FAILED,
_("changing cdrom media failed: %s"), reply); _("changing cdrom media failed: %s"), reply);
@@ -3719,7 +3703,7 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn, @@ -3723,7 +3707,7 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn,
return -1; return -1;
} }
@ -87,7 +91,7 @@ index 79ee072..f5b5fa5 100644
/* If the command succeeds qemu prints: /* If the command succeeds qemu prints:
* OK bus 0... */ * OK bus 0... */
#define PCI_ATTACH_OK_MSG "OK bus 0, slot " #define PCI_ATTACH_OK_MSG "OK bus 0, slot "
@@ -3787,7 +3771,7 @@ static int qemudDomainAttachUsbMassstorageDevice(virConnectPtr conn, @@ -3791,7 +3775,7 @@ static int qemudDomainAttachUsbMassstorageDevice(virConnectPtr conn,
return -1; return -1;
} }
@ -96,7 +100,7 @@ index 79ee072..f5b5fa5 100644
/* If the command failed qemu prints: /* If the command failed qemu prints:
* Could not add ... */ * Could not add ... */
if (strstr(reply, "Could not add ")) { if (strstr(reply, "Could not add ")) {
@@ -3841,7 +3825,7 @@ static int qemudDomainAttachHostDevice(virConnectPtr conn, @@ -3845,7 +3829,7 @@ static int qemudDomainAttachHostDevice(virConnectPtr conn,
return -1; return -1;
} }
@ -105,7 +109,7 @@ index 79ee072..f5b5fa5 100644
/* If the command failed qemu prints: /* If the command failed qemu prints:
* Could not add ... */ * Could not add ... */
if (strstr(reply, "Could not add ")) { if (strstr(reply, "Could not add ")) {
@@ -3980,7 +3964,7 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn, @@ -3984,7 +3968,7 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn,
goto cleanup; goto cleanup;
} }
@ -114,7 +118,7 @@ index 79ee072..f5b5fa5 100644
/* If the command fails due to a wrong slot qemu prints: invalid slot, /* If the command fails due to a wrong slot qemu prints: invalid slot,
* nothing is printed on success */ * nothing is printed on success */
if (strstr(reply, "invalid slot")) { if (strstr(reply, "invalid slot")) {
@@ -4210,7 +4194,7 @@ qemudDomainBlockStats (virDomainPtr dom, @@ -4214,7 +4198,7 @@ qemudDomainBlockStats (virDomainPtr dom,
"%s", _("'info blockstats' command failed")); "%s", _("'info blockstats' command failed"));
goto cleanup; goto cleanup;
} }
@ -123,7 +127,7 @@ index 79ee072..f5b5fa5 100644
/* If the command isn't supported then qemu prints the supported /* If the command isn't supported then qemu prints the supported
* info commands, so the output starts "info ". Since this is * info commands, so the output starts "info ". Since this is
@@ -4251,21 +4235,25 @@ qemudDomainBlockStats (virDomainPtr dom, @@ -4255,21 +4239,25 @@ qemudDomainBlockStats (virDomainPtr dom,
if (STRPREFIX (p, "rd_bytes=")) { if (STRPREFIX (p, "rd_bytes=")) {
p += 9; p += 9;
if (virStrToLong_ll (p, &dummy, 10, &stats->rd_bytes) == -1) if (virStrToLong_ll (p, &dummy, 10, &stats->rd_bytes) == -1)
@ -154,7 +158,7 @@ index 79ee072..f5b5fa5 100644
/* Skip to next label. */ /* Skip to next label. */
p = strchr (p, ' '); p = strchr (p, ' ');
@@ -4477,7 +4465,7 @@ qemudDomainMemoryPeek (virDomainPtr dom, @@ -4481,7 +4469,7 @@ qemudDomainMemoryPeek (virDomainPtr dom,
goto cleanup; goto cleanup;
} }
@ -163,7 +167,7 @@ index 79ee072..f5b5fa5 100644
/* Read the memory file into buffer. */ /* Read the memory file into buffer. */
if (saferead (fd, buffer, size) == (ssize_t) -1) { if (saferead (fd, buffer, size) == (ssize_t) -1) {
@@ -4794,7 +4782,7 @@ qemudDomainMigratePerform (virDomainPtr dom, @@ -4798,7 +4786,7 @@ qemudDomainMigratePerform (virDomainPtr dom,
"%s", _("off-line migration specified, but suspend operation failed")); "%s", _("off-line migration specified, but suspend operation failed"));
goto cleanup; goto cleanup;
} }
@ -172,7 +176,7 @@ index 79ee072..f5b5fa5 100644
VIR_FREE(info); VIR_FREE(info);
paused = 1; paused = 1;
@@ -4811,7 +4799,7 @@ qemudDomainMigratePerform (virDomainPtr dom, @@ -4815,7 +4803,7 @@ qemudDomainMigratePerform (virDomainPtr dom,
snprintf (cmd, sizeof cmd, "migrate_set_speed %lum", resource); snprintf (cmd, sizeof cmd, "migrate_set_speed %lum", resource);
qemudMonitorCommand (vm, cmd, &info); qemudMonitorCommand (vm, cmd, &info);
@ -181,7 +185,7 @@ index 79ee072..f5b5fa5 100644
VIR_FREE (info); VIR_FREE (info);
} }
@@ -4830,7 +4818,7 @@ qemudDomainMigratePerform (virDomainPtr dom, @@ -4834,7 +4822,7 @@ qemudDomainMigratePerform (virDomainPtr dom,
goto cleanup; goto cleanup;
} }
@ -190,7 +194,7 @@ index 79ee072..f5b5fa5 100644
/* Now check for "fail" in the output string */ /* Now check for "fail" in the output string */
if (strstr(info, "fail") != NULL) { if (strstr(info, "fail") != NULL) {
@@ -4869,7 +4857,7 @@ cleanup: @@ -4873,7 +4861,7 @@ cleanup:
vm->def->name); vm->def->name);
} }
else { else {
@ -200,5 +204,5 @@ index 79ee072..f5b5fa5 100644
} }
-- --
1.6.0.6 1.6.2.5

View File

@ -1,7 +1,7 @@
From ae4523336ac06e3ff7cc7b416fad9e57998c6b54 Mon Sep 17 00:00:00 2001 From 2d299525f5de29d11c6dc4810aa41e893535695b Mon Sep 17 00:00:00 2001
From: Tim Waugh <twaugh@redhat.com> From: Mark McLoughlin <markmc@redhat.com>
Date: Fri, 3 Jul 2009 10:29:01 +0100 Date: Fri, 3 Jul 2009 10:27:46 +0000
Subject: [PATCH 2/3] Don't unnecessarily try to change a file context Subject: [PATCH] Don't unnecessarily try to change a file context
As pointed out by Tim Waugh here: As pointed out by Tim Waugh here:
@ -12,13 +12,15 @@ matches what we want.
(Fixed to use STREQ() and not use tabs, as pointed out by danpb) (Fixed to use STREQ() and not use tabs, as pointed out by danpb)
Signed-off-by: Mark McLoughlin <markmc@redhat.com> (cherry picked from commit add254feeaa830dd5af1118c141cb140bf55b5a7)
Fedora-patch: libvirt-0.6.2-do-not-unnecessarily-try-to-change-a-file-context.patch
--- ---
src/security_selinux.c | 11 ++++++++++- src/security_selinux.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-) 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/security_selinux.c b/src/security_selinux.c diff --git a/src/security_selinux.c b/src/security_selinux.c
index db1c27d..c2015a1 100644 index 450fce2..8ebe1fe 100644
--- a/src/security_selinux.c --- a/src/security_selinux.c
+++ b/src/security_selinux.c +++ b/src/security_selinux.c
@@ -280,10 +280,19 @@ static int @@ -280,10 +280,19 @@ static int

View File

@ -1,17 +1,20 @@
From: "Daniel P. Berrange" <berrange@redhat.com> From 9b41d6550b6bf8d4450bb5b86550eb605cc1fd91 Mon Sep 17 00:00:00 2001
To: libvir-list@redhat.com From: Daniel P. Berrange <berrange@redhat.com>
Date: Thu, 30 Apr 2009 15:09:05 +0100 Date: Fri, 8 May 2009 10:07:15 +0000
Subject: [libvirt] PATCH: Enable migration with QEMU >= 0.10.0 Subject: [PATCH] Enable save/restore/migrate for QEMU >= 0.10.0
The KVM migration code was added to QEMU for the 0.10.0 release, so we (cherry picked from commit 88e22e4e8cb7fc7e1fa1d132778aa1994f4b55b6)
should enable this in libvirt now.
Daniel Fedora-patch: libvirt-0.6.2-enable-qemu-0-10-migration.patch
---
src/qemu_conf.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff -r be7993675e07 src/qemu_conf.c diff --git a/src/qemu_conf.c b/src/qemu_conf.c
--- a/src/qemu_conf.c Thu Apr 30 14:49:27 2009 +0100 index 6f9e610..929fe00 100644
+++ b/src/qemu_conf.c Thu Apr 30 15:08:45 2009 +0100 --- a/src/qemu_conf.c
@@ -472,16 +472,13 @@ int qemudExtractVersionInfo(const char * +++ b/src/qemu_conf.c
@@ -472,16 +472,13 @@ int qemudExtractVersionInfo(const char *qemu,
/* /*
* Handling of -incoming arg with varying features * Handling of -incoming arg with varying features
@ -30,7 +33,7 @@ diff -r be7993675e07 src/qemu_conf.c
*/ */
if (kvm_version >= 79) { if (kvm_version >= 79) {
flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP; flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP;
@@ -489,6 +486,9 @@ int qemudExtractVersionInfo(const char * @@ -489,6 +486,9 @@ int qemudExtractVersionInfo(const char *qemu,
flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC; flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC;
} else if (kvm_version > 0) { } else if (kvm_version > 0) {
flags |= QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO; flags |= QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO;
@ -40,6 +43,6 @@ diff -r be7993675e07 src/qemu_conf.c
} }
if (retversion) if (retversion)
-- --
1.6.2.5

View File

@ -1,17 +1,20 @@
From e7be6cc841a5652b73ddd2ccd3769c7f8bbad13d Mon Sep 17 00:00:00 2001 From 261ec2c9597b2eb6c7d91589fc66e203f60b6735 Mon Sep 17 00:00:00 2001
From: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Tue, 12 May 2009 16:41:49 +0000 Date: Tue, 12 May 2009 16:41:49 +0000
Subject: [PATCH 1/2] Fix interrupting of main event thread & protect against accidental uniniitalized variables Subject: [PATCH] Fix interrupting of main event thread & protect against accidental uniniitalized variables
(cherry picked from commit 0a31be6ba243066378c344882cc1a32802774edb)
Fedora-patch: libvirt-0.6.2-event-handling-1.patch
--- ---
qemud/event.c | 42 +++++++++++++++++++++++++++++++++++------- qemud/event.c | 42 +++++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 7 deletions(-) 1 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/qemud/event.c b/qemud/event.c diff --git a/qemud/event.c b/qemud/event.c
index 65f548e..754f2b1 100644 index 0887008..4dc1020 100644
--- a/qemud/event.c --- a/qemud/event.c
+++ b/qemud/event.c +++ b/qemud/event.c
@@ -84,10 +84,10 @@ struct virEventLoop { @@ -83,10 +83,10 @@ struct virEventLoop {
static struct virEventLoop eventLoop; static struct virEventLoop eventLoop;
/* Unique ID for the next FD watch to be registered */ /* Unique ID for the next FD watch to be registered */
@ -24,7 +27,7 @@ index 65f548e..754f2b1 100644
static void virEventLock(void) static void virEventLock(void)
{ {
@@ -143,15 +143,22 @@ int virEventAddHandleImpl(int fd, int events, @@ -142,15 +142,22 @@ int virEventAddHandleImpl(int fd, int events,
void virEventUpdateHandleImpl(int watch, int events) { void virEventUpdateHandleImpl(int watch, int events) {
int i; int i;
@ -48,7 +51,7 @@ index 65f548e..754f2b1 100644
virEventUnlock(); virEventUnlock();
} }
@@ -164,6 +171,12 @@ void virEventUpdateHandleImpl(int watch, int events) { @@ -163,6 +170,12 @@ void virEventUpdateHandleImpl(int watch, int events) {
int virEventRemoveHandleImpl(int watch) { int virEventRemoveHandleImpl(int watch) {
int i; int i;
EVENT_DEBUG("Remove handle %d", watch); EVENT_DEBUG("Remove handle %d", watch);
@ -61,7 +64,7 @@ index 65f548e..754f2b1 100644
virEventLock(); virEventLock();
for (i = 0 ; i < eventLoop.handlesCount ; i++) { for (i = 0 ; i < eventLoop.handlesCount ; i++) {
if (eventLoop.handles[i].deleted) if (eventLoop.handles[i].deleted)
@@ -172,11 +185,11 @@ int virEventRemoveHandleImpl(int watch) { @@ -171,11 +184,11 @@ int virEventRemoveHandleImpl(int watch) {
if (eventLoop.handles[i].watch == watch) { if (eventLoop.handles[i].watch == watch) {
EVENT_DEBUG("mark delete %d %d", i, eventLoop.handles[i].fd); EVENT_DEBUG("mark delete %d %d", i, eventLoop.handles[i].fd);
eventLoop.handles[i].deleted = 1; eventLoop.handles[i].deleted = 1;
@ -74,7 +77,7 @@ index 65f548e..754f2b1 100644
virEventUnlock(); virEventUnlock();
return -1; return -1;
} }
@@ -232,6 +245,12 @@ void virEventUpdateTimeoutImpl(int timer, int frequency) { @@ -231,6 +244,12 @@ void virEventUpdateTimeoutImpl(int timer, int frequency) {
struct timeval tv; struct timeval tv;
int i; int i;
EVENT_DEBUG("Updating timer %d timeout with %d ms freq", timer, frequency); EVENT_DEBUG("Updating timer %d timeout with %d ms freq", timer, frequency);
@ -87,7 +90,7 @@ index 65f548e..754f2b1 100644
if (gettimeofday(&tv, NULL) < 0) { if (gettimeofday(&tv, NULL) < 0) {
return; return;
} }
@@ -244,10 +263,10 @@ void virEventUpdateTimeoutImpl(int timer, int frequency) { @@ -243,10 +262,10 @@ void virEventUpdateTimeoutImpl(int timer, int frequency) {
frequency >= 0 ? frequency + frequency >= 0 ? frequency +
(((unsigned long long)tv.tv_sec)*1000) + (((unsigned long long)tv.tv_sec)*1000) +
(((unsigned long long)tv.tv_usec)/1000) : 0; (((unsigned long long)tv.tv_usec)/1000) : 0;
@ -99,7 +102,7 @@ index 65f548e..754f2b1 100644
virEventUnlock(); virEventUnlock();
} }
@@ -260,6 +279,12 @@ void virEventUpdateTimeoutImpl(int timer, int frequency) { @@ -259,6 +278,12 @@ void virEventUpdateTimeoutImpl(int timer, int frequency) {
int virEventRemoveTimeoutImpl(int timer) { int virEventRemoveTimeoutImpl(int timer) {
int i; int i;
EVENT_DEBUG("Remove timer %d", timer); EVENT_DEBUG("Remove timer %d", timer);
@ -112,7 +115,7 @@ index 65f548e..754f2b1 100644
virEventLock(); virEventLock();
for (i = 0 ; i < eventLoop.timeoutsCount ; i++) { for (i = 0 ; i < eventLoop.timeoutsCount ; i++) {
if (eventLoop.timeouts[i].deleted) if (eventLoop.timeouts[i].deleted)
@@ -267,11 +292,11 @@ int virEventRemoveTimeoutImpl(int timer) { @@ -266,11 +291,11 @@ int virEventRemoveTimeoutImpl(int timer) {
if (eventLoop.timeouts[i].timer == timer) { if (eventLoop.timeouts[i].timer == timer) {
eventLoop.timeouts[i].deleted = 1; eventLoop.timeouts[i].deleted = 1;
@ -125,7 +128,7 @@ index 65f548e..754f2b1 100644
virEventUnlock(); virEventUnlock();
return -1; return -1;
} }
@@ -617,9 +642,12 @@ static int virEventInterruptLocked(void) @@ -616,9 +641,12 @@ static int virEventInterruptLocked(void)
char c = '\0'; char c = '\0';
if (!eventLoop.running || if (!eventLoop.running ||
@ -140,5 +143,5 @@ index 65f548e..754f2b1 100644
return -1; return -1;
return 0; return 0;
-- --
1.6.0.6 1.6.2.5

View File

@ -1,17 +1,20 @@
From 6483ee77ed12f037d68a6adc690624fa1b508dc0 Mon Sep 17 00:00:00 2001 From ef1a3eaa58d83c3367a1addff6c8132f27aa09dd Mon Sep 17 00:00:00 2001
From: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Tue, 12 May 2009 16:43:04 +0000 Date: Tue, 12 May 2009 16:43:04 +0000
Subject: [PATCH 2/2] Fix watch/timer event deletion Subject: [PATCH] Fix watch/timer event deletion
(cherry picked from commit 470317f5c71cbcc6b6d8d83d0978aea3510d3698)
Fedora-patch: libvirt-0.6.2-event-handling-2.patch
--- ---
qemud/event.c | 112 ++++++++++++++++++++++++++------------------------------- qemud/event.c | 112 ++++++++++++++++++++++++++-------------------------------
1 files changed, 51 insertions(+), 61 deletions(-) 1 files changed, 51 insertions(+), 61 deletions(-)
diff --git a/qemud/event.c b/qemud/event.c diff --git a/qemud/event.c b/qemud/event.c
index 754f2b1..a57d967 100644 index 4dc1020..8bc7c34 100644
--- a/qemud/event.c --- a/qemud/event.c
+++ b/qemud/event.c +++ b/qemud/event.c
@@ -313,7 +313,7 @@ static int virEventCalculateTimeout(int *timeout) { @@ -312,7 +312,7 @@ static int virEventCalculateTimeout(int *timeout) {
EVENT_DEBUG("Calculate expiry of %d timers", eventLoop.timeoutsCount); EVENT_DEBUG("Calculate expiry of %d timers", eventLoop.timeoutsCount);
/* Figure out if we need a timeout */ /* Figure out if we need a timeout */
for (i = 0 ; i < eventLoop.timeoutsCount ; i++) { for (i = 0 ; i < eventLoop.timeoutsCount ; i++) {
@ -20,7 +23,7 @@ index 754f2b1..a57d967 100644
continue; continue;
EVENT_DEBUG("Got a timeout scheduled for %llu", eventLoop.timeouts[i].expiresAt); EVENT_DEBUG("Got a timeout scheduled for %llu", eventLoop.timeouts[i].expiresAt);
@@ -350,32 +350,26 @@ static int virEventCalculateTimeout(int *timeout) { @@ -349,32 +349,26 @@ static int virEventCalculateTimeout(int *timeout) {
* file handles. The caller must free the returned data struct * file handles. The caller must free the returned data struct
* returns: the pollfd array, or NULL on error * returns: the pollfd array, or NULL on error
*/ */
@ -66,7 +69,7 @@ index 754f2b1..a57d967 100644
} }
@@ -435,26 +429,30 @@ static int virEventDispatchTimeouts(void) { @@ -434,26 +428,30 @@ static int virEventDispatchTimeouts(void) {
* Returns 0 upon success, -1 if an error occurred * Returns 0 upon success, -1 if an error occurred
*/ */
static int virEventDispatchHandles(int nfds, struct pollfd *fds) { static int virEventDispatchHandles(int nfds, struct pollfd *fds) {
@ -106,7 +109,7 @@ index 754f2b1..a57d967 100644
} }
return 0; return 0;
@@ -545,22 +543,21 @@ static int virEventCleanupHandles(void) { @@ -544,22 +542,21 @@ static int virEventCleanupHandles(void) {
* at least one file handle has an event, or a timer expires * at least one file handle has an event, or a timer expires
*/ */
int virEventRunOnce(void) { int virEventRunOnce(void) {
@ -138,7 +141,7 @@ index 754f2b1..a57d967 100644
virEventUnlock(); virEventUnlock();
@@ -572,38 +569,31 @@ int virEventRunOnce(void) { @@ -571,38 +568,31 @@ int virEventRunOnce(void) {
if (errno == EINTR) { if (errno == EINTR) {
goto retry; goto retry;
} }
@ -193,5 +196,5 @@ index 754f2b1..a57d967 100644
static void virEventHandleWakeup(int watch ATTRIBUTE_UNUSED, static void virEventHandleWakeup(int watch ATTRIBUTE_UNUSED,
-- --
1.6.0.6 1.6.2.5

View File

@ -1,15 +1,19 @@
From 80965bff6d46dea1808c8bbf02f50f0e289a0e65 Mon Sep 17 00:00:00 2001 From d8bd0cff27c0572e9305e7fdbc6b843f74d9e30f Mon Sep 17 00:00:00 2001
From: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Mon, 29 Jun 2009 10:41:56 +0000 Date: Mon, 29 Jun 2009 10:41:56 +0000
Subject: [PATCH] Fix crash in QEMU driver with bad capabilities data Subject: [PATCH] Fix crash in QEMU driver with bad capabilities data
(cherry picked from commit 39c7e7a6b79bbdfa36928a430d56fa88a204e8fd)
Fedora-patch: libvirt-0.6.2-fix-libvirtd-crash-with-bad-capabilities-data.patch
--- ---
src/qemu_driver.c | 80 +++++++++++++++++++++++++++++++++++----------------- src/qemu_driver.c | 80 +++++++++++++++++++++++++++++++++++-----------------
1 files changed, 54 insertions(+), 26 deletions(-) 1 files changed, 54 insertions(+), 26 deletions(-)
diff -up libvirt-0.6.2/src/qemu_driver.c.bad-caps libvirt-0.6.2/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
--- libvirt-0.6.2/src/qemu_driver.c.bad-caps 2009-07-03 10:07:03.275252815 +0100 index cb738b2..3d3675c 100644
+++ libvirt-0.6.2/src/qemu_driver.c 2009-07-03 10:08:52.143502961 +0100 --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -360,12 +360,43 @@ next: @@ -360,12 +360,43 @@ next:
return 0; return 0;
} }
@ -56,7 +60,7 @@ diff -up libvirt-0.6.2/src/qemu_driver.c.bad-caps libvirt-0.6.2/src/qemu_driver.
virSecurityDriverPtr security_drv; virSecurityDriverPtr security_drv;
ret = virSecurityDriverStartup(&security_drv, ret = virSecurityDriverStartup(&security_drv,
@@ -381,36 +412,17 @@ qemudSecurityInit(struct qemud_driver *q @@ -381,36 +412,17 @@ qemudSecurityInit(struct qemud_driver *qemud_drv)
} }
qemud_drv->securityDriver = security_drv; qemud_drv->securityDriver = security_drv;
@ -96,7 +100,7 @@ diff -up libvirt-0.6.2/src/qemu_driver.c.bad-caps libvirt-0.6.2/src/qemu_driver.
/** /**
* qemudStartup: * qemudStartup:
@@ -1852,13 +1864,29 @@ static int qemudGetNodeInfo(virConnectPt @@ -1852,13 +1864,29 @@ static int qemudGetNodeInfo(virConnectPtr conn,
static char *qemudGetCapabilities(virConnectPtr conn) { static char *qemudGetCapabilities(virConnectPtr conn) {
struct qemud_driver *driver = conn->privateData; struct qemud_driver *driver = conn->privateData;
@ -128,3 +132,6 @@ diff -up libvirt-0.6.2/src/qemu_driver.c.bad-caps libvirt-0.6.2/src/qemu_driver.
qemuDriverUnlock(driver); qemuDriverUnlock(driver);
return xml; return xml;
--
1.6.2.5

View File

@ -1,7 +1,28 @@
diff -rup libvirt-0.6.2/src/security_selinux.c new/src/security_selinux.c From 99c018831379f23e65860ad4f3628a6d5f1a7d5a Mon Sep 17 00:00:00 2001
--- libvirt-0.6.2/src/security_selinux.c 2009-05-10 22:04:25.000000000 -0400 From: Mark McLoughlin <markmc@redhat.com>
+++ new/src/security_selinux.c 2009-05-10 22:06:09.000000000 -0400 Date: Fri, 3 Jul 2009 10:29:09 +0000
@@ -338,6 +338,9 @@ SELinuxSetSecurityImageLabel(virConnectP Subject: [PATCH] Skip labelling if no src path present
Fixes startup of guest's with sourceless cdrom devices.
Patch from Cole Robinson originally posted here:
https://bugzilla.redhat.com/499569
but never sent upstream.
(cherry picked from commit 67d0c6eb9410d5101f4820a7286deacb6398afde)
Fedora-patch: libvirt-0.6.2-fix-nosource-label.patch
---
src/security_selinux.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/security_selinux.c b/src/security_selinux.c
index 95fa0a6..450fce2 100644
--- a/src/security_selinux.c
+++ b/src/security_selinux.c
@@ -338,6 +338,9 @@ SELinuxSetSecurityImageLabel(virConnectPtr conn,
{ {
const virSecurityLabelDefPtr secdef = &vm->def->seclabel; const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
@ -11,3 +32,6 @@ diff -rup libvirt-0.6.2/src/security_selinux.c new/src/security_selinux.c
if (disk->shared) { if (disk->shared) {
return SELinuxSetFilecon(conn, disk->src, default_image_context); return SELinuxSetFilecon(conn, disk->src, default_image_context);
} else if (disk->readonly) { } else if (disk->readonly) {
--
1.6.2.5

View File

@ -1,15 +1,18 @@
From 2b3fcdc378e7bec5c1a78b81632756e92930fd24 Mon Sep 17 00:00:00 2001 From 9f6a5f50aee13575331f79f5d93635f701646eb7 Mon Sep 17 00:00:00 2001
From: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Mon, 11 May 2009 15:14:24 +0000 Date: Mon, 11 May 2009 15:14:24 +0000
Subject: [PATCH 1/1] Fix QEMU ARGV detection with kvm >= 85 Subject: [PATCH] Fix QEMU ARGV detection with kvm >= 85
(cherry picked from commit 426f9772b84752b4901b72fd382ff6e28e258efd)
Fedora-patch: libvirt-0.6.2-fix-qemu-argv-detection-with-kvm-85.patch
--- ---
src/qemu_conf.c | 18 ++++++++++++++---- src/qemu_conf.c | 18 ++++++++++++++----
src/qemu_driver.c | 12 ++---------- src/qemu_driver.c | 12 ++----------
2 files changed, 16 insertions(+), 14 deletions(-) 2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/src/qemu_conf.c b/src/qemu_conf.c diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 9cb71eb..a57d3ab 100644 index 929fe00..3e7e32d 100644
--- a/src/qemu_conf.c --- a/src/qemu_conf.c
+++ b/src/qemu_conf.c +++ b/src/qemu_conf.c
@@ -431,18 +431,28 @@ int qemudExtractVersionInfo(const char *qemu, @@ -431,18 +431,28 @@ int qemudExtractVersionInfo(const char *qemu,
@ -46,10 +49,10 @@ index 9cb71eb..a57d3ab 100644
version = (major * 1000 * 1000) + (minor * 1000) + micro; version = (major * 1000 * 1000) + (minor * 1000) + micro;
diff --git a/src/qemu_driver.c b/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 30642d5..bd60b29 100644 index 4752a64..5ca3d20 100644
--- a/src/qemu_driver.c --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c +++ b/src/qemu_driver.c
@@ -1391,12 +1391,8 @@ static int qemudStartVMDaemon(virConnectPtr conn, @@ -1379,12 +1379,8 @@ static int qemudStartVMDaemon(virConnectPtr conn,
if (qemudExtractVersionInfo(emulator, if (qemudExtractVersionInfo(emulator,
NULL, NULL,
@ -63,7 +66,7 @@ index 30642d5..bd60b29 100644
if (qemuPrepareHostDevices(conn, vm->def) < 0) if (qemuPrepareHostDevices(conn, vm->def) < 0)
goto cleanup; goto cleanup;
@@ -3715,12 +3711,8 @@ static int qemudDomainChangeEjectableMedia(virConnectPtr conn, @@ -3606,12 +3602,8 @@ static int qemudDomainChangeEjectableMedia(virConnectPtr conn,
if (qemudExtractVersionInfo(vm->def->emulator, if (qemudExtractVersionInfo(vm->def->emulator,
NULL, NULL,
@ -78,5 +81,5 @@ index 30642d5..bd60b29 100644
if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE) { if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE) {
if (!(devname = qemudDiskDeviceName(conn, newdisk))) if (!(devname = qemudDiskDeviceName(conn, newdisk)))
-- --
1.6.0.6 1.6.2.5

View File

@ -1,17 +1,23 @@
commit 1795bfe4a177a5eff1b3b0a16d56df6f371c0f8e From 0aac99f8e13dfc74b87986908165ae7f44662153 Mon Sep 17 00:00:00 2001
Author: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Mon Jul 6 16:01:55 2009 +0100 Date: Mon, 6 Jul 2009 16:01:55 +0100
Subject: [PATCH] Fix SELinux denial during hotplug
Fix SELinux denial during hotplug * src/qemu_driver.c: Relabel disk images *before* running QEMU
hotplug monitor commands
* src/qemu_driver.c: Relabel disk images *before* running QEMU (cherry picked from commit 1795bfe4a177a5eff1b3b0a16d56df6f371c0f8e)
hotplug monitor commands
Fedora-patch: libvirt-0.6.2-hotplug-labelling.patch
---
src/qemu_driver.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 5a0ab12..342ba01 100644 index 5fc21a1..f3661f8 100644
--- a/src/qemu_driver.c --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c +++ b/src/qemu_driver.c
@@ -4225,10 +4225,14 @@ static int qemudDomainAttachDevice(virDomainPtr dom, @@ -3934,10 +3934,14 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
switch (dev->data.disk->device) { switch (dev->data.disk->device) {
case VIR_DOMAIN_DISK_DEVICE_CDROM: case VIR_DOMAIN_DISK_DEVICE_CDROM:
case VIR_DOMAIN_DISK_DEVICE_FLOPPY: case VIR_DOMAIN_DISK_DEVICE_FLOPPY:
@ -26,7 +32,7 @@ index 5a0ab12..342ba01 100644
if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB) { if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB) {
ret = qemudDomainAttachUsbMassstorageDevice(dom->conn, vm, dev); ret = qemudDomainAttachUsbMassstorageDevice(dom->conn, vm, dev);
} else if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_SCSI || } else if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_SCSI ||
@@ -4240,8 +4244,6 @@ static int qemudDomainAttachDevice(virDomainPtr dom, @@ -3949,8 +3953,6 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
virDomainDiskBusTypeToString(dev->data.disk->bus)); virDomainDiskBusTypeToString(dev->data.disk->bus));
goto cleanup; goto cleanup;
} }
@ -35,3 +41,6 @@ index 5a0ab12..342ba01 100644
break; break;
default: default:
--
1.6.2.5

View File

@ -1,17 +1,23 @@
commit 326ecb78145cfeb7706ef0dcd521b19d934950e7 From ae80f9ec15b03d9d3ab6cfa2d48529b459a64fb2 Mon Sep 17 00:00:00 2001
Author: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Mon Jul 6 15:58:55 2009 +0100 Date: Mon, 6 Jul 2009 15:58:55 +0100
Subject: [PATCH] Fix PCI device hotplug/unplug with newer QEMU
Fix PCI device hotplug/unplug with newer QEMU * src/qemu_driver.c: Try new monitor syntax for hotplug first. If
that fails fallback to old KVM specific syntax
* src/qemu_driver.c: Try new monitor syntax for hotplug first. If (cherry picked from commit 326ecb78145cfeb7706ef0dcd521b19d934950e7)
that fails fallback to old KVM specific syntax
Fedora-patch: libvirt-0.6.2-hotplug-monitor-syntax.patch
---
src/qemu_driver.c | 56 +++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 2e55045..5a0ab12 100644 index f3661f8..8473616 100644
--- a/src/qemu_driver.c --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c +++ b/src/qemu_driver.c
@@ -4004,6 +4004,7 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn, @@ -3724,6 +3724,7 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn,
char *cmd, *reply, *s; char *cmd, *reply, *s;
char *safe_path; char *safe_path;
const char* type = virDomainDiskBusTypeToString(dev->data.disk->bus); const char* type = virDomainDiskBusTypeToString(dev->data.disk->bus);
@ -19,7 +25,7 @@ index 2e55045..5a0ab12 100644
for (i = 0 ; i < vm->def->ndisks ; i++) { for (i = 0 ; i < vm->def->ndisks ; i++) {
if (STREQ(vm->def->disks[i]->dst, dev->data.disk->dst)) { if (STREQ(vm->def->disks[i]->dst, dev->data.disk->dst)) {
@@ -4018,14 +4019,15 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn, @@ -3738,14 +3739,15 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn,
return -1; return -1;
} }
@ -37,7 +43,7 @@ index 2e55045..5a0ab12 100644
VIR_FREE(safe_path); VIR_FREE(safe_path);
if (ret == -1) { if (ret == -1) {
virReportOOMError(conn); virReportOOMError(conn);
@@ -4041,17 +4043,27 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn, @@ -3761,17 +3763,27 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn,
DEBUG ("%s: pci_add reply: %s", vm->def->name, reply); DEBUG ("%s: pci_add reply: %s", vm->def->name, reply);
/* If the command succeeds qemu prints: /* If the command succeeds qemu prints:
@ -71,7 +77,7 @@ index 2e55045..5a0ab12 100644
VIR_FREE(reply); VIR_FREE(reply);
VIR_FREE(cmd); VIR_FREE(cmd);
return -1; return -1;
@@ -4268,6 +4280,7 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn, @@ -3990,6 +4002,7 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn,
char *cmd = NULL; char *cmd = NULL;
char *reply = NULL; char *reply = NULL;
virDomainDiskDefPtr detach = NULL; virDomainDiskDefPtr detach = NULL;
@ -79,7 +85,7 @@ index 2e55045..5a0ab12 100644
for (i = 0 ; i < vm->def->ndisks ; i++) { for (i = 0 ; i < vm->def->ndisks ; i++) {
if (STREQ(vm->def->disks[i]->dst, dev->data.disk->dst)) { if (STREQ(vm->def->disks[i]->dst, dev->data.disk->dst)) {
@@ -4289,9 +4302,17 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn, @@ -4011,9 +4024,17 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn,
goto cleanup; goto cleanup;
} }
@ -100,7 +106,7 @@ index 2e55045..5a0ab12 100644
} }
if (qemudMonitorCommand(vm, cmd, &reply) < 0) { if (qemudMonitorCommand(vm, cmd, &reply) < 0) {
@@ -4301,12 +4322,19 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn, @@ -4023,12 +4044,19 @@ static int qemudDomainDetachPciDiskDevice(virConnectPtr conn,
} }
DEBUG ("%s: pci_del reply: %s",vm->def->name, reply); DEBUG ("%s: pci_del reply: %s",vm->def->name, reply);
@ -123,3 +129,6 @@ index 2e55045..5a0ab12 100644
goto cleanup; goto cleanup;
} }
--
1.6.2.5

View File

@ -1,14 +1,17 @@
From c3b3f6005d45552d01823504925eb587889cf25a Mon Sep 17 00:00:00 2001 From 2c42e4c96efd390fa7a6957692a5863d30a10828 Mon Sep 17 00:00:00 2001
From: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Fri, 29 May 2009 14:34:35 +0000 Date: Fri, 29 May 2009 14:34:35 +0000
Subject: [PATCH 1/1] Avoid double-free in daemon client cleanup code Subject: [PATCH] Avoid double-free in daemon client cleanup code
(cherry picked from commit 6c3ef350649b959215cfc5ccfdaba35bf9560066)
Fedora-patch: libvirt-0.6.2-libvirtd-double-free.patch
--- ---
qemud/qemud.c | 22 +++++++++++++++++----- qemud/qemud.c | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-) 1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/qemud/qemud.c b/qemud/qemud.c diff --git a/qemud/qemud.c b/qemud/qemud.c
index 1375560..783dc69 100644 index 4f04355..e299a67 100644
--- a/qemud/qemud.c --- a/qemud/qemud.c
+++ b/qemud/qemud.c +++ b/qemud/qemud.c
@@ -1397,7 +1397,10 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket @@ -1397,7 +1397,10 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
@ -23,7 +26,7 @@ index 1375560..783dc69 100644
/* Deregister event delivery callback */ /* Deregister event delivery callback */
if(client->conn) { if(client->conn) {
@@ -1406,12 +1406,21 @@ void qemudDispatchClientFailure(struct qemud_client *client) { @@ -1406,12 +1409,21 @@ void qemudDispatchClientFailure(struct qemud_client *client) {
} }
#if HAVE_SASL #if HAVE_SASL
@ -50,5 +53,5 @@ index 1375560..783dc69 100644
-- --
1.6.0.6 1.6.2.5

View File

@ -1,18 +1,23 @@
commit 2d1f2e706c8b13571e1227df1c69b2302da35d5a From eb2fad7e94ba9bf48787e24542931688b9926ca1 Mon Sep 17 00:00:00 2001
Author: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Mon Jul 6 15:45:04 2009 +0100 Date: Mon, 6 Jul 2009 15:45:04 +0100
Subject: [PATCH] Fix problem with QEMU monitor welcome prompt confusing libvirt after a libvirtd daemon restart with active guests
Fix problem with QEMU monitor welcome prompt confusing libvirt * src/qemu_driver: Read and dicard pending monitor data
after a libvirtd daemon restart with active guests before issuing new monitor commands.
* src/qemu_driver: Read and dicard pending monitor data (cherry picked from commit 2d1f2e706c8b13571e1227df1c69b2302da35d5a)
before issuing new monitor commands.
Fedora-patch: libvirt-0.6.2-monitor-prompt-discard.patch
---
src/qemu_driver.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index e2b7acb..2e55045 100644 index 3d3675c..5fc21a1 100644
--- a/src/qemu_driver.c --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c +++ b/src/qemu_driver.c
@@ -1744,6 +1744,28 @@ cleanup: @@ -1636,6 +1636,28 @@ cleanup:
qemuDriverUnlock(driver); qemuDriverUnlock(driver);
} }
@ -41,7 +46,7 @@ index e2b7acb..2e55045 100644
static int static int
qemudMonitorCommandExtra(const virDomainObjPtr vm, qemudMonitorCommandExtra(const virDomainObjPtr vm,
const char *cmd, const char *cmd,
@@ -1755,6 +1777,8 @@ qemudMonitorCommandExtra(const virDomainObjPtr vm, @@ -1647,6 +1669,8 @@ qemudMonitorCommandExtra(const virDomainObjPtr vm,
size_t cmdlen = strlen(cmd); size_t cmdlen = strlen(cmd);
size_t extralen = extra ? strlen(extra) : 0; size_t extralen = extra ? strlen(extra) : 0;
@ -50,3 +55,6 @@ index e2b7acb..2e55045 100644
if (safewrite(vm->monitor, cmd, cmdlen) != cmdlen) if (safewrite(vm->monitor, cmd, cmdlen) != cmdlen)
return -1; return -1;
if (safewrite(vm->monitor, "\r", 1) != 1) if (safewrite(vm->monitor, "\r", 1) != 1)
--
1.6.2.5

View File

@ -1,7 +1,25 @@
diff -rup libvirt-0.6.2.orig/src/capabilities.c libvirt-0.6.2.new/src/capabilities.c From 3cf2f90a4747547f9877b15c1f573f8a771098e8 Mon Sep 17 00:00:00 2001
--- libvirt-0.6.2.orig/src/capabilities.c 2009-03-24 12:31:01.000000000 +0000 From: Daniel P. Berrange <berrange@redhat.com>
+++ libvirt-0.6.2.new/src/capabilities.c 2009-08-13 12:10:57.000000000 +0100 Date: Mon, 29 Jun 2009 10:41:56 +0000
@@ -122,6 +122,18 @@ virCapabilitiesFreeGuest(virCapsGuestPtr Subject: [PATCH] Fix crash in QEMU driver with bad capabilities data
(cherry picked from commit 39c7e7a6b79bbdfa36928a430d56fa88a204e8fd)
Fedora-patch: libvirt-0.6.2-numa-ignore-fail.patch
---
src/capabilities.c | 16 +++++++++++++---
src/capabilities.h | 3 +++
src/libvirt_private.syms | 1 +
src/lxc_conf.c | 11 +++++++++--
src/qemu_conf.c | 10 ++++++++--
src/uml_conf.c | 11 +++++++++--
6 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/src/capabilities.c b/src/capabilities.c
index d6e3478..8dc32a1 100644
--- a/src/capabilities.c
+++ b/src/capabilities.c
@@ -122,6 +122,18 @@ virCapabilitiesFreeGuest(virCapsGuestPtr guest)
} }
@ -31,9 +49,10 @@ diff -rup libvirt-0.6.2.orig/src/capabilities.c libvirt-0.6.2.new/src/capabiliti
for (i = 0 ; i < caps->host.nmigrateTrans ; i++) for (i = 0 ; i < caps->host.nmigrateTrans ; i++)
VIR_FREE(caps->host.migrateTrans[i]); VIR_FREE(caps->host.migrateTrans[i]);
diff -rup libvirt-0.6.2.orig/src/capabilities.h libvirt-0.6.2.new/src/capabilities.h diff --git a/src/capabilities.h b/src/capabilities.h
--- libvirt-0.6.2.orig/src/capabilities.h 2009-03-24 12:31:01.000000000 +0000 index 5b0bbab..1b49666 100644
+++ libvirt-0.6.2.new/src/capabilities.h 2009-08-13 11:50:46.000000000 +0100 --- a/src/capabilities.h
+++ b/src/capabilities.h
@@ -118,6 +118,9 @@ extern void @@ -118,6 +118,9 @@ extern void
virCapabilitiesFree(virCapsPtr caps); virCapabilitiesFree(virCapsPtr caps);
@ -44,9 +63,10 @@ diff -rup libvirt-0.6.2.orig/src/capabilities.h libvirt-0.6.2.new/src/capabiliti
virCapabilitiesSetMacPrefix(virCapsPtr caps, virCapabilitiesSetMacPrefix(virCapsPtr caps,
unsigned char *prefix); unsigned char *prefix);
diff -rup libvirt-0.6.2.orig/src/libvirt_private.syms libvirt-0.6.2.new/src/libvirt_private.syms diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
--- libvirt-0.6.2.orig/src/libvirt_private.syms 2009-04-03 15:04:28.000000000 +0100 index 350a931..9249a1a 100644
+++ libvirt-0.6.2.new/src/libvirt_private.syms 2009-08-13 11:50:59.000000000 +0100 --- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -24,6 +24,7 @@ virCapabilitiesDefaultGuestEmulator; @@ -24,6 +24,7 @@ virCapabilitiesDefaultGuestEmulator;
virCapabilitiesDefaultGuestMachine; virCapabilitiesDefaultGuestMachine;
virCapabilitiesFormatXML; virCapabilitiesFormatXML;
@ -55,9 +75,10 @@ diff -rup libvirt-0.6.2.orig/src/libvirt_private.syms libvirt-0.6.2.new/src/libv
virCapabilitiesNew; virCapabilitiesNew;
virCapabilitiesSetMacPrefix; virCapabilitiesSetMacPrefix;
virCapabilitiesGenerateMac; virCapabilitiesGenerateMac;
diff -rup libvirt-0.6.2.orig/src/lxc_conf.c libvirt-0.6.2.new/src/lxc_conf.c diff --git a/src/lxc_conf.c b/src/lxc_conf.c
--- libvirt-0.6.2.orig/src/lxc_conf.c 2009-01-31 09:04:17.000000000 +0000 index 34c8aea..fe721e3 100644
+++ libvirt-0.6.2.new/src/lxc_conf.c 2009-08-13 11:58:41.000000000 +0100 --- a/src/lxc_conf.c
+++ b/src/lxc_conf.c
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
#include "lxc_conf.h" #include "lxc_conf.h"
#include "nodeinfo.h" #include "nodeinfo.h"
@ -83,9 +104,10 @@ diff -rup libvirt-0.6.2.orig/src/lxc_conf.c libvirt-0.6.2.new/src/lxc_conf.c
/* XXX shouldn't 'borrow' KVM's prefix */ /* XXX shouldn't 'borrow' KVM's prefix */
virCapabilitiesSetMacPrefix(caps, (unsigned char []){ 0x52, 0x54, 0x00 }); virCapabilitiesSetMacPrefix(caps, (unsigned char []){ 0x52, 0x54, 0x00 });
diff -rup libvirt-0.6.2.orig/src/qemu_conf.c libvirt-0.6.2.new/src/qemu_conf.c diff --git a/src/qemu_conf.c b/src/qemu_conf.c
--- libvirt-0.6.2.orig/src/qemu_conf.c 2009-08-13 11:44:11.000000000 +0100 index 99f13c6..1194e36 100644
+++ libvirt-0.6.2.new/src/qemu_conf.c 2009-08-13 11:45:34.000000000 +0100 --- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -376,8 +376,14 @@ virCapsPtr qemudCapsInit(void) { @@ -376,8 +376,14 @@ virCapsPtr qemudCapsInit(void) {
/* Using KVM's mac prefix for QEMU too */ /* Using KVM's mac prefix for QEMU too */
virCapabilitiesSetMacPrefix(caps, (unsigned char[]){ 0x52, 0x54, 0x00 }); virCapabilitiesSetMacPrefix(caps, (unsigned char[]){ 0x52, 0x54, 0x00 });
@ -103,9 +125,10 @@ diff -rup libvirt-0.6.2.orig/src/qemu_conf.c libvirt-0.6.2.new/src/qemu_conf.c
/* First the pure HVM guests */ /* First the pure HVM guests */
for (i = 0 ; i < ARRAY_CARDINALITY(arch_info_hvm) ; i++) for (i = 0 ; i < ARRAY_CARDINALITY(arch_info_hvm) ; i++)
diff -rup libvirt-0.6.2.orig/src/uml_conf.c libvirt-0.6.2.new/src/uml_conf.c diff --git a/src/uml_conf.c b/src/uml_conf.c
--- libvirt-0.6.2.orig/src/uml_conf.c 2009-01-31 09:04:18.000000000 +0000 index c0d086e..9dd4967 100644
+++ libvirt-0.6.2.new/src/uml_conf.c 2009-08-13 11:58:47.000000000 +0100 --- a/src/uml_conf.c
+++ b/src/uml_conf.c
@@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
#include "memory.h" #include "memory.h"
#include "nodeinfo.h" #include "nodeinfo.h"
@ -131,3 +154,6 @@ diff -rup libvirt-0.6.2.orig/src/uml_conf.c libvirt-0.6.2.new/src/uml_conf.c
if ((guest = virCapabilitiesAddGuest(caps, if ((guest = virCapabilitiesAddGuest(caps,
"uml", "uml",
--
1.6.2.5

View File

@ -1,14 +1,20 @@
commit 4a7acedd3c59a6a750576cb8680bc3f08fe0b52c From d5d67ea357d92759d4a9ecb213e577835f961eed Mon Sep 17 00:00:00 2001
Author: Daniel P. Berrange <berrange@redhat.com> From: Daniel P. Berrange <berrange@redhat.com>
Date: Thu Jul 16 13:23:32 2009 +0100 Date: Thu, 16 Jul 2009 13:23:32 +0100
Subject: [PATCH] Fix free of unitialized data upon PCI open fail
Fix free of unitialized data upon PCI open fail (cherry picked from commit 4a7acedd3c59a6a750576cb8680bc3f08fe0b52c)
Fedora-patch: libvirt-0.6.2-pci-device-crash.patch
---
src/pci.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/pci.c b/src/pci.c diff --git a/src/pci.c b/src/pci.c
index 3ffa0aa..4030a14 100644 index ed64d68..68a380d 100644
--- a/src/pci.c --- a/src/pci.c
+++ b/src/pci.c +++ b/src/pci.c
@@ -834,10 +834,8 @@ pciReadDeviceID(pciDevice *dev, const char *id_name) @@ -829,10 +829,8 @@ pciReadDeviceID(pciDevice *dev, const char *id_name)
dev->name, id_name); dev->name, id_name);
/* ID string is '0xNNNN\n' ... i.e. 7 bytes */ /* ID string is '0xNNNN\n' ... i.e. 7 bytes */
@ -20,3 +26,6 @@ index 3ffa0aa..4030a14 100644
/* Check for 0x suffix */ /* Check for 0x suffix */
if (id_str[0] != '0' || id_str[1] != 'x') { if (id_str[0] != '0' || id_str[1] != 'x') {
--
1.6.2.5

View File

@ -1,15 +1,17 @@
From 0ae4c67ff5f1d24698c5cfc8a9719d333c892644 Mon Sep 17 00:00:00 2001 From bf7b58a2471a07111f8022c0176f45ee5dc5fe71 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc@redhat.com> From: Mark McLoughlin <markmc@redhat.com>
Date: Thu, 16 Apr 2009 11:23:55 +0100 Date: Thu, 16 Apr 2009 14:21:35 +0000
Subject: [PATCH 1/3] qemu -drive takes format= not fmt= Subject: [PATCH] qemu -drive takes format= not fmt=
Seems like a simple typo - it has been "format=" since the flag Seems like a simple typo - it has been "format=" since the flag
was introduced, but we added it as "fmt=". was introduced, but we added it as "fmt=".
Signed-off-by: Mark McLoughlin <markmc@redhat.com> (cherry picked from commit 9fa79000ecc883c699a6cb1ce7f00c34881bc8fe)
Fedora-patch: libvirt-0.6.2-qemu-drive-format.patch
--- ---
src/qemu_conf.c | 2 +- src/qemu_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu_conf.c b/src/qemu_conf.c diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index f36c927..6f9e610 100644 index f36c927..6f9e610 100644
@ -24,3 +26,6 @@ index f36c927..6f9e610 100644
if (disk->cachemode) { if (disk->cachemode) {
const char *mode = const char *mode =
--
1.6.2.5

View File

@ -1,7 +1,20 @@
diff -rupN libvirt-0.6.2/src/qemu_driver.c libvirt-0.6.2.new/src/qemu_driver.c From 1f1a0ca63c5492c7d41a0cdbd452a2743f314ebc Mon Sep 17 00:00:00 2001
--- libvirt-0.6.2/src/qemu_driver.c 2009-08-05 16:25:22.000000000 +0100 From: Daniel P. Berrange <berrange@redhat.com>
+++ libvirt-0.6.2.new/src/qemu_driver.c 2009-08-05 16:27:48.000000000 +0100 Date: Fri, 8 May 2009 10:11:14 +0000
@@ -2174,22 +2174,37 @@ static virDomainPtr qemudDomainCreate(vi Subject: [PATCH] Improve name & UUID uniqueness checking in QEMU driver
(cherry picked from commit 54ebbde1e18ec831ff2fddb44ec27ed5dde7874a)
Fedora-patch: libvirt-0.6.2-qemu-name-uniqueness.patch
---
src/qemu_driver.c | 103 ++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 83 insertions(+), 20 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 8473616..dfd19c5 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -2174,22 +2174,37 @@ static virDomainPtr qemudDomainCreate(virConnectPtr conn, const char *xml,
if (virSecurityDriverVerify(conn, def) < 0) if (virSecurityDriverVerify(conn, def) < 0)
goto cleanup; goto cleanup;
@ -52,7 +65,7 @@ diff -rupN libvirt-0.6.2/src/qemu_driver.c libvirt-0.6.2.new/src/qemu_driver.c
} }
if (!(vm = virDomainAssignDef(conn, if (!(vm = virDomainAssignDef(conn,
@@ -2368,6 +2383,11 @@ static int qemudDomainDestroy(virDomainP @@ -2368,6 +2383,11 @@ static int qemudDomainDestroy(virDomainPtr dom) {
_("no domain with matching id %d"), dom->id); _("no domain with matching id %d"), dom->id);
goto cleanup; goto cleanup;
} }
@ -64,7 +77,7 @@ diff -rupN libvirt-0.6.2/src/qemu_driver.c libvirt-0.6.2.new/src/qemu_driver.c
qemudShutdownVMDaemon(dom->conn, driver, vm); qemudShutdownVMDaemon(dom->conn, driver, vm);
event = virDomainEventNewFromObj(vm, event = virDomainEventNewFromObj(vm,
@@ -3272,17 +3292,36 @@ static int qemudDomainRestore(virConnect @@ -3272,17 +3292,36 @@ static int qemudDomainRestore(virConnectPtr conn,
goto cleanup; goto cleanup;
} }
@ -106,7 +119,7 @@ diff -rupN libvirt-0.6.2/src/qemu_driver.c libvirt-0.6.2.new/src/qemu_driver.c
} }
} }
@@ -3470,18 +3509,41 @@ static virDomainPtr qemudDomainDefine(vi @@ -3470,18 +3509,41 @@ static virDomainPtr qemudDomainDefine(virConnectPtr conn, const char *xml) {
if (virSecurityDriverVerify(conn, def) < 0) if (virSecurityDriverVerify(conn, def) < 0)
goto cleanup; goto cleanup;
@ -150,7 +163,7 @@ diff -rupN libvirt-0.6.2/src/qemu_driver.c libvirt-0.6.2.new/src/qemu_driver.c
vm->persistent = 1; vm->persistent = 1;
if (virDomainSaveConfig(conn, if (virDomainSaveConfig(conn,
@@ -3503,6 +3565,7 @@ static virDomainPtr qemudDomainDefine(vi @@ -3503,6 +3565,7 @@ static virDomainPtr qemudDomainDefine(virConnectPtr conn, const char *xml) {
if (dom) dom->id = vm->def->id; if (dom) dom->id = vm->def->id;
cleanup: cleanup:
@ -158,3 +171,6 @@ diff -rupN libvirt-0.6.2/src/qemu_driver.c libvirt-0.6.2.new/src/qemu_driver.c
if (vm) if (vm)
virDomainObjUnlock(vm); virDomainObjUnlock(vm);
if (event) if (event)
--
1.6.2.5

View File

@ -1,12 +1,11 @@
From daf3db93457427c25325781af684758c0341a6aa Mon Sep 17 00:00:00 2001 From 5c1ff776a3194bcc5d593aedd36cd676f1fcab64 Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com> From: Daniel Veillard <veillard@redhat.com>
Date: Fri, 29 May 2009 13:32:06 +0000 Date: Fri, 29 May 2009 13:32:06 +0000
Subject: [PATCH 1/1] PPC Qemu Machine Type update Subject: [PATCH] PPC Qemu Machine Type update * src/qemu_conf.c docs/schemas/domain.rng tests/capabilityschemadata/caps-qemu-kvm.xml: PPC Qemu Machine Type changed from g3bw to g3beige some time ago, patch by Thomas Baker
* src/qemu_conf.c docs/schemas/domain.rng
tests/capabilityschemadata/caps-qemu-kvm.xml: PPC Qemu Machine Type
changed from g3bw to g3beige some time ago, patch by Thomas Baker
Daniel
(cherry picked from commit 525c3d40a97a1ccce7c4dc314d2dd9e780b50d41)
Fedora-patch: libvirt-0.6.2-qemu-ppc-machine-type.patch
--- ---
docs/schemas/domain.rng | 2 +- docs/schemas/domain.rng | 2 +-
src/qemu_conf.c | 2 +- src/qemu_conf.c | 2 +-
@ -14,7 +13,7 @@ Subject: [PATCH 1/1] PPC Qemu Machine Type update
3 files changed, 3 insertions(+), 3 deletions(-) 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 204c633..11cf04a 100644 index 2f784e1..b29079a 100644
--- a/docs/schemas/domain.rng --- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng
@@ -184,7 +184,7 @@ @@ -184,7 +184,7 @@
@ -27,7 +26,7 @@ index 204c633..11cf04a 100644
<value>prep</value> <value>prep</value>
</choice> </choice>
diff --git a/src/qemu_conf.c b/src/qemu_conf.c diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 18156cd..d54f2ca 100644 index 3e7e32d..fc0e772 100644
--- a/src/qemu_conf.c --- a/src/qemu_conf.c
+++ b/src/qemu_conf.c +++ b/src/qemu_conf.c
@@ -192,7 +192,7 @@ static const char *const arch_info_hvm_sparc_machines[] = { @@ -192,7 +192,7 @@ static const char *const arch_info_hvm_sparc_machines[] = {
@ -53,5 +52,5 @@ index fd8523e..893f9ed 100644
<machine>prep</machine> <machine>prep</machine>
<domain type='qemu'> <domain type='qemu'>
-- --
1.6.0.6 1.6.2.5

View File

@ -1,6 +1,27 @@
diff -rup libvirt-0.6.2/src/security_selinux.c libvirt-0.6.2.new/src/security_selinux.c From 36cf92efa2b22f275bdc56411d9704e530cdb3fa Mon Sep 17 00:00:00 2001
--- libvirt-0.6.2/src/security_selinux.c 2009-04-03 15:36:56.000000000 +0100 From: Mark McLoughlin <markmc@redhat.com>
+++ libvirt-0.6.2.new/src/security_selinux.c 2009-05-05 13:39:42.000000000 +0100 Date: Fri, 3 Jul 2009 10:26:37 +0000
Subject: [PATCH] Re-label shared and readonly images
This patch was posted ages ago here:
https://bugzilla.redhat.com/493692
But was never posted upstream AFAICT.
Patch from Dan Berrange
(cherry picked from commit 547147084d03ebf30d09d242a5a721a4df664ffe)
Fedora-patch: libvirt-0.6.2-shared-readonly-label.patch
---
src/security_selinux.c | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/security_selinux.c b/src/security_selinux.c
index ac317d7..95fa0a6 100644
--- a/src/security_selinux.c
+++ b/src/security_selinux.c
@@ -24,11 +24,12 @@ @@ -24,11 +24,12 @@
#include "virterror_internal.h" #include "virterror_internal.h"
#include "util.h" #include "util.h"
@ -31,7 +52,7 @@ diff -rup libvirt-0.6.2/src/security_selinux.c libvirt-0.6.2.new/src/security_se
return 0; return 0;
} }
@@ -275,6 +281,8 @@ SELinuxSetFilecon(virConnectPtr conn, co @@ -275,6 +281,8 @@ SELinuxSetFilecon(virConnectPtr conn, const char *path, char *tcon)
{ {
char ebuf[1024]; char ebuf[1024];
@ -40,7 +61,7 @@ diff -rup libvirt-0.6.2/src/security_selinux.c libvirt-0.6.2.new/src/security_se
if(setfilecon(path, tcon) < 0) { if(setfilecon(path, tcon) < 0) {
virSecurityReportError(conn, VIR_ERR_ERROR, virSecurityReportError(conn, VIR_ERR_ERROR,
_("%s: unable to set security context " _("%s: unable to set security context "
@@ -299,6 +307,8 @@ SELinuxRestoreSecurityImageLabel(virConn @@ -299,6 +307,8 @@ SELinuxRestoreSecurityImageLabel(virConnectPtr conn,
char *newpath = NULL; char *newpath = NULL;
const char *path = disk->src; const char *path = disk->src;
@ -49,7 +70,7 @@ diff -rup libvirt-0.6.2/src/security_selinux.c libvirt-0.6.2.new/src/security_se
if (disk->readonly || disk->shared) if (disk->readonly || disk->shared)
return 0; return 0;
@@ -328,8 +338,13 @@ SELinuxSetSecurityImageLabel(virConnectP @@ -328,8 +338,13 @@ SELinuxSetSecurityImageLabel(virConnectPtr conn,
{ {
const virSecurityLabelDefPtr secdef = &vm->def->seclabel; const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
@ -64,7 +85,7 @@ diff -rup libvirt-0.6.2/src/security_selinux.c libvirt-0.6.2.new/src/security_se
return 0; return 0;
} }
@@ -403,9 +418,6 @@ SELinuxSetSecurityLabel(virConnectPtr co @@ -403,9 +418,6 @@ SELinuxSetSecurityLabel(virConnectPtr conn,
if (secdef->imagelabel) { if (secdef->imagelabel) {
for (i = 0 ; i < vm->def->ndisks ; i++) { for (i = 0 ; i < vm->def->ndisks ; i++) {
@ -74,3 +95,6 @@ diff -rup libvirt-0.6.2/src/security_selinux.c libvirt-0.6.2.new/src/security_se
if (SELinuxSetSecurityImageLabel(conn, vm, vm->def->disks[i]) < 0) if (SELinuxSetSecurityImageLabel(conn, vm, vm->def->disks[i]) < 0)
return -1; return -1;
} }
--
1.6.2.5

View File

@ -1,6 +1,21 @@
--- src/qemu_conf.c.orig 2009-04-02 11:50:10.000000000 +0200 From 02f85e2c6b3b53f89d8b4b3e5cb70b1700719516 Mon Sep 17 00:00:00 2001
+++ src/qemu_conf.c 2009-04-03 17:46:59.000000000 +0200 From: Daniel P. Berrange <berrange@redhat.com>
@@ -779,6 +779,20 @@ int qemudBuildCommandLine(virConnectPtr Date: Mon, 17 Aug 2009 08:52:30 +0100
Subject: [PATCH] Disable sound cards when running sVirt
Temporary hack till PulseAudio autostart problems are sorted out when
SELinux enforcing (bz 486112)
Fedora-patch: libvirt-0.6.2-svirt-sound.patch
---
src/qemu_conf.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 1194e36..f42aeaa 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -795,6 +795,20 @@ int qemudBuildCommandLine(virConnectPtr conn,
char domid[50]; char domid[50];
char *pidfile; char *pidfile;
const char *cpu = NULL; const char *cpu = NULL;
@ -21,7 +36,7 @@
uname_normalize(&ut); uname_normalize(&ut);
@@ -1425,7 +1439,8 @@ int qemudBuildCommandLine(virConnectPtr @@ -1441,7 +1455,8 @@ int qemudBuildCommandLine(virConnectPtr conn,
} }
/* Add sound hardware */ /* Add sound hardware */
@ -31,3 +46,6 @@
int size = 100; int size = 100;
char *modstr; char *modstr;
if (VIR_ALLOC_N(modstr, size+1) < 0) if (VIR_ALLOC_N(modstr, size+1) < 0)
--
1.6.2.5

View File

@ -1,9 +1,11 @@
From 7f7a4403860f56d5a1ad65bfd16f5bf97a971d45 Mon Sep 17 00:00:00 2001 From a7d81a2f9e80942c9951c1d16ad69c66b9a47bbb Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com> From: Daniel Veillard <veillard@redhat.com>
Date: Wed, 13 May 2009 16:19:59 +0000 Date: Wed, 13 May 2009 16:19:59 +0000
Subject: [PATCH 1/1] * src/buf.c: avoid an XML attribute escaping bug #499791 Subject: [PATCH] * src/buf.c: avoid an XML attribute escaping bug #499791 daniel
daniel
(cherry picked from commit 7afe94e7e236ec465d838e7d60e961975c526ab2)
Fedora-patch: libvirt-0.6.2-xml-attribute-escaping.patch
--- ---
src/buf.c | 16 +++++++++++++++- src/buf.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-) 1 files changed, 15 insertions(+), 1 deletions(-)
@ -43,5 +45,5 @@ index cdcdac9..259175d 100644
(*cur == '\r')) { (*cur == '\r')) {
/* /*
-- --
1.6.0.6 1.6.2.5

View File

@ -1,6 +1,6 @@
From 3d7771e0570e09096ad9391a857dad48b150bc0c Mon Sep 17 00:00:00 2001 From b3f02d5528c121bcf7b9ac5c4284517e71a5e2f2 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc@redhat.com> From: Mark McLoughlin <markmc@redhat.com>
Date: Wed, 6 May 2009 16:33:28 +0100 Date: Wed, 6 May 2009 15:56:20 +0000
Subject: [PATCH] Fix qemu driver's interpretation of <hostdev managed='yes'/> Subject: [PATCH] Fix qemu driver's interpretation of <hostdev managed='yes'/>
This change: This change:
@ -22,13 +22,15 @@ accidentally did this:
Which results in managed='yes' not causing the device to be Which results in managed='yes' not causing the device to be
detached when the guest is starting. detached when the guest is starting.
Signed-off-by: Mark McLoughlin <markmc@redhat.com> (cherry picked from commit 1d6c713b18741f1a0e3d0ccd094275a11aef138c)
Fedora-patch: libvirt-0.6.3-hostdev-managed.patch
--- ---
src/qemu_driver.c | 2 +- src/qemu_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-) 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 5898026..59312c0 100644 index 79ee072..162d072 100644
--- a/src/qemu_driver.c --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c +++ b/src/qemu_driver.c
@@ -1215,7 +1215,7 @@ static int qemuPrepareHostDevices(virConnectPtr conn, @@ -1215,7 +1215,7 @@ static int qemuPrepareHostDevices(virConnectPtr conn,
@ -41,5 +43,5 @@ index 5898026..59312c0 100644
hostdev->source.subsys.u.pci.domain, hostdev->source.subsys.u.pci.domain,
hostdev->source.subsys.u.pci.bus, hostdev->source.subsys.u.pci.bus,
-- --
1.6.0.6 1.6.2.5

View File

@ -1,17 +1,23 @@
commit 0e51348cb9aeafe5e2fd6469a4bde0baa1eb8720 From a521796bac21f0c8af38a8551a420d87b61c7a9a Mon Sep 17 00:00:00 2001
Author: Cole Robinson <crobinso@redhat.com> From: Cole Robinson <crobinso@redhat.com>
Date: Mon May 4 15:06:03 2009 -0400 Date: Wed, 6 May 2009 14:20:34 +0000
Subject: [PATCH] Refresh QEMU driver capabilities for each getCapabilities call.
Refresh QEMU driver capabilities for each getCapabilities call. Also fix up a couple issues where caps are accessed without locking
the driver structure.
Also fix up a couple issues where caps are accessed without locking (cherry picked from commit 4f107590243631869677ddea2bb667db4a1282a6)
the driver structure.
Fedora-patch: libvirt-0.6.3-refresh-qemu-caps.patch
---
src/qemu_driver.c | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 23ea961..790dac6 100644 index 162d072..4752a64 100644
--- a/src/qemu_driver.c --- a/src/qemu_driver.c
+++ b/src/qemu_driver.c +++ b/src/qemu_driver.c
@@ -1885,10 +1885,12 @@ static int qemudGetNodeInfo(virConnectPtr conn, @@ -1872,10 +1872,12 @@ static int qemudGetNodeInfo(virConnectPtr conn,
static char *qemudGetCapabilities(virConnectPtr conn) { static char *qemudGetCapabilities(virConnectPtr conn) {
struct qemud_driver *driver = conn->privateData; struct qemud_driver *driver = conn->privateData;
@ -26,7 +32,7 @@ index 23ea961..790dac6 100644
virReportOOMError(conn); virReportOOMError(conn);
qemuDriverUnlock(driver); qemuDriverUnlock(driver);
@@ -3169,20 +3171,26 @@ cleanup: @@ -3142,20 +3144,26 @@ cleanup:
return ret; return ret;
} }
@ -57,7 +63,7 @@ index 23ea961..790dac6 100644
} }
strcpy(secmodel->model, p); strcpy(secmodel->model, p);
@@ -3191,10 +3199,14 @@ static int qemudNodeGetSecurityModel(virConnectPtr conn, virSecurityModelPtr sec @@ -3164,10 +3172,14 @@ static int qemudNodeGetSecurityModel(virConnectPtr conn, virSecurityModelPtr sec
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
_("security DOI string exceeds max %d bytes"), _("security DOI string exceeds max %d bytes"),
VIR_SECURITY_DOI_BUFLEN-1); VIR_SECURITY_DOI_BUFLEN-1);
@ -74,3 +80,6 @@ index 23ea961..790dac6 100644
} }
/* TODO: check seclabel restore */ /* TODO: check seclabel restore */
--
1.6.2.5

View File

@ -294,7 +294,7 @@ of recent versions of Linux (and other OSes).
%patch22 -p1 %patch22 -p1
%patch23 -p1 %patch23 -p1
%patch200 -p0 %patch200 -p1
mv NEWS NEWS.old mv NEWS NEWS.old
iconv -f ISO-8859-1 -t UTF-8 < NEWS.old > NEWS iconv -f ISO-8859-1 -t UTF-8 < NEWS.old > NEWS