From nobody Mon Apr 29 00:57:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1611556164; cv=none; d=zohomail.com; s=zohoarc; b=Bdg4O8yJU1ISXyr4C/1JzGkF13WragvuLe5KrnFswtF/h9DkUry032FSIstfcoHCEv44+JhFqWnY2cg0l8G7xPOe9faZUgJI5vAoHf7zOXpUlmbXhCWMamATnC/rVH+IVwO41kzEMygaMoJBievoBNYx8P8RiHjvkPdqWWpGi3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611556164; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=BepeJB9aKnEgtmR76Q7jW1cnZXDWzK9K5/gFBuozf0E=; b=Yenp/X9lcvusu+Y+tpyPwT9N7/0c3c+qbiIZuZfc/5R+w4KPZ+GYTwoHWd2OZYKMv+weY9AThV/hNwrdeHz6jx8pq98hACV7HYB5678a8mhOcLawdtPyCYJ27T6djbZePfWsHJ4z/hj0S2GYbUjYgotzt10upJ5GGWivH18rahQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1611556164418959.619310009001; Sun, 24 Jan 2021 22:29:24 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-500-ohHqmUJqMLWooBsEiGfsCQ-1; Mon, 25 Jan 2021 01:29:21 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BAE451005513; Mon, 25 Jan 2021 06:29:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2747660C5F; Mon, 25 Jan 2021 06:29:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D02D418095FF; Mon, 25 Jan 2021 06:29:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10P6TBXf015611 for ; Mon, 25 Jan 2021 01:29:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5815470481; Mon, 25 Jan 2021 06:29:11 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.193.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01A1570476 for ; Mon, 25 Jan 2021 06:29:08 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id B9E902412FA; Mon, 25 Jan 2021 07:29:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611556163; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BepeJB9aKnEgtmR76Q7jW1cnZXDWzK9K5/gFBuozf0E=; b=iQ5K29poVSenGMgzaOaz89ue4ekxWQowhJYxqL8rN3U0SEMoCCGoKkgmxlX8FB8VmqosJw pdfEKnxzhzMkCTEczJKFq+wAwpxY9VaoPbDzCIlzQaKRK0Qwo5gVEtC20odfG/6TLkxNE9 CjeQ6MibuRea3EkcqYPgPG8yd6jzzzg= X-MC-Unique: ohHqmUJqMLWooBsEiGfsCQ-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH] cpu_map: Remove intel-pt from x86 CPU models Date: Mon, 25 Jan 2021 07:29:03 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" As explained in QEMU commit 4c257911dcc7c4189768e9651755c849ce9db4e8 intel-pt features should never be included in the CPU models as it was not supported by KVM back then and even once it started to be supported, users have to enable it by passing pt_mode=3D1 parameter to kvm_intel module. The Icelake-* CPU models with intel-pt included were added to QEMU 3.1.0 and removed right in the following 4.0.0 release (and even in 3.1.1 maintenance release). In libvirt 6.10.0 I introduced 'removed' attribute for features included in our CPU model definitions which we can use to drop intel-pt from Icelake-* CPU models. Back then I explained we can safely do so only for features which could never be enabled, which is not the case of intel-pt. Theoretically, it could be possible to create an environment in which QEMU would enable intel-pt without asking for it explicitly: it would need to use a new enough kernel (not available at the time of QEMU 3.1.0) and pt_mode KVM parameter in combination with QEMU 3.1.0 running a domain with q35 machine type and all that on a CPU which didn't really exist at that time. Migrating such domain to a host with newer SW stack including libvirt with this patch applied would result in incompatible guest ABI (the virtual CPU would lose intel-pt). However, QEMU changed its CPU models unconditionally and thus migration would not work even without this patch. That said, it is safe to follow QEMU and remove the feature from Icelake-* CPU models in our cpu_map. https://bugzilla.redhat.com/show_bug.cgi?id=3D1853972 Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/cpu_map/x86_Icelake-Client-noTSX.xml | 2 +- src/cpu_map/x86_Icelake-Client.xml | 2 +- src/cpu_map/x86_Icelake-Server-noTSX.xml | 2 +- src/cpu_map/x86_Icelake-Server.xml | 2 +- tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml | 1 + .../cpu-Icelake-Server-pconfig.x86_64-3.1.0.args | 2 +- .../cpu-Icelake-Server-pconfig.x86_64-latest.args | 2 +- 8 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cpu_map/x86_Icelake-Client-noTSX.xml b/src/cpu_map/x86_Ice= lake-Client-noTSX.xml index 65e648ae21..217adba4f2 100644 --- a/src/cpu_map/x86_Icelake-Client-noTSX.xml +++ b/src/cpu_map/x86_Icelake-Client-noTSX.xml @@ -30,7 +30,7 @@ - + diff --git a/src/cpu_map/x86_Icelake-Client.xml b/src/cpu_map/x86_Icelake-C= lient.xml index 5cf32e91fa..b725227f46 100644 --- a/src/cpu_map/x86_Icelake-Client.xml +++ b/src/cpu_map/x86_Icelake-Client.xml @@ -31,7 +31,7 @@ - + diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Ice= lake-Server-noTSX.xml index 34a0f7c18c..7c9c32c977 100644 --- a/src/cpu_map/x86_Icelake-Server-noTSX.xml +++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml @@ -37,7 +37,7 @@ - + diff --git a/src/cpu_map/x86_Icelake-Server.xml b/src/cpu_map/x86_Icelake-S= erver.xml index 1ee4ea9cd4..b4685bead0 100644 --- a/src/cpu_map/x86_Icelake-Server.xml +++ b/src/cpu_map/x86_Icelake-Server.xml @@ -38,7 +38,7 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml b/tes= ts/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml index 3a71b28cfb..7fcd20d26d 100644 --- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml @@ -21,6 +21,7 @@ + diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml b/test= s/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml index 1582de0422..07e8f8bc24 100644 --- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml @@ -22,6 +22,7 @@ + diff --git a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0= .args b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args index 96d4306238..b69bfe0f0f 100644 --- a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args @@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=3Dnone \ -object secret,id=3DmasterKey0,format=3Draw,\ file=3D/tmp/lib/domain--1-test/master-key.aes \ -machine pc-i440fx-3.1,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff \ --cpu Icelake-Server,pconfig=3Doff \ +-cpu Icelake-Server,pconfig=3Doff,intel-pt=3Doff \ -m 214 \ -overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ diff --git a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-lates= t.args b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.ar= gs index a512623af6..64f223bee3 100644 --- a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args +++ b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args @@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=3Dnone \ -object secret,id=3DmasterKey0,format=3Draw,\ file=3D/tmp/lib/domain--1-test/master-key.aes \ -machine pc,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dp= c.ram \ --cpu Icelake-Server \ +-cpu Icelake-Server,intel-pt=3Doff \ -m 214 \ -object memory-backend-ram,id=3Dpc.ram,size=3D224395264 \ -overcommit mem-lock=3Doff \ --=20 2.30.0