From nobody Fri Jun 02 13:12:46 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QXk2668gyz4YJS0 for ; Fri, 2 Jun 2023 13:12:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QXk263Z2Nz4174 for ; Fri, 2 Jun 2023 13:12:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685711566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWGKfMMLkp3maf5HsQr/KEdTsHGW0zkiyuapMPPZVI4=; b=c3932wsAlohc//s/+oOuE81rvfc8h6k+UGKc9PoWx9yh4/fC47om24EtxCCmC1JBmOexMX x3/xDdENz8aHLspMcnsCuiYZjMOsGP8KA7/fcDjgXiPfb/d0sBU5MTGvB8DVeu4ekLa7Kp 8FqQdiuqceSxwf4tL8Nruv6FJSKjyyocGnjfwjiIVJh3I/ZGW0yx6gXgPIUcmyfpWPHn0V DAtHc3SzKEiU8BcdpC30mnJMCaIbXW8FnSgX5W1XBPPhMwMcJPyU4x2VVWnX0KPFxjaBU6 ij7+H9tmyNBiF2V/o/lTQklJj+2Hhe0eAAEI2/l2lo6mi4mgjyhWSPk3oWWLWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685711566; a=rsa-sha256; cv=none; b=veKHM9AYynTfHNO0s46ukCoFyqhkJXbyatQJLgnMl21/t6RW3NpNfgLBxbHUdRU71xm1xB UosXa+IdkTHSDK/RPndg25G6T3O/b+UKJOJyG6WsTA7H7XG2xSCnMj0Rvup6VgPJOI+9R3 b49beqPFlfrZqiRonD66iOwMLOgKMge4kAE+17kthSfucb5zfbgDmm+UoaGeNnkrp+z1eP w/b8UfwXGM17JEHCc9bRDy+nKTbtPrU/j7HB24kdOyoQaIviZTSxfb+ePpVXLXWI+MQJo9 iHAAApYLQ5alyZJPfkw0ZikyOwlNxFOwtJ7APwB0JmKTVu/2UvGuv+LhRpBq7g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QXk262flvz10vK for ; Fri, 2 Jun 2023 13:12:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 352DCkZA086810 for ; Fri, 2 Jun 2023 13:12:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 352DCksR086809 for bugs@FreeBSD.org; Fri, 2 Jun 2023 13:12:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271785] [PCI][HotPlug] No BAR mapping after attaching a virtual function to the VM. Date: Fri, 02 Jun 2023 13:12:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: michalx.gulbicki@intel.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271785 Bug ID: 271785 Summary: [PCI][HotPlug] No BAR mapping after attaching a virtual function to the VM. Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: michalx.gulbicki@intel.com During VF hotplug handling, the following routine is executed. pci_add_map() at pci_add_map+0x81/frame 0xfffffe00e50a6c70 pci_add_resources() at pci_add_resources+0x31d/frame 0xfffffe00e50a= 6cf0 pci_add_child() at pci_add_child+0x71/frame 0xfffffe00e50a6d40 pci_rescan_method() at pci_rescan_method+0x454/frame 0xfffffe00e50a= 6dc0 acpi_pci_device_notify_handler() at acpi_pci_device_notify_handler+0x63/frame 0xfffffe00e50a6e00 AcpiEvNotifyDispatch() at AcpiEvNotifyDispatch+0x40/frame 0xfffffe00e50a6e20 Function pci_add_map calls pci_read_bar to get base and mapsize. While procedure=20 (based on PCI Local Bus Specification Revision 3.0 - section 6.2.5.1. Addre= ss Maps) of extracting map size gives the same results as during system boot, = base map is not set (during system both base and size are set correctly). lspci shows incorrect bar mappings: Memory at (64-bit, non-prefetchable) [disabled] Memory at (64-bit, non-prefetchable) [disabled] Memory at (64-bit, non-prefetchable) [disabled] Some experiments have shown that hardwiring from zeros to "1" and re-reading BAR in case of empty base (in pci_read_bar) results in restoring the base to the correct value, and hotplug succeeds. lspci shows correct bar mappings: Memory at fe600000 (64-bit, non-prefetchable) Memory at fe608000 (64-bit, non-prefetchable) Memory at fe610000 (64-bit, non-prefetchable) --=20 You are receiving this mail because: You are the assignee for the bug.=