From patchwork Wed Jul 7 18:36:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 12363881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9545C07E95 for ; Wed, 7 Jul 2021 18:54:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 56CCC61CB2 for ; Wed, 7 Jul 2021 18:54:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56CCC61CB2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3D2A36B0093; Wed, 7 Jul 2021 14:54:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A96B6B0095; Wed, 7 Jul 2021 14:54:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1874A6B009D; Wed, 7 Jul 2021 14:54:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id E6D496B0093 for ; Wed, 7 Jul 2021 14:53:59 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5126A1CB09 for ; Wed, 7 Jul 2021 18:53:59 +0000 (UTC) X-FDA: 78336691398.17.899FDD0 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2065.outbound.protection.outlook.com [40.107.236.65]) by imf28.hostedemail.com (Postfix) with ESMTP id 7F58490000B7 for ; Wed, 7 Jul 2021 18:53:58 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VPsK/IlkQtGceYQSMy3Sw8CV2mrPn+Fh+pBKSuYmRwHT7RYYrTdksxcUELCSbeJ8rpBKfAjMVdDrtBlLCuBEfd6k7w5G5Kare7KjN2ei2hZOFoNjQerdtg81SaLHwSs5Dm9/C6v9eV7ZqIOycDYhMdJWlY4gp9vUecton6+/IO8qdgtkTmgd4+wTeDu+8YXNmNb6tyuGIM5GQg9hlyY1VOUSJB6mHEPUQ4e8XH9m5fzXrw0Wh5POdnCthsA14f0QKiTiwl64hy6B3mvy92DEz5FPvC3fEWHjtwlR8K4jfQgzsy5MQKBSDkjwQg3wNJ/SBeTBLaUDWEjSocHKSximwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zJsHY8n2NA4exO9t0dViCB784NHvK8fDVYNzRX7Qd/g=; b=iKn2E4DViJ53Lpo9U/iIz13O5MEOGGyZKUSKS4tYcBuz/JA1W8/IOcp6BwEPhbjb6aL2noOy2qTLkI1oHmP0649MLd/qZaMLrddLdLL6bpIbnMrHXD2WAO6RrNgjQgbRwWOM/MbgHAUwGMVcilNx96VG5dlSn3Mi9qnOAnwNihuhmmQtFE8vfw3biDSyG5UxSdIPXVcIVy4B80+7wKuxLgOo/aMykwZcYgT2BLuO+mhTXeKsppC1uIVSqQjA31WJu0Awjey1xoaXfkrelKDCoQ0TiiZSgYtG2YwS9pnhyw9mfpHqr5nadUzEcznym8iR1PDQB2BDaD6x3hjAgosCxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zJsHY8n2NA4exO9t0dViCB784NHvK8fDVYNzRX7Qd/g=; b=NNDowqT6HXvX5rSOK+BqiWM8AbwZQh3Ryj9TlFpqAtPE2pgVJsxl2ZyXwE/PDOUt65oB1A/FB707WwLoWAhwQ89tE754C2Y3jAHc2GaFVWGVXHS6qQpr8/+le738YyBYrjVf4iwIXD9s1q80WPvAYSpVNR0pMU9F1tKgp2h6Jtk= Received: from BYAPR12MB2711.namprd12.prod.outlook.com (2603:10b6:a03:63::10) by BY5PR12MB4082.namprd12.prod.outlook.com (2603:10b6:a03:212::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20; Wed, 7 Jul 2021 18:38:15 +0000 Received: from BYAPR12MB2711.namprd12.prod.outlook.com ([fe80::40e3:aade:9549:4bed]) by BYAPR12MB2711.namprd12.prod.outlook.com ([fe80::40e3:aade:9549:4bed%7]) with mapi id 15.20.4287.033; Wed, 7 Jul 2021 18:38:15 +0000 From: Brijesh Singh To: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , Michael Roth , Vlastimil Babka , tony.luck@intel.com, npmccallum@redhat.com, brijesh.ksingh@gmail.com, Brijesh Singh Subject: [PATCH Part2 RFC v4 31/40] KVM: X86: update page-fault trace to log the 64-bit error code Date: Wed, 7 Jul 2021 13:36:07 -0500 Message-Id: <20210707183616.5620-32-brijesh.singh@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210707183616.5620-1-brijesh.singh@amd.com> References: <20210707183616.5620-1-brijesh.singh@amd.com> X-ClientProxiedBy: SN6PR04CA0078.namprd04.prod.outlook.com (2603:10b6:805:f2::19) To BYAPR12MB2711.namprd12.prod.outlook.com (2603:10b6:a03:63::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sbrijesh-desktop.amd.com (165.204.77.1) by SN6PR04CA0078.namprd04.prod.outlook.com (2603:10b6:805:f2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 18:38:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: acba4824-8c8d-45d4-322c-08d941766197 X-MS-TrafficTypeDiagnostic: BY5PR12MB4082: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ociQfiE1QYoGxZ9jmEUHAoN8CN4BCgazgKqSScSgxnIWcBG1ll1+5qTHVZc5uiP9l6DcjV7jA0jiYgjcdgZIW3L59CihO+UIaVyLGgoklDNL+YJan4BqRgdmRxQK+U4XRu8uzIS0YdC77kHhOn6gy5uoaC2pSZ15WpX4MD8PJys9OVrpvLEjqPchVlzAJOVolKzb906R85YfcSRTETBrnuo1nfeNTJPiHbMTrOWpziq0V++eV6N4gVrZlO82T6tmwMV+APZilQQ/fx5fs5wcD7TZJQo3UCpbIOq76zLMj6WpjiSWdh/RFzpnEqLuUptnjDd1Eujlcp34WM9/I2Hid3CLb8VX7GHDkuOBwtTw9yPrbdpxOfPW4UsVb5oWh0GG533f+uh1a+BaJpajb6esLBFedR4+iSn8+jtm/s00fXr7WKqn0h1mnltpOGLc8KCstJZX1mKVcDiOkMwCpFUnr6q43T07rdZn/It0uFSm4KrqxaB3tarf6npCOz5iL0xZM4vShIx089FVG85ue7Igd9EXZr4h7rjFJb/REhksCe+0uqtLnLZjiRHSC82FCBPWmADWuFlfWsOvh/B5uMPmOMwh9rI/KbDXXvUQpuXSCRjHExF3tiBaBrF8jy6u95Fk++eV1VBXxw04psnk+TcEVAjpmLcHV+JlKUw8rxFna9Hk9Hy9CIHvT5pGld18lcj/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB2711.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39860400002)(376002)(396003)(346002)(136003)(7696005)(52116002)(44832011)(8676002)(38350700002)(66946007)(38100700002)(54906003)(66476007)(8936002)(478600001)(6666004)(956004)(6486002)(7416002)(66556008)(7406005)(186003)(2616005)(2906002)(83380400001)(1076003)(4326008)(86362001)(5660300002)(36756003)(26005)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7IhPC2rsVeI4oA3QdOry8eSb1otqS8f2haYDG8fzPwh0cqEPnSMMpSdBu8rbhSXa/qxrOhj9ua3Z3uiEbyrkN97vDcapE7JQPvWJz8BtrVx0xQBj+IJruWnIcOW8ZxBm913FPH9+dlddF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AMqKMb+sf2zOAtoKy44rofeFR7qqb7Im26V6QTTv1DgBNU3CRzwN9loqbTADDBqfLrPYSCsNpN0y/M1s5G99wgmF2xXt3nfqrfcnVyBqSnkVk0aY90J X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: acba4824-8c8d-45d4-322c-08d941766197 X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2711.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 18:38:15.0929 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0ZMm2n822mavlKSMwYviTsg83k3BaxGeX3RDGGKL8iA2iSZeddftrPsb0q9Syt2A2JSKCBHbZxdnBykzAJpuuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4082 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=NNDowqT6; spf=pass (imf28.hostedemail.com: domain of brijesh.singh@amd.com designates 40.107.236.65 as permitted sender) smtp.mailfrom=brijesh.singh@amd.com; dmarc=pass (policy=quarantine) header.from=amd.com X-Rspamd-Server: rspam05 X-Stat-Signature: cc5cim4upex1pxw7b7dqsx9bkdmcukcq X-Rspamd-Queue-Id: 7F58490000B7 X-Rspam-User: nil X-HE-Tag: 1625684038-919711 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The page-fault error code is a 64-bit value, but the trace prints only the lower 32-bits. Some of the SEV-SNP RMP fault error codes are available in the upper 32-bits. Signed-off-by: Brijesh Singh --- arch/x86/kvm/trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index a61c015870e3..78cbf53bf412 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h @@ -365,12 +365,12 @@ TRACE_EVENT(kvm_inj_exception, * Tracepoint for page fault. */ TRACE_EVENT(kvm_page_fault, - TP_PROTO(unsigned long fault_address, unsigned int error_code), + TP_PROTO(unsigned long fault_address, u64 error_code), TP_ARGS(fault_address, error_code), TP_STRUCT__entry( __field( unsigned long, fault_address ) - __field( unsigned int, error_code ) + __field( u64, error_code ) ), TP_fast_assign( @@ -378,7 +378,7 @@ TRACE_EVENT(kvm_page_fault, __entry->error_code = error_code; ), - TP_printk("address %lx error_code %x", + TP_printk("address %lx error_code %llx", __entry->fault_address, __entry->error_code) );