Skip to contentSkip to conversation

make --disable-kvm to compile again (now all arches)

PATCH Applied Juan Quintela 3 participants 5 messages Sep 21, 2009 KVM

lore
Share & tools
lore
#0 lore raw

cover make --disable-kvm to compile again (now all arches)

Hi
With this patch on top of my yesterday fixes, you can compile all architectures with/without --enable-kvm.

Later, Juan.

PD. This series are also known as "make Jan Kiszka happy :)"

Juan Quintela (2):
acpi: enable/disable_processor() are used only for TARGET_I386
vga: move back dirty_log functions to vga.c

 hw/acpi.c    |    2 +-
 hw/vga-pci.c |   43 -------------------------------------------
 hw/vga.c     |   43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 44 deletions(-)
#1 lore raw

PATCH 1/2 acpi: enable/disable_processor() are used only for TARGET_I386

---
 hw/acpi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/acpi.c +1 -1
index 0f80525..ff7bc4a 100644
@@ -753,6 +753,7 @@ void piix4_acpi_system_hot_add_init(const char *cpu_model)
     qemu_system_device_hot_add_register(piix4_device_hot_add);
 }
 
+#if defined(TARGET_I386)
 static void enable_processor(struct gpe_regs *g, int cpu)
 {
     g->sts |= 4;
@@ -765,7 +766,6 @@ static void disable_processor(struct gpe_regs *g, int cpu)
     g->cpus_sts[cpu/8] &= ~(1 << (cpu%8));
 }
 
-#if defined(TARGET_I386) || defined(TARGET_X86_64)
 void qemu_system_cpu_hot_add(int cpu, int state)
 {
     CPUState *env;
Signature · 1 line
1.6.2.5
#2 lore raw

PATCH 2/2 vga: move back dirty_log functions to vga.c

In reply to Juan Quintela
---
 hw/vga-pci.c |   43 -------------------------------------------
 hw/vga.c     |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 43 deletions(-)
hw/vga-pci.c +0 -43
index c49858c..9bb2d81 100644
@@ -28,7 +28,6 @@
 #include "vga_int.h"
 #include "pixel_ops.h"
 #include "qemu-timer.h"
-#include "kvm.h"
 
 typedef struct PCIVGAState {
     PCIDevice dev;
@@ -59,48 +58,6 @@ static int pci_vga_load(QEMUFile *f, void *opaque, int version_id)
     return vga_common_load(f, &s->vga, version_id);
 }
 
-static int s1, s2;
-
-static void mark_dirty(target_phys_addr_t start, target_phys_addr_t len)
-{
-    target_phys_addr_t end = start + len;
-
-    while (start < end) {
-        cpu_physical_memory_set_dirty(cpu_get_physical_page_desc(start));
-        start += TARGET_PAGE_SIZE;
-    }
-}
-
-void vga_dirty_log_start(VGACommonState *s)
-{
-    if (kvm_enabled() && s->map_addr)
-        if (!s1) {
-            kvm_log_start(s->map_addr, s->map_end - s->map_addr);
-            mark_dirty(s->map_addr, s->map_end - s->map_addr);
-            s1 = 1;
-        }
-    if (kvm_enabled() && s->lfb_vram_mapped) {
-        if (!s2) {
-            kvm_log_start(isa_mem_base + 0xa0000, 0x8000);
-            kvm_log_start(isa_mem_base + 0xa8000, 0x8000);
-            mark_dirty(isa_mem_base + 0xa0000, 0x10000);
-        }
-        s2 = 1;
-    }
-}
-
-void vga_dirty_log_stop(VGACommonState *s)
-{
-    if (kvm_enabled() && s->map_addr && s1)
-        kvm_log_stop(s->map_addr, s->map_end - s->map_addr);
-
-    if (kvm_enabled() && s->lfb_vram_mapped && s2) {
-        kvm_log_stop(isa_mem_base + 0xa0000, 0x8000);
-        kvm_log_stop(isa_mem_base + 0xa8000, 0x8000);
-    }
-    s1 = s2 = 0;
-}
-
 static void vga_map(PCIDevice *pci_dev, int region_num,
                     uint32_t addr, uint32_t size, int type)
 {
hw/vga.c +43 -0

55 lines not on this page · raw message

Signature · 1 line
1.6.2.5
Applied
#3 lore raw
In reply to Juan Quintela
Quoted 4 lines · Juan Quintela

Hi
With this patch on top of my yesterday fixes, you can compile all architectures with/without --enable-kvm.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw
In reply to Juan Quintela
Quoted 7 lines · Juan Quintela

Hi
With this patch on top of my yesterday fixes, you can compile all architectures with/without --enable-kvm.

Later, Juan.

PD. This series are also known as "make Jan Kiszka happy :)"

Just talk to him and he confirmed that you are doing a great job!

Still, someone is faster with introducing new issues:

In file included from /data/qemu-kvm/kvm.h:20,

                 from /data/qemu-kvm/cpu-exec.c:26:

/data/qemu-kvm/qemu-kvm.h: In function ‘kvm_inject_x86_mce’:
/data/qemu-kvm/qemu-kvm.h:952: warning: implicit declaration of function ‘abort’

:D

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux