From nobody Sat Jun 20 10:44:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1781610048; cv=none; d=zohomail.com; s=zohoarc; b=detmuLU5qNhSXIMGbyWrAjrYq51WPp8wO65to96ATGfVED/v+RNyA1lZtYZXuR4IOkGT9jNOY+G0z2qxTklXE6pJFgC6S/pO8Z4rck5QUYTV2/5LhRDYn37acTcQBNlpFj7cwAWBSiBfKNayAyIfVMnnxaXLG1DzwmRBued4hYc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781610048; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=f9DhG1RZ0xiQUtYCB6yQic/njWnuE+L8toJoYSSJ5JE=; b=mT7/JIShlwwWP78utKoUcj+JHvfIKr7ymrRWL9ImnULDob8EqSWsoCV/vjQ4nyl9FmC2lO/3xI5/KlPyfmRn3AnhBK/hrh9h6tq2VbR6QxNTkES2s09Mtc1y35sXy4LWJYrIBdPMMIZ2eG92erAJyBHxpa2REm6NqgyxCyy7aAU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781610048542848.3130603992886; Tue, 16 Jun 2026 04:40:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZS96-0005Sj-Pb; Tue, 16 Jun 2026 07:39:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZS94-0005Rn-Mj; Tue, 16 Jun 2026 07:39:54 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZS92-0003of-PX; Tue, 16 Jun 2026 07:39:54 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GAIRED1227729; Tue, 16 Jun 2026 11:39:51 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4es1wm5bkn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Jun 2026 11:39:50 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 65GBYZuO014602; Tue, 16 Jun 2026 11:39:49 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4eshhq392a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Jun 2026 11:39:49 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 65GBdkkC45547868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jun 2026 11:39:46 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3163020049; Tue, 16 Jun 2026 11:39:46 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B61E220040; Tue, 16 Jun 2026 11:39:42 +0000 (GMT) Received: from localhost.localdomain (unknown [9.39.31.150]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Jun 2026 11:39:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=f9DhG1RZ0xiQUtYCB 6yQic/njWnuE+L8toJoYSSJ5JE=; b=qvUgKTleNZQ0v2O59SkonrZ9xZj5Ympk4 hBrzcUlG21g/e9AIhYz+d8m53v1THR1Kk6qvDp5KGCL5NeDjYx3Bci+lYcW8HV93 xYNnlD0x48/4ToQ+z/bqrslSQi0EyJzToY/dMnGPjlnNGFtiQwHJH2KNYHyEwSKE 9bI2xCwheaOfoBNqKuJ81yeoa5uLKpdOk/uAwSIxaXi+HQekpAIPBCYN1Cy5Fzof 4rIv5Ndtc+cpl4naP0IRAZogTxU20s7DZiwiLTVn7KWCbczdf+zXPeZzM6kMxeA7 QNXuVuvPxoS8T35iDbRVEeRcrz9/aXc7QdWzO8Xs7iku7/X0ubCEQ== From: Amit Machhiwal To: qemu-ppc@nongnu.org, Harsh Prateek Bora Cc: Amit Machhiwal , Vaibhav Jain , Nicholas Piggin , Chinmay Rath , Glenn Miles , Paolo Bonzini , kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [PATCH v3 1/3] [DO_NOT_MERGE] linux-headers: Add uapi header changes Date: Tue, 16 Jun 2026 17:09:13 +0530 Message-ID: <20260616113915.25589-2-amachhiw@linux.ibm.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260616113915.25589-1-amachhiw@linux.ibm.com> References: <20260616113915.25589-1-amachhiw@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDExNSBTYWx0ZWRfX8nmTWoKM21PK Fn/0nJgGPrQlsAv7PVaDZK3TblmgyTM0Puss/GIxTTp0haTaLfTLpj3axHWMlJ2/pMZPPCkHePI tdTozc51Xhz+peUjY/k4R4OkJ07NIQs= X-Proofpoint-GUID: yY93XW8x9DzwyHUS2jrVP8D-nFLQtysE X-Authority-Analysis: v=2.4 cv=SY/HsPRu c=1 sm=1 tr=0 ts=6a313607 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=FelO9ux0wxsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=U7nrCbtTmkRpXpFmAIza:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=lArzyTj6eNMAAlWrubwA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDExNSBTYWx0ZWRfX6g6cOHX/lZzD Lb666X14uapfR9zXg+2Dr7pDlDz8TCWfuJrajEJDicrGkX+LB6zK//+Shpn49K94hkGonvBdKNe 86ntCMFaq6s64CBBjRfeAjswUIRsOSAVk9paZ/g6ZHnHarhzIdYlY+uEQj2AUUumoth9a0HRk9Q U51Cjjr/Aet5JGArW5hoKUEKON6Nh8/7ovXm0qHACnOSHVDERg40lJrRjeQmGoJY/+Zz/o9Ug3D inuHgfPO9/50DYOztmdUrOdZIGwR1KrVz0Ko74oQR1+YcFbxl2EZaX/Q2S+KtJscrZAm4MLNhvg kQjejP5kqwaGHB2d9PYas5jNTJIEqdt3zy5XYoijVjnMGL/3YB2SaCtxrC2zF7zUV9fFroSHcDQ Rxwsc/g6DrjO5VpOOATLz+cTJ6UK3h3i3hSWQ4BmQcg/yd+xMJOZ0/H6AvHjOQx/JGRthUABDrD ianW+ze+uK9XthGaDpw== X-Proofpoint-ORIG-GUID: v9X0rEea5LZfqBY1LZF-OKh4cqrlIfKR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_03,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160115 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=amachhiw@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1781610049715158500 Content-Type: text/plain; charset="utf-8" This is a temporary patch intended for review and testing purposes only. It syncs the QEMU linux-headers with the kernel changes that introduce the KVM_PPC_GET_COMPAT_CAPS ioctl for querying host CPU compatibility capabilities. This includes the kvm_ppc_compat_caps structure with a size field for ABI versioning, the KVM_CAP_PPC_COMPAT_CAPS capability definition, the KVM_PPC_GET_COMPAT_CAPS ioctl definition, and capability bit definitions for POWER9, POWER10, and POWER11 compatibility modes. The actual header sync will be done via scripts/update-linux-headers.sh once the kernel changes [1] are merged upstream. [1] https://lore.kernel.org/all/20260430054906.94431-1-amachhiw@linux.ibm.c= om/ Signed-off-by: Amit Machhiwal --- linux-headers/asm-powerpc/kvm.h | 18 ++++++++++++++++++ linux-headers/linux/kvm.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kv= m.h index 077c5437f521..22ee61bdc812 100644 --- a/linux-headers/asm-powerpc/kvm.h +++ b/linux-headers/asm-powerpc/kvm.h @@ -437,6 +437,24 @@ struct kvm_ppc_cpu_char { __u64 behaviour_mask; /* valid bits in behaviour */ }; =20 +/* For KVM_PPC_GET_COMPAT_CAPS */ +struct kvm_ppc_compat_caps { + __u64 flags; /* Reserved for future use */ + __u64 size; /* Size of this structure */ + __u64 compat_capabilities; /* Capabilities supported by the host */ +}; +/* + * Capability bits for compat_capabilities field in kvm_ppc_compat_caps. + * These bits indicate which processor compatibility modes are supported. + */ +#define KVM_PPC_COMPAT_CAP_POWER9 (1ULL << 62) +#define KVM_PPC_COMPAT_CAP_POWER10 (1ULL << 61) +#define KVM_PPC_COMPAT_CAP_POWER11 (1ULL << 60) +#define KVM_PPC_COMPAT_BITMASK (KVM_PPC_COMPAT_CAP_POWER9 | \ + KVM_PPC_COMPAT_CAP_POWER10 | \ + KVM_PPC_COMPAT_CAP_POWER11) + + /* * Values for character and character_mask. * These are identical to the values used by H_GET_CPU_CHARACTERISTICS. diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 50e87ed72c20..a3dbf7c317b9 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -985,6 +985,7 @@ struct kvm_enable_cap { #define KVM_CAP_S390_USER_OPEREXEC 246 #define KVM_CAP_S390_KEYOP 247 #define KVM_CAP_S390_VSIE_ESAMODE 248 +#define KVM_CAP_PPC_COMPAT_CAPS 249 =20 struct kvm_irq_routing_irqchip { __u32 irqchip; @@ -1329,6 +1330,8 @@ struct kvm_s390_keyop { /* Available with KVM_CAP_COUNTER_OFFSET */ #define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_count= er_offset) #define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_= range) +/* Available with KVM_CAP_PPC_COMPAT_CAPS */ +#define KVM_PPC_GET_COMPAT_CAPS _IOR(KVMIO, 0xe4, struct kvm_ppc= _compat_caps) =20 /* ioctl for vm fd */ #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) --=20 2.50.1 (Apple Git-155) From nobody Sat Jun 20 10:44:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1781610048; cv=none; d=zohomail.com; s=zohoarc; b=Jlz5ITqzW1yxfudPN6/pM8kjy9u5QU5gWzIlmajU54sWJAGhTMBJSRNLsKtiMSr+jhetCN6QQsO4lE3VawKMf44/kP34HOIAquuCzzL/f5ckaW+nT2Sk6cerZWUY0C2sFcutnKmolgjAstbbVBCIuVMstmfSD39hHQeKqKyKBTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781610048; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=n8WvYGs25F/48/tvkhiOnzWM6MgyGgqsCkskOjjmMRg=; b=QhC+36xK3wZGU0twhENtLvGa/+u1fSyjNn/rczPezB0APjf4iq2mBlzlXfvVMCqEI6tEfgRpwe9AuvK9uzvCLrD3xLPrW0iQhNFsEfgs+pSEba9Z0r3r96VixwDsH+maIMqtu5ZYzZjYcIqABX0GR6kg2MdAl8g7SetcYQ/X9v4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781610048771290.9972184992288; Tue, 16 Jun 2026 04:40:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZS9C-0005VL-AO; Tue, 16 Jun 2026 07:40:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZS9A-0005Tj-EK; Tue, 16 Jun 2026 07:40:00 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZS98-0003pb-JS; Tue, 16 Jun 2026 07:40:00 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GAInja1228387; Tue, 16 Jun 2026 11:39:57 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4es1wm5bm6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Jun 2026 11:39:56 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 65GBYhCF012004; Tue, 16 Jun 2026 11:39:55 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4esjhk330c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Jun 2026 11:39:55 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 65GBdpV561342076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jun 2026 11:39:51 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7460820049; Tue, 16 Jun 2026 11:39:51 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6679720040; Tue, 16 Jun 2026 11:39:48 +0000 (GMT) Received: from localhost.localdomain (unknown [9.39.31.150]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Jun 2026 11:39:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=n8WvYGs25F/48/tvk hiOnzWM6MgyGgqsCkskOjjmMRg=; b=p1RjU15bZ4NNi+WwHxSeiwj+cvasm5Y1n XBySJJ8Ey85XAmKYAl5fVgJYrHxRiSY6WvcZ34eRhkGjUNB+wFnUu5kjteJq+M8E ZfctIXdZFnhYsjz7vLkRcpPlK6xZ+nOwHnpx7h/THeT2D17jLSmr+A5bbeLmUTvL 5K1LdoL+XQ/F8h/oGPm4TITmqh4IBUL0h+0hm/WPsoPCUuNxbl2or8AU3Q0tLEAk eLYgyQBR7pAlJ2WtA3ZggxIFOfVcKxLZ8Q5F6kRxUgA8mDgiMwSxSwnFB1mFV02W y8UQMhATpH7/4a+Q0avlRJoSu9dWG/WwkqZsKUwcj0Gs1dZfQkPxg== From: Amit Machhiwal To: qemu-ppc@nongnu.org, Harsh Prateek Bora Cc: Amit Machhiwal , Vaibhav Jain , Nicholas Piggin , Chinmay Rath , Glenn Miles , Paolo Bonzini , kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [PATCH v3 2/3] target/ppc/kvm: Add support for querying host compatibility mode Date: Tue, 16 Jun 2026 17:09:14 +0530 Message-ID: <20260616113915.25589-3-amachhiw@linux.ibm.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260616113915.25589-1-amachhiw@linux.ibm.com> References: <20260616113915.25589-1-amachhiw@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDExNSBTYWx0ZWRfX0LivrA0rqoDG tDNYcFdvJ1COGXm0k4hcsSEGPXOL7qLU7FY1uRey4QsXx6wDWVsgczkG2m+04kce+6KXNCySlbM MWGGP6E1EmgqztAJDUkS63BuZrJXo6k= X-Proofpoint-GUID: tyadm6yUtHZ_qObKBc4tXYUrK84CeE4c X-Authority-Analysis: v=2.4 cv=SY/HsPRu c=1 sm=1 tr=0 ts=6a31360c cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=FelO9ux0wxsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=U7nrCbtTmkRpXpFmAIza:22 a=VnNF1IyMAAAA:8 a=cv104ikJZnni9qh6AyoA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDExNSBTYWx0ZWRfX14Bdf3Ov0F3P cWZh4L/ICxpIt+WYVbPGXVm7I1axYa6n0eroGkFBt/3hmEuND5uuoRLXd5VsvMgFDNoFWyUAsTo k3Zs7bJkKBH2lOEDokMg5PWquLCNSB1VYbPa80BczGYg3vKJ/aKOhRiCSvQG87Lim8dBN2QXSVO bGHjX5qR9xEN9JaXPs9D+iZvnzHVTlp53ZLrHhuEx5vfhk4y38cAnwb2ZIqR+UwV/VPjumgR3sY g4xZgXY1TfKAwDkmb/6aN1Ct05CeTAqqqH2llY4opPS9G/Ht7n9hcmvckY4nWBA8b2zYWtTUFiq csdq4s6/pIRDLvBp7pbALQCYLE7oAxezJJbBI1LiQGmLhbBA5ENCFD6LCmLnY4Osolg9lf8zEOS WQKpMMkrtlvW3uJx1/L6xLDVVXmtdmkigzjsvBASqOaDKDYMjLhccD/waPcVFOhWNKqsWBjc76Q Jo8Vlr10f0ZoeL1uzwg== X-Proofpoint-ORIG-GUID: 2yWu-0cuJRBluJriMR_xO-yplNvc0apB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_03,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160115 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=amachhiw@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1781610049747158500 Content-Type: text/plain; charset="utf-8" Add infrastructure to query the host CPU compatibility mode via the KVM_PPC_GET_COMPAT_CAPS ioctl. This allows QEMU to determine if the host is running in a compatibility mode (e.g., a Power11 processor operating in Power10 compatibility mode). The kvmppc_get_compat_caps() function queries KVM for host compatibility capabilities with size field validation for ABI compatibility between QEMU and the kernel. The kvm_ppc_host_compat_pvr() function derives the effective PVR based on the compatibility mode reported by KVM. Additionally, cas_check_pvr() in hw/ppc/spapr_hcall.c is updated to prevent fallback to raw mode when the host is running in compatibility mode. This ensures that nested guests cannot exceed the host's compatibility level. If the capability is not supported or the query fails, the functions return 0, allowing fallback to existing behavior. Signed-off-by: Amit Machhiwal --- hw/ppc/spapr_hcall.c | 14 ++++++++++ target/ppc/kvm.c | 65 ++++++++++++++++++++++++++++++++++++++++++++ target/ppc/kvm_ppc.h | 16 +++++++++++ 3 files changed, 95 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 60ba215e8611..68c29fbe141b 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1135,6 +1135,7 @@ static uint32_t cas_check_pvr(PowerPCCPU *cpu, uint32= _t max_compat, { bool explicit_match =3D false; /* Matched the CPU's real PVR */ uint32_t best_compat =3D 0; + uint32_t compat_host_pvr =3D 0; int i; =20 /* @@ -1162,6 +1163,19 @@ static uint32_t cas_check_pvr(PowerPCCPU *cpu, uint3= 2_t max_compat, } } =20 + if (explicit_match) { + compat_host_pvr =3D kvm_ppc_host_compat_pvr(); + /* + * If the host is booted in a compatibility mode, do not try booti= ng in + * the raw mode as it may allow KVM guests to boot with a higher C= PU + * version compared to what host was booted with; which should not= be + * allowed. + */ + if (compat_host_pvr) { + explicit_match =3D false; + } + } + *raw_mode_supported =3D explicit_match; =20 /* Parsing finished */ diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index b94c2997a07f..9e5006e0c2cd 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2602,6 +2602,71 @@ bool kvmppc_supports_ail_3(void) return cap_ail_mode_3; } =20 +#if defined(TARGET_PPC64) +static target_ulong kvmppc_get_compat_caps(void) +{ + struct kvm_ppc_compat_caps host_compat; + target_ulong host_caps; + int ret; + + if (!kvm_check_extension(kvm_state, KVM_CAP_PPC_COMPAT_CAPS)) { + return 0; + } + + /* Initialize the structure with size field for forward compatibility = */ + memset(&host_compat, 0, sizeof(host_compat)); + host_compat.size =3D sizeof(host_compat); + + ret =3D kvm_vm_ioctl(kvm_state, KVM_PPC_GET_COMPAT_CAPS, &host_compat); + if (ret < 0) { + fprintf(stderr, "KVM: failed to get host capabilities\n"); + return 0; + } + + /* + * Validate the returned size matches our structure size. + * The kernel validates that userspace provides sufficient size before + * the ioctl, and returns its own structure size. A mismatch indicates + * a version incompatibility between QEMU and the kernel. + */ + if (host_compat.size !=3D sizeof(host_compat)) { + fprintf(stderr, "KVM: host_compat size mismatch (expected %zu, got= %lu)\n", + sizeof(host_compat), host_compat.size); + return 0; + } + + host_caps =3D host_compat.compat_capabilities; + return host_caps; +} + +uint32_t kvm_ppc_host_compat_pvr(void) +{ + uint32_t compat_host_pvr =3D 0; + int cap_idx =3D 0; + target_ulong host_caps =3D kvmppc_get_compat_caps(); + + host_caps =3D host_caps & KVM_PPC_COMPAT_BITMASK; + if (host_caps) { + cap_idx =3D 63 - __builtin_ctzll(host_caps); + switch (cap_idx) { + case KVM_PPC_COMPAT_CAP_P9_IDX: + compat_host_pvr =3D CPU_POWERPC_POWER9_DD22; + break; + case KVM_PPC_COMPAT_CAP_P10_IDX: + compat_host_pvr =3D CPU_POWERPC_POWER10_DD20; + break; + case KVM_PPC_COMPAT_CAP_P11_IDX: + compat_host_pvr =3D CPU_POWERPC_POWER11_DD20; + break; + default: + break; + } + } + + return compat_host_pvr; +} +#endif /* TARGET_PPC64 */ + PowerPCCPUClass *kvm_ppc_get_host_cpu_class(void) { uint32_t host_pvr =3D mfpvr(); diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 742881231e16..5970e7383740 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -81,6 +81,17 @@ bool kvmppc_supports_ail_3(void); int kvmppc_enable_hwrng(void); int kvmppc_put_books_sregs(PowerPCCPU *cpu); PowerPCCPUClass *kvm_ppc_get_host_cpu_class(void); + +/* + * Bit position indices for KVM_PPC_COMPAT_CAP_* capabilities. + * These represent the result of (63 - bit_number) for each capability bit. + * Used for identifying which compatibility mode is supported by the host. + */ +#define KVM_PPC_COMPAT_CAP_P9_IDX 1 /* 63 - 62 */ +#define KVM_PPC_COMPAT_CAP_P10_IDX 2 /* 63 - 61 */ +#define KVM_PPC_COMPAT_CAP_P11_IDX 3 /* 63 - 60 */ + +uint32_t kvm_ppc_host_compat_pvr(void); void kvmppc_check_papr_resize_hpt(Error **errp); int kvmppc_resize_hpt_prepare(PowerPCCPU *cpu, target_ulong flags, int shi= ft); int kvmppc_resize_hpt_commit(PowerPCCPU *cpu, target_ulong flags, int shif= t); @@ -440,6 +451,11 @@ static inline PowerPCCPUClass *kvm_ppc_get_host_cpu_cl= ass(void) return NULL; } =20 +static inline uint32_t kvm_ppc_host_compat_pvr(void) +{ + return 0; +} + static inline void kvmppc_check_papr_resize_hpt(Error **errp) { } --=20 2.50.1 (Apple Git-155) From nobody Sat Jun 20 10:44:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1781610030; cv=none; d=zohomail.com; s=zohoarc; b=Kh/gcfw+3FARu+AADfTMXK2LmYRlpc+J0+Uo+nfiTxFO2vetUFdhdqXLopFUkotwbfs/Cst/Ceou0agKPgQCIWF3Ps3n7BEOSq6RMBnyuOhp4RMWLMXfaWJGMG36XklC80yZZHKTMSBRSf4+AjuHLOfncczcNz54t7N2Q7xNNpk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781610030; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZUdoNLwSVIuk62bXZ67XSBlvUH9tV9NzX1E3a3D6kDo=; b=T1bD/XD+HGQIWvHtZFJHq0LYsilc4F9VI6SmOWkqE+E9AN6xWrKKIbLs1gw4n9riSyGWhGbM+M9vrldJTuhr7EdeE062J0fgHkgM3u6TNiKATo/JnGoSzzmrVsqYJytuQ+TQdSnCfbTuzudykT7k1yQ3I8ZhkaItDyQ0z9s3dfY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781610030078980.7981183747719; Tue, 16 Jun 2026 04:40:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZS9F-0005Y0-SC; Tue, 16 Jun 2026 07:40:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZS9E-0005Ws-GN; Tue, 16 Jun 2026 07:40:04 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZS9C-0003q3-Ox; Tue, 16 Jun 2026 07:40:04 -0400 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GAIlnl1397005; Tue, 16 Jun 2026 11:40:01 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4es1h85e6d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Jun 2026 11:40:00 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 65GBYv07012469; Tue, 16 Jun 2026 11:39:59 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4esk1h31am-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Jun 2026 11:39:59 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 65GBdt4046072210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jun 2026 11:39:55 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E8AE20049; Tue, 16 Jun 2026 11:39:55 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F128620040; Tue, 16 Jun 2026 11:39:52 +0000 (GMT) Received: from localhost.localdomain (unknown [9.39.31.150]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Jun 2026 11:39:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=ZUdoNLwSVIuk62bXZ 67XSBlvUH9tV9NzX1E3a3D6kDo=; b=m/9g+F+U5LGJXaZZci28qRWtQD3IGz6WO 15dd4pzeI5YetVoU3t/CVIFR4mFR+QgPIEqHaOQTvGAGum1fYBMRWYPv4+XK6Ij2 LQvxhzIL+SBdcCH3OD2OtejR9fxqedwjl29ZvIeH53r//p/o83phfndDE24FYOq1 paVNisTsGw3tXmjBAqU0TpSCTmrFuNnYiH3J0W9tvM1L/LMjI/LGoWvaB7meJMZU a9VPC2cwnvVrlR4KhxUmh+/oQL7xDjk/lnkfTrZBgxAcvrj7j/syAotkAeiH7Lqm ZUnGCwur0FSkkcxZfIXGuRzzXp8NlJctXn3fabrfitbb+YfbxHrZw== From: Amit Machhiwal To: qemu-ppc@nongnu.org, Harsh Prateek Bora Cc: Amit Machhiwal , Vaibhav Jain , Nicholas Piggin , Chinmay Rath , Glenn Miles , Paolo Bonzini , kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [PATCH v3 3/3] target/ppc/kvm: Use host compatibility mode for nested guests Date: Tue, 16 Jun 2026 17:09:15 +0530 Message-ID: <20260616113915.25589-4-amachhiw@linux.ibm.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260616113915.25589-1-amachhiw@linux.ibm.com> References: <20260616113915.25589-1-amachhiw@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDExNSBTYWx0ZWRfX5AJZgDlW48eY RXV+hq++EU1Qw/8HZFms6QNEAJu4ZVi8soScqyGFvGhTrU1gtk2LClhGGaqNUAikk+ofMNz27TQ 3XanGriwIrf4TuW5oyb6bUMJg0R/sFk= X-Proofpoint-ORIG-GUID: G23fYg7wKZOHpK5IDZoMuACrq-uvsgDo X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDExNSBTYWx0ZWRfX/SCd7w/bnVPN xiRM6XT5jUzI/ndb3QsQAH/hVUZ80vBdv/gzpAVV6wIMQX/RsLiFpkG0wCfsfo8HuxYhQJBlE4Y KtoHJ/iFBZqu5m1UFOH+vztbpYGcMIKmpzML3dx0y65JYrsIWlkWwc7g+UU/Tu/PPoigMdNu+XO TS7Hgly7URU9gu68JM2jb5Fj+D5vhaYN+Cl89SBvO+nmMdo12fxTa9qDCVsYi9PF8FTpu1EkMzX eF2t5o7ZwrSMpAG/a7NmR+3zHBebcf3luObG6djdm++j0buzipIbb0yq9XH6foO6AJSTnxRbaJy VHR7sTG8IV1++ORns/DkYyN3jvPH1W/8tqKYJZ2YaW1yyji3BBcE/sHo+/7snvG/+3TQDQ3H8jg YOtY6oGw0/+7Y6EvYn1/evizTa2MYjHFD0WT1ouFEhcuwpTh9sjiPtLI8nUalVnbshkOfSYZ1/0 +nzkpcQw1PTOxwZTNJA== X-Authority-Analysis: v=2.4 cv=U9uiy+ru c=1 sm=1 tr=0 ts=6a313610 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=FelO9ux0wxsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=VnNF1IyMAAAA:8 a=Xl1zm9qRz71utLZm77MA:9 X-Proofpoint-GUID: 2QafHAVmJQlNCaIeKdNalOVcBlhnziDQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_03,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 phishscore=0 priorityscore=1501 clxscore=1015 adultscore=0 malwarescore=0 suspectscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160115 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=amachhiw@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1781610031856158500 Content-Type: text/plain; charset="utf-8" On POWER systems, the host CPU may run in a compatibility mode (e.g., a Power11 processor operating in Power10 compatibility mode). When running nested KVM guests, QEMU currently derives the host CPU type using mfpvr(), which reflects the physical processor version. This can result in a mismatch between the CPU model used by QEMU and the compatibility mode enforced by the host, leading to guest boot failures such as "KVM-NESTEDv2: couldn't set guest wide elements". Update kvm_ppc_get_host_cpu_class() to check if the host is running in a compatibility mode using kvm_ppc_host_compat_pvr(). When available, use the compatibility PVR instead of the raw hardware PVR when selecting the CPU model. This ensures that QEMU selects a CPU model consistent with the host compatibility mode, allowing nested guests to boot correctly. Signed-off-by: Amit Machhiwal --- target/ppc/kvm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 9e5006e0c2cd..a72f237f0c8a 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2672,6 +2672,15 @@ PowerPCCPUClass *kvm_ppc_get_host_cpu_class(void) uint32_t host_pvr =3D mfpvr(); PowerPCCPUClass *pvr_pcc; =20 +#if defined(TARGET_PPC64) + uint32_t compat_host_pvr; + + compat_host_pvr =3D kvm_ppc_host_compat_pvr(); + if (compat_host_pvr) { + host_pvr =3D compat_host_pvr; + } +#endif /* TARGET_PPC64 */ + pvr_pcc =3D ppc_cpu_class_by_pvr(host_pvr); if (pvr_pcc =3D=3D NULL) { pvr_pcc =3D ppc_cpu_class_by_pvr_mask(host_pvr); --=20 2.50.1 (Apple Git-155)