MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lapic_mmio_read

Function lapic_mmio_read

freebsd/amd64/vmm/vmm_lapic.c:221–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221int
222lapic_mmio_read(void *vm, int cpu, uint64_t gpa, uint64_t *rval, int size,
223 void *arg)
224{
225 int error;
226 uint64_t off;
227 struct vlapic *vlapic;
228
229 off = gpa - DEFAULT_APIC_BASE;
230
231 /*
232 * Memory mapped local apic accesses should be aligned on a
233 * 16-byte boundary. They are also suggested to be 4 bytes
234 * wide, alas not all OSes follow suggestions.
235 */
236 off &= ~3;
237 if (off & 0xf)
238 return (EINVAL);
239
240 vlapic = vm_lapic(vm, cpu);
241 error = vlapic_read(vlapic, 1, off, rval, arg);
242 return (error);
243}

Callers

nothing calls this directly

Calls 2

vm_lapicFunction · 0.85
vlapic_readFunction · 0.85

Tested by

no test coverage detected