All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Minimum RAM size for PC machines?
@ 2017-03-22  9:08 Markus Armbruster
  2017-03-22 10:03 ` Thomas Huth
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Armbruster @ 2017-03-22  9:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: seabios, László Érsek, Peter Maydell

Last time I checked[1], SeaBIOS required 1MiB of RAM, and the failure
modes were mean.

Back then, I asked whether we should enforce a suitable minimum RAM
size[2].  Peter Maydell replied that modelling RAM constraints involves
an expedition into the Generality Swamps, and wished me better luck than
he had.

Four and a half years later, the failure modes are as mean as ever.  For
instance,

    $ qemu-system-x86_64 --nodefaults -device VGA -m 640k

simply hangs for me, and

    $ qemu-system-x86_64 --nodefaults -device VGA -m 16k

crashes with "qemu: fatal: Trying to execute code outside RAM or ROM at
0x0000000000004000" and a register dump with TCG, or the even less
helpful "KVM internal error. Suberror: 1" with KVM.

Waiting for "someone" to design and implement the completely general
solution has had the predictable result: nothing.

Are we now ready to accept a simple & stupid patch that actually helps
users, say letting boards that care declare minimum and maximum RAM
size?  And make PC reject RAM size less than 1MiB, even though "someone"
might conceivably have firmware that works with less?



[1] Message-ID: <87fw7xwqkq.fsf@blackfin.pond.sub.org>
https://www.seabios.org/pipermail/seabios/2012-August/004343.html
[2] Message-ID: <87wr1921rd.fsf@blackfin.pond.sub.org>
https://lists.gnu.org/archive/html/qemu-devel/2012-08/msg01319.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Minimum RAM size for PC machines?
  2017-03-22  9:08 [Qemu-devel] Minimum RAM size for PC machines? Markus Armbruster
@ 2017-03-22 10:03 ` Thomas Huth
  2017-03-22 10:19   ` David Hildenbrand
  2017-03-22 12:25   ` Igor Mammedov
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Huth @ 2017-03-22 10:03 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel
  Cc: Peter Maydell, seabios, László Érsek

On 22.03.2017 10:08, Markus Armbruster wrote:
[...]
> Are we now ready to accept a simple & stupid patch that actually helps
> users, say letting boards that care declare minimum and maximum RAM
> size?  And make PC reject RAM size less than 1MiB, even though "someone"
> might conceivably have firmware that works with less?

I'd say enforce a minimum RAM size on the normal "pc" and "q35" machine,
but still allow smaller sizes on the "isapc" machine. So if "someone"
comes around and claims to have a legacy firmware that wants less memory
than 1MiB, just point them to the isapc machine.
Just my 0.02 €.

 Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Minimum RAM size for PC machines?
  2017-03-22 10:03 ` Thomas Huth
@ 2017-03-22 10:19   ` David Hildenbrand
  2017-03-23  8:19     ` Gerd Hoffmann
  2017-03-22 12:25   ` Igor Mammedov
  1 sibling, 1 reply; 7+ messages in thread
From: David Hildenbrand @ 2017-03-22 10:19 UTC (permalink / raw)
  To: Thomas Huth, Markus Armbruster, qemu-devel
  Cc: Peter Maydell, seabios, László Érsek

On 22.03.2017 11:03, Thomas Huth wrote:
> On 22.03.2017 10:08, Markus Armbruster wrote:
> [...]
>> Are we now ready to accept a simple & stupid patch that actually helps
>> users, say letting boards that care declare minimum and maximum RAM
>> size?  And make PC reject RAM size less than 1MiB, even though "someone"
>> might conceivably have firmware that works with less?
> 
> I'd say enforce a minimum RAM size on the normal "pc" and "q35" machine,
> but still allow smaller sizes on the "isapc" machine. So if "someone"
> comes around and claims to have a legacy firmware that wants less memory
> than 1MiB, just point them to the isapc machine.
> Just my 0.02 €.
> 
>  Thomas

Or maybe simply warn the user that things may go wrong instead of
enforcing it.

-- 

Thanks,

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Minimum RAM size for PC machines?
  2017-03-22 10:03 ` Thomas Huth
  2017-03-22 10:19   ` David Hildenbrand
@ 2017-03-22 12:25   ` Igor Mammedov
  2017-03-22 15:18     ` [Qemu-devel] [SeaBIOS] " Kevin O'Connor
  1 sibling, 1 reply; 7+ messages in thread
From: Igor Mammedov @ 2017-03-22 12:25 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Markus Armbruster, qemu-devel, Peter Maydell, seabios,
	László Érsek

On Wed, 22 Mar 2017 11:03:44 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 22.03.2017 10:08, Markus Armbruster wrote:
> [...]
> > Are we now ready to accept a simple & stupid patch that actually helps
> > users, say letting boards that care declare minimum and maximum RAM
> > size?  And make PC reject RAM size less than 1MiB, even though "someone"
> > might conceivably have firmware that works with less?  
> 
> I'd say enforce a minimum RAM size on the normal "pc" and "q35" machine,
> but still allow smaller sizes on the "isapc" machine. So if "someone"
> comes around and claims to have a legacy firmware that wants less memory
> than 1MiB, just point them to the isapc machine.
> Just my 0.02 €.
We can print warning that minimum size will be enforced in 1-2 releases since 2.9/10
and when it's enforced send users that need less to an old qemu version.

>  Thomas
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [SeaBIOS]  Minimum RAM size for PC machines?
  2017-03-22 12:25   ` Igor Mammedov
@ 2017-03-22 15:18     ` Kevin O'Connor
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin O'Connor @ 2017-03-22 15:18 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Thomas Huth, Peter Maydell, seabios, László Érsek,
	Markus Armbruster, qemu-devel

On Wed, Mar 22, 2017 at 01:25:49PM +0100, Igor Mammedov wrote:
> On Wed, 22 Mar 2017 11:03:44 +0100
> Thomas Huth <thuth@redhat.com> wrote:
> > On 22.03.2017 10:08, Markus Armbruster wrote:
> > > Are we now ready to accept a simple & stupid patch that actually helps
> > > users, say letting boards that care declare minimum and maximum RAM
> > > size?  And make PC reject RAM size less than 1MiB, even though "someone"
> > > might conceivably have firmware that works with less?  
> > 
> > I'd say enforce a minimum RAM size on the normal "pc" and "q35" machine,
> > but still allow smaller sizes on the "isapc" machine. So if "someone"
> > comes around and claims to have a legacy firmware that wants less memory
> > than 1MiB, just point them to the isapc machine.
> > Just my 0.02 €.
> 
> We can print warning that minimum size will be enforced in 1-2
> releases since 2.9/10 and when it's enforced send users that need
> less to an old qemu version.

I did not think that QEMU ever worked on an x86 machine with less than
1MiB of ram.  Certainly SeaBIOS has never supported it.  I'm pretty
sure that Bochs BIOS (qemu < v0.12) did not support it either - its
ram detection system assumed a minimum of 1MiB.

My $.02 - I agree with Markus - place a minimum limit of 1MiB on x86
machines.  If someone is writing a new firmware, updating QEMU to
change the limit is the very least of their concerns.

