All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ioemu: drop unused 4MB video memory
@ 2008-07-10 16:18 Samuel Thibault
  2008-07-14  9:35 ` Ian Jackson
  0 siblings, 1 reply; 12+ messages in thread
From: Samuel Thibault @ 2008-07-10 16:18 UTC (permalink / raw)
  To: xen-devel

ioemu: drop unused 4MB video memory

Since we only emulate the cirrus VGA video card which is only able to
expose 4MB video memory, we don't need more than that.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

diff -r 7a918e567837 tools/ioemu/vl.h
--- a/tools/ioemu/vl.h	Thu Jul 10 15:34:44 2008 +0100
+++ b/tools/ioemu/vl.h	Thu Jul 10 17:09:37 2008 +0100
@@ -927,7 +927,7 @@
 
 /* vga.c */
 
-#define VGA_RAM_SIZE (8192 * 1024)
+#define VGA_RAM_SIZE (4096 * 1024)
 
 /* in ms */
 #define GUI_REFRESH_INTERVAL 30
diff -r 7a918e567837 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py	Thu Jul 10 15:34:44 2008 +0100
+++ b/tools/python/xen/xend/image.py	Thu Jul 10 17:09:37 2008 +0100
@@ -833,8 +833,8 @@
         # buffer io page, buffer pio page and memmap info page
         extra_pages = 1024 + 5
         mem_kb += extra_pages * page_kb
-        # Add 8 MiB overhead for QEMU's video RAM.
-        return mem_kb + 8192
+        # Add 4 MiB overhead for QEMU's video RAM.
+        return mem_kb + 4096
 
     def getRequiredInitialReservation(self):
         return self.vm.getMemoryTarget()
@@ -876,8 +876,8 @@
         return rc
 
     def getRequiredAvailableMemory(self, mem_kb):
-        # Add 8 MiB overhead for QEMU's video RAM.
-        return mem_kb + 8192
+        # Add 4 MiB overhead for QEMU's video RAM.
+        return mem_kb + 4096
 
     def getRequiredInitialReservation(self):
         return self.vm.getMemoryTarget()

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-10 16:18 [PATCH] ioemu: drop unused 4MB video memory Samuel Thibault
@ 2008-07-14  9:35 ` Ian Jackson
  2008-07-14  9:35   ` Ian Jackson
  2008-07-14 10:40   ` Samuel Thibault
  0 siblings, 2 replies; 12+ messages in thread
From: Ian Jackson @ 2008-07-14  9:35 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: xen-devel

Samuel Thibault writes ("[Xen-devel] [PATCH] ioemu: drop unused 4MB video memory"):
> ioemu: drop unused 4MB video memory
> 
> Since we only emulate the cirrus VGA video card which is only able to
> expose 4MB video memory, we don't need more than that.

I see this has gone into xen-unstable and also the new qemu-xen tree[1].

But it would be nice to understand the compatibility properties:
 * Evidently it breaks when tools have this change but qemu-dm
   doesn't.  Is there a way to avoid this being a fatal error ?
 * I think I'm correct to assume that this change is harmless for
   a new qemu-dm and old tools ?
 * What about save/restore ?

Ian.

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14  9:35 ` Ian Jackson
@ 2008-07-14  9:35   ` Ian Jackson
  2008-07-14 10:40   ` Samuel Thibault
  1 sibling, 0 replies; 12+ messages in thread
From: Ian Jackson @ 2008-07-14  9:35 UTC (permalink / raw)
  To: xen-devel

iwj writes ("Re: [Xen-devel] [PATCH] ioemu: drop unused 4MB video memory"):
> I see this has gone into xen-unstable and also the new qemu-xen tree[1].

[1] which apparently hasn't been getting pushed properly which I'm
investigating.

Ian.

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14  9:35 ` Ian Jackson
  2008-07-14  9:35   ` Ian Jackson
@ 2008-07-14 10:40   ` Samuel Thibault
  2008-07-14 10:42     ` Keir Fraser
  2008-07-14 12:53     ` Ian Jackson
  1 sibling, 2 replies; 12+ messages in thread
From: Samuel Thibault @ 2008-07-14 10:40 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

Hello,

Ian Jackson, le Mon 14 Jul 2008 10:35:15 +0100, a écrit :
> Samuel Thibault writes ("[Xen-devel] [PATCH] ioemu: drop unused 4MB video memory"):
> > ioemu: drop unused 4MB video memory
> > 
> > Since we only emulate the cirrus VGA video card which is only able to
> > expose 4MB video memory, we don't need more than that.
> 
> I see this has gone into xen-unstable and also the new qemu-xen tree[1].
> 
> But it would be nice to understand the compatibility properties:
>  * Evidently it breaks when tools have this change but qemu-dm
>    doesn't.

Yes.

> Is there a way to avoid this being a fatal error ?

