From patchwork Tue Dec 7 20:38:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Heimes X-Patchwork-Id: 1564873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Sn4BSumA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J7sbW4SX6z9sRN for ; Wed, 8 Dec 2021 07:39:19 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1muhF0-0003w6-Jg; Tue, 07 Dec 2021 20:39:10 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1muhEx-0003qd-2y for kernel-team@lists.ubuntu.com; Tue, 07 Dec 2021 20:39:07 +0000 Received: from T570.fritz.box (p54abb5f9.dip0.t-ipconnect.de [84.171.181.249]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id BD0823F1EB for ; Tue, 7 Dec 2021 20:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638909546; bh=5DPqeu+wV4t7NZZXnaZYwMYJR/wKKFtj/tSgSW4hWVs=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Sn4BSumAGmoA/RxvBE+HuDfW+PWy3xUyiOWOOWJwxtBVL4Ea4OeaQ2SuTO8ehs2Cb Wl8RxA1z1hXtoxpM/zWAdxh5ikngsT39BrDONIoFWW6tk4ldzO0HiuzdoLia+OjVTn N8jqRJI3XUNYxlKypIUh6CD4k2uyBti9PhPLPsPxovzSrPiL7oZ5GbdlMDuovzNFtl ks/5PwQM7oQdKzYDWaldqmwcXAODXoY+D3jBHF2mD9sknYf9GqYdQHqoyacm9WBGYp V6Hzv+9VqHZpxRNse7IKt2enIiadQtSTQ3ToyVKzc0LkatxWs/N8XJcfTpm8blBO+r 02/IfHYLdvyGg== From: frank.heimes@canonical.com To: kernel-team@lists.ubuntu.com Subject: [J][PATCH 1/1] KVM: s390: add debug statement for diag 318 CPNC data Date: Tue, 7 Dec 2021 21:38:50 +0100 Message-Id: <20211207203850.3212728-7-frank.heimes@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211207203850.3212728-1-frank.heimes@canonical.com> References: <20211207203850.3212728-1-frank.heimes@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Collin Walling BugLink: https://bugs.launchpad.net/bugs/1953334 The diag 318 data contains values that denote information regarding the guest's environment. Currently, it is unecessarily difficult to observe this value (either manually-inserted debug statements, gdb stepping, mem dumping etc). It's useful to observe this information to obtain an at-a-glance view of the guest's environment, so lets add a simple VCPU event that prints the CPNC to the s390dbf logs. Signed-off-by: Collin Walling Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20211027025451.290124-1-walling@linux.ibm.com [borntraeger@de.ibm.com]: change debug level to 3 Signed-off-by: Christian Borntraeger (cherry picked from commit 3fd8417f2c728d810a3b26d7e2008012ffb7fd01) Signed-off-by: Frank Heimes --- arch/s390/kvm/kvm-s390.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 1c97493d21e1..db20025b7e9d 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -4255,6 +4255,7 @@ static void sync_regs_fmt2(struct kvm_vcpu *vcpu) if (kvm_run->kvm_dirty_regs & KVM_SYNC_DIAG318) { vcpu->arch.diag318_info.val = kvm_run->s.regs.diag318; vcpu->arch.sie_block->cpnc = vcpu->arch.diag318_info.cpnc; + VCPU_EVENT(vcpu, 3, "setting cpnc to %d", vcpu->arch.diag318_info.cpnc); } /* * If userspace sets the riccb (e.g. after migration) to a valid state,