Changeset 9120 in vbox for trunk/src/VBox
- Timestamp:
- May 26, 2008 11:39:36 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r9116 r9120 1933 1933 bool fFlushPending = pVM->hwaccm.s.svm.fAlwaysFlushTLB | pVM->hwaccm.s.svm.fForceTLBFlush; 1934 1934 1935 Assert(pVM->hwaccm.s.fNestedPaging); 1936 1935 1937 /* Skip it if a TLB flush is already pending. */ 1936 1938 if (!fFlushPending) … … 1950 1952 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_EM_INTERNAL_ERROR); 1951 1953 1952 STAM_COUNTER_INC(&pVM->hwaccm.s.StatFlushPhysPageManual); 1953 1954 return SVMR0InterpretInvpg(pVM, CPUMCTX2CORE(pCtx), pVMCB->ctrl.TLBCtrl.n.u32ASID); 1954 /* 1955 * Only allow 32-bit code. 1956 */ 1957 if (SELMIsSelector32Bit(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid)) 1958 { 1959 RTGCPTR pbCode; 1960 int rc = SELMValidateAndConvertCSAddr(pVM, pCtx->eflags, pCtx->ss, pCtx->cs, &pCtx->csHid, (RTGCPTR)pCtx->eip, &pbCode); 1961 if (VBOX_SUCCESS(rc)) 1962 { 1963 uint32_t cbOp; 1964 DISCPUSTATE Cpu; 1965 OP_PARAMVAL param1; 1966 RTGCPTR addr; 1967 1968 Cpu.mode = CPUMODE_32BIT; 1969 rc = EMInterpretDisasOneEx(pVM, pbCode, CPUMCTX2CORE(pCtx), &Cpu, &cbOp); 1970 AssertRCReturn(rc, rc); 1971 Assert(cbOp == Cpu.opsize); 1972 1973 int rc = DISQueryParamVal(CPUMCTX2CORE(pCtx), &Cpu, &Cpu.param1, ¶m1, PARAM_SOURCE); 1974 AssertRCReturn(rc, VERR_EM_INTERPRETER); 1975 1976 switch(param1.type) 1977 { 1978 case PARMTYPE_IMMEDIATE: 1979 case PARMTYPE_ADDRESS: 1980 AssertReturn((param1.flags & PARAM_VAL32), VERR_EM_INTERPRETER); 1981 1982 addr = (RTGCPTR)param1.val.val32; 1983 break; 1984 1985 default: 1986 AssertFailed(); 1987 return VERR_EM_INTERPRETER; 1988 } 1989 1990 /* Manually invalidate the page for the VM's TLB. */ 1991 Log(("SVMR0InvalidatePhysPage %VGv ASID=%d\n", addr, pVMCB->ctrl.TLBCtrl.n.u32ASID)); 1992 SVMInvlpgA(addr, pVMCB->ctrl.TLBCtrl.n.u32ASID); 1993 STAM_COUNTER_INC(&pVM->hwaccm.s.StatFlushPhysPageManual); 1994 1995 return VINF_SUCCESS; 1996 } 1997 } 1998 AssertFailed(); 1999 return VERR_EM_INTERPRETER; 1955 2000 } 1956 2001 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.