On Tue, Sep 09, 2025 at 03:11:47AM +0000, Michael Kelley wrote:
> From: Roman Kisel <[email protected]> Sent: Wednesday, August 27, 
> 2025 6:06 PM
> > 
> > hv_set_non_nested_msr() has special handling for SINT MSRs
> > when a paravisor is present. In addition to updating the MSR on the
> > host, the mirror MSR in the paravisor is updated, including with the
> > proxy bit. But with Confidential VMBus, the proxy bit must not be
> > used, so add a special case to skip it.
> > 
> > Signed-off-by: Roman Kisel <[email protected]>
> > Reviewed-by: Alok Tiwari <[email protected]>
> > Reviewed-by: Tianyu Lan <[email protected]>
> > ---
[...]
> > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
> > index a619b661275b..5e2c6fd637d2 100644
> > --- a/arch/x86/kernel/cpu/mshyperv.c
> > +++ b/arch/x86/kernel/cpu/mshyperv.c
> > @@ -28,6 +28,7 @@
> >  #include <asm/apic.h>
> >  #include <asm/timer.h>
> >  #include <asm/reboot.h>
> > +#include <asm/msr.h>
> >  #include <asm/nmi.h>
> >  #include <clocksource/hyperv_timer.h>
> >  #include <asm/msr.h>
> > @@ -38,6 +39,16 @@
> >  bool hv_nested;
> >  struct ms_hyperv_info ms_hyperv;
> > 
> > +#define HYPERV_SINT_PROXY_ENABLE   BIT(20)
> > +#define HYPERV_SINT_PROXY_DISABLE  0
> 
> Seems like these definitions belong in hvgdk_mini.h together with
> the definition of "union hv_synic_sint". Since that union already
> defines the "proxy" field, the definitions really should be in terms
> of that field (though I'd have to fiddle with the code to figure out
> if there's a reasonable way to do that).
> 

If we use sint.proxy (or sint->proxy) then we don't even need this
definition. I think this is only needed because the code writes u64
directly to the MSR without reinterpreting it as hv_synic_sint.

Wei

Reply via email to