qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	qemu-devel@nongnu.org, "Greg Kurz" <groug@kaod.org>,
	qemu-ppc@nongnu.org, 1922391@bugs.launchpad.net,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Håvard Eidnes" <he@netbsd.org>
Subject: Re: [PATCH-for-6.0] hw/ppc/mac_newworld: Restrict RAM to 2 GiB
Date: Thu, 8 Apr 2021 12:34:55 +1000	[thread overview]
Message-ID: <YG5rzxqMhiE0LE4j@yekko.fritz.box> (raw)
In-Reply-To: <b3211b93-62de-c36b-45ca-33da02a15736@amsat.org>

[-- Attachment #1: Type: text/plain, Size: 2249 bytes --]

On Wed, Apr 07, 2021 at 03:44:35PM +0200, Philippe Mathieu-Daudé wrote:
> On 4/7/21 3:11 PM, Mark Cave-Ayland wrote:
> > On 06/04/2021 09:48, Philippe Mathieu-Daudé wrote:
> > 
> >> On Mac99 and newer machines, the Uninorth PCI host bridge maps
> >> the PCI hole region at 2GiB, so the RAM area beside 2GiB is not
> >> accessible by the CPU. Restrict the memory to 2GiB to avoid
> >> problems such the one reported in the buglink.
> >>
> >> Buglink: https://bugs.launchpad.net/qemu/+bug/1922391
> >> Reported-by: Håvard Eidnes <he@NetBSD.org>
> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >> ---
> >>   hw/ppc/mac_newworld.c | 4 ++++
> >>   1 file changed, 4 insertions(+)
> >>
> >> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> >> index 21759628466..d88b38e9258 100644
> >> --- a/hw/ppc/mac_newworld.c
> >> +++ b/hw/ppc/mac_newworld.c
> >> @@ -157,6 +157,10 @@ static void ppc_core99_init(MachineState *machine)
> >>       }
> >>         /* allocate RAM */
> >> +    if (machine->ram_size > 2 * GiB) {
> >> +        error_report("RAM size more than 2 GiB is not supported");
> >> +        exit(1);
> >> +    }
> >>       memory_region_add_subregion(get_system_memory(), 0, machine->ram);
> >>         /* allocate and load firmware ROM */
> > 
> > I think the patch is correct, however I'm fairly sure that the default
> > g3beige machine also has the PCI hole located at 0x80000000 so the same
> > problem exists there too.
> > 
> > Also are you keen to get this merged for 6.0? It doesn't seem to solve a
> > security issue/release blocker and I'm sure the current behaviour has
> > been like this for a long time...
> 
> No problem. I wanted to revisit this bug anyway, I realized during the
> night, while this patch makes QEMU exit cleanly, it hides the bug which
> is likely in TYPE_MACIO_IDE (I haven't tried Håvard's full
> reproducer).

Ah, given the comments above, I've pulled this out of ppc-for-6.0 and
moved it to ppc-for-6.1.

> 
> Regards,
> 
> Phil.
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-04-08  2:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  8:48 [PATCH-for-6.0] hw/ppc/mac_newworld: Restrict RAM to 2 GiB Philippe Mathieu-Daudé
2021-04-06 10:38 ` BALATON Zoltan
2021-04-07 13:11 ` Mark Cave-Ayland
2021-04-07 13:44   ` Philippe Mathieu-Daudé
2021-04-07 13:44     ` [Bug 1922391] " Philippe Mathieu-Daudé
2021-04-08  2:34     ` David Gibson [this message]
2021-04-08  2:33 ` David Gibson
  -- strict thread matches above, loose matches on Subject: below --
2021-04-02 20:48 [Bug 1922391] [NEW] qemu-system-ppc assertion "!mr->container" failed Håvard Eidnes
2021-04-02 21:00 ` [Bug 1922391] " Håvard Eidnes
2021-04-02 21:59 ` Håvard Eidnes
2021-04-05 19:40 ` Håvard Eidnes
2021-04-06  7:39 ` Philippe Mathieu-Daudé
2021-04-06 10:14 ` Philippe Mathieu-Daudé
2021-05-15 10:25 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YG5rzxqMhiE0LE4j@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=1922391@bugs.launchpad.net \
    --cc=f4bug@amsat.org \
    --cc=groug@kaod.org \
    --cc=he@netbsd.org \
    --cc=imammedo@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).