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

[PATCH] x86/shim: Report -ENOSYS instead of -EOPNOTSUPP



Main Xen reported -ENOSYS if the operation is not implemented, however,
shim errorneously reported it as -EOPNOTSUPP, potentially confusing the
guest.

Make shim more consistent with Xen by reporting -ENOSYS instead.

Fixes: 49f79fe03dfe ("xen/pvshim: add grant table operations")
Fixes: 368ae9a05fee ("xen/pvshim: forward evtchn ops between L0 Xen and L2 
DomU")
Reported-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
Found while running XTF tests using pv-shim with a modified xtf-runner.

 xen/arch/x86/pv/shim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index 41000b0523..024c49c1b3 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -632,7 +632,7 @@ long pv_shim_event_channel_op(int cmd, 
XEN_GUEST_HANDLE_PARAM(void) arg)
 
     default:
         /* No FIFO or PIRQ support for now */
-        rc = -EOPNOTSUPP;
+        rc = -ENOSYS;
         break;
     }
 
@@ -816,7 +816,7 @@ long pv_shim_grant_table_op(unsigned int cmd,
         break;
 
     default:
-        rc = -EOPNOTSUPP;
+        rc = -ENOSYS;
         break;
     }
 
-- 
2.55.0



--
Teddy Astie | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

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