From patchwork Thu Jul 18 03:42:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11048485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E92A14DB for ; Thu, 18 Jul 2019 03:43:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EA37287BD for ; Thu, 18 Jul 2019 03:43:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02C55285E8; Thu, 18 Jul 2019 03:43:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B55E287BE for ; Thu, 18 Jul 2019 03:43:01 +0000 (UTC) Received: from localhost ([::1]:33960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxJs-0008Jp-5F for patchwork-qemu-devel@patchwork.kernel.org; Wed, 17 Jul 2019 23:43:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40145) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxJV-0006es-49 for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnxJT-0007JF-Ol for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:37 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:38216) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnxJP-0007GD-Sm; Wed, 17 Jul 2019 23:42:32 -0400 Received: by mail-pg1-x52b.google.com with SMTP id f5so3355217pgu.5; Wed, 17 Jul 2019 20:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dVMtr+bb1dkxNHn+xqFCKdC6hl6NmpCDwUa560sGIuU=; b=JVv/toKsJsPgBKCrkoCQNqqNdRc7uBT8yMOMmPtFdSur6NJbOoe8rHHcDvnpXiKKDe 8mGCuD3DdmsRPT0T+Z+LJUQAP/HAqsnda22mxU6Ssj6TmLcWQ75/HTtMMC+6/rm7NpOx +tf/NdwD6TooST9SeUaQa9C9BCcADYMfhXeAfi28PjnivsjcULqhSZx76mqXsXchU3z2 PQy9JOJ3lX6WdUSZBvgaP7gQDOxIOtmSJhPmQcR0mrPbiwJV1w9cNJ4y4O6v24YPQFhj 3H1h2kJZRzeDjEU3Pc6QE45nKoHH3ZdURqWIRIUGC5dAgTz5oyAR5M+v1/yrt0w3Guiz L0+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dVMtr+bb1dkxNHn+xqFCKdC6hl6NmpCDwUa560sGIuU=; b=GS/XbYTMeDwTfj2NsuQGAoin+bYSCSH3Y0bOScSOs60vrJGNsTSX1mtvs7CrX5CYmm 6H3YUWlpO4JDrGXwqYVzP6h0ceQh/6Vtn4GZxEdvgU84m3vjFRKIxsqIG1BkugRqAd5v BwmQf8bm+86gInZW7khDfA7J6Bu/pC+Z0RoihntxDLEtuva6vrNzJtGAYYKrFSSdvyya AdPUPuSj1bSP8VAUD48JTj4Zj6yD+rPJ87QnZaBgCeo6z6/QoJqss8o18YBnnPBGV38c LV0Wb6vNOG7hXddYkAfDyukDcgFuA0oNobZssfdWXJpd9lXuPeDfdQ467FcIuhJzIouY 7d3A== X-Gm-Message-State: APjAAAUsv3ShT4CGIJXsq89KdhAhUQmp6F44pBdeT4MJyCWUT08YqDCm aXhIx+38mXB4C25xbvxW4bw= X-Google-Smtp-Source: APXvYqxmqtThOzIdRCehVY0AV2lflKWZIH06MF/sAAQgfjtdZmoeDs/U2n4qU24d4CXrX2rITdhWCQ== X-Received: by 2002:a17:90a:1a45:: with SMTP id 5mr49504932pjl.43.1563421351016; Wed, 17 Jul 2019 20:42:31 -0700 (PDT) Received: from bobo.local0.net ([203.220.8.141]) by smtp.gmail.com with ESMTPSA id b3sm38787612pfp.65.2019.07.17.20.42.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 20:42:30 -0700 (PDT) From: Nicholas Piggin To: David Gibson Date: Thu, 18 Jul 2019 13:42:11 +1000 Message-Id: <20190718034214.14948-2-npiggin@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718034214.14948-1-npiggin@gmail.com> References: <20190718034214.14948-1-npiggin@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52b Subject: [Qemu-devel] [PATCH v6 1/4] spapr: Implement dispatch tracking for tcg 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: Greg Kurz , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Implement cpu_exec_enter/exit on ppc which calls into new methods of the same name in PPCVirtualHypervisorClass. These are used by spapr to implement the splpar VPA dispatch counter initially. Signed-off-by: Nicholas Piggin Reviewed-by: Greg Kurz --- Changes since v5: - Move 'prod' into next patch. - Use uint32_t type for dispatch counter. - Add guest error message for incorrect dispatch counter. - Conditionally compile away if CONFIG_USER_ONLY - Small cleanups Changes since v4: - Store to VPA on the way out as well. - Increment the dispatch counter directly in the VPA, which means it will migrate with guest memory the same as KVM. - Prod need not be migrated, add a comment. hw/ppc/spapr.c | 52 +++++++++++++++++++++++++++++++++ hw/ppc/spapr_hcall.c | 5 ---- include/hw/ppc/spapr.h | 7 +++++ target/ppc/cpu.h | 4 +++ target/ppc/translate_init.inc.c | 27 +++++++++++++++++ 5 files changed, 90 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 821f0d4a49..3e5678d467 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4302,6 +4302,54 @@ PowerPCCPU *spapr_find_cpu(int vcpu_id) return NULL; } +#ifndef CONFIG_USER_ONLY +static void spapr_cpu_exec_enter(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu) +{ + SpaprCpuState *spapr_cpu = spapr_cpu_state(cpu); + + /* These are only called by TCG, KVM maintains dispatch state */ + + if (spapr_cpu->vpa_addr) { + CPUState *cs = CPU(cpu); + uint32_t dispatch; + + dispatch = ldl_be_phys(cs->as, + spapr_cpu->vpa_addr + VPA_DISPATCH_COUNTER); + dispatch++; + if ((dispatch & 1) != 0) { + qemu_log_mask(LOG_GUEST_ERROR, + "VPA: incorrect dispatch counter value for " + "dispatched partition %u, correcting.\n", dispatch); + dispatch++; + } + stl_be_phys(cs->as, + spapr_cpu->vpa_addr + VPA_DISPATCH_COUNTER, dispatch); + } +} + +static void spapr_cpu_exec_exit(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu) +{ + SpaprCpuState *spapr_cpu = spapr_cpu_state(cpu); + + if (spapr_cpu->vpa_addr) { + CPUState *cs = CPU(cpu); + uint32_t dispatch; + + dispatch = ldl_be_phys(cs->as, + spapr_cpu->vpa_addr + VPA_DISPATCH_COUNTER); + dispatch++; + if ((dispatch & 1) != 1) { + qemu_log_mask(LOG_GUEST_ERROR, + "VPA: incorrect dispatch counter value for " + "preempted partition %u, correcting.\n", dispatch); + dispatch++; + } + stl_be_phys(cs->as, + spapr_cpu->vpa_addr + VPA_DISPATCH_COUNTER, dispatch); + } +} +#endif + static void spapr_machine_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); @@ -4358,6 +4406,10 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) vhc->hpte_set_r = spapr_hpte_set_r; vhc->get_pate = spapr_get_pate; vhc->encode_hpt_for_kvm_pr = spapr_encode_hpt_for_kvm_pr; +#ifndef CONFIG_USER_ONLY + vhc->cpu_exec_enter = spapr_cpu_exec_enter; + vhc->cpu_exec_exit = spapr_cpu_exec_exit; +#endif xic->ics_get = spapr_ics_get; xic->ics_resend = spapr_ics_resend; xic->icp_get = spapr_icp_get; diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 6808d4cda8..e615881ac4 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -874,11 +874,6 @@ unmap_out: #define FLAGS_DEREGISTER_DTL 0x0000c00000000000ULL #define FLAGS_DEREGISTER_SLBSHADOW 0x0000e00000000000ULL -#define VPA_MIN_SIZE 640 -#define VPA_SIZE_OFFSET 0x4 -#define VPA_SHARED_PROC_OFFSET 0x9 -#define VPA_SHARED_PROC_VAL 0x2 - static target_ulong register_vpa(PowerPCCPU *cpu, target_ulong vpa) { CPUState *cs = CPU(cpu); diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 60553d32c4..5d36eec9d0 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -525,6 +525,13 @@ void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn); target_ulong spapr_hypercall(PowerPCCPU *cpu, target_ulong opcode, target_ulong *args); +/* Virtual Processor Area structure constants */ +#define VPA_MIN_SIZE 640 +#define VPA_SIZE_OFFSET 0x4 +#define VPA_SHARED_PROC_OFFSET 0x9 +#define VPA_SHARED_PROC_VAL 0x2 +#define VPA_DISPATCH_COUNTER 0x100 + /* ibm,set-eeh-option */ #define RTAS_EEH_DISABLE 0 #define RTAS_EEH_ENABLE 1 diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index c9beba2a5c..9e8fd3c621 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1224,6 +1224,10 @@ struct PPCVirtualHypervisorClass { void (*hpte_set_r)(PPCVirtualHypervisor *vhyp, hwaddr ptex, uint64_t pte1); void (*get_pate)(PPCVirtualHypervisor *vhyp, ppc_v3_pate_t *entry); target_ulong (*encode_hpt_for_kvm_pr)(PPCVirtualHypervisor *vhyp); +#ifndef CONFIG_USER_ONLY + void (*cpu_exec_enter)(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu); + void (*cpu_exec_exit)(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu); +#endif }; #define TYPE_PPC_VIRTUAL_HYPERVISOR "ppc-virtual-hypervisor" diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c index 86fc8f2e31..bae4820503 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -10471,6 +10471,28 @@ static bool ppc_cpu_is_big_endian(CPUState *cs) return !msr_le; } + +static void ppc_cpu_exec_enter(CPUState *cs) +{ + PowerPCCPU *cpu = POWERPC_CPU(cs); + + if (cpu->vhyp) { + PPCVirtualHypervisorClass *vhc = + PPC_VIRTUAL_HYPERVISOR_GET_CLASS(cpu->vhyp); + vhc->cpu_exec_enter(cpu->vhyp, cpu); + } +} + +static void ppc_cpu_exec_exit(CPUState *cs) +{ + PowerPCCPU *cpu = POWERPC_CPU(cs); + + if (cpu->vhyp) { + PPCVirtualHypervisorClass *vhc = + PPC_VIRTUAL_HYPERVISOR_GET_CLASS(cpu->vhyp); + vhc->cpu_exec_exit(cpu->vhyp, cpu); + } +} #endif static void ppc_cpu_instance_init(Object *obj) @@ -10624,6 +10646,11 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data) cc->tcg_initialize = ppc_translate_init; cc->tlb_fill = ppc_cpu_tlb_fill; #endif +#ifndef CONFIG_USER_ONLY + cc->cpu_exec_enter = ppc_cpu_exec_enter; + cc->cpu_exec_exit = ppc_cpu_exec_exit; +#endif + cc->disas_set_info = ppc_disas_set_info; dc->fw_name = "PowerPC,UNKNOWN"; From patchwork Thu Jul 18 03:42:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11048487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 047C6138B for ; Thu, 18 Jul 2019 03:43:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4934285AB for ; Thu, 18 Jul 2019 03:43:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6E63287BF; Thu, 18 Jul 2019 03:43:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 79EB3285AB for ; Thu, 18 Jul 2019 03:43:03 +0000 (UTC) Received: from localhost ([::1]:33964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxJu-0008Th-AL for patchwork-qemu-devel@patchwork.kernel.org; Wed, 17 Jul 2019 23:43:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40162) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxJX-0006o2-6I for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnxJW-0007M6-2m for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:39 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:34501) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnxJT-0007J9-QE; Wed, 17 Jul 2019 23:42:35 -0400 Received: by mail-pg1-x544.google.com with SMTP id n9so5963951pgc.1; Wed, 17 Jul 2019 20:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uhiCgc+dCxSfR3eJ9HdFX08Apd62hEJrdjSNK2SkpNA=; b=P2K8nm5sk8RKytRZa0LuS4F8yJQS6gCCGUX6pgR11I5/FnVW0uQkihyaTgOgF6UQNg w1AAzJD86izx1X82qGmJj0maIS48Liq/c46E9MKxfIP+oe4LdYwPrahMaoiEA+stDGFT gcvzt2L1wuKWeFYihJCRb2ZAqQ4R4pTvLAbxzpz8xREBIid5gRX3afUOrob4cQvzr0pc mcuhO+5TGHbGuPCamGTUtlJZe60S+2zvBHPtiZMKdXAn9RzjTOFUFnUNS0kvnhVsJP3v xN6ysXUH326SWBEnVH376K9jP6YMXnXU99nXeVU2SDQUSQ4g+0v+h3COKTD1Q3w0QzIX 2T0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uhiCgc+dCxSfR3eJ9HdFX08Apd62hEJrdjSNK2SkpNA=; b=ayQXDANdczN7oM09yvI3b8OMDhNPwCKbZcY+gqZ0WjQ6/H71FqhIfhlpY/Bb1b/fOZ caR8Mm97lmI5eAPU9VvpHvOdZ8PyzeQawuiQdYZynFYkddmG/kfxQrHTokFlnBoZzE5E bo0xteiWiLueh4ltYk8PdCJrhl9g28tGvXoFidGLEsaAMMqdLTk2BTOJ+su8wNZpXevQ BtyDz8lxlyaGPLkDOSNEdA2mS7FIR+g7lxQsxO2O7FxZ/xnza1YPvFeSCeYvmfHoKXdW 4rddrGTqNnBbUHdrDbq28i4dn8GrtDUsQWGoR4m+N9sq4rtHuhhoom3iI6358RJDx2V/ Wt3g== X-Gm-Message-State: APjAAAWX7OtBRT5ONMOM0M68RzuJtVqFtq7fKdxtMv2AMPd4A+LuccX7 RqCiOGdakzXCKetLoItS7BM= X-Google-Smtp-Source: APXvYqysCqvsANl9putZ6l6JABcuHAP4S+z56FZG2jhmm2pslfWk5oJJazGX6LYLK6nGfT9YLF24KQ== X-Received: by 2002:a63:221f:: with SMTP id i31mr46388929pgi.251.1563421354942; Wed, 17 Jul 2019 20:42:34 -0700 (PDT) Received: from bobo.local0.net ([203.220.8.141]) by smtp.gmail.com with ESMTPSA id b3sm38787612pfp.65.2019.07.17.20.42.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 20:42:34 -0700 (PDT) From: Nicholas Piggin To: David Gibson Date: Thu, 18 Jul 2019 13:42:12 +1000 Message-Id: <20190718034214.14948-3-npiggin@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718034214.14948-1-npiggin@gmail.com> References: <20190718034214.14948-1-npiggin@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH v6 2/4] spapr: Implement H_PROD 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: Greg Kurz , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP H_PROD is added, and H_CEDE is modified to test the prod bit according to PAPR. Signed-off-by: Nicholas Piggin Reviewed-by: Greg Kurz --- Changes since v5: - Add the prod bit here - Fix target CPU hw/ppc/spapr.c | 1 + hw/ppc/spapr_hcall.c | 32 ++++++++++++++++++++++++++++++++ include/hw/ppc/spapr_cpu_core.h | 1 + 3 files changed, 34 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 3e5678d467..68341c128d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4309,6 +4309,7 @@ static void spapr_cpu_exec_enter(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu) /* These are only called by TCG, KVM maintains dispatch state */ + spapr_cpu->prod = false; if (spapr_cpu->vpa_addr) { CPUState *cs = CPU(cpu); uint32_t dispatch; diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index e615881ac4..098b3dda22 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1050,14 +1050,44 @@ static target_ulong h_cede(PowerPCCPU *cpu, SpaprMachineState *spapr, { CPUPPCState *env = &cpu->env; CPUState *cs = CPU(cpu); + SpaprCpuState *spapr_cpu = spapr_cpu_state(cpu); env->msr |= (1ULL << MSR_EE); hreg_compute_hflags(env); + + if (spapr_cpu->prod) { + spapr_cpu->prod = false; + return H_SUCCESS; + } + if (!cpu_has_work(cs)) { cs->halted = 1; cs->exception_index = EXCP_HLT; cs->exit_request = 1; } + + return H_SUCCESS; +} + +static target_ulong h_prod(PowerPCCPU *cpu, SpaprMachineState *spapr, + target_ulong opcode, target_ulong *args) +{ + target_long target = args[0]; + PowerPCCPU *tcpu; + CPUState *cs; + SpaprCpuState *spapr_cpu; + + tcpu = spapr_find_cpu(target); + cs = CPU(tcpu); + if (!cs) { + return H_PARAMETER; + } + + spapr_cpu = spapr_cpu_state(tcpu); + spapr_cpu->prod = true; + cs->halted = 0; + qemu_cpu_kick(cs); + return H_SUCCESS; } @@ -1882,6 +1912,8 @@ static void hypercall_register_types(void) /* hcall-splpar */ spapr_register_hypercall(H_REGISTER_VPA, h_register_vpa); spapr_register_hypercall(H_CEDE, h_cede); + spapr_register_hypercall(H_PROD, h_prod); + spapr_register_hypercall(H_SIGNAL_SYS_RESET, h_signal_sys_reset); /* processor register resource access h-calls */ diff --git a/include/hw/ppc/spapr_cpu_core.h b/include/hw/ppc/spapr_cpu_core.h index f9645a7290..a40cd08ea0 100644 --- a/include/hw/ppc/spapr_cpu_core.h +++ b/include/hw/ppc/spapr_cpu_core.h @@ -46,6 +46,7 @@ typedef struct SpaprCpuState { uint64_t vpa_addr; uint64_t slb_shadow_addr, slb_shadow_size; uint64_t dtl_addr, dtl_size; + bool prod; /* not migrated, only used to improve dispatch latencies */ struct ICPState *icp; struct XiveTCTX *tctx; } SpaprCpuState; From patchwork Thu Jul 18 03:42:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11048489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5AAA138B for ; Thu, 18 Jul 2019 03:43:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B566C287BE for ; Thu, 18 Jul 2019 03:43:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9AC7287BD; Thu, 18 Jul 2019 03:43:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 44AFB287BA for ; Thu, 18 Jul 2019 03:43:29 +0000 (UTC) Received: from localhost ([::1]:33978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxKK-0001uK-FF for patchwork-qemu-devel@patchwork.kernel.org; Wed, 17 Jul 2019 23:43:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40195) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxJb-00078f-L8 for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnxJa-0007Qr-Fv for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:43 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:41089) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnxJY-0007Mk-3q; Wed, 17 Jul 2019 23:42:40 -0400 Received: by mail-pg1-x541.google.com with SMTP id x15so1841527pgg.8; Wed, 17 Jul 2019 20:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PDlLMZstZVKdiOJqMedz4Ol5SqFOrr0PZJpTHrA1bAg=; b=HF3QKDCHfUvlX5NcYvzIOQ1fZ5BbRh1NajFoQg02VMsMofy7ROIOF9Q6Xmwguc45+3 thxnA9fRmWCgOuL/MIGZcokqA7aESi2egWXdV6bIGfxDZlM1Lc3AztS0tIwAOjuqk21r r0yC1m8VySmGJoBNDwh3NSRbl1fUnKIydUIL1tL8Pz6i6Bx2AzSbOtg8XvRkE+ItrsrG g31Ef6ArNXbZAx6bKjr1acwnQqo7dzQL2qxixOTTHsU0gWiluJHQXvw9djroqP1uhPKe ruLW7IVPUrRhSi/sSiJ1tK9C8RNMpOpZt9zWAEGwZBLml8YQT6fUOQVyZMyM88j1p+Bv dkNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PDlLMZstZVKdiOJqMedz4Ol5SqFOrr0PZJpTHrA1bAg=; b=Gko3q4idlRnDV4rNitoPe2i2sa7c+r31gYqSgrKZOx1dUkhte1xRF+xcUeF1qkNw7Q vaZo4/VnRJ3N8K+JvN0OxiEb5CSBHLoMskU+LZw6uUfDSpHpxmV711D8EMoqhr+0cyHG TgxygxvP/EQ/IjhxGxJKniUE5Ncbg/TgpXXPga7N3lOU5CMT+5yhUsBlLy9VQ4zfm+va PwJsBzABfi9eb8G+zmbG3T4l3pthc13QaLon2iPGc9XOuqt7tQQIgRV2Gn7+zuBtFPoK EAgeBj5jEN0iZJEbxMI7jCD3ZjpQ5H0tInZ6oLaS4PjItepZR+id+TpRmmp72wloF96Q r2Mg== X-Gm-Message-State: APjAAAWuzx4nc0YAWOsVX5Ksa0zyLBQk6q9MBo9l/H5T8EusbyRqYOkv mBuGWYX3+Gynw5SapeFKGWA= X-Google-Smtp-Source: APXvYqwMYFGakmieXPW9TN782wz1g/0sv8BjAYBRSUBlusi9/MUvQrv7grIkxZU1ELSlDcycmHy6YQ== X-Received: by 2002:a63:101b:: with SMTP id f27mr43571084pgl.291.1563421358980; Wed, 17 Jul 2019 20:42:38 -0700 (PDT) Received: from bobo.local0.net ([203.220.8.141]) by smtp.gmail.com with ESMTPSA id b3sm38787612pfp.65.2019.07.17.20.42.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 20:42:38 -0700 (PDT) From: Nicholas Piggin To: David Gibson Date: Thu, 18 Jul 2019 13:42:13 +1000 Message-Id: <20190718034214.14948-4-npiggin@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718034214.14948-1-npiggin@gmail.com> References: <20190718034214.14948-1-npiggin@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 Subject: [Qemu-devel] [PATCH v6 3/4] spapr: Implement H_CONFER 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: Greg Kurz , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This does not do directed yielding and is not quite as strict as PAPR specifies in terms of precise dispatch behaviour. This generally will mean suboptimal performance, rather than guest misbehaviour. Linux does not rely on exact dispatch behaviour. Signed-off-by: Nicholas Piggin Reviewed-by: Greg Kurz --- Changes since v5: - Cleanups Changes since v4: - Style, added justification comments, spelling. - Fixed trying to dereference spapr_cpu for a -1 target. hw/ppc/spapr_hcall.c | 67 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 098b3dda22..7c659dc75c 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1069,6 +1069,72 @@ static target_ulong h_cede(PowerPCCPU *cpu, SpaprMachineState *spapr, return H_SUCCESS; } +static target_ulong h_confer(PowerPCCPU *cpu, SpaprMachineState *spapr, + target_ulong opcode, target_ulong *args) +{ + target_long target = args[0]; + uint32_t dispatch = args[1]; + CPUState *cs = CPU(cpu); + SpaprCpuState *spapr_cpu; + + /* + * -1 means confer to all other CPUs without dispatch counter check, + * otherwise it's a targeted confer. + */ + if (target != -1) { + PowerPCCPU *target_cpu = spapr_find_cpu(target); + uint32_t target_dispatch; + + if (!target_cpu) { + return H_PARAMETER; + } + + spapr_cpu = spapr_cpu_state(target_cpu); + + /* + * target == self is a special case, we wait until prodded, without + * dispatch counter check. + */ + if (cpu == target_cpu) { + if (spapr_cpu->prod) { + spapr_cpu->prod = false; + + return H_SUCCESS; + } + + cs->halted = 1; + cs->exception_index = EXCP_HALTED; + cs->exit_request = 1; + + return H_SUCCESS; + } + + if (!spapr_cpu->vpa_addr || ((dispatch & 1) == 0)) { + return H_SUCCESS; + } + + target_dispatch = ldl_be_phys(cs->as, + spapr_cpu->vpa_addr + VPA_DISPATCH_COUNTER); + if (target_dispatch != dispatch) { + return H_SUCCESS; + } + + /* + * The targeted confer does not do anything special beyond yielding + * the current vCPU, but even this should be better than nothing. + * At least for single-threaded tcg, it gives the target a chance to + * run before we run again. Multi-threaded tcg does not really do + * anything with EXCP_YIELD yet. + */ + } + + cs->exception_index = EXCP_YIELD; + cs->exit_request = 1; + cpu_loop_exit(cs); + + return H_SUCCESS; +} + static target_ulong h_prod(PowerPCCPU *cpu, SpaprMachineState *spapr, target_ulong opcode, target_ulong *args) { @@ -1912,6 +1978,7 @@ static void hypercall_register_types(void) /* hcall-splpar */ spapr_register_hypercall(H_REGISTER_VPA, h_register_vpa); spapr_register_hypercall(H_CEDE, h_cede); + spapr_register_hypercall(H_CONFER, h_confer); spapr_register_hypercall(H_PROD, h_prod); spapr_register_hypercall(H_SIGNAL_SYS_RESET, h_signal_sys_reset); From patchwork Thu Jul 18 03:42:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11048491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C21114DB for ; Thu, 18 Jul 2019 03:43:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0992C287BD for ; Thu, 18 Jul 2019 03:43:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE5E9287BE; Thu, 18 Jul 2019 03:43:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8145D287BD for ; Thu, 18 Jul 2019 03:43:30 +0000 (UTC) Received: from localhost ([::1]:33980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxKL-0001zT-Jo for patchwork-qemu-devel@patchwork.kernel.org; Wed, 17 Jul 2019 23:43:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40234) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnxJf-0007Qx-PF for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnxJe-0007Zq-Gw for qemu-devel@nongnu.org; Wed, 17 Jul 2019 23:42:47 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46760) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnxJb-0007RD-VU; Wed, 17 Jul 2019 23:42:44 -0400 Received: by mail-pl1-x642.google.com with SMTP id c2so13073225plz.13; Wed, 17 Jul 2019 20:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CejO63wL9gdz+3FU2IitZ4WVmxu89QTV4nU9VjaG4QQ=; b=p1EpohxlijYxyGDtJtRzfbOQUFYswiG5O8vbwdDm5hQIHLBi8/7ZgLXIYG2NdUFT47 AE8QtqIqd6dPZ3Grow61thTAuAov+j7LmonBl0OREB1fgD3sZ9kmahwmOpEW1TX6Ci7B aA7J4K43QwtdIHiVnq7/dRiXFEsA5WogUG3qFm9BawQVccThnmpJlWkCNsjFregnnH/Z UGiZ0tX3ZtsXZuJJcgxbyAyEXsHzyyE3JEJmiLTn84+WYaGGbKmf76sqY0vZD79k7ZXx c+bP7P/CcoMghTigxOWbgC40ZwkrGXXG0S+YitZrT7ylQZqXaZzR0XFRPt4zT8bipVNd GWkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CejO63wL9gdz+3FU2IitZ4WVmxu89QTV4nU9VjaG4QQ=; b=kZxa4V0RyJPcTBAYiKMSPL0fVQ5n8SskJQfrgQN3ypf3LJE0gmqngttlmmib34QHfJ lNqABYNx1znNTsSFOEt5xJGZJM4k8aEZDtHEqn/O/XDXvplCMja6HMSFolQuMrvwQK0S OX0q/t91Eaalvswb+NufDHtsHShK5unASTvuv4qrXKxDPQGgFKiCxNno2QitoDrlKqr6 ACzhyyGEcYpW+X3BZejd8RAEv5CfshP2vGZALhq+qcKdNG7UlHdbFzUTx14QeDaHsx/e GBIkMCLcx/diOTamMD2b9IUR3UQGeReK1uDb6kXB5RZUYo/T2uge6JxkxqeWAKkAawEP 2GCg== X-Gm-Message-State: APjAAAW9k+mZ4T1GX2j9pLb/Xoa2v951jFDvV6JBqrnu8wMhWV91AfU7 XX842XnIj4BF9HLRz9B6dPY= X-Google-Smtp-Source: APXvYqzIxHIxVHN8eC1CveSyebNhVUl0O/3Y4IuD6IofvrHLRd190VY5bKVbaYRWajO+L5hNgj3UuQ== X-Received: by 2002:a17:902:1125:: with SMTP id d34mr47512356pla.40.1563421362869; Wed, 17 Jul 2019 20:42:42 -0700 (PDT) Received: from bobo.local0.net ([203.220.8.141]) by smtp.gmail.com with ESMTPSA id b3sm38787612pfp.65.2019.07.17.20.42.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 20:42:42 -0700 (PDT) From: Nicholas Piggin To: David Gibson Date: Thu, 18 Jul 2019 13:42:14 +1000 Message-Id: <20190718034214.14948-5-npiggin@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718034214.14948-1-npiggin@gmail.com> References: <20190718034214.14948-1-npiggin@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH v6 4/4] spapr: Implement H_JOIN 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: Greg Kurz , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This has been useful to modify and test the Linux pseries suspend code but it requires modification to the guest to call it (due to being gated by other unimplemented features). It is not otherwise used by Linux yet, but work is slowly progressing there. Signed-off-by: Nicholas Piggin Reviewed-by: Greg Kurz --- Changes since v5: - Fix prod bit semantics. - Factor out the h_confer_self common code Changes since v4: - Style hw/ppc/spapr.c | 1 + hw/ppc/spapr_hcall.c | 74 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 62 insertions(+), 13 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 68341c128d..00f7735a31 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1066,6 +1066,7 @@ static void spapr_dt_rtas(SpaprMachineState *spapr, void *fdt) add_str(hypertas, "hcall-tce"); add_str(hypertas, "hcall-vio"); add_str(hypertas, "hcall-splpar"); + add_str(hypertas, "hcall-join"); add_str(hypertas, "hcall-bulk"); add_str(hypertas, "hcall-set-mode"); add_str(hypertas, "hcall-sprg0"); diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 7c659dc75c..9b72ea8b68 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1069,6 +1069,62 @@ static target_ulong h_cede(PowerPCCPU *cpu, SpaprMachineState *spapr, return H_SUCCESS; } +/* + * Confer to self, aka join. Cede could use the same pattern as well, if + * EXCP_HLT can be changed to ECXP_HALTED. + */ +static target_ulong h_confer_self(PowerPCCPU *cpu) +{ + CPUState *cs = CPU(cpu); + SpaprCpuState *spapr_cpu = spapr_cpu_state(cpu); + + if (spapr_cpu->prod) { + spapr_cpu->prod = false; + return H_SUCCESS; + } + cs->halted = 1; + cs->exception_index = EXCP_HALTED; + cs->exit_request = 1; + + return H_SUCCESS; +} + +static target_ulong h_join(PowerPCCPU *cpu, SpaprMachineState *spapr, + target_ulong opcode, target_ulong *args) +{ + CPUPPCState *env = &cpu->env; + CPUState *cs; + bool last_unjoined = true; + + if (env->msr & (1ULL << MSR_EE)) { + return H_BAD_MODE; + } + + /* + * Must not join the last CPU running. Interestingly, no such restriction + * for H_CONFER-to-self, but that is probably not intended to be used + * when H_JOIN is available. + */ + CPU_FOREACH(cs) { + PowerPCCPU *c = POWERPC_CPU(cs); + CPUPPCState *e = &c->env; + if (c == cpu) { + continue; + } + + /* Don't have a way to indicate joined, so use halted && MSR[EE]=0 */ + if (!cs->halted || (e->msr & (1ULL << MSR_EE))) { + last_unjoined = false; + break; + } + } + if (last_unjoined) { + return H_CONTINUE; + } + + return h_confer_self(cpu); +} + static target_ulong h_confer(PowerPCCPU *cpu, SpaprMachineState *spapr, target_ulong opcode, target_ulong *args) { @@ -1089,26 +1145,15 @@ static target_ulong h_confer(PowerPCCPU *cpu, SpaprMachineState *spapr, return H_PARAMETER; } - spapr_cpu = spapr_cpu_state(target_cpu); - /* * target == self is a special case, we wait until prodded, without * dispatch counter check. */ if (cpu == target_cpu) { - if (spapr_cpu->prod) { - spapr_cpu->prod = false; - - return H_SUCCESS; - } - - cs->halted = 1; - cs->exception_index = EXCP_HALTED; - cs->exit_request = 1; - - return H_SUCCESS; + return h_confer_self(cpu); } + spapr_cpu = spapr_cpu_state(target_cpu); if (!spapr_cpu->vpa_addr || ((dispatch & 1) == 0)) { return H_SUCCESS; } @@ -1981,6 +2026,9 @@ static void hypercall_register_types(void) spapr_register_hypercall(H_CONFER, h_confer); spapr_register_hypercall(H_PROD, h_prod); + /* hcall-join */ + spapr_register_hypercall(H_JOIN, h_join); + spapr_register_hypercall(H_SIGNAL_SYS_RESET, h_signal_sys_reset); /* processor register resource access h-calls */