Skip to contentSkip to conversation

target-arm: Added CP15 VBAR support

PATCH Peter Crosthwaite 2 participants 2 messages Jun 26, 2013 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAFEAcA-bi_+PzeiRCbo6+J+z+fG=GRVTvp7ovtJ__J3Sti0rMA@mail.gmail.com

#2 lore raw

Hi Peter,

(Sorry about the delay),

Quoted 12 lines · Peter Maydell
Quoted 3 lines · Peter Crosthwaite

From: Nathan Rossi <[email protected]>

Added Vector Base Address remapping on ARM v7.

This one's tricky because the VBAR only exists in CPUs with TrustZone, and strictly speaking QEMU models a non-TrustZone core. However we already have some dummy cp15 registers which are really TZ-only just to get guests working, and this may well fall into that category.

Quoted 5 lines

I need to have a think about how we can coherently define what QEMU does about TZ so we can have a better idea of what should and shouldn't be implemented. (If you have any suggestions I'm open to them.)

ARM_FEATURE_TZ?

Quoted 8 lines

On the patch itself:
* you've forgotten to bump the cpu vmstate version
* I'm trying to move towards using the official register abbreviations in cpu struct member names
* the low bits of VBAR are "UNK/SBZP", which means our implementation must ignore writes and read as zeroes. So you need to do the masking in the write-accessor, not at point of use

Fixed.

Quoted 4 lines

* we can just rely on the fact that the vbar field will be zero when QEMU is emulating a pre-v7 core, so you can avoid the feature check on use

Fixed.

Regards,
Peter

Quoted 3 lines

thanks
-- PMM

#3 lore raw
Quoted 7 lines · Peter Crosthwaite
Quoted 6 lines · Peter Maydell

This one's tricky because the VBAR only exists in CPUs with TrustZone, and strictly speaking QEMU models a non-TrustZone core. However we already have some dummy cp15 registers which are really TZ-only just to get guests working, and this may well fall into that category.

Quoted 7 lines
Quoted 5 lines

I need to have a think about how we can coherently define what QEMU does about TZ so we can have a better idea of what should and shouldn't be implemented. (If you have any suggestions I'm open to them.)

ARM_FEATURE_TZ?

Yes, but what should this imply about QEMU's behaviour? Naming a feature switch is easy, semantics are hard.

-- PMM