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

[xen master] xen/arm: its: only clean cache when sending ITS command



commit c93e9da8f515dead8678b72289f7d8bc7c1b99cc
Author:     Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
AuthorDate: Wed Nov 18 11:15:29 2026 +0900
Commit:     Michal Orzel <michal.orzel@xxxxxxx>
CommitDate: Thu Nov 19 08:18:28 2026 +0100

    xen/arm: its: only clean cache when sending ITS command
    
    There is no need to invalidate the cache entry because the CPU is the only
    writer and the ITS is the only reader of this buffer, so it is guaranteed
    that the cached data cannot be stale.
    
    However, we still need to clean the cache line to be sure that ITS sees
    the command written into memory.
    
    Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
    Signed-off-by: Daisuke Nishimura <nishimura@xxxxxxxxxxxxx>
    Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 xen/arch/arm/gic-v3-its.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c
index f44ee21293..d561def0e4 100644
--- a/xen/arch/arm/gic-v3-its.c
+++ b/xen/arch/arm/gic-v3-its.c
@@ -247,8 +247,7 @@ static int its_send_command(struct host_its *hw_its, const 
void *its_cmd)
 
     memcpy(hw_its->cmd_buf + writep, its_cmd, ITS_CMD_SIZE);
     if ( hw_its->flags & HOST_ITS_FLUSH_CMD_QUEUE )
-        clean_and_invalidate_dcache_va_range(hw_its->cmd_buf + writep,
-                                             ITS_CMD_SIZE);
+        clean_dcache_va_range(hw_its->cmd_buf + writep, ITS_CMD_SIZE);
     else
         dsb(ishst);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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