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

Function svm_modinit

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

Source from the content-addressed store, hash-verified

241}
242
243static int
244svm_modinit(int ipinum)
245{
246 int error, cpu;
247
248 if (!svm_available())
249 return (ENXIO);
250
251 error = check_svm_features();
252 if (error)
253 return (error);
254
255 vmcb_clean &= VMCB_CACHE_DEFAULT;
256
257 for (cpu = 0; cpu < MAXCPU; cpu++) {
258 /*
259 * Initialize the host ASIDs to their "highest" valid values.
260 *
261 * The next ASID allocation will rollover both 'gen' and 'num'
262 * and start off the sequence at {1,1}.
263 */
264 asid[cpu].gen = ~0UL;
265 asid[cpu].num = nasid - 1;
266 }
267
268 svm_msr_init();
269 svm_npt_init(ipinum);
270
271 /* Enable SVM on all CPUs */
272 smp_rendezvous(NULL, svm_enable, NULL, NULL);
273
274 return (0);
275}
276
277static void
278svm_modresume(void)

Callers

nothing calls this directly

Calls 5

svm_availableFunction · 0.85
check_svm_featuresFunction · 0.85
svm_msr_initFunction · 0.85
svm_npt_initFunction · 0.85
smp_rendezvousFunction · 0.85

Tested by

no test coverage detected