Closed nwf closed 2 years ago
This should have gone to dev
(qemu-morello-merged is the feature branch that was iterated on, with patches pulled out into dev and dev periodically merged back into qemu-morello-merged; it sticks around since cheribuild builds it but has an identical tree to dev, just with additional messy history from the upstreaming work)
(i.e. please cherry-pick this to dev and merge back into qemu-morello-merged)
Previously, having either set was sufficient to avoid a trap and SC would not be set if CDBM were.
CheriBSD is already aware that it may have to set SC itself even if CDBM is set, so just feed into that logic by raising a trap if SC is clear, ignoring CDBM.
This is, I believe, a sufficient subset of #167. It should not be merged until CheriBSD has had https://github.com/CTSRD-CHERI/cheribsd/pull/1465 land.