From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHCpc-0006ro-7l for qemu-devel@nongnu.org; Thu, 07 Jan 2016 10:50:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHCpW-0006Xj-IB for qemu-devel@nongnu.org; Thu, 07 Jan 2016 10:50:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHCpW-0006XK-B7 for qemu-devel@nongnu.org; Thu, 07 Jan 2016 10:50:26 -0500 Message-ID: <1452181822.6096.140.camel@redhat.com> From: Gerd Hoffmann Date: Thu, 07 Jan 2016 16:50:22 +0100 In-Reply-To: References: <1451994098-6972-1-git-send-email-kraxel@redhat.com> <1451994098-6972-12-git-send-email-kraxel@redhat.com> <1452152339.6096.78.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3 11/11] igd: move igd-passthrough-isa-bridge creation to machine init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: igvt-g@ml01.01.org, xen-devel@lists.xensource.com, Eduardo Habkost , "Michael S. Tsirkin" , Andrew Cooper , qemu-devel@nongnu.org, Jan Beulich , Cao jin , vfio-users@redhat.com, Paolo Bonzini , Richard Henderson On Do, 2016-01-07 at 13:10 +0000, Stefano Stabellini wrote: > CC'ing the Xen x86 maintainers >=20 > On Thu, 7 Jan 2016, Gerd Hoffmann wrote: > > Hi, > >=20 > > > One thing I don't like about this is that it is going to skip the che= cks > > > done in xen_pt_initfn. > >=20 > > Hmm? Those checks are still done when you assign a igd ... >=20 > Their failure doesn't affect the creation of the bridge. Doesn't their failure makes qemu throw a fatal error and exit? So the guest isn't going to run either way? > > > For example it is going to create the isa bridge, > > > even if there is going to be an error loading the vga bios or if the > > > device specified is not even an Intel graphic card. > >=20 > > Creating the special igd-isa-bridge is no longer tied to actually > > assigning a igd, but to the igd-passthru=3Don machine option being pres= ent > > (and machine type being 'pc'). >=20 > and machine type 'xenfv', unless I am mistaken? Yes, xenfv too (uses i440fx too and thus is a 'pc' derivate). > > xen_pt_initfn checks that igd-passthru=3Don is set in case it finds a i= gd > > device is assigned, that will make sure the igd-isa-bridge is present. > >=20 > > But, yes, you can create a igd-isa-bridge now even when not assigning a > > igd device, either by specifying igd-passthru=3Don or using -device. I > > fail to see why this is a problem though, care to explain? >=20 > It is going to change the PCI layout of any virtual machines with a > config file containing >=20 > gfx_passthru=3D"igd" >=20 > and no pci config line. A Xen 4.7 user could add gfx_passthru=3D"igd" to > all her VM config files, because actually it does nothing unless an > Intel graphic card is assigned to the VM. No. It changes the host bridge even when not passing through a igd, because that is linked to igd-passthru=3Don only. So making both host bridge tweak and isa bridge tweak triggered by igd-passthru=3Don brings more consistency to the whole thing. > > Also note that moving this to machine init nicely handles the fact that > > the igd-isa-bridge is needed on 'pc' only, not on 'q35'. If you don't > > want create the igd-isa-bridge in machine init, what is your alternativ= e > > suggestion to handle this? >=20 > Maybe we could retain the check whether an Intel graphic card has been > assigned?=20 Should be possible, but is not that easy due to initialization order issues. cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [Qemu-devel] [PATCH v3 11/11] igd: move igd-passthrough-isa-bridge creation to machine init Date: Thu, 07 Jan 2016 16:50:22 +0100 Message-ID: <1452181822.6096.140.camel@redhat.com> References: <1451994098-6972-1-git-send-email-kraxel@redhat.com> <1451994098-6972-12-git-send-email-kraxel@redhat.com> <1452152339.6096.78.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vfio-users-bounces-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Errors-To: vfio-users-bounces-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org To: Stefano Stabellini Cc: igvt-g-y27Ovi1pjclAfugRpC6u6w@public.gmane.org, xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org, Eduardo Habkost , Richard-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, "Michael S. Tsirkin" , Cooper , qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, Jan Beulich , Andrew-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Cao jin , vfio-users-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Paolo Bonzini , Henderson List-Id: xen-devel@lists.xenproject.org On Do, 2016-01-07 at 13:10 +0000, Stefano Stabellini wrote: > CC'ing the Xen x86 maintainers > > On Thu, 7 Jan 2016, Gerd Hoffmann wrote: > > Hi, > > > > > One thing I don't like about this is that it is going to skip the checks > > > done in xen_pt_initfn. > > > > Hmm? Those checks are still done when you assign a igd ... > > Their failure doesn't affect the creation of the bridge. Doesn't their failure makes qemu throw a fatal error and exit? So the guest isn't going to run either way? > > > For example it is going to create the isa bridge, > > > even if there is going to be an error loading the vga bios or if the > > > device specified is not even an Intel graphic card. > > > > Creating the special igd-isa-bridge is no longer tied to actually > > assigning a igd, but to the igd-passthru=on machine option being present > > (and machine type being 'pc'). > > and machine type 'xenfv', unless I am mistaken? Yes, xenfv too (uses i440fx too and thus is a 'pc' derivate). > > xen_pt_initfn checks that igd-passthru=on is set in case it finds a igd > > device is assigned, that will make sure the igd-isa-bridge is present. > > > > But, yes, you can create a igd-isa-bridge now even when not assigning a > > igd device, either by specifying igd-passthru=on or using -device. I > > fail to see why this is a problem though, care to explain? > > It is going to change the PCI layout of any virtual machines with a > config file containing > > gfx_passthru="igd" > > and no pci config line. A Xen 4.7 user could add gfx_passthru="igd" to > all her VM config files, because actually it does nothing unless an > Intel graphic card is assigned to the VM. No. It changes the host bridge even when not passing through a igd, because that is linked to igd-passthru=on only. So making both host bridge tweak and isa bridge tweak triggered by igd-passthru=on brings more consistency to the whole thing. > > Also note that moving this to machine init nicely handles the fact that > > the igd-isa-bridge is needed on 'pc' only, not on 'q35'. If you don't > > want create the igd-isa-bridge in machine init, what is your alternative > > suggestion to handle this? > > Maybe we could retain the check whether an Intel graphic card has been > assigned? Should be possible, but is not that easy due to initialization order issues. cheers, Gerd