[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-ia64-devel][PATCH][VTD] add hypercalls needed for VTD


  • To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
  • From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
  • Date: Tue, 21 Oct 2008 18:36:35 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 21 Oct 2008 03:36:44 -0700
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AckzYbozESgi8yQrQdKSjfjCwu6nMAABtqcA
  • Thread-topic: [Xen-ia64-devel][PATCH][VTD] add hypercalls needed for VTD

Updated one per your comments

Thanks,
Anthony

Isaku Yamahata wrote:
> On Tue, Oct 21, 2008 at 05:05:51PM +0800, Xu, Anthony wrote:
>> Add hypercalls needed for VTD
>>
>> Signed-off-by; Anthony Xu < anthony.xu@xxxxxxxxx >
>
>
>> 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,

Attachment: hypercall_for_vtd2.patch
Description: hypercall_for_vtd2.patch

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.