From nobody Tue Feb 10 01:35:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493190350202697.8149529125213; Wed, 26 Apr 2017 00:05:50 -0700 (PDT) Received: from localhost ([::1]:53009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3H1I-0000i8-Vu for importer@patchew.org; Wed, 26 Apr 2017 03:05:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3Gwe-0005D4-Q4 for qemu-devel@nongnu.org; Wed, 26 Apr 2017 03:01:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3GwY-0007vp-Q1 for qemu-devel@nongnu.org; Wed, 26 Apr 2017 03:01:00 -0400 Received: from ozlabs.org ([103.22.144.67]:43885) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d3GwY-0007v4-EY; Wed, 26 Apr 2017 03:00:54 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3wCWFB2PS0z9s9Z; Wed, 26 Apr 2017 17:00:45 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1493190046; bh=3RCo64UpDThTC1VaSKGFoHIlzs2QHoH+GZxLQ1vG4sY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QTJlF7lbDW0jD+39rn+bt1w1FeFS2/i0ORwV9BoFy5LIwExagsLQEWA5T1tpscJu7 VG8qJstoBeHUo6EV+S/H5q01d42gvz+QGOOR/9+v1W+/88cgsKkVvzlnZ60mJcoVDs 9+ZgjC/naLHeI3VD16xzPOO+RJOndH899MAZu848= From: David Gibson To: peter.maydell@linaro.org Date: Wed, 26 Apr 2017 16:59:54 +1000 Message-Id: <20170426070034.10727-9-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170426070034.10727-1-david@gibson.dropbear.id.au> References: <20170426070034.10727-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 08/48] target/ppc: Add new H-CALL shells for in memory table translation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, clg@kaod.org, Suraj Jitindar Singh , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Suraj Jitindar Singh The use of the new in memory tables introduced in ISAv3.00 for translation, also referred to as process tables, requires the introduction of 3 new H-CALLs; H_REGISTER_PROCESS_TABLE, H_CLEAN_SLB, and H_INVALIDATE_PID. Add shells for each of these and register them as the hypercall handlers. Currently they all log an unimplemented hypercall and return H_FUNCTION. Signed-off-by: Suraj Jitindar Singh [dwg: Fix style nits] Signed-off-by: David Gibson --- hw/ppc/spapr_hcall.c | 31 +++++++++++++++++++++++++++++++ include/hw/ppc/spapr.h | 3 +++ 2 files changed, 34 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index f05a90e..7952129 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -878,6 +878,32 @@ static target_ulong h_set_mode(PowerPCCPU *cpu, sPAPRM= achineState *spapr, return ret; } =20 +static target_ulong h_clean_slb(PowerPCCPU *cpu, sPAPRMachineState *spapr, + target_ulong opcode, target_ulong *args) +{ + qemu_log_mask(LOG_UNIMP, "Unimplemented SPAPR hcall 0x"TARGET_FMT_lx"%= s\n", + opcode, " (H_CLEAN_SLB)"); + return H_FUNCTION; +} + +static target_ulong h_invalidate_pid(PowerPCCPU *cpu, sPAPRMachineState *s= papr, + target_ulong opcode, target_ulong *ar= gs) +{ + qemu_log_mask(LOG_UNIMP, "Unimplemented SPAPR hcall 0x"TARGET_FMT_lx"%= s\n", + opcode, " (H_INVALIDATE_PID)"); + return H_FUNCTION; +} + +static target_ulong h_register_process_table(PowerPCCPU *cpu, + sPAPRMachineState *spapr, + target_ulong opcode, + target_ulong *args) +{ + qemu_log_mask(LOG_UNIMP, "Unimplemented SPAPR hcall 0x"TARGET_FMT_lx"%= s\n", + opcode, " (H_REGISTER_PROC_TBL)"); + return H_FUNCTION; +} + #define H_SIGNAL_SYS_RESET_ALL -1 #define H_SIGNAL_SYS_RESET_ALLBUTSELF -2 =20 @@ -1084,6 +1110,11 @@ static void hypercall_register_types(void) spapr_register_hypercall(H_PAGE_INIT, h_page_init); spapr_register_hypercall(H_SET_MODE, h_set_mode); =20 + /* In Memory Table MMU h-calls */ + spapr_register_hypercall(H_CLEAN_SLB, h_clean_slb); + spapr_register_hypercall(H_INVALIDATE_PID, h_invalidate_pid); + spapr_register_hypercall(H_REGISTER_PROC_TBL, h_register_process_table= ); + /* "debugger" hcalls (also used by SLOF). Note: We do -not- differenci= ate * here between the "CI" and the "CACHE" variants, they will use whate= ver * mapping attributes qemu is using. When using KVM, the kernel will diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index ba9e689..342f7a6 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -361,6 +361,9 @@ struct sPAPRMachineState { #define H_XIRR_X 0x2FC #define H_RANDOM 0x300 #define H_SET_MODE 0x31C +#define H_CLEAN_SLB 0x374 +#define H_INVALIDATE_PID 0x378 +#define H_REGISTER_PROC_TBL 0x37C #define H_SIGNAL_SYS_RESET 0x380 #define MAX_HCALL_OPCODE H_SIGNAL_SYS_RESET =20 --=20 2.9.3