qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: "J. Mayer" <l_indien@magic.fr>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Updated >2G memory patch
Date: Sat, 29 Sep 2007 18:54:20 +0300	[thread overview]
Message-ID: <f43fc5580709290854s61c11a5cicccf7961cb8f4b1c@mail.gmail.com> (raw)
In-Reply-To: <1191072882.29900.39.camel@rapid>

On 9/29/07, J. Mayer <l_indien@magic.fr> wrote:
> Imho, having 42 bits of physical address space as a default is clearly
> not a good solution.

I agree that the number of bits could be reduced. Something like 36
bits (64G) should be enough for some years.

> First of all, it's a nonsense for most 32 bits machines emulation.

Well, it's useful for i386 (PAE etc.), which is probably the most
common target and other targets could use the 2G to 4G range for a
small benefit.

> Then, it makes the l1_map and l1_phys_map tables grow from 1024 entries
> to 1048576 entries which is quite awful. And this model cannot be
> extended to emulate a full 64 bits address space: this would make the
> tables so huge that the emulator would even not be able to run on most
> host machines.
> The 42 bits L1_SIZE extension I did for alpha emulation was a quick
> hack, as the associated comment says. It clearly cannot be generalized
> and a more cleaver model should be used, with multi level tables, _only_
> if the emulated target really needs more than 32 bits of physical
> address space, this not to have any performance impact on the 32 bits
> only targets emulation.

You're right, this part would need some rework.

> Also note that changing variables from int to long have strictly no
> impact on 32 bits host machines, then won't help emulating more than 2
> GB of RAM. Another variable type (target_phys_addr_t ?) should be used
> instead.

This patch should be restricted to 64-bit hosts. I don't think it's
useful to emulate a 64-bit target with huge amounts of virtual and
physical address space on a 32-bit host.

My first patch changed a lot of unsigned longs to new host_phys_addr_t
type. But I think it is too intrusive at this stage, so I changed just
the ints and uint32_ts to unsigned long where applicable. Also the
correct name would be host_virt_addr_t, user space don't use physical
addresses.

  reply	other threads:[~2007-09-29 15:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29 13:04 [Qemu-devel] Updated >2G memory patch Blue Swirl
2007-09-29 13:33 ` [Qemu-devel] " Izik Eidus
2007-09-29 13:40   ` Izik Eidus
2007-09-29 13:34 ` [Qemu-devel] " J. Mayer
2007-09-29 15:54   ` Blue Swirl [this message]
2007-09-29 22:43     ` Paul Brook
2007-09-29 23:16       ` J. Mayer
2007-09-30  0:02         ` Paul Brook
2007-09-30  0:34           ` J. Mayer
2007-09-30 15:43             ` Paul Brook
2007-09-30  7:15         ` Blue Swirl
2007-09-30 12:31           ` J. Mayer
2007-09-30 14:37             ` Avi Kivity
2007-09-30 15:30             ` Blue Swirl

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=f43fc5580709290854s61c11a5cicccf7961cb8f4b1c@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=l_indien@magic.fr \
    --cc=qemu-devel@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).