All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Paul Durrant <paul.durrant@citrix.com>
Subject: [PATCH v2 0/4] x86/HVM: implement memory read caching
Date: Tue, 11 Sep 2018 07:10:10 -0600	[thread overview]
Message-ID: <5B97BEB202000078001E73FB@prv1-mh.provo.novell.com> (raw)

Emulation requiring device model assistance uses a form of instruction
re-execution, assuming that the second (and any further) pass takes
exactly the same path. This is a valid assumption as far as use of CPU
registers goes (as those can't change without any other instruction
executing in between), but is wrong for memory accesses. In particular
it has been observed that Windows might page out buffers underneath
an instruction currently under emulation (hitting between two passes).
If the first pass translated a linear address successfully, any subsequent
pass needs to do so too, yielding the exact same translation.

Introduce a cache (used just by guest page table accesses for now, i.e.
a form of "paging structure cache") to make sure above described
assumption holds. This is a very simplistic implementation for now: Only
exact matches are satisfied (no overlaps or partial reads or anything).

There's also some seemingly unrelated cleanup here which was found
desirable on the way.

1: x86/mm: add optional cache to GLA->GFN translation
2: x86/mm: use optional cache in guest_walk_tables()
3: x86/HVM: implement memory read caching
4: x86/HVM: prefill cache with PDPTEs when possible

"VMX: correct PDPTE load checks" is omitted from v2, as I can't
currently find enough time to carry out the requested further
rework.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2018-09-11 13:10 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 13:10 Jan Beulich [this message]
2018-09-11 13:13 ` [PATCH v2 1/4] x86/mm: add optional cache to GLA->GFN translation Jan Beulich
2018-09-11 13:40   ` Razvan Cojocaru
2018-09-19 15:09   ` Wei Liu
2018-09-11 13:14 ` [PATCH v2 2/4] x86/mm: use optional cache in guest_walk_tables() Jan Beulich
2018-09-11 16:17   ` Paul Durrant
2018-09-12  8:30     ` Jan Beulich
2018-09-19 15:50   ` Wei Liu
2018-09-11 13:15 ` [PATCH v2 3/4] x86/HVM: implement memory read caching Jan Beulich
2018-09-11 16:20   ` Paul Durrant
2018-09-12  8:38     ` Jan Beulich
2018-09-12  8:49       ` Paul Durrant
2018-09-19 15:57   ` Wei Liu
2018-09-20  6:39     ` Jan Beulich
2018-09-20 15:42       ` Wei Liu
2018-09-11 13:16 ` [PATCH v2 4/4] x86/HVM: prefill cache with PDPTEs when possible Jan Beulich
2018-09-13  6:30   ` Tian, Kevin
2018-09-13  8:55     ` Jan Beulich
2018-09-14  2:18       ` Tian, Kevin
2018-09-14  8:12         ` Jan Beulich
2018-09-25 14:14 ` [PATCH v3 0/4] x86/HVM: implement memory read caching Jan Beulich
2018-09-25 14:23   ` [PATCH v3 1/4] x86/mm: add optional cache to GLA->GFN translation Jan Beulich
2018-09-25 14:24   ` [PATCH v3 2/4] x86/mm: use optional cache in guest_walk_tables() Jan Beulich
2018-09-25 14:25   ` [PATCH v3 3/4] x86/HVM: implement memory read caching Jan Beulich
2018-09-26 11:05     ` Wei Liu
2018-10-02 10:39     ` Ping: " Jan Beulich
2018-10-02 13:53       ` Boris Ostrovsky
2018-10-09  5:19       ` Tian, Kevin
2018-09-25 14:26   ` [PATCH v3 4/4] x86/HVM: prefill cache with PDPTEs when possible Jan Beulich
2018-09-25 14:38     ` Paul Durrant
2018-10-02 10:36   ` Ping: [PATCH v3 0/4] x86/HVM: implement memory read caching Jan Beulich
2018-10-02 10:51     ` Andrew Cooper
2018-10-02 12:47       ` Jan Beulich
2018-10-11 15:54         ` George Dunlap
2018-10-11 16:15           ` Jan Beulich
2018-10-11 16:33             ` George Dunlap
2018-10-12  6:32               ` Jan Beulich
2018-10-11  6:51       ` Jan Beulich
2018-10-11 17:36       ` George Dunlap
2018-10-12 13:55 ` [PATCH v2 " Andrew Cooper
2018-10-12 14:19   ` Jan Beulich
2018-10-18 15:20     ` George Dunlap
2019-05-07 16:22       ` George Dunlap
2019-05-07 16:22         ` [Xen-devel] " George Dunlap
2019-05-07 16:26         ` Jan Beulich
2019-05-07 16:26           ` [Xen-devel] " Jan Beulich
2018-11-09 10:17   ` Jan Beulich
2019-02-14 15:14   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B97BEB202000078001E73FB@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=paul.durrant@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.