#asahi-dev · 2026-05-06 18:07
jannauI suspect it is just not writable at all on M4#asahi-dev · 2026-05-06 18:06
yukabut I can test it#asahi-dev · 2026-05-06 18:06
yukathis is not accurate on M4, I think#asahi-dev · 2026-05-06 18:04
jannauit == BIT(0)#asahi-dev · 2026-05-06 18:04
jannauI suspect it locks rvbar only when the CPU is running#asahi-dev · 2026-05-06 18:04
jannauI suspect it's not only M2 but M1 and M2 as well, we just haven't noticed before because we cleared the bit before the secondaries were running#asahi-dev · 2026-05-06 18:04
yukais this something related to whether other exception levels can set rvbar?#asahi-dev · 2026-05-06 18:03
yukahow?#asahi-dev · 2026-05-06 18:03
yukaSo BIT(0) actually changes the behavior?#asahi-dev · 2026-05-06 18:02
jannauWhat exactly? we currently need BIT(0) cleared for HV because HV needs to set RVBAR to guest entry#asahi-dev · 2026-05-06 18:02
yukasince it's not accurate for what we want to do anyways#asahi-dev · 2026-05-06 18:02
yukaand not check the locked bit at all#asahi-dev · 2026-05-06 18:02
yukaif we can just leave the locked bit, I would just do that in all cases where the rest (addr part) of the rvbar is already the intended value#asahi-dev · 2026-05-06 18:01
yukaIf we can't, we need to rely on cpu_features since there is no other way to distinguish an m3 secondary cpu (which says it's locked, but we can actually write/clear) from an m4 secondary cpu (which will serror on attempting to write/clear)#asahi-dev · 2026-05-06 18:00
yukabut my question is whether that's important or we can stop doing that#asahi-dev · 2026-05-06 17:59
jannauso the "locked" bit was always cleared for the secondary by writing _vectors_start#asahi-dev · 2026-05-06 17:59
yukabecause it continues earlier#asahi-dev · 2026-05-06 17:59
yukaright, and boot cpu never runs smp_start_cpu#asahi-dev · 2026-05-06 17:58
yukaI see#asahi-dev · 2026-05-06 17:57
jannauin smp_start_secondaries#asahi-dev · 2026-05-06 17:57
yukaI don't follow#asahi-dev · 2026-05-06 17:57
jannauthere is a check for BIT(0) on the boot CPU#asahi-dev · 2026-05-06 17:56
yukais the & 1 set only on the boot cpu?#asahi-dev · 2026-05-06 17:56
yukaonly setting _secondary_ cpu rvbars#asahi-dev · 2026-05-06 17:56
yukaoh? how did you handle that in the past?#asahi-dev · 2026-05-06 17:55
jannauthe entire register is writable, only on the the boot CPU it SErrors#asahi-dev · 2026-05-06 17:55
yukaI guess we can also use cpu_features->cyc_ovrd here#asahi-dev · 2026-05-06 17:54
yukabut would skip clearing it if the rest was correct, since we wouldn't know if clearing it would result in an serror#asahi-dev · 2026-05-06 17:54
yukaMy original approach (https://github.com/AsahiLinux/m1n1/commit/a7d0ac281bebeef8bb0cbb440273f03713fc7393) didn't use that bit#asahi-dev · 2026-05-06 17:52
yukado you _need_ to clear that bit?#asahi-dev · 2026-05-06 17:52
yukaOk!#asahi-dev · 2026-05-06 17:51
jannauit's not, I can clear BIT(0)#asahi-dev · 2026-05-06 17:50
jannaucpu0: 0x10010002cb8001, cpu4: 0x110010002cb8001#asahi-dev · 2026-05-06 17:49
yukamaybe the & 1 is not a valid indicator for it being actually locked?#asahi-dev · 2026-05-06 17:45
yukaI will gladly send a PR to revise the logic once I know what part of it is broken#asahi-dev · 2026-05-06 17:44
yukaI don't have access to an m3#asahi-dev · 2026-05-06 17:44
yukado you have a concrete example of what value you are seeing?#asahi-dev · 2026-05-06 17:44
yukahmm#asahi-dev · 2026-05-06 17:44
jannauit's still broken with that fixed and just reverting the HV part is not enough either#asahi-dev · 2026-05-06 17:43
yukabut feel free to revert the proxyclient hv part then since it serves no purpose#asahi-dev · 2026-05-06 17:42
yukaI can't type...#asahi-dev · 2026-05-06 17:42
yuka* broken because#asahi-dev · 2026-05-06 17:42
yukaor is it brokeb becuase of the FIELD_GET you just fixed?#asahi-dev · 2026-05-06 17:42
yukabut does m3 even have locked RVBAR?#asahi-dev · 2026-05-06 17:41
jannauno, HV fails on m3 where it was previously working#asahi-dev · 2026-05-06 17:40
yukait also shouldn't fail in any case where it previously worked, right?#asahi-dev · 2026-05-06 17:38
yukathis is very well possible, but then it will at least error out on the proxyclient side instead of producing SErrors#asahi-dev · 2026-05-06 17:37
yuka* I'm working with#asahi-dev · 2026-05-06 17:37
yukaI didn't test hv, since neither of the devices I'm working have working hv