public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init()
@ 2009-01-15 13:47 Mark McLoughlin
  2009-01-15 13:47 ` [PATCH 02/18] kvm: qemu: make qemu_alloc_physram() and alloc_mem_area() static Mark McLoughlin
  2009-01-15 13:58 ` [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Avi Kivity
  0 siblings, 2 replies; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

NIC init functions don't return a PCIDevice pointer in upstream QEMU
but they do in KVM for hotplug.

Fixes:

  qemu/hw/pci.c:740: warning: initialization from incompatible pointer type

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/hw/virtio-net.c |    6 ++++--
 qemu/hw/virtio-net.h |    2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index 28337c3..358c382 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -409,7 +409,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
     return 0;
 }
 
-void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
+PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
 {
     VirtIONet *n;
     static int virtio_net_id;
@@ -420,7 +420,7 @@ void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
                                      sizeof(struct virtio_net_config),
                                      sizeof(VirtIONet));
     if (!n)
-        return;
+        return NULL;
 
     n->vdev.get_config = virtio_net_update_config;
     n->vdev.get_features = virtio_net_get_features;
@@ -441,4 +441,6 @@ void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
 
     register_savevm("virtio-net", virtio_net_id++, 2,
                     virtio_net_save, virtio_net_load, n);
+
+    return (PCIDevice *)n;
 }
diff --git a/qemu/hw/virtio-net.h b/qemu/hw/virtio-net.h
index 148ec47..9ac9e34 100644
--- a/qemu/hw/virtio-net.h
+++ b/qemu/hw/virtio-net.h
@@ -80,6 +80,6 @@ struct virtio_net_hdr_mrg_rxbuf
     uint16_t num_buffers;   /* Number of merged rx buffers */
 };
 
