* [Qemu-devel] [PATCH v2 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option)
@ 2014-03-11 15:59 Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout Don Slutz
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Don Slutz @ 2014-03-11 15:59 UTC (permalink / raw)
To: xen-devel, qemu-devel, Michael S. Tsirkin
Cc: Don Slutz, Anthony Liguori, Stefano Stabellini
Changes v1 to v2:
Michael S. Tsirkin:
Rename option.
Only add it to machine types that support it.
Split into 4 parts.
1/4 -- xen-all: Fix xen_hvm_init() to adjust pc memory layout
This looks to be a possible bug that has yet to be found.
below_4g_mem_size and above_4g_mem_size are stored in PcGuestInfo
(pc_guest_info_init) which are currently not "correct". This and
4/4 change the same lines.
2/4 -- GlobalProperty: Display warning about unused -global
My testing showed that setting a global property on an object
that is not used is not reported at all. This is added to help
when the new global is set but not used. The negative not_used
was picked so that all static objects are assumed to be used
even when they are not.
3/4 -- pc & q35: Add new object pc-memory-layout
The objects that it might make sense to add this property to all
get created too late. So add a new object just to hold this
property. Name it so that it is expected that only pc (and q35)
machine types support it.
4/4 -- xen-all: Pass max_ram_below_4g to xen_hvm_init
Seprate the xen only part of the change. Currectly based on patch 1/4
Don Slutz (4):
xen-all: Fix xen_hvm_init() to adjust pc memory layout.
GlobalProperty: Display warning about unused -global
pc & q35: Add new object pc-memory-layout.
xen-all: Pass max_ram_below_4g to xen_hvm_init.
hw/core/qdev-properties-system.c | 1 +
hw/core/qdev-properties.c | 15 ++++++++++++
hw/i386/pc.c | 42 ++++++++++++++++++++++++++++++++
hw/i386/pc_piix.c | 52 +++++++++++++++++++++++++++-------------
hw/i386/pc_q35.c | 50 ++++++++++++++++++++++++++------------
include/hw/i386/pc.h | 2 ++
include/hw/qdev-core.h | 1 +
include/hw/qdev-properties.h | 1 +
include/hw/xen/xen.h | 3 ++-
vl.c | 2 ++
xen-all.c | 47 ++++++++++++++++++++----------------
xen-stub.c | 3 ++-
12 files changed, 166 insertions(+), 53 deletions(-)
--
1.8.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH v2 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout.
2014-03-11 15:59 [Qemu-devel] [PATCH v2 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option) Don Slutz
@ 2014-03-11 15:59 ` Don Slutz
2014-03-16 16:02 ` Stefano Stabellini
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 2/4] GlobalProperty: Display warning about unused -global Don Slutz
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Don Slutz @ 2014-03-11 15:59 UTC (permalink / raw)
To: xen-devel, qemu-devel, Michael S. Tsirkin
Cc: Don Slutz, Anthony Liguori, Stefano Stabellini
This is just below_4g_mem_size and above_4g_mem_size which is used later in QEMU.
Signed-off-by: Don Slutz <dslutz@verizon.com>
---
hw/i386/pc_piix.c | 31 ++++++++++++++++---------------
hw/i386/pc_q35.c | 29 +++++++++++++++--------------
include/hw/xen/xen.h | 3 ++-
xen-all.c | 24 ++++++++++++++----------
xen-stub.c | 3 ++-
5 files changed, 49 insertions(+), 41 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ae1699d..8f07f0b 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -96,21 +96,6 @@ static void pc_init1(QEMUMachineInitArgs *args,
FWCfgState *fw_cfg = NULL;
PcGuestInfo *guest_info;
- if (xen_enabled() && xen_hvm_init(&ram_memory) != 0) {
- fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
- exit(1);
- }
-
- icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
- object_property_add_child(qdev_get_machine(), "icc-bridge",
- OBJECT(icc_bridge), NULL);
-
- pc_cpus_init(args->cpu_model, icc_bridge);
-
- if (kvm_enabled() && kvmclock_enabled) {
- kvmclock_create();
- }
-
/* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory).
* If it doesn't, we need to split it in chunks below and above 4G.
* In any case, try to make sure that guest addresses aligned at
@@ -127,6 +112,22 @@ static void pc_init1(QEMUMachineInitArgs *args,
below_4g_mem_size = args->ram_size;
}
+ if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
+ &ram_memory) != 0) {
+ fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
+ exit(1);
+ }
+
+ icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
+ object_property_add_child(qdev_get_machine(), "icc-bridge",
+ OBJECT(icc_bridge), NULL);
+
+ pc_cpus_init(args->cpu_model, icc_bridge);
+
+ if (kvm_enabled() && kvmclock_enabled) {
+ kvmclock_create();
+ }
+
if (pci_enabled) {
pci_memory = g_new(MemoryRegion, 1);
memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index a7f6260..5d017ee 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -83,20 +83,6 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
DeviceState *icc_bridge;
PcGuestInfo *guest_info;
- if (xen_enabled() && xen_hvm_init(&ram_memory) != 0) {
- fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
- exit(1);
- }
-
- icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
- object_property_add_child(qdev_get_machine(), "icc-bridge",
- OBJECT(icc_bridge), NULL);
-
- pc_cpus_init(args->cpu_model, icc_bridge);
- pc_acpi_init("q35-acpi-dsdt.aml");
-
- kvmclock_create();
-
/* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory
* and 256 Mbytes for PCI Express Enhanced Configuration Access Mapping
* also known as MMCFG).
@@ -115,6 +101,21 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
below_4g_mem_size = args->ram_size;
}
+ if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
+ &ram_memory) != 0) {
+ fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
+ exit(1);
+ }
+
+ icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
+ object_property_add_child(qdev_get_machine(), "icc-bridge",
+ OBJECT(icc_bridge), NULL);
+
+ pc_cpus_init(args->cpu_model, icc_bridge);
+ pc_acpi_init("q35-acpi-dsdt.aml");
+
+ kvmclock_create();
+
/* pci enabled */
if (pci_enabled) {
pci_memory = g_new(MemoryRegion, 1);
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index e181821..0769db2 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -38,10 +38,11 @@ void xen_cmos_set_s3_resume(void *opaque, int irq, int level);
qemu_irq *xen_interrupt_controller_init(void);
int xen_init(QEMUMachine *machine);
-int xen_hvm_init(MemoryRegion **ram_memory);
void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
#if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
+int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
+ MemoryRegion **ram_memory);
void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
struct MemoryRegion *mr);
void xen_modified_memory(ram_addr_t start, ram_addr_t length);
diff --git a/xen-all.c b/xen-all.c
index ba34739..c64300c 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -155,10 +155,11 @@ qemu_irq *xen_interrupt_controller_init(void)
/* Memory Ops */
-static void xen_ram_init(ram_addr_t ram_size, MemoryRegion **ram_memory_p)
+static void xen_ram_init(ram_addr_t *below_4g_mem_size,
+ ram_addr_t *above_4g_mem_size,
+ ram_addr_t ram_size, MemoryRegion **ram_memory_p)
{
MemoryRegion *sysmem = get_system_memory();
- ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
ram_addr_t block_len;
block_len = ram_size;
@@ -173,10 +174,11 @@ static void xen_ram_init(ram_addr_t ram_size, MemoryRegion **ram_memory_p)
vmstate_register_ram_global(&ram_memory);
if (ram_size >= HVM_BELOW_4G_RAM_END) {
- above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
- below_4g_mem_size = HVM_BELOW_4G_RAM_END;
+ *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
+ *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
} else {
- below_4g_mem_size = ram_size;
+ *above_4g_mem_size = 0;
+ *below_4g_mem_size = ram_size;
}
memory_region_init_alias(&ram_640k, NULL, "xen.ram.640k",
@@ -189,12 +191,13 @@ static void xen_ram_init(ram_addr_t ram_size, MemoryRegion **ram_memory_p)
* the Options ROM, so it is registered here as RAM.
*/
memory_region_init_alias(&ram_lo, NULL, "xen.ram.lo",
- &ram_memory, 0xc0000, below_4g_mem_size - 0xc0000);
+ &ram_memory, 0xc0000,
+ *below_4g_mem_size - 0xc0000);
memory_region_add_subregion(sysmem, 0xc0000, &ram_lo);
- if (above_4g_mem_size > 0) {
+ if (*above_4g_mem_size > 0) {
memory_region_init_alias(&ram_hi, NULL, "xen.ram.hi",
&ram_memory, 0x100000000ULL,
- above_4g_mem_size);
+ *above_4g_mem_size);
memory_region_add_subregion(sysmem, 0x100000000ULL, &ram_hi);
}
}
@@ -1066,7 +1069,8 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
}
-int xen_hvm_init(MemoryRegion **ram_memory)
+int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
+ MemoryRegion **ram_memory)
{
int i, rc;
unsigned long ioreq_pfn;
@@ -1144,7 +1148,7 @@ int xen_hvm_init(MemoryRegion **ram_memory)
/* Init RAM management */
xen_map_cache_init(xen_phys_offset_to_gaddr, state);
- xen_ram_init(ram_size, ram_memory);
+ xen_ram_init(below_4g_mem_size, above_4g_mem_size, ram_size, ram_memory);
qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
diff --git a/xen-stub.c b/xen-stub.c
index 59927cb..0302dff 100644
--- a/xen-stub.c
+++ b/xen-stub.c
@@ -64,7 +64,8 @@ void xen_modified_memory(ram_addr_t start, ram_addr_t length)
{
}
-int xen_hvm_init(MemoryRegion **ram_memory)
+int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
+ MemoryRegion **ram_memory)
{
return 0;
}
--
1.8.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH v2 2/4] GlobalProperty: Display warning about unused -global
2014-03-11 15:59 [Qemu-devel] [PATCH v2 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option) Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout Don Slutz
@ 2014-03-11 15:59 ` Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 3/4] pc & q35: Add new object pc-memory-layout Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init Don Slutz
3 siblings, 0 replies; 12+ messages in thread
From: Don Slutz @ 2014-03-11 15:59 UTC (permalink / raw)
To: xen-devel, qemu-devel, Michael S. Tsirkin
Cc: Don Slutz, Anthony Liguori, Stefano Stabellini
This can help a user understand why -global was ignored.
For example: with "-vga cirrus"; "-global vga.vgamem_mb=16" is just
ignored when "-global cirrus-vga.vgamem_mb=16" is not.
This is currently clear when the wrong property is provided:
out/x86_64-softmmu/qemu-system-x86_64 -global cirrus-vga.vram_size_mb=16 -monitor pty -vga cirrus
char device redirected to /dev/pts/20 (label compat_monitor0)
qemu-system-x86_64: Property '.vram_size_mb' not found
Aborted (core dumped)
vs
out/x86_64-softmmu/qemu-system-x86_64 -global vga.vram_size_mb=16 -monitor pty -vga cirrus
char device redirected to /dev/pts/20 (label compat_monitor0)
VNC server running on `::1:5900'
^Cqemu: terminating on signal 2
Signed-off-by: Don Slutz <dslutz@verizon.com>
---
hw/core/qdev-properties-system.c | 1 +
hw/core/qdev-properties.c | 15 +++++++++++++++
include/hw/qdev-core.h | 1 +
include/hw/qdev-properties.h | 1 +
vl.c | 2 ++
5 files changed, 20 insertions(+)
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 5f5957e..6cc13a1 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -390,6 +390,7 @@ static int qdev_add_one_global(QemuOpts *opts, void *opaque)
g->driver = qemu_opt_get(opts, "driver");
g->property = qemu_opt_get(opts, "property");
g->value = qemu_opt_get(opts, "value");
+ g->not_used = true;
qdev_prop_register_global(g);
return 0;
}
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 77d0c66..d28d86e 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -939,6 +939,20 @@ void qdev_prop_register_global_list(GlobalProperty *props)
}
}
+void qdev_prop_check_global(void)
+{
+ GlobalProperty *prop;
+
+ QTAILQ_FOREACH(prop, &global_props, next) {
+ if (!prop->not_used) {
+ continue;
+ }
+ fprintf(stderr, "Warning: \"-global %s.%s=%s\" not used\n",
+ prop->driver, prop->property, prop->value);
+
+ }
+}
+
void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename,
Error **errp)
{
@@ -950,6 +964,7 @@ void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename,
if (strcmp(typename, prop->driver) != 0) {
continue;
}
+ prop->not_used = false;
object_property_parse(OBJECT(dev), prop->value, prop->property, &err);
if (err != NULL) {
error_propagate(errp, err);
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 1ed0691..211f383 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -229,6 +229,7 @@ typedef struct GlobalProperty {
const char *driver;
const char *property;
const char *value;
+ bool not_used;
QTAILQ_ENTRY(GlobalProperty) next;
} GlobalProperty;
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 0c0babf..6ef30b3 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -177,6 +177,7 @@ void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value);
void qdev_prop_register_global(GlobalProperty *prop);
void qdev_prop_register_global_list(GlobalProperty *props);
+void qdev_prop_check_global(void);
void qdev_prop_set_globals(DeviceState *dev, Error **errp);
void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename,
Error **errp);
diff --git a/vl.c b/vl.c
index bca5c95..63794fc 100644
--- a/vl.c
+++ b/vl.c
@@ -4411,6 +4411,8 @@ int main(int argc, char **argv, char **envp)
}
}
+ qdev_prop_check_global();
+
if (incoming) {
Error *local_err = NULL;
qemu_start_incoming_migration(incoming, &local_err);
--
1.8.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH v2 3/4] pc & q35: Add new object pc-memory-layout.
2014-03-11 15:59 [Qemu-devel] [PATCH v2 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option) Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 2/4] GlobalProperty: Display warning about unused -global Don Slutz
@ 2014-03-11 15:59 ` Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init Don Slutz
3 siblings, 0 replies; 12+ messages in thread
From: Don Slutz @ 2014-03-11 15:59 UTC (permalink / raw)
To: xen-devel, qemu-devel, Michael S. Tsirkin
Cc: Don Slutz, Anthony Liguori, Stefano Stabellini
This new object has the property max-ram-below-4g.
If you add enough PCI devices then all mmio for them will not fit
below 4G which may not be the layout the user wanted. This allows
you to increase the below 4G address space that PCI devices can use
(aka decrease ram below 4G) and therefore in more cases not have any
mmio that is above 4G.
For example adding "-global pc-memory-layout.max-ram-below-4g=2G" to
the command line will limit the amount of ram that is below 4G to
2G.
Signed-off-by: Don Slutz <dslutz@verizon.com>
---
hw/i386/pc.c | 42 ++++++++++++++++++++++++++++++++++++++++++
hw/i386/pc_piix.c | 23 +++++++++++++++++++++--
hw/i386/pc_q35.c | 23 +++++++++++++++++++++--
include/hw/i386/pc.h | 2 ++
4 files changed, 86 insertions(+), 4 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index e715a33..618a606 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1413,3 +1413,45 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name)
gsi_state->ioapic_irq[i] = qdev_get_gpio_in(dev, i);
}
}
+
+/* pc-memory-layout stuff */
+
+typedef struct PcMemoryLayoutState PcMemoryLayoutState;
+
+/**
+ * @PcMemoryLayoutState:
+ */
+struct PcMemoryLayoutState {
+ /*< private >*/
+ Object parent_obj;
+ /*< public >*/
+
+ uint64_t max_ram_below_4g;
+};
+
+static Property pc_memory_layout_props[] = {
+ DEFINE_PROP_SIZE("max-ram-below-4g", PcMemoryLayoutState,
+ max_ram_below_4g, 0),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
+static void pc_memory_layout_class_init(ObjectClass *klass, void *data)
+{
+ DeviceClass *dc = DEVICE_CLASS(klass);
+
+ dc->props = pc_memory_layout_props;
+}
+
+static const TypeInfo pc_memory_layout_info = {
+ .name = TYPE_PC_MEMORY_LAYOUT,
+ .parent = TYPE_DEVICE,
+ .instance_size = sizeof(PcMemoryLayoutState),
+ .class_init = pc_memory_layout_class_init,
+};
+
+static void pc_memory_layout_register_types(void)
+{
+ type_register_static(&pc_memory_layout_info);
+}
+
+type_init(pc_memory_layout_register_types)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 8f07f0b..964ea33 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -95,6 +95,23 @@ static void pc_init1(QEMUMachineInitArgs *args,
DeviceState *icc_bridge;
FWCfgState *fw_cfg = NULL;
PcGuestInfo *guest_info;
+ Object *pc_memory_layout;
+ uint64_t max_ram_below_4g;
+ ram_addr_t lowmem = 0xe0000000;
+
+ pc_memory_layout = object_new(TYPE_PC_MEMORY_LAYOUT);
+ max_ram_below_4g = object_property_get_int(pc_memory_layout,
+ "max-ram-below-4g",
+ NULL);
+ if (max_ram_below_4g) {
+ if (max_ram_below_4g > (1ULL << 32)) {
+ fprintf(stderr,
+ "%s: max_ram_below_4g=%lld too big adjusted to %lld\n",
+ __func__, (long long)max_ram_below_4g, 1ULL << 32);
+ max_ram_below_4g = 1ULL << 32;
+ }
+ lowmem = max_ram_below_4g;
+ }
/* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory).
* If it doesn't, we need to split it in chunks below and above 4G.
@@ -103,8 +120,10 @@ static void pc_init1(QEMUMachineInitArgs *args,
* For old machine types, use whatever split we used historically to avoid
* breaking migration.
*/
- if (args->ram_size >= 0xe0000000) {
- ram_addr_t lowmem = gigabyte_align ? 0xc0000000 : 0xe0000000;
+ if (args->ram_size >= lowmem) {
+ if (!max_ram_below_4g && gigabyte_align) {
+ lowmem = 0xc0000000;
+ }
above_4g_mem_size = args->ram_size - lowmem;
below_4g_mem_size = lowmem;
} else {
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 5d017ee..c95e6e2 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -82,6 +82,23 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
PCIDevice *ahci;
DeviceState *icc_bridge;
PcGuestInfo *guest_info;
+ Object *pc_memory_layout;
+ uint64_t max_ram_below_4g;
+ ram_addr_t lowmem = 0xb0000000;
+
+ pc_memory_layout = object_new(TYPE_PC_MEMORY_LAYOUT);
+ max_ram_below_4g = object_property_get_int(pc_memory_layout,
+ "max-ram-below-4g",
+ NULL);
+ if (max_ram_below_4g) {
+ if (max_ram_below_4g > (1ULL << 32)) {
+ fprintf(stderr,
+ "%s: max_ram_below_4g=%lld too big adjusted to %lld\n",
+ __func__, (long long)max_ram_below_4g, 1ULL << 32);
+ max_ram_below_4g = 1ULL << 32;
+ }
+ lowmem = max_ram_below_4g;
+ }
/* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory
* and 256 Mbytes for PCI Express Enhanced Configuration Access Mapping
@@ -92,8 +109,10 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
* For old machine types, use whatever split we used historically to avoid
* breaking migration.
*/
- if (args->ram_size >= 0xb0000000) {
- ram_addr_t lowmem = gigabyte_align ? 0x80000000 : 0xb0000000;
+ if (args->ram_size >= lowmem) {
+ if (!max_ram_below_4g && gigabyte_align) {
+ lowmem = 0x80000000;
+ }
above_4g_mem_size = args->ram_size - lowmem;
below_4g_mem_size = lowmem;
} else {
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 9010246..9162d61 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -163,6 +163,8 @@ void cpu_smm_register(cpu_set_smm_t callback, void *arg);
void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name);
+#define TYPE_PC_MEMORY_LAYOUT "pc-memory-layout"
+
/* acpi_piix.c */
I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
--
1.8.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.
2014-03-11 15:59 [Qemu-devel] [PATCH v2 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option) Don Slutz
` (2 preceding siblings ...)
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 3/4] pc & q35: Add new object pc-memory-layout Don Slutz
@ 2014-03-11 15:59 ` Don Slutz
2014-03-16 16:10 ` Stefano Stabellini
3 siblings, 1 reply; 12+ messages in thread
From: Don Slutz @ 2014-03-11 15:59 UTC (permalink / raw)
To: xen-devel, qemu-devel, Michael S. Tsirkin
Cc: Don Slutz, Anthony Liguori, Stefano Stabellini
This is the xen part of "pc & q35: Add new object pc-memory-layout."
Signed-off-by: Don Slutz <dslutz@verizon.com>
---
hw/i386/pc_piix.c | 4 ++--
hw/i386/pc_q35.c | 4 ++--
include/hw/xen/xen.h | 4 ++--
xen-all.c | 41 ++++++++++++++++++++++-------------------
xen-stub.c | 4 ++--
5 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 964ea33..691fc5d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -131,8 +131,8 @@ static void pc_init1(QEMUMachineInitArgs *args,
below_4g_mem_size = args->ram_size;
}
- if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
- &ram_memory) != 0) {
+ if (xen_enabled() && xen_hvm_init(max_ram_below_4g, &below_4g_mem_size,
+ &above_4g_mem_size, &ram_memory) != 0) {
fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
exit(1);
}
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index c95e6e2..8e1c417 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -120,8 +120,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
below_4g_mem_size = args->ram_size;
}
- if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
- &ram_memory) != 0) {
+ if (xen_enabled() && xen_hvm_init(max_ram_below_4g, &below_4g_mem_size,
+ &above_4g_mem_size, &ram_memory) != 0) {
fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
exit(1);
}
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 0769db2..fda559a 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -41,8 +41,8 @@ int xen_init(QEMUMachine *machine);
void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
#if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
-int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
- MemoryRegion **ram_memory);
+int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
+ ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory);
void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
struct MemoryRegion *mr);
void xen_modified_memory(ram_addr_t start, ram_addr_t length);
diff --git a/xen-all.c b/xen-all.c
index c64300c..48ba335 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -155,32 +155,34 @@ qemu_irq *xen_interrupt_controller_init(void)
/* Memory Ops */
-static void xen_ram_init(ram_addr_t *below_4g_mem_size,
+static void xen_ram_init(ram_addr_t ram_size, ram_addr_t max_ram_below_4g,
+ ram_addr_t *below_4g_mem_size,
ram_addr_t *above_4g_mem_size,
- ram_addr_t ram_size, MemoryRegion **ram_memory_p)
+ MemoryRegion **ram_memory_p)
{
MemoryRegion *sysmem = get_system_memory();
ram_addr_t block_len;
- block_len = ram_size;
- if (ram_size >= HVM_BELOW_4G_RAM_END) {
- /* Xen does not allocate the memory continuously, and keep a hole at
- * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
- */
- block_len += HVM_BELOW_4G_MMIO_LENGTH;
+ if (!max_ram_below_4g) {
+ if (ram_size >= HVM_BELOW_4G_RAM_END) {
+ *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
+ *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
+ } else {
+ *above_4g_mem_size = 0;
+ *below_4g_mem_size = ram_size;
+ }
+ }
+ if (!*above_4g_mem_size) {
+ block_len = ram_size;
+ } else {
+ /* Xen does not allocate the memory continuously, and keep a hole of
+ * of the size computed above or passed in. */
+ block_len = (1ULL << 32) + *above_4g_mem_size;
}
memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
*ram_memory_p = &ram_memory;
vmstate_register_ram_global(&ram_memory);
- if (ram_size >= HVM_BELOW_4G_RAM_END) {
- *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
- *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
- } else {
- *above_4g_mem_size = 0;
- *below_4g_mem_size = ram_size;
- }
-
memory_region_init_alias(&ram_640k, NULL, "xen.ram.640k",
&ram_memory, 0, 0xa0000);
memory_region_add_subregion(sysmem, 0, &ram_640k);
@@ -1069,8 +1071,8 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
}
-int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
- MemoryRegion **ram_memory)
+int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
+ ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory)
{
int i, rc;
unsigned long ioreq_pfn;
@@ -1148,7 +1150,8 @@ int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
/* Init RAM management */
xen_map_cache_init(xen_phys_offset_to_gaddr, state);
- xen_ram_init(below_4g_mem_size, above_4g_mem_size, ram_size, ram_memory);
+ xen_ram_init(ram_size, max_ram_below_4g, below_4g_mem_size,
+ above_4g_mem_size, ram_memory);
qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
diff --git a/xen-stub.c b/xen-stub.c
index 0302dff..dd317a5 100644
--- a/xen-stub.c
+++ b/xen-stub.c
@@ -64,8 +64,8 @@ void xen_modified_memory(ram_addr_t start, ram_addr_t length)
{
}
-int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
- MemoryRegion **ram_memory)
+int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
+ ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory)
{
return 0;
}
--
1.8.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout.
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout Don Slutz
@ 2014-03-16 16:02 ` Stefano Stabellini
0 siblings, 0 replies; 12+ messages in thread
From: Stefano Stabellini @ 2014-03-16 16:02 UTC (permalink / raw)
To: Don Slutz
Cc: Stefano Stabellini, xen-devel, qemu-devel, Anthony Liguori,
Michael S. Tsirkin
On Tue, 11 Mar 2014, Don Slutz wrote:
> This is just below_4g_mem_size and above_4g_mem_size which is used later in QEMU.
>
> Signed-off-by: Don Slutz <dslutz@verizon.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> hw/i386/pc_piix.c | 31 ++++++++++++++++---------------
> hw/i386/pc_q35.c | 29 +++++++++++++++--------------
> include/hw/xen/xen.h | 3 ++-
> xen-all.c | 24 ++++++++++++++----------
> xen-stub.c | 3 ++-
> 5 files changed, 49 insertions(+), 41 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index ae1699d..8f07f0b 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -96,21 +96,6 @@ static void pc_init1(QEMUMachineInitArgs *args,
> FWCfgState *fw_cfg = NULL;
> PcGuestInfo *guest_info;
>
> - if (xen_enabled() && xen_hvm_init(&ram_memory) != 0) {
> - fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
> - exit(1);
> - }
> -
> - icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
> - object_property_add_child(qdev_get_machine(), "icc-bridge",
> - OBJECT(icc_bridge), NULL);
> -
> - pc_cpus_init(args->cpu_model, icc_bridge);
> -
> - if (kvm_enabled() && kvmclock_enabled) {
> - kvmclock_create();
> - }
> -
> /* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory).
> * If it doesn't, we need to split it in chunks below and above 4G.
> * In any case, try to make sure that guest addresses aligned at
> @@ -127,6 +112,22 @@ static void pc_init1(QEMUMachineInitArgs *args,
> below_4g_mem_size = args->ram_size;
> }
>
> + if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
> + &ram_memory) != 0) {
> + fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
> + exit(1);
> + }
> +
> + icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
> + object_property_add_child(qdev_get_machine(), "icc-bridge",
> + OBJECT(icc_bridge), NULL);
> +
> + pc_cpus_init(args->cpu_model, icc_bridge);
> +
> + if (kvm_enabled() && kvmclock_enabled) {
> + kvmclock_create();
> + }
> +
> if (pci_enabled) {
> pci_memory = g_new(MemoryRegion, 1);
> memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index a7f6260..5d017ee 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -83,20 +83,6 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
> DeviceState *icc_bridge;
> PcGuestInfo *guest_info;
>
> - if (xen_enabled() && xen_hvm_init(&ram_memory) != 0) {
> - fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
> - exit(1);
> - }
> -
> - icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
> - object_property_add_child(qdev_get_machine(), "icc-bridge",
> - OBJECT(icc_bridge), NULL);
> -
> - pc_cpus_init(args->cpu_model, icc_bridge);
> - pc_acpi_init("q35-acpi-dsdt.aml");
> -
> - kvmclock_create();
> -
> /* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory
> * and 256 Mbytes for PCI Express Enhanced Configuration Access Mapping
> * also known as MMCFG).
> @@ -115,6 +101,21 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
> below_4g_mem_size = args->ram_size;
> }
>
> + if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
> + &ram_memory) != 0) {
> + fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
> + exit(1);
> + }
> +
> + icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
> + object_property_add_child(qdev_get_machine(), "icc-bridge",
> + OBJECT(icc_bridge), NULL);
> +
> + pc_cpus_init(args->cpu_model, icc_bridge);
> + pc_acpi_init("q35-acpi-dsdt.aml");
> +
> + kvmclock_create();
> +
> /* pci enabled */
> if (pci_enabled) {
> pci_memory = g_new(MemoryRegion, 1);
> diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
> index e181821..0769db2 100644
> --- a/include/hw/xen/xen.h
> +++ b/include/hw/xen/xen.h
> @@ -38,10 +38,11 @@ void xen_cmos_set_s3_resume(void *opaque, int irq, int level);
> qemu_irq *xen_interrupt_controller_init(void);
>
> int xen_init(QEMUMachine *machine);
> -int xen_hvm_init(MemoryRegion **ram_memory);
> void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
>
> #if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
> +int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
> + MemoryRegion **ram_memory);
> void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
> struct MemoryRegion *mr);
> void xen_modified_memory(ram_addr_t start, ram_addr_t length);
> diff --git a/xen-all.c b/xen-all.c
> index ba34739..c64300c 100644
> --- a/xen-all.c
> +++ b/xen-all.c
> @@ -155,10 +155,11 @@ qemu_irq *xen_interrupt_controller_init(void)
>
> /* Memory Ops */
>
> -static void xen_ram_init(ram_addr_t ram_size, MemoryRegion **ram_memory_p)
> +static void xen_ram_init(ram_addr_t *below_4g_mem_size,
> + ram_addr_t *above_4g_mem_size,
> + ram_addr_t ram_size, MemoryRegion **ram_memory_p)
> {
> MemoryRegion *sysmem = get_system_memory();
> - ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
> ram_addr_t block_len;
>
> block_len = ram_size;
> @@ -173,10 +174,11 @@ static void xen_ram_init(ram_addr_t ram_size, MemoryRegion **ram_memory_p)
> vmstate_register_ram_global(&ram_memory);
>
> if (ram_size >= HVM_BELOW_4G_RAM_END) {
> - above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> - below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> + *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> + *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> } else {
> - below_4g_mem_size = ram_size;
> + *above_4g_mem_size = 0;
> + *below_4g_mem_size = ram_size;
> }
>
> memory_region_init_alias(&ram_640k, NULL, "xen.ram.640k",
> @@ -189,12 +191,13 @@ static void xen_ram_init(ram_addr_t ram_size, MemoryRegion **ram_memory_p)
> * the Options ROM, so it is registered here as RAM.
> */
> memory_region_init_alias(&ram_lo, NULL, "xen.ram.lo",
> - &ram_memory, 0xc0000, below_4g_mem_size - 0xc0000);
> + &ram_memory, 0xc0000,
> + *below_4g_mem_size - 0xc0000);
> memory_region_add_subregion(sysmem, 0xc0000, &ram_lo);
> - if (above_4g_mem_size > 0) {
> + if (*above_4g_mem_size > 0) {
> memory_region_init_alias(&ram_hi, NULL, "xen.ram.hi",
> &ram_memory, 0x100000000ULL,
> - above_4g_mem_size);
> + *above_4g_mem_size);
> memory_region_add_subregion(sysmem, 0x100000000ULL, &ram_hi);
> }
> }
> @@ -1066,7 +1069,8 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
> xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
> }
>
> -int xen_hvm_init(MemoryRegion **ram_memory)
> +int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
> + MemoryRegion **ram_memory)
> {
> int i, rc;
> unsigned long ioreq_pfn;
> @@ -1144,7 +1148,7 @@ int xen_hvm_init(MemoryRegion **ram_memory)
>
> /* Init RAM management */
> xen_map_cache_init(xen_phys_offset_to_gaddr, state);
> - xen_ram_init(ram_size, ram_memory);
> + xen_ram_init(below_4g_mem_size, above_4g_mem_size, ram_size, ram_memory);
>
> qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
>
> diff --git a/xen-stub.c b/xen-stub.c
> index 59927cb..0302dff 100644
> --- a/xen-stub.c
> +++ b/xen-stub.c
> @@ -64,7 +64,8 @@ void xen_modified_memory(ram_addr_t start, ram_addr_t length)
> {
> }
>
> -int xen_hvm_init(MemoryRegion **ram_memory)
> +int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
> + MemoryRegion **ram_memory)
> {
> return 0;
> }
> --
> 1.8.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init Don Slutz
@ 2014-03-16 16:10 ` Stefano Stabellini
2014-03-17 14:52 ` Don Slutz
0 siblings, 1 reply; 12+ messages in thread
From: Stefano Stabellini @ 2014-03-16 16:10 UTC (permalink / raw)
To: Don Slutz
Cc: Stefano Stabellini, xen-devel, qemu-devel, Anthony Liguori,
Michael S. Tsirkin
On Tue, 11 Mar 2014, Don Slutz wrote:
> This is the xen part of "pc & q35: Add new object pc-memory-layout."
>
> Signed-off-by: Don Slutz <dslutz@verizon.com>
> ---
> hw/i386/pc_piix.c | 4 ++--
> hw/i386/pc_q35.c | 4 ++--
> include/hw/xen/xen.h | 4 ++--
> xen-all.c | 41 ++++++++++++++++++++++-------------------
> xen-stub.c | 4 ++--
> 5 files changed, 30 insertions(+), 27 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 964ea33..691fc5d 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -131,8 +131,8 @@ static void pc_init1(QEMUMachineInitArgs *args,
> below_4g_mem_size = args->ram_size;
> }
>
> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
> - &ram_memory) != 0) {
> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g, &below_4g_mem_size,
> + &above_4g_mem_size, &ram_memory) != 0) {
> fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
> exit(1);
> }
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index c95e6e2..8e1c417 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -120,8 +120,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
> below_4g_mem_size = args->ram_size;
> }
>
> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
> - &ram_memory) != 0) {
> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g, &below_4g_mem_size,
> + &above_4g_mem_size, &ram_memory) != 0) {
> fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
> exit(1);
> }
> diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
> index 0769db2..fda559a 100644
> --- a/include/hw/xen/xen.h
> +++ b/include/hw/xen/xen.h
> @@ -41,8 +41,8 @@ int xen_init(QEMUMachine *machine);
> void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
>
> #if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
> - MemoryRegion **ram_memory);
> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
> + ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory);
> void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
> struct MemoryRegion *mr);
> void xen_modified_memory(ram_addr_t start, ram_addr_t length);
> diff --git a/xen-all.c b/xen-all.c
> index c64300c..48ba335 100644
> --- a/xen-all.c
> +++ b/xen-all.c
> @@ -155,32 +155,34 @@ qemu_irq *xen_interrupt_controller_init(void)
>
> /* Memory Ops */
>
> -static void xen_ram_init(ram_addr_t *below_4g_mem_size,
> +static void xen_ram_init(ram_addr_t ram_size, ram_addr_t max_ram_below_4g,
> + ram_addr_t *below_4g_mem_size,
> ram_addr_t *above_4g_mem_size,
> - ram_addr_t ram_size, MemoryRegion **ram_memory_p)
> + MemoryRegion **ram_memory_p)
> {
> MemoryRegion *sysmem = get_system_memory();
> ram_addr_t block_len;
>
> - block_len = ram_size;
> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> - /* Xen does not allocate the memory continuously, and keep a hole at
> - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
> - */
> - block_len += HVM_BELOW_4G_MMIO_LENGTH;
> + if (!max_ram_below_4g) {
> + if (ram_size >= HVM_BELOW_4G_RAM_END) {
> + *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> + *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> + } else {
> + *above_4g_mem_size = 0;
> + *below_4g_mem_size = ram_size;
> + }
> + }
Instead of treating max_ram_below_4g as a special case, couldn't
initialize it to HVM_BELOW_4G_RAM_END?
We could consider HVM_BELOW_4G_RAM_END as the upper bound of
max_ram_below_4g.
I would just change the code to:
if (ram_size >= max_ram_below_4g) {
above_4g_mem_size = ram_size - max_ram_below_4g;
below_4g_mem_size = max_ram_below_4g;
} else {
below_4g_mem_size = ram_size;
}
> + if (!*above_4g_mem_size) {
> + block_len = ram_size;
> + } else {
> + /* Xen does not allocate the memory continuously, and keep a hole of
> + * of the size computed above or passed in. */
> + block_len = (1ULL << 32) + *above_4g_mem_size;
> }
> memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
> *ram_memory_p = &ram_memory;
> vmstate_register_ram_global(&ram_memory);
>
> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> - *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> - *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> - } else {
> - *above_4g_mem_size = 0;
> - *below_4g_mem_size = ram_size;
> - }
> -
> memory_region_init_alias(&ram_640k, NULL, "xen.ram.640k",
> &ram_memory, 0, 0xa0000);
> memory_region_add_subregion(sysmem, 0, &ram_640k);
> @@ -1069,8 +1071,8 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
> xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
> }
>
> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
> - MemoryRegion **ram_memory)
> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
> + ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory)
> {
> int i, rc;
> unsigned long ioreq_pfn;
> @@ -1148,7 +1150,8 @@ int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
>
> /* Init RAM management */
> xen_map_cache_init(xen_phys_offset_to_gaddr, state);
> - xen_ram_init(below_4g_mem_size, above_4g_mem_size, ram_size, ram_memory);
> + xen_ram_init(ram_size, max_ram_below_4g, below_4g_mem_size,
> + above_4g_mem_size, ram_memory);
>
> qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
>
> diff --git a/xen-stub.c b/xen-stub.c
> index 0302dff..dd317a5 100644
> --- a/xen-stub.c
> +++ b/xen-stub.c
> @@ -64,8 +64,8 @@ void xen_modified_memory(ram_addr_t start, ram_addr_t length)
> {
> }
>
> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
> - MemoryRegion **ram_memory)
> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
> + ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory)
> {
> return 0;
> }
> --
> 1.8.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.
2014-03-16 16:10 ` Stefano Stabellini
@ 2014-03-17 14:52 ` Don Slutz
2014-03-17 17:55 ` Stefano Stabellini
0 siblings, 1 reply; 12+ messages in thread
From: Don Slutz @ 2014-03-17 14:52 UTC (permalink / raw)
To: Stefano Stabellini, Don Slutz
Cc: xen-devel, qemu-devel, Anthony Liguori, Michael S. Tsirkin
On 03/16/14 12:10, Stefano Stabellini wrote:
> On Tue, 11 Mar 2014, Don Slutz wrote:
>> This is the xen part of "pc & q35: Add new object pc-memory-layout."
>>
>> Signed-off-by: Don Slutz<dslutz@verizon.com>
>> ---
>> hw/i386/pc_piix.c | 4 ++--
>> hw/i386/pc_q35.c | 4 ++--
>> include/hw/xen/xen.h | 4 ++--
>> xen-all.c | 41 ++++++++++++++++++++++-------------------
>> xen-stub.c | 4 ++--
>> 5 files changed, 30 insertions(+), 27 deletions(-)
>>
>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>> index 964ea33..691fc5d 100644
>> --- a/hw/i386/pc_piix.c
>> +++ b/hw/i386/pc_piix.c
>> @@ -131,8 +131,8 @@ static void pc_init1(QEMUMachineInitArgs *args,
>> below_4g_mem_size = args->ram_size;
>> }
>>
>> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
>> - &ram_memory) != 0) {
>> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g, &below_4g_mem_size,
>> + &above_4g_mem_size, &ram_memory) != 0) {
>> fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
>> exit(1);
>> }
>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>> index c95e6e2..8e1c417 100644
>> --- a/hw/i386/pc_q35.c
>> +++ b/hw/i386/pc_q35.c
>> @@ -120,8 +120,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
>> below_4g_mem_size = args->ram_size;
>> }
>>
>> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size, &above_4g_mem_size,
>> - &ram_memory) != 0) {
>> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g, &below_4g_mem_size,
>> + &above_4g_mem_size, &ram_memory) != 0) {
>> fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
>> exit(1);
>> }
>> diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
>> index 0769db2..fda559a 100644
>> --- a/include/hw/xen/xen.h
>> +++ b/include/hw/xen/xen.h
>> @@ -41,8 +41,8 @@ int xen_init(QEMUMachine *machine);
>> void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
>>
>> #if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
>> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
>> - MemoryRegion **ram_memory);
>> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
>> + ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory);
>> void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
>> struct MemoryRegion *mr);
>> void xen_modified_memory(ram_addr_t start, ram_addr_t length);
>> diff --git a/xen-all.c b/xen-all.c
>> index c64300c..48ba335 100644
>> --- a/xen-all.c
>> +++ b/xen-all.c
>> @@ -155,32 +155,34 @@ qemu_irq *xen_interrupt_controller_init(void)
>>
>> /* Memory Ops */
>>
>> -static void xen_ram_init(ram_addr_t *below_4g_mem_size,
>> +static void xen_ram_init(ram_addr_t ram_size, ram_addr_t max_ram_below_4g,
>> + ram_addr_t *below_4g_mem_size,
>> ram_addr_t *above_4g_mem_size,
>> - ram_addr_t ram_size, MemoryRegion **ram_memory_p)
>> + MemoryRegion **ram_memory_p)
>> {
>> MemoryRegion *sysmem = get_system_memory();
>> ram_addr_t block_len;
>>
>> - block_len = ram_size;
>> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
>> - /* Xen does not allocate the memory continuously, and keep a hole at
>> - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
>> - */
>> - block_len += HVM_BELOW_4G_MMIO_LENGTH;
>> + if (!max_ram_below_4g) {
>> + if (ram_size >= HVM_BELOW_4G_RAM_END) {
>> + *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
>> + *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
>> + } else {
>> + *above_4g_mem_size = 0;
>> + *below_4g_mem_size = ram_size;
>> + }
>> + }
> Instead of treating max_ram_below_4g as a special case, couldn't
> initialize it to HVM_BELOW_4G_RAM_END?
Since max_ram_below_4g is used and initialize in normal QEMU code
where HVM_BELOW_4G_RAM_END is not defined, I do not see how to
do this outside of this routine without adding a new routine for this.
> We could consider HVM_BELOW_4G_RAM_END as the upper bound of
> max_ram_below_4g.
Yes. Currently the only limit on max_ram_below_4g is 4G. I am on
the fence on this. I think there are valid values > HVM_BELOW_4G_RAM_END,
but not clear they need to be supported.
> I would just change the code to:
>
> if (ram_size >= max_ram_below_4g) {
> above_4g_mem_size = ram_size - max_ram_below_4g;
> below_4g_mem_size = max_ram_below_4g;
> } else {
> below_4g_mem_size = ram_size;
> }
>
This is the code that is in patch #3 in the normal QEMU path but using
the variable lowmem so that xen can know if max_ram_below_4g was
set to non-zero. The issue that I am looking at handling here is the case
of an older xen (does not know about max_ram_below_4g) and the
newer QEMU, where xen expects QEMUs memory layout to change to
HVM_BELOW_4G_RAM_END.
Because of this (QEMU is doing the right thing if max_ram_below_4g is
non-zero) is why I coded it as only when max_ram_below_4g is zero, the
xen default is not the same as QEMU.
-Don Slutz
>> + if (!*above_4g_mem_size) {
>> + block_len = ram_size;
>> + } else {
>> + /* Xen does not allocate the memory continuously, and keep a hole of
>> + * of the size computed above or passed in. */
>> + block_len = (1ULL << 32) + *above_4g_mem_size;
>> }
>> memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
>> *ram_memory_p = &ram_memory;
>> vmstate_register_ram_global(&ram_memory);
>>
>> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
>> - *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
>> - *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
>> - } else {
>> - *above_4g_mem_size = 0;
>> - *below_4g_mem_size = ram_size;
>> - }
>> -
>> memory_region_init_alias(&ram_640k, NULL, "xen.ram.640k",
>> &ram_memory, 0, 0xa0000);
>> memory_region_add_subregion(sysmem, 0, &ram_640k);
>> @@ -1069,8 +1071,8 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
>> xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
>> }
>>
>> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
>> - MemoryRegion **ram_memory)
>> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
>> + ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory)
>> {
>> int i, rc;
>> unsigned long ioreq_pfn;
>> @@ -1148,7 +1150,8 @@ int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
>>
>> /* Init RAM management */
>> xen_map_cache_init(xen_phys_offset_to_gaddr, state);
>> - xen_ram_init(below_4g_mem_size, above_4g_mem_size, ram_size, ram_memory);
>> + xen_ram_init(ram_size, max_ram_below_4g, below_4g_mem_size,
>> + above_4g_mem_size, ram_memory);
>>
>> qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
>>
>> diff --git a/xen-stub.c b/xen-stub.c
>> index 0302dff..dd317a5 100644
>> --- a/xen-stub.c
>> +++ b/xen-stub.c
>> @@ -64,8 +64,8 @@ void xen_modified_memory(ram_addr_t start, ram_addr_t length)
>> {
>> }
>>
>> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
>> - MemoryRegion **ram_memory)
>> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t *below_4g_mem_size,
>> + ram_addr_t *above_4g_mem_size, MemoryRegion **ram_memory)
>> {
>> return 0;
>> }
>> --
>> 1.8.4
>>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.
2014-03-17 14:52 ` Don Slutz
@ 2014-03-17 17:55 ` Stefano Stabellini
2014-03-17 18:22 ` Don Slutz
0 siblings, 1 reply; 12+ messages in thread
From: Stefano Stabellini @ 2014-03-17 17:55 UTC (permalink / raw)
To: Don Slutz
Cc: xen-devel, Michael S. Tsirkin, qemu-devel, Anthony Liguori,
Stefano Stabellini
On Mon, 17 Mar 2014, Don Slutz wrote:
> On 03/16/14 12:10, Stefano Stabellini wrote:
> > On Tue, 11 Mar 2014, Don Slutz wrote:
> > > This is the xen part of "pc & q35: Add new object pc-memory-layout."
> > >
> > > Signed-off-by: Don Slutz<dslutz@verizon.com>
> > > ---
> > > hw/i386/pc_piix.c | 4 ++--
> > > hw/i386/pc_q35.c | 4 ++--
> > > include/hw/xen/xen.h | 4 ++--
> > > xen-all.c | 41 ++++++++++++++++++++++-------------------
> > > xen-stub.c | 4 ++--
> > > 5 files changed, 30 insertions(+), 27 deletions(-)
> > >
> > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> > > index 964ea33..691fc5d 100644
> > > --- a/hw/i386/pc_piix.c
> > > +++ b/hw/i386/pc_piix.c
> > > @@ -131,8 +131,8 @@ static void pc_init1(QEMUMachineInitArgs *args,
> > > below_4g_mem_size = args->ram_size;
> > > }
> > > - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
> > > &above_4g_mem_size,
> > > - &ram_memory) != 0) {
> > > + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
> > > &below_4g_mem_size,
> > > + &above_4g_mem_size, &ram_memory) !=
> > > 0) {
> > > fprintf(stderr, "xen hardware virtual machine initialisation
> > > failed\n");
> > > exit(1);
> > > }
> > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > > index c95e6e2..8e1c417 100644
> > > --- a/hw/i386/pc_q35.c
> > > +++ b/hw/i386/pc_q35.c
> > > @@ -120,8 +120,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
> > > below_4g_mem_size = args->ram_size;
> > > }
> > > - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
> > > &above_4g_mem_size,
> > > - &ram_memory) != 0) {
> > > + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
> > > &below_4g_mem_size,
> > > + &above_4g_mem_size, &ram_memory) !=
> > > 0) {
> > > fprintf(stderr, "xen hardware virtual machine initialisation
> > > failed\n");
> > > exit(1);
> > > }
> > > diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
> > > index 0769db2..fda559a 100644
> > > --- a/include/hw/xen/xen.h
> > > +++ b/include/hw/xen/xen.h
> > > @@ -41,8 +41,8 @@ int xen_init(QEMUMachine *machine);
> > > void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
> > > #if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
> > > -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t
> > > *above_4g_mem_size,
> > > - MemoryRegion **ram_memory);
> > > +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t
> > > *below_4g_mem_size,
> > > + ram_addr_t *above_4g_mem_size, MemoryRegion
> > > **ram_memory);
> > > void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
> > > struct MemoryRegion *mr);
> > > void xen_modified_memory(ram_addr_t start, ram_addr_t length);
> > > diff --git a/xen-all.c b/xen-all.c
> > > index c64300c..48ba335 100644
> > > --- a/xen-all.c
> > > +++ b/xen-all.c
> > > @@ -155,32 +155,34 @@ qemu_irq *xen_interrupt_controller_init(void)
> > > /* Memory Ops */
> > > -static void xen_ram_init(ram_addr_t *below_4g_mem_size,
> > > +static void xen_ram_init(ram_addr_t ram_size, ram_addr_t
> > > max_ram_below_4g,
> > > + ram_addr_t *below_4g_mem_size,
> > > ram_addr_t *above_4g_mem_size,
> > > - ram_addr_t ram_size, MemoryRegion
> > > **ram_memory_p)
> > > + MemoryRegion **ram_memory_p)
> > > {
> > > MemoryRegion *sysmem = get_system_memory();
> > > ram_addr_t block_len;
> > > - block_len = ram_size;
> > > - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> > > - /* Xen does not allocate the memory continuously, and keep a hole
> > > at
> > > - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
> > > - */
> > > - block_len += HVM_BELOW_4G_MMIO_LENGTH;
> > > + if (!max_ram_below_4g) {
> > > + if (ram_size >= HVM_BELOW_4G_RAM_END) {
> > > + *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> > > + *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> > > + } else {
> > > + *above_4g_mem_size = 0;
> > > + *below_4g_mem_size = ram_size;
> > > + }
> > > + }
> > Instead of treating max_ram_below_4g as a special case, couldn't
> > initialize it to HVM_BELOW_4G_RAM_END?
>
> Since max_ram_below_4g is used and initialize in normal QEMU code
> where HVM_BELOW_4G_RAM_END is not defined, I do not see how to
> do this outside of this routine without adding a new routine for this.
You can simply do this at the beginning of xen_ram_init:
max_ram_below_4g = max_ram_below_4g ? max_ram_below_4g : HVM_BELOW_4G_RAM_END;
my comment was about code readability, I didn't mean change any
functionalities.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.
2014-03-17 17:55 ` Stefano Stabellini
@ 2014-03-17 18:22 ` Don Slutz
2014-03-17 18:24 ` Don Slutz
0 siblings, 1 reply; 12+ messages in thread
From: Don Slutz @ 2014-03-17 18:22 UTC (permalink / raw)
To: Stefano Stabellini, Don Slutz
Cc: xen-devel, qemu-devel, Anthony Liguori, Michael S. Tsirkin
On 03/17/14 13:55, Stefano Stabellini wrote:
> On Mon, 17 Mar 2014, Don Slutz wrote:
>> On 03/16/14 12:10, Stefano Stabellini wrote:
>>> On Tue, 11 Mar 2014, Don Slutz wrote:
>>>> This is the xen part of "pc & q35: Add new object pc-memory-layout."
>>>>
>>>> Signed-off-by: Don Slutz<dslutz@verizon.com>
>>>> ---
>>>> hw/i386/pc_piix.c | 4 ++--
>>>> hw/i386/pc_q35.c | 4 ++--
>>>> include/hw/xen/xen.h | 4 ++--
>>>> xen-all.c | 41 ++++++++++++++++++++++-------------------
>>>> xen-stub.c | 4 ++--
>>>> 5 files changed, 30 insertions(+), 27 deletions(-)
>>>>
>>>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>>>> index 964ea33..691fc5d 100644
>>>> --- a/hw/i386/pc_piix.c
>>>> +++ b/hw/i386/pc_piix.c
>>>> @@ -131,8 +131,8 @@ static void pc_init1(QEMUMachineInitArgs *args,
>>>> below_4g_mem_size = args->ram_size;
>>>> }
>>>> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
>>>> &above_4g_mem_size,
>>>> - &ram_memory) != 0) {
>>>> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
>>>> &below_4g_mem_size,
>>>> + &above_4g_mem_size, &ram_memory) !=
>>>> 0) {
>>>> fprintf(stderr, "xen hardware virtual machine initialisation
>>>> failed\n");
>>>> exit(1);
>>>> }
>>>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>>>> index c95e6e2..8e1c417 100644
>>>> --- a/hw/i386/pc_q35.c
>>>> +++ b/hw/i386/pc_q35.c
>>>> @@ -120,8 +120,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
>>>> below_4g_mem_size = args->ram_size;
>>>> }
>>>> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
>>>> &above_4g_mem_size,
>>>> - &ram_memory) != 0) {
>>>> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
>>>> &below_4g_mem_size,
>>>> + &above_4g_mem_size, &ram_memory) !=
>>>> 0) {
>>>> fprintf(stderr, "xen hardware virtual machine initialisation
>>>> failed\n");
>>>> exit(1);
>>>> }
>>>> diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
>>>> index 0769db2..fda559a 100644
>>>> --- a/include/hw/xen/xen.h
>>>> +++ b/include/hw/xen/xen.h
>>>> @@ -41,8 +41,8 @@ int xen_init(QEMUMachine *machine);
>>>> void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
>>>> #if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
>>>> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t
>>>> *above_4g_mem_size,
>>>> - MemoryRegion **ram_memory);
>>>> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t
>>>> *below_4g_mem_size,
>>>> + ram_addr_t *above_4g_mem_size, MemoryRegion
>>>> **ram_memory);
>>>> void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
>>>> struct MemoryRegion *mr);
>>>> void xen_modified_memory(ram_addr_t start, ram_addr_t length);
>>>> diff --git a/xen-all.c b/xen-all.c
>>>> index c64300c..48ba335 100644
>>>> --- a/xen-all.c
>>>> +++ b/xen-all.c
>>>> @@ -155,32 +155,34 @@ qemu_irq *xen_interrupt_controller_init(void)
>>>> /* Memory Ops */
>>>> -static void xen_ram_init(ram_addr_t *below_4g_mem_size,
>>>> +static void xen_ram_init(ram_addr_t ram_size, ram_addr_t
>>>> max_ram_below_4g,
>>>> + ram_addr_t *below_4g_mem_size,
>>>> ram_addr_t *above_4g_mem_size,
>>>> - ram_addr_t ram_size, MemoryRegion
>>>> **ram_memory_p)
>>>> + MemoryRegion **ram_memory_p)
>>>> {
>>>> MemoryRegion *sysmem = get_system_memory();
>>>> ram_addr_t block_len;
>>>> - block_len = ram_size;
>>>> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
>>>> - /* Xen does not allocate the memory continuously, and keep a hole
>>>> at
>>>> - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
>>>> - */
>>>> - block_len += HVM_BELOW_4G_MMIO_LENGTH;
>>>> + if (!max_ram_below_4g) {
>>>> + if (ram_size >= HVM_BELOW_4G_RAM_END) {
>>>> + *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
>>>> + *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
>>>> + } else {
>>>> + *above_4g_mem_size = 0;
>>>> + *below_4g_mem_size = ram_size;
>>>> + }
>>>> + }
>>> Instead of treating max_ram_below_4g as a special case, couldn't
>>> initialize it to HVM_BELOW_4G_RAM_END?
>> Since max_ram_below_4g is used and initialize in normal QEMU code
>> where HVM_BELOW_4G_RAM_END is not defined, I do not see how to
>> do this outside of this routine without adding a new routine for this.
>
> You can simply do this at the beginning of xen_ram_init:
>
> max_ram_below_4g = max_ram_below_4g ? max_ram_below_4g : HVM_BELOW_4G_RAM_END;
>
> my comment was about code readability, I didn't mean change any
> functionalities.
So the partial code delta:
MemoryRegion *sysmem = get_system_memory();
ram_addr_t block_len;
- block_len = ram_size;
- if (ram_size >= HVM_BELOW_4G_RAM_END) {
- /* Xen does not allocate the memory continuously, and keep a hole at
- * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
- */
- block_len += HVM_BELOW_4G_MMIO_LENGTH;
- }
- memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
- *ram_memory_p = &ram_memory;
- vmstate_register_ram_global(&ram_memory);
-
- if (ram_size >= HVM_BELOW_4G_RAM_END) {
- *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
- *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
+ max_ram_below_4g = max_ram_below_4g ? max_ram_below_4g : HVM_BELOW_4G_RAM_END;
+ if (ram_size >= max_ram_below_4g) {
+ *above_4g_mem_size = ram_size - max_ram_below_4g;
+ *below_4g_mem_size = max_ram_below_4g;
} else {
*above_4g_mem_size = 0;
*below_4g_mem_size = ram_size;
}
+ if (!*above_4g_mem_size) {
+ block_len = ram_size;
+ } else {
+ /* Xen does not allocate the memory continuously, and keep a hole of
+ * of the size computed above or passed in. */
+ block_len = (1ULL << 32) + *above_4g_mem_size;
+ }
+ memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
+ *ram_memory_p = &ram_memory;
+ vmstate_register_ram_global(&ram_memory);
Which does redo the calculation of above and below when max_ram_below_4g
is set, is better for code readability.
I am happy to send a v2 with this, just do not want to send too many versions.
-Don Slutz
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.
2014-03-17 18:22 ` Don Slutz
@ 2014-03-17 18:24 ` Don Slutz
2014-03-17 18:41 ` Stefano Stabellini
0 siblings, 1 reply; 12+ messages in thread
From: Don Slutz @ 2014-03-17 18:24 UTC (permalink / raw)
To: Don Slutz, Stefano Stabellini
Cc: xen-devel, qemu-devel, Anthony Liguori, Michael S. Tsirkin
On 03/17/14 14:22, Don Slutz wrote:
> On 03/17/14 13:55, Stefano Stabellini wrote:
>> On Mon, 17 Mar 2014, Don Slutz wrote:
>>> On 03/16/14 12:10, Stefano Stabellini wrote:
>>>> On Tue, 11 Mar 2014, Don Slutz wrote:
>>>>> This is the xen part of "pc & q35: Add new object pc-memory-layout."
>>>>>
>>>>> Signed-off-by: Don Slutz<dslutz@verizon.com>
>>>>> ---
>>>>> hw/i386/pc_piix.c | 4 ++--
>>>>> hw/i386/pc_q35.c | 4 ++--
>>>>> include/hw/xen/xen.h | 4 ++--
>>>>> xen-all.c | 41 ++++++++++++++++++++++-------------------
>>>>> xen-stub.c | 4 ++--
>>>>> 5 files changed, 30 insertions(+), 27 deletions(-)
>>>>>
>>>>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>>>>> index 964ea33..691fc5d 100644
>>>>> --- a/hw/i386/pc_piix.c
>>>>> +++ b/hw/i386/pc_piix.c
>>>>> @@ -131,8 +131,8 @@ static void pc_init1(QEMUMachineInitArgs *args,
>>>>> below_4g_mem_size = args->ram_size;
>>>>> }
>>>>> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
>>>>> &above_4g_mem_size,
>>>>> - &ram_memory) != 0) {
>>>>> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
>>>>> &below_4g_mem_size,
>>>>> + &above_4g_mem_size, &ram_memory) !=
>>>>> 0) {
>>>>> fprintf(stderr, "xen hardware virtual machine initialisation
>>>>> failed\n");
>>>>> exit(1);
>>>>> }
>>>>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>>>>> index c95e6e2..8e1c417 100644
>>>>> --- a/hw/i386/pc_q35.c
>>>>> +++ b/hw/i386/pc_q35.c
>>>>> @@ -120,8 +120,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
>>>>> below_4g_mem_size = args->ram_size;
>>>>> }
>>>>> - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
>>>>> &above_4g_mem_size,
>>>>> - &ram_memory) != 0) {
>>>>> + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
>>>>> &below_4g_mem_size,
>>>>> + &above_4g_mem_size, &ram_memory) !=
>>>>> 0) {
>>>>> fprintf(stderr, "xen hardware virtual machine initialisation
>>>>> failed\n");
>>>>> exit(1);
>>>>> }
>>>>> diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
>>>>> index 0769db2..fda559a 100644
>>>>> --- a/include/hw/xen/xen.h
>>>>> +++ b/include/hw/xen/xen.h
>>>>> @@ -41,8 +41,8 @@ int xen_init(QEMUMachine *machine);
>>>>> void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
>>>>> #if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
>>>>> -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t
>>>>> *above_4g_mem_size,
>>>>> - MemoryRegion **ram_memory);
>>>>> +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t
>>>>> *below_4g_mem_size,
>>>>> + ram_addr_t *above_4g_mem_size, MemoryRegion
>>>>> **ram_memory);
>>>>> void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
>>>>> struct MemoryRegion *mr);
>>>>> void xen_modified_memory(ram_addr_t start, ram_addr_t length);
>>>>> diff --git a/xen-all.c b/xen-all.c
>>>>> index c64300c..48ba335 100644
>>>>> --- a/xen-all.c
>>>>> +++ b/xen-all.c
>>>>> @@ -155,32 +155,34 @@ qemu_irq *xen_interrupt_controller_init(void)
>>>>> /* Memory Ops */
>>>>> -static void xen_ram_init(ram_addr_t *below_4g_mem_size,
>>>>> +static void xen_ram_init(ram_addr_t ram_size, ram_addr_t
>>>>> max_ram_below_4g,
>>>>> + ram_addr_t *below_4g_mem_size,
>>>>> ram_addr_t *above_4g_mem_size,
>>>>> - ram_addr_t ram_size, MemoryRegion
>>>>> **ram_memory_p)
>>>>> + MemoryRegion **ram_memory_p)
>>>>> {
>>>>> MemoryRegion *sysmem = get_system_memory();
>>>>> ram_addr_t block_len;
>>>>> - block_len = ram_size;
>>>>> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
>>>>> - /* Xen does not allocate the memory continuously, and keep a hole
>>>>> at
>>>>> - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
>>>>> - */
>>>>> - block_len += HVM_BELOW_4G_MMIO_LENGTH;
>>>>> + if (!max_ram_below_4g) {
>>>>> + if (ram_size >= HVM_BELOW_4G_RAM_END) {
>>>>> + *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
>>>>> + *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
>>>>> + } else {
>>>>> + *above_4g_mem_size = 0;
>>>>> + *below_4g_mem_size = ram_size;
>>>>> + }
>>>>> + }
>>>> Instead of treating max_ram_below_4g as a special case, couldn't
>>>> initialize it to HVM_BELOW_4G_RAM_END?
>>> Since max_ram_below_4g is used and initialize in normal QEMU code
>>> where HVM_BELOW_4G_RAM_END is not defined, I do not see how to
>>> do this outside of this routine without adding a new routine for this.
>> You can simply do this at the beginning of xen_ram_init:
>>
>> max_ram_below_4g = max_ram_below_4g ? max_ram_below_4g : HVM_BELOW_4G_RAM_END;
>>
>> my comment was about code readability, I didn't mean change any
>> functionalities.
>
> So the partial code delta:
>
> MemoryRegion *sysmem = get_system_memory();
> ram_addr_t block_len;
>
> - block_len = ram_size;
> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> - /* Xen does not allocate the memory continuously, and keep a hole at
> - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
> - */
> - block_len += HVM_BELOW_4G_MMIO_LENGTH;
> - }
> - memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
> - *ram_memory_p = &ram_memory;
> - vmstate_register_ram_global(&ram_memory);
> -
> - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> - *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> - *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> + max_ram_below_4g = max_ram_below_4g ? max_ram_below_4g : HVM_BELOW_4G_RAM_END;
> + if (ram_size >= max_ram_below_4g) {
> + *above_4g_mem_size = ram_size - max_ram_below_4g;
> + *below_4g_mem_size = max_ram_below_4g;
> } else {
> *above_4g_mem_size = 0;
> *below_4g_mem_size = ram_size;
> }
> + if (!*above_4g_mem_size) {
> + block_len = ram_size;
> + } else {
> + /* Xen does not allocate the memory continuously, and keep a hole of
> + * of the size computed above or passed in. */
> + block_len = (1ULL << 32) + *above_4g_mem_size;
> + }
> + memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
> + *ram_memory_p = &ram_memory;
> + vmstate_register_ram_global(&ram_memory);
>
>
> Which does redo the calculation of above and below when max_ram_below_4g
> is set, is better for code readability.
>
> I am happy to send a v2 with this, just do not want to send too many versions.
>
That would be v3. :(
> -Don Slutz
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.
2014-03-17 18:24 ` Don Slutz
@ 2014-03-17 18:41 ` Stefano Stabellini
0 siblings, 0 replies; 12+ messages in thread
From: Stefano Stabellini @ 2014-03-17 18:41 UTC (permalink / raw)
To: Don Slutz
Cc: xen-devel, Michael S. Tsirkin, qemu-devel, Anthony Liguori,
Stefano Stabellini
On Mon, 17 Mar 2014, Don Slutz wrote:
> On 03/17/14 14:22, Don Slutz wrote:
> > On 03/17/14 13:55, Stefano Stabellini wrote:
> > > On Mon, 17 Mar 2014, Don Slutz wrote:
> > > > On 03/16/14 12:10, Stefano Stabellini wrote:
> > > > > On Tue, 11 Mar 2014, Don Slutz wrote:
> > > > > > This is the xen part of "pc & q35: Add new object pc-memory-layout."
> > > > > >
> > > > > > Signed-off-by: Don Slutz<dslutz@verizon.com>
> > > > > > ---
> > > > > > hw/i386/pc_piix.c | 4 ++--
> > > > > > hw/i386/pc_q35.c | 4 ++--
> > > > > > include/hw/xen/xen.h | 4 ++--
> > > > > > xen-all.c | 41
> > > > > > ++++++++++++++++++++++-------------------
> > > > > > xen-stub.c | 4 ++--
> > > > > > 5 files changed, 30 insertions(+), 27 deletions(-)
> > > > > >
> > > > > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> > > > > > index 964ea33..691fc5d 100644
> > > > > > --- a/hw/i386/pc_piix.c
> > > > > > +++ b/hw/i386/pc_piix.c
> > > > > > @@ -131,8 +131,8 @@ static void pc_init1(QEMUMachineInitArgs *args,
> > > > > > below_4g_mem_size = args->ram_size;
> > > > > > }
> > > > > > - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
> > > > > > &above_4g_mem_size,
> > > > > > - &ram_memory) != 0) {
> > > > > > + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
> > > > > > &below_4g_mem_size,
> > > > > > + &above_4g_mem_size, &ram_memory) !=
> > > > > > 0) {
> > > > > > fprintf(stderr, "xen hardware virtual machine
> > > > > > initialisation
> > > > > > failed\n");
> > > > > > exit(1);
> > > > > > }
> > > > > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > > > > > index c95e6e2..8e1c417 100644
> > > > > > --- a/hw/i386/pc_q35.c
> > > > > > +++ b/hw/i386/pc_q35.c
> > > > > > @@ -120,8 +120,8 @@ static void pc_q35_init(QEMUMachineInitArgs
> > > > > > *args)
> > > > > > below_4g_mem_size = args->ram_size;
> > > > > > }
> > > > > > - if (xen_enabled() && xen_hvm_init(&below_4g_mem_size,
> > > > > > &above_4g_mem_size,
> > > > > > - &ram_memory) != 0) {
> > > > > > + if (xen_enabled() && xen_hvm_init(max_ram_below_4g,
> > > > > > &below_4g_mem_size,
> > > > > > + &above_4g_mem_size, &ram_memory) !=
> > > > > > 0) {
> > > > > > fprintf(stderr, "xen hardware virtual machine
> > > > > > initialisation
> > > > > > failed\n");
> > > > > > exit(1);
> > > > > > }
> > > > > > diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
> > > > > > index 0769db2..fda559a 100644
> > > > > > --- a/include/hw/xen/xen.h
> > > > > > +++ b/include/hw/xen/xen.h
> > > > > > @@ -41,8 +41,8 @@ int xen_init(QEMUMachine *machine);
> > > > > > void xenstore_store_pv_console_info(int i, struct CharDriverState
> > > > > > *chr);
> > > > > > #if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
> > > > > > -int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t
> > > > > > *above_4g_mem_size,
> > > > > > - MemoryRegion **ram_memory);
> > > > > > +int xen_hvm_init(ram_addr_t max_ram_below_4g, ram_addr_t
> > > > > > *below_4g_mem_size,
> > > > > > + ram_addr_t *above_4g_mem_size, MemoryRegion
> > > > > > **ram_memory);
> > > > > > void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
> > > > > > struct MemoryRegion *mr);
> > > > > > void xen_modified_memory(ram_addr_t start, ram_addr_t length);
> > > > > > diff --git a/xen-all.c b/xen-all.c
> > > > > > index c64300c..48ba335 100644
> > > > > > --- a/xen-all.c
> > > > > > +++ b/xen-all.c
> > > > > > @@ -155,32 +155,34 @@ qemu_irq *xen_interrupt_controller_init(void)
> > > > > > /* Memory Ops */
> > > > > > -static void xen_ram_init(ram_addr_t *below_4g_mem_size,
> > > > > > +static void xen_ram_init(ram_addr_t ram_size, ram_addr_t
> > > > > > max_ram_below_4g,
> > > > > > + ram_addr_t *below_4g_mem_size,
> > > > > > ram_addr_t *above_4g_mem_size,
> > > > > > - ram_addr_t ram_size, MemoryRegion
> > > > > > **ram_memory_p)
> > > > > > + MemoryRegion **ram_memory_p)
> > > > > > {
> > > > > > MemoryRegion *sysmem = get_system_memory();
> > > > > > ram_addr_t block_len;
> > > > > > - block_len = ram_size;
> > > > > > - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> > > > > > - /* Xen does not allocate the memory continuously, and keep
> > > > > > a hole
> > > > > > at
> > > > > > - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
> > > > > > - */
> > > > > > - block_len += HVM_BELOW_4G_MMIO_LENGTH;
> > > > > > + if (!max_ram_below_4g) {
> > > > > > + if (ram_size >= HVM_BELOW_4G_RAM_END) {
> > > > > > + *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> > > > > > + *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> > > > > > + } else {
> > > > > > + *above_4g_mem_size = 0;
> > > > > > + *below_4g_mem_size = ram_size;
> > > > > > + }
> > > > > > + }
> > > > > Instead of treating max_ram_below_4g as a special case, couldn't
> > > > > initialize it to HVM_BELOW_4G_RAM_END?
> > > > Since max_ram_below_4g is used and initialize in normal QEMU code
> > > > where HVM_BELOW_4G_RAM_END is not defined, I do not see how to
> > > > do this outside of this routine without adding a new routine for this.
> > > You can simply do this at the beginning of xen_ram_init:
> > >
> > > max_ram_below_4g = max_ram_below_4g ? max_ram_below_4g :
> > > HVM_BELOW_4G_RAM_END;
> > >
> > > my comment was about code readability, I didn't mean change any
> > > functionalities.
> >
> > So the partial code delta:
> >
> > MemoryRegion *sysmem = get_system_memory();
> > ram_addr_t block_len;
> >
> > - block_len = ram_size;
> > - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> > - /* Xen does not allocate the memory continuously, and keep a hole
> > at
> > - * HVM_BELOW_4G_MMIO_START of HVM_BELOW_4G_MMIO_LENGTH
> > - */
> > - block_len += HVM_BELOW_4G_MMIO_LENGTH;
> > - }
> > - memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
> > - *ram_memory_p = &ram_memory;
> > - vmstate_register_ram_global(&ram_memory);
> > -
> > - if (ram_size >= HVM_BELOW_4G_RAM_END) {
> > - *above_4g_mem_size = ram_size - HVM_BELOW_4G_RAM_END;
> > - *below_4g_mem_size = HVM_BELOW_4G_RAM_END;
> > + max_ram_below_4g = max_ram_below_4g ? max_ram_below_4g :
> > HVM_BELOW_4G_RAM_END;
> > + if (ram_size >= max_ram_below_4g) {
> > + *above_4g_mem_size = ram_size - max_ram_below_4g;
> > + *below_4g_mem_size = max_ram_below_4g;
> > } else {
> > *above_4g_mem_size = 0;
> > *below_4g_mem_size = ram_size;
> > }
> > + if (!*above_4g_mem_size) {
> > + block_len = ram_size;
> > + } else {
> > + /* Xen does not allocate the memory continuously, and keep a hole
> > of
> > + * of the size computed above or passed in. */
> > + block_len = (1ULL << 32) + *above_4g_mem_size;
> > + }
> > + memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len);
> > + *ram_memory_p = &ram_memory;
> > + vmstate_register_ram_global(&ram_memory);
> >
> >
> > Which does redo the calculation of above and below when max_ram_below_4g
> > is set, is better for code readability.
> >
> > I am happy to send a v2 with this, just do not want to send too many
> > versions.
> >
>
> That would be v3. :(
That would be OK for me. You still need to get an ack for patch #2 and
#3 from Michael and Paolo.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-03-17 18:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 15:59 [Qemu-devel] [PATCH v2 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option) Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout Don Slutz
2014-03-16 16:02 ` Stefano Stabellini
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 2/4] GlobalProperty: Display warning about unused -global Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 3/4] pc & q35: Add new object pc-memory-layout Don Slutz
2014-03-11 15:59 ` [Qemu-devel] [PATCH v2 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init Don Slutz
2014-03-16 16:10 ` Stefano Stabellini
2014-03-17 14:52 ` Don Slutz
2014-03-17 17:55 ` Stefano Stabellini
2014-03-17 18:22 ` Don Slutz
2014-03-17 18:24 ` Don Slutz
2014-03-17 18:41 ` Stefano Stabellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).