================
@@ -624,6 +661,21 @@
NativeRegisterContextLinux_arm64::CacheAllRegisters(uint32_t &cached_size) {
error = ReadZA();
if (error.Fail())
return error;
+
+ // We will only be restoring ZT data if ZA is active. As writing to an
+ // inactive ZT enables ZA, which may not be desireable.
+ if (
+ // If we have ZT0, or in other words, if we have SME2.
+ GetRegisterInfo().IsZTPresent() &&
+ // And ZA is active, which means that ZT0 is also active.
+ m_za_header.size > sizeof(m_za_header)) {
+ cached_size += sizeof(RegisterSetType) + GetZTBufferSize();
+ // Unlike ZA where we have to fake data for an inactive ZA, the kernel
+ // handles an inactive ZA for us and always returns some data.
----------------
jasonmolenda wrote:
I get what this is saying but maybe "the kernel handles an inactive ZT0 for us"
would be clearer.
https://github.com/llvm/llvm-project/pull/70205
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits