From: Jacob Gorm Hansen <jacobg@diku.dk>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: xen-devel <xen-devel@lists.sourceforge.net>
Subject: Re: To use xcs or not?
Date: Sun, 20 Feb 2005 22:23:53 -0800 [thread overview]
Message-ID: <42197E79.6030504@diku.dk> (raw)
In-Reply-To: <42196BC8.7000008@codemonkey.ws>
Anthony Liguori wrote:
> Jacob Gorm Hansen wrote:
>
>> OK, I actually got the impression that using XCS was the easiest way
>> around the problem, as you seem to need a lot of code for setting up
>> your own channel (which I can copy-paste from somewhere I am sure).
>
>
> For just using notify, it's quite simply. The control channels are
> complicated because of the ring queue stuff. If you were implementing
> this as a virtual device in vm-tools (of course, I'm not bias ;-)), all
> you would do is open /dev/evtchn and add that to the set of listener fds
> (see the console device for an example of this).
>
> You would also need to allocate a port for notifications (vmm_alloc_port
> in vm-tools or xc_evtchn_bind_interdomain otherwise). The easiest thing
> to do would be to use a well known endpoint (anything above 10 should be
> relatively safe for now although you'll probably need to negotiate it in
> the future).
>
Right now, in my domU driver I have:
gfx_irq = bind_evtchn_to_irq(117);
printk("got irq %d\n", gfx_irq);
request_irq(gfx_irq, gfx_interrupt, SA_SAMPLE_RANDOM, "gfx", 0);
/which should get me interrupts when channel 117 gets notified, right?
> When you get a read event on /dev/evtchn, all you do is read a 2 byte
> value from it. This will be the port the event happened on. You'll
> also have to unmask the event by writing that same value back to the
> device.
>
>> Can I setup my own event channel in the guest, and still access it
>> using /dev/evtchn in dom0?
Hmm from looking at the code in drivers/xen/evtchn/evtchn.c, it seems if
I write to this device, I can unmask local event channels, but there is
no notion of a target domain.
If I want to notify eventchannel #117 in, say, domain 5, how can I do
that from dom0 using /dev/xen/evtchn?
Thanks,
Jacob
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
next prev parent reply other threads:[~2005-02-21 6:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-20 8:48 To use xcs or not? Jacob Gorm Hansen
2005-02-20 17:04 ` Anthony Liguori
2005-02-21 3:12 ` Jacob Gorm Hansen
2005-02-21 5:04 ` Anthony Liguori
2005-02-21 6:23 ` Jacob Gorm Hansen [this message]
2005-02-21 6:31 ` Anthony Liguori
2005-02-21 6:42 ` Jacob Gorm Hansen
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=42197E79.6030504@diku.dk \
--to=jacobg@diku.dk \
--cc=anthony@codemonkey.ws \
--cc=xen-devel@lists.sourceforge.net \
/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.