From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id B4D7F5A0082 for ; Fri, 24 Feb 2023 08:14:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677222860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TNa6WrRfNrIzF2Q3l4GNkVFrucMbjn+Smy1Z/HLwBZM=; b=iqPKu64kCtcrME+PqNgPRYJ01MMGSpqs0Cey2lVdc+ZotK+mZ57lBVFgKuro0079gDeKBa jMzdJNL1UuiD7NDEvWpReLCLo41FbT+rIwZUR0+mS0BDCSGMG/S7eHEes3mkQnwvbJydgP qCrRcxX80zOREXjqBVl/25OOz60fB6U= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-98-j2yptnTyNVidzE0nN4sJgQ-1; Fri, 24 Feb 2023 02:14:19 -0500 X-MC-Unique: j2yptnTyNVidzE0nN4sJgQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1E59795D607; Fri, 24 Feb 2023 07:14:19 +0000 (UTC) Received: from maya.cloud.tilaa.com (unknown [10.33.32.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7B18492B14; Fri, 24 Feb 2023 07:14:18 +0000 (UTC) Date: Fri, 24 Feb 2023 08:14:16 +0100 From: Stefano Brivio To: Andrea Bolognani Subject: Re: [PATCH] qrap: Pass PCI device numbers to qemu in base 10, not in base 16 Message-ID: <20230224081416.47b85d01@elisabeth> In-Reply-To: References: <20230221192425.3745394-1-sbrivio@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: MGND6WDUZTCEURSUVQJKEHAGDOKIMF4B X-Message-ID-Hash: MGND6WDUZTCEURSUVQJKEHAGDOKIMF4B X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson , passt-dev@passt.top, Alona Paz X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 23 Feb 2023 06:06:17 -0800 Andrea Bolognani wrote: > On Thu, Feb 23, 2023 at 09:27:14AM +1100, David Gibson wrote: > > On Wed, Feb 22, 2023 at 02:40:32AM -0800, Andrea Bolognani wrote: > > > I don't think this is going to work. > > > > > > The problem is that, while PCI buses are indeed named with increasing > > > numbers in integer format (pci.9, pci.10 and so on), PCI slots are > > > addressed using hexadecimal format (0x9, 0xa and so on). libvirt uses > > > this naming convention because it matches QEMU's. > > > > Actually, I think we're ok. PCI slots are addressed in hex by > > convention, but AFAICT if you *just* give a slot number, it will > > accept either decimal or hex (so addr=10 and addr=0xa are equivalent). > > That's *not* true if you use SS.F format to include the function > > number - then it expects hex only. But we're not doing that, so so > > always using decimal should be ok here. > > > > Source: set_pci_devfn() in the qemu source > > > > Obviously that's a pretty fragile hack, but that's 'qrap' for you. > > Yeah, even if that happens to work I'd rather not rely on it, > especially since a proper solution doesn't look like it would be a > lot of additional effort. > > I've managed to reproduce the original issue in the context of > KubeVirt. I'll hopefully have a patch ready soon. Andrea, allow me to do this: I would push this patch meanwhile, along with the changes for the DNS issue you reported, because that one might impact many users, and I think it makes sense to have a fix out soon. I start thinking it's also part of the issue Paul reported for Podman with pasta here: https://github.com/containers/podman/issues/17074 This patch itself can't hurt, and it changes exactly two letters. As soon as you have something less qrappy we'll go with that (you don't even need to rebase, I'll revert this one on the tree first). -- Stefano