* [PATCH 1/4] Use proper open call for init file
2008-08-12 19:04 [PATCH 0/4] Fix cpu-emulation mode builds Philippe Gerum
@ 2008-08-12 19:04 ` Philippe Gerum
2008-08-13 8:13 ` Avi Kivity
2008-08-12 19:04 ` [PATCH 2/4] Provide dummy cpu_vendor_string Philippe Gerum
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2008-08-12 19:04 UTC (permalink / raw)
To: kvm; +Cc: rpm
This patch fixes misspelled calls to qemu_fopen_file().
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
qemu/hw/ds1225y.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu/hw/ds1225y.c b/qemu/hw/ds1225y.c
index 3b91b4f..b1d0284 100644
--- a/qemu/hw/ds1225y.c
+++ b/qemu/hw/ds1225y.c
@@ -171,13 +171,13 @@ void *ds1225y_init(target_phys_addr_t mem_base, const char *filename)
s->protection = 7;
/* Read current file */
- file = qemu_fopen(filename, "rb");
+ file = qemu_fopen_file(filename, "rb");
if (file) {
/* Read nvram contents */
qemu_get_buffer(file, s->contents, s->chip_size);
qemu_fclose(file);
}
- s->file = qemu_fopen(filename, "wb");
+ s->file = qemu_fopen_file(filename, "wb");
if (s->file) {
/* Write back contents, as 'wb' mode cleaned the file */
qemu_put_buffer(s->file, s->contents, s->chip_size);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/4] Provide dummy cpu_vendor_string
2008-08-12 19:04 [PATCH 0/4] Fix cpu-emulation mode builds Philippe Gerum
2008-08-12 19:04 ` [PATCH 1/4] Use proper open call for init file Philippe Gerum
@ 2008-08-12 19:04 ` Philippe Gerum
2008-08-13 8:16 ` Avi Kivity
2008-08-12 19:04 ` [PATCH 3/4] Fix dependencies to run dyngen early enough Philippe Gerum
2008-08-12 19:04 ` [PATCH 4/4] Fix --disable-kvm build Philippe Gerum
3 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2008-08-12 19:04 UTC (permalink / raw)
To: kvm; +Cc: rpm
This patch defines cpu_vendor_string for linux-user builds.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
qemu/linux-user/main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/qemu/linux-user/main.c b/qemu/linux-user/main.c
index 023aac3..8387b16 100644
--- a/qemu/linux-user/main.c
+++ b/qemu/linux-user/main.c
@@ -33,6 +33,7 @@
static const char *interp_prefix = CONFIG_QEMU_PREFIX;
const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
+const char *cpu_vendor_string = NULL;
#if defined(__i386__) && !defined(CONFIG_STATIC)
/* Force usage of an ELF interpreter even if it is an ELF shared
--
1.5.4.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] Fix dependencies to run dyngen early enough
2008-08-12 19:04 [PATCH 0/4] Fix cpu-emulation mode builds Philippe Gerum
2008-08-12 19:04 ` [PATCH 1/4] Use proper open call for init file Philippe Gerum
2008-08-12 19:04 ` [PATCH 2/4] Provide dummy cpu_vendor_string Philippe Gerum
@ 2008-08-12 19:04 ` Philippe Gerum
2008-08-13 8:13 ` Avi Kivity
2008-08-12 19:04 ` [PATCH 4/4] Fix --disable-kvm build Philippe Gerum
3 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2008-08-12 19:04 UTC (permalink / raw)
To: kvm; +Cc: rpm
Add dependency to get dyngen-opc.h generated prior to compiling qemu/exec.c.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
qemu/Makefile.target | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/qemu/Makefile.target b/qemu/Makefile.target
index a86464f..ee5d60d 100644
--- a/qemu/Makefile.target
+++ b/qemu/Makefile.target
@@ -353,6 +353,8 @@ machine.o: machine.c
op_helper.o: op_helper.c
$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(I386_CFLAGS) -c -o $@ $<
+exec.o: $(OPC_H)
+
cpu-exec.o: cpu-exec.c $(OPC_H)
$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
--
1.5.4.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] Fix --disable-kvm build
2008-08-12 19:04 [PATCH 0/4] Fix cpu-emulation mode builds Philippe Gerum
` (2 preceding siblings ...)
2008-08-12 19:04 ` [PATCH 3/4] Fix dependencies to run dyngen early enough Philippe Gerum
@ 2008-08-12 19:04 ` Philippe Gerum
2008-08-13 8:15 ` Avi Kivity
3 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2008-08-12 19:04 UTC (permalink / raw)
To: kvm; +Cc: rpm
This patch fixes a few locations where --disable-kvm was not enforced when
applicable.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
qemu/gdbstub.c | 2 +-
qemu/hw/acpi.c | 6 +-----
qemu/hw/vga.c | 2 ++
qemu/qemu-kvm.h | 4 ++++
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/qemu/gdbstub.c b/qemu/gdbstub.c
index d828844..2af7830 100644
--- a/qemu/gdbstub.c
+++ b/qemu/gdbstub.c
@@ -33,8 +33,8 @@
#include "qemu-char.h"
#include "sysemu.h"
#include "gdbstub.h"
-#include "qemu-kvm.h"
#endif
+#include "qemu-kvm.h"
#include "qemu_socket.h"
#ifdef _WIN32
diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c
index e3cd8d7..35bac86 100644
--- a/qemu/hw/acpi.c
+++ b/qemu/hw/acpi.c
@@ -23,10 +23,8 @@
#include "sysemu.h"
#include "i2c.h"
#include "smbus.h"
-#ifdef USE_KVM
-#include "qemu-kvm.h"
-#endif
#include "string.h"
+#include "qemu-kvm.h"
//#define DEBUG
@@ -723,9 +721,7 @@ void qemu_system_cpu_hot_add(int cpu, int state)
fprintf(stderr, "cpu %d creation failed\n", cpu);
return;
}
-#ifdef USE_KVM
kvm_init_new_ap(cpu, env);
-#endif
}
qemu_set_irq(pm_state->irq, 1);
diff --git a/qemu/hw/vga.c b/qemu/hw/vga.c
index 95d6033..f5c472c 100644
--- a/qemu/hw/vga.c
+++ b/qemu/hw/vga.c
@@ -1981,6 +1981,7 @@ typedef struct PCIVGAState {
VGAState vga_state;
} PCIVGAState;
+#ifdef USE_KVM
void vga_update_vram_mapping(VGAState *s, unsigned long vga_ram_begin,
unsigned long vga_ram_end)
{
@@ -2010,6 +2011,7 @@ void vga_update_vram_mapping(VGAState *s, unsigned long vga_ram_begin,
s->map_end = vga_ram_end;
}
}
+#endif
static void vga_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type)
diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
index 7e28428..9ba81a3 100644
--- a/qemu/qemu-kvm.h
+++ b/qemu/qemu-kvm.h
@@ -114,6 +114,10 @@ extern kvm_context_t kvm_context;
#define kvm_enabled() (0)
#define qemu_kvm_irqchip_in_kernel() (0)
#define qemu_kvm_pit_in_kernel() (0)
+#define qemu_kvm_cpu_env(cpu) ({ (void)cpu; NULL; })
+#define kvm_save_registers(cpu) do { (void)cpu; } while(0)
+#define kvm_load_registers(env) do { (void)env; } while(0)
+#define kvm_init_new_ap(cpu, env) do { (void)cpu; (void)env; } while(0)
#endif
void kvm_mutex_unlock(void);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 4/4] Fix --disable-kvm build
2008-08-12 19:04 ` [PATCH 4/4] Fix --disable-kvm build Philippe Gerum
@ 2008-08-13 8:15 ` Avi Kivity
0 siblings, 0 replies; 11+ messages in thread
From: Avi Kivity @ 2008-08-13 8:15 UTC (permalink / raw)
To: Philippe Gerum; +Cc: kvm
Philippe Gerum wrote:
> static void vga_map(PCIDevice *pci_dev, int region_num,
> uint32_t addr, uint32_t size, int type)
> diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
> index 7e28428..9ba81a3 100644
> --- a/qemu/qemu-kvm.h
> +++ b/qemu/qemu-kvm.h
> @@ -114,6 +114,10 @@ extern kvm_context_t kvm_context;
> #define kvm_enabled() (0)
> #define qemu_kvm_irqchip_in_kernel() (0)
> #define qemu_kvm_pit_in_kernel() (0)
> +#define qemu_kvm_cpu_env(cpu) ({ (void)cpu; NULL; })
> +#define kvm_save_registers(cpu) do { (void)cpu; } while(0)
> +#define kvm_load_registers(env) do { (void)env; } while(0)
> +#define kvm_init_new_ap(cpu, env) do { (void)cpu; (void)env; } while(0)
> #endif
>
>
Please use static inline functions rather #defines, especially with
those statement expressions.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 11+ messages in thread