[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c31c18d-af76-c5af-84f1-0dafe48f8605@gmail.com>
Date: Sat, 2 Oct 2021 22:39:56 +0800
From: Tianyu Lan <ltykernel@...il.com>
To: Michael Kelley <mikelley@...rosoft.com>,
KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "x86@...nel.org" <x86@...nel.org>,
"hpa@...or.com" <hpa@...or.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"luto@...nel.org" <luto@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"arnd@...db.de" <arnd@...db.de>,
"brijesh.singh@....com" <brijesh.singh@....com>,
"jroedel@...e.de" <jroedel@...e.de>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>,
"pgonda@...gle.com" <pgonda@...gle.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"rppt@...nel.org" <rppt@...nel.org>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"saravanand@...com" <saravanand@...com>,
"aneesh.kumar@...ux.ibm.com" <aneesh.kumar@...ux.ibm.com>,
"rientjes@...gle.com" <rientjes@...gle.com>,
"tj@...nel.org" <tj@...nel.org>
Cc: "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
vkuznets <vkuznets@...hat.com>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
"hch@....de" <hch@....de>,
"robin.murphy@....com" <robin.murphy@....com>,
"joro@...tes.org" <joro@...tes.org>,
"parri.andrea@...il.com" <parri.andrea@...il.com>,
"dave.hansen@...el.com" <dave.hansen@...el.com>
Subject: Re: [PATCH V6 7/8] Drivers: hv: vmbus: Add SNP support for VMbus
channel initiate message
Hi Michael:
Thanks for your review.
On 10/2/2021 9:26 PM, Michael Kelley wrote:
>> @@ -303,10 +365,26 @@ void vmbus_disconnect(void)
>> vmbus_connection.int_page = NULL;
>> }
>>
>> - hv_free_hyperv_page((unsigned long)vmbus_connection.monitor_pages[0]);
>> - hv_free_hyperv_page((unsigned long)vmbus_connection.monitor_pages[1]);
>> - vmbus_connection.monitor_pages[0] = NULL;
>> - vmbus_connection.monitor_pages[1] = NULL;
>> + if (hv_is_isolation_supported()) {
>> + memunmap(vmbus_connection.monitor_pages[0]);
>> + memunmap(vmbus_connection.monitor_pages[1]);
> The matching memremap() calls are made in vmbus_connect() only in the
> SNP case. In the non-SNP case, monitor_pages and monitor_pages_original
> are the same, so you would be doing an unmap, and then doing the
> set_memory_encrypted() and hv_free_hyperv_page() using an address
> that is no longer mapped, which seems wrong. Looking at memunmap(),
> it might be a no-op in this case, but even if it is, making them conditional
> on the SNP case might be a safer thing to do, and it would make the code
> more symmetrical.
>
Yes, memumap() does nothing is the non-SNP CVM and so I didn't check CVM
type here. I will add the check in the next version.
Thanks.
Powered by blists - more mailing lists