[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e8b1b0b5f32115c0ef8f1aeb0b805c4d9a953b31.camel@intel.com>
Date: Tue, 5 Sep 2023 16:25:00 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Jason@...c4.com" <Jason@...c4.com>,
"Lutomirski, Andy" <luto@...nel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"Hansen, Dave" <dave.hansen@...el.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"kys@...rosoft.com" <kys@...rosoft.com>,
"Cui, Dexuan" <decui@...rosoft.com>,
"nik.borisov@...e.com" <nik.borisov@...e.com>,
"arnd@...db.de" <arnd@...db.de>,
"mikelley@...rosoft.com" <mikelley@...rosoft.com>,
"chu, jane" <jane.chu@...cle.com>, "hpa@...or.com" <hpa@...or.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
"bp@...en8.de" <bp@...en8.de>, "Luck, Tony" <tony.luck@...el.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"brijesh.singh@....com" <brijesh.singh@....com>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"x86@...nel.org" <x86@...nel.org>
CC: "vkuznets@...hat.com" <vkuznets@...hat.com>,
"Li, Xiaoyao" <xiaoyao.li@...el.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Tianyu.Lan@...rosoft.com" <Tianyu.Lan@...rosoft.com>,
"andavis@...hat.com" <andavis@...hat.com>,
"mheslin@...hat.com" <mheslin@...hat.com>
Subject: Re: [PATCH v10 2/2] x86/tdx: Support vmalloc() for
tdx_enc_status_changed()
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@...ux.intel.com>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Reviewed-by: Michael Kelley <mikelley@...rosoft.com>
> Reviewed-by: Kuppuswamy Sathyanarayanan
> <sathyanarayanan.kuppuswamy@...ux.intel.com>
> Signed-off-by: Dexuan Cui <decui@...rosoft.com>
> ---
> arch/x86/coco/tdx/tdx.c | 36 ++++++++++++++++++++++++++++++------
> 1 file changed, 30 insertions(+), 6 deletions(-)
Reviewed-by: Rick Edgecombe <rick.p.edgecombe@...el.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.
Powered by blists - more mailing lists