All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Philipson <ross.philipson@citrix.com>
To: Matt Wilson <msw@amazon.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH (V9) 2/2] xen: Add V4V implementation
Date: Wed, 29 May 2013 15:28:45 -0400	[thread overview]
Message-ID: <51A656ED.4000509@citrix.com> (raw)
In-Reply-To: <20130529004354.GB13736@u109add4315675089e695.ant.amazon.com>

On 05/28/2013 08:43 PM, Matt Wilson wrote:
> On Tue, May 28, 2013 at 03:43:31PM -0400, Ross Philipson wrote:
>> Setup of v4v domains a domain gets created and cleanup
>> when a domain die. Wire up the v4v hypercall.
>>
>> Include v4v internal and public headers.
>>
>> Signed-off-by: Ross Philipson<ross.philipson@citrix.com>
>
> Would you consider making a boot-time option to disable v4v entirely?

I think that sounds reasonable since if you are not using it, it is 
consuming resources needlessly. I actually was thinking about this 
yesterday shortly after submitting the last patch set.

Thanks
Ross

>
>> --- a/xen/common/domain.c
>> +++ b/xen/common/domain.c
>> @@ -199,7 +199,8 @@ struct domain *domain_create(
>>   {
>>       struct domain *d, **pd;
>>       enum { INIT_xsm = 1u<<0, INIT_watchdog = 1u<<1, INIT_rangeset = 1u<<2,
>> -           INIT_evtchn = 1u<<3, INIT_gnttab = 1u<<4, INIT_arch = 1u<<5 };
>> +           INIT_evtchn = 1u<<3, INIT_gnttab = 1u<<4, INIT_arch = 1u<<5,
>> +           INIT_v4v = 1u<<6 };
>>       int err, init_status = 0;
>>       int poolid = CPUPOOLID_NONE;
>>
>> @@ -312,6 +313,13 @@ struct domain *domain_create(
>>           spin_unlock(&domlist_update_lock);
>>       }
>
> Perhaps an opt_v4v check here?
>
>> +    if ( !is_idle_domain(d) )
>> +    {
>> +        if ( (err = v4v_init(d)) != 0 )
>> +            goto fail;
>> +        init_status |= INIT_v4v;
>> +    }
>> +
>>       return d;
>>
>>    fail:
>
> [...]
>
>> new file mode 100644
>> index 0000000..701877d
>> --- /dev/null
>> +++ b/xen/common/v4v.c
>
> [...]
>
>> +/*
>> + * hypercall glue
>> + */
>> +long
>> +do_v4v_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg1,
>> +          XEN_GUEST_HANDLE_PARAM(void) arg2,
>> +          uint32_t arg3, uint32_t arg4)
>> +{
>> +    struct domain *d = current->domain;
>> +    long rc = -EFAULT;
>> +
>> +    v4v_dprintk("->do_v4v_op(%d,%p,%p,%d,%d)\n", cmd,
>> +                (void *)arg1.p, (void *)arg2.p, (int) arg3, (int) arg4);
>> +
>
> and check for d->v4v != NULL here, bailing with -ENOSYS?
>
>> +    domain_lock(d);
>> +    switch (cmd)
>> +    {
>> +    case V4VOP_register_ring:
>
> [...]
>
> --msw

  reply	other threads:[~2013-05-29 19:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 19:43 [PATCH (V9) 0/2] Add V4V to Xen Ross Philipson
2013-05-28 19:43 ` [PATCH (V9) 1/2] xen: events, exposes evtchn_alloc_unbound_domain Ross Philipson
2013-05-28 19:43 ` [PATCH (V9) 2/2] xen: Add V4V implementation Ross Philipson
2013-05-29  0:43   ` Matt Wilson
2013-05-29 19:28     ` Ross Philipson [this message]
2013-05-29  8:34   ` Jan Beulich
2013-05-29 19:26     ` Ross Philipson
2013-05-30  5:16       ` Jan Beulich
2013-05-29  9:56   ` Vincent Hanquez
2013-05-30 16:20   ` Tim Deegan
2013-06-04 18:01     ` Ross Philipson
2013-06-10 15:06   ` David Vrabel
2013-05-30 11:57 ` [PATCH (V9) 0/2] Add V4V to Xen Ian Campbell
2013-05-31  7:36   ` Vincent Hanquez
2013-05-31  7:50     ` Ian Campbell
2013-05-31  8:56       ` Vincent Hanquez
2013-05-31  9:01         ` Ian Campbell
2013-05-31  9:26           ` Vincent Hanquez
2013-05-31 16:29             ` Ross Philipson
2013-05-31 16:38               ` Ian Campbell
2013-05-30 12:07 ` Ian Campbell
2013-05-30 16:08   ` David Vrabel
2013-05-31  7:25     ` Vincent Hanquez
2013-05-31 10:21       ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51A656ED.4000509@citrix.com \
    --to=ross.philipson@citrix.com \
    --cc=msw@amazon.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.