diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2021-10-05 14:14:11 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-10-06 02:53:20 +0000 |
commit | ce21d4bff1bc7e562471eeab6fb012b35029bf50 (patch) | |
tree | 11eb0890f3b0cbfa98959d665bfc78705b9bccee | |
parent | 33c17670afdb008097858d2fff8d4c4a47d68158 (diff) | |
download | src-ce21d4bff1bc7e562471eeab6fb012b35029bf50.tar.gz src-ce21d4bff1bc7e562471eeab6fb012b35029bf50.zip |
amd64 efirt: do not flush cache for runtime pages
We actually do not know is it safe or not to flush cache for random
BAR/register page existing in the system. It is well-known that for
instance LAPICs cannot tolerate cache flush. As report indicates,
there are more such devices.
This issue typically affects AMD machines which do not report self-snoop,
causing real CLFLUSH invocation on the mapped pages. Intels do self-snoop,
so this change should be nop for them, and unsafe devices, if any, are
already ignored.
Reported and tested by: manu
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32318
-rw-r--r-- | sys/amd64/amd64/efirt_machdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index 6fb64816385e..6fffd113f868 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -254,7 +254,7 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) vm_page_init_page(m, va, -1); m->order = VM_NFREEORDER + 1; /* invalid */ m->pool = VM_NFREEPOOL + 1; /* invalid */ - pmap_page_set_memattr(m, mode); + pmap_page_set_memattr_noflush(m, mode); } } VM_OBJECT_WUNLOCK(obj_1t1_pt); |