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

Re: [Xen-devel] Grant access to more than one dom

On 05/08/2014 11:47 AM, Simon Martin wrote:
Hi Daniel.

I'll  carry on then. When I have it working and tested I'll send it to
you  so  you  can  have  a look. Once everyone is happy I'll see about
pushing it to a kernel maintainer.

After  being  sidetracked  into  other more boring projects I have now
almost  completed  this  change,  however  I  have some questions. I'm
pretty certain that I must be missing something here.

For  the  moment  I  am  only looking at gntalloc.c as it is the one I

In  the  add_grefs  function  you  create  a couple of list structures
(queue_gref  and queue_file) and then splice these onto the end of the
gref_list  and  gntalloc_file_private_data.list lists. However I'm not
really  sure  what  you  are  doing  here. Can you explain please. The
problems I see are:

1.- queue_gref  and queue_file are declared on the stack, however they
are  then  appended to the lists with no memory allocation whatsoever.
What are you expecting to happen here?

2.-  queue_gref   and queue_file are just list structs, i.e. they have
no  payload,  they  are not part of an encapsulating struct, so again,
what are you expecting to happen here?


The add_grefs function strings the allocated gntalloc_gref structures onto
two linked lists: the list heads are local, but are only used temporarily.
If the operation is successful, the list_splice_tail calls wire up the
linked lists to permanent structures on the heap; if unsuccessful, they
are used to clean up.

Daniel De Graaf
National Security Agency

Xen-devel mailing list



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