From nobody Thu Dec 22 09:22:44 2022 X-Original-To: dev-commits-src-branches@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 4Nd4bT0ShWz1Gn8w; Thu, 22 Dec 2022 09:22:45 +0000 (UTC) (envelope-from git@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 4Nd4bS6brQz4394; Thu, 22 Dec 2022 09:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671700964; 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=4oNF3RKgKCyVtQwi6Qpbw0mtY9w+Y6o5kuwjbuLH4Lw=; b=dgFKZPLh3ch6Bf8siLQFw+l/PzMb8EB7fxrcWog6WFuhLVfCwuJ72hpkceGODYXlU7nSMt bQVEITA/NJz0QxzINzNjJLxOY9YrY2owHPXcZX2fuIhNTEHqwXsKhjzoh2lgYPhL3u4Lwa YA8JVJdnFgih9xno01KrwwuWEQNRn9PbTy64XHULcVmA7weMlF14l4PMTFhtnETHnq1BRx 5RugACUNED0yWgpOXhlaYXgT80anQi3l2xJ5QH9UyCOzV/TEdit5RBDW5zMAWM/N3zWju6 J7FNum1JsRyRrk3Txe974y3CZKhrTvANHdFhL2749NaoiaZ5pduHVJD79zHQ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671700964; 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=4oNF3RKgKCyVtQwi6Qpbw0mtY9w+Y6o5kuwjbuLH4Lw=; b=eMYwvMrrhFJ66wXDyj3ompiOFbEsCEtWFQ7n1BiAJgQF6lBU2IWohdGDWbY+mpaMJo4ztf bh9O8kufWqpXWkQW9RKfl3EZ9uT/0QcfhNllXSsRXsQHg2jTz9gkWbtKvwRhmH9gmoyiE+ oIDwN/jByEd3NGpj0pIaWqV32ibVSd/JsIhpvAbi2VSXQbOeOThj/EQq8lXZYS10mk10zo LZJVfBm3esTx2yr/JMUP9vwJfGJznZk/dWYVcChtC5IHTIbgIVUbPp2heBX+MBw+odYR5M UAv4C0bisdZX6SGFA38V/7LXCoEv+rHCuWqdoROdN9VUNo1Xn93Gf/R7VnK1DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671700964; a=rsa-sha256; cv=none; b=mEWDNyVdgNTcn/eG/s7QcboQzJqmgVRhiEPqLxLyMhT+xtmQviGtBgv+hFHcLiaYhaw6P/ aND3GPB9W7F98ucMSlpMA/o+91m57fAemv7+sddiecYpWGIzuiZYnaGvZ2KIzgbZ+AG1D1 PQy6d/uMUb7K06EPA+92Jm+qJalW9N15JD2tVqQYKA+mUBXSgmVIY8oqLQzq9Q9EuRwMLe zmSwWtd2ev+6Y2xzI/grErkWWH3UWYb1lRjhGdZKhjuJqtCC8a/GLRznBuOW9BzUazpGqD BBMRoVI6PNuo5JeTRfWHW20xe5luukekG2dUeF+uGWX2AODvFAmm6BuNBV6tcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Nd4bS5gYpzpvw; Thu, 22 Dec 2022 09:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BM9Mi1R038662; Thu, 22 Dec 2022 09:22:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BM9MiRa038661; Thu, 22 Dec 2022 09:22:44 GMT (envelope-from git) Date: Thu, 22 Dec 2022 09:22:44 GMT Message-Id: <202212220922.2BM9MiRa038661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 56b2358b2f68 - stable/13 - vmm: increase vlapic version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 56b2358b2f68b1781b4a555b94a63d2792f27fcc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=56b2358b2f68b1781b4a555b94a63d2792f27fcc commit 56b2358b2f68b1781b4a555b94a63d2792f27fcc Author: Corvin Köhne AuthorDate: 2022-10-10 12:56:00 +0000 Commit: Corvin Köhne CommitDate: 2022-12-22 09:12:21 +0000 vmm: increase vlapic version Mac os panics on apic versions lower than 0x14. See https://opensource.apple.com/source/xnu/xnu-7195.81.3/osfmk/i386/lapic_native.c.auto.html Additionally, an upcoming commit will validate the icr values written by the guest. Older intel processors allow some different combinations than the newer ones. AMD documents that only the newer combinations are allowed. So, bumping the version allows us to avoid a differentiation between AMD and Intel. Intel documents that newer processors than the P6 are using the new combinations. Sadly, Intel does not document which apic version belongs to those processors. Linux identifies newer apics by a version larger or equal to 0x14. Intel and AMD allow apic version between 0x10 and 0x15. So, using 0x14 seems to be fine. See https://github.com/torvalds/linux/blob/3eba620e7bd772a0c7dc91966cb107872b54a910/arch/x86/kernel/apic/apic.c#L238 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D36945 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit f56801d6d9777ba0a7e398d370bb755de8102697) --- sys/amd64/vmm/io/vlapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c index d2e60fc3baeb..d660b0a3f195 100644 --- a/sys/amd64/vmm/io/vlapic.c +++ b/sys/amd64/vmm/io/vlapic.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #define PRIO(x) ((x) >> 4) -#define VLAPIC_VERSION (16) +#define VLAPIC_VERSION (0x14) #define x2apic(vlapic) (((vlapic)->msr_apicbase & APICBASE_X2APIC) ? 1 : 0)