Commit Graph

14 Commits

Author SHA1 Message Date
Bin Lu 05d742ede4 Running hello-world on Thunderx2 with kvm
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-08-12 05:37:27 -04:00
Bin Lu cd1149eef3 supporting sError injection step 2 on Arm64
I disabled DAIF(DEBUG, sError, IRQ, FIQ) in guest kernel mode,
and enabled them in guest user mode.
So, I can make sure all DAIF-s come from guest user mode,
and then the case 'TestBounceStress' can passed on Arm64.

Test steps:
 1, cd pkg/sentry/platform/kvm
 2, bazel test kvm_test --strip=never --test_output=streamed

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-07-30 03:24:35 -04: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
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
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
gVisor bot 10725475c3 Merge pull request #1707 from lubinszARM:pr_lazy_fpsimd_2
PiperOrigin-RevId: 308347744
2020-04-24 16:23:16 -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
Adin Scannell 4e6a1a5adb Automated rollback of changelist 303799678
PiperOrigin-RevId: 304221302
2020-04-01 11:06:26 -07:00
Adin Scannell 3fac85da95 kvm: handle exit reasons even under EINTR.
In the case of other signals (preemption), inject a normal bounce and
defer the signal until the vCPU has been returned from guest mode.

PiperOrigin-RevId: 303799678
2020-03-30 12:37:57 -07:00
Bin Lu de68e1d8c4 Code Clean:Move getUserRegisters into dieArchSetup() and other small changes.
Consistent with QEMU, getUserRegisters() should be an arch-specific
function. So, it should be called in dieArchSetup().

With this patch and the pagetable/pcid patch, the kvm modules on Arm64 can be
built successfully.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-02-20 06:43:27 +00:00
Bin Lu 89957c6c87 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>
2020-01-29 04:46:05 -05:00
Adin Scannell 0e2f1b7abd Update package locations.
Because the abi will depend on the core types for marshalling (usermem,
context, safemem, safecopy), these need to be flattened from the sentry
directory. These packages contain no sentry-specific details.

PiperOrigin-RevId: 291811289
2020-01-27 15:31:32 -08:00
lubinszARM 6b42453039 enable kvm to support arm64
There are 4 jobs were finished in this package:
  	1, Virtual machine initialization.
	2, Bluepill implementation.
	3, Move ring0.Vectors() into the address with 11-bits alignment.
	4, Basic support for "SwitchToUser".
Signed-off-by: Bin Lu <bin.lu@arm.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/919 from lubinszARM:pr_kvm eedea52db451bf62722759009a9f14c54a69c55f
PiperOrigin-RevId: 285501256
2019-12-13 17:11:23 -08:00