WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH][QEMU][IA64] Fix qemu memory access on IA64

To: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH][QEMU][IA64] Fix qemu memory access on IA64
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 21 Feb 2008 10:40:08 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 21 Feb 2008 02:40:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <7klk5etx5g.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ach0diB7XykkKOBpEdyH3gAX8io7RQ==
Thread-topic: [PATCH][QEMU][IA64] Fix qemu memory access on IA64
User-agent: Microsoft-Entourage/11.3.6.070618
Please apply it to the IA64 tree.

 -- Keir

On 21/2/08 10:35, "Kouya Shimura" <kouya@xxxxxxxxxxxxxx> wrote:

> Hi Keir,
> 
> This patch is for IA64:
> - correct a parameter to xc_map_foreign_batch(). skipping vga hole.
> - sync_icache() might overrun a page boundary. qemu-dm will die.
> 
> Thanks,
> Kouya
> 
> Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
> 
> diff -r f853c0497095 tools/ioemu/hw/xen_machine_fv.c
> --- a/tools/ioemu/hw/xen_machine_fv.c Tue Feb 19 11:14:40 2008 -0700
> +++ b/tools/ioemu/hw/xen_machine_fv.c Thu Feb 21 17:52:55 2008 +0900
> @@ -246,12 +246,18 @@ static void xen_init_fv(uint64_t ram_siz
>  
>      for (i = 0; i < nr_pages; i++)
>          page_array[i] = i;
> - 
> +
>      /* VTI will not use memory between 3G~4G, so we just pass a legal pfn
>         to make QEMU map continuous virtual memory space */
> -    if (ram_size > MMIO_START) { 
> +    if (ram_size > MMIO_START) {
>          for (i = 0 ; i < (MEM_G >> XC_PAGE_SHIFT); i++)
>              page_array[(MMIO_START >> XC_PAGE_SHIFT) + i] =
> +                (STORE_PAGE_START >> XC_PAGE_SHIFT);
> +    }
> +    /* skipping VGA hole, same as above */
> +    if (ram_size > VGA_IO_START) {
> +        for (i = 0 ; i < (VGA_IO_SIZE >> XC_PAGE_SHIFT); i++)
> +            page_array[(VGA_IO_START >> XC_PAGE_SHIFT) + i] =
>                  (STORE_PAGE_START >> XC_PAGE_SHIFT);
>      }
>  
> diff -r f853c0497095 tools/ioemu/target-i386-dm/exec-dm.c
> --- a/tools/ioemu/target-i386-dm/exec-dm.c Tue Feb 19 11:14:40 2008 -0700
> +++ b/tools/ioemu/target-i386-dm/exec-dm.c Thu Feb 21 19:36:20 2008 +0900
> @@ -350,12 +350,13 @@ CPUReadMemoryFunc **cpu_get_io_memory_re
>   * So to emulate right behavior that guest OS is assumed, we need to flush
>   * I/D cache here.
>   */
> -static void sync_icache(unsigned long address, int len)
> -{
> -    int l;
> -
> -    for(l = 0; l < (len + 32); l += 32)
> -        __ia64_fc(address + l);
> +static void sync_icache(uint8_t *address, int len)
> +{
> +    unsigned long addr = (unsigned long)address;
> +    unsigned long end = addr + len;
> +
> +    for (addr &= ~(32UL-1); addr < end; addr += 32UL)
> +        __ia64_fc(addr);
>  
>      ia64_sync_i();
>      ia64_srlz_i();



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

<Prev in Thread] Current Thread [Next in Thread>