All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ioemu: don't use magic number 0xff00000.
@ 2009-01-15 12:22 Isaku Yamahata
  2009-01-15 12:44 ` Samuel Thibault
  0 siblings, 1 reply; 4+ messages in thread
From: Isaku Yamahata @ 2009-01-15 12:22 UTC (permalink / raw)
  To: xen-devel
  Cc: samuel.thibault, xen-ia64-devel, ian.jackson, stefano.stabellini

commit 153a5f4c7ddc2d5ef85e62e73b2f66132c6f9089
Author: Isaku Yamahata <yamahata@valinux.co.jp>
Date:   Thu Jan 15 20:59:57 2009 +0900

    don't use magic number 0xff00000.
    
    don't use magic number 0xff00000.
    define VRAM_RESERVED_ADDRESS and use it.
    On ia64, the area is already used by firmware so define it
    to 0xfd0000000.
    
    Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index d6a9235..f2ec05b 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -3165,7 +3165,7 @@ static int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id)
     if (!s->vram_gmfn) {
         /* Old guest, VRAM is not mapped, we have to restore it
          * ourselves */
-        s->vram_gmfn = vga_acc ? s->lfb_addr : 0xff000000;
+        s->vram_gmfn = vga_acc ? s->lfb_addr : VRAM_RESERVED_ADDRESS;
         xen_vga_populate_vram(s->vram_gmfn, s->vram_size);
     }
     xen_vga_vram_map(s->vram_gmfn, s->vram_size);
diff --git a/hw/vga.c b/hw/vga.c
index 8aa61c6..2ae6e85 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2126,7 +2126,7 @@ void unset_vram_mapping(void *opaque)
     VGAState *s = (VGAState *) opaque;
     if (s->vram_gmfn) {
         /* We can put it there for xend to save it efficiently */
-        set_vram_mapping(s, 0xff000000, 0xff000000 + s->vram_size);
+        set_vram_mapping(s, VRAM_RESERVED_ADDRESS, VRAM_RESERVED_ADDRESS + s->vram_size);
     }
 }
 
@@ -2250,9 +2250,9 @@ static int vga_load(QEMUFile *f, void *opaque, int version_id)
         }
         /* Old guest, VRAM is not mapped, we have to restore it ourselves */
         if (!s->vram_gmfn) {
-            xen_vga_populate_vram(0xff000000, s->vram_size);
-            xen_vga_vram_map(0xff000000, s->vram_size);
-            s->vram_gmfn = 0xff000000;
+            xen_vga_populate_vram(VRAM_RESERVED_ADDRESS, s->vram_size);
+            xen_vga_vram_map(VRAM_RESERVED_ADDRESS, s->vram_size);
+            s->vram_gmfn = VRAM_RESERVED_ADDRESS;
             qemu_get_buffer(f, s->vram_ptr, s->vram_size); 
         }
     }
@@ -2525,9 +2525,9 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
     s->get_resolution = vga_get_resolution;
 
     if (!restore) {
-        xen_vga_populate_vram(0xff000000, s->vram_size);
-        xen_vga_vram_map(0xff000000, s->vram_size);
-        s->vram_gmfn = 0xff000000;
+        xen_vga_populate_vram(VRAM_RESERVED_ADDRESS, s->vram_size);
+        xen_vga_vram_map(VRAM_RESERVED_ADDRESS, s->vram_size);
+        s->vram_gmfn = VRAM_RESERVED_ADDRESS;
     }
 
     graphic_console_init(s->ds, vga_update_display, vga_invalidate_display,
diff --git a/hw/vga_int.h b/hw/vga_int.h
index 54a1f7e..d914b62 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -209,3 +209,9 @@ void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1,
 void *vga_update_vram(VGAState *s, void *vga_ram_base, int vga_ram_size);
 extern const uint8_t sr_mask[8];
 extern const uint8_t gr_mask[16];
+
+#ifdef __ia64__
+#define VRAM_RESERVED_ADDRESS	0xfd000000
+#else
+#define VRAM_RESERVED_ADDRESS	0xff000000
+#endif

-- 
yamahata

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

* Re: [PATCH 1/2] ioemu: don't use magic number 0xff00000.
  2009-01-15 12:22 [PATCH 1/2] ioemu: don't use magic number 0xff00000 Isaku Yamahata
@ 2009-01-15 12:44 ` Samuel Thibault
  2009-01-15 12:48   ` Stefano Stabellini
  2009-01-15 12:53   ` Keir Fraser
  0 siblings, 2 replies; 4+ messages in thread
