summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '0008-tools-lsevtchn-Use-errno-macro-to-handle-hypercall-e.patch')
-rw-r--r--0008-tools-lsevtchn-Use-errno-macro-to-handle-hypercall-e.patch75
1 files changed, 0 insertions, 75 deletions
diff --git a/0008-tools-lsevtchn-Use-errno-macro-to-handle-hypercall-e.patch b/0008-tools-lsevtchn-Use-errno-macro-to-handle-hypercall-e.patch
deleted file mode 100644
index 76bb65e..0000000
--- a/0008-tools-lsevtchn-Use-errno-macro-to-handle-hypercall-e.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From e0e84771b61ed985809d105d8f116d4c520542b0 Mon Sep 17 00:00:00 2001
-From: Matthew Barnes <matthew.barnes@cloud.com>
-Date: Thu, 8 Aug 2024 13:47:30 +0200
-Subject: [PATCH 08/35] tools/lsevtchn: Use errno macro to handle hypercall
- error cases
-
-Currently, lsevtchn aborts its event channel enumeration when it hits
-an event channel that is owned by Xen.
-
-lsevtchn does not distinguish between different hypercall errors, which
-results in lsevtchn missing potential relevant event channels with
-higher port numbers.
-
-Use the errno macro to distinguish between hypercall errors, and
-continue event channel enumeration if the hypercall error is not
-critical to enumeration.
-
-Signed-off-by: Matthew Barnes <matthew.barnes@cloud.com>
-Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
-master commit: e92a453c8db8bba62d6be3006079e2b9990c3978
-master date: 2024-08-02 08:43:57 +0200
----
- tools/xcutils/lsevtchn.c | 22 ++++++++++++++++++++--
- 1 file changed, 20 insertions(+), 2 deletions(-)
-
-diff --git a/tools/xcutils/lsevtchn.c b/tools/xcutils/lsevtchn.c
-index d1710613dd..30c8d847b8 100644
---- a/tools/xcutils/lsevtchn.c
-+++ b/tools/xcutils/lsevtchn.c
-@@ -3,6 +3,7 @@
- #include <stdint.h>
- #include <string.h>
- #include <stdio.h>
-+#include <errno.h>
-
- #include <xenctrl.h>
-
-@@ -24,7 +25,23 @@ int main(int argc, char **argv)
- status.port = port;
- rc = xc_evtchn_status(xch, &status);
- if ( rc < 0 )
-- break;
-+ {
-+ switch ( errno )
-+ {
-+ case EACCES: /* Xen-owned evtchn */
-+ continue;
-+
-+ case EINVAL: /* Port enumeration has ended */
-+ rc = 0;
-+ break;
-+
-+ default:
-+ perror("xc_evtchn_status");
-+ rc = 1;
-+ break;
-+ }
-+ goto out;
-+ }
-
- if ( status.status == EVTCHNSTAT_closed )
- continue;
-@@ -58,7 +75,8 @@ int main(int argc, char **argv)
- printf("\n");
- }
-
-+ out:
- xc_interface_close(xch);
-
-- return 0;
-+ return rc;
- }
---
-2.46.1
-