#include "strings.h"
#include "hax-i386.h"
-#include "sysemu/kvm.h"
+#include "hw/boards.h"
+#include "sysemu/accel.h"
#include "exec/address-spaces.h"
#include "qemu/main-loop.h"
{
struct hax_state *hax = NULL;
int ret = 0;
- uint64_t ram_size =
- qemu_opt_get_number(qemu_find_opts_singleton("memory"), "size");
hax = &hax_global;
memset(hax, 0, sizeof(struct hax_state));
- hax->mem_quota = ram_size;
- dprint("ram_size %llx\n", ram_size);
+ hax->mem_quota = (uint64_t)ms->ram_size;
+ dprint("ram_size 0x%llx\n", (uint64_t)ms->ram_size);
ret = hax_init_internal();
// It is better to fail than to transit implicitly.
/* store value for the future use */
qemu_opt_set_number(qemu_find_opts_singleton("memory"), "size", ram_size);
+ current_machine->ram_size = ram_size;
+
if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0)
!= 0) {
exit(0);
qdev_machine_init();
- current_machine->ram_size = ram_size;
current_machine->maxram_size = maxram_size;
current_machine->ram_slots = ram_slots;
current_machine->boot_order = boot_order;