-void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn);
+PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn);
 
 #endif
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 02/18] kvm: qemu: make qemu_alloc_physram() and alloc_mem_area() static
  2009-01-15 13:47 [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Mark McLoughlin
@ 2009-01-15 13:47 ` Mark McLoughlin
  2009-01-15 13:47   ` [PATCH 03/18] kvm: qemu: kill some redundant declarations Mark McLoughlin
  2009-01-15 13:58 ` [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Avi Kivity
  1 sibling, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/vl.c:4667: warning: no previous prototype for ‘alloc_mem_area’
  qemu/vl.c:4710: warning: no previous prototype for ‘qemu_alloc_physram’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu/vl.c b/qemu/vl.c
index 7a36870..f2fe708 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -4664,7 +4664,7 @@ static int gethugepagesize(void)
     return hugepagesize;
 }
 
-void *alloc_mem_area(size_t memory, unsigned long *len, const char *path)
+static void *alloc_mem_area(size_t memory, unsigned long *len, const char *path)
 {
     char *filename;
     void *area;
@@ -4707,7 +4707,7 @@ void *alloc_mem_area(size_t memory, unsigned long *len, const char *path)
     return area;
 }
 
-void *qemu_alloc_physram(unsigned long memory)
+static void *qemu_alloc_physram(unsigned long memory)
 {
     void *area = NULL;
     unsigned long map_len = memory;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 03/18] kvm: qemu: kill some redundant declarations
  2009-01-15 13:47 ` [PATCH 02/18] kvm: qemu: make qemu_alloc_physram() and alloc_mem_area() static Mark McLoughlin
@ 2009-01-15 13:47   ` Mark McLoughlin
  2009-01-15 13:47     ` [PATCH 04/18] kvm: qemu: make lsi_scsi_uninit() static Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/vl.c:5295: warning: redundant redeclaration of ‘kvm_pit’
  qemu/vl.c:5289: warning: previous declaration of ‘kvm_pit’ was here
  qemu/vl.c:5541: warning: redundant redeclaration of ‘kvm_allowed’
  qemu/qemu-kvm.h:144: warning: previous declaration of ‘kvm_allowed’ was here
  qemu/qemu-kvm.h:144: warning: redundant redeclaration of ‘kvm_allowed’
  qemu/qemu-kvm.c:11: warning: previous definition of ‘kvm_allowed’ was here
  qemu/qemu-kvm.h:145: warning: redundant redeclaration of ‘kvm_nested’
  qemu/qemu-kvm.c:15: warning: previous definition of ‘kvm_nested’ was here
  qemu/kvm-tpr-opt.c:22: warning: redundant redeclaration of ‘kvm_context’
  qemu/qemu-kvm.h:146: warning: previous declaration of ‘kvm_context’ was here
  qemu/qemu-kvm-x86.c:27: warning: redundant redeclaration of ‘kvm_context’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/kvm-tpr-opt.c  |    2 --
 qemu/qemu-kvm-x86.c |    1 -
 qemu/qemu-kvm.c     |   11 +++++------
 qemu/qemu-kvm.h     |    3 +++
 qemu/vl.c           |    4 ----
 5 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/qemu/kvm-tpr-opt.c b/qemu/kvm-tpr-opt.c
index b3d26aa..3aaa8a4 100644
--- a/qemu/kvm-tpr-opt.c
+++ b/qemu/kvm-tpr-opt.c
@@ -19,8 +19,6 @@
 
 #include <stdio.h>
 
-extern kvm_context_t kvm_context;
-
 static uint64_t map_addr(struct kvm_sregs *sregs, target_ulong virt, unsigned *perms)
 {
     uint64_t mask = ((1ull << 48) - 1) & ~4095ull;
diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
index 52ddd33..01748ed 100644
--- a/qemu/qemu-kvm-x86.c
+++ b/qemu/qemu-kvm-x86.c
@@ -24,7 +24,6 @@
 
 static struct kvm_msr_list *kvm_msr_list;
 extern unsigned int kvm_shadow_memory;
-extern kvm_context_t kvm_context;
 static int kvm_has_msr_star;
 
 static int lm_capable_kernel;
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index e4fba78..f4c92fb 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -8,12 +8,6 @@
 #include "config.h"
 #include "config-host.h"
 
-int kvm_allowed = 1;
-int kvm_irqchip = 1;
-int kvm_pit = 1;
-int kvm_pit_reinject = 1;
-int kvm_nested = 0;
-
 #include <assert.h>
 #include <string.h>
 #include "hw/hw.h"
@@ -36,6 +30,11 @@ int kvm_nested = 0;
 
 extern void perror(const char *s);
 
+int kvm_allowed = 1;
+int kvm_irqchip = 1;
+int kvm_pit = 1;
+int kvm_pit_reinject = 1;
+int kvm_nested = 0;
 kvm_context_t kvm_context;
 
 extern int smp_cpus;
diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
index 12bd5a0..6e48662 100644
--- a/qemu/qemu-kvm.h
+++ b/qemu/qemu-kvm.h
@@ -142,6 +142,9 @@ int handle_powerpc_dcr_write(int vcpu,uint32_t dcrn, uint32_t data);
 #include "sys-queue.h"
 
 extern int kvm_allowed;
+extern int kvm_irqchip;
+extern int kvm_pit;
+extern int kvm_pit_reinject;
 extern int kvm_nested;
 extern kvm_context_t kvm_context;
 
diff --git a/qemu/vl.c b/qemu/vl.c
index f2fe708..84a30fa 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -5286,18 +5286,15 @@ int main(int argc, char **argv, char **envp)
 		kvm_allowed = 0;
 		break;
 	    case QEMU_OPTION_no_kvm_irqchip: {
-		extern int kvm_irqchip, kvm_pit;
 		kvm_irqchip = 0;
 		kvm_pit = 0;
 		break;
 	    }
 	    case QEMU_OPTION_no_kvm_pit: {
-		extern int kvm_pit;
 		kvm_pit = 0;
 		break;
 	    }
             case QEMU_OPTION_no_kvm_pit_reinjection: {
-                extern int kvm_pit_reinject;
                 kvm_pit_reinject = 0;
                 break;
             }
@@ -5538,7 +5535,6 @@ int main(int argc, char **argv, char **envp)
 #if USE_KVM
     if (kvm_enabled()) {
 	if (kvm_qemu_init() < 0) {
-	    extern int kvm_allowed;
 	    fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
 #ifdef NO_CPU_EMULATION
 	    fprintf(stderr, "Compiled with --disable-cpu-emulation, exiting.\n");
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 04/18] kvm: qemu: make lsi_scsi_uninit() static
  2009-01-15 13:47   ` [PATCH 03/18] kvm: qemu: kill some redundant declarations Mark McLoughlin
@ 2009-01-15 13:47     ` Mark McLoughlin
  2009-01-15 13:47       ` [PATCH 05/18] kvm: qemu: Fix virtio_blk_init() calls Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/hw/lsi53c895a.c:1964: warning: no previous prototype for ‘lsi_scsi_uninit’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/hw/lsi53c895a.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/hw/lsi53c895a.c b/qemu/hw/lsi53c895a.c
index c65ff90..9622c6c 100644
--- a/qemu/hw/lsi53c895a.c
+++ b/qemu/hw/lsi53c895a.c
@@ -1961,7 +1961,7 @@ void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id)
     bd->devfn = s->pci_dev.devfn;
 }
 
-int lsi_scsi_uninit(PCIDevice *d)
+static int lsi_scsi_uninit(PCIDevice *d)
 {
     LSIState *s = (LSIState *) d;
 
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 05/18] kvm: qemu: Fix virtio_blk_init() calls
  2009-01-15 13:47     ` [PATCH 04/18] kvm: qemu: make lsi_scsi_uninit() static Mark McLoughlin
@ 2009-01-15 13:47       ` Mark McLoughlin
  2009-01-15 13:47         ` [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot() Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

This QEMU commit:

  pci: virtio: use pci id defines (Gerd Hoffman)

removed the vendor/device id parameters from virtio_blk_init().

Fixes:

  qemu/hw/device-hotplug.c: In function ‘qemu_system_hot_add_storage’:
  qemu/hw/device-hotplug.c:165: warning: implicit declaration of function ‘virtio_blk_init’
  qemu/hw/device-hotplug.c:166: warning: assignment makes pointer from integer without a cast

(Note: the ia64 fix is untested)

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/hw/device-hotplug.c |    4 ++--
 qemu/hw/ipf.c            |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c
index 56172e1..d8f0fcc 100644
--- a/qemu/hw/device-hotplug.c
+++ b/qemu/hw/device-hotplug.c
@@ -8,6 +8,7 @@
 #include "block_int.h"
 #include "device-assignment.h"
 #include "config.h"
+#include "virtio-blk.h"
 
 #define PCI_BASE_CLASS_STORAGE          0x01
 #define PCI_BASE_CLASS_NETWORK          0x02
@@ -162,8 +163,7 @@ static PCIDevice *qemu_system_hot_add_storage(const char *opts, int bus_nr)
                              drives_table[drive_idx].unit);
         break;
     case IF_VIRTIO:
-        opaque = virtio_blk_init (pci_bus, 0x1AF4, 0x1001,
-                                  drives_table[drive_idx].bdrv);
+        opaque = virtio_blk_init(pci_bus, drives_table[drive_idx].bdrv);
         break;
     default:
         term_printf ("type %s not a hotpluggable PCI device.\n", buf);
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index 74a7703..9654494 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -39,6 +39,7 @@
 #include "ia64intrin.h"
 #include <unistd.h>
 #include "device-assignment.h"
+#include "virtio-blk.h"
 
 #include "qemu-kvm.h"
 
@@ -625,7 +626,7 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size,
 	int unit_id = 0;
 
 	while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
-	    virtio_blk_init(pci_bus, 0x1AF4, 0x1001, drives_table[index].bdrv);
+	    virtio_blk_init(pci_bus, drives_table[index].bdrv);
 	    unit_id++;
 	}
     }
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot()
  2009-01-15 13:47       ` [PATCH 05/18] kvm: qemu: Fix virtio_blk_init() calls Mark McLoughlin
@ 2009-01-15 13:47         ` Mark McLoughlin
  2009-01-15 13:47           ` [PATCH 07/18] kvm: libkvm: make get_slot() and co. static Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

get_slot() isn't exported by libkvm, so we shouldn't be using it.

The worst thing that can happen because of this change is that
libkvm will spew a warning. It looks to me like that can't happen
though.

Fixes:

  qemu/hw/device-assignment.c:161: warning: implicit declaration of function ‘get_slot’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/hw/device-assignment.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index d5eb7b2..f8faf5b 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -157,12 +157,9 @@ static void assigned_dev_iomem_map(PCIDevice *pci_dev, int region_num,
     region->e_physbase = e_phys;
     region->e_size = e_size;
 
-    if (!first_map) {
-        int slot = get_slot(old_ephys);
-        if (slot != -1)
-	    kvm_destroy_phys_mem(kvm_context, old_ephys,
-                                 TARGET_PAGE_ALIGN(old_esize));
-    }
+    if (!first_map)
+	kvm_destroy_phys_mem(kvm_context, old_ephys,
+                             TARGET_PAGE_ALIGN(old_esize));
 
     if (e_size > 0)
 	ret = kvm_register_phys_mem(kvm_context, e_phys,
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 07/18] kvm: libkvm: make get_slot() and co. static
  2009-01-15 13:47         ` [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot() Mark McLoughlin
@ 2009-01-15 13:47           ` Mark McLoughlin
  2009-01-15 13:47             ` [PATCH 08/18] kvm: qemu: device-assignment: add kvm_add_ioperm_data() prototype Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 libkvm/kvm-common.h |    8 --------
 libkvm/libkvm.c     |   12 ++++++------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h
index c5beacc..00fb16d 100644
--- a/libkvm/kvm-common.h
+++ b/libkvm/kvm-common.h
@@ -63,14 +63,6 @@ struct kvm_context {
 	int coalesced_mmio;
 };
 
-void init_slots(void);
-int get_free_slot(kvm_context_t kvm);
-void register_slot(int slot, unsigned long phys_addr, unsigned long len,
-		   unsigned long userspace_addr, unsigned flags);
-
-void free_slot(int slot);
-int get_slot(unsigned long phys_addr);
-
 int kvm_alloc_kernel_memory(kvm_context_t kvm, unsigned long memory,
 								void **vm_mem);
 int kvm_alloc_userspace_memory(kvm_context_t kvm, unsigned long memory,
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index 0408fdb..a0c7be2 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -75,7 +75,7 @@ struct slot_info {
 
 struct slot_info slots[KVM_MAX_NUM_MEM_REGIONS];
 
-void init_slots(void)
+static void init_slots(void)
 {
 	int i;
 
@@ -83,7 +83,7 @@ void init_slots(void)
 		slots[i].len = 0;
 }
 
-int get_free_slot(kvm_context_t kvm)
+static int get_free_slot(kvm_context_t kvm)
 {
 	int i;
 	int tss_ext;
@@ -110,7 +110,7 @@ int get_free_slot(kvm_context_t kvm)
 	return -1;
 }
 
-void register_slot(int slot, unsigned long phys_addr, unsigned long len,
+static void register_slot(int slot, unsigned long phys_addr, unsigned long len,
 		   unsigned long userspace_addr, unsigned flags)
 {
 	slots[slot].phys_addr = phys_addr;
@@ -119,13 +119,13 @@ void register_slot(int slot, unsigned long phys_addr, unsigned long len,
         slots[slot].flags = flags;
 }
 
-void free_slot(int slot)
+static void free_slot(int slot)
 {
 	slots[slot].len = 0;
 	slots[slot].logging_count = 0;
 }
 
-int get_slot(unsigned long phys_addr)
+static int get_slot(unsigned long phys_addr)
 {
 	int i;
 
@@ -139,7 +139,7 @@ int get_slot(unsigned long phys_addr)
 
 /* Returns -1 if this slot is not totally contained on any other,
  * and the number of the slot otherwise */
-int get_container_slot(uint64_t phys_addr, unsigned long size)
+static int get_container_slot(uint64_t phys_addr, unsigned long size)
 {
 	int i;
 
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 08/18] kvm: qemu: device-assignment: add kvm_add_ioperm_data() prototype
  2009-01-15 13:47           ` [PATCH 07/18] kvm: libkvm: make get_slot() and co. static Mark McLoughlin
@ 2009-01-15 13:47             ` Mark McLoughlin
  2009-01-15 13:47               ` [PATCH 09/18] kvm: qemu: device-assignment: add assigned_dev_update_irq() prototype Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/hw/device-assignment.c:205: warning: implicit declaration of function ‘kvm_add_ioperm_data’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/qemu-kvm.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
index 6e48662..3253a73 100644
--- a/qemu/qemu-kvm.h
+++ b/qemu/qemu-kvm.h
@@ -125,7 +125,10 @@ int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
 int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
 
 #ifdef USE_KVM_DEVICE_ASSIGNMENT
+struct ioperm_data;
+
 void kvm_ioperm(CPUState *env, void *data);
+void kvm_add_ioperm_data(struct ioperm_data *data);
 void kvm_arch_do_ioperm(void *_data);
 #endif
 
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 09/18] kvm: qemu: device-assignment: add assigned_dev_update_irq() prototype
  2009-01-15 13:47             ` [PATCH 08/18] kvm: qemu: device-assignment: add kvm_add_ioperm_data() prototype Mark McLoughlin
@ 2009-01-15 13:47               ` Mark McLoughlin
  2009-01-15 13:47                 ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/hw/device-assignment.c:494: warning: no previous prototype for ‘assigned_dev_update_irq’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/hw/device-assignment.h |    1 +
 qemu/hw/pci.c               |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/qemu/hw/device-assignment.h b/qemu/hw/device-assignment.h
index a565948..8b3b105 100644
--- a/qemu/hw/device-assignment.h
+++ b/qemu/hw/device-assignment.h
@@ -99,6 +99,7 @@ PCIDevice *init_assigned_device(AssignedDevInfo *adev, PCIBus *bus);
 AssignedDevInfo *add_assigned_device(const char *arg);
 void add_assigned_devices(PCIBus *bus, const char **devices, int n_devices);
 ram_addr_t assigned_dev_load_option_roms(ram_addr_t rom_base_offset);
+void assigned_dev_update_irq(PCIDevice *d);
 
 #define MAX_DEV_ASSIGN_CMDLINE 8
 
diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c
index ae5dd53..6004904 100644
--- a/qemu/hw/pci.c
+++ b/qemu/hw/pci.c
@@ -28,6 +28,7 @@
 #include "virtio-net.h"
 #include "pc.h"
 #include "qemu-kvm.h"
+#include "device-assignment.h"
 
 //#define DEBUG_PCI
 
@@ -51,7 +52,6 @@ struct PCIBus {
 
 static void pci_update_mappings(PCIDevice *d);
 static void pci_set_irq(void *opaque, int irq_num, int level);
-void assigned_dev_update_irq(PCIDevice *d);
 
 target_phys_addr_t pci_mem_base;
 static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing
  2009-01-15 13:47               ` [PATCH 09/18] kvm: qemu: device-assignment: add assigned_dev_update_irq() prototype Mark McLoughlin
@ 2009-01-15 13:47                 ` Mark McLoughlin
  2009-01-15 13:47                   ` [PATCH 11/18] kvm: qemu: kill unused variable Mark McLoughlin
  2009-01-15 13:54                   ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Avi Kivity
  0 siblings, 2 replies; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Use write() instead of write_rom() to write the device number.

Cast the struct option_rom_header* to uint8_t* for write_rom().

Fixes:

  qemu/hw/device-assignment.c: In function ‘scan_option_rom’:
  qemu/hw/device-assignment.c:766: warning: passing argument 2 of ‘cpu_physical_memory_write_rom’ from incompatible pointer type

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/hw/device-assignment.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index f8faf5b..e0c01ce 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -760,8 +760,8 @@ static int scan_option_rom(uint8_t devfn, void *roms, ram_addr_t offset)
     cpu_register_physical_memory(0xd0000 + offset, total_size, addr | IO_MEM_ROM);
 
     /* Write ROM data and devfn to phys_addr */
-    cpu_physical_memory_write_rom(0xd0000 + offset, rom, size);
-    cpu_physical_memory_write_rom(0xd0000 + offset + size, &devfn, 1);
+    cpu_physical_memory_write_rom(0xd0000 + offset, (uint8_t *)rom, size);
+    cpu_physical_memory_write(0xd0000 + offset + size, &devfn, 1);
 
     return total_size;
 }
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 11/18] kvm: qemu: kill unused variable
  2009-01-15 13:47                 ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Mark McLoughlin
@ 2009-01-15 13:47                   ` Mark McLoughlin
  2009-01-15 13:47                     ` [PATCH 12/18] kvm: qemu: kill redundant declarion of perror() Mark McLoughlin
  2009-01-15 13:54                   ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Avi Kivity
  1 sibling, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/hw/pc.c: In function ‘pc_init1’:
  qemu/hw/pc.c:812: warning: unused variable ‘opt_rom_offset’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/hw/pc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
index 3038cd3..7120b1b 100644
--- a/qemu/hw/pc.c
+++ b/qemu/hw/pc.c
@@ -809,7 +809,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
     int ret, linux_boot, i;
     ram_addr_t ram_addr, vga_ram_addr, bios_offset, vga_bios_offset;
     ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
-    int bios_size, isa_bios_size, vga_bios_size, opt_rom_offset;
+    int bios_size, isa_bios_size, vga_bios_size;
     int pci_option_rom_offset;
     PCIBus *pci_bus;
     int piix3_devfn = -1;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 12/18] kvm: qemu: kill redundant declarion of perror()
  2009-01-15 13:47                   ` [PATCH 11/18] kvm: qemu: kill unused variable Mark McLoughlin
@ 2009-01-15 13:47                     ` Mark McLoughlin
  2009-01-15 13:47                       ` [PATCH 13/18] kvm: qemu: kill redundant declaration of smp_cpus and vm_running Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

stdio.h is included by qemu-common.h

Fixes:

  qemu/qemu-kvm.c:37: warning: redundant redeclaration of ‘perror’
  /usr/include/stdio.h:817: warning: previous declaration of ‘perror’ was here

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/qemu-kvm.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index f4c92fb..e54ace7 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -28,8 +28,6 @@
 #define false 0
 #define true 1
 
-extern void perror(const char *s);
-
 int kvm_allowed = 1;
 int kvm_irqchip = 1;
 int kvm_pit = 1;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 13/18] kvm: qemu: kill redundant declaration of smp_cpus and vm_running
  2009-01-15 13:47                     ` [PATCH 12/18] kvm: qemu: kill redundant declarion of perror() Mark McLoughlin
@ 2009-01-15 13:47                       ` Mark McLoughlin
  2009-01-15 13:47                         ` [PATCH 14/18] kvm: qemu: make qemu_kvm_system_reset() static Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Defined in sysemu.h, included by qemu-kvm.c

  qemu/qemu-kvm.c:41: warning: redundant redeclaration of ‘smp_cpus’
  qemu/sysemu.h:98: warning: previous declaration of ‘smp_cpus’ was here
  qemu/qemu-kvm.c:219: warning: redundant redeclaration of ‘vm_running’
  qemu/sysemu.h:9: warning: previous declaration of ‘vm_running’ was here

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/qemu-kvm.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index e54ace7..7b81d0f 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -35,8 +35,6 @@ int kvm_pit_reinject = 1;
 int kvm_nested = 0;
 kvm_context_t kvm_context;
 
-extern int smp_cpus;
-
 pthread_mutex_t qemu_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_cond_t qemu_vcpu_cond = PTHREAD_COND_INITIALIZER;
 pthread_cond_t qemu_system_cond = PTHREAD_COND_INITIALIZER;
@@ -213,8 +211,6 @@ int kvm_cpu_exec(CPUState *env)
     return 0;
 }
 
-extern int vm_running;
-
 static int has_work(CPUState *env)
 {
     if (!vm_running || (env && env->kvm_cpu_state.stopped))
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 14/18] kvm: qemu: make qemu_kvm_system_reset() static
  2009-01-15 13:47                       ` [PATCH 13/18] kvm: qemu: kill redundant declaration of smp_cpus and vm_running Mark McLoughlin
@ 2009-01-15 13:47                         ` Mark McLoughlin
  2009-01-15 13:47                           ` [PATCH 15/18] kvm: qemu: kill unused variable in kvm_init_vcpu() Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/qemu-kvm.c:373: warning: no previous prototype for ‘qemu_kvm_system_reset’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/qemu-kvm.c |    2 +-
 qemu/qemu-kvm.h |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index 7b81d0f..fe05f3e 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -363,7 +363,7 @@ static void setup_kernel_sigmask(CPUState *env)
     kvm_set_signal_mask(kvm_context, env->cpu_index, &set);
 }
 
-void qemu_kvm_system_reset(void)
+static void qemu_kvm_system_reset(void)
 {
     CPUState *penv = first_cpu;
 
diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
index 3253a73..042dd93 100644
--- a/qemu/qemu-kvm.h
+++ b/qemu/qemu-kvm.h
@@ -119,8 +119,6 @@ int qemu_kvm_register_coalesced_mmio(target_phys_addr_t addr,
 int qemu_kvm_unregister_coalesced_mmio(target_phys_addr_t addr,
 				       unsigned int size);
 
-void qemu_kvm_system_reset_request(void);
-
 int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
 int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
 
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 15/18] kvm: qemu: kill unused variable in kvm_init_vcpu()
  2009-01-15 13:47                         ` [PATCH 14/18] kvm: qemu: make qemu_kvm_system_reset() static Mark McLoughlin
@ 2009-01-15 13:47                           ` Mark McLoughlin
  2009-01-15 13:47                             ` [PATCH 16/18] kvm: qemu: make another couple of functions static Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

  qemu/qemu-kvm.c: In function ‘kvm_init_vcpu’:
  qemu/qemu-kvm.c:460: warning: unused variable ‘cpu’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/qemu-kvm.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index fe05f3e..c99bf5c 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -450,7 +450,6 @@ static void *ap_main_loop(void *_env)
 
 void kvm_init_vcpu(CPUState *env)
 {
-    int cpu = env->cpu_index;
     pthread_create(&env->kvm_cpu_state.thread, NULL, ap_main_loop, env);
 
     while (env->kvm_cpu_state.created == 0)
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 16/18] kvm: qemu: make another couple of functions static
  2009-01-15 13:47                           ` [PATCH 15/18] kvm: qemu: kill unused variable in kvm_init_vcpu() Mark McLoughlin
@ 2009-01-15 13:47                             ` Mark McLoughlin
  2009-01-15 13:47                               ` [PATCH 17/18] kvm: qemu: fix update_vbios_real_tpr declaration Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/qemu-kvm.c:1170: warning: no previous prototype for ‘kvm_get_dirty_pages_log_range’
  qemu/qemu-kvm.c:1200: warning: no previous prototype for ‘kvm_get_dirty_bitmap_cb’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/qemu-kvm.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index c99bf5c..2344190 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -1159,10 +1159,10 @@ int kvm_physical_memory_set_dirty_tracking(int enable)
 }
 
 /* get kvm's dirty pages bitmap and update qemu's */
-int kvm_get_dirty_pages_log_range(unsigned long start_addr,
-                                  unsigned char *bitmap,
-                                  unsigned int offset,
-                                  unsigned long mem_size)
+static int kvm_get_dirty_pages_log_range(unsigned long start_addr,
+                                         unsigned char *bitmap,
+                                         unsigned int offset,
+                                         unsigned long mem_size)
 {
     unsigned int i, j, n=0;
     unsigned char c;
@@ -1189,8 +1189,8 @@ int kvm_get_dirty_pages_log_range(unsigned long start_addr,
     }
     return 0;
 }
-int kvm_get_dirty_bitmap_cb(unsigned long start, unsigned long len,
-                            void *bitmap, void *opaque)
+static int kvm_get_dirty_bitmap_cb(unsigned long start, unsigned long len,
+                                   void *bitmap, void *opaque)
 {
     return kvm_get_dirty_pages_log_range(start, bitmap, start, len);
 }
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 17/18] kvm: qemu: fix update_vbios_real_tpr declaration
  2009-01-15 13:47                             ` [PATCH 16/18] kvm: qemu: make another couple of functions static Mark McLoughlin
@ 2009-01-15 13:47                               ` Mark McLoughlin
  2009-01-15 13:47                                 ` [PATCH 18/18] kvm: qemu: kill unused variable in enable_vapic() Mark McLoughlin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/kvm-tpr-opt.c:119: warning: function declaration isn’t a prototype

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/kvm-tpr-opt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/kvm-tpr-opt.c b/qemu/kvm-tpr-opt.c
index 3aaa8a4..85fbbbc 100644
--- a/qemu/kvm-tpr-opt.c
+++ b/qemu/kvm-tpr-opt.c
@@ -115,7 +115,7 @@ static uint32_t vapic_phys;
 static int bios_enabled;
 static uint32_t vbios_desc_phys;
 
-void update_vbios_real_tpr()
+static void update_vbios_real_tpr(void)
 {
     cpu_physical_memory_rw(vbios_desc_phys, (void *)&vapic_bios, sizeof vapic_bios, 0);
     vapic_bios.real_tpr = real_tpr;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 18/18] kvm: qemu: kill unused variable in enable_vapic()
  2009-01-15 13:47                               ` [PATCH 17/18] kvm: qemu: fix update_vbios_real_tpr declaration Mark McLoughlin
@ 2009-01-15 13:47                                 ` Mark McLoughlin
  0 siblings, 0 replies; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 13:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

Fixes:

  qemu/kvm-tpr-opt.c:22: warning: redundant redeclaration of ‘kvm_context’

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 qemu/kvm-tpr-opt.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/qemu/kvm-tpr-opt.c b/qemu/kvm-tpr-opt.c
index 85fbbbc..44b453f 100644
--- a/qemu/kvm-tpr-opt.c
+++ b/qemu/kvm-tpr-opt.c
@@ -222,7 +222,6 @@ static int bios_is_mapped(CPUState *env, uint64_t rip)
 
 static int enable_vapic(CPUState *env)
 {
-    struct kvm_sregs sregs;
     static uint8_t one = 1;
 
     kvm_enable_vapic(kvm_context, env->cpu_index,
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing
  2009-01-15 13:47                 ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Mark McLoughlin
  2009-01-15 13:47                   ` [PATCH 11/18] kvm: qemu: kill unused variable Mark McLoughlin
@ 2009-01-15 13:54                   ` Avi Kivity
  2009-01-15 14:24                     ` Mark McLoughlin
  1 sibling, 1 reply; 23+ messages in thread
From: Avi Kivity @ 2009-01-15 13:54 UTC (permalink / raw)
  To: Mark McLoughlin; +Cc: kvm

Mark McLoughlin wrote:
> Use write() instead of write_rom() to write the device number.
>
> Cast the struct option_rom_header* to uint8_t* for write_rom().
>
> Fixes:
>
>   qemu/hw/device-assignment.c: In function ‘scan_option_rom’:
>   qemu/hw/device-assignment.c:766: warning: passing argument 2 of ‘cpu_physical_memory_write_rom’ from incompatible pointer type
>
> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
> ---
>  qemu/hw/device-assignment.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
> index f8faf5b..e0c01ce 100644
> --- a/qemu/hw/device-assignment.c
> +++ b/qemu/hw/device-assignment.c
> @@ -760,8 +760,8 @@ static int scan_option_rom(uint8_t devfn, void *roms, ram_addr_t offset)
>      cpu_register_physical_memory(0xd0000 + offset, total_size, addr | IO_MEM_ROM);
>  
>      /* Write ROM data and devfn to phys_addr */
> -    cpu_physical_memory_write_rom(0xd0000 + offset, rom, size);
> -    cpu_physical_memory_write_rom(0xd0000 + offset + size, &devfn, 1);
> +    cpu_physical_memory_write_rom(0xd0000 + offset, (uint8_t *)rom, size);
> +    cpu_physical_memory_write(0xd0000 + offset + size, &devfn, 1);
>  
>      return total_size;
>   

Why drop _rom?  The memory region is registered as a rom, a few lines 
earlier?

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init()
  2009-01-15 13:47 [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Mark McLoughlin
  2009-01-15 13:47 ` [PATCH 02/18] kvm: qemu: make qemu_alloc_physram() and alloc_mem_area() static Mark McLoughlin
@ 2009-01-15 13:58 ` Avi Kivity
  2009-01-15 14:28   ` Mark McLoughlin
  1 sibling, 1 reply; 23+ messages in thread
From: Avi Kivity @ 2009-01-15 13:58 UTC (permalink / raw)
  To: Mark McLoughlin; +Cc: kvm

Mark McLoughlin wrote:
> NIC init functions don't return a PCIDevice pointer in upstream QEMU
> but they do in KVM for hotplug.
>
> Fixes:
>
>   qemu/hw/pci.c:740: warning: initialization from incompatible pointer type
>
>   

I should have caught this while merging, argh.

Applied all patches except #10, thanks.  If qemu gains a --developer 
option which enables -Werror (and if we're warning clean), I promise to 
use it.


-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing
  2009-01-15 13:54                   ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Avi Kivity
@ 2009-01-15 14:24                     ` Mark McLoughlin
  2009-01-15 14:35                       ` Avi Kivity
  0 siblings, 1 reply; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 14:24 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

On Thu, 2009-01-15 at 15:54 +0200, Avi Kivity wrote:
> Mark McLoughlin wrote:
> > Use write() instead of write_rom() to write the device number.
> >
> > Cast the struct option_rom_header* to uint8_t* for write_rom().
> >
> > Fixes:
> >
> >   qemu/hw/device-assignment.c: In function ‘scan_option_rom’:
> >   qemu/hw/device-assignment.c:766: warning: passing argument 2 of ‘cpu_physical_memory_write_rom’ from incompatible pointer type
> >
> > Signed-off-by: Mark McLoughlin <markmc@redhat.com>
> > ---
> >  qemu/hw/device-assignment.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
> > index f8faf5b..e0c01ce 100644
> > --- a/qemu/hw/device-assignment.c
> > +++ b/qemu/hw/device-assignment.c
> > @@ -760,8 +760,8 @@ static int scan_option_rom(uint8_t devfn, void *roms, ram_addr_t offset)
> >      cpu_register_physical_memory(0xd0000 + offset, total_size, addr | IO_MEM_ROM);
> >  
> >      /* Write ROM data and devfn to phys_addr */
> > -    cpu_physical_memory_write_rom(0xd0000 + offset, rom, size);
> > -    cpu_physical_memory_write_rom(0xd0000 + offset + size, &devfn, 1);
> > +    cpu_physical_memory_write_rom(0xd0000 + offset, (uint8_t *)rom, size);
> > +    cpu_physical_memory_write(0xd0000 + offset + size, &devfn, 1);
> >  
> >      return total_size;
> >   
> 
> Why drop _rom?  The memory region is registered as a rom, a few lines 
> earlier?

My mistake, can you just apply the change to the first line?

Thanks,
Mark.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init()
  2009-01-15 13:58 ` [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Avi Kivity
@ 2009-01-15 14:28   ` Mark McLoughlin
  0 siblings, 0 replies; 23+ messages in thread
From: Mark McLoughlin @ 2009-01-15 14:28 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

On Thu, 2009-01-15 at 15:58 +0200, Avi Kivity wrote:
> Mark McLoughlin wrote:
> > NIC init functions don't return a PCIDevice pointer in upstream QEMU
> > but they do in KVM for hotplug.
> >
> > Fixes:
> >
> >   qemu/hw/pci.c:740: warning: initialization from incompatible pointer type
> >
> >   
> 
> I should have caught this while merging, argh.
> 
> Applied all patches except #10, thanks.  If qemu gains a --developer 
> option which enables -Werror (and if we're warning clean), I promise to 
> use it.

Yeah, it has --enable-werror, but it's not quite warning clean yet (tcg
and slirp AFAIR)

There's still a bunch more warnings in kvm-userspace that aren't in
upstream qemu - I just quickly fixed the obvious ones.

Cheers,
Mark.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing
  2009-01-15 14:24                     ` Mark McLoughlin
@ 2009-01-15 14:35                       ` Avi Kivity
  0 siblings, 0 replies; 23+ messages in thread
From: Avi Kivity @ 2009-01-15 14:35 UTC (permalink / raw)
  To: Mark McLoughlin; +Cc: kvm

Mark McLoughlin wrote:

  

>> Why drop _rom?  The memory region is registered as a rom, a few lines 
>> earlier?
>>     
>
> My mistake, can you just apply the change to the first line?
>
>   

Sure, applied with _rom.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-01-15 14:35 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 13:47 [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Mark McLoughlin
2009-01-15 13:47 ` [PATCH 02/18] kvm: qemu: make qemu_alloc_physram() and alloc_mem_area() static Mark McLoughlin
2009-01-15 13:47   ` [PATCH 03/18] kvm: qemu: kill some redundant declarations Mark McLoughlin
2009-01-15 13:47     ` [PATCH 04/18] kvm: qemu: make lsi_scsi_uninit() static Mark McLoughlin
2009-01-15 13:47       ` [PATCH 05/18] kvm: qemu: Fix virtio_blk_init() calls Mark McLoughlin
2009-01-15 13:47         ` [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot() Mark McLoughlin
2009-01-15 13:47           ` [PATCH 07/18] kvm: libkvm: make get_slot() and co. static Mark McLoughlin
2009-01-15 13:47             ` [PATCH 08/18] kvm: qemu: device-assignment: add kvm_add_ioperm_data() prototype Mark McLoughlin
2009-01-15 13:47               ` [PATCH 09/18] kvm: qemu: device-assignment: add assigned_dev_update_irq() prototype Mark McLoughlin
2009-01-15 13:47                 ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Mark McLoughlin
2009-01-15 13:47                   ` [PATCH 11/18] kvm: qemu: kill unused variable Mark McLoughlin
2009-01-15 13:47                     ` [PATCH 12/18] kvm: qemu: kill redundant declarion of perror() Mark McLoughlin
2009-01-15 13:47                       ` [PATCH 13/18] kvm: qemu: kill redundant declaration of smp_cpus and vm_running Mark McLoughlin
2009-01-15 13:47                         ` [PATCH 14/18] kvm: qemu: make qemu_kvm_system_reset() static Mark McLoughlin
2009-01-15 13:47                           ` [PATCH 15/18] kvm: qemu: kill unused variable in kvm_init_vcpu() Mark McLoughlin
2009-01-15 13:47                             ` [PATCH 16/18] kvm: qemu: make another couple of functions static Mark McLoughlin
2009-01-15 13:47                               ` [PATCH 17/18] kvm: qemu: fix update_vbios_real_tpr declaration Mark McLoughlin
2009-01-15 13:47                                 ` [PATCH 18/18] kvm: qemu: kill unused variable in enable_vapic() Mark McLoughlin
2009-01-15 13:54                   ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Avi Kivity
2009-01-15 14:24                     ` Mark McLoughlin
2009-01-15 14:35                       ` Avi Kivity
2009-01-15 13:58 ` [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Avi Kivity
2009-01-15 14:28   ` Mark McLoughlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox