[PATCH 3/6] hv: Set the correct EOM register in case of nested hypervisor

Jinank Jain
2022-11-02T14:00:59Z

Currently we are using the default EOM register value. But this needs to
changes when running under nested MSHV setup.

Signed-off-by: Jinank Jain <jinankjain@linux.microsoft.com>
---
include/asm-generic/mshyperv.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
index 49d2e9274379..7256e2cb7b67 100644
--- a/include/asm-generic/mshyperv.h
+++ b/include/asm-generic/mshyperv.h
@@ -117,6 +117,8 @@ static inline u64 hv_generate_guest_id(u64 kernel_version)

extern bool hv_nested;

+#define REG_EOM (hv_nested ? HV_REGISTER_NESTED_EOM : HV_REGISTER_EOM)
+
/* Free the message slot and signal end-of-message if required */
static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type)
{
@@ -148,7 +150,7 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type)
* possibly deliver another msg from the
* hypervisor
*/
- hv_set_register(HV_REGISTER_EOM, 0);
+ hv_set_register(REG_EOM, 0);
}
}

--
2.25.1