Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2060039pxj; Sat, 5 Jun 2021 11:15:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxssuDlLs8oQM3G8YRqbpyk3yZ7Lbbml6F/ILaZ2DWDrWMeC5hVZMzr4kJ7UriAsdMiE0lf X-Received: by 2002:a50:99d5:: with SMTP id n21mr11436258edb.223.1622916955159; Sat, 05 Jun 2021 11:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622916955; cv=none; d=google.com; s=arc-20160816; b=pmgTCnY8QhXdcHmGfOFq/c7qPadcHuhI3U9nUNafucFNu3hHw3k476W4WlEz6Z6yU3 iInHQHcANODJSoxF6ef6dmvsD8SnL6Nyw+EAn/EaR8frjWFaOG+4UY7VxzmF/jMLROsv aiDJo6fON0OqU9O7T43PFsgWSatrllKrfjiQfE5x2sYCttSwqn6j8ZSZw9gz7q6CpXhV XMM07oFC8qz+MzJClbLPhySdC5AoJDdKQA1NUo/cnJGbf8y+wmfM0a3QhpgaX5HF22Jo KeXmWvqrHogvDxYxUoseXi06MfDDGtEkfbKrS2RuT+rwzpJYr88bxM4rrcwa687RflVh /Y4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=mywttCotNkpIMpmTkO2StxPs1xKJY1IW/V8JXPdA37I=; b=hBmnTmWZq6PBP88+wg8N57cxNWXZGlHdQP771uYkQt29+kE6nbbqV03Z5Arns159xj 71jmthoLFroikB0wuCqCd3PWYXGPKuR4AWXzq842zUn47qXKZod+SQZYINyBX0yizDjL QEAT/hWWQYY6Hrb+qKqs7jPuo+9wB1nOCxrzmlY+QDIuML0VnDh4LWWuU42MwM/wqGhk hdl9ikbEV6NktWuYZ8NERbH2h/nVw2Tjq2KnRymwh3uVkwN9C8oSdBAVuD9pLXkDG13i /yj31SnnLyFJfdiD4HgF2+1t4bjkxA7JKVrLwzNc/K77Xn7iyQgp0e4o2M8ZhcKMNCCG lGXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si7528670eji.562.2021.06.05.11.15.32; Sat, 05 Jun 2021 11:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230162AbhFESPr (ORCPT + 99 others); Sat, 5 Jun 2021 14:15:47 -0400 Received: from mga11.intel.com ([192.55.52.93]:59825 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230010AbhFESPq (ORCPT ); Sat, 5 Jun 2021 14:15:46 -0400 IronPort-SDR: yu7y87BfmbsFX5h8k7YNiuocqGVeQQNWV3TcIHBm85KAu7PefwzX3rEbIuS+tPwmtM7HaCvNNi 96TA1IxvN7Vg== X-IronPort-AV: E=McAfee;i="6200,9189,10006"; a="201432336" X-IronPort-AV: E=Sophos;i="5.83,251,1616482800"; d="scan'208";a="201432336" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2021 11:13:52 -0700 IronPort-SDR: AHVZQ0uPobEyzaZSnoCLf39lW16r4WOIZgJES25kmcWeBXmdZzd9OSaw0S4UsrU930/aYAk+F9 8RRBuPijRDWQ== X-IronPort-AV: E=Sophos;i="5.83,251,1616482800"; d="scan'208";a="448631973" Received: from eawilkin-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.213.172.148]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2021 11:13:52 -0700 Subject: Re: [RFC v2-fix-v2 1/1] x86: Introduce generic protected guest abstractionn To: Borislav Petkov , Tom Lendacky Cc: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: <20210527042356.3983284-2-sathyanarayanan.kuppuswamy@linux.intel.com> <20210601211417.2177598-1-sathyanarayanan.kuppuswamy@linux.intel.com> <1c8938fb-c9e9-af51-5224-70fc869eedea@amd.com> <12bba26f-5605-fabf-53ea-f0bc1bb9db44@amd.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: Date: Sat, 5 Jun 2021 11:12:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/5/21 4:03 AM, Borislav Petkov wrote: > Aha,*now*, I see what you mean. Ok, so the reason why I added the > WARN is to sanity-check whether we're handling all possible VM_* or > PROT_GUEST_* flags properly and whether we're missing some. As a > debugging help. It'll get removed before applying I guess. Borislav/Tom, Any consensus on function name and flag prefix? Currently suggested function names are, cc_has() or protected_guest_has() or prot_guest_has() or protected_boot_has() For flag prefix either PR_GUEST_* or CC_* I am planning to submit another version of this patch with suggested fixes. If we could reach some consensus on function and flag names, I can include them in it. If not, I will submit next version without any renames. Please let me know your comments. BTW, my choice is protected_guest_has() or CC_has(). -- Sathyanarayanan Kuppuswamy Linux Kernel Developer