From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0ao-0002By-5y for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:54:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF0aj-0000HY-0A for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:54:25 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0ai-0000HB-P6 for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:54:20 -0400 Received: by mail-wm0-x241.google.com with SMTP id 187so14750416wmz.1 for ; Mon, 20 Jun 2016 07:54:20 -0700 (PDT) Sender: Paolo Bonzini References: <1466282525-3018-1-git-send-email-ido@wizery.com> From: Paolo Bonzini Message-ID: <87a99e71-d9b8-4c73-cced-6edf11a485a6@redhat.com> Date: Mon, 20 Jun 2016 16:54:17 +0200 MIME-Version: 1.0 In-Reply-To: <1466282525-3018-1-git-send-email-ido@wizery.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] i386: pci-assign: Fix MSI-X table size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ido Yariv , qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Richard Henderson , Eduardo Habkost , Alex Williamson On 18/06/2016 22:42, Ido Yariv wrote: > The current code creates a whole page mmio region for the MSI-X table > size. > > However, the page containing the MSI-X table may contain other registers > not related to MSI-X. Creating an mmio region for the whole page masks > such registers and may break drivers in the guest OS. > > Since maximal number of entries is known, use that instead to deduce the > table size when setting up the mmio region. > > Signed-off-by: Ido Yariv I can take this patch, but I'd like to warn you that pci-assign is deprecated (and replaced by VFIO). I seem to recall VFIO does this correctly, but it would be great if you could check that. Also, I would prefer the mmap/munmap to keep using MSIX_PAGE_SIZE, just to limit the number of things that could break. Paolo