All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH v4 0/7] x86/HVM: implement memory read caching
@ 2020-01-31 16:37 Jan Beulich
  2020-01-31 16:42 ` [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion from vmcb.h Jan Beulich
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Jan Beulich @ 2020-01-31 16:37 UTC (permalink / raw)
  To: xen-devel
  Cc: George Dunlap, Andrew Cooper, Paul Durrant, Wei Liu,
	Roger Pau Monné

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 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 perhaps seemingly unrelated cleanup here which was
found desirable on the way - the 3 initial patches are truly prereqs
(at least in a contextual way), while the 2 last ones are just for
things noticed along the way.

1: SVM: drop asm/hvm/emulate.h inclusion from vmcb.h
2: x86/HVM: rename a variable in __hvm_copy()
3: x86/HVM: introduce "curr" into hvmemul_rep_{mov,sto}s()
4: x86/HVM: implement memory read caching for insn emulation
5: x86/mm: use cache in guest_walk_tables()
6: x86/mm: drop p2mt parameter from map_domain_gfn()
7: x86/HVM: reduce scope of pfec in hvm_emulate_init_per_insn()

Compared to v3 this is a major re-work to avoid passing around
"cache" arguments, as is my understanding of the main feedback
aspect for v3. I've also dropped (at least for the time being)
add-on patches to seed the cache with PAE PDPTE values.

Jan

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-02-18  5:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 16:37 [Xen-devel] [PATCH v4 0/7] x86/HVM: implement memory read caching Jan Beulich
2020-01-31 16:42 ` [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion from vmcb.h Jan Beulich
2020-01-31 16:47   ` Andrew Cooper
2020-02-03  9:22   ` Alexandru Stefan ISAILA
2020-02-03 11:51   ` Durrant, Paul
2020-02-18  5:05   ` Tian, Kevin
2020-01-31 16:42 ` [Xen-devel] [PATCH v4 2/7] x86/HVM: rename a variable in __hvm_copy() Jan Beulich
2020-02-03 15:04   ` Andrew Cooper
2020-01-31 16:43 ` [Xen-devel] [PATCH v4 3/7] x86/HVM: introduce "curr" into hvmemul_rep_{mov, sto}s() Jan Beulich
2020-02-03 15:05   ` Andrew Cooper
2020-02-06 13:26   ` Durrant, Paul
2020-02-06 13:35     ` Jan Beulich
2020-01-31 16:44 ` [Xen-devel] [PATCH v4 4/7] x86/HVM: implement memory read caching for insn emulation Jan Beulich
2020-02-03 19:48   ` Andrew Cooper
2020-02-04 11:13     ` Jan Beulich
2020-02-05  8:09     ` Jan Beulich
2020-01-31 16:45 ` [Xen-devel] [PATCH v4 5/7] x86/mm: use cache in guest_walk_tables() Jan Beulich
2020-01-31 16:45 ` [Xen-devel] [PATCH v4 6/7] x86/mm: drop p2mt parameter from map_domain_gfn() Jan Beulich
2020-02-03 15:51   ` Andrew Cooper
2020-01-31 16:46 ` [Xen-devel] [PATCH v4 7/7] x86/HVM: reduce scope of pfec in hvm_emulate_init_per_insn() Jan Beulich
2020-02-03 16:00   ` Andrew Cooper
2020-02-06 13:43   ` Durrant, Paul

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.