mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sathyanarayanan Kuppuswamy  <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Kai Huang <kai.huang@intel.com>, linux-kernel@vger.kernel.org
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Isaku Yamahata <isaku.yamahata@intel.com>
Subject: Re: [PATCH] x86/tdx: Explicitly include <linux/errno.h> in <asm/tdx.h>
Date: Tue, 6 Jun 2023 06:10:23 -0700	[thread overview]
Message-ID: <c84707e6-4f74-dc89-6243-63a72e86c62b@linux.intel.com> (raw)
In-Reply-To: <20230606034000.380270-1-kai.huang@intel.com>



On 6/5/23 8:40 PM, Kai Huang wrote:
> Currently, in <asm/tdx.h> tdx_kvm_hypercall() simply returns -ENODEV
> when TDX guest isn't enabled in the Kconfig w/o having <linux/errno.h>

Maybe you can explicitly say "CONFIG_INTEL_TDX_GUEST is not enabled"


> header explicitly included.  Although the current code doesn't have
> build error, in general it is a good practice to explicitly include the
> header to make sure any future patch which uses <asm/tdx.h> won't get
> build error due to error code not being defined.

Otherwise, it looks fine.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>

> 
> Fixes: cfb8ec7a31f2 ("x86/tdx: Wire up KVM hypercalls")
> Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Isaku Yamahata <isaku.yamahata@intel.com>
> Signed-off-by: Kai Huang <kai.huang@intel.com>
> ---
>  arch/x86/include/asm/tdx.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h
> index 28d889c9aa16..0f303c9abee8 100644
> --- a/arch/x86/include/asm/tdx.h
> +++ b/arch/x86/include/asm/tdx.h
> @@ -5,6 +5,7 @@
>  
>  #include <linux/init.h>
>  #include <linux/bits.h>
> +#include <linux/errno.h>
>  #include <asm/ptrace.h>
>  #include <asm/shared/tdx.h>
>  
> 
> base-commit: 122333d6bd229af279cdb35d1b874b71b3b9ccfb

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer

  parent reply	other threads:[~2023-06-06 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06  3:40 Kai Huang
2023-06-06  8:56 ` Kirill A. Shutemov
2023-06-06 13:10 ` Sathyanarayanan Kuppuswamy [this message]
2023-06-06 22:17   ` Huang, Kai
2023-06-06 22:45     ` Kirill A. Shutemov
2023-06-06 22:50       ` Huang, Kai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c84707e6-4f74-dc89-6243-63a72e86c62b@linux.intel.com \
    --to=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=isaku.yamahata@intel.com \
    --cc=kai.huang@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®