Merge pull request #4072 from adamliyi:droppt_fix

PiperOrigin-RevId: 336719900
This commit is contained in:
gVisor bot
2020-10-12 12:34:43 -07:00
3 changed files with 13 additions and 26 deletions
+13
View File
@@ -468,6 +468,19 @@ func (m *machine) newDirtySet() *dirtySet {
}
}
// dropPageTables drops cached page table entries.
func (m *machine) dropPageTables(pt *pagetables.PageTables) {
m.mu.Lock()
defer m.mu.Unlock()
// Clear from all PCIDs.
for _, c := range m.vCPUsByID {
if c != nil && c.PCIDs != nil {
c.PCIDs.Drop(pt)
}
}
}
// lock marks the vCPU as in user mode.
//
// This should only be called directly when known to be safe, i.e. when
-13
View File
@@ -87,19 +87,6 @@ const (
poolPCIDs = 8
)
// dropPageTables drops cached page table entries.
func (m *machine) dropPageTables(pt *pagetables.PageTables) {
m.mu.Lock()
defer m.mu.Unlock()
// Clear from all PCIDs.
for _, c := range m.vCPUsByID {
if c != nil && c.PCIDs != nil {
c.PCIDs.Drop(pt)
}
}
}
// initArchState initializes architecture-specific state.
func (c *vCPU) initArchState() error {
var (
-13
View File
@@ -113,19 +113,6 @@ func availableRegionsForSetMem() (phyRegions []physicalRegion) {
return phyRegions
}
// dropPageTables drops cached page table entries.
func (m *machine) dropPageTables(pt *pagetables.PageTables) {
m.mu.Lock()
defer m.mu.Unlock()
// Clear from all PCIDs.
for _, c := range m.vCPUsByID {
if c.PCIDs != nil {
c.PCIDs.Drop(pt)
}
}
}
// nonCanonical generates a canonical address return.
//
//go:nosplit