From patchwork Mon Apr 12 01:48:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1464940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OBwFNlHK; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FJWr40F1rz9sjB for ; Mon, 12 Apr 2021 11:49:24 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236358AbhDLBtk (ORCPT ); Sun, 11 Apr 2021 21:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236273AbhDLBtk (ORCPT ); Sun, 11 Apr 2021 21:49:40 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D0D5C061574 for ; Sun, 11 Apr 2021 18:49:23 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id v8so5513498plz.10 for ; Sun, 11 Apr 2021 18:49:23 -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=vWW5W66AStCwE8ZE+rX2Qsn+64wyA/hQNDRmb+lytiQ=; b=OBwFNlHKu3vt+A7+hIsLrnCi6AW9MsbtBjLIBrpH9G/UTvXVFe6LUVy1KTYHgLnHHY tNfpZ3u+7cTl/cZNHqbMxVfJn3NMO5XSvXpLxcOYcrDcDpE0pgs1b5PW5YS5AgLUKe0M /CF4tGhw8THn8IlsbLDXFlAUVg0jKjcs3gOAbxfx4Sgh1Ye+jB0v0LfaM4o9E/nSm+IE QKg+vUGBGcpylKKhteMxr5J8Hj9fqRmDCZDQeG/KAY9MmMacSU8KovwRAvdZJDqJ24Lw gj+tO39hMOZblRTejjTU0TsnpTl/R4d8TKvk7qGQuzftWHrLcUNWdCxtVKY0PJLM0jdb 2r4Q== 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=vWW5W66AStCwE8ZE+rX2Qsn+64wyA/hQNDRmb+lytiQ=; b=ao9LxvM4RswPRUGYlDL/oIeyPgF307r0vithfGK0CTzNM1oqwU8zTuLWjVQfaXwWdK vTiCk5pJNQOo2zjYtghtCwq1gMZGsdKrnf2EW4bSFFwrUGLVDIkdhuETBmO6ij0CVvZc 7y+I4b+w5P9tm29H5oJcfK/2m55huyiTfU2cxSeD7v43i7qRBY8VDJLTECDgfUs9eGSd v/jFU+N+5XUMjA/OVZ5WYbeoYE0cN1ywqDhrIHyAxtgrpbmy18CUCPStsIzFevKxKJOZ fN28ENFAiJMDpneRK0dzRxuF+hMhkoILYCbAF0InJucikYjzkqtNrx8UVs+0TpjvDrnc LvUg== X-Gm-Message-State: AOAM533Pao4VVBwLGEu18Y2oq2vAwdefGCl9m31aoKRKy4yRkUWNNURs 392LHHnk67o/jEk9i0nmYPMvL3WH0Do= X-Google-Smtp-Source: ABdhPJxChevwUV8mRTIcW1OaJdjplfJ+g+uRdMJ+AMvcHamDpA4kqq/bVGDd1YU9zpIf4lfZXJWe0w== X-Received: by 2002:a17:902:aa87:b029:ea:fe2b:e59c with SMTP id d7-20020a170902aa87b02900eafe2be59cmr2180852plr.53.1618192162861; Sun, 11 Apr 2021 18:49:22 -0700 (PDT) Received: from bobo.ibm.com (193-116-90-211.tpgi.com.au. [193.116.90.211]) by smtp.gmail.com with ESMTPSA id m9sm9502345pgt.65.2021.04.11.18.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Apr 2021 18:49:22 -0700 (PDT) From: Nicholas Piggin To: kvm-ppc@vger.kernel.org Cc: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, Paul Mackerras , Daniel Axtens , Fabiano Rosas Subject: [PATCH v1 10/12] powerpc/64s: remove KVM SKIP test from instruction breakpoint handler Date: Mon, 12 Apr 2021 11:48:43 +1000 Message-Id: <20210412014845.1517916-11-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210412014845.1517916-1-npiggin@gmail.com> References: <20210412014845.1517916-1-npiggin@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org The code being executed in KVM_GUEST_MODE_SKIP is hypervisor code with MSR[IR]=0, so the faults of concern are the d-side ones caused by access to guest context by the hypervisor. Instruction breakpoint interrupts are not a concern here. It's unlikely any good would come of causing breaks in this code, but skipping the instruction that caused it won't help matters (e.g., skip the mtmsr that sets MSR[DR]=0 or clears KVM_GUEST_MODE_SKIP). [Paul notes: "the 0x1300 interrupt was dropped from the architecture a long time ago and is not generated by P7, P8, P9 or P10." So add a comment about this in the handler code while we're here. ] Acked-by: Paul Mackerras Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index a0515cb829c2..358cd4b0c08e 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -2549,11 +2549,16 @@ EXC_REAL_NONE(0x1200, 0x100) EXC_VIRT_NONE(0x5200, 0x100) #endif - +/** + * Interrupt 0x1300 - Instruction Address Breakpoint Interrupt. + * This has been removed from the ISA before 2.01, which is the earliest + * 64-bit BookS ISA supported, however the G5 / 970 implements this + * interrupt with a non-architected feature available through the support + * processor interface. + */ INT_DEFINE_BEGIN(instruction_breakpoint) IVEC=0x1300 #ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE - IKVM_SKIP=1 IKVM_REAL=1 #endif INT_DEFINE_END(instruction_breakpoint)