Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 01, 2012 at 11:03:25AM +0200, Avi Kivity wrote:
> On 01/31/2012 11:14 PM, Michael S. Tsirkin wrote:
> > On Tue, Jan 31, 2012 at 02:08:38PM -0700, Alex Williamson wrote:
> > > On Tue, 2012-01-31 at 15:33 +0200, Avi Kivity wrote:
> > > > On 01/31/2012 03:21 PM, Jan Kiszka wrote:
> > > > > On 2012-01-31 14:10, Avi Kivity wrote:
> > > > > > On 01/31/2012 02:57 PM, Jan Kiszka wrote:
> > > > > >>>>> Seems fine, but do we really need the option?  If it doesn't work we
> > > > > >>>>> should treat it as an ordinary but and fix it.
> > > > > >>>>
> > > > > >>>> So far it's against the architecture of the emulated system: our current
> > > > > >>>> chipset predates 64 bit PCI.
> > > > > >>>>
> > > > > >>>
> > > > > >>> Then it should be enabled/disabled at the chipset level.
> > > > > >>
> > > > > >> Makes me wonder if we already do some filtering if the device supports
> > > > > >> 64 bit but the next bridge does not.
> > > > > >>
> > > > > > 
> > > > > > Our 440fx does support 64-bit bars, so the question doesn't arise for
> > > > > > x86.  Instead we violate the spec.
> > > > >
> > > > > If you mean by "our" the 440fx-qemu, not the real 440fx. That one does
> > > > > not even support >1GB RAM.
> > > > 
> > > > Yes, that's what I meant.  It also supports pci hotplug, more slots, cpu
> > > > hotplug, etc.
> > > 
> > > I'll drop this patch for now, it was just something I enabled based on a
> > > query from MST and didn't want to lose it.  Maybe we need the option in
> > > PCI core, but I'm just turn it on and hope for the best w/o giving users
> > > a way to disable it.  Thanks,
> > > 
> > > Alex
> >
> > The patch itself makes sense to me.
> > Avi found some bugs in 64 bit BAR handling, let's wait till that is
> > fixed then merge this patch.
> 
> The bugs are unrelated to 64-bit BARs.

This is my understanding as well.
However, qemu pci has this work around for 32 bit BARs:

    /* Now pcibus_t is 64bit.
     * Check if 32 bit BAR wraps around explicitly.
     * Without this, PC ide doesn't work well.
     * TODO: remove this work around.
     */
    if  (!(type & PCI_BASE_ADDRESS_MEM_TYPE_64) && last_addr >= UINT32_MAX) {
        return PCI_BAR_UNMAPPED;
    }

this helps work around the bugs on condition that
guests write UINT32_MAX into BARs to size them which
happens to be true.

And for this reason, the bugs trigger with 64 bit BARs
but not 32 bit ones.

> Alex, why drop the patch?  We're far from a release, if there are indeed
> bugs there, we'll find out.

I think it will expose the 64 bit handling bug so I suggested
applying this patch after you fix the bugs you found in memory -
it's better for bisectability.

> -- 
> error compiling committee.c: too many arguments to function
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux