From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 3022AC433F5 for ; Tue, 7 Sep 2021 13:37:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1EC45610C9 for ; Tue, 7 Sep 2021 13:37:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344697AbhIGNiz (ORCPT ); Tue, 7 Sep 2021 09:38:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:42404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344664AbhIGNiz (ORCPT ); Tue, 7 Sep 2021 09:38:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 59FDA60EB7; Tue, 7 Sep 2021 13:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631021868; bh=aGK2dcSou8XexWMUytCSYbgfygwqSAPDqtXuf+UXqOw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=RYDLqIr/p1PCNyZkxKeuh2ErR9cdhCMuDUHa27a1QxV9AdMjhtFwwfakIeuyuUrnz Q7f7ZWbsLbPRFTUoPKP7FdnsSbCW0pMz9IZvvWlbGvrB5oktkU4TW7QeW+h4z3pbA+ 4WxlkcFrHPAGI4sHvokUHFg0zeU4SDEv9Njei0CaY9vftkbRluhjkLybtXX0DLHrpo SE3qh3LgLPkBbruQ6WO4Lra7HaWRIUwsRiqDu8VSRrcHsPu3cn8C8Jt4y7alXWM497 KvDb6jLLjw+eE/B27OhBj1IcEi7iJcKIJ4qipYpb0DED5zNk7ZRVi5K3YtqmbFOvcx 176R8xkVm8pOg== Message-ID: <80cb912c6ef946a0b0c82bfdccaa92c82fe41d47.camel@kernel.org> Subject: Re: [PATCH] x86/sgx: Declare sgx_set_attribute() for !CONFIG_X86_SGX From: Jarkko Sakkinen To: Paolo Bonzini , Sean Christopherson Cc: Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Tony Luck , linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Date: Tue, 07 Sep 2021 16:37:46 +0300 In-Reply-To: References: <20210903064156.387979-1-jarkko@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Mon, 2021-09-06 at 10:35 +0200, Paolo Bonzini wrote: > On 03/09/21 17:58, Jarkko Sakkinen wrote: > > > Eh, it doesn't really simplify the usage. If anything it makes it mo= re convoluted > > > because the capability check in kvm_vm_ioctl_check_extension() still = needs an > > > #ifdef, e.g. readers will wonder why the check is conditional but the= usage is not. > > It does objectively a bit, since it's one ifdef less. >=20 > But you're effectively replacing #ifdef CONFIG_X86_SGX_KVM with #ifdef= =20 > CONFIG_X86_SGX; so the patch is not a no-op as far as KVM is concerned. >=20 > So NACK for the KVM parts (yeah I know it's RFC but just to be clearer),= =20 > but I agree that adding a stub inline version of the function is=20 > standard practice and we do it a lot in KVM too. OK, this is perfectly fine for me (I care most that we can do this in SGX side). /Jarkko