Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2841701pxj; Mon, 31 May 2021 12:16:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNbVKy6/SJgxaP8BplkppT7vPj7bUcIdbH2+Qw2+U78phP41dmvUrcOHRFGB8xtAoik59j X-Received: by 2002:a05:6402:695:: with SMTP id f21mr12230350edy.96.1622488568934; Mon, 31 May 2021 12:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622488568; cv=none; d=google.com; s=arc-20160816; b=jL4fgF2/VInXLo0VrKGW4/8ps6boM47ZR3GXllKobpBIXV/fs4Uu0dI2Ba0umZ4Tl+ iLbMj/ifjugJYemlHuBgZ5KrMwRytmP5n9+oMneVd1gUsaihRadVKZsbKoYGdmapL8Qc I9200pHN1K5U1FAJLJMwnkaEQmN80KnM5/Yf87zIsv/Ogc/f+N9VIlcGtCAjnC2PZpHy NzEyiQMecHiQMh4fuac449+Mi/Qvv3wLyDJ6XCrpJEWVvxFb+K3S7xavg0EZczL2a5Sz IoJgTeOwR5qrj0zzCiMjs34KOw1H3RZaPLUT/h/PDdIY/M5TQOS3hpAoXGvHH+wgO1zg i3oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tzOm/G5qfBYV1P1hRsvP4m2wExoTfbnjW+M/2R/uxaM=; b=MvJdAm0ErDGxHeSWn48LdXGgycV4Sgi6NAT29cbmYArVn3Qw54qLfP8PlAzuq6fcUx aWNbBbJ+woiH0hLG6DwiKmpvwnw2hdwMl+e1RIas5uyrvjYldMSByPLcYl8oftdwdnxv Hf8QVxyxpZ39S7s5nOiqCgWt7XX49MBwSJH5c/nDoosRV0mrmGCtSF4vaEO6lgrRP1HC FEF8Te8e9qqp4oyzg/cOfAoZUym/Xz92uhEwx8d543EVyRxgp98QhZux4JvAGy36HyYh Jm0FsdUpiTL84MUIeKVytEiGojMHzvZiE0QloEqTOs/3R4SuasJNo8RHdf2FLHbaReBJ JKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FWSJ2LNs; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si14123995eja.417.2021.05.31.12.15.45; Mon, 31 May 2021 12:16:08 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=FWSJ2LNs; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231201AbhEaTQe (ORCPT + 99 others); Mon, 31 May 2021 15:16:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230405AbhEaTQd (ORCPT ); Mon, 31 May 2021 15:16:33 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11C7CC061574 for ; Mon, 31 May 2021 12:14:53 -0700 (PDT) Received: from zn.tnic (p200300ec2f080f00caafab4a831a2d08.dip0.t-ipconnect.de [IPv6:2003:ec:2f08:f00:caaf:ab4a:831a:2d08]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 814481EC0570; Mon, 31 May 2021 21:14:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1622488491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=tzOm/G5qfBYV1P1hRsvP4m2wExoTfbnjW+M/2R/uxaM=; b=FWSJ2LNsRYwnvOTJbHXhOVfNDRR1506QAP7UysJLaeVjadc7DLZgICluyPUbaUcOLQcQJO K5YUEdtMy8KxcNuwXj+az0r/L6G2pqkHU8MyasRLtJbSnQrQndn0k7JBr/o5DQ4+aRWvXS KJ7nQc3q2B1Eax4/ZyLt37VB8g3YPiI= Date: Mon, 31 May 2021 21:14:45 +0200 From: Borislav Petkov To: "Kuppuswamy, Sathyanarayanan" Cc: Tom Lendacky , Sean Christopherson , Dave Hansen , Andi Kleen , Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , linux-kernel@vger.kernel.org, Brijesh Singh Subject: Re: [RFC v2 28/32] x86/tdx: Make pages shared in ioremap() Message-ID: References: <0e233779-9c10-11df-b527-ef61e003ea35@linux.intel.com> <86b4d995-9619-81fa-5ef4-86f48ab01e96@amd.com> <96a63ddf-98f9-7095-f7bb-100bf56a4d10@linux.intel.com> <280669ec-d43a-83af-55ba-ad03411538b5@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <280669ec-d43a-83af-55ba-ad03411538b5@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 31, 2021 at 11:45:38AM -0700, Kuppuswamy, Sathyanarayanan wrote: > We can also use protected_guest_has(VM_VIRTIO_SECURE_FIX) or something > similar for this purpose. Andi, any comments? protected_guest_has() is enough for that - no need for two functions. > IMHO, its better to use above generic config option in common header > file (linux/protected_guest.h). Any architecture that implements > protected guest feature can enable it. This will help is hide arch > specific config options in arch specific header file. You define empty function stubs for when the arch config option is not enabled. Everything else is unnecessary. When another architecture needs this, then another architecture will generalize it like it is usually done. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette