From e8363ea689b70d1376c5a91d3ff43948beb4730c Mon Sep 17 00:00:00 2001 From: IkiWiki Date: Thu, 13 Jun 2019 03:46:04 +0100 Subject: [PATCH] dummy commit --- isa_conflict_resolution/isamux_isans.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/isa_conflict_resolution/isamux_isans.mdwn b/isa_conflict_resolution/isamux_isans.mdwn index 806bb1376..26b588a04 100644 --- a/isa_conflict_resolution/isamux_isans.mdwn +++ b/isa_conflict_resolution/isamux_isans.mdwn @@ -158,3 +158,25 @@ The correct thing to do is, again, just like with foreign archs, to treat RVCs a All zeros is clearly reserved for the present RVC. 0b001 for RVCv2. 0b010 for RV16 (look it up) and there should definitely be room reserved here for custom reencodings of the 16 bit opcode space. +# Why WARL will not work and why WLRL is required + +WARL requires a follow-up read of the CSR to ascertain what heuristic the hardware *might* have applied, and if that procedure is followed in this proposal, performance even on hardware would be severely compromised. + +In addition when switching to foreign architectures, the switch has to be done atomically and guaranteed to occur. + +In the case of JIT emulation, the WARL "detection" code will be in an assembly language that is alien to hardware. + +Support for both assembly languages immediately after the CSR write is clearly impossible, this leaves no other option but to have the CSR be WLRL (on all platforms) and for traps to be mandatory (on the UNIX Platform). + +# Is it strictly necessary for foreign archs to switch back? + +It is not strictly necessary for foreign archs to have an equivalent of the CSR ISAMUX/NS write, although it is optional for them to do so. + +The reason is that this is a RISCV proposal, not a MIPS or x86 proposal. + +The test case is hypervisor mode. Running the hypervisor core in x86 or MIPS assembly on a RISCV system makes no sense. The RISCV hypervisor may take care transparently of running foreign arch OSes - unmodified - even just as Qemu KVM Mode does if the implementation fully supported x86 assembler. That code has no need to know it is a guest under a hypervisor. + + + + + -- 2.30.2