From: Avi Kivity <avi@redhat.com>
To: Cam Macdonell <cam@cs.ualberta.ca>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] Inter-VM shared memory PCI device
Date: Tue, 09 Mar 2010 19:28:01 +0200 [thread overview]
Message-ID: <4B968521.7000208@redhat.com> (raw)
In-Reply-To: <8286e4ee1003090727j1d45e5dq3bc5d2ae89c354c@mail.gmail.com>
On 03/09/2010 05:27 PM, Cam Macdonell wrote:
>
>>
>>> Registers are used
>>> for synchronization between guests sharing the same memory object when
>>> interrupts are supported (this requires using the shared memory server).
>>>
>>>
>> How does the driver detect whether interrupts are supported or not?
>>
> At the moment, the VM ID is set to -1 if interrupts aren't supported,
> but that may not be the clearest way to do things. With UIO is there
> a way to detect if the interrupt pin is on?
>
I suggest not designing the device to uio. Make it a good
guest-independent device, and if uio doesn't fit it, change it.
Why not support interrupts unconditionally? Is the device useful
without interrupts?
>>> The Doorbell register is 16-bits, but is treated as two 8-bit values. The
>>> upper 8-bits are used for the destination VM ID. The lower 8-bits are the
>>> value which will be written to the destination VM and what the guest
>>> status
>>> register will be set to when the interrupt is trigger is the destination
>>> guest.
>>>
>>>
>> What happens when two interrupts are sent back-to-back to the same guest?
>> Will the first status value be lost?
>>
> Right now, it would be. I believe that eventfd has a counting
> semaphore option, that could prevent loss of status (but limits what
> the status could be).
>
It only counts the number of interrupts (and kvm will coalesce them anyway).
> My understanding of uio_pci interrupt handling
> is fairly new, but we could have the uio driver store the interrupt
> statuses to avoid losing them.
>
There's nowhere to store them if we use ioeventfd/irqfd. I think it's
both easier and more efficient to leave this to the application (to
store into shared memory).
--
error compiling committee.c: too many arguments to function
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Cam Macdonell <cam@cs.ualberta.ca>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] Re: [PATCH] Inter-VM shared memory PCI device
Date: Tue, 09 Mar 2010 19:28:01 +0200 [thread overview]
Message-ID: <4B968521.7000208@redhat.com> (raw)
In-Reply-To: <8286e4ee1003090727j1d45e5dq3bc5d2ae89c354c@mail.gmail.com>
On 03/09/2010 05:27 PM, Cam Macdonell wrote:
>
>>
>>> Registers are used
>>> for synchronization between guests sharing the same memory object when
>>> interrupts are supported (this requires using the shared memory server).
>>>
>>>
>> How does the driver detect whether interrupts are supported or not?
>>
> At the moment, the VM ID is set to -1 if interrupts aren't supported,
> but that may not be the clearest way to do things. With UIO is there
> a way to detect if the interrupt pin is on?
>
I suggest not designing the device to uio. Make it a good
guest-independent device, and if uio doesn't fit it, change it.
Why not support interrupts unconditionally? Is the device useful
without interrupts?
>>> The Doorbell register is 16-bits, but is treated as two 8-bit values. The
>>> upper 8-bits are used for the destination VM ID. The lower 8-bits are the
>>> value which will be written to the destination VM and what the guest
>>> status
>>> register will be set to when the interrupt is trigger is the destination
>>> guest.
>>>
>>>
>> What happens when two interrupts are sent back-to-back to the same guest?
>> Will the first status value be lost?
>>
> Right now, it would be. I believe that eventfd has a counting
> semaphore option, that could prevent loss of status (but limits what
> the status could be).
>
It only counts the number of interrupts (and kvm will coalesce them anyway).
> My understanding of uio_pci interrupt handling
> is fairly new, but we could have the uio driver store the interrupt
> statuses to avoid losing them.
>
There's nowhere to store them if we use ioeventfd/irqfd. I think it's
both easier and more efficient to leave this to the application (to
store into shared memory).
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-03-09 17:28 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 23:52 [PATCH] Support adding a file to qemu's ram allocation Cam Macdonell
2010-03-05 23:52 ` [Qemu-devel] " Cam Macdonell
2010-03-05 23:52 ` [PATCH] Inter-VM shared memory PCI device Cam Macdonell
2010-03-05 23:52 ` [Qemu-devel] " Cam Macdonell
2010-03-07 22:53 ` Paul Brook
2010-03-08 1:45 ` Jamie Lokier
2010-03-08 1:45 ` Jamie Lokier
2010-03-08 9:48 ` Alexander Graf
2010-03-08 9:48 ` Alexander Graf
2010-03-08 9:54 ` Jamie Lokier
2010-03-08 9:54 ` Jamie Lokier
2010-03-08 10:57 ` Alexander Graf
2010-03-08 10:57 ` Alexander Graf
2010-03-09 21:41 ` Anthony Liguori
2010-03-09 21:41 ` Anthony Liguori
2010-03-08 13:04 ` Paul Brook
2010-03-08 13:04 ` Paul Brook
2010-03-09 19:00 ` Jamie Lokier
2010-03-09 19:00 ` Jamie Lokier
2010-03-08 9:52 ` Avi Kivity
2010-03-08 9:52 ` Avi Kivity
2010-03-08 13:03 ` Paul Brook
2010-03-08 13:03 ` Paul Brook
2010-03-08 13:16 ` Avi Kivity
2010-03-08 13:16 ` Avi Kivity
2010-03-09 20:11 ` Jamie Lokier
2010-03-09 20:11 ` Jamie Lokier
2010-03-09 21:44 ` Anthony Liguori
2010-03-09 21:44 ` [Qemu-devel] " Anthony Liguori
2010-03-10 9:25 ` Avi Kivity
2010-03-10 9:25 ` [Qemu-devel] " Avi Kivity
2010-03-10 17:13 ` Anthony Liguori
2010-03-10 17:13 ` Anthony Liguori
2010-03-10 17:30 ` Avi Kivity
2010-03-10 17:30 ` Avi Kivity
2010-03-10 17:41 ` Paul Brook
2010-03-10 17:41 ` Paul Brook
2010-03-11 6:33 ` Avi Kivity
2010-03-11 6:33 ` Avi Kivity
2010-03-11 12:21 ` Paul Brook
2010-03-11 12:21 ` Paul Brook
2010-03-09 20:12 ` Jamie Lokier
2010-03-09 20:12 ` Jamie Lokier
2010-03-10 0:03 ` Paul Brook
2010-03-10 0:03 ` Paul Brook
2010-03-10 4:38 ` Cam Macdonell
2010-03-10 4:38 ` [Qemu-devel] " Cam Macdonell
2010-03-10 9:29 ` Avi Kivity
2010-03-10 9:29 ` [Qemu-devel] " Avi Kivity
2010-03-10 11:13 ` Paul Brook
2010-03-10 11:13 ` Paul Brook
2010-03-11 3:10 ` Jamie Lokier
2010-03-11 3:10 ` Jamie Lokier
2010-03-11 4:37 ` Nick Piggin
2010-03-11 4:37 ` Nick Piggin
2010-03-11 14:38 ` malc
2010-03-11 14:38 ` [Qemu-devel] " malc
2010-03-08 9:56 ` Avi Kivity
2010-03-08 9:56 ` [Qemu-devel] " Avi Kivity
2010-03-08 17:57 ` Cam Macdonell
2010-03-08 17:57 ` [Qemu-devel] " Cam Macdonell
2010-03-09 10:29 ` Avi Kivity
2010-03-09 10:29 ` [Qemu-devel] " Avi Kivity
[not found] ` <8286e4ee1003090724m1ef0b571g8b705a24e36e1753@mail.gmail.com>
2010-03-09 15:27 ` Cam Macdonell
2010-03-09 15:27 ` [Qemu-devel] " Cam Macdonell
2010-03-09 17:28 ` Avi Kivity [this message]
2010-03-09 17:28 ` [Qemu-devel] " Avi Kivity
2010-03-09 17:34 ` Anthony Liguori
2010-03-09 17:34 ` [Qemu-devel] " Anthony Liguori
2010-03-09 18:34 ` Cam Macdonell
2010-03-09 18:34 ` [Qemu-devel] " Cam Macdonell
2010-03-10 9:21 ` Avi Kivity
2010-03-10 9:21 ` [Qemu-devel] " Avi Kivity
2010-03-10 16:36 ` Cam Macdonell
2010-03-10 16:36 ` [Qemu-devel] " Cam Macdonell
2010-03-11 6:49 ` Avi Kivity
2010-03-11 6:49 ` [Qemu-devel] " Avi Kivity
2010-03-09 12:49 ` Arnd Bergmann
2010-03-09 12:49 ` [Qemu-devel] " Arnd Bergmann
2010-03-09 13:03 ` Avi Kivity
2010-03-09 13:03 ` [Qemu-devel] " Avi Kivity
2010-03-09 16:44 ` Cam Macdonell
2010-03-09 16:44 ` [Qemu-devel] " Cam Macdonell
2010-03-10 14:04 ` Arnd Bergmann
2010-03-10 14:04 ` [Qemu-devel] " Arnd Bergmann
2010-03-11 6:50 ` Avi Kivity
2010-03-11 6:50 ` [Qemu-devel] " Avi Kivity
2010-03-11 12:57 ` Arnd Bergmann
2010-03-11 12:57 ` [Qemu-devel] " Arnd Bergmann
2010-03-11 13:07 ` Avi Kivity
2010-03-11 13:07 ` [Qemu-devel] " Avi Kivity
2010-03-11 14:32 ` Arnd Bergmann
2010-03-11 14:32 ` [Qemu-devel] " Arnd Bergmann
2010-03-08 9:53 ` [PATCH] Support adding a file to qemu's ram allocation Avi Kivity
2010-03-08 9:53 ` [Qemu-devel] " Avi Kivity
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=4B968521.7000208@redhat.com \
--to=avi@redhat.com \
--cc=cam@cs.ualberta.ca \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.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.