Commit Graph

184 Commits

Author SHA1 Message Date
gVisor bot b0eafc7454 Merge pull request #3201 from lubinszARM:pr_sys64_2
PiperOrigin-RevId: 323456118
2020-07-27 15:46:33 -07:00
gVisor bot 1b2006083c Merge pull request #3299 from lubinszARM:pr_asid
PiperOrigin-RevId: 323455097
2020-07-27 15:44:30 -07:00
Andrei Vagin f347a578b7 Move platform.File in memmap
The subsequent systrap changes will need to import memmap from
the platform package.

PiperOrigin-RevId: 323409486
2020-07-27 11:59:10 -07:00
Bin Lu ced5863c49 allow guest user applications read CNTVCT_EL0/CNTFRQ_EL0
At present, when doing syscall_kvm test, we need to
enable the function of ESR_ELx_SYS64_ISS_SYS_CNTVCT/ESR_ELx_SYS64_ISS_SYS_CNTFRQ to
successfully pass the test.

I set CNTKCTL_EL1.EL0VCTEN==1/CNTKCTL_EL1.EL0PCTEN==1, so that the related cases can passed.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-07-26 22:25:27 -04:00
lubinszARM 4eb3c8c7e5 kvm-tls-2:add the preservation of user-TLS in the Arm64 kvm platform
This patch load/save TLS for the container application.

Related issue: full context-switch supporting for Arm64 #1238

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/2761 from lubinszARM:pr_tls_2 cb5dbca1c9c3f378002406da7a58887f9b5032b3
PiperOrigin-RevId: 322887044
2020-07-23 16:08:16 -07:00
Bin Lu 8c9156fed6 add asid support to Arm64
Support the operation of asid, so that I can optimize tlb performance
by combining with nG.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-07-20 01:09:00 -04:00
gVisor bot c5d827d110 Merge pull request #3200 from lubinszARM:pr_kvm_ut_1
PiperOrigin-RevId: 321060717
2020-07-13 16:49:20 -07:00
Bin Lu feb867bb83 Split the kvm ut test cases to correspond to different platforms
Split the kvm ut test cases to pass unit-tests on Arm64.
    I will add the tls and full-context test cases for Arm64 later.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-07-10 03:13:13 -04:00
Bin Lu 49f38dee10 allow guest user applications read ctr_el0 on Arm64
At present, when doing syscall_kvm test, we need to
enable the function of ESR_ELx_SYS64_ISS_SYS_CTR_READ to
successfully pass the test.

I set SCTLR_EL1.UCT==1, so that the related cases can passed.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-07-03 00:08:39 -04:00
Bin Lu 4232be8480 support sError injection in kvm module on Arm64
There are 3 types of asynchronous exceptions on Arm64: sError, IRQ, FIQ.
In this case, we use the sError injection method in bluepillHandler to force the guest to quit.
So that the test case of "TestBounce" can be passed on Arm64.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-06-16 22:50:14 -04:00
gVisor bot b436b9717e Merge pull request #2711 from lubinszARM:pr_mmio
PiperOrigin-RevId: 315812219
2020-06-10 18:51:41 -07:00
Bin Lu b792cc1ca9 minor change in kvm module for Arm64
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-06-09 05:42:41 -04:00
Adin Scannell 527d08f6af Add +checkescape annotations to kvm/ring0.
This analysis also catches a potential bug, which is a split on mapPhysical.
This would have led to potential guest-exit during Mapping (although this
would have been handled by the now-unecessary retryInGuest loop).

PiperOrigin-RevId: 315025106
2020-06-05 17:25:28 -07:00
gVisor bot 288a1ca6f0 Merge pull request #2689 from lubinszARM:pr_prot_none
PiperOrigin-RevId: 314186752
2020-06-01 13:02:14 -07:00
Michael Pratt 65569cfca0 Update Go version build tags
None of the dependencies have changed in 1.15. It may be possible to simplify
some of the wrappers in rawfile following 1.13, but that can come in a later
change.

PiperOrigin-RevId: 313863264
2020-05-29 15:44:07 -07:00
Bin Lu a534b2c652 adding the VM-Exit method for Arm64
On amd64, it uses 'HLT' to leave the guest.
 Unlike amd64, arm64 can only uses mmio_exit/psci to leave the guest.

 So, I designed the HYPERCALL_VMEXIT to be compatible with amd64/arm64.

 To keep it simple, I used the address of exception table as the
 MMIO base address, so that I can trigger a MMIO-EXIT by forcibly writing this space.
 Then, in host user space, I can calculate this address to find out
 which hypercall.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-05-17 22:28:39 -04:00
Bin Lu 5fa480a877 PROT_NONE should be specially treated in the step of mapPhysical
It's a workaround to treat PROT_NONE as RDONLY temporarily.

TODO(gvisor.dev/issue/2686): PROT_NONE should be specially treated.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-05-13 04:40:28 -04:00
Bin Lu a19c8f0b92 adding the methods to get/set TLS for Arm64 kvm platform
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-05-13 04:23:35 -04:00
Rahat Mahmood 3c67754663 Enable automated marshalling for signals and the arch package.
PiperOrigin-RevId: 308472331
2020-04-25 23:56:04 -07:00
gVisor bot 10725475c3 Merge pull request #1707 from lubinszARM:pr_lazy_fpsimd_2
PiperOrigin-RevId: 308347744
2020-04-24 16:23:16 -07:00
Andrei Vagin 0c586946ea Specify a memory file in platform.New().
PiperOrigin-RevId: 307941984
2020-04-22 17:50:10 -07:00
gVisor bot ea9bb1c4ea Merge pull request #2235 from xiaobo55x:pcid
PiperOrigin-RevId: 307166482
2020-04-17 22:24:14 -07:00
gVisor bot e1959f58dc Merge pull request #2321 from lubinszARM:pr_nogo
PiperOrigin-RevId: 306300032
2020-04-13 13:41:45 -07:00
Bin Lu ab54d4f496 remove nogo exemption for machine_arm64_unsafe.go
Minimize the use of unsafe.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-04-09 03:54:58 -04:00
Haibo Xu b574c715a7 Move pagetables.limitPCID to arch-specific file.
X86 provide 12 bits for PCID while arm64 support
8/16 bits ASID.

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I0bd9236e44e6b6c4c88eb6e9adc5ac27b918bf6c
2020-04-08 09:50:03 +08:00