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

Re: [Xen-devel] [PVH]: Help: msi.c



>>> On 08.12.12 at 02:46, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> The second is msi.c. I don't understand it very well, and need to
> figure what to do for PVH. Would appreciate suggestions if anyone knows.

Why do you think you need to do something specially for PVH here
in the first place? The only adjustment I would expect might be
needed is address translation (depending on how PVH deal with
MMIO addresses).

In any case is checking the domain ID here pointless - this code
can only be run in the context of Dom0 anyway.

What the code here does is protect the MSI-X table of a device
from Dom0 write accesses - Xen itself needs to be able to fully
control the mask bits, and hence Dom0 shouldn't (and qemu, even
if running in Dom0) mustn't write to it (which was happening in the
past).

Jan

> --- a/xen/arch/x86/msi.c      Thu Nov 01 16:53:31 2012 -0700
> +++ b/xen/arch/x86/msi.c      Fri Dec 07 17:45:07 2012 -0800
> @@ -766,6 +766,9 @@ static int msix_capability_init(struct p
>          WARN_ON(rangeset_overlaps_range(mmio_ro_ranges, dev->msix_pba.first,
>                                          dev->msix_pba.last));
>  
> +/* PVH: fixme: not a clue what to do here :) */
> +if (is_pvh_domain(dev->domain) && dev->domain->domain_id != 0)
> +{
>          if ( rangeset_add_range(mmio_ro_ranges, dev->msix_table.first,
>                                  dev->msix_table.last) )
>              WARN();
> @@ -793,6 +796,7 @@ static int msix_capability_init(struct p
>                  /* XXX How to deal with existing mappings? */
>              }
>          }
> +}
>      }
>      WARN_ON(dev->msix_nr_entries != nr_entries);
>      WARN_ON(dev->msix_table.first != (table_paddr >> PAGE_SHIFT));




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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