mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
Revert "ANDROID: KVM: arm64: Create empty S2MPU driver"
This reverts commit d907ef4ba5.
Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ia5ff3af0762f01243ab6b39317d993c24933d6b8
This commit is contained in:
@@ -273,15 +273,8 @@ extern u64 kvm_nvhe_sym(hyp_cpu_logical_map)[NR_CPUS];
|
||||
|
||||
enum kvm_iommu_driver {
|
||||
KVM_IOMMU_DRIVER_NONE,
|
||||
KVM_IOMMU_DRIVER_S2MPU,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_KVM_S2MPU
|
||||
int kvm_s2mpu_init(void);
|
||||
#else
|
||||
static inline int kvm_s2mpu_init(void) { return -ENODEV; }
|
||||
#endif
|
||||
|
||||
struct vcpu_reset_state {
|
||||
unsigned long pc;
|
||||
unsigned long r0;
|
||||
|
||||
@@ -135,6 +135,5 @@ struct kvm_iommu_ops {
|
||||
};
|
||||
|
||||
extern struct kvm_iommu_ops kvm_iommu_ops;
|
||||
extern const struct kvm_iommu_ops kvm_s2mpu_ops;
|
||||
|
||||
#endif /* __ARM64_KVM_HYP_H__ */
|
||||
|
||||
@@ -54,13 +54,4 @@ config NVHE_EL2_DEBUG
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config KVM_S2MPU
|
||||
bool "Stage-2 Memory Protection Unit support"
|
||||
depends on KVM
|
||||
help
|
||||
Support for the Stage-2 Memory Protection Unit (S2MPU) and Stream
|
||||
Security Mapping Table (SSMT) devices in KVM. This allows the
|
||||
hypervisor to restrict DMA access to its memory and the memory of
|
||||
protected guests.
|
||||
|
||||
endif # VIRTUALIZATION
|
||||
|
||||
@@ -8,7 +8,7 @@ ccflags-y += -I $(srctree)/$(src)
|
||||
KVM=../../../virt/kvm
|
||||
|
||||
obj-$(CONFIG_KVM) += kvm.o
|
||||
obj-$(CONFIG_KVM) += hyp/ iommu/
|
||||
obj-$(CONFIG_KVM) += hyp/
|
||||
|
||||
kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
|
||||
$(KVM)/vfio.o $(KVM)/irqchip.o $(KVM)/binary_stats.o \
|
||||
|
||||
@@ -1770,13 +1770,7 @@ static bool init_psci_relay(void)
|
||||
|
||||
static int init_stage2_iommu(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = kvm_s2mpu_init();
|
||||
if (!ret)
|
||||
return KVM_IOMMU_DRIVER_S2MPU;
|
||||
|
||||
return (ret == -ENODEV) ? KVM_IOMMU_DRIVER_NONE : ret;
|
||||
return KVM_IOMMU_DRIVER_NONE;
|
||||
}
|
||||
|
||||
static int init_subsystems(void)
|
||||
|
||||
@@ -24,8 +24,6 @@ obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
|
||||
../fpsimd.o ../hyp-entry.o ../exception.o ../pgtable.o
|
||||
obj-y += $(lib-objs)
|
||||
|
||||
obj-$(CONFIG_KVM_S2MPU) += iommu/s2mpu.o
|
||||
|
||||
##
|
||||
## Build rules for compiling nVHE hyp code
|
||||
## Output of this folder is `kvm_nvhe.o`, a partially linked object
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2021 - Google LLC
|
||||
* Author: David Brazdil <dbrazdil@google.com>
|
||||
*/
|
||||
|
||||
#include <linux/kvm_host.h>
|
||||
|
||||
#include <asm/kvm_hyp.h>
|
||||
|
||||
const struct kvm_iommu_ops kvm_s2mpu_ops = (struct kvm_iommu_ops){};
|
||||
@@ -238,12 +238,6 @@ int select_iommu_ops(enum kvm_iommu_driver driver)
|
||||
switch (driver) {
|
||||
case KVM_IOMMU_DRIVER_NONE:
|
||||
return 0;
|
||||
case KVM_IOMMU_DRIVER_S2MPU:
|
||||
if (IS_ENABLED(CONFIG_KVM_S2MPU)) {
|
||||
kvm_iommu_ops = kvm_s2mpu_ops;
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Makefile for Kernel-based Virtual Machine module
|
||||
#
|
||||
|
||||
obj-$(CONFIG_KVM_S2MPU) += s2mpu.o
|
||||
@@ -1,13 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2021 - Google LLC
|
||||
* Author: David Brazdil <dbrazdil@google.com>
|
||||
*/
|
||||
|
||||
#include <linux/kvm_host.h>
|
||||
|
||||
int kvm_s2mpu_init(void)
|
||||
{
|
||||
kvm_info("S2MPU driver initialized\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user