From: Samuel Thibault @ 2009-01-15 12:44 UTC (permalink / raw)
  To: Isaku Yamahata; +Cc: xen-devel, ian.jackson, stefano.stabellini, xen-ia64-devel

Isaku Yamahata, le Thu 15 Jan 2009 21:22:59 +0900, a écrit :
>     don't use magic number 0xff00000.
>     
> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
> index d6a9235..f2ec05b 100644
> --- a/hw/cirrus_vga.c
> +++ b/hw/cirrus_vga.c
> @@ -3165,7 +3165,7 @@ static int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id)
>      if (!s->vram_gmfn) {
>          /* Old guest, VRAM is not mapped, we have to restore it
>           * ourselves */
> -        s->vram_gmfn = vga_acc ? s->lfb_addr : 0xff000000;
> +        s->vram_gmfn = vga_acc ? s->lfb_addr : VRAM_RESERVED_ADDRESS;
>          xen_vga_populate_vram(s->vram_gmfn, s->vram_size);
>      }
>      xen_vga_vram_map(s->vram_gmfn, s->vram_size);

Ah, so Stefano's patch actually got applied??  I thought Keir preferred
to stay with allocating video memory from hvmloader.

Note that I do not really care about which way we go, what's important
to keep in mind is that if we revert to qemu populating the video
memory, stubdom-based qemu can _not_ work with the default Xen
parameters, because of memory ballooning.

Samuel

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

* Re: [PATCH 1/2] ioemu: don't use magic number 0xff00000.
  2009-01-15 12:44 ` Samuel Thibault
@ 2009-01-15 12:48   ` Stefano Stabellini
  2009-01-15 12:53   ` Keir Fraser
  1 sibling, 0 replies; 4+ messages in thread
From: Stefano Stabellini @ 2009-01-15 12:48 UTC (permalink / raw)
  To: Samuel Thibault, Isaku Yamahata, xen-devel, xen-ia64-devel,
	ian.jackson

Samuel Thibault wrote:

> Ah, so Stefano's patch actually got applied??  I thought Keir preferred
> to stay with allocating video memory from hvmloader.
> 
> Note that I do not really care about which way we go, what's important
> to keep in mind is that if we revert to qemu populating the video
> memory, stubdom-based qemu can _not_ work with the default Xen
> parameters, because of memory ballooning.
> 

I am working on xend balloning to make it work safely with stubdoms.

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

* Re: [PATCH 1/2] ioemu: don't use magic number 0xff00000.
  2009-01-15 12:44 ` Samuel Thibault
  2009-01-15 12:48   ` Stefano Stabellini
@ 2009-01-15 12:53   ` Keir Fraser
  1 sibling, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2009-01-15 12:53 UTC (permalink / raw)
  To: Samuel Thibault, Isaku Yamahata
  Cc: xen-ia64-devel, xen-devel, ian.jackson, stefano.stabellini

On 15/01/2009 12:44, "Samuel Thibault" <samuel.thibault@ens-lyon.org> wrote:

> Ah, so Stefano's patch actually got applied??  I thought Keir preferred
> to stay with allocating video memory from hvmloader.
> 
> Note that I do not really care about which way we go, what's important
> to keep in mind is that if we revert to qemu populating the video
> memory, stubdom-based qemu can _not_ work with the default Xen
> parameters, because of memory ballooning.

I backpedalled and now think we should fix the auto-ballooner. Or disable it
if we enable stub domains by default.

 -- Keir

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

end of thread, other threads:[~2009-01-15 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 12:22 [PATCH 1/2] ioemu: don't use magic number 0xff00000 Isaku Yamahata
2009-01-15 12:44 ` Samuel Thibault
2009-01-15 12:48   ` Stefano Stabellini
2009-01-15 12:53   ` Keir Fraser

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.