Inter-revision diff: patch 5

Comparing v4 (message) to rfc (message)

--- v4
+++ vrfc
@@ -6,20 +6,50 @@
 
 Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
 ---
- arch/x86/hyperv/ivm.c           | 42 +++++++++++++++++++++++++++++++++
+ arch/x86/hyperv/ivm.c           | 69 +++++++++++++++++++++++++++++++++
  arch/x86/include/asm/mshyperv.h |  1 +
- drivers/hv/connection.c         |  6 ++++-
- drivers/hv/hv.c                 |  8 ++++++-
- include/asm-generic/mshyperv.h  | 29 +++++++++++++++++++++++
- 5 files changed, 84 insertions(+), 2 deletions(-)
+ drivers/hv/connection.c         |  6 ++-
+ drivers/hv/hv.c                 |  8 +++-
+ 4 files changed, 82 insertions(+), 2 deletions(-)
 
 diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
-index c7b54631ca0d..8a6f4e9e3d6c 100644
+index 4332bf7aaf9b..feaabcd151f5 100644
 --- a/arch/x86/hyperv/ivm.c
 +++ b/arch/x86/hyperv/ivm.c
-@@ -15,6 +15,48 @@
- #include <asm/io.h>
- #include <asm/mshyperv.h>
+@@ -14,8 +14,77 @@
+ 
+ union hv_ghcb {
+ 	struct ghcb ghcb;
++	struct {
++		u64 hypercalldata[509];
++		u64 outputgpa;
++		union {
++			union {
++				struct {
++					u32 callcode        : 16;
++					u32 isfast          : 1;
++					u32 reserved1       : 14;
++					u32 isnested        : 1;
++					u32 countofelements : 12;
++					u32 reserved2       : 4;
++					u32 repstartindex   : 12;
++					u32 reserved3       : 4;
++				};
++				u64 asuint64;
++			} hypercallinput;
++			union {
++				struct {
++					u16 callstatus;
++					u16 reserved1;
++					u32 elementsprocessed : 12;
++					u32 reserved2         : 20;
++				};
++				u64 asunit64;
++			} hypercalloutput;
++		};
++		u64 reserved2;
++	} hypercall;
+ } __packed __aligned(PAGE_SIZE);
  
 +u64 hv_ghcb_hypercall(u64 control, void *input, void *output, u32 input_size)
 +{
@@ -29,8 +59,6 @@
 +
 +	if (!ms_hyperv.ghcb_base)
 +		return -EFAULT;
-+
-+	WARN_ON(in_nmi());
 +
 +	local_irq_save(flags);
 +	ghcb_base = (void **)this_cpu_ptr(ms_hyperv.ghcb_base);
@@ -67,10 +95,10 @@
  {
  	union hv_ghcb *hv_ghcb;
 diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
-index f9cc3753040a..fe03e3e833ac 100644
+index f624d72b99d3..c8f66d269e5b 100644
 --- a/arch/x86/include/asm/mshyperv.h
 +++ b/arch/x86/include/asm/mshyperv.h
-@@ -258,6 +258,7 @@ void hv_sint_rdmsrl_ghcb(u64 msr, u64 *value);
+@@ -274,6 +274,7 @@ void hv_sint_rdmsrl_ghcb(u64 msr, u64 *value);
  void hv_signal_eom_ghcb(void);
  void hv_ghcb_msr_write(u64 msr, u64 value);
  void hv_ghcb_msr_read(u64 msr, u64 *value);
@@ -79,10 +107,10 @@
  #define hv_get_synint_state_ghcb(int_num, val)			\
  	hv_sint_rdmsrl_ghcb(HV_X64_MSR_SINT0 + int_num, val)
 diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
-index 311cd005b3be..186fd4c8acd4 100644
+index c83612cddb99..79bca653dce9 100644
 --- a/drivers/hv/connection.c
 +++ b/drivers/hv/connection.c
-@@ -445,6 +445,10 @@ void vmbus_set_event(struct vmbus_channel *channel)
+@@ -442,6 +442,10 @@ void vmbus_set_event(struct vmbus_channel *channel)
  
  	++channel->sig_events;
  
@@ -95,10 +123,10 @@
  }
  EXPORT_SYMBOL_GPL(vmbus_set_event);
 diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
-index 59f7173c4d9f..e5c9fc467893 100644
+index 28e28ccc2081..6c64a7fd1ebd 100644
 --- a/drivers/hv/hv.c
 +++ b/drivers/hv/hv.c
-@@ -98,7 +98,13 @@ int hv_post_message(union hv_connection_id connection_id,
+@@ -60,7 +60,13 @@ int hv_post_message(union hv_connection_id connection_id,
  	aligned_msg->payload_size = payload_size;
  	memcpy((void *)aligned_msg->payload, payload, payload_size);
  
@@ -113,46 +141,6 @@
  
  	/* Preemption must remain disabled until after the hypercall
  	 * so some other thread can't get scheduled onto this cpu and
-diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
-index e6d6886faed1..8f6f283fb5b5 100644
---- a/include/asm-generic/mshyperv.h
-+++ b/include/asm-generic/mshyperv.h
-@@ -30,6 +30,35 @@
- 
- union hv_ghcb {
- 	struct ghcb ghcb;
-+	struct {
-+		u64 hypercalldata[509];
-+		u64 outputgpa;
-+		union {
-+			union {
-+				struct {
-+					u32 callcode        : 16;
-+					u32 isfast          : 1;
-+					u32 reserved1       : 14;
-+					u32 isnested        : 1;
-+					u32 countofelements : 12;
-+					u32 reserved2       : 4;
-+					u32 repstartindex   : 12;
-+					u32 reserved3       : 4;
-+				};
-+				u64 asuint64;
-+			} hypercallinput;
-+			union {
-+				struct {
-+					u16 callstatus;
-+					u16 reserved1;
-+					u32 elementsprocessed : 12;
-+					u32 reserved2         : 20;
-+				};
-+				u64 asunit64;
-+			} hypercalloutput;
-+		};
-+		u64 reserved2;
-+	} hypercall;
- } __packed __aligned(PAGE_SIZE);
- 
- struct ms_hyperv_info {
 -- 
 2.25.1
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help