[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/pv: fix emulation of wb{,no}invd to flush all pCPU caches
commit b0f8bf86057b8f01fb4e48b506805d3818600f76 Author: Roger Pau Monne <roger.pau@xxxxxxxxxx> AuthorDate: Tue May 6 09:28:17 2025 +0200 Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx> CommitDate: Tue May 20 16:35:52 2025 +0200 x86/pv: fix emulation of wb{,no}invd to flush all pCPU caches The current emulation of wb{,no}invd is bogus for PV guests: it will only flush the current pCPU cache, without taking into account pCPUs where the vCPU had run previously. Resort to flushing the cache on all host pCPUs to make it correct. Fixes: 799fed0a7cc5 ("Priv-op emulation in Xen, for RDMSR/WRMSR/WBINVD") Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/pv/emul-priv-op.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c index 295d847ea2..20a90703c8 100644 --- a/xen/arch/x86/pv/emul-priv-op.c +++ b/xen/arch/x86/pv/emul-priv-op.c @@ -1198,13 +1198,13 @@ static int cf_check cache_op( if ( !cache_flush_permitted(current->domain) ) /* * Non-physdev domain attempted WBINVD; ignore for now since - * newer linux uses this in some start-of-day timing loops. + * Linux uses this in some start-of-day code. */ ; else if ( op == x86emul_wbnoinvd /* && cpu_has_wbnoinvd */ ) - wbnoinvd(); + flush_all(FLUSH_CACHE_WRITEBACK); else - wbinvd(); + flush_all(FLUSH_CACHE); return X86EMUL_OKAY; } -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |