[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH V3 03/11] x86/Hyper-V: Add new hvcall guest address host visibility support
- To: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, kys@xxxxxxxxxxxxx, haiyangz@xxxxxxxxxxxxx, sthemmin@xxxxxxxxxxxxx, wei.liu@xxxxxxxxxx, decui@xxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, arnd@xxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, luto@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, kirill.shutemov@xxxxxxxxxxxxxxx, rppt@xxxxxxxxxx, hannes@xxxxxxxxxxx, cai@xxxxxx, krish.sadhukhan@xxxxxxxxxx, saravanand@xxxxxx, Tianyu.Lan@xxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, hch@xxxxxx, m.szyprowski@xxxxxxxxxxx, robin.murphy@xxxxxxx, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, joro@xxxxxxxxxx, will@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, jejb@xxxxxxxxxxxxx, martin.petersen@xxxxxxxxxx
- From: Tianyu Lan <ltykernel@xxxxxxxxx>
- Date: Thu, 10 Jun 2021 22:18:45 +0800
- Cc: iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, thomas.lendacky@xxxxxxx, brijesh.singh@xxxxxxx, sunilmut@xxxxxxxxxxxxx
- Delivery-date: Thu, 10 Jun 2021 14:19:03 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
|