From nobody Mon Feb 9 01:34:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677674164; cv=none; d=zohomail.com; s=zohoarc; b=lThFGtkz+qvbomjRatGNMLkORLylor0pF52UTL0+y/b06SSWOuzX3ftLXTFlQ7llCymrjZythNygX5CtfiMEw7LFUy1h8B+GvQ7SeX6qIs3pODGknEtrrzl2fl2F5/q70hwe4gy9Wz0NqGM0Ji6nDHvOhqabJ/bnAX/ZC/XsLoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677674164; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NBKuqzwDZoE4RfLV6cdnxbcrggY6eJ/69XjzWKOXnpQ=; b=fsBRzJREB9t8sUhd3ScnXM4Yr868LRrhT5CWELkkFrvRmB6/ktIDUeY3RKgIviLzuuTZuAGHmT9iD0mZqwTcWXCeYLe22YJXmu1xYsyBEi+fqZ+NXj/bAGPryaBykgL/f7+SLRSL3G4F3/RAv4JcuuBy7OX8a3UfpJJHa+0eGwQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1677674164222111.03350524881648; Wed, 1 Mar 2023 04:36:04 -0800 (PST) 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-290-8SciAb2bPBGxpK3xAOaDcQ-1; Wed, 01 Mar 2023 07:35:09 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D6410185A78B; Wed, 1 Mar 2023 12:35:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5064400DB36; Wed, 1 Mar 2023 12:35:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 95FEE1948673; Wed, 1 Mar 2023 12:34:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 080F819465BD for ; Wed, 1 Mar 2023 12:34:41 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0333E492B01; Wed, 1 Mar 2023 12:34:41 +0000 (UTC) Received: from fedora.. (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DA15492B00 for ; Wed, 1 Mar 2023 12:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677674163; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NBKuqzwDZoE4RfLV6cdnxbcrggY6eJ/69XjzWKOXnpQ=; b=Egpb9HtSb+8AF3XCvy9T980Es87quKczzEj38IxaQVQ75jnrO978+6jJ9B/LXKq78EmTA+ Q1gKAd9MNiOpHjEN1HSCBBWArpQo+WVaz28UhZonlqgPTdxKzJnbosU11RWl4Z+cBSJl7c giCa9B2VHv4jXEwWVA7zz0bBUVXLo8A= X-MC-Unique: 8SciAb2bPBGxpK3xAOaDcQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 4/4] qemu: allow forcing emulated maxphysaddr Date: Wed, 1 Mar 2023 13:34:35 +0100 Message-Id: <4889ce59306aab66b395d4c89b612657c969edac.1677674037.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677674165010100001 Treat: as a request not to take the maximum address size from the host. This is useful if QEMU changes the default. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 5 ++++- tests/qemuxml2argvtest.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7eae858813..24a211d9f7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6456,7 +6456,10 @@ qemuBuildCpuCommandLine(virCommand *cmd, break; =20 case VIR_CPU_MAX_PHYS_ADDR_MODE_EMULATE: - virBufferAsprintf(&buf, ",phys-bits=3D%d", addr->bits); + if (addr->bits > 0) + virBufferAsprintf(&buf, ",phys-bits=3D%d", addr->bits); + else + virBufferAddLit(&buf, ",host-phys-bits=3Doff"); break; =20 case VIR_CPU_MAX_PHYS_ADDR_MODE_LAST: diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a7c6b1639e..41116c9571 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2987,6 +2987,7 @@ mymain(void) DO_TEST("cpu-phys-bits-emulate2", QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("cpu-phys-bits-passthrough2", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("cpu-phys-bits-limit"); + DO_TEST_CAPS_LATEST("cpu-phys-bits-emulate-bare"); =20 DO_TEST_CAPS_VER("sgx-epc", "7.0.0"); =20 --=20 2.39.2