Re: In "pci_fixup_video" check if this is or should be theprimaryvideo d

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

 



On Sun, Jan 19, 2014 at 04:14:38PM +0100, Sander Eikelenboom wrote:
> 
> Sunday, January 19, 2014, 4:09:26 PM, you wrote:
> 
> > On Sun, Jan 19, 2014 at 07:04:29AM -0700, Alex Williamson wrote:
> >> On Sun, 2014-01-19 at 12:44 +0200, Michael S. Tsirkin wrote:
> >> > On Fri, Jan 17, 2014 at 07:43:30PM +0900, eiichiro.oiwa.nm@xxxxxxxxxxx wrote:
> >> > > Because legacy VGA is only one device on x86 System, I think qemu has to emulate a bridge
> >> > > for legacy VGA. The VGA Enable bit on its bridge control register has to set to 1. The VGA
> >> > > Enable bit describes in Table 3-10 Bridge Control register. When there are two VGA cards 
> >> > > on the same system, I think its system needs two bridges for each device. These bridges
> >> > > need bridge control registers. One VGA Enable bit on its bridge for legacy VGA has to set
> >> > > to 1. Another VGA Enable bit for second VGA has to set to 0.
> >> > > 
> >> > > 
> >> > > >On Thu, Jan 16, 2014 at 7:16 PM,  <eiichiro.oiwa.nm@xxxxxxxxxxx> wrote:
> >> > > >> I think qemu is breaking "PCI-to-PCI Bridge Architecture Specification Revison 1.2
> >> > > >> June 9, 2003 Chapter 12. VGA Support".
> >> > > >
> >> > > >And what exactly do you think qemu is doing wrong?  Chapter 12 is ten
> >> > > >pages long.  Is there something there that prohibits two VGA devices
> >> > > >on the same bus?  I'm not a qemu developer, but if I were, I would
> >> > > >need a better hint about what is wrong before I could fix it.
> >> > > >
> >> > > >Again, sorry if you said this already and I missed it.
> >> > > >
> >> > > >>>[+cc Michael, Jesse, David, qemu-devel]
> >> > > >>>
> >> > > >>>On Wed, Jan 15, 2014 at 8:58 PM,  <eiichiro.oiwa.nm@xxxxxxxxxxx> wrote:
> >> > > >>>> I suggest you should not break the PCI specification, as a developer of proprietary
> >> > > >>>> hypervisor, but I think your patch is no problem.
> >> > > >>>> Your PCI structure is specialized structure for your virtual machine.
> >> > > >>>> Maybe, your virtual machine will be causing another problem on Linux or other kernels
> >> > > >>>> because of breaking the PCI specification.
> >> > > >>>
> >> > > >>>I assume you think qemu is breaking the PCI spec.  What exactly do you
> >> > > >>>think is broken?  Please give specific references to the spec.  This
> >> > > >>>conversation is pretty fragmented, and I came in late, so I apologize
> >> > > >>>if I missed this.
> >> > > >>>
> >> > > >>>Bjorn
> >> > > >>>
> >> > > >
> >> > 
> >> > None of the bridges included in QEMU implements VGA support.
> >> > The spec explicitly says its optional, so that's ok.
> >> > 
> >> > As a result, you need to put device which has to work in
> >> > VGA mode on the root bus, any device behind a bridge
> >> > won't work in VGA mode (but might work in non VGA mode).
> >> 
> >> The ioh3420 root ports support VGA, so a q35 model is an option for
> >> multiple VGA devices.
> 
> > Hmm, you are right, I forgot you implemented this in March.
> > In fact, I see that you updated bridges to support VGA
> > so if user wants to put both devices behind bridges,
> > that's also possible.
> 
> 
> Unfortunately Xen seems to be old "pc" for the moment and the passthrough
> implementation doesn't seem to have the support for defining and using bridges either.

What do you base this claim on?
Did you actually try?
Bridges work fine for pc too.
See this for how to create a bridge and put a device behind it:
http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02765.html
this should work for all pci devices.

> With my limited c coding skills i also can't find how in hw/xen_pt.c it actually inits a
> pci device in Qemu.

hw/xen_pt.c means you use an old Qemu.
It's now in hw/xen/xen_pt.c
This is the relevant code:
    type_register_static(&xen_pci_passthrough_info);
As you can see parent is TYPE_PCI_DEVICE
which will make xen-pci-passthrough a pci device.


> Although I still find it strange that the pci_video_fixup is ignoring the decisions that the
> vga arbitration code has already made .. (make the device with the vgacon be the
> primary card unless arch code overrides), for the moment i will keep my patch in my private patch queue then :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux