Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3838344pxt; Tue, 10 Aug 2021 12:32:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdDtnsmtDRWH9ixx2FQcku3I1LOkGlKFvWC/abRgn1+ic1BQWA7X/yc4QtM/jPrHxhKthj X-Received: by 2002:a17:907:75f6:: with SMTP id jz22mr136256ejc.216.1628623921789; Tue, 10 Aug 2021 12:32:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1628623921; cv=pass; d=google.com; s=arc-20160816; b=QljlSf6FuTu1iPr7SaL5uWli6eUFgW8lXqHIQJ4vkijd6BKUv7V2Y0lHt3uJlPoL0Y uZBxClAtsaPzFBIZBDE6Nr17xZJtNDA8KqyIe/S637+/9N2jl7jZMfO4lTSXCUvrv5Be 4DZF2UnPf7IHfvV2ioYFBah45ZKREkjpsgQhjWjUShppbAujI6/7Z1FZVkRLOT+HvSmu 6mPf3XDZFKBnPtkI/7vitLRVKpk3VUTi3U5tKSXmCLX5c9hiBKT1EfPEX1pyo0u0X9t1 xWOWVkPMVpjEHoykvmQ5gZSJWx8YJ749NsM+OLjgAKZsssWz4crqy4+4Y8TaE8lZKuWK dakw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=0/vwKdo7nCnvZ3Sigjv3Oe8WfrMUkLmaHShADKEGHNI=; b=jCVCUqCs6ZX8lD05Q83lUqsp8DBZpfhHxJhqwVa5OwSysj71DVnPxGQQhonFmA9SpC lNbl9Ld/vHt+skG3oYRKxyoGd6JTd/a8IytZ1Nq2Vj6jwIwFYg8ljwAEmnyms1wH7f+I LJlX1VK2+27CJOlICDZ/DYAafTYuISybYCmWRTaJMaSSXv5+0cYL1ny0y/7hh00GEePI zDS1wJAUnSmrS1kjcoyObTZqO0So830BKXDRpiwkSX5Do6BmgmuCqy8upfX+kvCj2uvz d0DRPyzX2mwrE444nvOSM0sp6moVv3TyY90sitFhvqszyLC1qFt4wAxHve7Na0d3y9cF aJ4w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Mow5tRoj; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lv23si3566117ejb.287.2021.08.10.12.31.31; Tue, 10 Aug 2021 12:32:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Mow5tRoj; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232550AbhHJTbN (ORCPT + 99 others); Tue, 10 Aug 2021 15:31:13 -0400 Received: from mail-bn8nam12on2085.outbound.protection.outlook.com ([40.107.237.85]:30720 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231143AbhHJTbM (ORCPT ); Tue, 10 Aug 2021 15:31:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LrBVr4Dfk7xdOaBcdMzTsucfUZEwjNar2FApXMbOki289lvbtSW7QLXWU/k1IXHQ0PMcJ/nv6xg5zvFXvqklOusoEhj48KMmiIazkej9unv55EZHAAikP0DDM/fxNQHEkFcd+xxxnBZJz/MvbIq10djTpWArY+COyjnMJfsFSsn7QXvlAWDCr1QyqJ9fuoPtJbqUJV0bEq6FzQeJa0vHRmYz1+d1AIr3Uw/COnjQV79hHFuL39XIz7Tj774asYHucejpukSjfNtnPpbi6IiNA9umGxibTeCXwvNKfGjXKE2ibMV+nKQMVgahMnkEqVJ37CXQ0AR7IvbhKtPqVPXpKg== 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=0/vwKdo7nCnvZ3Sigjv3Oe8WfrMUkLmaHShADKEGHNI=; b=Opr+AdQAqWXZORtI/Ynl7At41H+VXOLteFGA1PILK2VUQD1WKxg+cQPQPi+j71clIkZLU7H78Lo36pUyGTGy0P0kR9Fc2w7cJzrtYazb+sJZ0Bk5thlr13csDVP6YEuInH8Ub0iwJ5mV31sg3GjohTL5RfkHHYufet0C+FkU56iCFQrhP861lUg5s1KM1AUOqKeQmGZO2XRq+4rb80Hea1DudGdxMCFySBPHD+i4sw9nOQiFQS6iPf5q/amjPe5hqagRAuPOI4uxpNHDVZNy8ob0OtyeUhj/jX9VP0iq4ABXSytQ6xglMuqMXNz4fCrkDageSjwWRD0RtQXBlgrt3Q== 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=0/vwKdo7nCnvZ3Sigjv3Oe8WfrMUkLmaHShADKEGHNI=; b=Mow5tRojVWp2Ey1cWPIRhlriW4A4uPq0PsMA3JAIPxytbgS59RdXoVeMT4VrWO788XlpF3NSsdlNeuQADmSHR8qv1uvIJ4NKSCpQKIYWYgKwK1BbJTTeEmJ2D90B6OKhhgWkVlySUMZ9uuFO7Gh7gZFsDMNqBuB+Hs1z6Kc/tHM= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by DM4PR12MB5215.namprd12.prod.outlook.com (2603:10b6:5:397::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Tue, 10 Aug 2021 19:30:48 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::73:2581:970b:3208]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::73:2581:970b:3208%3]) with mapi id 15.20.4394.023; Tue, 10 Aug 2021 19:30:48 +0000 Subject: Re: [PATCH Part1 RFC v4 05/36] x86/sev: Define the Linux specific guest termination reasons To: Brijesh Singh , Borislav Petkov Cc: 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, Thomas Gleixner , Ingo Molnar , Joerg Roedel , "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 , Michael Roth , Vlastimil Babka , tony.luck@intel.com, brijesh.ksingh@gmail.com References: <20210707181506.30489-1-brijesh.singh@amd.com> <20210707181506.30489-6-brijesh.singh@amd.com> <955b4f50-5a7b-8c60-d31e-864bc29638f5@amd.com> From: Tom Lendacky Message-ID: <65c53556-94e1-b372-7fb1-64bb78c7ae15@amd.com> Date: Tue, 10 Aug 2021 14:30:44 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <955b4f50-5a7b-8c60-d31e-864bc29638f5@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SN7PR04CA0187.namprd04.prod.outlook.com (2603:10b6:806:126::12) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.236.30.241] (165.204.77.1) by SN7PR04CA0187.namprd04.prod.outlook.com (2603:10b6:806:126::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17 via Frontend Transport; Tue, 10 Aug 2021 19:30:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a5b3df5-c635-4cf4-b4bf-08d95c355adf X-MS-TrafficTypeDiagnostic: DM4PR12MB5215: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EJDBEl1zdL6D0eKFCgs7IFWXtDaMHYAauz6YJItuMPJ5h8at/Ybkk35b47tF7NretVcDhA7NgJHsIRbX/MuiJdacSOO1RMNwpKq7PFCUlM1PEQjYlEFD04BY7Pcm8MAWABwL+7ll1okDYIJ+hzNC5ZkNak6vL8GGEtsmJB6M5WTJ5vRypi5+rC2DBbAX8Fr//b98j6uMFX7aeGS4BOqziNDpvJ5dTZXHLU4mWGWgfOGvNlp0AyUvVsRTeqgfzsOcXwq70Vc0eLu3XFqOwDnGnKx41yY79bsLgUTs8nMJOgmghow+0ypdAhjJTyfgyjJonZ1k4iW0FjgeLxQKGnHi4CiOUhgWE70Fg+NLFJ25qiamxBnNlMs/rX/ZUGpR9ZWb7sHAbgnw6RCth2hEjYGtN6VGuWAjvK+JRg+nIwmPO/Hq7i3SkEBPc2+6kiD+FTbfO+5eApONzZl3o/mhqYfFOpAtvmSHTWE5YIPTQ4JK8V5S/R001zq8rYX8qUsx7ex7MWyXV3dKimOUJJfQu4F8C7RNVKLpQslTltMUJl3DyaOsFm2L5qNXpWOTGLsvCuJuakFEoayfAhxAYco/elsfkWH+x5uobma3ZtWwDZqqntD1H1qywdPmgIdBe8m2gFD17Qx6igxfguypUtMrCYllEDWieqSQZGwGvfFOAO62vLF13/1taqUnQgjjGrszeTCu5p2P6A2aRZFilvG4yzZC3mLkP6VmkhC31R15ChDWXA0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(4326008)(31686004)(8676002)(956004)(6486002)(5660300002)(36756003)(7406005)(7416002)(53546011)(66556008)(110136005)(66476007)(66946007)(16576012)(4744005)(38100700002)(2906002)(54906003)(508600001)(86362001)(31696002)(316002)(8936002)(2616005)(83380400001)(186003)(26005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NElpMDFvM0ZqYXVjVEhUWEN6RmpBUy8yMURQaWlyN3M3UzlhbGNvVk5GSHJl?= =?utf-8?B?TEdQYWFBa05nRWhiazBiKzlZQktZODU2VzdWNlhWTnBhMUZVQU54bWdXZlYw?= =?utf-8?B?TytFczZxaHNsRU9ZVFB4VVVrUWlISjBQRUFHS24wRk05ck1NOFFEWW9nN2Ur?= =?utf-8?B?SnM0eDFENVVKRDdxSDVablZIb2FyL3BBZ09vSjE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BNZ040eE93ZmhaVGdYaThxRmNiNE5u?= =?utf-8?B?QysxSEo2WUFJbUt1dms5UDVIVXIxc2U5U1FpMHdIMUVwdnJWS2puV2MrOWMy?= =?utf-8?B?K2V0Z1BrUmtmMjVGczFNeUdhR1JIUjVBUHcyVkNZTkk2NDR4QzFIMktHOUxO?= =?utf-8?B?ZFBWRkNEZERjZU1XcnRYVWZQa1ltaGI1d0RvQ01Ta21DS0twU1lWbW5reEVi?= =?utf-8?B?VVp0S21SQ3RYSTFKcmtJTFFqVnMrd3pxSGttaXhRYTNlbk94OTBKd2RkUUFR?= =?utf-8?B?a2drVjlXRUdwSUxaRmJJTCtLMHo3VnNqOG1NQU1zL1FmUm4zR3NZKzQ2MDJP?= =?utf-8?B?czE1Yml1aUM1TEpSRy9JYThvMVhoYjhpMnFCNlo0T3BDR1dScHJ6cGY2SWFm?= =?utf-8?B?VHBDVFRDQnl4WHJuTUlyMVpJVVVEdnErOWx2RTZDTldvL2tDTmZBK3gzYVYx?= =?utf-8?B?OGFIelNudktvRjg3dXV6NWRHcHMwenFGdUpUSHNxSVFCaW04QnpXbVBqbmpu?= =?utf-8?B?SXNTcEhNNjNCeDk0UGZvcGtqT0p3SWFWSFNtaTV5dk5qeC9nWHhrTlBTQVc1?= =?utf-8?B?TFdVQ1NvaTEwTm1GelZsYU9MbXVXbkdYNVk5L1EvdUlNNFlTdFpXcG1qK1Z2?= =?utf-8?Q?bfO73/QHCvuF3lDPi3ZH5/C31aWsPTjfrC6yuSR?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a5b3df5-c635-4cf4-b4bf-08d95c355adf X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2021 19:30:47.9826 (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: BonaRp1Fh0b7MweUGFaHqjVf8cUTEOiXIbeGxmrdIPHOEvhj7hniwniSXYb3FWqi0mNx3xLrMS7BJQGXOjOhdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5215 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 8/10/21 9:59 AM, Brijesh Singh wrote: > On 8/10/21 6:33 AM, Borislav Petkov wrote: >> On Wed, Jul 07, 2021 at 01:14:35PM -0500, Brijesh Singh wrote: >>> +#define SEV_TERM_SET_LINUX        1 >> >> GHCB doc says: >> >> "This document defines and owns reason code set 0x0" >> >> Should it also say, reason code set 1 is allocated for Linux guest use? >> I don't see why not... >>  > Tom? >> > > If Tom is okay with it then maybe in next version of the GHCB doc can add > this text. IIRC, during the review of the first GHCB version there was discussion about assigning reason sets outside of 0 within the spec and the overall feeling was to not do that as part of the spec. We can re-open that discussion for the next version of the GHCB document. Thanks, Tom