> On 20. Mar 2026, at 10:17, Peter Maydell <[email protected]> wrote:
> 
> On Thu, 19 Mar 2026 at 18:50, Mohamed Mediouni <[email protected]> 
> wrote:
>> 
>> 
>>> On 19. Mar 2026, at 19:13, Peter Maydell <[email protected]> wrote:
>>> 
>>> On Sat, 14 Mar 2026 at 22:15, Mohamed Mediouni <[email protected]> 
>>> wrote:
>>>> 
>>>> Linux uses AccessVpRegs without checking availability and panics if it's 
>>>> not there. Expose it unconditionally.
>>> 
>>> The commit message subject says we're enabling enlightenments...
>>> 
>>>> @@ -953,13 +953,15 @@ int whpx_accel_init(AccelState *as, MachineState *ms)
>>>>    synthetic_features.Bank0.AccessPartitionReferenceTsc = 1;
>>>>    synthetic_features.Bank0.AccessHypercallRegs = 1;
>>>>    synthetic_features.Bank0.AccessVpIndex = 1;
>>>> -    synthetic_features.Bank0.AccessHypercallRegs = 1;
>>> 
>>> ...but the code change seems to be removing one as well as
>>> adding the three new ones. Intentional?
>> Hello,
>> 
>> The AccessHypercallRegs bit was set twice - with the first one being two
>> lines earlier - removed a spurious one of the two.
> 
> Ah, right. How about this for a commit message ?
> 
> 
>    whpx: arm: enable more enlightenments
> 
>    Unconditionally enable some more enlightenments for whpx. In
>    particular, linux uses AccessVpRegs without checking availability and
>    panics if it's not there, so it's important to expose it.
> 
>    We also had a duplicate line where we set AccessHypercallRegs = 1
>    twice; remove the duplicate.
> 
> 
> If you have more rationale/info about the other two we're enabling,
> that would also be nice to include.
> 
> thanks
> -- PMM

Hello,


```
whpx: arm: enable more enlightenments

Enable some more enlightenments for whpx for -accel whpx,hyperv=on.
In particular, Linux uses AccessVpRegs without checking availability when
Hyper-V enlightenments are exposed and panics if it's not there.

We also had a duplicate line where we set AccessHypercallRegs = 1
twice; remove the duplicate.

Microsoft’s VMM exposes SyncContext on arm64 and FastHypercallOutput 
regardless of architecture unconditionally, so add those two to match 
that configuration.

```

On arm64, Hyper-V enlightenments with QEMU whpx aren’t on by default
and are a more research-y configuration - as the case when it was needed
to have a properly-behaved VM on Snapdragon X laptops has been worked around 
in Hyper-V.

Snapdragon X has broken CNTVOFF_EL2 with an interrupt flood when 
HCR_EL2.E2H = 1 + CNTVOFF_EL2 != 0 and Hyper-V synthetic timers were 
used on arm64 to sidestep that. Nowadays, Hyper-V has a workaround 
so that the virtual timer can be used instead of needing to resort
to using those.

Thanks,
-Mohamed



Reply via email to