diff options
author | Bin Lu <bin.lu@arm.com> | 2020-01-29 04:45:59 -0500 |
---|---|---|
committer | Bin Lu <bin.lu@arm.com> | 2020-01-29 04:46:05 -0500 |
commit | 89957c6c87b5ad5c7bac68f93d9472388db57702 (patch) | |
tree | 130deb12d27ca328cb66ffb1364e83dcc19faeaf /pkg/sentry/platform/ring0 | |
parent | 4cb55a7a3b09c430fa2b7197fdc7b84b7e88a6ed (diff) |
Lazy-fpsimd support patch series#2: add fpsimd@Arm64 support to kvm module
Add fpsimd support to KVM module so that the test case "TestKernelFloatingPoint"
can be passed on Arm64 platform.
Signed-off-by: Bin Lu <bin.lu@arm.com>
Diffstat (limited to 'pkg/sentry/platform/ring0')
-rw-r--r-- | pkg/sentry/platform/ring0/defs_arm64.go | 6 | ||||
-rw-r--r-- | pkg/sentry/platform/ring0/lib_arm64.go | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/pkg/sentry/platform/ring0/defs_arm64.go b/pkg/sentry/platform/ring0/defs_arm64.go index 1583dda12..0e2ab716c 100644 --- a/pkg/sentry/platform/ring0/defs_arm64.go +++ b/pkg/sentry/platform/ring0/defs_arm64.go @@ -124,6 +124,12 @@ func (c *CPU) SetAppAddr(value uintptr) { c.appAddr = value } +// GetLazyVFP returns the value of cpacr_el1. +//go:nosplit +func (c *CPU) GetLazyVFP() (value uintptr) { + return c.lazyVFP +} + // SwitchArchOpts are embedded in SwitchOpts. type SwitchArchOpts struct { // UserASID indicates that the application ASID to be used on switch, diff --git a/pkg/sentry/platform/ring0/lib_arm64.go b/pkg/sentry/platform/ring0/lib_arm64.go index af075aae4..80922f43d 100644 --- a/pkg/sentry/platform/ring0/lib_arm64.go +++ b/pkg/sentry/platform/ring0/lib_arm64.go @@ -20,13 +20,13 @@ package ring0 func CPACREL1() (value uintptr) // FPCR returns the value of FPCR register. -func FPCR() (value uintptr) +func GetFPCR() (value uintptr) // SetFPCR writes the FPCR value. func SetFPCR(value uintptr) // FPSR returns the value of FPSR register. -func FPSR() (value uintptr) +func GetFPSR() (value uintptr) // SetFPSR writes the FPSR value. func SetFPSR(value uintptr) |