From nobody Sat May 18 16:18:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=aol.com ARC-Seal: i=1; a=rsa-sha256; t=1666766881; cv=none; d=zohomail.com; s=zohoarc; b=OQ4c4piU45uW27qA9EypBkOqgJVkT39EXf2CeirIPLnkKS89NULnP11VCFdqIL6nzf9rC2QOleodNT8I3RuxwQ4uAgq42P+vfM41YEsYInMsNS98w2HNroBy6ImLqjCGZ1L9+f4mdzfFnlQrvLWczURHOJhbNQvNCtax1goM5Pc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666766881; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ny7owJa2RxbGuwayq4FQhxBsSVH0ukbtIh/FIB5CtGM=; b=hlnfG2fT/o24oJorHujWzRiCfAGx7bin6G9JvcUcHHZlnspETJw4Wkf52SwdVu8y0nT7FRfCzjRqBrP6GFOSYIyOMvmRP4vWoih6OFACIU582bwgRYgDAqOsD4lxyNb7mR/e1iLBOupSgUqaWyc91cKrzvQRe3PO/NvJXs2gmPg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1666766881279711.1315708062326; Tue, 25 Oct 2022 23:48:01 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.430353.681943 (Exim 4.92) (envelope-from ) id 1onaCN-0000Pq-4S; Wed, 26 Oct 2022 06:47:35 +0000 Received: by outflank-mailman (output) from mailman id 430353.681943; Wed, 26 Oct 2022 06:47:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1onaCN-0000Pj-1J; Wed, 26 Oct 2022 06:47:35 +0000 Received: by outflank-mailman (input) for mailman id 430353; Wed, 26 Oct 2022 06:47:33 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1onaCL-0000PY-Do for xen-devel@lists.xenproject.org; Wed, 26 Oct 2022 06:47:33 +0000 Received: from sonic312-25.consmr.mail.gq1.yahoo.com (sonic312-25.consmr.mail.gq1.yahoo.com [98.137.69.206]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0fdfc98f-54fa-11ed-91b5-6bf2151ebd3b; Wed, 26 Oct 2022 08:47:32 +0200 (CEST) Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Wed, 26 Oct 2022 06:47:29 +0000 Received: by hermes--production-ne1-c47ffd5f5-kmjmv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 636de0ff1881defd5f865b248e2c93fc; Wed, 26 Oct 2022 06:47:28 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0fdfc98f-54fa-11ed-91b5-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1666766849; bh=ny7owJa2RxbGuwayq4FQhxBsSVH0ukbtIh/FIB5CtGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=CL2obzNVzt/rKJmuzVYOGdQ8Kn1d1yMZrG2uHlQXtAz//NYIJwS5l0IDGrDPLTx9h7cXc85vg/xfb1BAqx5SE2wV+NMgY/SdFqEI5ibwr8MiouBKWY9Q8O4+gc9ONIPG6CALybaJmHbvT8GRtM4/8PuMvFoR7MgIAUfIiKYQO1RWykuIknzwIXnJ9rqWJepNXLyXTC6AeEHTN7eRCJ6BUW+JonaztqNCu1vw5T77TjWUvXixFJtkHnRZXs8k3sxwpNHo5dZC7N5njiYL0+xO6V4MChRtie10EAhnHyCja7DM96VKu8Vl0BZZi/OIbLUEWxPRr0b+8rkRF+MvZmJO0g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666766849; bh=43KMNyXrtQtnI0ETe7rDIkw9N+CEwpTmRLuodKWNxiO=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Fp8AkV4z9C8IcGLMaGd+26g3sZklbNV1CFNuR1EwQ71iqOxKyLDuvgCmiPrh9WQY5Y2LdtCNGEnE5wWYusZP00UaXQl2c4YpwY4KozTyNuazqgwSLeLMshowQlK+S1z/RVXYGfNg7zNa+JAl2BIHlXTk7zUExkOdTzCHjXs5XHW4dbzFErvmq4AJxsxa9sMOlaxL1RqwMeAd9c9sBOQWGok1duC9CiKOuLQX+7veiWik1yZdHdzPAjNUmpgMrdy4PIESGc0cPy+TP+EEoFULJ8Oas/xkODW494sFYDdO7uIizAuaugNWSnyjGtkthmXfaQLuyFakbjrvzSM5z6mHzg== X-YMail-OSG: iaScSSYVM1kIj9HY.g9pZpp4a8.WVB4UO7BeqapWtqoUUNlj0tzP8eyPowJXjuj gSW634pCKGpiZ3lQGRitXX6j_rvSWUV5nRRGv18.0NZ4YayNhokTApBFi5HnLz5mdr94UTRIR8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mudzinski To: qemu-devel@nongnu.org Cc: Chuck Zmudzinski , Stefano Stabellini , Anthony Perard , Paul Durrant , xen-devel@lists.xenproject.org Subject: [PATCH 1/2] xen/pt: fix syntax error that causes FTBFS in some configurations Date: Wed, 26 Oct 2022 02:47:07 -0400 Message-Id: <7a1fa15767e76155a4f78a1dd126c596bc24cd83.1666764146.git.brchuckz@netscape.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Length: 815 X-ZohoMail-DKIM: pass (identity @aol.com) X-ZM-MESSAGEID: 1666766883677100002 Content-Type: text/plain; charset="utf-8" From: Chuck Zmudzinski When Qemu is built with --enable-xen and --disable-xen-pci-passthrough and the target os is linux, the build fails with: meson.build:3477:2: ERROR: File xen_pt_stub.c does not exist. Fixes: 582ea95f5f93 ("meson: convert hw/xen") Signed-off-by: Chuck Zmudzinski --- hw/xen/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xen/meson.build b/hw/xen/meson.build index 08dc1f6857..ae0ace3046 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -18,7 +18,7 @@ if have_xen_pci_passthrough 'xen_pt_msi.c', )) else - xen_specific_ss.add('xen_pt_stub.c') + xen_specific_ss.add(files('xen_pt_stub.c')) endif =20 specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss) --=20 2.37.2 From nobody Sat May 18 16:18:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=aol.com ARC-Seal: i=1; a=rsa-sha256; t=1666766882; cv=none; d=zohomail.com; s=zohoarc; b=JDLXjOwCL4Da/JZx/1DhrAse3CD/5cglgOT3OcDX6ff9dWfTJfGViCUj2iRp5r9hbQavcpAgiBzZc+/I6o8P7zhNl0Pi4EdgshrTxWSLj+OOtiVFBiW1woFDSdbcLprFuddFrxUH3AEEoaEDh9o43002D+e3pWlEebhtNRrVmjI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666766882; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ONSTUnovoeWnNbxOoaE6+yTq1iUkTDrGtK1eMs5++KM=; b=PFcuvfEvjlyyr4mmXsMeOiuOJJdPA5IUobW102viGsK0vwLo34+UL6zKeQ6fSHbaZU8HAXIHZCJDzGKL3cGtSHST1zJD2OtCrrHxiHVvsAYZRm1vONNmqQnDXorZppZo3A9LiHz7ZIwoFNgpJufbOFownQY//WimMwt7kkREoYg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1666766882139852.4252143051473; Tue, 25 Oct 2022 23:48:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.430355.681965 (Exim 4.92) (envelope-from ) id 1onaCP-0000vJ-IH; Wed, 26 Oct 2022 06:47:37 +0000 Received: by outflank-mailman (output) from mailman id 430355.681965; Wed, 26 Oct 2022 06:47:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1onaCP-0000vC-FG; Wed, 26 Oct 2022 06:47:37 +0000 Received: by outflank-mailman (input) for mailman id 430355; Wed, 26 Oct 2022 06:47:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1onaCN-0000PX-KY for xen-devel@lists.xenproject.org; Wed, 26 Oct 2022 06:47:35 +0000 Received: from sonic311-25.consmr.mail.gq1.yahoo.com (sonic311-25.consmr.mail.gq1.yahoo.com [98.137.65.206]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 11444c48-54fa-11ed-8fd0-01056ac49cbb; Wed, 26 Oct 2022 08:47:34 +0200 (CEST) Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Wed, 26 Oct 2022 06:47:31 +0000 Received: by hermes--production-ne1-c47ffd5f5-kmjmv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 636de0ff1881defd5f865b248e2c93fc; Wed, 26 Oct 2022 06:47:30 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 11444c48-54fa-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1666766851; bh=ONSTUnovoeWnNbxOoaE6+yTq1iUkTDrGtK1eMs5++KM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=E4HBLAir0tWYpE8ai6J/4DOiDiyAdbLIlzjdErYl3dVJCLYfXKfNyZAk3//Cdk4zgo9/thT7YJjSPmtXzjvOM91CcxbMozlD8hx0eB5DZxDCNw2g1HCaJLq5L0UInsHc9bQN6tuFeHjRK/tcHqh2hRXPCgwbuA4HRBkcNyJ5FcBBS6StTcD9zhuu+dMRwOM9Q4uhBNXq9pEdV+qGaR55Dt4OKiOcv9WEleP+1ww+U3tbTjcIaaNjfruJY4qQlKfFckzCLbpdr9+dmx4fV/TVibjGJtgGbPTf358/lp2+CgDOdVyKLpcGoq/WH39T8mdbGPSV18pcA/aklVYeQBWBPg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666766851; bh=0mP3iOtuO/3KQ2/gcn+xJtP3dsmvYPLDaFVZasLlgZf=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=GSxpk23VfNm/WgShvNeaEn9AGw9bADjpdnDmJh3iAQ3CvugLpmOnyqz4PdIyi7a+bwTuorwvrlIQM6lRZ71V2uX2PlGNR5zLXDm9ZdI5UHd7qU6tvUU98GIYnWpVk3f8ok750pNLlewk3XMVOraBDcRIx66q/1CRB/yt2d/AXiBvLT7Xuk2YdJz1yyslbEmRvNaZB3Mu+6q8PYF9WsE+VWvyb1gqwa9G0JY+0ClMeO8ygDbIGS9gy2EUT1X1iC8a8h+x9/AVepATSZW6K6sy+z8H7UxbCTPAeJpcveyrRFW0dVAaw/g+GNLXySQubYeqWJoE3lEu+6ghDLJMeBg2dw== X-YMail-OSG: qM3XLeAVM1llGWhcZRaWVdk290YNclP8zFuMfQHHT5FUWJLlQOsQqpkYLL3s07d qp3woHC8gEdqLmGzzIU2Puf8IAkjVBOFLbFHuaiB_VJWrhgodNsc2jsa0ajXl5ApT4DltBFxSCm7 _isb00P.ki04vCEYsIWrlRge3gmqp1vea4Y7M.42lnY4AedkLGbRXt6HgwbjOfm.RzV6NiZNi9mt P5kk14m1lwXtHQAVdhqeQhwSYK.HYtVxKQtNcToR34ZxndBnyqBfw0eSSSsUjbU65GlZQkfC546E _fjs57KrZa1rzJ4uNHu009qOddlXXepgd4.IXP_y1s6tBztiPbch.6MR1hUgSyMYRThnf3HwBjhV PtJ0DYS5GV9r3OagzC3zDQR_rk_tSyy9mi9IU9P1wHSBCjIZf9CCle1Ae2k0vXdMddarW_Vx9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k vxNIsjvgRoj9mykP8FQA3zdEKmv8AZfyw.aXFfhEwdRyMx9LR7yXaY2T1QSmoHE.TTo00bGwnGDK FrmMEAMB8iU.peYrvLrvVZmPdpb4Tw40gh8licK1wSv_ze33aktdxVYUPnFyldhx_uRSi_57aQlE Qn4GM44NulurGr0n4BQX_pdalFeFkF74Ab7EOxtaKiR5T1tFGcDioUERpKNE0XTb3x0ptnRotfos ISKhHtAmSZPBgzB35vPHEyJUUGfkQaqv9vKtNg9I2SMATkLAzFze46EJmxeFBs87gApnx.pcnjZu hL4zY4QbcXLLpIQf8SkgMtMMwEmRPX6QXsKxUT5eyGClhMXdemCStlLXytsTrCZkiiYxYVzoBvp_ wHEvZ.XM6jXvAwcUHUjQc46DuVSv_QTkWfSAbseQWF.ZtsaDcabEvS0J47To9yET.sLBqsAIuxRv dDtJwQ5Xe68v41Z5VF4rLdiMFY.NeoSIuDOdpgqOwfOLP2LbmWRzsl4GbZPqCzs9dllE9mWaQYLM cB9swMSKjbMbL9hoONz9apmzPAAsIE2Jzm1ZdvR5e44oNnp.mUvppR.Gt82RueY_4YlrDWhU0wSy y4IbsghVeFS7zIFM3.ciaAbwbZ29jpPeK2zYRcgdzmWgPxixvxByFeXECFtJoZYjhuZShkPshsAu _ZjXGD.8tR4xj8UwJH2Dh.VA8bRlfU.z7GjTeg4.baOadCKQj.ElrMJuNbeH7i5fHSq3wUC8L0Fw dMoz1A8uDWbSO X-Sonic-MF: From: Chuck Zmudzinski To: qemu-devel@nongnu.org Cc: Chuck Zmudzinski , Stefano Stabellini , Anthony Perard , Paul Durrant , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost , xen-devel@lists.xenproject.org Subject: [PATCH 2/2] xen/pt: reserve PCI slot 2 for Intel igd-passthru Date: Wed, 26 Oct 2022 02:47:08 -0400 Message-Id: <1b98334dd30af4a467170237c8a31c1824ee9c37.1666764146.git.brchuckz@netscape.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Length: 6998 X-ZohoMail-DKIM: pass (identity @aol.com) X-ZM-MESSAGEID: 1666766883707100003 Content-Type: text/plain; charset="utf-8" From: Chuck Zmudzinski Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, as noted in docs/igd-assign.txt in the Qemu source code. Currently, when the xl toolstack is used to configure a Xen HVM guest with Intel IGD passthrough to the guest with the Qemu upstream device model, a Qemu emulated PCI device will occupy slot 2 and the Intel IGD will occupy a different slot. This problem often prevents the guest from booting. The only available workaround is not good: Configure Xen HVM guests to use the old and no longer maintained Qemu traditional device model available from xenbits.xen.org which does reserve slot 2 for the Intel IGD. To implement this feature in the Qemu upstream device model for Xen HVM guests, introduce the following new class, functions, types, and macros: * XEN_PT_DEVICE_CLASS declaration, based on the existing TYPE_XEN_PT_DEVICE * XEN_PT_DEVICE_GET_CLASS macro helper function for XEN_PT_DEVICE_CLASS * typedef XenPTQdevRealize function pointer * XEN_PCI_IGD_SLOT_MASK, the value of slot_reserved_mask to reserve slot 2 * xen_igd_reserve_slot and xen_igd_clear_slot functions The new xen_igd_reserve_slot function uses the existing slot_reserved_mask member of PCIBus to reserve PCI slot 2 for Xen HVM guests configured using the xl toolstack with the gfx_passthru option enabled, which sets the igd-passthru=3Don option to Qemu for the Xen HVM machine type. The new xen_igd_reserve_slot function also needs to be implemented in hw/xen/xen_pt_stub.c to prevent FTBFS during the link stage for the case when Qemu is configured with --enable-xen and --disable-xen-pci-passthrough, in which case it does nothing. The new xen_igd_clear_slot function overrides qdev->realize of the parent PCI device class to enable the Intel IGD to occupy slot 2 on the PCI bus since slot 2 was reserved by xen_igd_reserve_slot when the PCI bus was created in hw/i386/pc_piix.c for the case when igd-passthru=3Don. Signed-off-by: Chuck Zmudzinski --- Notes that might be helpful to reviewers of patched code in hw/xen: The new functions and types are based on recommendations from Qemu docs: https://qemu.readthedocs.io/en/latest/devel/qom.html Notes that might be helpful to reviewers of patched code in hw/i386: The small patch to hw/i386/pc_piix.c is protected by CONFIG_XEN so it does not affect builds that do not have CONFIG_XEN defined. xen_igd_gfx_pt_enabled() in the patched hw/i386/pc_piix.c file is an existing function that is only true when Qemu is built with xen-pci-passthrough enabled and the administrator has configured the Xen HVM guest with Qemu's igd-passthru=3Don option. hw/i386/pc_piix.c | 3 +++ hw/xen/xen_pt.c | 25 +++++++++++++++++++++++++ hw/xen/xen_pt.h | 16 ++++++++++++++++ hw/xen/xen_pt_stub.c | 4 ++++ 4 files changed, 48 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 0b1a79c0fa..a0f04ad62e 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -402,6 +402,9 @@ static void pc_xen_hvm_init(MachineState *machine) } =20 pc_xen_hvm_init_pci(machine); + if (xen_igd_gfx_pt_enabled()) { + xen_igd_reserve_slot(pcms->bus); + } pci_create_simple(pcms->bus, -1, "xen-platform"); } #endif diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 0ec7e52183..ec42f47fac 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -950,11 +950,35 @@ static void xen_pci_passthrough_instance_init(Object = *obj) PCI_DEVICE(obj)->cap_present |=3D QEMU_PCI_CAP_EXPRESS; } =20 +void xen_igd_reserve_slot(PCIBus *pci_bus) +{ + XEN_PT_LOG(0, "Reserving PCI slot 2 for IGD\n"); + pci_bus->slot_reserved_mask |=3D XEN_PCI_IGD_SLOT_MASK; +} + +static void xen_igd_clear_slot(DeviceState *qdev, Error **errp) +{ + PCIDevice *pci_dev =3D (PCIDevice *)qdev; + XenPCIPassthroughState *s =3D XEN_PT_DEVICE(pci_dev); + XenPTDeviceClass *xptc =3D XEN_PT_DEVICE_GET_CLASS(s); + PCIBus *pci_bus =3D pci_get_bus(pci_dev); + + if (is_igd_vga_passthrough(&s->real_device) && + (s->real_device.vendor_id =3D=3D PCI_VENDOR_ID_INTEL)) { + pci_bus->slot_reserved_mask &=3D ~XEN_PCI_IGD_SLOT_MASK; + XEN_PT_LOG(pci_dev, "Intel IGD found, using slot 2\n"); + } + xptc->pci_qdev_realize(qdev, errp); +} + static void xen_pci_passthrough_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 + XenPTDeviceClass *xptc =3D XEN_PT_DEVICE_CLASS(klass); + xptc->pci_qdev_realize =3D dc->realize; + dc->realize =3D xen_igd_clear_slot; k->realize =3D xen_pt_realize; k->exit =3D xen_pt_unregister_device; k->config_read =3D xen_pt_pci_read_config; @@ -977,6 +1001,7 @@ static const TypeInfo xen_pci_passthrough_info =3D { .instance_size =3D sizeof(XenPCIPassthroughState), .instance_finalize =3D xen_pci_passthrough_finalize, .class_init =3D xen_pci_passthrough_class_init, + .class_size =3D sizeof(XenPTDeviceClass), .instance_init =3D xen_pci_passthrough_instance_init, .interfaces =3D (InterfaceInfo[]) { { INTERFACE_CONVENTIONAL_PCI_DEVICE }, diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index e7c4316a7d..40b31b5263 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -3,6 +3,7 @@ =20 #include "hw/xen/xen_common.h" #include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" #include "xen-host-pci-device.h" #include "qom/object.h" =20 @@ -41,7 +42,20 @@ typedef struct XenPTReg XenPTReg; #define TYPE_XEN_PT_DEVICE "xen-pci-passthrough" OBJECT_DECLARE_SIMPLE_TYPE(XenPCIPassthroughState, XEN_PT_DEVICE) =20 +#define XEN_PT_DEVICE_CLASS(klass) \ + OBJECT_CLASS_CHECK(XenPTDeviceClass, klass, TYPE_XEN_PT_DEVICE) +#define XEN_PT_DEVICE_GET_CLASS(obj) \ + OBJECT_GET_CLASS(XenPTDeviceClass, obj, TYPE_XEN_PT_DEVICE) + +typedef void (*XenPTQdevRealize)(DeviceState *qdev, Error **errp); + +typedef struct XenPTDeviceClass { + PCIDeviceClass parent_class; + XenPTQdevRealize pci_qdev_realize; +} XenPTDeviceClass; + uint32_t igd_read_opregion(XenPCIPassthroughState *s); +void xen_igd_reserve_slot(PCIBus *pci_bus); void igd_write_opregion(XenPCIPassthroughState *s, uint32_t val); void xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState *s, XenHostPCIDevice *dev); @@ -76,6 +90,8 @@ typedef int (*xen_pt_conf_byte_read) =20 #define XEN_PCI_INTEL_OPREGION 0xfc =20 +#define XEN_PCI_IGD_SLOT_MASK 0x4UL /* Intel IGD slot_reserved_mask */ + typedef enum { XEN_PT_GRP_TYPE_HARDWIRED =3D 0, /* 0 Hardwired reg group */ XEN_PT_GRP_TYPE_EMU, /* emul reg group */ diff --git a/hw/xen/xen_pt_stub.c b/hw/xen/xen_pt_stub.c index 2d8cac8d54..5c108446a8 100644 --- a/hw/xen/xen_pt_stub.c +++ b/hw/xen/xen_pt_stub.c @@ -20,3 +20,7 @@ void xen_igd_gfx_pt_set(bool value, Error **errp) error_setg(errp, "Xen PCI passthrough support not built in"); } } + +void xen_igd_reserve_slot(PCIBus *pci_bus) +{ +} --=20 2.37.2