Unfortunately VGA_RAM_SIZE is used in a lot of places of qemu so that'd
be a bit hard.

>  * I think I'm correct to assume that this change is harmless for
>    a new qemu-dm and old tools ?

Yes.

>  * What about save/restore ?

Ah, right, we need a compatibility version for that, I'll work on it.

Samuel

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 10:40   ` Samuel Thibault
@ 2008-07-14 10:42     ` Keir Fraser
  2008-07-14 10:49       ` Samuel Thibault
  2008-07-14 12:53     ` Ian Jackson
  1 sibling, 1 reply; 12+ messages in thread
From: Keir Fraser @ 2008-07-14 10:42 UTC (permalink / raw)
  To: Samuel Thibault, Ian Jackson; +Cc: xen-devel

On 14/7/08 11:40, "Samuel Thibault" <samuel.thibault@eu.citrix.com> wrote:

>>  * What about save/restore ?
> 
> Ah, right, we need a compatibility version for that, I'll work on it.

What's the compatibility problem? Is VGA_RAM_SIZE baked into the qemu save
image for some reason?

 -- Keir

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 10:42     ` Keir Fraser
@ 2008-07-14 10:49       ` Samuel Thibault
  2008-07-14 11:09         ` Samuel Thibault
  0 siblings, 1 reply; 12+ messages in thread
From: Samuel Thibault @ 2008-07-14 10:49 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Ian Jackson

Keir Fraser, le Mon 14 Jul 2008 11:42:35 +0100, a écrit :
> On 14/7/08 11:40, "Samuel Thibault" <samuel.thibault@eu.citrix.com> wrote:
> 
> >>  * What about save/restore ?
> > 
> > Ah, right, we need a compatibility version for that, I'll work on it.
> 
> What's the compatibility problem? Is VGA_RAM_SIZE baked into the qemu save
> image for some reason?

The video memory is currently written by qemu yes.  Actually, if that
could be moved to libxc it would be some benefit, since that's a penalty
hit for live migration.

Samuel

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 10:49       ` Samuel Thibault
@ 2008-07-14 11:09         ` Samuel Thibault
  2008-07-14 11:40           ` Trolle Selander
  0 siblings, 1 reply; 12+ messages in thread
From: Samuel Thibault @ 2008-07-14 11:09 UTC (permalink / raw)
  To: Keir Fraser, Ian Jackson, xen-devel

Samuel Thibault, le Mon 14 Jul 2008 11:49:33 +0100, a écrit :
> Keir Fraser, le Mon 14 Jul 2008 11:42:35 +0100, a écrit :
> > On 14/7/08 11:40, "Samuel Thibault" <samuel.thibault@eu.citrix.com> wrote:
> > 
> > >>  * What about save/restore ?
> > > 
> > > Ah, right, we need a compatibility version for that, I'll work on it.
> > 
> > What's the compatibility problem? Is VGA_RAM_SIZE baked into the qemu save
> > image for some reason?
> 
> The video memory is currently written by qemu yes.

Actually, the problem is also that everything (including qemu's dirty
bitmap) gets initialized to 4MB before the load, and it'd be clumsy to
plumb a reallocation.  Bummer.  It'd be simpler to just go expense these
4MB.

Samuel

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 11:09         ` Samuel Thibault
@ 2008-07-14 11:40           ` Trolle Selander
  2008-07-14 11:46             ` Samuel Thibault
  0 siblings, 1 reply; 12+ messages in thread
From: Trolle Selander @ 2008-07-14 11:40 UTC (permalink / raw)
  To: Samuel Thibault, Keir Fraser, Ian Jackson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1498 bytes --]

I believe we have this disabled currently, but there is code in upstream
qemu to support higher resolutions that actually make use of more memory
through stdvga + VBE bios exensions. It seems a bit counterproductive to put
in a lot of work to trim this down to 4 megs now if we're eventually going
to support the stdvga + VBE combo for higher resolutions. Or is this 4/8 meg
allocation stricly for cirrus, and stdvga mem allocation entirely separate?

/ Trolle

On Mon, Jul 14, 2008 at 12:09 PM, Samuel Thibault <
samuel.thibault@eu.citrix.com> wrote:

> Samuel Thibault, le Mon 14 Jul 2008 11:49:33 +0100, a écrit :
> > Keir Fraser, le Mon 14 Jul 2008 11:42:35 +0100, a écrit :
> > > On 14/7/08 11:40, "Samuel Thibault" <samuel.thibault@eu.citrix.com>
> wrote:
> > >
> > > >>  * What about save/restore ?
> > > >
> > > > Ah, right, we need a compatibility version for that, I'll work on it.
> > >
> > > What's the compatibility problem? Is VGA_RAM_SIZE baked into the qemu
> save
> > > image for some reason?
> >
> > The video memory is currently written by qemu yes.
>
> Actually, the problem is also that everything (including qemu's dirty
> bitmap) gets initialized to 4MB before the load, and it'd be clumsy to
> plumb a reallocation.  Bummer.  It'd be simpler to just go expense these
> 4MB.
>
> Samuel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

[-- Attachment #1.2: Type: text/html, Size: 2148 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 11:40           ` Trolle Selander
@ 2008-07-14 11:46             ` Samuel Thibault
  0 siblings, 0 replies; 12+ messages in thread
From: Samuel Thibault @ 2008-07-14 11:46 UTC (permalink / raw)
  To: Trolle Selander; +Cc: xen-devel, Ian Jackson, Keir Fraser

Trolle Selander, le Mon 14 Jul 2008 12:40:06 +0100, a écrit :
> I believe we have this disabled currently, but there is code in upstream qemu
> to support higher resolutions that actually make use of more memory through
> stdvga + VBE bios exensions. It seems a bit counterproductive to put in a lot
> of work to trim this down to 4 megs now if we're eventually going to support
> the stdvga + VBE combo for higher resolutions.

Agreed.

> Or is this 4/8 meg allocation stricly for cirrus, and stdvga mem
> allocation entirely separate?

These allocations are independent, but are working the same way.

Samuel

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 10:40   ` Samuel Thibault
  2008-07-14 10:42     ` Keir Fraser
@ 2008-07-14 12:53     ` Ian Jackson
  2008-07-14 12:58       ` Samuel Thibault
  1 sibling, 1 reply; 12+ messages in thread
From: Ian Jackson @ 2008-07-14 12:53 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: xen-devel

Samuel Thibault writes ("Re: [Xen-devel] [PATCH] ioemu: drop unused 4MB video memory"):
> Ian Jackson, le Mon 14 Jul 2008 10:35:15 +0100, a écrit :
> > Is there a way to avoid this being a fatal error ?
> 
> Unfortunately VGA_RAM_SIZE is used in a lot of places of qemu so that'd
> be a bit hard.

Err, you're missing my point, which is that we want it to work with
old qemu and new hypervisor.  Obviously changing qemu now will not
allow us to do that ...

> >  * What about save/restore ?
> 
> Ah, right, we need a compatibility version for that, I'll work on it.

For the moment Keir and I have reverted this pair of changes.

Ian.

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 12:53     ` Ian Jackson
@ 2008-07-14 12:58       ` Samuel Thibault
  2008-07-14 13:47         ` Ian Jackson
  0 siblings, 1 reply; 12+ messages in thread
From: Samuel Thibault @ 2008-07-14 12:58 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

Ian Jackson, le Mon 14 Jul 2008 13:53:39 +0100, a écrit :
> Samuel Thibault writes ("Re: [Xen-devel] [PATCH] ioemu: drop unused 4MB video memory"):
> > Ian Jackson, le Mon 14 Jul 2008 10:35:15 +0100, a écrit :
> > > Is there a way to avoid this being a fatal error ?
> > 
> > Unfortunately VGA_RAM_SIZE is used in a lot of places of qemu so that'd
> > be a bit hard.
> 
> Err, you're missing my point, which is that we want it to work with
> old qemu and new hypervisor.  Obviously changing qemu now will not
> allow us to do that ...

Oops, right.  No, there is no way.  Note however that the issue are with
the tools, not the hypervisor.

Samuel

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

* Re: [PATCH] ioemu: drop unused 4MB video memory
  2008-07-14 12:58       ` Samuel Thibault
@ 2008-07-14 13:47         ` Ian Jackson
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Jackson @ 2008-07-14 13:47 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: xen-devel

Samuel Thibault writes ("Re: [Xen-devel] [PATCH] ioemu: drop unused 4MB video memory"):
> Ian Jackson, le Mon 14 Jul 2008 13:53:39 +0100, a écrit :
> > Err, you're missing my point, which is that we want it to work with
> > old qemu and new hypervisor.  Obviously changing qemu now will not
> > allow us to do that ...
> 
> Oops, right.  No, there is no way.  Note however that the issue are with
> the tools, not the hypervisor.

Yes, sorry, that's what I meant.

Perhaps there should be some way for the tools to find out what fixes
or features qemu-dm has.

Ian.

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

end of thread, other threads:[~2008-07-14 13:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 16:18 [PATCH] ioemu: drop unused 4MB video memory Samuel Thibault
2008-07-14  9:35 ` Ian Jackson
2008-07-14  9:35   ` Ian Jackson
2008-07-14 10:40   ` Samuel Thibault
2008-07-14 10:42     ` Keir Fraser
2008-07-14 10:49       ` Samuel Thibault
2008-07-14 11:09         ` Samuel Thibault
2008-07-14 11:40           ` Trolle Selander
2008-07-14 11:46             ` Samuel Thibault
2008-07-14 12:53     ` Ian Jackson
2008-07-14 12:58       ` Samuel Thibault
2008-07-14 13:47         ` Ian Jackson

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.