/* * Iterate over the available memory ranges and convert the state to * protected memory. We should take extra care to ensure that we DO NOT * permit any "DESTROYED" pages to be converted to "RAM". * * panic() is used because if the attempt to switch the memory to * protected has failed here, then future accesses to the memory are * simply going to be reflected as a SEA (Synchronous External Abort) * which we can't handle. Bailing out early prevents the guest limping * on and dying later.
*/
for_each_mem_range(i, &start, &end) { if (rsi_set_memory_range_protected_safe(start, end)) {
panic("Failed to set memory range to protected: %pa-%pa",
&start, &end);
}
}
}
end = ALIGN(base + size, RSI_GRANULE_SIZE);
base = ALIGN_DOWN(base, RSI_GRANULE_SIZE);
while (base < end) { if (WARN_ON(rsi_ipa_state_get(base, end, &ripas, &top))) break; if (WARN_ON(top <= base)) break; if (ripas != RSI_RIPAS_DEV) break;
base = top;
}
return base >= end;
}
EXPORT_SYMBOL(__arm64_is_protected_mmio);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.