[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] HVM support for e820_host (Was: Bug: Limitation of <=2GB RAM in domU persists with 4.3.0)
On Tue, 3 Sep 2013 17:08:33 -0400, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote: Oh, and something like this probably should do it - not compile testedin any way: diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 1fcaed0..7b38890 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3146,6 +3146,7 @@ static long hvm_memory_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) case XENMEM_machine_memory_map: case XENMEM_machphys_mapping: return -ENOSYS; + case XENMEM_memory_map: case XENMEM_decrease_reservation: rc = do_memory_op(cmd, arg);current->domain->arch.hvm_domain.qemu_mapcache_invalidate = 1; This seems to work better. :) --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c@@ -3142,10 +3142,10 @@ static long hvm_memory_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) switch ( cmd & MEMOP_CMD_MASK ) { - case XENMEM_memory_map: case XENMEM_machine_memory_map: case XENMEM_machphys_mapping: return -ENOSYS; + case XENMEM_memory_map: case XENMEM_decrease_reservation: rc = do_memory_op(cmd, arg); current->domain->arch.hvm_domain.qemu_mapcache_invalidate = 1; diff --git a/tools/firmware/hvmloader/e820.c b/tools/firmware/hvmloader/e820.c index 2e05e93..86fb20a 100644 --- a/tools/firmware/hvmloader/e820.c +++ b/tools/firmware/hvmloader/e820.c @@ -68,16 +68,42 @@ void dump_e820_table(struct e820entry *e820, unsigned int nr) } } +static const char *e820_names(int type) +{ + switch (type) { + case E820_RAM: return "RAM"; + case E820_RESERVED: return "Reserved"; + case E820_ACPI: return "ACPI"; + case E820_NVS: return "ACPI NVS"; + case E820_UNUSABLE: return "Unusable"; + default: break; + } + return "Unknown"; +} To make this work I also added:--- tools/firmware/hvmloader/e820.h.orig 2013-09-04 10:55:38.317275183 +0100 +++ tools/firmware/hvmloader/e820.h 2013-09-04 10:56:14.374595809 +0100 @@ -8,6 +8,7 @@ #define E820_RESERVED 2 #define E820_ACPI 3 #define E820_NVS 4 +#define E820_UNUSBLE 5 struct e820entry { uint64_t addr; It that OK? /* Create an E820 table based on memory parameters provided in hvm_info. */int build_e820_table(struct e820entry *e820, unsigned int lowmem_reserved_base, unsigned int bios_image_base) { unsigned int nr = 0; + struct xen_memory_map op; + struct e820entry map[E820MAX]; + int rc; if ( !lowmem_reserved_base ) lowmem_reserved_base = 0xA0000; + set_xen_guest_handle(op.buffer, map); + + rc = hypercall_memory_op ( XENMEM_memory_op, &op); Where is XENMEM_memory_op defined? Should that be XENMEM_memory_map? Or maybe XENMEM_populate_physmap? Gordan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |