| 241 | } |
| 242 | |
| 243 | static int |
| 244 | svm_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 | |
| 277 | static void |
| 278 | svm_modresume(void) |
nothing calls this directly
no test coverage detected