# HG changeset patch
# User Muli Ben-Yehuda <[EMAIL PROTECTED]>
# Date 1170798195 -7200
# Node ID 2328694370e14268564468e4c872fdbf30f6c3d6
# Parent 74c55612f99d478ff219758822778aac910e85f4
dont exit from kvm_get_dirty_pages on failure
Signed-off-by: Muli Ben-Yehuda <[EMAIL PROTECTED]>
diff -r 74c55612f99d -r 2328694370e1 qemu/hw/vga.c
--- a/qemu/hw/vga.c Tue Feb 06 23:29:49 2007 +0200
+++ b/qemu/hw/vga.c Tue Feb 06 23:43:15 2007 +0200
@@ -1396,9 +1396,13 @@ static void vga_draw_graphic(VGAState *s
/* HACK ALERT */
#define BITMAP_SIZE ((8*1024*1024) / 4096 / 8 / sizeof(long))
unsigned long bitmap[BITMAP_SIZE];
-
- if (kvm_allowed)
- kvm_get_dirty_pages(kvm_context, 1, &bitmap);
+ int r;
+
+ if (kvm_allowed) {
+ r = kvm_get_dirty_pages(kvm_context, 1, &bitmap);
+ if (r < 0)
+ fprintf(stderr, "kvm: get_dirty_pages returned %d\n", r);
+ }
#endif
full_update |= update_basic_params(s);
diff -r 74c55612f99d -r 2328694370e1 user/kvmctl.c
--- a/user/kvmctl.c Tue Feb 06 23:29:49 2007 +0200
+++ b/user/kvmctl.c Tue Feb 06 23:43:15 2007 +0200
@@ -205,7 +205,7 @@ void kvm_destroy_phys_mem(kvm_context_t
}
-void kvm_get_dirty_pages(kvm_context_t kvm, int slot, void *buf)
+int kvm_get_dirty_pages(kvm_context_t kvm, int slot, void *buf)
{
int r;
struct kvm_dirty_log log = {
@@ -216,7 +216,7 @@ void kvm_get_dirty_pages(kvm_context_t k
r = ioctl(kvm->fd, KVM_GET_DIRTY_LOG, &log);
if (r == -1)
- exit(1);
+ return -errno;
}
static int more_io(struct kvm_run *run, int first_time)
diff -r 74c55612f99d -r 2328694370e1 user/kvmctl.h
--- a/user/kvmctl.h Tue Feb 06 23:29:49 2007 +0200
+++ b/user/kvmctl.h Tue Feb 06 23:43:15 2007 +0200
@@ -248,6 +248,6 @@ void *kvm_create_phys_mem(kvm_context_t,
unsigned long len, int slot, int log, int writable);
void kvm_destroy_phys_mem(kvm_context_t, unsigned long phys_start,
unsigned long len);
-void kvm_get_dirty_pages(kvm_context_t, int slot, void *buf);
+int kvm_get_dirty_pages(kvm_context_t, int slot, void *buf);
#endif
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel