Changeset 71004 in vbox for trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
- Timestamp:
- Feb 14, 2018 7:58:57 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r70969 r71004 179 179 | SVM_CTRL_INTERCEPT_FERR_FREEZE \ 180 180 | SVM_CTRL_INTERCEPT_VMRUN \ 181 | SVM_CTRL_INTERCEPT_VMMCALL \182 181 | SVM_CTRL_INTERCEPT_SKINIT \ 183 182 | SVM_CTRL_INTERCEPT_WBINVD \ … … 935 934 936 935 /* Set up unconditional intercepts and conditions. */ 937 pVmcb->ctrl.u64InterceptCtrl = HMSVM_MANDATORY_GUEST_CTRL_INTERCEPTS; 936 pVmcb->ctrl.u64InterceptCtrl = HMSVM_MANDATORY_GUEST_CTRL_INTERCEPTS 937 | SVM_CTRL_INTERCEPT_VMMCALL; 938 938 939 939 /* CR0, CR4 reads must be intercepted, our shadow values are not necessarily the same as the guest's. */ … … 2003 2003 pVmcbNstGst->ctrl.u16InterceptWrDRx |= 0xffff; 2004 2004 2005 /* Exclude the VINTR intercept of the outer guest as we don't need to cause VINTR #VMEXITs 2006 that belong to the nested-guest to the outer guest. */ 2005 /* 2006 * Adjust intercepts while executing the nested-guest that differ from the 2007 * outer guest intercepts. 2008 * 2009 * - VINTR: Exclude the outer guest intercept as we don't need to cause VINTR #VMEXITs 2010 * that belong to the nested-guest to the outer guest. 2011 * 2012 * - VMMCALL: Exclude the outer guest intercept as when it's also not intercepted by 2013 * the nested-guest, the physical CPU raises a \#UD exception as expected. 2014 */ 2007 2015 pVmcbNstGst->ctrl.u32InterceptXcpt |= pVmcb->ctrl.u32InterceptXcpt; 2008 pVmcbNstGst->ctrl.u64InterceptCtrl |= (pVmcb->ctrl.u64InterceptCtrl & ~SVM_CTRL_INTERCEPT_VINTR) 2016 pVmcbNstGst->ctrl.u64InterceptCtrl |= (pVmcb->ctrl.u64InterceptCtrl & ( ~SVM_CTRL_INTERCEPT_VINTR 2017 | ~SVM_CTRL_INTERCEPT_VMMCALL)) 2009 2018 | HMSVM_MANDATORY_GUEST_CTRL_INTERCEPTS; 2010 2019 2011 /*2012 * Adjust control intercepts while executing the nested-guest that differ2013 * from the outer guest intercepts.2014 *2015 * VMMCALL when not intercepted raises a \#UD exception in the guest. However,2016 * other SVM instructions like VMSAVE when not intercept can cause havoc on the2017 * host as they can write to any location in physical memory, hence they always2018 * need to be intercepted (see below).2019 */2020 2020 Assert( (pVmcbNstGst->ctrl.u64InterceptCtrl & HMSVM_MANDATORY_GUEST_CTRL_INTERCEPTS) 2021 2021 == HMSVM_MANDATORY_GUEST_CTRL_INTERCEPTS); 2022 pVmcbNstGst->ctrl.u64InterceptCtrl &= ~SVM_CTRL_INTERCEPT_VMMCALL;2023 2022 2024 2023 /*
Note:
See TracChangeset
for help on using the changeset viewer.