History log of /freebsd/sys/arm64/vmm/vmm_hyp.c (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 5577bb2f 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

arm64/vmm: Support tlbi from VHE

When invalidating the stage 2 TLB we need to ensure page tables updates
have completed and for tlbi vmalle1is the HCR_EL2 TGE flag needs to be
clear.

To fix the for

arm64/vmm: Support tlbi from VHE

When invalidating the stage 2 TLB we need to ensure page tables updates
have completed and for tlbi vmalle1is the HCR_EL2 TGE flag needs to be
clear.

To fix the former add a data barrier before the tlbi instructions. On
non-VHE this will happen as part of the exception entry, so is only
needed for VHE.

The tlbi vmalle1is instruction operates on the EL2 & 0 regime when
HCR_EL2 E2H and TGE flags are both set. By clearing the TGE flag it
will stop this and operate on the EL1 & 0 regime we are expecting.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46080

show more ...


# 20eabb33 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

arm64/vmm: Only store the guest par_el1

There is no need to store the host par_el1. We don't depend on it not
changing across calls into a guest.

Sponsored by: Arm Ltd
Differential Revision: https:

arm64/vmm: Only store the guest par_el1

There is no need to store the host par_el1. We don't depend on it not
changing across calls into a guest.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46079

show more ...


# 7861ecd1 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

arm64/vmm: Teach the switcher about new registers

To support booting the kernel in EL2 some of the EL0 and EL1 registers
are changed to point to an EL2 version. To get access to the EL0/EL1
version

arm64/vmm: Teach the switcher about new registers

To support booting the kernel in EL2 some of the EL0 and EL1 registers
are changed to point to an EL2 version. To get access to the EL0/EL1
version of these registers we need to use the new EL02 and EL12
registers, e.g. to access elr_el1 from the host we would use elr_el12.

Add macros that can be different on VHE vs non-VHE code so these
registers can be accessed in the correct way.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46078

show more ...


# 6b17f49d 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

arm64/vmm: Restore hcr_el2 earlier

It may cause fields in other registers to change meaning.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46077


# 4b6c9f84 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

arm64/vmm: Move nVHE-only code to the new file

There are some functions that are only needed in non-VHE mode. These
are used to handle hypervisor calls from the kernel, and to manage the
page tables

arm64/vmm: Move nVHE-only code to the new file

There are some functions that are only needed in non-VHE mode. These
are used to handle hypervisor calls from the kernel, and to manage the
page tables in EL2. As these won't be used by the VHE code we can move
them to the non-VHE specific files.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46073

show more ...


# 3d61bcf1 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

arm64/vmm: Start to extract code not needed by VHE

We can share some of the vmm code between VHE and non-VHE modes. To
support this create new files that include the common code and create
macros to

arm64/vmm: Start to extract code not needed by VHE

We can share some of the vmm code between VHE and non-VHE modes. To
support this create new files that include the common code and create
macros to name what will be the common functions.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46072

show more ...


Revision tags: release/14.1.0, release/13.3.0
# 47e07394 09-Jan-2024 Andrew Turner <andrew@FreeBSD.org>

Import the kernel parts of bhyve/arm64

To support virtual machines on arm64 add the vmm code. This is based on
earlier work by Mihai Carabas and Alexandru Elisei at University
Politehnica of Buchare

Import the kernel parts of bhyve/arm64

To support virtual machines on arm64 add the vmm code. This is based on
earlier work by Mihai Carabas and Alexandru Elisei at University
Politehnica of Bucharest, with further work by myself and Mark Johnston.

All AArch64 CPUs should work, however only the GICv3 interrupt
controller is supported. There is initial support to allow the GICv2
to be supported in the future. Only pure Armv8.0 virtualisation is
supported, the Virtualization Host Extensions are not currently used.

With a separate userspace patch and U-Boot port FreeBSD guests are able
to boot to multiuser mode, and the hypervisor can be tested with the
kvm unit tests. Linux partially boots, but hangs before entering
userspace. Other operating systems are untested.

Sponsored by: Arm Ltd
Sponsored by: Innovate UK
Sponsored by: The FreeBSD Foundation
Sponsored by: University Politehnica of Bucharest
Differential Revision: https://reviews.freebsd.org/D37428

show more ...