summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm/machine.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-10-12 19:37:52 +0000
committergVisor bot <gvisor-bot@google.com>2020-10-12 19:37:52 +0000
commit1b455257f0fb4494bfd10802d8011a073a0672e4 (patch)
treeac81b980be36f8ead72c0aa2b85dd17b3f38dd99 /pkg/sentry/platform/kvm/machine.go
parent4ba161010c514ab98d004af338fd6238894568db (diff)
parent93bc0777be45994c4fcd7611a743f99fe73b36fa (diff)
Merge release-20200928.0-93-g93bc0777b (automated)
Diffstat (limited to 'pkg/sentry/platform/kvm/machine.go')
-rw-r--r--pkg/sentry/platform/kvm/machine.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/machine.go b/pkg/sentry/platform/kvm/machine.go
index 75da253c5..455e2bd20 100644
--- a/pkg/sentry/platform/kvm/machine.go
+++ b/pkg/sentry/platform/kvm/machine.go
@@ -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