Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1324239
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2 |
| Date | 2016-02-02 17:20 +0100 |
| Message-ID | <qXLQm-5Be-15@gated-at.bofh.it> (permalink) |
| References | <qURIC-68y-3@gated-at.bofh.it> <qURIG-68y-85@gated-at.bofh.it> <qXnbk-3DE-7@gated-at.bofh.it> <qXFKW-BP-5@gated-at.bofh.it> <qXLnl-55B-25@gated-at.bofh.it> |
| Organization | ARM Ltd |
On 02/02/16 15:46, Christoffer Dall wrote: > On Tue, Feb 02, 2016 at 09:46:05AM +0000, Marc Zyngier wrote: >> On 01/02/16 13:54, Christoffer Dall wrote: >>> On Mon, Jan 25, 2016 at 03:53:44PM +0000, Marc Zyngier wrote: >>>> A handful of system registers are still shared between EL1 and EL2, >>>> even while using VHE. These are tpidr*_el[01], actlr_el1, sp0, elr, >>>> and spsr. >>> >>> So by shared registers you mean registers that do both have an EL0/1 >>> version as well as an EL2 version, but where accesses aren't rewritten >>> transparently? >> >> No, I mean that these registers do *not* have a separate banked version. >> There is only a single set of registers, which have to be save/restored >> the old way. > > huh, ARMv8 clearly specifies the existence of TPIDR_EL0, TPIDR_EL1, and > TPIDR_EL2, for example. > > I cannot seem to find anywhere in the VHE spec that says that the > TPIDR_EL2 goes away. I'm confused now. Nothing goes away, but these registers do not get renamed either. For example, TPIDR_EL1 doesn't magically access TPIDR_EL2 when running at EL2+VHE, and there is no TPIDR_EL12 accessor either. So TPIDR_EL1 is effectively "shared" between host and guest, and must be save/restored (note that the host kernel still uses TIPDR_EL1 even when running with VHE, and that KVM still uses TPIDR_EL2 to cache the current vcpu). >> >>> >>> also, by sp0 do you mean sp_el0, and by elr you mean elr_el1, and by >>> spsr you mean spsr_el1 ? >> >> sp0 -> sp_el0 indeed. elr and spsr really are the guest PC and PSTATE, >> so I should really reword this commit message, it is utterly confusing. >> > I guess I don't understand the definition of a 'shared' register given > your comments here... Does this make it clearer? Thanks, M. -- Jazz is not dead. It just smells funny...
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2 Christoffer Dall <christoffer.dall@linaro.org> - 2016-02-01 15:00 +0100
Re: [PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2 Marc Zyngier <marc.zyngier@arm.com> - 2016-02-02 10:50 +0100
Re: [PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2 Christoffer Dall <christoffer.dall@linaro.org> - 2016-02-02 16:50 +0100
Re: [PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2 Marc Zyngier <marc.zyngier@arm.com> - 2016-02-02 17:20 +0100
Re: [PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2 Christoffer Dall <christoffer.dall@linaro.org> - 2016-02-02 21:10 +0100
csiph-web