On Tue, Oct 21, 2008 at 05:05:51PM +0800, Xu, Anthony wrote:
> Add hypercalls needed for VTD
> 
> Signed-off-by; Anthony Xu < [EMAIL PROTECTED] >


> diff -r 3b1ff707d130 -r 55251ad3e262 xen/arch/ia64/xen/hypercall.c
> --- a/xen/arch/ia64/xen/hypercall.c   Tue Oct 21 10:41:54 2008 +0800
> +++ b/xen/arch/ia64/xen/hypercall.c   Tue Oct 21 14:12:29 2008 +0800
> @@ -35,6 +35,7 @@
>  #include <public/arch-ia64/debug_op.h>
>  #include <asm/sioemu.h>
>  #include <public/arch-ia64/sioemu.h>
> +#include <xen/pci.h>
>  
>  static IA64FAULT
>  xen_hypercall (struct pt_regs *regs)
> @@ -313,6 +314,22 @@
>  iosapic_guest_write(
>      unsigned long physbase, unsigned int reg, u32 pval);
>  
> +
> +/*
> + * XXX We don't support MSI for PCI passthrough, so just return success
> + */
> +static int physdev_map_pirq(struct physdev_map_pirq *map)
> +{
> +     return 0;
> +}
> +
> +static int physdev_unmap_pirq(struct physdev_unmap_pirq *unmap)
> +{
> +     return 0;
> +}
> +     
> +
> +
>  long do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
>  {
>      int irq;

-ENOSYS?
Or is other code confused with -ENOSYS?


> diff -r 3b1ff707d130 -r 55251ad3e262 xen/arch/ia64/xen/mm.c
> --- a/xen/arch/ia64/xen/mm.c  Tue Oct 21 10:41:54 2008 +0800
> +++ b/xen/arch/ia64/xen/mm.c  Tue Oct 21 14:12:29 2008 +0800
> @@ -1456,12 +1456,38 @@
>          BUG_ON(mfn != pte_pfn(ret_pte));
>      }
>  
> +    perfc_incr(zap_domain_page_one);
> +    if(!mfn_valid(mfn))
> +        return;
> +
>      page = mfn_to_page(mfn);
>      BUG_ON((page->count_info & PGC_count_mask) == 0);
>  
>      BUG_ON(clear_PGC_allocate && (page_get_owner(page) == NULL));
>      domain_put_page(d, mpaddr, pte, old_pte, clear_PGC_allocate);
> -    perfc_incr(zap_domain_page_one);
> +}

The BUG_ON() above this hunk should be updated too.
something like
-        BUG_ON(page_get_owner(mfn_to_page(mfn)) != d &&
-               page_get_owner(mfn_to_page(mfn)) != NULL);
+        BUG_ON(mfn_valid(mfn) &&
+               page_get_owner(mfn_to_page(mfn)) != d &&
+               page_get_owner(mfn_to_page(mfn)) != NULL);


thanks,
-- 
yamahata

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

Reply via email to