linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "Jason@zx2c4.com" <Jason@zx2c4.com>,
	"Lutomirski, Andy" <luto@kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"kys@microsoft.com" <kys@microsoft.com>,
	"Cui, Dexuan" <decui@microsoft.com>,
	"nik.borisov@suse.com" <nik.borisov@suse.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"mikelley@microsoft.com" <mikelley@microsoft.com>,
	"chu, jane" <jane.chu@oracle.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	"bp@alien8.de" <bp@alien8.de>, "Luck, Tony" <tony.luck@intel.com>,
	"Christopherson,, Sean" <seanjc@google.com>,
	"sathyanarayanan.kuppuswamy@linux.intel.com"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"brijesh.singh@amd.com" <brijesh.singh@amd.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"x86@kernel.org" <x86@kernel.org>
Cc: "vkuznets@redhat.com" <vkuznets@redhat.com>,
	"Li, Xiaoyao" <xiaoyao.li@intel.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Tianyu.Lan@microsoft.com" <Tianyu.Lan@microsoft.com>,
	"andavis@redhat.com" <andavis@redhat.com>,
	"mheslin@redhat.com" <mheslin@redhat.com>
Subject: Re: [PATCH v10 2/2] x86/tdx: Support vmalloc() for tdx_enc_status_changed()
Date: Tue, 5 Sep 2023 16:25:00 +0000	[thread overview]
Message-ID: <e8b1b0b5f32115c0ef8f1aeb0b805c4d9a953b31.camel@intel.com> (raw)
In-Reply-To: <20230811214826.9609-3-decui@microsoft.com>

On Fri, 2023-08-11 at 14:48 -0700, Dexuan Cui wrote:
> When a TDX guest runs on Hyper-V, the hv_netvsc driver's
> netvsc_init_buf()
> allocates buffers using vzalloc(), and needs to share the buffers
> with the
> host OS by calling set_memory_decrypted(), which is not working for
> vmalloc() yet. Add the support by handling the pages one by one.
> 
> Co-developed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> Reviewed-by: Kuppuswamy Sathyanarayanan
> <sathyanarayanan.kuppuswamy@linux.intel.com>
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
> ---
>  arch/x86/coco/tdx/tdx.c | 36 ++++++++++++++++++++++++++++++------
>  1 file changed, 30 insertions(+), 6 deletions(-)

Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>

Only small comment, it is possible to have huge vmalloc's now, which
would mean this would do 512 TDVMCALL_MAP_GPA calls instead of 1 when
encountering a huge vmalloc mapping. If this used lookup_address()
directly instead of slow_virt_to_phys(), it could catch this case. I
don't think there are any cases of huge vmallocs today that would get
passed into set_memory_en/decrypted(), so would only be future
proofing.

  reply	other threads:[~2023-09-05 16:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 21:48 [PATCH v10 0/2] Support TDX guests on Hyper-V (the x86/tdx part) Dexuan Cui
2023-08-11 21:48 ` [PATCH v10 1/2] x86/tdx: Retry partially-completed page conversion hypercalls Dexuan Cui
2023-08-14 19:03   ` Isaku Yamahata
2023-08-22 16:47     ` Dexuan Cui
2023-09-06  1:19   ` Huang, Kai
2023-09-06  3:06     ` Huang, Kai
2023-09-07 21:13   ` Dave Hansen
2023-08-11 21:48 ` [PATCH v10 2/2] x86/tdx: Support vmalloc() for tdx_enc_status_changed() Dexuan Cui
2023-09-05 16:25   ` Edgecombe, Rick P [this message]
2023-09-05 18:04     ` Dexuan Cui
2023-09-06  1:27   ` Huang, Kai
2023-09-07 21:14   ` Dave Hansen

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=e8b1b0b5f32115c0ef8f1aeb0b805c4d9a953b31.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=Jason@zx2c4.com \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=ak@linux.intel.com \
    --cc=andavis@redhat.com \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=brijesh.singh@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=jane.chu@oracle.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mheslin@redhat.com \
    --cc=mikelley@microsoft.com \
    --cc=mingo@redhat.com \
    --cc=nik.borisov@suse.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wei.liu@kernel.org \
    --cc=x86@kernel.org \
    --cc=xiaoyao.li@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).