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

Function swctx_regptr

freebsd/amd64/vmm/amd/svm.c:2150–2194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2148}
2149
2150static register_t *
2151swctx_regptr(struct svm_regctx *regctx, int reg)
2152{
2153
2154 switch (reg) {
2155 case VM_REG_GUEST_RBX:
2156 return (&regctx->sctx_rbx);
2157 case VM_REG_GUEST_RCX:
2158 return (&regctx->sctx_rcx);
2159 case VM_REG_GUEST_RDX:
2160 return (&regctx->sctx_rdx);
2161 case VM_REG_GUEST_RDI:
2162 return (&regctx->sctx_rdi);
2163 case VM_REG_GUEST_RSI:
2164 return (&regctx->sctx_rsi);
2165 case VM_REG_GUEST_RBP:
2166 return (&regctx->sctx_rbp);
2167 case VM_REG_GUEST_R8:
2168 return (&regctx->sctx_r8);
2169 case VM_REG_GUEST_R9:
2170 return (&regctx->sctx_r9);
2171 case VM_REG_GUEST_R10:
2172 return (&regctx->sctx_r10);
2173 case VM_REG_GUEST_R11:
2174 return (&regctx->sctx_r11);
2175 case VM_REG_GUEST_R12:
2176 return (&regctx->sctx_r12);
2177 case VM_REG_GUEST_R13:
2178 return (&regctx->sctx_r13);
2179 case VM_REG_GUEST_R14:
2180 return (&regctx->sctx_r14);
2181 case VM_REG_GUEST_R15:
2182 return (&regctx->sctx_r15);
2183 case VM_REG_GUEST_DR0:
2184 return (&regctx->sctx_dr0);
2185 case VM_REG_GUEST_DR1:
2186 return (&regctx->sctx_dr1);
2187 case VM_REG_GUEST_DR2:
2188 return (&regctx->sctx_dr2);
2189 case VM_REG_GUEST_DR3:
2190 return (&regctx->sctx_dr3);
2191 default:
2192 return (NULL);
2193 }
2194}
2195
2196static int
2197svm_getreg(void *arg, int vcpu, int ident, uint64_t *val)

Callers 2

svm_getregFunction · 0.85
svm_setregFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected