x86: Split cache_flush() out of cache_writeback()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Jun 2022 13:28:48 +0000 (15:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jun 2022 13:28:48 +0000 (15:28 +0200)
commit8eafa2d871ae51d461256e4a14175e24df330c70
treec734dcbc2a68dc18a2b0b610cdfb5b9c48eb429b
parent74193f4292d9cfc2874866e941d9939d8f33fcef
x86: Split cache_flush() out of cache_writeback()

Subsequent changes will want a fully flushing version.

Use the new helper rather than opencoding it in flush_area_local().  This
resolves an outstanding issue where the conditional sfence is on the wrong
side of the clflushopt loop.  clflushopt is ordered with respect to older
stores, not to younger stores.

Rename gnttab_cache_flush()'s helper to avoid colliding in name.
grant_table.c can see the prototype from cache.h so the build fails
otherwise.

This is part of XSA-402.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 9a67ffee3371506e1cbfdfff5b90658d4828f6a2
master date: 2022-06-09 14:22:38 +0200
xen/arch/x86/flushtlb.c
xen/common/grant_table.c
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/x86/vtd.c
xen/include/asm-x86/cache.h