From 73d8597db1090844a820b91e909bf66da983134b Mon Sep 17 00:00:00 2001 From: Steffen Eiden Date: Tue, 3 Sep 2024 11:20:04 +0200 Subject: [PATCH] rust/pv_core: Clarify error reason for 003* return codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The RCs 30, 31, 32 may be caused by a malicious host or host bug. Make this clear and advise to stop the SE-guest. Reviewed-by: Jan Höppner Signed-off-by: Steffen Eiden Signed-off-by: Jan Höppner --- rust/pv_core/src/uvdevice.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/pv_core/src/uvdevice.rs b/rust/pv_core/src/uvdevice.rs index 50504ed6..e47256d9 100644 --- a/rust/pv_core/src/uvdevice.rs +++ b/rust/pv_core/src/uvdevice.rs @@ -72,9 +72,9 @@ fn rc_fmt(rc: u16, rrc: u16, cmd: &mut C) -> &'static str { (0x0000, _) => Some("invalid rc"), (0x0002, _) => Some("invalid UV command"), (0x0005, _) => Some("request has an invalid size"), - (0x0030, _) => Some("home address space control bit has R-bit set to one"), - (0x0031, _) => Some("access exception"), - (0x0032, _) => Some("request contains virtual address translating to an invalid address"), + (0x0030, _) => Some("home address space control bit has R-bit set to one. This may be due to a corrupted host or a guest kernel bug. STOP using this guest"), + (0x0031, _) => Some("adress translation exception. This may be due to a corrupted host or a guest kernel bug. STOP using this guest"), + (0x0032, _) => Some("request contains virtual address translating to an invalid address. This may be due to a corrupted host or a guest kernel bug. STOP using this guest"), (UvDevice::RC_MORE_DATA, _) => unreachable!("This is no Error!!!!"), (UvDevice::RC_SUCCESS, _) => unreachable!("This is no Error!!!!"),