public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sathyanarayanan Kuppuswamy  <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Wander Lairson Costa <wander@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>, Andi Kleen <ak@linux.intel.com>,
	Kai Huang <kai.huang@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/3] x86/tdx: Add TDX Guest event notify interrupt support
Date: Thu, 28 Apr 2022 10:57:29 -0700	[thread overview]
Message-ID: <9f644128-da30-a85d-1a4e-ea7ff06aec67@linux.intel.com> (raw)
In-Reply-To: <YmrTyPtrIBNM0ICk@fedora>



On 4/28/22 10:50 AM, Wander Lairson Costa wrote:
> On Fri, Apr 22, 2022 at 04:34:17PM -0700, Kuppuswamy Sathyanarayanan wrote:
> 
> [snip]
> 
>>   
>> +/*
>> + * tdx_hcall_set_notify_intr() - Setup Event Notify Interrupt Vector.
>> + *
>> + * @vector        : Vector address to be used for notification.
>> + *
>> + * return 0 on success or failure error number.
>> + */
>> +static long tdx_hcall_set_notify_intr(u8 vector)
>> +{
>> +	u64 ret;
>> +
>> +	/* Minimum vector value allowed is 32 */
>> +	if (vector < 32)
>> +		return -EINVAL;
>> +
>> +	/*
>> +	 * Register callback vector address with VMM. More details
>> +	 * about the ABI can be found in TDX Guest-Host-Communication
>> +	 * Interface (GHCI), sec titled
>> +	 * "TDG.VP.VMCALL<SetupEventNotifyInterrupt>".
>> +	 */
>> +	ret = _tdx_hypercall(TDVMCALL_SETUP_NOTIFY_INTR, vector, 0, 0, 0);
>> +
>> +	if (ret)
>> +		return ret;
>> +
>> +	return 0;
> 
> Just "return _tdx_hypercall(TDVMCALL_SETUP_NOTIFY_INTR, vector, 0, 0, 0);" does the job, doesn't it?
> And we can remove the declaration of ret.

Makes sense. I will remove it.

> 
> [snip]
> 
>>   
>> +#ifdef CONFIG_INTEL_TDX_GUEST
> 
> Just for consistency, can we change to "#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST)"?

Ok. I will change it in next version.

> 
>> +DECLARE_IDTENTRY_SYSVEC(TDX_GUEST_EVENT_NOTIFY_VECTOR,	sysvec_tdx_event_notify);
>> +#endif
>> +
> 
> [snip]
> 

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer

  reply	other threads:[~2022-04-28 17:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 23:34 [PATCH v4 0/3] Add TDX Guest Attestation support Kuppuswamy Sathyanarayanan
2022-04-22 23:34 ` [PATCH v4 1/3] x86/tdx: Add TDX Guest attestation interface driver Kuppuswamy Sathyanarayanan
2022-04-25  5:44   ` Kai Huang
2022-04-26 19:07     ` Sathyanarayanan Kuppuswamy
2022-04-27  5:15       ` Kai Huang
2022-04-27 21:45         ` Sathyanarayanan Kuppuswamy
2022-04-27 23:40           ` Kai Huang
2022-04-28  0:40             ` Sathyanarayanan Kuppuswamy
2022-04-27  4:05     ` Sathyanarayanan Kuppuswamy
2022-04-27  4:28       ` Kai Huang
2022-04-27 14:09         ` Sathyanarayanan Kuppuswamy
2022-04-27  5:45   ` Isaku Yamahata
2022-04-27  5:57     ` Kai Huang
2022-04-27 22:08     ` Sathyanarayanan Kuppuswamy
2022-04-28 17:45   ` Wander Lairson Costa
2022-04-28 17:56     ` Sathyanarayanan Kuppuswamy
2022-04-28 18:04       ` Dave Hansen
2022-04-28 18:18         ` Sathyanarayanan Kuppuswamy
2022-04-22 23:34 ` [PATCH v4 2/3] x86/tdx: Add TDX Guest event notify interrupt support Kuppuswamy Sathyanarayanan
2022-04-28 17:50   ` Wander Lairson Costa
2022-04-28 17:57     ` Sathyanarayanan Kuppuswamy [this message]
2022-04-22 23:34 ` [PATCH v4 3/3] x86/tdx: Add Quote generation support Kuppuswamy Sathyanarayanan
2022-04-26  9:47   ` Kai Huang
2022-05-01  0:52     ` Sathyanarayanan Kuppuswamy
2022-04-27  6:14   ` Isaku Yamahata
2022-05-01  1:02     ` Sathyanarayanan Kuppuswamy
2022-04-28 17:58   ` Wander Lairson Costa
2022-04-28 18:11     ` Sathyanarayanan Kuppuswamy

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=9f644128-da30-a85d-1a4e-ea7ff06aec67@linux.intel.com \
    --to=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kai.huang@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=wander@redhat.com \
    --cc=x86@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