On Mon, Jan 25, 2016 at 03:53:42PM +, Marc Zyngier wrote:
> VHE brings its own bag of new system registers, or rather system
> register accessors, as it define new ways to access both guest
> and host system registers. For example, from the host:
>
> - The host TCR_EL2 register is accessed
On Mon, Jan 25, 2016 at 03:53:41PM +, Marc Zyngier wrote:
> The kern_hyp_va macro is pretty meaninless with VHE, as there is
> only one mapping - the kernel one.
>
> In order to keep the code readable and efficient, use runtime
> patching to replace the 'and' instruction used to compute the
On 01/02/16 13:16, Christoffer Dall wrote:
> On Mon, Jan 25, 2016 at 03:53:40PM +, Marc Zyngier wrote:
>> With VHE, the host never issues an HVC instruction to get into the
>> KVM code, as we can simply branch there.
>>
>> Use runtime code patching to simplify things a bit.
>>
>>
On Mon, Jan 25, 2016 at 03:53:43PM +, Marc Zyngier wrote:
> With ARMv8, host and guest share the same system register file,
> making the save/restore procedure completely symetrical.
> With VHE, host and guest now have different requirements, as they
> use different sysregs.
>
> In order to
On Mon, Jan 25, 2016 at 03:53:35PM +, Marc Zyngier wrote:
> With ARMv8.1 VHE extension, it will be possible to run the kernel
> at EL2 (aka HYP mode). In order for the kernel to easily find out
> where it is running, add a new predicate that returns whether or
> not the kernel is in HYP mode.
On Mon, Jan 25, 2016 at 03:53:47PM +, Marc Zyngier wrote:
> As non-VHE and VHE have different ways to express the trapping of
> FPSIMD registers to EL2, make __fpsimd_enabled a patchable predicate
> and provide a VHE implementation.
>
> Signed-off-by: Marc Zyngier
> ---
On 01/02/16 13:20, Christoffer Dall wrote:
> On Mon, Jan 25, 2016 at 03:53:41PM +, Marc Zyngier wrote:
>> The kern_hyp_va macro is pretty meaninless with VHE, as there is
>> only one mapping - the kernel one.
>>
>> In order to keep the code readable and efficient, use runtime
>> patching to
On Mon, Jan 25, 2016 at 03:53:46PM +, Marc Zyngier wrote:
> We're now in a position where we can introduce VHE's minimal
> save/restore, which is limited to the handful of shared sysregs.
>
> Add the required alternative function calls that result in a
> "do nothing" call on VHE, and the
On 01/02/16 17:08, Ard Biesheuvel wrote:
> On 1 February 2016 at 17:20, Marc Zyngier wrote:
>> On 01/02/16 15:36, Catalin Marinas wrote:
>>> On Mon, Feb 01, 2016 at 01:34:16PM +, Marc Zyngier wrote:
On 01/02/16 13:16, Christoffer Dall wrote:
> On Mon, Jan 25,
On 01/02/16 13:47, Christoffer Dall wrote:
> On Mon, Jan 25, 2016 at 03:53:42PM +, Marc Zyngier wrote:
>> VHE brings its own bag of new system registers, or rather system
>> register accessors, as it define new ways to access both guest
>> and host system registers. For example, from the host:
On Mon, Jan 25, 2016 at 03:53:48PM +, Marc Zyngier wrote:
> Running the kernel in HYP mode requires the HCR_E2H bit to be set
> at all times, and the HCR_TGE bit to be set when running as a host
> (and cleared when running as a guest). At the same time, the vector
> must be set to the current
On Mon, Jan 25, 2016 at 03:53:34PM +, Marc Zyngier wrote:
> ARMv8.1 comes with the "Virtualization Host Extension" (VHE for
> short), which enables simpler support of Type-2 hypervisors.
>
> This extension allows the kernel to directly run at EL2, and
> significantly reduces the number of
On Mon, Jan 25, 2016 at 03:53:51PM +, Marc Zyngier wrote:
> As the kernel fully runs in HYP when VHE is enabled, we can
> directly branch to the kernel's panic() implementation, and
> not perform an exception return.
>
> Add the alternative code to deal with this.
>
> Signed-off-by: Marc
On Mon, Jan 25, 2016 at 03:53:36PM +, Marc Zyngier wrote:
> With the ARMv8.1 VHE, the kernel can run in HYP mode, and thus
> use the HYP timer instead of the normal guest timer in a mostly
> transparent way, except for the interrupt line.
>
> This patch reworks the arch timer code to allow
On Fri, Jan 29, 2016 at 10:25:52PM +0100, Eric Auger wrote:
> On 01/29/2016 08:33 PM, Alex Williamson wrote:
> >>> We know that x86 handles MSI vectors specially, so there is some
> >>> hardware that helps the situation. It's not just that x86 has a fixed
> >>> range for MSI, it's how it manages
On Mon, Jan 25, 2016 at 03:53:49PM +, Marc Zyngier wrote:
> Switch the timer code to the unified sysreg accessors.
>
> Signed-off-by: Marc Zyngier
Reviewed-by: Christoffer Dall
> ---
> arch/arm64/kvm/hyp/timer-sr.c | 10 +-
> 1
On Mon, Jan 25, 2016 at 03:53:50PM +, Marc Zyngier wrote:
> Despite the fact that a VHE enabled kernel runs at EL2, it uses
> CPACR_EL1 to trap FPSIMD access. Add the required alternative
> code to re-enable guest FPSIMD access when it has trapped to
> EL2.
>
> Signed-off-by: Marc Zyngier
On Mon, Jan 25, 2016 at 03:53:52PM +, Marc Zyngier wrote:
> We already have hyp_alternate_select() to define a function pointer
> that gets changed by a kernel feature or workaround.
>
> It would be useful to have a similar feature that resolves in a
> direct value, without requiring a
On 01/02/16 13:13, Christoffer Dall wrote:
> On Mon, Jan 25, 2016 at 03:53:39PM +, Marc Zyngier wrote:
>> On a VHE-capable system, there is no point in setting VTCR_EL2
>> at KVM init time. We can perfectly set it up when the kernel
>> boots, removing the need for a more complicated
On Mon, Jan 25, 2016 at 03:53:54PM +, Marc Zyngier wrote:
> With ARMv8.1 VHE, the architecture is able to (almost) transparently
> run the kernel at EL2, despite being written for EL1.
>
> This patch takes care of the "almost" part, mostly preventing the kernel
> from dropping from EL2 to
On Mon, Jan 25, 2016 at 03:53:55PM +, Marc Zyngier wrote:
> Having both VHE and non-VHE capable CPUs in the same system
> is likely to be a recipe for disaster.
>
> If the boot CPU has VHE, but a secondary is not, we won't be
> able to downgrade and run the kernel at EL1. Add CPU hotplug
> to
On Mon, Feb 01, 2016 at 01:42:34PM +, Marc Zyngier wrote:
> On 01/02/16 12:29, Christoffer Dall wrote:
> > On Mon, Jan 25, 2016 at 03:53:36PM +, Marc Zyngier wrote:
> >> With the ARMv8.1 VHE, the kernel can run in HYP mode, and thus
> >> use the HYP timer instead of the normal guest timer
On Mon, Feb 01, 2016 at 01:34:16PM +, Marc Zyngier wrote:
> On 01/02/16 13:16, Christoffer Dall wrote:
> > On Mon, Jan 25, 2016 at 03:53:40PM +, Marc Zyngier wrote:
> >> With VHE, the host never issues an HVC instruction to get into the
> >> KVM code, as we can simply branch there.
> >>
>
On Mon, Feb 01, 2016 at 02:21:57PM +, Marc Zyngier wrote:
> On 01/02/16 13:13, Christoffer Dall wrote:
> > On Mon, Jan 25, 2016 at 03:53:39PM +, Marc Zyngier wrote:
> >> On a VHE-capable system, there is no point in setting VTCR_EL2
> >> at KVM init time. We can perfectly set it up when
On Mon, Feb 01, 2016 at 01:38:57PM +, Marc Zyngier wrote:
> On 01/02/16 13:20, Christoffer Dall wrote:
> > On Mon, Jan 25, 2016 at 03:53:41PM +, Marc Zyngier wrote:
> >> The kern_hyp_va macro is pretty meaninless with VHE, as there is
> >> only one mapping - the kernel one.
> >>
> >> In
On Mon, Feb 01, 2016 at 02:04:39PM +, Marc Zyngier wrote:
> On 01/02/16 13:47, Christoffer Dall wrote:
> > On Mon, Jan 25, 2016 at 03:53:42PM +, Marc Zyngier wrote:
> >> VHE brings its own bag of new system registers, or rather system
> >> register accessors, as it define new ways to
On Mon, Jan 25, 2016 at 03:53:53PM +, Marc Zyngier wrote:
> The fault decoding process (including computing the IPA in the case
> of a permission fault) would be much better done in C code, as we
> have a reasonable infrastructure to deal with the VHE/non-VHE
> differences.
>
> Let's move the
On Mon, Jan 25, 2016 at 03:53:45PM +, Marc Zyngier wrote:
> Use the recently introduced unified system register accessors for
> those sysregs that behave differently depending on VHE being in
> use or not.
>
> Signed-off-by: Marc Zyngier
Reviewed-by: Christoffer Dall
On Mon, Jan 25, 2016 at 03:53:37PM +, Marc Zyngier wrote:
> Add a new ARM64_HAS_VIRT_HOST_EXTN features to indicate that the
> CPU has the ARMv8.1 VHE capability.
>
> This will be used to trigger kernel patching in KVM.
>
> Signed-off-by: Marc Zyngier
> ---
>
On Mon, Jan 25, 2016 at 03:53:38PM +, Marc Zyngier wrote:
> With the kernel running at EL2, there is no point trying to
> configure page tables for HYP, as the kernel is already mapped.
>
> Take this opportunity to refactor the whole init a bit, allowing
> the various parts of the hypervisor
On 01/02/16 15:36, Catalin Marinas wrote:
> On Mon, Feb 01, 2016 at 01:34:16PM +, Marc Zyngier wrote:
>> On 01/02/16 13:16, Christoffer Dall wrote:
>>> On Mon, Jan 25, 2016 at 03:53:40PM +, Marc Zyngier wrote:
diff --git a/arch/arm64/kvm/hyp/hyp-entry.S
On 1 February 2016 at 17:20, Marc Zyngier wrote:
> On 01/02/16 15:36, Catalin Marinas wrote:
>> On Mon, Feb 01, 2016 at 01:34:16PM +, Marc Zyngier wrote:
>>> On 01/02/16 13:16, Christoffer Dall wrote:
On Mon, Jan 25, 2016 at 03:53:40PM +, Marc Zyngier wrote:
32 matches
Mail list logo