Re: Mask bit support's API

2010-12-02 Thread Avi Kivity
On 12/01/2010 04:36 AM, Yang, Sheng wrote: On Tuesday 30 November 2010 22:15:29 Avi Kivity wrote: On 11/26/2010 04:35 AM, Yang, Sheng wrote: Shouldn't kvm also service reads from the pending bitmask? Of course KVM should service reading from pending bitmask. For

Re: Mask bit support's API

2010-12-02 Thread Michael S. Tsirkin
On Thu, Dec 02, 2010 at 03:09:43PM +0200, Avi Kivity wrote: On 12/01/2010 04:36 AM, Yang, Sheng wrote: On Tuesday 30 November 2010 22:15:29 Avi Kivity wrote: On 11/26/2010 04:35 AM, Yang, Sheng wrote: Shouldn't kvm also service reads from the pending bitmask? Of

Re: Mask bit support's API

2010-12-02 Thread Avi Kivity
On 12/02/2010 03:47 PM, Michael S. Tsirkin wrote: Which case? the readl() doesn't need access to the routing table, just the entry. One thing that read should do is flush in the outstanding interrupts and flush out the mask bit writes. The mask bit writes are synchronous. wrt

Re: Mask bit support's API

2010-12-02 Thread Michael S. Tsirkin
On Thu, Dec 02, 2010 at 03:56:52PM +0200, Avi Kivity wrote: On 12/02/2010 03:47 PM, Michael S. Tsirkin wrote: Which case? the readl() doesn't need access to the routing table, just the entry. One thing that read should do is flush in the outstanding interrupts and flush out the mask

Re: Mask bit support's API

2010-12-02 Thread Sheng Yang
On Thu, Dec 2, 2010 at 10:26 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 02, 2010 at 03:56:52PM +0200, Avi Kivity wrote: On 12/02/2010 03:47 PM, Michael S. Tsirkin wrote:  Which case?  the readl() doesn't need access to the routing table,  just the entry. One thing that

Re: Mask bit support's API

2010-12-02 Thread Michael S. Tsirkin
On Thu, Dec 02, 2010 at 10:54:24PM +0800, Sheng Yang wrote: On Thu, Dec 2, 2010 at 10:26 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 02, 2010 at 03:56:52PM +0200, Avi Kivity wrote: On 12/02/2010 03:47 PM, Michael S. Tsirkin wrote:  Which case?  the readl() doesn't need

Re: Mask bit support's API

2010-12-02 Thread Yang, Sheng
On Friday 03 December 2010 00:55:03 Michael S. Tsirkin wrote: On Thu, Dec 02, 2010 at 10:54:24PM +0800, Sheng Yang wrote: On Thu, Dec 2, 2010 at 10:26 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 02, 2010 at 03:56:52PM +0200, Avi Kivity wrote: On 12/02/2010 03:47 PM, Michael

Re: Mask bit support's API

2010-11-30 Thread Yang, Sheng
On Tuesday 30 November 2010 22:15:29 Avi Kivity wrote: On 11/26/2010 04:35 AM, Yang, Sheng wrote: Shouldn't kvm also service reads from the pending bitmask? Of course KVM should service reading from pending bitmask. For assigned device, it's kernel who would set the pending

Re: Mask bit support's API

2010-11-25 Thread Yang, Sheng
On Wednesday 24 November 2010 09:59:23 Yang, Sheng wrote: On Tuesday 23 November 2010 22:06:20 Avi Kivity wrote: On 11/23/2010 03:57 PM, Yang, Sheng wrote: Yeah, but won't be included in this patchset. What API changes are needed? I'd like to see the complete API. I am

Re: Mask bit support's API

2010-11-23 Thread Yang, Sheng
On Tuesday 23 November 2010 15:54:40 Avi Kivity wrote: On 11/23/2010 08:35 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 14:17:28 Avi Kivity wrote: On 11/23/2010 08:09 AM, Yang, Sheng wrote: Hi Avi, I've purposed the following API for mask bit support.

Re: Mask bit support's API

2010-11-23 Thread Michael S. Tsirkin
On Tue, Nov 23, 2010 at 02:09:52PM +0800, Yang, Sheng wrote: Hi Avi, I've purposed the following API for mask bit support. The main point is, QEmu can know which entries are enabled(by pci_enable_msix()). Unfortunately, it can't I think, unless all your guests are linux. enabled entries

Re: Mask bit support's API

2010-11-23 Thread Avi Kivity
On 11/23/2010 10:30 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 15:54:40 Avi Kivity wrote: On 11/23/2010 08:35 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 14:17:28 Avi Kivity wrote: On 11/23/2010 08:09 AM, Yang, Sheng wrote: Hi Avi, I've

