Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2009 at 10:35:27AM +0800, Sheng Yang wrote: On Tuesday 05 May 2009 20:46:04 Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:49:10AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 01:34:50PM +0300, Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:19:45AM

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-06 Thread Sheng Yang
On Wednesday 06 May 2009 15:31:18 Michael S. Tsirkin wrote: On Wed, May 06, 2009 at 10:35:27AM +0800, Sheng Yang wrote: On Tuesday 05 May 2009 20:46:04 Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:49:10AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 01:34:50PM +0300,

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Michael S. Tsirkin
On Mon, Apr 27, 2009 at 10:30:17PM +0800, Sheng Yang wrote: If guest can write to the real device MSI-X table directly, it would cause chaos on interrupt delivery, for what guest see is totally different with what's host see... Obviously. Thanks, What's the reason

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Marcelo Tosatti
On Tue, May 05, 2009 at 12:51:36PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 27, 2009 at 10:30:17PM +0800, Sheng Yang wrote: If guest can write to the real device MSI-X table directly, it would cause chaos on interrupt delivery, for what guest see is totally different with

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Marcelo Tosatti
On Tue, May 05, 2009 at 01:34:50PM +0300, Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:19:45AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 12:51:36PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 27, 2009 at 10:30:17PM +0800, Sheng Yang wrote: If guest can write to

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Michael S. Tsirkin
On Tue, May 05, 2009 at 07:19:45AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 12:51:36PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 27, 2009 at 10:30:17PM +0800, Sheng Yang wrote: If guest can write to the real device MSI-X table directly, it would cause chaos

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Michael S. Tsirkin
On Tue, May 05, 2009 at 07:49:10AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 01:34:50PM +0300, Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:19:45AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 12:51:36PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 27, 2009

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Michael S. Tsirkin
On Tue, May 05, 2009 at 07:49:10AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 01:34:50PM +0300, Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:19:45AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 12:51:36PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 27, 2009

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Sheng Yang
On Tuesday 05 May 2009 20:46:04 Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:49:10AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at 01:34:50PM +0300, Michael S. Tsirkin wrote: On Tue, May 05, 2009 at 07:19:45AM -0300, Marcelo Tosatti wrote: On Tue, May 05, 2009 at

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-04-28 Thread Avi Kivity
Sheng Yang wrote: msix_table_page is a page, and mmap allocate memory on page boundary. So I use it. Just wondering, would e.g. posix_memalign work here as well? Um, I think it should work too. I think qemu_malloc() would work just as well. The hardware never sees the page,

qemu/hw/device-assignment: questions about msix_table_page

2009-04-27 Thread Michael S. Tsirkin
Sheng, Marcelo, I've been reading code in qemu/hw/device-assignment.c, and I have a couple of questions about msi-x implementation: 1. What is the reason that msix_table_page is allocated with mmap and not with e.g. malloc? 2. msix_table_page has the guest view of the msix table for the device.

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-04-27 Thread Michael S. Tsirkin
On Mon, Apr 27, 2009 at 09:16:14PM +0800, Sheng Yang wrote: On Monday 27 April 2009 18:41:17 Michael S. Tsirkin wrote: Sheng, Marcelo, I've been reading code in qemu/hw/device-assignment.c, and I have a couple of questions about msi-x implementation: Hi Michael 1. What is the reason

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-04-27 Thread Sheng Yang
On Monday 27 April 2009 21:51:34 Michael S. Tsirkin wrote: On Mon, Apr 27, 2009 at 09:16:14PM +0800, Sheng Yang wrote: On Monday 27 April 2009 18:41:17 Michael S. Tsirkin wrote: Sheng, Marcelo, I've been reading code in qemu/hw/device-assignment.c, and I have a couple of questions

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-04-27 Thread Michael S. Tsirkin
On Mon, Apr 27, 2009 at 10:03:59PM +0800, Sheng Yang wrote: On Monday 27 April 2009 21:51:34 Michael S. Tsirkin wrote: On Mon, Apr 27, 2009 at 09:16:14PM +0800, Sheng Yang wrote: On Monday 27 April 2009 18:41:17 Michael S. Tsirkin wrote: Sheng, Marcelo, I've been reading code in

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-04-27 Thread Sheng Yang
On Monday 27 April 2009 22:15:04 Michael S. Tsirkin wrote: On Mon, Apr 27, 2009 at 10:03:59PM +0800, Sheng Yang wrote: On Monday 27 April 2009 21:51:34 Michael S. Tsirkin wrote: On Mon, Apr 27, 2009 at 09:16:14PM +0800, Sheng Yang wrote: On Monday 27 April 2009 18:41:17 Michael S.

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-04-27 Thread Michael S. Tsirkin
On Mon, Apr 27, 2009 at 10:30:17PM +0800, Sheng Yang wrote: My suggestion is get mask bit support first, then consider optimization. Yea. Thanks for the explanations! -- MST -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org