public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 5/5] qemu-kvm: device assignment: Enable in-kernel MSI-X mask support
Date: Thu, 21 Oct 2010 15:12:16 +0800	[thread overview]
Message-ID: <201010211512.16320.sheng@linux.intel.com> (raw)
In-Reply-To: <20101020223656.GD27545@redhat.com>

On Thursday 21 October 2010 06:36:56 Michael S. Tsirkin wrote:
> On Wed, Oct 20, 2010 at 04:29:55PM +0800, Sheng Yang wrote:
> > Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> > ---
> > 
> >  hw/device-assignment.c |   13 +++++++++++++
> >  1 files changed, 13 insertions(+), 0 deletions(-)
> > 
> > diff --git a/hw/device-assignment.c b/hw/device-assignment.c
> > index d1a6282..aa3358e 100644
> > --- a/hw/device-assignment.c
> > +++ b/hw/device-assignment.c
> > @@ -269,6 +269,9 @@ static void assigned_dev_iomem_map(PCIDevice
> > *pci_dev, int region_num,
> > 
> >      AssignedDevRegion *region = &r_dev->v_addrs[region_num];
> >      PCIRegion *real_region = &r_dev->real_device.regions[region_num];
> >      int ret = 0;
> > 
> > +#ifdef KVM_CAP_DEVICE_MSIX_MASK
> > +    struct kvm_assigned_msix_mmio msix_mmio;
> > +#endif
> > 
> >      DEBUG("e_phys=%08" FMT_PCIBUS " r_virt=%p type=%d len=%08"
> >      FMT_PCIBUS " region_num=%d \n",
> >      
> >            e_phys, region->u.r_virtbase, type, e_size, region_num);
> > 
> > @@ -287,6 +290,16 @@ static void assigned_dev_iomem_map(PCIDevice
> > *pci_dev, int region_num,
> > 
> >              cpu_register_physical_memory(e_phys + offset,
> >              
> >                      TARGET_PAGE_SIZE, r_dev->mmio_index);
> > 
> > +#ifdef KVM_CAP_DEVICE_MSIX_MASK
> > +	    memset(&msix_mmio, 0, sizeof(struct kvm_assigned_msix_mmio));
> > +	    msix_mmio.assigned_dev_id = calc_assigned_dev_id(r_dev->h_segnr,
> > +			    r_dev->h_busnr, r_dev->h_devfn);
> > +	    msix_mmio.base_addr = e_phys + offset;
> > +	    if (kvm_assign_reg_msix_mmio(kvm_context, &msix_mmio))
> > +                fprintf(stderr, "fail to register in-kernel
> > msix_mmio!\n"); +            /* We can still continue because the MMIO
> > accessing can fall +             * back to QEmu */
> 
> So let's not print scary messages ...

OK...

--
regards
Yang, Sheng

> 
> > +#endif
> > 
> >          }
> >      
> >      }

      reply	other threads:[~2010-10-21  7:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  8:29 [PATCH 0/5] MSI-X mask support for assigned device on userspace Sheng Yang
2010-10-20  8:29 ` [PATCH 1/5] qemu-kvm: Add kvm_enable_cap() interface for x86 Sheng Yang
2010-10-20  8:29 ` [PATCH 2/5] qemu-kvm: Ioctl for in-kernel mask support Sheng Yang
2010-10-20  8:29 ` [PATCH 3/5] qemu-kvm: device assignment: Some clean up about MSI-X code Sheng Yang
2010-10-20  8:29 ` [PATCH 4/5] qemu-kvm: device assignment: emulate MSI-X mask bits Sheng Yang
2010-10-20  8:29 ` [PATCH 5/5] qemu-kvm: device assignment: Enable in-kernel MSI-X mask support Sheng Yang
2010-10-20 22:36   ` Michael S. Tsirkin
2010-10-21  7:12     ` Sheng Yang [this message]

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=201010211512.16320.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox