Re: [PATCH 4/6] mshv: limit SynIC management to MSHV-owned resources

From: Jork Loeser

Date: Wed Apr 01 2026 - 14:01:42 EST


On Mon, 30 Mar 2026, Stanislav Kinsburskii wrote:

---
drivers/hv/mshv_synic.c | 109 ++++++++++++++++++++++++----------------
1 file changed, 67 insertions(+), 42 deletions(-)

diff --git a/drivers/hv/mshv_synic.c b/drivers/hv/mshv_synic.c
[...]
@@ -454,7 +454,6 @@ int mshv_synic_init(unsigned int cpu)
[...]
Is it possible to split out the root partition logic to a separate
function(s) instead of weawing it into this function?

Ideally, there should be a generic function called by VMBUS and a
root partition-specific function called by MSHV if needed.

There are three cases/components: VMBus (L1VH/client), MSHV(root), MSHV(L1VH). VMBus can exist with and without MSHV, and should be
self-standing. MSHV can have root or L1VH beahvior. One could split
the MSHV behavior across two functions, though keeping them in sync in the future seems more fragile. Let alone awkward semantic comparisons in reviews and bug-searches. So I think a single funtion for both MSHV cases is just way easier to maintain.

Best, Jork