Commit Graph

3 Commits (23b183fb168a50e2e0599b4905bdcef1761e65db)

Author SHA1 Message Date
Paul Mackerras 140b930ad3 tests: Add tests for lq/stq, plq/pstq and lqarx/stqcx.
Lq and stq are tested in both BE and LE modes (though only 64-bit
mode) by the 'modes' test.

Lqarx and stqcx. are tested by the 'reservation' test in LE mode
(64-bit).

Plq and pstq are tested in 64-bit LE mode by the 'prefix' test.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
4 weeks ago
Paul Mackerras 12a3d76217 Implement hrfid and make MSR[HV] always 1
Implementations without hypervisor/LPAR support are permitted by the
architecture, but should have MSR[HV] forced to be 1 at all times, not
0, and should implement various instructions and registers that are
only accessible in hypervisor mode.

This commit implements MSR[HV] as a constant 1 bit and adds the hrfid
instruction, which behaves exactly the same as rfid except that it
reads HSRR0/1 instead of SRR0/1.  We already have HSRR0/1 and HSPRG0/1
implemented.

When HV=1, Linux expects external interrupts to arrive as hypervisor
interrupts, so this adds support for hypervisor interrupts (i.e.,
those that set HSRR0/1) and makes the external interrupt be a
hypervisor interrupt.  (If we had an LPCR register, the LPES bit would
control this, but we don't.)  The xics test is updated to read HSRR0/1
after an external interrupt.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
1 month ago
Paul Mackerras 7c5a2bcaf4 tests: Add a test for prefixed instructions
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2 years ago