All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Ian.Jackson@eu.citrix.com, jeremy@goop.org,
	xen-devel@lists.xensource.com, keir@xen.org
Subject: Re: [PATCH 2/2] xen/gnt{dev, alloc}: reserve event channels for notify
Date: Tue, 25 Oct 2011 15:51:56 -0400	[thread overview]
Message-ID: <20111025195156.GC13644@phenom.dumpdata.com> (raw)
In-Reply-To: <4EA710EB.3030809@tycho.nsa.gov>

> That same SELinux category-based isolation mechanism is also a good solution for xen
> qemu-dm processes, although moving qemu to a stubdom provides better isolation since
> SELinux currently cannot talk to XSM to determine what domains a particular qemu-dm 
> process should be able to manipulate.

<nods>
> 
> Only allowing event channels allocated by userspace to be used in gnt* notify is
> a good idea, since there's no reason for userspace to need to manipulate an event
> channel set up by the kernel.
> 
.. snip..
> > 
> > How would that work when the IRQ subsystem (so everything is setup in the kernel)
> > gets an event? Would the refcount be for that -1.. oh. You would only set
> > the refcnt when the _get/_put calls are made and not when in-kernel calls to setup
> > IRQs are done?
> > 
> 
> Right. The reference count would be a dual-purpose field indicating if the event
> channel is kernel-internal (value -1) or userspace-visible (reference count > 0).
> New event channels would start out at -1, and evtchn.c would change them to 1.

The tricky bit is going to be with the xen_free_irq which might have to deal with kernel
events and grantdev events... oh wait, the event_put is going to decrement it and then
call xen_free_irq, so that will come out to be the right number.

Looking forward to the patches! Thanks for doing this work.

  reply	other threads:[~2011-10-25 19:51 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16 21:14 [PATCH 0/2] Add reference counting to grant notify ioctls Daniel De Graaf
2011-09-16 21:14 ` [PATCH 1/2] xen/event: Add reference counting to event channel Daniel De Graaf
2011-09-17  4:50   ` Jeremy Fitzhardinge
2011-09-17  6:11     ` Keir Fraser
2011-09-19 15:50     ` Daniel De Graaf
2011-09-19 16:22       ` Jeremy Fitzhardinge
2011-09-19 17:53         ` Daniel De Graaf
2011-09-16 21:14 ` [PATCH 2/2] xen/gnt{dev, alloc}: reserve event channels for notify Daniel De Graaf
2011-10-18 21:04 ` [PATCH v2 0/2] Add reference counting to grant notify ioctls Daniel De Graaf
2011-10-18 21:04   ` [PATCH 1/2] xen/event: Add reference counting to event channel Daniel De Graaf
2011-10-19  9:20     ` Ian Campbell
2011-10-24 20:22     ` Konrad Rzeszutek Wilk
2011-10-24 22:20       ` Daniel De Graaf
2011-10-25 19:05         ` Konrad Rzeszutek Wilk
2011-10-25  8:17       ` Ian Campbell
2011-10-25 19:09         ` Konrad Rzeszutek Wilk
2011-10-25 20:44           ` Ian Campbell
2011-10-18 21:04   ` [PATCH 2/2] xen/gnt{dev, alloc}: reserve event channels for notify Daniel De Graaf
2011-10-19  9:24     ` Ian Campbell
2011-10-19 14:23       ` Daniel De Graaf
2011-10-19 14:45         ` [PATCH 2/2] xen/gnt{dev,alloc}: " Ian Campbell
2011-10-24 20:57     ` [PATCH 2/2] xen/gnt{dev, alloc}: " Konrad Rzeszutek Wilk
2011-10-24 22:01       ` Daniel De Graaf
2011-10-25 19:02         ` Konrad Rzeszutek Wilk
2011-10-25 19:41           ` Daniel De Graaf
2011-10-25 19:51             ` Konrad Rzeszutek Wilk [this message]
2011-10-25 20:27             ` Ian Campbell
2011-10-25 20:42               ` Daniel De Graaf
2011-10-25 20:50                 ` Ian Campbell
2011-10-25 21:07                   ` Daniel De Graaf
2011-10-26 15:47 ` [PATCH v3 0/3] Add reference counting to grant notify ioctls Daniel De Graaf
2011-10-26 15:47   ` [PATCH 1/3] xen/event: Add reference counting to event channels Daniel De Graaf
2011-10-26 16:51     ` Ian Campbell
2011-10-26 16:57       ` Ian Campbell
2011-10-26 17:28       ` Daniel De Graaf
2011-10-27  9:03         ` Ian Campbell
2011-10-26 18:42     ` [PATCH 1/3 v3.2] " Daniel De Graaf
2011-10-26 15:47   ` [PATCH 2/3] xen/gntalloc: Change gref_lock to a mutex Daniel De Graaf
2011-10-26 15:47   ` [PATCH 3/3] xen/gnt{dev, alloc}: reserve event channels for notify Daniel De Graaf
2011-10-27 21:58 ` [PATCH v4 0/3] Add reference counting to grant notify ioctls Daniel De Graaf
2011-10-27 21:58   ` [PATCH 1/3] xen/event: Add reference counting to event channels Daniel De Graaf
2011-10-27 21:58   ` [PATCH 2/3] xen/gntalloc: Change gref_lock to a mutex Daniel De Graaf
2011-10-27 21:58   ` [PATCH 3/3] xen/gnt{dev, alloc}: reserve event channels for notify Daniel De Graaf
2011-11-11 20:33   ` [PATCH v4 0/3] Add reference counting to grant notify ioctls Konrad Rzeszutek Wilk

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=20111025195156.GC13644@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=jeremy@goop.org \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /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.