[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging-4.14] x86/HVM: permit CLFLUSH{,OPT} on execute-only code segments



commit 4ebd423a528b3e85aa10b701f8326e16f1e7c352
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Jan 7 08:52:48 2022 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Jan 7 08:52:48 2022 +0100

    x86/HVM: permit CLFLUSH{,OPT} on execute-only code segments
    
    Both SDM and PM explicitly permit this.
    
    Fixes: 52dba7bd0b36 ("x86emul: generalize wbinvd() hook")
    Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Paul Durrant <paul@xxxxxxx>
    master commit: df3e1a5efe700a9f59eced801cac73f9fd02a0e2
    master date: 2021-12-10 14:03:56 +0100
---
 xen/arch/x86/hvm/emulate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 24cf85fb4f..ee940c33ca 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -2310,7 +2310,9 @@ static int hvmemul_cache_op(
         ASSERT(!is_x86_system_segment(seg));
 
         rc = hvmemul_virtual_to_linear(seg, offset, 0, NULL,
-                                       hvm_access_read, hvmemul_ctxt, &addr);
+                                       op != x86emul_clwb ? hvm_access_none
+                                                          : hvm_access_read,
+                                       hvmemul_ctxt, &addr);
         if ( rc != X86EMUL_OKAY )
             break;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.