* [PATCH v2 0/8] hw: Fix some incomplete memory region size
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
Series fully reviewed.
Since v1:
- Add parenthesis on the Xen patch (Paul Durrant)
- Add Peter's R-b tags
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value.
This is not a problem for the 32-bit maximum, 4 GiB, but
in some places we incorrectly use UINT32_MAX instead of
4 GiB, and end up missing 1 byte in the memory region.
This series fixes the cases I encountered.
Also included few patches while reviewing, I replaced some
magic values by the IEC binary prefix equivalent.
Regards,
Phil.
Philippe Mathieu-Daudé (8):
hw/arm/aspeed: Correct DRAM container region size
hw/pci-host/prep: Correct RAVEN bus bridge memory region size
hw/pci/pci_bridge: Correct pci_bridge_io memory region size
hw/pci/pci_bridge: Use the IEC binary prefix definitions
hw/pci-host: Use the IEC binary prefix definitions
hw/hppa/dino: Use the IEC binary prefix definitions
hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
target/i386/cpu: Use the IEC binary prefix definitions
hw/arm/aspeed.c | 2 +-
hw/hppa/dino.c | 4 ++--
hw/i386/xen/xen-hvm.c | 3 ++-
hw/pci-host/i440fx.c | 3 ++-
hw/pci-host/prep.c | 2 +-
hw/pci-host/q35.c | 2 +-
hw/pci-host/versatile.c | 5 +++--
hw/pci/pci_bridge.c | 7 ++++---
target/i386/cpu.c | 2 +-
9 files changed, 17 insertions(+), 13 deletions(-)
--
2.21.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 0/8] hw: Fix some incomplete memory region size
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
Series fully reviewed.
Since v1:
- Add parenthesis on the Xen patch (Paul Durrant)
- Add Peter's R-b tags
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value.
This is not a problem for the 32-bit maximum, 4 GiB, but
in some places we incorrectly use UINT32_MAX instead of
4 GiB, and end up missing 1 byte in the memory region.
This series fixes the cases I encountered.
Also included few patches while reviewing, I replaced some
magic values by the IEC binary prefix equivalent.
Regards,
Phil.
Philippe Mathieu-Daudé (8):
hw/arm/aspeed: Correct DRAM container region size
hw/pci-host/prep: Correct RAVEN bus bridge memory region size
hw/pci/pci_bridge: Correct pci_bridge_io memory region size
hw/pci/pci_bridge: Use the IEC binary prefix definitions
hw/pci-host: Use the IEC binary prefix definitions
hw/hppa/dino: Use the IEC binary prefix definitions
hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
target/i386/cpu: Use the IEC binary prefix definitions
hw/arm/aspeed.c | 2 +-
hw/hppa/dino.c | 4 ++--
hw/i386/xen/xen-hvm.c | 3 ++-
hw/pci-host/i440fx.c | 3 ++-
hw/pci-host/prep.c | 2 +-
hw/pci-host/q35.c | 2 +-
hw/pci-host/versatile.c | 5 +++--
hw/pci/pci_bridge.c | 7 ++++---
target/i386/cpu.c | 2 +-
9 files changed, 17 insertions(+), 13 deletions(-)
--
2.21.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the aspeed-ram-container
MemoryRegion ends up missing 1 byte:
$ qemu-system-arm -M ast2600-evb -S -monitor stdio
(qemu) info mtree
address-space: aspeed.fmc-ast2600-dma-dram
0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
0000000080000000-00000000bfffffff (prio 0, ram): ram
00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
Fix by using the correct value. We now have:
address-space: aspeed.fmc-ast2600-dma-dram
0000000080000000-000000017fffffff (prio 0, i/o): aspeed-ram-container
0000000080000000-00000000bfffffff (prio 0, ram): ram
00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/arm/aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 2c23297edf..62344ac6a3 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -262,7 +262,7 @@ static void aspeed_machine_init(MachineState *machine)
bmc = g_new0(AspeedBoardState, 1);
memory_region_init(&bmc->ram_container, NULL, "aspeed-ram-container",
- UINT32_MAX);
+ 4 * GiB);
memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
object_initialize_child(OBJECT(machine), "soc", &bmc->soc,
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the aspeed-ram-container
MemoryRegion ends up missing 1 byte:
$ qemu-system-arm -M ast2600-evb -S -monitor stdio
(qemu) info mtree
address-space: aspeed.fmc-ast2600-dma-dram
0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
0000000080000000-00000000bfffffff (prio 0, ram): ram
00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
Fix by using the correct value. We now have:
address-space: aspeed.fmc-ast2600-dma-dram
0000000080000000-000000017fffffff (prio 0, i/o): aspeed-ram-container
0000000080000000-00000000bfffffff (prio 0, ram): ram
00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/arm/aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 2c23297edf..62344ac6a3 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -262,7 +262,7 @@ static void aspeed_machine_init(MachineState *machine)
bmc = g_new0(AspeedBoardState, 1);
memory_region_init(&bmc->ram_container, NULL, "aspeed-ram-container",
- UINT32_MAX);
+ 4 * GiB);
memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
object_initialize_child(OBJECT(machine), "soc", &bmc->soc,
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 2/8] hw/pci-host/prep: Correct RAVEN bus bridge memory region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the bm-raven MemoryRegion
ends up missing 1 byte:
$ qemu-system-ppc -M prep -S -monitor stdio -usb
memory-region: bm-raven
0000000000000000-00000000fffffffe (prio 0, i/o): bm-raven
0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory @pci-memory 0000000000000000-000000003effffff
0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 0000000000000000-000000007fffffff
Fix by using the correct value. We now have:
memory-region: bm-raven
0000000000000000-00000000ffffffff (prio 0, i/o): bm-raven
0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory @pci-memory 0000000000000000-000000003effffff
0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 0000000000000000-000000007fffffff
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/prep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 1a02e9a670..88e2fc66a9 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -294,7 +294,7 @@ static void raven_pcihost_initfn(Object *obj)
&s->pci_memory, &s->pci_io, 0, TYPE_PCI_BUS);
/* Bus master address space */
- memory_region_init(&s->bm, obj, "bm-raven", UINT32_MAX);
+ memory_region_init(&s->bm, obj, "bm-raven", 4 * GiB);
memory_region_init_alias(&s->bm_pci_memory_alias, obj, "bm-pci-memory",
&s->pci_memory, 0,
memory_region_size(&s->pci_memory));
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 2/8] hw/pci-host/prep: Correct RAVEN bus bridge memory region size
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the bm-raven MemoryRegion
ends up missing 1 byte:
$ qemu-system-ppc -M prep -S -monitor stdio -usb
memory-region: bm-raven
0000000000000000-00000000fffffffe (prio 0, i/o): bm-raven
0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory @pci-memory 0000000000000000-000000003effffff
0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 0000000000000000-000000007fffffff
Fix by using the correct value. We now have:
memory-region: bm-raven
0000000000000000-00000000ffffffff (prio 0, i/o): bm-raven
0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory @pci-memory 0000000000000000-000000003effffff
0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 0000000000000000-000000007fffffff
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/prep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 1a02e9a670..88e2fc66a9 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -294,7 +294,7 @@ static void raven_pcihost_initfn(Object *obj)
&s->pci_memory, &s->pci_io, 0, TYPE_PCI_BUS);
/* Bus master address space */
- memory_region_init(&s->bm, obj, "bm-raven", UINT32_MAX);
+ memory_region_init(&s->bm, obj, "bm-raven", 4 * GiB);
memory_region_init_alias(&s->bm_pci_memory_alias, obj, "bm-pci-memory",
&s->pci_memory, 0,
memory_region_size(&s->pci_memory));
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 3/8] hw/pci/pci_bridge: Correct pci_bridge_io memory region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the pci_bridge_io MemoryRegion
ends up missing 1 byte:
(qemu) info mtree
memory-region: pci_bridge_io
0000000000000000-00000000fffffffe (prio 0, i/o): pci_bridge_io
0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
00000000000001ce-00000000000001d1 (prio 0, i/o): vbe
0000000000000378-000000000000037f (prio 0, i/o): parallel
00000000000003b4-00000000000003b5 (prio 0, i/o): vga
...
Fix by using the correct value. We now have:
memory-region: pci_bridge_io
0000000000000000-00000000ffffffff (prio 0, i/o): pci_bridge_io
0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci/pci_bridge.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 97967d12eb..3ba3203f72 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -30,6 +30,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/pci/pci_bridge.h"
#include "hw/pci/pci_bus.h"
#include "qemu/module.h"
@@ -381,7 +382,7 @@ void pci_bridge_initfn(PCIDevice *dev, const char *typename)
memory_region_init(&br->address_space_mem, OBJECT(br), "pci_bridge_pci", UINT64_MAX);
sec_bus->address_space_io = &br->address_space_io;
memory_region_init(&br->address_space_io, OBJECT(br), "pci_bridge_io",
- UINT32_MAX);
+ 4 * GiB);
br->windows = pci_bridge_region_init(br);
QLIST_INIT(&sec_bus->child);
QLIST_INSERT_HEAD(&parent->child, sec_bus, sibling);
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 3/8] hw/pci/pci_bridge: Correct pci_bridge_io memory region size
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the pci_bridge_io MemoryRegion
ends up missing 1 byte:
(qemu) info mtree
memory-region: pci_bridge_io
0000000000000000-00000000fffffffe (prio 0, i/o): pci_bridge_io
0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
00000000000001ce-00000000000001d1 (prio 0, i/o): vbe
0000000000000378-000000000000037f (prio 0, i/o): parallel
00000000000003b4-00000000000003b5 (prio 0, i/o): vga
...
Fix by using the correct value. We now have:
memory-region: pci_bridge_io
0000000000000000-00000000ffffffff (prio 0, i/o): pci_bridge_io
0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci/pci_bridge.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 97967d12eb..3ba3203f72 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -30,6 +30,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/pci/pci_bridge.h"
#include "hw/pci/pci_bus.h"
#include "qemu/module.h"
@@ -381,7 +382,7 @@ void pci_bridge_initfn(PCIDevice *dev, const char *typename)
memory_region_init(&br->address_space_mem, OBJECT(br), "pci_bridge_pci", UINT64_MAX);
sec_bus->address_space_io = &br->address_space_io;
memory_region_init(&br->address_space_io, OBJECT(br), "pci_bridge_io",
- UINT32_MAX);
+ 4 * GiB);
br->windows = pci_bridge_region_init(br);
QLIST_INIT(&sec_bus->child);
QLIST_INSERT_HEAD(&parent->child, sec_bus, sibling);
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 4/8] hw/pci/pci_bridge: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci/pci_bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 3ba3203f72..3789c17edc 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -423,14 +423,14 @@ int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, int cap_offset,
}
if (res_reserve.mem_non_pref != (uint64_t)-1 &&
- res_reserve.mem_non_pref >= (1ULL << 32)) {
+ res_reserve.mem_non_pref >= 4 * GiB) {
error_setg(errp,
"PCI resource reserve cap: mem-reserve must be less than 4G");
return -EINVAL;
}
if (res_reserve.mem_pref_32 != (uint64_t)-1 &&
- res_reserve.mem_pref_32 >= (1ULL << 32)) {
+ res_reserve.mem_pref_32 >= 4 * GiB) {
error_setg(errp,
"PCI resource reserve cap: pref32-reserve must be less than 4G");
return -EINVAL;
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 4/8] hw/pci/pci_bridge: Use the IEC binary prefix definitions
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci/pci_bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 3ba3203f72..3789c17edc 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -423,14 +423,14 @@ int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, int cap_offset,
}
if (res_reserve.mem_non_pref != (uint64_t)-1 &&
- res_reserve.mem_non_pref >= (1ULL << 32)) {
+ res_reserve.mem_non_pref >= 4 * GiB) {
error_setg(errp,
"PCI resource reserve cap: mem-reserve must be less than 4G");
return -EINVAL;
}
if (res_reserve.mem_pref_32 != (uint64_t)-1 &&
- res_reserve.mem_pref_32 >= (1ULL << 32)) {
+ res_reserve.mem_pref_32 >= 4 * GiB) {
error_setg(errp,
"PCI resource reserve cap: pref32-reserve must be less than 4G");
return -EINVAL;
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 5/8] hw/pci-host: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/i440fx.c | 3 ++-
hw/pci-host/q35.c | 2 +-
hw/pci-host/versatile.c | 5 +++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index 0adbd77553..aefb416c8f 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qemu/range.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
@@ -301,7 +302,7 @@ PCIBus *i440fx_init(const char *host_type, const char *pci_type,
memory_region_set_enabled(&f->smram_region, true);
/* smram, as seen by SMM CPUs */
- memory_region_init(&f->smram, OBJECT(d), "smram", 1ull << 32);
+ memory_region_init(&f->smram, OBJECT(d), "smram", 4 * GiB);
memory_region_set_enabled(&f->smram, true);
memory_region_init_alias(&f->low_smram, OBJECT(d), "smram-low",
f->ram_memory, 0xa0000, 0x20000);
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 352aeecfa7..b788f17b2c 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -589,7 +589,7 @@ static void mch_realize(PCIDevice *d, Error **errp)
memory_region_set_enabled(&mch->open_high_smram, false);
/* smram, as seen by SMM CPUs */
- memory_region_init(&mch->smram, OBJECT(mch), "smram", 1ull << 32);
+ memory_region_init(&mch->smram, OBJECT(mch), "smram", 4 * GiB);
memory_region_set_enabled(&mch->smram, true);
memory_region_init_alias(&mch->low_smram, OBJECT(mch), "smram-low",
mch->ram_memory, MCH_HOST_BRIDGE_SMRAM_C_BASE,
diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c
index cfb9a78ea6..8ddfb8772a 100644
--- a/hw/pci-host/versatile.c
+++ b/hw/pci-host/versatile.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/irq.h"
@@ -399,8 +400,8 @@ static void pci_vpb_realize(DeviceState *dev, Error **errp)
pci_map_irq_fn mapfn;
int i;
- memory_region_init(&s->pci_io_space, OBJECT(s), "pci_io", 1ULL << 32);
- memory_region_init(&s->pci_mem_space, OBJECT(s), "pci_mem", 1ULL << 32);
+ memory_region_init(&s->pci_io_space, OBJECT(s), "pci_io", 4 * GiB);
+ memory_region_init(&s->pci_mem_space, OBJECT(s), "pci_mem", 4 * GiB);
pci_root_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), dev, "pci",
&s->pci_mem_space, &s->pci_io_space,
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 5/8] hw/pci-host: Use the IEC binary prefix definitions
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/i440fx.c | 3 ++-
hw/pci-host/q35.c | 2 +-
hw/pci-host/versatile.c | 5 +++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index 0adbd77553..aefb416c8f 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qemu/range.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
@@ -301,7 +302,7 @@ PCIBus *i440fx_init(const char *host_type, const char *pci_type,
memory_region_set_enabled(&f->smram_region, true);
/* smram, as seen by SMM CPUs */
- memory_region_init(&f->smram, OBJECT(d), "smram", 1ull << 32);
+ memory_region_init(&f->smram, OBJECT(d), "smram", 4 * GiB);
memory_region_set_enabled(&f->smram, true);
memory_region_init_alias(&f->low_smram, OBJECT(d), "smram-low",
f->ram_memory, 0xa0000, 0x20000);
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 352aeecfa7..b788f17b2c 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -589,7 +589,7 @@ static void mch_realize(PCIDevice *d, Error **errp)
memory_region_set_enabled(&mch->open_high_smram, false);
/* smram, as seen by SMM CPUs */
- memory_region_init(&mch->smram, OBJECT(mch), "smram", 1ull << 32);
+ memory_region_init(&mch->smram, OBJECT(mch), "smram", 4 * GiB);
memory_region_set_enabled(&mch->smram, true);
memory_region_init_alias(&mch->low_smram, OBJECT(mch), "smram-low",
mch->ram_memory, MCH_HOST_BRIDGE_SMRAM_C_BASE,
diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c
index cfb9a78ea6..8ddfb8772a 100644
--- a/hw/pci-host/versatile.c
+++ b/hw/pci-host/versatile.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/irq.h"
@@ -399,8 +400,8 @@ static void pci_vpb_realize(DeviceState *dev, Error **errp)
pci_map_irq_fn mapfn;
int i;
- memory_region_init(&s->pci_io_space, OBJECT(s), "pci_io", 1ULL << 32);
- memory_region_init(&s->pci_mem_space, OBJECT(s), "pci_mem", 1ULL << 32);
+ memory_region_init(&s->pci_io_space, OBJECT(s), "pci_io", 4 * GiB);
+ memory_region_init(&s->pci_mem_space, OBJECT(s), "pci_mem", 4 * GiB);
pci_root_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), dev, "pci",
&s->pci_mem_space, &s->pci_io_space,
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 6/8] hw/hppa/dino: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/hppa/dino.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index 2b1b38c58a..7290f23962 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -542,7 +542,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
&s->parent_obj.data_mem);
/* Dino PCI bus memory. */
- memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 1ull << 32);
+ memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 4 * GiB);
b = pci_register_root_bus(dev, "pci", dino_set_irq, dino_pci_map_irq, s,
&s->pci_mem, get_system_io(),
@@ -561,7 +561,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
}
/* Set up PCI view of memory: Bus master address space. */
- memory_region_init(&s->bm, OBJECT(s), "bm-dino", 1ull << 32);
+ memory_region_init(&s->bm, OBJECT(s), "bm-dino", 4 * GiB);
memory_region_init_alias(&s->bm_ram_alias, OBJECT(s),
"bm-system", addr_space, 0,
0xf0000000 + DINO_MEM_CHUNK_SIZE);
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 6/8] hw/hppa/dino: Use the IEC binary prefix definitions
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/hppa/dino.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index 2b1b38c58a..7290f23962 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -542,7 +542,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
&s->parent_obj.data_mem);
/* Dino PCI bus memory. */
- memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 1ull << 32);
+ memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 4 * GiB);
b = pci_register_root_bus(dev, "pci", dino_set_irq, dino_pci_map_irq, s,
&s->pci_mem, get_system_io(),
@@ -561,7 +561,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
}
/* Set up PCI view of memory: Bus master address space. */
- memory_region_init(&s->bm, OBJECT(s), "bm-dino", 1ull << 32);
+ memory_region_init(&s->bm, OBJECT(s), "bm-dino", 4 * GiB);
memory_region_init_alias(&s->bm_ram_alias, OBJECT(s),
"bm-system", addr_space, 0,
0xf0000000 + DINO_MEM_CHUNK_SIZE);
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/xen/xen-hvm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 82ece6b9e7..94fe5d65e9 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "cpu.h"
#include "hw/pci/pci.h"
@@ -230,7 +231,7 @@ static void xen_ram_init(PCMachineState *pcms,
* Xen does not allocate the memory continuously, it keeps a
* hole of the size computed above or passed in.
*/
- block_len = (1ULL << 32) + x86ms->above_4g_mem_size;
+ block_len = (4 * GiB) + x86ms->above_4g_mem_size;
}
memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
&error_fatal);
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/xen/xen-hvm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 82ece6b9e7..94fe5d65e9 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "cpu.h"
#include "hw/pci/pci.h"
@@ -230,7 +231,7 @@ static void xen_ram_init(PCMachineState *pcms,
* Xen does not allocate the memory continuously, it keeps a
* hole of the size computed above or passed in.
*/
- block_len = (1ULL << 32) + x86ms->above_4g_mem_size;
+ block_len = (4 * GiB) + x86ms->above_4g_mem_size;
}
memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
&error_fatal);
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 8/8] target/i386/cpu: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 3733d9a279..33ce4861fb 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6159,7 +6159,7 @@ static void x86_cpu_machine_done(Notifier *n, void *unused)
if (smram) {
cpu->smram = g_new(MemoryRegion, 1);
memory_region_init_alias(cpu->smram, OBJECT(cpu), "smram",
- smram, 0, 1ull << 32);
+ smram, 0, 4 * GiB);
memory_region_set_enabled(cpu->smram, true);
memory_region_add_subregion_overlap(cpu->cpu_as_root, 0, cpu->smram, 1);
}
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH v2 8/8] target/i386/cpu: Use the IEC binary prefix definitions
@ 2020-06-01 14:29 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 40+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-01 14:29 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
Philippe Mathieu-Daudé,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
Richard Henderson, qemu-ppc, Cédric Le Goater
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 3733d9a279..33ce4861fb 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6159,7 +6159,7 @@ static void x86_cpu_machine_done(Notifier *n, void *unused)
if (smram) {
cpu->smram = g_new(MemoryRegion, 1);
memory_region_init_alias(cpu->smram, OBJECT(cpu), "smram",
- smram, 0, 1ull << 32);
+ smram, 0, 4 * GiB);
memory_region_set_enabled(cpu->smram, true);
memory_region_add_subregion_overlap(cpu->cpu_as_root, 0, cpu->smram, 1);
}
--
2.21.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* RE: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 15:24 ` Paul Durrant
-1 siblings, 0 replies; 40+ messages in thread
From: Paul Durrant @ 2020-06-01 15:24 UTC (permalink / raw)
To: 'Philippe Mathieu-Daudé', qemu-devel
Cc: 'Peter Maydell', 'Stefano Stabellini',
'Eduardo Habkost', 'Michael S. Tsirkin',
'Andrew Jeffery', 'Helge Deller',
qemu-trivial, qemu-arm, 'Hervé Poussineau',
'Joel Stanley', 'Paolo Bonzini',
'Anthony Perard', xen-devel, 'Richard Henderson',
qemu-ppc, 'Cédric Le Goater'
> -----Original Message-----
> From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On Behalf Of Philippe Mathieu-Daudé
> Sent: 01 June 2020 15:29
> To: qemu-devel@nongnu.org
> Cc: xen-devel@lists.xenproject.org; Anthony Perard <anthony.perard@citrix.com>; Paolo Bonzini
> <pbonzini@redhat.com>; Hervé Poussineau <hpoussin@reactos.org>; Helge Deller <deller@gmx.de>; qemu-
> arm@nongnu.org; Marcel Apfelbaum <marcel.apfelbaum@gmail.com>; Stefano Stabellini
> <sstabellini@kernel.org>; Michael S. Tsirkin <mst@redhat.com>; Eduardo Habkost <ehabkost@redhat.com>;
> Paul Durrant <paul@xen.org>; Andrew Jeffery <andrew@aj.id.au>; qemu-trivial@nongnu.org; Peter Maydell
> <peter.maydell@linaro.org>; Joel Stanley <joel@jms.id.au>; Cédric Le Goater <clg@kaod.org>; qemu-
> ppc@nongnu.org; Richard Henderson <rth@twiddle.net>; Philippe Mathieu-Daudé <f4bug@amsat.org>
> Subject: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
>
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paul Durrant <paul@xen.org>
> ---
> hw/i386/xen/xen-hvm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
> index 82ece6b9e7..94fe5d65e9 100644
> --- a/hw/i386/xen/xen-hvm.c
> +++ b/hw/i386/xen/xen-hvm.c
> @@ -9,6 +9,7 @@
> */
>
> #include "qemu/osdep.h"
> +#include "qemu/units.h"
>
> #include "cpu.h"
> #include "hw/pci/pci.h"
> @@ -230,7 +231,7 @@ static void xen_ram_init(PCMachineState *pcms,
> * Xen does not allocate the memory continuously, it keeps a
> * hole of the size computed above or passed in.
> */
> - block_len = (1ULL << 32) + x86ms->above_4g_mem_size;
> + block_len = (4 * GiB) + x86ms->above_4g_mem_size;
> }
> memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
> &error_fatal);
> --
> 2.21.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* RE: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
@ 2020-06-01 15:24 ` Paul Durrant
0 siblings, 0 replies; 40+ messages in thread
From: Paul Durrant @ 2020-06-01 15:24 UTC (permalink / raw)
To: 'Philippe Mathieu-Daudé', qemu-devel
Cc: 'Peter Maydell', 'Stefano Stabellini',
'Eduardo Habkost', 'Michael S. Tsirkin',
'Andrew Jeffery', 'Helge Deller',
qemu-trivial, qemu-arm, 'Hervé Poussineau',
'Joel Stanley', 'Marcel Apfelbaum',
'Paolo Bonzini', 'Anthony Perard',
xen-devel, 'Richard Henderson',
qemu-ppc, 'Cédric Le Goater'
> -----Original Message-----
> From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On Behalf Of Philippe Mathieu-Daudé
> Sent: 01 June 2020 15:29
> To: qemu-devel@nongnu.org
> Cc: xen-devel@lists.xenproject.org; Anthony Perard <anthony.perard@citrix.com>; Paolo Bonzini
> <pbonzini@redhat.com>; Hervé Poussineau <hpoussin@reactos.org>; Helge Deller <deller@gmx.de>; qemu-
> arm@nongnu.org; Marcel Apfelbaum <marcel.apfelbaum@gmail.com>; Stefano Stabellini
> <sstabellini@kernel.org>; Michael S. Tsirkin <mst@redhat.com>; Eduardo Habkost <ehabkost@redhat.com>;
> Paul Durrant <paul@xen.org>; Andrew Jeffery <andrew@aj.id.au>; qemu-trivial@nongnu.org; Peter Maydell
> <peter.maydell@linaro.org>; Joel Stanley <joel@jms.id.au>; Cédric Le Goater <clg@kaod.org>; qemu-
> ppc@nongnu.org; Richard Henderson <rth@twiddle.net>; Philippe Mathieu-Daudé <f4bug@amsat.org>
> Subject: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
>
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paul Durrant <paul@xen.org>
> ---
> hw/i386/xen/xen-hvm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
> index 82ece6b9e7..94fe5d65e9 100644
> --- a/hw/i386/xen/xen-hvm.c
> +++ b/hw/i386/xen/xen-hvm.c
> @@ -9,6 +9,7 @@
> */
>
> #include "qemu/osdep.h"
> +#include "qemu/units.h"
>
> #include "cpu.h"
> #include "hw/pci/pci.h"
> @@ -230,7 +231,7 @@ static void xen_ram_init(PCMachineState *pcms,
> * Xen does not allocate the memory continuously, it keeps a
> * hole of the size computed above or passed in.
> */
> - block_len = (1ULL << 32) + x86ms->above_4g_mem_size;
> + block_len = (4 * GiB) + x86ms->above_4g_mem_size;
> }
> memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
> &error_fatal);
> --
> 2.21.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-01 16:06 ` Cédric Le Goater
-1 siblings, 0 replies; 40+ messages in thread
From: Cédric Le Goater @ 2020-06-01 16:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Paolo Bonzini, Anthony Perard, xen-devel, qemu-ppc,
Richard Henderson
On 6/1/20 4:29 PM, Philippe Mathieu-Daudé wrote:
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value. This is not a problem
> for the 32-bit maximum, 4 GiB.
> By using the UINT32_MAX value, the aspeed-ram-container
> MemoryRegion ends up missing 1 byte:
>
> $ qemu-system-arm -M ast2600-evb -S -monitor stdio
> (qemu) info mtree
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Fix by using the correct value. We now have:
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017fffffff (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Thanks,
C.
> ---
> hw/arm/aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 2c23297edf..62344ac6a3 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -262,7 +262,7 @@ static void aspeed_machine_init(MachineState *machine)
> bmc = g_new0(AspeedBoardState, 1);
>
> memory_region_init(&bmc->ram_container, NULL, "aspeed-ram-container",
> - UINT32_MAX);
> + 4 * GiB);
> memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
>
> object_initialize_child(OBJECT(machine), "soc", &bmc->soc,
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size
@ 2020-06-01 16:06 ` Cédric Le Goater
0 siblings, 0 replies; 40+ messages in thread
From: Cédric Le Goater @ 2020-06-01 16:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, qemu-arm, Hervé Poussineau, Joel Stanley,
Marcel Apfelbaum, Paolo Bonzini, Anthony Perard, xen-devel,
qemu-ppc, Richard Henderson
On 6/1/20 4:29 PM, Philippe Mathieu-Daudé wrote:
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value. This is not a problem
> for the 32-bit maximum, 4 GiB.
> By using the UINT32_MAX value, the aspeed-ram-container
> MemoryRegion ends up missing 1 byte:
>
> $ qemu-system-arm -M ast2600-evb -S -monitor stdio
> (qemu) info mtree
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Fix by using the correct value. We now have:
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017fffffff (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Thanks,
C.
> ---
> hw/arm/aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 2c23297edf..62344ac6a3 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -262,7 +262,7 @@ static void aspeed_machine_init(MachineState *machine)
> bmc = g_new0(AspeedBoardState, 1);
>
> memory_region_init(&bmc->ram_container, NULL, "aspeed-ram-container",
> - UINT32_MAX);
> + 4 * GiB);
> memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
>
> object_initialize_child(OBJECT(machine), "soc", &bmc->soc,
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
(?)
@ 2020-06-01 23:34 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:34 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value. This is not a problem
> for the 32-bit maximum, 4 GiB.
> By using the UINT32_MAX value, the aspeed-ram-container
> MemoryRegion ends up missing 1 byte:
>
> $ qemu-system-arm -M ast2600-evb -S -monitor stdio
> (qemu) info mtree
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Fix by using the correct value. We now have:
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017fffffff (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/arm/aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 2/8] hw/pci-host/prep: Correct RAVEN bus bridge memory region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
@ 2020-06-01 23:35 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value. This is not a problem
> for the 32-bit maximum, 4 GiB.
> By using the UINT32_MAX value, the bm-raven MemoryRegion
> ends up missing 1 byte:
>
> $ qemu-system-ppc -M prep -S -monitor stdio -usb
> memory-region: bm-raven
> 0000000000000000-00000000fffffffe (prio 0, i/o): bm-raven
> 0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory @pci-memory 0000000000000000-000000003effffff
> 0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 0000000000000000-000000007fffffff
>
> Fix by using the correct value. We now have:
>
> memory-region: bm-raven
> 0000000000000000-00000000ffffffff (prio 0, i/o): bm-raven
> 0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory @pci-memory 0000000000000000-000000003effffff
> 0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 0000000000000000-000000007fffffff
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/pci-host/prep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 3/8] hw/pci/pci_bridge: Correct pci_bridge_io memory region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
@ 2020-06-01 23:35 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value. This is not a problem
> for the 32-bit maximum, 4 GiB.
> By using the UINT32_MAX value, the pci_bridge_io MemoryRegion
> ends up missing 1 byte:
>
> (qemu) info mtree
> memory-region: pci_bridge_io
> 0000000000000000-00000000fffffffe (prio 0, i/o): pci_bridge_io
> 0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
> 0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
> 00000000000001ce-00000000000001d1 (prio 0, i/o): vbe
> 0000000000000378-000000000000037f (prio 0, i/o): parallel
> 00000000000003b4-00000000000003b5 (prio 0, i/o): vga
> ...
>
> Fix by using the correct value. We now have:
>
> memory-region: pci_bridge_io
> 0000000000000000-00000000ffffffff (prio 0, i/o): pci_bridge_io
> 0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
> 0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
> ...
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/pci/pci_bridge.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 4/8] hw/pci/pci_bridge: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
@ 2020-06-01 23:36 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:36 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/pci/pci_bridge.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 5/8] hw/pci-host: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
@ 2020-06-01 23:36 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:36 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/pci-host/i440fx.c | 3 ++-
> hw/pci-host/q35.c | 2 +-
> hw/pci-host/versatile.c | 5 +++--
> 3 files changed, 6 insertions(+), 4 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 6/8] hw/hppa/dino: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
@ 2020-06-01 23:37 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:37 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/hppa/dino.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
(?)
@ 2020-06-01 23:37 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:37 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/i386/xen/xen-hvm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 8/8] target/i386/cpu: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
(?)
@ 2020-06-01 23:37 ` Richard Henderson
-1 siblings, 0 replies; 40+ messages in thread
From: Richard Henderson @ 2020-06-01 23:37 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote:
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/i386/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 0/8] hw: Fix some incomplete memory region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-02 3:49 ` Michael S. Tsirkin
-1 siblings, 0 replies; 40+ messages in thread
From: Michael S. Tsirkin @ 2020-06-02 3:49 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost, Paul Durrant,
Andrew Jeffery, Helge Deller, qemu-devel, qemu-trivial, qemu-arm,
Hervé Poussineau, Joel Stanley, Paolo Bonzini,
Anthony Perard, xen-devel, Richard Henderson, qemu-ppc,
Cédric Le Goater
On Mon, Jun 01, 2020 at 04:29:22PM +0200, Philippe Mathieu-Daudé wrote:
> Series fully reviewed.
>
> Since v1:
> - Add parenthesis on the Xen patch (Paul Durrant)
> - Add Peter's R-b tags
PCI things:
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
I'll queue pci patches in my tree.
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value.
> This is not a problem for the 32-bit maximum, 4 GiB, but
> in some places we incorrectly use UINT32_MAX instead of
> 4 GiB, and end up missing 1 byte in the memory region.
>
> This series fixes the cases I encountered.
> Also included few patches while reviewing, I replaced some
> magic values by the IEC binary prefix equivalent.
>
> Regards,
>
> Phil.
>
> Philippe Mathieu-Daudé (8):
> hw/arm/aspeed: Correct DRAM container region size
> hw/pci-host/prep: Correct RAVEN bus bridge memory region size
> hw/pci/pci_bridge: Correct pci_bridge_io memory region size
> hw/pci/pci_bridge: Use the IEC binary prefix definitions
> hw/pci-host: Use the IEC binary prefix definitions
> hw/hppa/dino: Use the IEC binary prefix definitions
> hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
> target/i386/cpu: Use the IEC binary prefix definitions
>
> hw/arm/aspeed.c | 2 +-
> hw/hppa/dino.c | 4 ++--
> hw/i386/xen/xen-hvm.c | 3 ++-
> hw/pci-host/i440fx.c | 3 ++-
> hw/pci-host/prep.c | 2 +-
> hw/pci-host/q35.c | 2 +-
> hw/pci-host/versatile.c | 5 +++--
> hw/pci/pci_bridge.c | 7 ++++---
> target/i386/cpu.c | 2 +-
> 9 files changed, 17 insertions(+), 13 deletions(-)
>
> --
> 2.21.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 0/8] hw: Fix some incomplete memory region size
@ 2020-06-02 3:49 ` Michael S. Tsirkin
0 siblings, 0 replies; 40+ messages in thread
From: Michael S. Tsirkin @ 2020-06-02 3:49 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost, Paul Durrant,
Andrew Jeffery, Helge Deller, qemu-devel, qemu-trivial, qemu-arm,
Hervé Poussineau, Joel Stanley, Marcel Apfelbaum,
Paolo Bonzini, Anthony Perard, xen-devel, Richard Henderson,
qemu-ppc, Cédric Le Goater
On Mon, Jun 01, 2020 at 04:29:22PM +0200, Philippe Mathieu-Daudé wrote:
> Series fully reviewed.
>
> Since v1:
> - Add parenthesis on the Xen patch (Paul Durrant)
> - Add Peter's R-b tags
PCI things:
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
I'll queue pci patches in my tree.
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value.
> This is not a problem for the 32-bit maximum, 4 GiB, but
> in some places we incorrectly use UINT32_MAX instead of
> 4 GiB, and end up missing 1 byte in the memory region.
>
> This series fixes the cases I encountered.
> Also included few patches while reviewing, I replaced some
> magic values by the IEC binary prefix equivalent.
>
> Regards,
>
> Phil.
>
> Philippe Mathieu-Daudé (8):
> hw/arm/aspeed: Correct DRAM container region size
> hw/pci-host/prep: Correct RAVEN bus bridge memory region size
> hw/pci/pci_bridge: Correct pci_bridge_io memory region size
> hw/pci/pci_bridge: Use the IEC binary prefix definitions
> hw/pci-host: Use the IEC binary prefix definitions
> hw/hppa/dino: Use the IEC binary prefix definitions
> hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
> target/i386/cpu: Use the IEC binary prefix definitions
>
> hw/arm/aspeed.c | 2 +-
> hw/hppa/dino.c | 4 ++--
> hw/i386/xen/xen-hvm.c | 3 ++-
> hw/pci-host/i440fx.c | 3 ++-
> hw/pci-host/prep.c | 2 +-
> hw/pci-host/q35.c | 2 +-
> hw/pci-host/versatile.c | 5 +++--
> hw/pci/pci_bridge.c | 7 ++++---
> target/i386/cpu.c | 2 +-
> 9 files changed, 17 insertions(+), 13 deletions(-)
>
> --
> 2.21.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-09 17:29 ` Laurent Vivier
-1 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value. This is not a problem
> for the 32-bit maximum, 4 GiB.
> By using the UINT32_MAX value, the aspeed-ram-container
> MemoryRegion ends up missing 1 byte:
>
> $ qemu-system-arm -M ast2600-evb -S -monitor stdio
> (qemu) info mtree
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Fix by using the correct value. We now have:
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017fffffff (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/arm/aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 2c23297edf..62344ac6a3 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -262,7 +262,7 @@ static void aspeed_machine_init(MachineState *machine)
> bmc = g_new0(AspeedBoardState, 1);
>
> memory_region_init(&bmc->ram_container, NULL, "aspeed-ram-container",
> - UINT32_MAX);
> + 4 * GiB);
> memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
>
> object_initialize_child(OBJECT(machine), "soc", &bmc->soc,
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size
@ 2020-06-09 17:29 ` Laurent Vivier
0 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, Marcel Apfelbaum, xen-devel,
Anthony Perard, Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> memory_region_set_size() handle the 16 Exabytes limit by
> special-casing the UINT64_MAX value. This is not a problem
> for the 32-bit maximum, 4 GiB.
> By using the UINT32_MAX value, the aspeed-ram-container
> MemoryRegion ends up missing 1 byte:
>
> $ qemu-system-arm -M ast2600-evb -S -monitor stdio
> (qemu) info mtree
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Fix by using the correct value. We now have:
>
> address-space: aspeed.fmc-ast2600-dma-dram
> 0000000080000000-000000017fffffff (prio 0, i/o): aspeed-ram-container
> 0000000080000000-00000000bfffffff (prio 0, ram): ram
> 00000000c0000000-ffffffffffffffff (prio 0, i/o): max_ram
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/arm/aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 2c23297edf..62344ac6a3 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -262,7 +262,7 @@ static void aspeed_machine_init(MachineState *machine)
> bmc = g_new0(AspeedBoardState, 1);
>
> memory_region_init(&bmc->ram_container, NULL, "aspeed-ram-container",
> - UINT32_MAX);
> + 4 * GiB);
> memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
>
> object_initialize_child(OBJECT(machine), "soc", &bmc->soc,
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 6/8] hw/hppa/dino: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-09 17:30 ` Laurent Vivier
-1 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:30 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/hppa/dino.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
> index 2b1b38c58a..7290f23962 100644
> --- a/hw/hppa/dino.c
> +++ b/hw/hppa/dino.c
> @@ -542,7 +542,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
> &s->parent_obj.data_mem);
>
> /* Dino PCI bus memory. */
> - memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 1ull << 32);
> + memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 4 * GiB);
>
> b = pci_register_root_bus(dev, "pci", dino_set_irq, dino_pci_map_irq, s,
> &s->pci_mem, get_system_io(),
> @@ -561,7 +561,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
> }
>
> /* Set up PCI view of memory: Bus master address space. */
> - memory_region_init(&s->bm, OBJECT(s), "bm-dino", 1ull << 32);
> + memory_region_init(&s->bm, OBJECT(s), "bm-dino", 4 * GiB);
> memory_region_init_alias(&s->bm_ram_alias, OBJECT(s),
> "bm-system", addr_space, 0,
> 0xf0000000 + DINO_MEM_CHUNK_SIZE);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 6/8] hw/hppa/dino: Use the IEC binary prefix definitions
@ 2020-06-09 17:30 ` Laurent Vivier
0 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:30 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, Marcel Apfelbaum, xen-devel,
Anthony Perard, Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/hppa/dino.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
> index 2b1b38c58a..7290f23962 100644
> --- a/hw/hppa/dino.c
> +++ b/hw/hppa/dino.c
> @@ -542,7 +542,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
> &s->parent_obj.data_mem);
>
> /* Dino PCI bus memory. */
> - memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 1ull << 32);
> + memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 4 * GiB);
>
> b = pci_register_root_bus(dev, "pci", dino_set_irq, dino_pci_map_irq, s,
> &s->pci_mem, get_system_io(),
> @@ -561,7 +561,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
> }
>
> /* Set up PCI view of memory: Bus master address space. */
> - memory_region_init(&s->bm, OBJECT(s), "bm-dino", 1ull << 32);
> + memory_region_init(&s->bm, OBJECT(s), "bm-dino", 4 * GiB);
> memory_region_init_alias(&s->bm_ram_alias, OBJECT(s),
> "bm-system", addr_space, 0,
> 0xf0000000 + DINO_MEM_CHUNK_SIZE);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-09 17:31 ` Laurent Vivier
-1 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:31 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/i386/xen/xen-hvm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
> index 82ece6b9e7..94fe5d65e9 100644
> --- a/hw/i386/xen/xen-hvm.c
> +++ b/hw/i386/xen/xen-hvm.c
> @@ -9,6 +9,7 @@
> */
>
> #include "qemu/osdep.h"
> +#include "qemu/units.h"
>
> #include "cpu.h"
> #include "hw/pci/pci.h"
> @@ -230,7 +231,7 @@ static void xen_ram_init(PCMachineState *pcms,
> * Xen does not allocate the memory continuously, it keeps a
> * hole of the size computed above or passed in.
> */
> - block_len = (1ULL << 32) + x86ms->above_4g_mem_size;
> + block_len = (4 * GiB) + x86ms->above_4g_mem_size;
> }
> memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
> &error_fatal);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions
@ 2020-06-09 17:31 ` Laurent Vivier
0 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:31 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, Marcel Apfelbaum, xen-devel,
Anthony Perard, Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/i386/xen/xen-hvm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
> index 82ece6b9e7..94fe5d65e9 100644
> --- a/hw/i386/xen/xen-hvm.c
> +++ b/hw/i386/xen/xen-hvm.c
> @@ -9,6 +9,7 @@
> */
>
> #include "qemu/osdep.h"
> +#include "qemu/units.h"
>
> #include "cpu.h"
> #include "hw/pci/pci.h"
> @@ -230,7 +231,7 @@ static void xen_ram_init(PCMachineState *pcms,
> * Xen does not allocate the memory continuously, it keeps a
> * hole of the size computed above or passed in.
> */
> - block_len = (1ULL << 32) + x86ms->above_4g_mem_size;
> + block_len = (4 * GiB) + x86ms->above_4g_mem_size;
> }
> memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
> &error_fatal);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 8/8] target/i386/cpu: Use the IEC binary prefix definitions
2020-06-01 14:29 ` Philippe Mathieu-Daudé
@ 2020-06-09 17:33 ` Laurent Vivier
-1 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, xen-devel, Anthony Perard,
Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/i386/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 3733d9a279..33ce4861fb 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -6159,7 +6159,7 @@ static void x86_cpu_machine_done(Notifier *n, void *unused)
> if (smram) {
> cpu->smram = g_new(MemoryRegion, 1);
> memory_region_init_alias(cpu->smram, OBJECT(cpu), "smram",
> - smram, 0, 1ull << 32);
> + smram, 0, 4 * GiB);
> memory_region_set_enabled(cpu->smram, true);
> memory_region_add_subregion_overlap(cpu->cpu_as_root, 0, cpu->smram, 1);
> }
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 8/8] target/i386/cpu: Use the IEC binary prefix definitions
@ 2020-06-09 17:33 ` Laurent Vivier
0 siblings, 0 replies; 40+ messages in thread
From: Laurent Vivier @ 2020-06-09 17:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Stefano Stabellini, Eduardo Habkost,
Michael S. Tsirkin, Andrew Jeffery, Helge Deller, Paul Durrant,
qemu-trivial, Cédric Le Goater, qemu-arm,
Hervé Poussineau, Joel Stanley, Marcel Apfelbaum, xen-devel,
Anthony Perard, Paolo Bonzini, qemu-ppc, Richard Henderson
Le 01/06/2020 à 16:29, Philippe Mathieu-Daudé a écrit :
> IEC binary prefixes ease code review: the unit is explicit.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/i386/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 3733d9a279..33ce4861fb 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -6159,7 +6159,7 @@ static void x86_cpu_machine_done(Notifier *n, void *unused)
> if (smram) {
> cpu->smram = g_new(MemoryRegion, 1);
> memory_region_init_alias(cpu->smram, OBJECT(cpu), "smram",
> - smram, 0, 1ull << 32);
> + smram, 0, 4 * GiB);
> memory_region_set_enabled(cpu->smram, true);
> memory_region_add_subregion_overlap(cpu->cpu_as_root, 0, cpu->smram, 1);
> }
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2020-06-09 17:53 UTC | newest]
Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 14:29 [PATCH v2 0/8] hw: Fix some incomplete memory region size Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 14:29 ` [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container " Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 16:06 ` Cédric Le Goater
2020-06-01 16:06 ` Cédric Le Goater
2020-06-01 23:34 ` Richard Henderson
2020-06-09 17:29 ` Laurent Vivier
2020-06-09 17:29 ` Laurent Vivier
2020-06-01 14:29 ` [PATCH v2 2/8] hw/pci-host/prep: Correct RAVEN bus bridge memory " Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 23:35 ` Richard Henderson
2020-06-01 14:29 ` [PATCH v2 3/8] hw/pci/pci_bridge: Correct pci_bridge_io " Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 23:35 ` Richard Henderson
2020-06-01 14:29 ` [PATCH v2 4/8] hw/pci/pci_bridge: Use the IEC binary prefix definitions Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 23:36 ` Richard Henderson
2020-06-01 14:29 ` [PATCH v2 5/8] hw/pci-host: " Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 23:36 ` Richard Henderson
2020-06-01 14:29 ` [PATCH v2 6/8] hw/hppa/dino: " Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 23:37 ` Richard Henderson
2020-06-09 17:30 ` Laurent Vivier
2020-06-09 17:30 ` Laurent Vivier
2020-06-01 14:29 ` [PATCH v2 7/8] hw/i386/xen/xen-hvm: " Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 15:24 ` Paul Durrant
2020-06-01 15:24 ` Paul Durrant
2020-06-01 23:37 ` Richard Henderson
2020-06-09 17:31 ` Laurent Vivier
2020-06-09 17:31 ` Laurent Vivier
2020-06-01 14:29 ` [PATCH v2 8/8] target/i386/cpu: " Philippe Mathieu-Daudé
2020-06-01 14:29 ` Philippe Mathieu-Daudé
2020-06-01 23:37 ` Richard Henderson
2020-06-09 17:33 ` Laurent Vivier
2020-06-09 17:33 ` Laurent Vivier
2020-06-02 3:49 ` [PATCH v2 0/8] hw: Fix some incomplete memory region size Michael S. Tsirkin
2020-06-02 3:49 ` Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.