Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Aug 19, 2024
1 parent 5d26bf9 commit 515a4e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions include/libvmm/arch/aarch64/vgic/vdist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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_write(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);
Expand Down
4 changes: 2 additions & 2 deletions src/arch/aarch64/vgic/vgic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions src/arch/aarch64/vgic/vgic_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 515a4e5

Please sign in to comment.