From nobody Wed Sep 17 19:25:46 2025 X-Original-To: freebsd-virtualization@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 4cRpf272Dlz67w2J for ; Wed, 17 Sep 2025 19:26:02 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRpf106snz47lg for ; Wed, 17 Sep 2025 19:26:01 +0000 (UTC) (envelope-from ctuffli@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of ctuffli@gmail.com designates 209.85.210.179 as permitted sender) smtp.mailfrom=ctuffli@gmail.com Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-772843b6057so226236b3a.3 for ; Wed, 17 Sep 2025 12:26:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758137159; x=1758741959; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pKcH6rcx1lyHrOgjq/jCtjPd3lTIuU2gcHEujKl9LJE=; b=FWvFeZg9JGfiQKsmuI5FF87kN2PDBcEVEeDWVoApIdKNoj9XG/Kub2IwJbz9ED+Qpl jHDNboShH3HvPRJ1PV5dOB/auj+SqvUXfPSmZa/TonfvEtzun/vPWMN16ThiQ9yPbuMM XkW8j9oqbkvL5G/2plI4GfRIcXHllwXxE703l1Snb+ty18UczAj9uViwVBd1cQSKs2gX SSuWiBQqo01sfDY1dTHlsGuAXbDyX3tE67vF65nabN2xqrUjiPduQ8YffU9Y1KlPqWei Gk2FUrZng9sBtE2jW5PdWsB7e7TKx1ZC9enHsdeIQ7mPLpaeNLEcfqff139S9ca04GiN IBXw== X-Gm-Message-State: AOJu0Yz0QejqkMU7ZKBUZf1UKWbXodKLIUzbLWXGzjYxcY4AGsV1UeYx vEL9BUEgfz9hIo+j7my9UwH9IMK/ff6pV3hbl38PpDhEMpM8CMML4jWs6LXPRA== X-Gm-Gg: ASbGnctYeq15oJwZJI31iUChKcEFqyIqjAeMeGfLd+lp2C7khFA46oMSr6EbqawyxAv HitXxLSldSTggnt6EVaAALeOJtxJKx3m0p97cG2PTCXC9QkR+nOF88cbzvl3WOsQqGKQfCA0WwI nm74BHobDMiYjLviAq1SaCEQjYlYbrBOOqWgDNbnJAlL0rDa56J6kV8cjwDQEQIev12XG7dwiUM LNS/sIrssWSYcW20sgwz8GbcuYXpscDE3jFFO4j69j+qfl0EOX/6/u3ytXdp1VeftP3lbbO0yrF QgAvwrcKdCurSibaHELrwwzxDH3BUMXYt4S4pdPwecIO5PPqRTRrYQCA6rJ5t088nU0CTdACmWf B9J32J2kAhtk5c7xfJeX8XFEcfRtoflRpquKeXVVsS4CLW+/rBHCpD5UH0ppIRHuqFut3DaHQau eNxyTtVx7ptA== X-Google-Smtp-Source: AGHT+IGN1obj1eOw33KHQw33N26CW7lZEAxkCRSR5EFSc4vVULEZiK4/2iREY3E55FGli5zf+OfAKA== X-Received: by 2002:a17:902:eccf:b0:24e:81d2:cfda with SMTP id d9443c01a7336-26810ddadc0mr44410485ad.0.1758137159511; Wed, 17 Sep 2025 12:25:59 -0700 (PDT) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com. [209.85.216.53]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2698016c530sm3494635ad.45.2025.09.17.12.25.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Sep 2025 12:25:58 -0700 (PDT) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-32eb45ab7a0so133973a91.0 for ; Wed, 17 Sep 2025 12:25:58 -0700 (PDT) X-Received: by 2002:a17:90b:4a90:b0:32d:d714:b3eb with SMTP id 98e67ed59e1d1-32ee3e77decmr3321760a91.4.1758137158594; Wed, 17 Sep 2025 12:25:58 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 References: <83666dad-078b-4634-b66c-3153be957567@FreeBSD.org> In-Reply-To: <83666dad-078b-4634-b66c-3153be957567@FreeBSD.org> From: Chuck Tuffli Date: Wed, 17 Sep 2025 12:25:46 -0700 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWABcjfuU-YGXdv_nYU0h-AdVhCyvX5YdalxcFVlki3z21G9l5HsA-K9kWU Message-ID: Subject: Re: Max BAR size for passthru? To: John Baldwin Cc: freebsd-virtualization@freebsd.org, Mark Johnston Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: + X-Spamd-Result: default: False [1.56 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_SPAM_LONG(0.98)[0.976]; NEURAL_HAM_MEDIUM(-0.96)[-0.960]; NEURAL_SPAM_SHORT(0.54)[0.543]; FORGED_SENDER(0.30)[chuck@freebsd.org,ctuffli@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.210.179:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MISSING_XM_UA(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.216.53:received,209.85.210.179:from]; FROM_NEQ_ENVFROM(0.00)[chuck@freebsd.org,ctuffli@gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-virtualization@freebsd.org]; RCPT_COUNT_THREE(0.00)[3] X-Rspamd-Queue-Id: 4cRpf106snz47lg On Tue, Sep 16, 2025 at 4:12=E2=80=AFAM John Baldwin wrot= e: > > On 9/15/25 14:58, Chuck Tuffli wrote: > > I'm trying to get PCI passthru of an AMD GPU working, and am seeing > > what I think is a problem mapping the device's BAR into the guest. The > > host shows: ... > Hmmm, I think it would be useful if you could dump the effective memory > mappings for the guest PAs (the vm_map passed to vm_map_find) to see why > it is failing. Note that the request that is failing is for 2M, not > 256M, so I'm curious if the address is wrong somehow (why isn't it > 0x810000000?) Might be good to confirm which BAR it is trying to > allocate GPA space for. This was a good suggestion as it showed I was running into the guest seeing a "resizable BAR" and trying to resize them. The original host address to guest mapping was fine. Things went poorly after the guest tried to resize the bar. Thanks again for your help! --chuck