-Kevin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Minimum RAM size for PC machines?
  2017-03-22 10:19   ` David Hildenbrand
@ 2017-03-23  8:19     ` Gerd Hoffmann
  2017-03-23  9:18       ` David Hildenbrand
  0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2017-03-23  8:19 UTC (permalink / raw)
  To: David Hildenbrand
  Cc: Thomas Huth, Markus Armbruster, qemu-devel, Peter Maydell,
	seabios, László Érsek

On Mi, 2017-03-22 at 11:19 +0100, David Hildenbrand wrote:
> On 22.03.2017 11:03, Thomas Huth wrote:
> > On 22.03.2017 10:08, Markus Armbruster wrote:
> > [...]
> >> Are we now ready to accept a simple & stupid patch that actually helps
> >> users, say letting boards that care declare minimum and maximum RAM
> >> size?  And make PC reject RAM size less than 1MiB, even though "someone"
> >> might conceivably have firmware that works with less?
> > 
> > I'd say enforce a minimum RAM size on the normal "pc" and "q35" machine,
> > but still allow smaller sizes on the "isapc" machine. So if "someone"
> > comes around and claims to have a legacy firmware that wants less memory
> > than 1MiB, just point them to the isapc machine.
> > Just my 0.02 €.
> > 
> >  Thomas
> 
> Or maybe simply warn the user that things may go wrong instead of
> enforcing it.

Why bother?  I have my doubts physical i440fx works with less than 1M
either, given that this memory is needed to shadow the roms.  Possibly
you can't even find dimms that are small to plug them into such a system
to try ...

I'd say just add a hard limit and be done with it.

Maybe exclude isapc.  That one hasn't shadow support so things have at
least a chance to work with less than 1M of memory.  But honestly I'd
rather drop isapc, together with ia64 and sparc.  I mean, what is the
use case?  'pc' machine type is compatible enough with vga and ide ports
being on the standard isa locations so even msdos which has no pci
support at all boots happily.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Minimum RAM size for PC machines?
  2017-03-23  8:19     ` Gerd Hoffmann
@ 2017-03-23  9:18       ` David Hildenbrand
  0 siblings, 0 replies; 7+ messages in thread
From: David Hildenbrand @ 2017-03-23  9:18 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Thomas Huth, Markus Armbruster, qemu-devel, Peter Maydell,
	seabios, László Érsek

On 23.03.2017 09:19, Gerd Hoffmann wrote:
> On Mi, 2017-03-22 at 11:19 +0100, David Hildenbrand wrote:
>> On 22.03.2017 11:03, Thomas Huth wrote:
>>> On 22.03.2017 10:08, Markus Armbruster wrote:
>>> [...]
>>>> Are we now ready to accept a simple & stupid patch that actually helps
>>>> users, say letting boards that care declare minimum and maximum RAM
>>>> size?  And make PC reject RAM size less than 1MiB, even though "someone"
>>>> might conceivably have firmware that works with less?
>>>
>>> I'd say enforce a minimum RAM size on the normal "pc" and "q35" machine,
>>> but still allow smaller sizes on the "isapc" machine. So if "someone"
>>> comes around and claims to have a legacy firmware that wants less memory
>>> than 1MiB, just point them to the isapc machine.
>>> Just my 0.02 €.
>>>
>>>  Thomas
>>
>> Or maybe simply warn the user that things may go wrong instead of
>> enforcing it.
> 
> Why bother?  I have my doubts physical i440fx works with less than 1M
> either, given that this memory is needed to shadow the roms.  Possibly
> you can't even find dimms that are small to plug them into such a system
> to try ...

Because it seems to work if you supply the correct rom. We are trying to
catch user errors, don't we?

> 
> I'd say just add a hard limit and be done with it.

"640K ought to be enough for anybody". Any limit we set will become out
of date.

> 
> Maybe exclude isapc.  That one hasn't shadow support so things have at
> least a chance to work with less than 1M of memory.  But honestly I'd
> rather drop isapc, together with ia64 and sparc.  I mean, what is the
> use case?  'pc' machine type is compatible enough with vga and ide ports
> being on the standard isa locations so even msdos which has no pci
> support at all boots happily.

I think I like that idea.

> cheers,
>   Gerd
> 


-- 

Thanks,

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-23  9:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22  9:08 [Qemu-devel] Minimum RAM size for PC machines? Markus Armbruster
2017-03-22 10:03 ` Thomas Huth
2017-03-22 10:19   ` David Hildenbrand
2017-03-23  8:19     ` Gerd Hoffmann
2017-03-23  9:18       ` David Hildenbrand
2017-03-22 12:25   ` Igor Mammedov
2017-03-22 15:18     ` [Qemu-devel] [SeaBIOS] " Kevin O'Connor

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.