diff mbox

[5/3] compile balloon.c once

Message ID 1270049157-29784-2-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini March 31, 2010, 3:25 p.m. UTC
balloon.c contained some code from monitor.c, so it was compiled
once per target.  Fix this.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile.objs   |    2 +-
 Makefile.target |    2 +-
 kvm.h           |    9 +++++----
 3 files changed, 7 insertions(+), 6 deletions(-)

Comments

Paolo Bonzini April 1, 2010, 8:11 a.m. UTC | #1
On 03/31/2010 05:25 PM, Paolo Bonzini wrote:
> balloon.c contained some code from monitor.c, so it was compiled
> once per target.  Fix this.

This patch is wrong just like Blue Swirl's vl.c patch.  The other 4 are 
fine though.

Paolo
diff mbox

Patch

diff --git a/Makefile.objs b/Makefile.objs
index 233fbba..f89823c 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -128,7 +128,7 @@  user-obj-y += cutils.o cache-utils.o
 # libhw
 
 hw-obj-y =
-hw-obj-y += vl.o loader.o
+hw-obj-y += vl.o balloon.o loader.o
 hw-obj-y += virtio.o virtio-console.o
 hw-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
 hw-obj-y += fw_cfg.o pci.o pci_host.o pcie_host.o
diff --git a/Makefile.target b/Makefile.target
index 9ca6636..dbffe63 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -161,7 +161,7 @@  endif #CONFIG_BSD_USER
 # System emulator target
 ifdef CONFIG_SOFTMMU
 
-obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o
+obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
diff --git a/kvm.h b/kvm.h
index 4f77188..cb9d79b 100644
--- a/kvm.h
+++ b/kvm.h
@@ -16,6 +16,7 @@ 
 
 #include "config-host.h"
 #include "qemu-queue.h"
+#include "cpu-common.h"
 
 extern int kvm_allowed;
 
@@ -31,6 +32,10 @@  struct kvm_run;
 
 int kvm_init(int smp_cpus);
 
+int kvm_has_sync_mmu(void);
+int kvm_has_vcpu_events(void);
+int kvm_has_robust_singlestep(void);
+
 #ifdef NEED_CPU_H
 int kvm_init_vcpu(CPUState *env);
 
@@ -40,10 +45,6 @@  int kvm_cpu_exec(CPUState *env);
 int kvm_log_start(target_phys_addr_t phys_addr, ram_addr_t size);
 int kvm_log_stop(target_phys_addr_t phys_addr, ram_addr_t size);
 
-int kvm_has_sync_mmu(void);
-int kvm_has_vcpu_events(void);
-int kvm_has_robust_singlestep(void);
-
 void kvm_setup_guest_memory(void *start, size_t size);
 
 int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);