* [Qemu-devel] [PATCH 0/2] ppc/pnv: increase kernel size limit to 256MiB
@ 2019-02-25 14:24 Murilo Opsfelder Araujo
2019-02-25 14:24 ` [Qemu-devel] [PATCH 1/2] " Murilo Opsfelder Araujo
2019-02-25 14:24 ` [Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant Murilo Opsfelder Araujo
0 siblings, 2 replies; 4+ messages in thread
From: Murilo Opsfelder Araujo @ 2019-02-25 14:24 UTC (permalink / raw)
To: qemu-devel
Cc: mopsfelder, Murilo Opsfelder Araujo, Cédric Le Goater,
David Gibson, qemu-ppc
First patch increases kernel size limit to 256MiB to fit images generated with
CONFIG_DEBUG_INFO.
Second patch just fixes a misleading comment regarding initrd size limit.
Murilo Opsfelder Araujo (2):
ppc/pnv: increase kernel size limit to 256MiB
ppc/pnv: add INITRD_MAX_SIZE constant
hw/ppc/pnv.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/2] ppc/pnv: increase kernel size limit to 256MiB
2019-02-25 14:24 [Qemu-devel] [PATCH 0/2] ppc/pnv: increase kernel size limit to 256MiB Murilo Opsfelder Araujo
@ 2019-02-25 14:24 ` Murilo Opsfelder Araujo
2019-02-25 14:24 ` [Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant Murilo Opsfelder Araujo
1 sibling, 0 replies; 4+ messages in thread
From: Murilo Opsfelder Araujo @ 2019-02-25 14:24 UTC (permalink / raw)
To: qemu-devel
Cc: mopsfelder, Murilo Opsfelder Araujo, Cédric Le Goater,
David Gibson, qemu-ppc
Building kernel with CONFIG_DEBUG_INFO_REDUCED can generate a ~90MB image and
building with CONFIG_DEBUG_INFO can generate a ~225M one, both exceeds the
current limit of 32MiB.
Increasing kernel size limit to 256MiB should fit for now.
Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
---
hw/ppc/pnv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index da540860a2..000707164e 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -54,6 +54,7 @@
#define FW_MAX_SIZE 0x00400000
#define KERNEL_LOAD_ADDR 0x20000000
+#define KERNEL_MAX_SIZE 0x10000000 /* 256MiB */
#define INITRD_LOAD_ADDR 0x60000000
static const char *pnv_chip_core_typename(const PnvChip *o)
@@ -588,7 +589,7 @@ static void pnv_init(MachineState *machine)
long kernel_size;
kernel_size = load_image_targphys(machine->kernel_filename,
- KERNEL_LOAD_ADDR, 0x2000000);
+ KERNEL_LOAD_ADDR, KERNEL_MAX_SIZE);
if (kernel_size < 0) {
error_report("Could not load kernel '%s'",
machine->kernel_filename);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant
2019-02-25 14:24 [Qemu-devel] [PATCH 0/2] ppc/pnv: increase kernel size limit to 256MiB Murilo Opsfelder Araujo
2019-02-25 14:24 ` [Qemu-devel] [PATCH 1/2] " Murilo Opsfelder Araujo
@ 2019-02-25 14:24 ` Murilo Opsfelder Araujo
2019-02-25 15:02 ` Eric Blake
1 sibling, 1 reply; 4+ messages in thread
From: Murilo Opsfelder Araujo @ 2019-02-25 14:24 UTC (permalink / raw)
To: qemu-devel
Cc: mopsfelder, Murilo Opsfelder Araujo, Cédric Le Goater,
David Gibson, qemu-ppc
The current 0x10000000 value is actually 256MiB, not 128MB as the comment
suggests. Move it to a constant and fix the comment (no change in the size
value).
Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
---
hw/ppc/pnv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 000707164e..514439db20 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -56,6 +56,7 @@
#define KERNEL_LOAD_ADDR 0x20000000
#define KERNEL_MAX_SIZE 0x10000000 /* 256MiB */
#define INITRD_LOAD_ADDR 0x60000000
+#define INITRD_MAX_SIZE 0x10000000 /* 256MiB */
static const char *pnv_chip_core_typename(const PnvChip *o)
{
@@ -601,7 +602,7 @@ static void pnv_init(MachineState *machine)
if (machine->initrd_filename) {
pnv->initrd_base = INITRD_LOAD_ADDR;
pnv->initrd_size = load_image_targphys(machine->initrd_filename,
- pnv->initrd_base, 0x10000000); /* 128MB max */
+ pnv->initrd_base, INITRD_MAX_SIZE);
if (pnv->initrd_size < 0) {
error_report("Could not load initial ram disk '%s'",
machine->initrd_filename);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant
2019-02-25 14:24 ` [Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant Murilo Opsfelder Araujo
@ 2019-02-25 15:02 ` Eric Blake
0 siblings, 0 replies; 4+ messages in thread
From: Eric Blake @ 2019-02-25 15:02 UTC (permalink / raw)
To: Murilo Opsfelder Araujo, qemu-devel
Cc: David Gibson, qemu-ppc, Cédric Le Goater, Murilo Opsfelder Araujo
On 2/25/19 8:24 AM, Murilo Opsfelder Araujo wrote:
> The current 0x10000000 value is actually 256MiB, not 128MB as the comment
> suggests. Move it to a constant and fix the comment (no change in the size
> value).
>
> Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
> ---
> hw/ppc/pnv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 000707164e..514439db20 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -56,6 +56,7 @@
> #define KERNEL_LOAD_ADDR 0x20000000
> #define KERNEL_MAX_SIZE 0x10000000 /* 256MiB */
> #define INITRD_LOAD_ADDR 0x60000000
> +#define INITRD_MAX_SIZE 0x10000000 /* 256MiB */
Why not #include "qemu/units.h" and spell this:
#define INITRD_MAX_SIZE (256 * MiB)
and so on for the other values?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-25 15:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 14:24 [Qemu-devel] [PATCH 0/2] ppc/pnv: increase kernel size limit to 256MiB Murilo Opsfelder Araujo
2019-02-25 14:24 ` [Qemu-devel] [PATCH 1/2] " Murilo Opsfelder Araujo
2019-02-25 14:24 ` [Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant Murilo Opsfelder Araujo
2019-02-25 15:02 ` Eric Blake
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.