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

[Xen-ia64-devel] Re: xencomm porting and "inline" handles

Le Jeudi 28 Septembre 2006 17:07, Hollis Blanchard a écrit :
> On Thu, 2006-09-28 at 08:27 +0200, Tristan Gingold wrote:
> > Le Mercredi 27 Septembre 2006 17:10, Hollis Blanchard a écrit :
> > > On Wed, 2006-09-27 at 08:19 +0200, Tristan Gingold wrote:
> > > > Le Mardi 26 Septembre 2006 20:23, Hollis Blanchard a écrit :
> > > > > On Tue, 2006-09-26 at 10:04 +0200, Tristan Gingold wrote:
> > > > > > After more work, inline xencomm is not that magic: it doesn't
> > > > > > work for modules which are loaded in virtual memory.  So I have
> > > > > > to use mini xencomm at least for modules.
> > > > >
> > > > > What's the problem with modules? Their text/data isn't physically
> > > > > contiguous, but where exactly is the problem?
> > > >
> > > > Inline xencomm only works for physically contiguous area because only
> > > > the base address is passed.  Therefore it doesn't work for modules.
> > >
> > > I understand that; please explain exactly what about the modules isn't
> > > working.
> > >
> > > For example, the stack used in kernel modules is still physically
> > > contiguous, so using stack-allocated data structures should work fine.
> > > However, making hypercalls directly using global data structures
> > > wouldn't work. However, the "inline" code is only being used for the
> > > hypercalls that could be made early. Is that the problem? Please
> > > identify the specific issue(s).
> >
> > Yes, some hypercalls data are global data.
> > Sorry, I was not specific enough!
>
> Hi Tristan, *which* hypercalls? Please identify some specific lines of
> code that are causing the problems...
This issue was at least hit in drivers/xen/netback/netback.c:

static void net_rx_action(unsigned long unused)
{
        netif_t *netif = NULL;
        s8 status;
        u16 id, irq, flags;
        netif_rx_response_t *resp;
        multicall_entry_t *mcl;
        struct sk_buff_head rxq;
        struct sk_buff *skb;
        int notify_nr = 0;
        int ret;
        int nr_frags;
        int count;
        unsigned long offset;

        /*
         * Putting hundreds of bytes on the stack is considered rude.
         * Static works because a tasklet can only be on one CPU at any time.
         */
        static multicall_entry_t rx_mcl[NET_RX_RING_SIZE+3];
        static mmu_update_t rx_mmu[NET_RX_RING_SIZE];
        static gnttab_transfer_t grant_trans_op[NET_RX_RING_SIZE];
        static gnttab_copy_t grant_copy_op[NET_RX_RING_SIZE];
        static unsigned char rx_notify[NR_IRQS];
        static u16 notify_list[NET_RX_RING_SIZE];
        static struct netbk_rx_meta meta[NET_RX_RING_SIZE];

Lot's of hypercall parameters in module data segment!

Tristan.

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

<Prev in Thread] Current Thread [Next in Thread>