diff options
3 files changed, 81 insertions, 1 deletions
diff --git a/recipes-extended/uxen/uxen-guest-tools/0002-vm-support-fix-build-for-kernel-s-5.15.patch b/recipes-extended/uxen/uxen-guest-tools/0002-vm-support-fix-build-for-kernel-s-5.15.patch new file mode 100644 index 00000000..6b7f1f82 --- /dev/null +++ b/recipes-extended/uxen/uxen-guest-tools/0002-vm-support-fix-build-for-kernel-s-5.15.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From f8a33a209498b32b0fc06d80baa071f0902b9a85 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 30 Nov 2021 06:45:34 -0800 | ||
4 | Subject: [PATCH] vm-support: fix build for kernel's > 5.15 | ||
5 | |||
6 | * remove callback was changed to return void instead of int in: | ||
7 | https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc7a6209d5710618eb4f72a77cd81b8d694ecf89 | ||
8 | |||
9 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
10 | --- | ||
11 | uxenplatform/platform.c | 7 +++++++ | ||
12 | 1 file changed, 7 insertions(+) | ||
13 | |||
14 | diff --git a/uxenplatform/platform.c b/uxenplatform/platform.c | ||
15 | index 99fc76a..5225a00 100644 | ||
16 | --- a/uxenplatform/platform.c | ||
17 | +++ b/uxenplatform/platform.c | ||
18 | @@ -4,6 +4,7 @@ | ||
19 | #include <linux/random.h> | ||
20 | #include <linux/kthread.h> | ||
21 | #include <linux/delay.h> | ||
22 | +#include <linux/version.h> | ||
23 | |||
24 | #include <uxen-hypercall.h> | ||
25 | #include <uxen-platform.h> | ||
26 | @@ -32,14 +33,20 @@ static int bus_probe(struct device *_dev) | ||
27 | return drv && drv->probe ? drv->probe(dev) : -ENODEV; | ||
28 | } | ||
29 | |||
30 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)) | ||
31 | static int bus_remove(struct device *_dev) | ||
32 | +#else | ||
33 | +static void bus_remove(struct device *_dev) | ||
34 | +#endif | ||
35 | { | ||
36 | struct uxen_device *dev = dev_to_uxen(_dev); | ||
37 | struct uxen_driver *drv = drv_to_uxen(_dev->driver); | ||
38 | |||
39 | if (dev && drv && drv->remove) | ||
40 | drv->remove(dev); | ||
41 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)) | ||
42 | return 0; | ||
43 | +#endif | ||
44 | } | ||
45 | |||
46 | static int bus_suspend(struct device *_dev, pm_message_t state) | ||
diff --git a/recipes-extended/uxen/uxen-guest-tools/0003-vm-support-fix-build-for-kernel-s-5.14.patch b/recipes-extended/uxen/uxen-guest-tools/0003-vm-support-fix-build-for-kernel-s-5.14.patch new file mode 100644 index 00000000..ec31eea4 --- /dev/null +++ b/recipes-extended/uxen/uxen-guest-tools/0003-vm-support-fix-build-for-kernel-s-5.14.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 59986e91d807591f05dfbd57b459ba71670874f9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 30 Nov 2021 15:04:31 +0000 | ||
4 | Subject: [PATCH] vm-support: fix build for kernel's > 5.14 | ||
5 | |||
6 | * remove set_driver_byte call | ||
7 | * not sure if it's still necessary here, but set_driver_byte as well as DRIVER_SENSE was killed in 5.14 with: | ||
8 | https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=464a00c9e0ad45e3f42ff6ea705491a356df818e | ||
9 | |||
10 | in some cases it was replaced with set_status_byte(sc, SAM_STAT_CHECK_CONDITION), but I didn't | ||
11 | read the implementation carefully enough to decide if this is still needed, I was only interested | ||
12 | in fixing the build failure (and I don't use this at all to test it in runtime) | ||
13 | |||
14 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
15 | --- | ||
16 | uxenstor/stor.c | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/uxenstor/stor.c b/uxenstor/stor.c | ||
20 | index e07b08e..6bf2184 100644 | ||
21 | --- a/uxenstor/stor.c | ||
22 | +++ b/uxenstor/stor.c | ||
23 | @@ -109,7 +109,9 @@ static void uxenstor_softirq(unsigned long opaque) | ||
24 | sc->sense_buffer, | ||
25 | sizeof(hdr) + hdr.sense_size, | ||
26 | 0, sizeof(hdr)); | ||
27 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0)) | ||
28 | set_driver_byte(sc, DRIVER_SENSE); | ||
29 | +#endif | ||
30 | } | ||
31 | |||
32 | set_host_byte(sc, DID_ERROR); | ||
diff --git a/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb b/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb index 06dc3768..841c71a4 100644 --- a/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb +++ b/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb | |||
@@ -10,7 +10,9 @@ SRC_URI = " \ | |||
10 | https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \ | 10 | https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \ |
11 | file://fix-Makefile-for-OE-kernel-build.patch \ | 11 | file://fix-Makefile-for-OE-kernel-build.patch \ |
12 | file://0001-vm-support-fix-build-for-kernel-s-5.4.patch \ | 12 | file://0001-vm-support-fix-build-for-kernel-s-5.4.patch \ |
13 | " | 13 | file://0002-vm-support-fix-build-for-kernel-s-5.15.patch \ |
14 | file://0003-vm-support-fix-build-for-kernel-s-5.14.patch \ | ||
15 | " | ||
14 | 16 | ||
15 | SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4" | 17 | SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4" |
16 | SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c" | 18 | SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c" |