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-ia64-devel

RE: [Xen-ia64-devel] [PATCH] [RESEND] SetVirtualAddressMap emulationsupp

To: "Masaki Kanno" <kanno.masaki@xxxxxxxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] [PATCH] [RESEND] SetVirtualAddressMap emulationsupport
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Mon, 8 May 2006 10:37:18 +0800
Delivery-date: Sun, 07 May 2006 19:38:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZtBwvNCSKjFyuIS86+1O7BUXbyZgFPJ3Lw
Thread-topic: [Xen-ia64-devel] [PATCH] [RESEND] SetVirtualAddressMap emulationsupport
>From:Masaki Kanno
>Sent: 2006年5月1日 18:06
>Hi,
>
>I reflected comment for this patch.
>I confirmed that GetTime(), ResetSystem() and SetVirtualAddressMap()
>emulation worked.
>
>Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
>
>Best regards,
> Kan

Hi, Kan,
        Good work and small comments here:

- It's more natural to have errno as return value with meaningful result 
passed by pointer, say:
+static unsigned long
+efi_translate_domain_addr(unsigned long domain_addr, IA64FAULT 
*fault)
Better as:
Static IA64FAULT efi_translate_domain_addr(unsigned long 
domain_addr, unsigned long *addr)

- +             if (copy_from_user(&entry, p, sizeof(efi_memory_desc_t))) {
+                       printf ("efi_emulate_set_virtual_address_map: 
copy_from_user() fault. addr=0x%p\n", p);
+                       return EFI_UNSUPPORTED;
+               }
+
+               md = p;

Seems you may want to use &entry here instead of continuing reference 
to guest pointer. :-)

Thanks,
Kevin

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