From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 0/4 v9] MSI-X MMIO support for KVM Date: Tue, 6 Sep 2011 12:30:03 +0300 Message-ID: <20110906093003.GC16091@redhat.com> References: <20110222180858.GA5784@amt.cnet> <4E5F6C20.7020701@siemens.com> <4E65D149.1070807@redhat.com> <20110906081247.GE13286@redhat.com> <4E65DB89.6020909@siemens.com> <1315298760.2615.2.camel@sasha> <4E65DEA4.8070203@siemens.com> <1315299600.2615.6.camel@sasha> <4E65E271.8040606@siemens.com> <1315300571.19717.1.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kiszka , Avi Kivity , Marcelo Tosatti , "kvm@vger.kernel.org" , Alex Williamson To: Sasha Levin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63122 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307Ab1IFJ3M (ORCPT ); Tue, 6 Sep 2011 05:29:12 -0400 Content-Disposition: inline In-Reply-To: <1315300571.19717.1.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Sep 06, 2011 at 12:16:11PM +0300, Sasha Levin wrote: > > Back to square #1: We need a device with MSI support and cap bit 8 set > > in its _MSI_ control word. > > Alright, so I've looked at some of my servers, and one of them has both > a bunch of MSI-X devices, and some MSI devices which show this: > > Capabilities: [60] MSI: Enable+ Count=1/2 Maskable+ 64bit- > Address: 00000020 Data: 0000 > Masking: 00000000 Pending: 00000000 > > Which would suggest that the support per-vector masking, right? pciutils has this: cap = get_conf_word(d, where + PCI_CAP_FLAGS); later printf("MSI: Enable%c Count=%d/%d Maskable%c 64bit%c\n", FLAG(cap, PCI_MSI_FLAGS_ENABLE), 1 << ((cap & PCI_MSI_FLAGS_QSIZE) >> 4), 1 << ((cap & PCI_MSI_FLAGS_QMASK) >> 1), FLAG(cap, PCI_MSI_FLAGS_MASK_BIT), FLAG(cap, PCI_MSI_FLAGS_64BIT)); and #define PCI_MSI_FLAGS_MASK_BIT 0x100 /* interrupt masking & reporting supported */ #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ So yes, that's bit 8 in control word. > -- > > Sasha.