From e56a875c6a62dcbfbe6d4cd2f06f280c87e07222 Mon Sep 17 00:00:00 2001 From: ZhongkaiXu <3605832858@qq.com> Date: Mon, 17 Nov 2025 21:46:00 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(gits):=20fix=20MOVI=20cmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit change vicid to icid when handling MOVI command in ITS --- src/device/irqchip/gicv3/gits.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/device/irqchip/gicv3/gits.rs b/src/device/irqchip/gicv3/gits.rs index e3ad3b75..eb8719f6 100644 --- a/src/device/irqchip/gicv3/gits.rs +++ b/src/device/irqchip/gicv3/gits.rs @@ -321,6 +321,19 @@ impl Cmdq { 0x0d => { debug!("INVALL cmd"); } + 0x01 => { + let vicid = value[2] & 0xffff; + let icid = vicid_to_icid(vicid, cpuset_bitmap) + .expect("vicid to icid failed, maybe logical_id out of range"); + new_cmd[2] &= !0xffffu64; + new_cmd[2] |= icid & 0xffff; + debug!( + "MOVI, for Device {:#x}, new vicid({}) -> icid({})", + value[0] >> 32, + vicid, + icid + ); + } _ => { debug!("other cmd, code: 0x{:x}", code); }