All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] xen/arm: fix guest builder cache cohenrency (again, again)
@ 2014-01-29 12:10 Ian Campbell
  2014-01-29 12:11 ` [PATCH 1/4] Revert "xen: arm: force guest memory accesses to cacheable when MMU is disabled" Ian Campbell
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Ian Campbell @ 2014-01-29 12:10 UTC (permalink / raw)
  To: xen-devel
  Cc: Keir Fraser, George Dunlap, Ian Jackson, Tim Deegan, Julien Grall,
	Stefano Stabellini, Jan Beulich

Jan/Ian/Keir -- the final patch involves tools changes and a new domctl,
which is why you are copied (although the domctl is marked as arm
specific you might have opinions on it).

On ARM we need to take care of cache coherency for guests which we have
just built because they start with their caches disabled.

Our current strategy for dealing with this, which is to make guest
memory default to cacheable regardless of the in guest configuration
(the HCR.DC bit), is flawed because it doesn't handle guests which
enable their MMU before enabling their caches, which at least FreeBSD
does. (NB: Setting HCR.DC while the guest MMU is enabled is
UNPREDICTABLE, hence we must disable it when the guest turns its MMU
one).

There is also a security aspect here since the current strategy means
that a guest which enables its MMU before its caches can potentially see
unscrubbed data in RAM (because the scrubbed bytes are still held in the
cache).

As well as the new stuff this series removes the HCR.DC support and
performs two purely cosmetic renames.

This has survived 20000 bootloops on arm32 and 9700 (on going) on arm64.
(I've been seeing a sporadic issue on arm64 but I believe it is
unrelated, although I also cannot reproduce at the moment).

As well as being more correct (and secure!) this strategy is IMHO
simpler than the existing HCR.DC based thing and I'd like to push it to
4.4.

I'm aware that this is the third attempt to get this right and the
second one requiring a freeze exception :-(

Ian.

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

end of thread, other threads:[~2014-01-30 12:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 12:10 [PATCH 0/4] xen/arm: fix guest builder cache cohenrency (again, again) Ian Campbell
2014-01-29 12:11 ` [PATCH 1/4] Revert "xen: arm: force guest memory accesses to cacheable when MMU is disabled" Ian Campbell
2014-01-29 13:22   ` Julien Grall
2014-01-29 14:18     ` Ian Campbell
2014-01-29 12:11 ` [PATCH 2/4] xen: arm: rename create_p2m_entries to apply_p2m_changes Ian Campbell
2014-01-29 13:18   ` Julien Grall
2014-01-29 12:11 ` [PATCH 3/4] xen: arm: rename p2m next_gfn_to_relinquish to lowest_mapped_gfn Ian Campbell
2014-01-29 13:19   ` Julien Grall
2014-01-29 12:11 ` [PATCH 4/4] xen/arm: clean and invalidate all guest caches by VMID after domain build Ian Campbell
2014-01-29 13:00   ` Jan Beulich
2014-01-29 13:28     ` Stefano Stabellini
2014-01-29 14:15     ` Ian Campbell
2014-01-29 15:01       ` Jan Beulich
2014-01-29 16:35         ` Ian Campbell
2014-01-29 16:50           ` Jan Beulich
2014-01-30 11:26       ` Ian Jackson
2014-01-30 12:24         ` Ian Campbell
2014-01-30 12:32           ` Ian Campbell
2014-01-29 13:26 ` [PATCH 0/4] xen/arm: fix guest builder cache cohenrency (again, again) Julien Grall

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.