[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a0170a9-e4d5-1c63-7901-416094f6ab64@gmail.com>
Date: Thu, 10 Jun 2021 22:18:45 +0800
From: Tianyu Lan <ltykernel@...il.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>, kys@...rosoft.com,
haiyangz@...rosoft.com, sthemmin@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, x86@...nel.org, hpa@...or.com, arnd@...db.de,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
akpm@...ux-foundation.org, kirill.shutemov@...ux.intel.com,
rppt@...nel.org, hannes@...xchg.org, cai@....pw,
krish.sadhukhan@...cle.com, saravanand@...com,
Tianyu.Lan@...rosoft.com, konrad.wilk@...cle.com, hch@....de,
m.szyprowski@...sung.com, robin.murphy@....com,
boris.ostrovsky@...cle.com, jgross@...e.com,
sstabellini@...nel.org, joro@...tes.org, will@...nel.org,
xen-devel@...ts.xenproject.org, davem@...emloft.net,
kuba@...nel.org, jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc: iommu@...ts.linux-foundation.org, linux-arch@...r.kernel.org,
linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org, netdev@...r.kernel.org,
thomas.lendacky@....com, brijesh.singh@....com,
sunilmut@...rosoft.com
Subject: Re: [RFC PATCH V3 03/11] x86/Hyper-V: Add new hvcall guest address
host visibility support
Hi Vitaly:
Thanks for your review.
On 6/10/2021 5:47 PM, Vitaly Kuznetsov wrote:
>> diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h
>> index 606f5cc579b2..632281b91b44 100644
>> --- a/arch/x86/include/asm/hyperv-tlfs.h
>> +++ b/arch/x86/include/asm/hyperv-tlfs.h
>> @@ -262,6 +262,17 @@ enum hv_isolation_type {
>> #define HV_X64_MSR_TIME_REF_COUNT HV_REGISTER_TIME_REF_COUNT
>> #define HV_X64_MSR_REFERENCE_TSC HV_REGISTER_REFERENCE_TSC
>>
>> +/* Hyper-V GPA map flags */
>> +#define HV_MAP_GPA_PERMISSIONS_NONE 0x0
>> +#define HV_MAP_GPA_READABLE 0x1
>> +#define HV_MAP_GPA_WRITABLE 0x2
>> +
>> +enum vmbus_page_visibility {
>> + VMBUS_PAGE_NOT_VISIBLE = 0,
>> + VMBUS_PAGE_VISIBLE_READ_ONLY = 1,
>> + VMBUS_PAGE_VISIBLE_READ_WRITE = 3
>> +};
>> +
> Why do we need both flags and the enum? I don't see HV_MAP_GPA_* being
> used anywhere and VMBUS_PAGE_VISIBLE_READ_WRITE looks like
> HV_MAP_GPA_READABLE | HV_MAP_GPA_WRITABLE.
>
> As this is used to communicate with the host, I'd suggest to avoid using
> enum and just use flags everywhere.
>
Nice catch. Will update in the next version.
Thanks.
Powered by blists - more mailing lists