From nobody Sun May 5 17:44:55 2024 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=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1620173568; cv=none; d=zohomail.com; s=zohoarc; b=Oy3lzv07Sm5fHrKemephiT8XtdVw6eRHuxLN3U/mvgUAS8K6g3MHzu6ZTgc9fyc8iU7IxfL/5yS2g2yFs2/1xWG7Q6cLlKbX8Uee4ERQLjpluiSbx2qkX6ksTuDifx/hCj4F7Sae4SFaTiuFt1ysA/1MDIRvHtVXd0KXNjHG1Uk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620173568; h=Content-Transfer-Encoding:Cc: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=kHKFG/dXmbgaKEtkMCCZqGNtGLecZ8sV1PV21tPX1WU=; b=Jzxef+jZkPrKJFKyOeWdMTxdFE9mqdl1SiVOIHBfhtARSU8ar7lD6J4xgrmKn6BjsaMrSwQ6prFNcuI/9AY7GjhUh2HnIWZBOF//LeAtZB4Z4JlLagUrnO6mPcfZROWJl5sOW4H3ih+XyLpBZmvYqPjrnKZltf0cr7iN9mDFDh8= 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=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162017356892633.925832011760804; Tue, 4 May 2021 17:12:48 -0700 (PDT) Received: from localhost ([::1]:37526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1le59j-0001C7-Bf for importer@patchew.org; Tue, 04 May 2021 20:12:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le58k-0000KG-7v; Tue, 04 May 2021 20:11:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:13094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le58i-0002vL-Hn; Tue, 04 May 2021 20:11:46 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14502VeU012473; Tue, 4 May 2021 20:11:38 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 38bgfc05nr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 May 2021 20:11:38 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 1450BbX6025151; Wed, 5 May 2021 00:11:37 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04wdc.us.ibm.com with ESMTP id 38bedtrnq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 May 2021 00:11:37 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1450BaAx25952538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 May 2021 00:11:36 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8F732C6063; Wed, 5 May 2021 00:11:36 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EDC8C6059; Wed, 5 May 2021 00:11:35 +0000 (GMT) Received: from farosas.linux.ibm.com.com (unknown [9.211.49.100]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 5 May 2021 00:11:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=kHKFG/dXmbgaKEtkMCCZqGNtGLecZ8sV1PV21tPX1WU=; b=gfat9X8n4dZfIDrGYvf2lUNVIofPIkwWis9ulrWbX1QbNdUdcaZutgjJbLkYtqd02QIj TpEMeVkEk00JYkvk4PAnZ2lxOpIjwyN+ydjjof24UzXFM3XMc7sclsG+mkTMcABMBZA7 SjDM0ceJclfH93+O/K1KM5n221x+NOCP4vEATXaCP/FCIhwAWVeSQGdd2yg/oj55JA28 iQ6spvRNm5wyaepb0Vlm0ljngw6WIQqJCgnatHgZNU5W9daKg8FhsWjrXpJnoWn/nqXE ji/keAX8d9ib6lz+VZAzcGSv1OZsWRnmlMrjez3QhYsJXxfo03bbi7IRWr8q4O5i4Jqz +Q== From: Fabiano Rosas To: qemu-devel@nongnu.org Subject: [PATCH 1/2] hw/ppc/spapr.c: Extract MMU mode error reporting into a function Date: Tue, 4 May 2021 21:11:29 -0300 Message-Id: <20210505001130.3999968-2-farosas@linux.ibm.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210505001130.3999968-1-farosas@linux.ibm.com> References: <20210505001130.3999968-1-farosas@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Wf_JlwyopADeHVP5b3vRt8YtVz4Y8Gvj X-Proofpoint-ORIG-GUID: Wf_JlwyopADeHVP5b3vRt8YtVz4Y8Gvj X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-04_15:2021-05-04, 2021-05-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2105040166 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=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=farosas@linux.ibm.com; helo=mx0b-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_H2=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) Content-Type: text/plain; charset="utf-8" A following patch will make use of it. Signed-off-by: Fabiano Rosas --- hw/ppc/spapr.c | 16 ++++++++++++++++ hw/ppc/spapr_hcall.c | 14 ++------------ include/hw/ppc/spapr.h | 1 + 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 529ff056dd..4fd226b15b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1558,6 +1558,22 @@ void spapr_setup_hpt(SpaprMachineState *spapr) } } =20 +void spapr_check_mmu_mode(bool guest_radix) +{ + if (guest_radix) { + if (kvm_enabled() && !kvmppc_has_cap_mmu_radix()) { + error_report("Guest requested unavailable MMU mode (radix)."); + exit(EXIT_FAILURE); + } + } else { + if (kvm_enabled() && kvmppc_has_cap_mmu_radix() + && !kvmppc_has_cap_mmu_hash_v3()) { + error_report("Guest requested unavailable MMU mode (hash)."); + exit(EXIT_FAILURE); + } + } +} + static void spapr_machine_reset(MachineState *machine) { SpaprMachineState *spapr =3D SPAPR_MACHINE(machine); diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 7b5cd3553c..32b7100125 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1755,18 +1755,8 @@ target_ulong do_client_architecture_support(PowerPCC= PU *cpu, spapr_ovec_intersect(spapr->ov5_cas, spapr->ov5, ov5_guest); spapr_ovec_cleanup(ov5_guest); =20 - if (guest_radix) { - if (kvm_enabled() && !kvmppc_has_cap_mmu_radix()) { - error_report("Guest requested unavailable MMU mode (radix)."); - exit(EXIT_FAILURE); - } - } else { - if (kvm_enabled() && kvmppc_has_cap_mmu_radix() - && !kvmppc_has_cap_mmu_hash_v3()) { - error_report("Guest requested unavailable MMU mode (hash)."); - exit(EXIT_FAILURE); - } - } + spapr_check_mmu_mode(guest_radix); + spapr->cas_pre_isa3_guest =3D !spapr_ovec_test(ov1_guest, OV1_PPC_3_00= ); spapr_ovec_cleanup(ov1_guest); =20 diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index bf7cab7a2c..52b68b2d92 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -820,6 +820,7 @@ void spapr_dt_events(SpaprMachineState *sm, void *fdt); void close_htab_fd(SpaprMachineState *spapr); void spapr_setup_hpt(SpaprMachineState *spapr); void spapr_free_hpt(SpaprMachineState *spapr); +void spapr_check_mmu_mode(bool guest_radix); SpaprTceTable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn); void spapr_tce_table_enable(SpaprTceTable *tcet, uint32_t page_shift, uint64_t bus_offset, --=20 2.29.2 From nobody Sun May 5 17:44:55 2024 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=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1620173631; cv=none; d=zohomail.com; s=zohoarc; b=LIMkYe2sLbsNBGSJowDP6QvpNj6MIOoHT9xEBX0OtRRy3lkFHAwrC7k91d/7o2Y82vdi+gWPFQfWMUOPUTSxqPRLYuyQHhrEsaA0hwIjMhrNlr2x/ibLM+i1UURi5KMMsRDV7lqgfgveyLuJBTonPqep6e5wuNO9VCTYrZMNyj8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620173631; h=Content-Transfer-Encoding:Cc: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=NFsCN57MdtiR9sFj8r5MDj996ziNq0VcpfxcGX3vx+w=; b=QsBN5OLwFxklqipB/YfAyn88ynBG4wm96eyWI4EsvgbXJSiQl1vW014BjhQfLc2JmIIpOnm8p1Ieo0lPrSJNz+cri80AWmxZtwN7wE4Vk7Mn6lV1bk+Sc+R7FxVrHXel7OuMD8BKCoYJABOpqCq+2v0XAPz1IwN47V5Noj8wXck= 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=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1620173631480954.1937694295098; Tue, 4 May 2021 17:13:51 -0700 (PDT) Received: from localhost ([::1]:39600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1le5Ak-00023O-B1 for importer@patchew.org; Tue, 04 May 2021 20:13:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le58m-0000LJ-No; Tue, 04 May 2021 20:11:48 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:25120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le58j-0002wg-AJ; Tue, 04 May 2021 20:11:48 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 145034Sf004860; Tue, 4 May 2021 20:11:40 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 38begsjnnb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 May 2021 20:11:40 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 1450BcL6025323; Wed, 5 May 2021 00:11:38 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma04wdc.us.ibm.com with ESMTP id 38bedtrnq9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 May 2021 00:11:38 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1450Bba737552558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 May 2021 00:11:38 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D69E9C6057; Wed, 5 May 2021 00:11:37 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E620AC605A; Wed, 5 May 2021 00:11:36 +0000 (GMT) Received: from farosas.linux.ibm.com.com (unknown [9.211.49.100]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 5 May 2021 00:11:36 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=NFsCN57MdtiR9sFj8r5MDj996ziNq0VcpfxcGX3vx+w=; b=qNgdabPR/7gxfLdYthmS6p0R3FJRXHYCoNVquRMRrVwbVV8odPFIBEIz0H6is9f2Oo55 f0rHCDYIB9iChrO/K8OLx8pihxYapOU9tMXzKOCDJq4f+l1GAmLVvCgyVnr+ifobP38E LPXg8+KfeWdO0LBiZe+VZm2rnrdRUQCFt6RgJrE80ZOtiBvjQtCFdO+U8z2lv5MiQouY BONRtgpW3LyAgs5Fo/OgiW/4xDg7xQlZFkHU57hPegeKj4ZjlXUG3X8RftS6i/Bbowwr CaOxU/ECrP3e73EqXVsil4k4d1mpD83QI8+0OACuycI/MSlklPw2jNv/qDIbZnmfyAFK mw== From: Fabiano Rosas To: qemu-devel@nongnu.org Subject: [PATCH 2/2] hw/ppc/spapr.c: Make sure the host supports the selected MMU mode Date: Tue, 4 May 2021 21:11:30 -0300 Message-Id: <20210505001130.3999968-3-farosas@linux.ibm.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210505001130.3999968-1-farosas@linux.ibm.com> References: <20210505001130.3999968-1-farosas@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: nEmgGyPbTSOEvLRO0AwZsAC5L4NGf8G0 X-Proofpoint-ORIG-GUID: nEmgGyPbTSOEvLRO0AwZsAC5L4NGf8G0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-04_15:2021-05-04, 2021-05-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2105040166 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=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=farosas@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_H2=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) Content-Type: text/plain; charset="utf-8" Starting with Linux kernel v5.12 we dropped support[1] in KVM for hosts that can't have their threads running in different MMU modes (POWER9 < DD2.2). In these hosts, KVM will no longer report the KVM_CAP_PPC_MMU_HASH_V3 capability[2] when the host is running Radix. For guests that support both MMU modes, the negotiation during CAS will make sure it selects the correct one. For guests that only support Hash, such as P8 compat mode guests, the following error is currently thrown: $ ~/qemu-system-ppc64 -machine pseries,accel=3Dkvm,max-cpu-compat=3Dpower= 8 ... error: kvm run failed Invalid argument NIP 0000000000000100 LR 0000000000000000 CTR 0000000000000000 XER 00000= 00000000000 CPU#0 MSR 8000000000001000 HID0 0000000000000000 HF 8000000000000000 iidx 3 di= dx 3 TB 00000000 00000000 DECR 0 GPR00 0000000000000000 0000000000000000 0000000000000000 000000007ff00000 GPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000 CR 00000000 [ - - - - - - - - ] RES ffffffffffffffff SRR0 0000000000000000 SRR1 0000000000000000 PVR 00000000004e1201 VRS= AVE 0000000000000000 SPRG0 0000000000000000 SPRG1 0000000000000000 SPRG2 0000000000000000 SP= RG3 0000000000000000 SPRG4 0000000000000000 SPRG5 0000000000000000 SPRG6 0000000000000000 SP= RG7 0000000000000000 HSRR0 0000000000000000 HSRR1 0000000000000000 CFAR 0000000000000000 LPCR 000000000004f01f PTCR 0000000000000000 DAR 0000000000000000 DSISR 0000000000000000 This patch adds a verification during the writing of the platform support vector so that we error out as soon as we determine this guest only supports Hash and the host doesn't. ~/qemu-system-ppc64 -machine pseries,accel=3Dkvm,max-cpu-compat=3Dpower8 = ... qemu-system-ppc64: Guest requested unavailable MMU mode (hash). 1- https://git.kernel.org/torvalds/p/b1b1697ae0cc8 2- https://git.kernel.org/torvalds/p/a722076e94702 Signed-off-by: Fabiano Rosas --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 4fd226b15b..69201399eb 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -981,6 +981,7 @@ static void spapr_dt_ov5_platform_support(SpaprMachineS= tate *spapr, void *fdt, */ val[1] =3D SPAPR_OV5_XIVE_LEGACY; /* XICS */ val[3] =3D 0x00; /* Hash */ + spapr_check_mmu_mode(false); } else if (kvm_enabled()) { if (kvmppc_has_cap_mmu_radix() && kvmppc_has_cap_mmu_hash_v3()) { val[3] =3D 0x80; /* OV5_MMU_BOTH */ --=20 2.29.2