mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
ioemu: Do not pass -m (memory) option to qemu, as ioemu-remote rejects
memory sizes greater than 2GB when built as a 32-bit binary. Instead, direct HVM Linux loading approximates end of low memory via a different method. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
92148d2eda
commit
95d4283bb4
2 files changed
+8
-15
No files matched your search
+8
-11
@@ -31,9 +31,6 @@
|
||||
#define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin"
|
||||
#define LINUX_BOOT_FILENAME "linux_boot.bin"
|
||||
|
||||
/* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables. */
|
||||
#define ACPI_DATA_SIZE 0x10000
|
||||
|
||||
static fdctrl_t *floppy_controller;
|
||||
static RTCState *rtc_state;
|
||||
#ifndef CONFIG_DM
|
||||
@@ -542,6 +539,7 @@ static void load_linux(const char *kernel_filename,
|
||||
uint16_t seg[6];
|
||||
uint16_t real_seg;
|
||||
int setup_size, kernel_size, initrd_size, cmdline_size;
|
||||
unsigned long end_low_ram;
|
||||
uint32_t initrd_max;
|
||||
uint8_t header[1024];
|
||||
target_phys_addr_t real_addr, reloc_prot_addr, prot_addr, cmdline_addr, initrd_addr;
|
||||
@@ -595,15 +593,14 @@ static void load_linux(const char *kernel_filename,
|
||||
(size_t)cmdline_addr,
|
||||
(size_t)prot_addr);
|
||||
|
||||
/* Special pages are placed at end of low RAM: pick an arbitrary one and
|
||||
* subtract a suitably large amount of padding (64kB) to skip BIOS data. */
|
||||
xc_get_hvm_param(xc_handle, domid, HVM_PARAM_BUFIOREQ_PFN, &end_low_ram);
|
||||
end_low_ram = (end_low_ram << 12) - (64*1024);
|
||||
|
||||
/* highest address for loading the initrd */
|
||||
if (protocol >= 0x203)
|
||||
initrd_max = ldl_p(header+0x22c);
|
||||
else
|
||||
initrd_max = 0x37ffffff;
|
||||
|
||||
if (initrd_max >= ram_size-ACPI_DATA_SIZE)
|
||||
initrd_max = ram_size-ACPI_DATA_SIZE-1;
|
||||
|
||||
initrd_max = (protocol >= 0x203) ? ldl_p(header+0x22c) : 0x37ffffff;
|
||||
initrd_max = MIN(initrd_max, (uint32_t)end_low_ram);
|
||||
|
||||
/* kernel command line */
|
||||
ncmdline = strlen(kernel_cmdline);
|
||||
|
||||
@@ -250,10 +250,6 @@ class ImageHandler:
|
||||
def parseDeviceModelArgs(self, vmConfig):
|
||||
ret = ["-domain-name", str(self.vm.info['name_label'])]
|
||||
|
||||
# Tell QEMU how large the guest's memory allocation is
|
||||
# to help it when loading the initrd (if neccessary)
|
||||
ret += ["-m", str(self.getRequiredInitialReservation() / 1024)]
|
||||
|
||||
# Find RFB console device, and if it exists, make QEMU enable
|
||||
# the VNC console.
|
||||
if int(vmConfig['platform'].get('nographic', 0)) != 0:
|
||||
|
||||