Re: Mask bit support's API

2010-11-23 Thread Michael S. Tsirkin
On Tue, Nov 23, 2010 at 02:47:33PM +0200, Avi Kivity wrote: On 11/23/2010 10:30 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 15:54:40 Avi Kivity wrote: On 11/23/2010 08:35 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 14:17:28 Avi Kivity wrote: On 11/23/2010 08:09 AM,

Re: Mask bit support's API

2010-11-23 Thread Yang, Sheng
On Tuesday 23 November 2010 20:47:33 Avi Kivity wrote: On 11/23/2010 10:30 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 15:54:40 Avi Kivity wrote: On 11/23/2010 08:35 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 14:17:28 Avi Kivity wrote: On 11/23/2010 08:09 AM,

Re: Mask bit support's API

2010-11-23 Thread Yang, Sheng
On Tuesday 23 November 2010 20:04:16 Michael S. Tsirkin wrote: On Tue, Nov 23, 2010 at 02:09:52PM +0800, Yang, Sheng wrote: Hi Avi, I've purposed the following API for mask bit support. The main point is, QEmu can know which entries are enabled(by pci_enable_msix()).

Re: Mask bit support's API

2010-11-23 Thread Avi Kivity
On 11/23/2010 03:57 PM, Yang, Sheng wrote: Yeah, but won't be included in this patchset. What API changes are needed? I'd like to see the complete API. I am not sure about it. But I suppose the structure should be the same? In fact it's pretty hard for me to image what's needed for

Re: Mask bit support's API

2010-11-23 Thread Michael S. Tsirkin
On Tue, Nov 23, 2010 at 04:06:20PM +0200, Avi Kivity wrote: So instead of - guest reads/writes msix - kvm filters mmio, implements some, passes others to userspace we have - guest reads/writes msix - kvm implements all - some writes generate an additional notification

Re: Mask bit support's API

2010-11-23 Thread Gleb Natapov
On Tue, Nov 23, 2010 at 05:11:19PM +0200, Michael S. Tsirkin wrote: On Tue, Nov 23, 2010 at 04:06:20PM +0200, Avi Kivity wrote: So instead of - guest reads/writes msix - kvm filters mmio, implements some, passes others to userspace we have - guest reads/writes msix

Re: Mask bit support's API

2010-11-23 Thread Michael S. Tsirkin
On Tue, Nov 23, 2010 at 05:24:44PM +0200, Gleb Natapov wrote: On Tue, Nov 23, 2010 at 05:11:19PM +0200, Michael S. Tsirkin wrote: On Tue, Nov 23, 2010 at 04:06:20PM +0200, Avi Kivity wrote: So instead of - guest reads/writes msix - kvm filters mmio, implements some,

Re: Mask bit support's API

2010-11-23 Thread Yang, Sheng
On Tuesday 23 November 2010 22:06:20 Avi Kivity wrote: On 11/23/2010 03:57 PM, Yang, Sheng wrote: Yeah, but won't be included in this patchset. What API changes are needed? I'd like to see the complete API. I am not sure about it. But I suppose the structure should be the

Mask bit support's API

2010-11-22 Thread Yang, Sheng
Hi Avi, I've purposed the following API for mask bit support. The main point is, QEmu can know which entries are enabled(by pci_enable_msix()). And for enabled entries, kernel own it, including MSI data/address and mask bit(routing table and mask bitmap). QEmu should use KVM_GET_MSIX_ENTRY

Re: Mask bit support's API

2010-11-22 Thread Avi Kivity
On 11/23/2010 08:09 AM, Yang, Sheng wrote: Hi Avi, I've purposed the following API for mask bit support. The main point is, QEmu can know which entries are enabled(by pci_enable_msix()). And for enabled entries, kernel own it, including MSI data/address and mask bit(routing table and mask

Re: Mask bit support's API

2010-11-22 Thread Yang, Sheng
On Tuesday 23 November 2010 14:17:28 Avi Kivity wrote: On 11/23/2010 08:09 AM, Yang, Sheng wrote: Hi Avi, I've purposed the following API for mask bit support. The main point is, QEmu can know which entries are enabled(by pci_enable_msix()). And for enabled entries, kernel own it,

Re: Mask bit support's API

2010-11-22 Thread Avi Kivity
On 11/23/2010 08:35 AM, Yang, Sheng wrote: On Tuesday 23 November 2010 14:17:28 Avi Kivity wrote: On 11/23/2010 08:09 AM, Yang, Sheng wrote: Hi Avi, I've purposed the following API for mask bit support. The main point is, QEmu can know which entries are enabled(by