From bd587a38e04f0759cc401e5fefa8a2106f5613e1 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Mon, 19 Aug 2024 15:39:02 +1000 Subject: [PATCH] fixes Signed-off-by: Ivan Velickovic --- include/libvmm/arch/aarch64/vgic/vdist.h | 4 ++-- src/arch/aarch64/vgic/vgic.c | 4 ++-- src/arch/aarch64/vgic/vgic_v3.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libvmm/arch/aarch64/vgic/vdist.h b/include/libvmm/arch/aarch64/vgic/vdist.h index e2d07d4d..438fe596 100644 --- a/include/libvmm/arch/aarch64/vgic/vdist.h +++ b/include/libvmm/arch/aarch64/vgic/vdist.h @@ -247,7 +247,7 @@ static void vgic_dist_clr_pending_irq(struct gic_dist_map *dist, size_t vcpu_id, // @ivanv } -static bool vgic_dist_reg_read(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) +static bool vgic_handle_fault_dist_read(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) { struct gic_dist_map *gic_dist = vgic_get_dist(vgic->registers); uint32_t reg = 0; @@ -414,7 +414,7 @@ static inline void emulate_reg_write_access(seL4_UserContext *regs, uint64_t add *reg = fault_emulate(regs, *reg, addr, fsr, fault_get_data(regs, fsr)); } -static bool vgic_dist_reg_write(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) +static bool vgic_handle_fault_dist_read(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) { bool success = true; struct gic_dist_map *gic_dist = vgic_get_dist(vgic->registers); diff --git a/src/arch/aarch64/vgic/vgic.c b/src/arch/aarch64/vgic/vgic.c index 4e51710f..debca543 100644 --- a/src/arch/aarch64/vgic/vgic.c +++ b/src/arch/aarch64/vgic/vgic.c @@ -74,10 +74,10 @@ bool vgic_handle_fault_dist(size_t vcpu_id, size_t offset, size_t fsr, seL4_User { bool success = false; if (fault_is_read(fsr)) { - success = vgic_dist_reg_read(vcpu_id, &vgic, offset, fsr, regs); + success = vgic_handle_fault_dist_read(vcpu_id, &vgic, offset, fsr, regs); assert(success); } else { - success = vgic_dist_reg_write(vcpu_id, &vgic, offset, fsr, regs); + success = vgic_handle_fault_dist_write(vcpu_id, &vgic, offset, fsr, regs); assert(success); } diff --git a/src/arch/aarch64/vgic/vgic_v3.c b/src/arch/aarch64/vgic/vgic_v3.c index 9beed8a4..f92f78fb 100644 --- a/src/arch/aarch64/vgic/vgic_v3.c +++ b/src/arch/aarch64/vgic/vgic_v3.c @@ -45,7 +45,7 @@ vgic_t vgic; -static bool handle_vgic_redist_read_fault(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) +static bool vgic_handle_fault_redist_read(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) { struct gic_dist_map *gic_dist = vgic_get_dist(vgic->registers); struct gic_redist_map *gic_redist = vgic_get_redist(vgic->registers); @@ -97,7 +97,7 @@ static bool handle_vgic_redist_read_fault(size_t vcpu_id, vgic_t *vgic, uint64_t } -static bool handle_vgic_redist_write_fault(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) +static bool vgic_handle_fault_redist_write(size_t vcpu_id, vgic_t *vgic, uint64_t offset, uint64_t fsr, seL4_UserContext *regs) { // @ivanv: why is this not reading from the redist? uintptr_t fault_addr = GIC_REDIST_PADDR + offset; @@ -147,7 +147,7 @@ static bool handle_vgic_redist_write_fault(size_t vcpu_id, vgic_t *vgic, uint64_ return true; } -bool handle_vgic_redist_fault(size_t vcpu_id, size_t offset, size_t fsr, seL4_UserContext *regs, void *data) { +bool vgic_handle_fault_redist(size_t vcpu_id, size_t offset, size_t fsr, seL4_UserContext *regs, void *data) { if (fault_is_read(fsr)) { return handle_vgic_redist_read_fault(vcpu_id, &vgic, offset, fsr, regs); } else {