pkgsrc-WIP-changes archive

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

qemu-guest-agent: use patches from main qemu package



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By:	bsiegert
Date:		Tue Apr 9 21:16:37 2024 +0200
Changeset:	d2e26627b20bdaf067a69a3e372a786f969c01f2

Modified Files:
	qemu-guest-agent/Makefile
Removed Files:
	qemu-guest-agent/patches/patch-audio_jackaudio.c
	qemu-guest-agent/patches/patch-hw-mips-Kconfig
	qemu-guest-agent/patches/patch-hw-mips-mipssim.c
	qemu-guest-agent/patches/patch-hw_display_omap__dss.c
	qemu-guest-agent/patches/patch-hw_mips_meson.build
	qemu-guest-agent/patches/patch-hw_net_etraxfs__eth.c
	qemu-guest-agent/patches/patch-hw_net_xilinx__axienet.c
	qemu-guest-agent/patches/patch-hw_rtc_mc146818rtc.c
	qemu-guest-agent/patches/patch-hw_scsi_scsi-disk.c
	qemu-guest-agent/patches/patch-hw_usb_dev-mtp.c
	qemu-guest-agent/patches/patch-meson.build
	qemu-guest-agent/patches/patch-roms_u-boot-sam460ex_Makefile
	qemu-guest-agent/patches/patch-target_arm_tcg_translate-sve.c
	qemu-guest-agent/patches/patch-target_i386_cpu.c
	qemu-guest-agent/patches/patch-target_i386_meson.build
	qemu-guest-agent/patches/patch-target_i386_nvmm_nvmm-all.c
	qemu-guest-agent/patches/patch-util_coroutine-ucontext.c
	qemu-guest-agent/patches/patch-util_osdep.c

Log Message:
qemu-guest-agent: use patches from main qemu package

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d2e26627b20bdaf067a69a3e372a786f969c01f2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qemu-guest-agent/Makefile                          |  2 +
 qemu-guest-agent/patches/patch-audio_jackaudio.c   | 20 ------
 qemu-guest-agent/patches/patch-hw-mips-Kconfig     | 13 ----
 qemu-guest-agent/patches/patch-hw-mips-mipssim.c   | 75 ----------------------
 .../patches/patch-hw_display_omap__dss.c           | 30 ---------
 qemu-guest-agent/patches/patch-hw_mips_meson.build | 13 ----
 .../patches/patch-hw_net_etraxfs__eth.c            | 25 --------
 .../patches/patch-hw_net_xilinx__axienet.c         | 16 -----
 .../patches/patch-hw_rtc_mc146818rtc.c             | 32 ---------
 qemu-guest-agent/patches/patch-hw_scsi_scsi-disk.c | 50 ---------------
 qemu-guest-agent/patches/patch-hw_usb_dev-mtp.c    | 25 --------
 qemu-guest-agent/patches/patch-meson.build         | 26 --------
 .../patches/patch-roms_u-boot-sam460ex_Makefile    | 32 ---------
 .../patches/patch-target_arm_tcg_translate-sve.c   | 16 -----
 qemu-guest-agent/patches/patch-target_i386_cpu.c   | 33 ----------
 .../patches/patch-target_i386_meson.build          | 14 ----
 .../patches/patch-target_i386_nvmm_nvmm-all.c      | 22 -------
 .../patches/patch-util_coroutine-ucontext.c        | 19 ------
 qemu-guest-agent/patches/patch-util_osdep.c        | 18 ------
 19 files changed, 2 insertions(+), 479 deletions(-)

diffs:
diff --git a/qemu-guest-agent/Makefile b/qemu-guest-agent/Makefile
index 2601c3940d..c78cca919a 100644
--- a/qemu-guest-agent/Makefile
+++ b/qemu-guest-agent/Makefile
@@ -20,6 +20,8 @@ USE_TOOLS+=		pkg-config perl:build
 UNLIMIT_RESOURCES=	datasize
 HAS_CONFIGURE=		yes
 
+PATCHDIR=		${.CURDIR}/../../emulators/qemu/patches
+
 # https://github.com/qemu/qemu/commit/56208a0d473c6db263cc333c787ca48b502d72ab
 GCC_REQD+=		7
 
diff --git a/qemu-guest-agent/patches/patch-audio_jackaudio.c b/qemu-guest-agent/patches/patch-audio_jackaudio.c
deleted file mode 100644
index 897cbffed2..0000000000
--- a/qemu-guest-agent/patches/patch-audio_jackaudio.c
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-audio_jackaudio.c,v 1.2 2022/06/11 10:13:06 bsiegert Exp $
-
-Teach it about NetBSD's and macOS' pthread_setname_np.
-
---- audio/jackaudio.c.orig	2021-12-14 20:42:02.000000000 +0000
-+++ audio/jackaudio.c
-@@ -631,7 +631,13 @@ static int qjack_thread_creator(jack_nat
-     }
- 
-     /* set the name of the thread */
-+#ifdef __NetBSD__
-+    pthread_setname_np(*thread, "%s", (void *)"jack-client");
-+#elif __APPLE__
-+    pthread_setname_np("jack-client");
-+#else
-     pthread_setname_np(*thread, "jack-client");
-+#endif
- 
-     return ret;
- }
diff --git a/qemu-guest-agent/patches/patch-hw-mips-Kconfig b/qemu-guest-agent/patches/patch-hw-mips-Kconfig
deleted file mode 100644
index 6ed9d75ce0..0000000000
--- a/qemu-guest-agent/patches/patch-hw-mips-Kconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-hw-mips-Kconfig,v 1.3 2021/02/20 22:59:29 ryoon Exp $
-
---- hw/mips/Kconfig.orig	2020-08-11 19:17:15.000000000 +0000
-+++ hw/mips/Kconfig
-@@ -20,6 +20,8 @@ config MIPSSIM
-     select ISA_BUS
-     select SERIAL_ISA
-     select MIPSNET
-+    select VIRTIO_MMIO
-+    select OR_IRQ
- 
- config JAZZ
-     bool
diff --git a/qemu-guest-agent/patches/patch-hw-mips-mipssim.c b/qemu-guest-agent/patches/patch-hw-mips-mipssim.c
deleted file mode 100644
index 5782411eb6..0000000000
--- a/qemu-guest-agent/patches/patch-hw-mips-mipssim.c
+++ /dev/null
@@ -1,75 +0,0 @@
-$NetBSD: patch-hw-mips-mipssim.c,v 1.4 2021/08/27 03:32:37 ryoon Exp $
-
---- hw/mips/mipssim.c.orig	2021-08-04 16:29:07.000000000 +0000
-+++ hw/mips/mipssim.c
-@@ -39,12 +39,20 @@
- #include "hw/boards.h"
- #include "hw/mips/bios.h"
- #include "hw/loader.h"
-+#include "hw/or-irq.h"
- #include "elf.h"
- #include "hw/sysbus.h"
- #include "hw/qdev-properties.h"
- #include "qemu/error-report.h"
- #include "sysemu/qtest.h"
- #include "sysemu/reset.h"
-+#include "hw/virtio/virtio-mmio.h"
-+
-+#define NUM_VIRTIO_TRANSPORTS	32
-+
-+#define DEV_SPACING		0x10000		/* space devices every 64k */
-+#define ISA_BASE		0x1fd00000
-+#define	VIRTIO_MMIO_BASE	(ISA_BASE + DEV_SPACING)
- 
- static struct _loaderparams {
-     int ram_size;
-@@ -135,7 +143,7 @@ static void mipsnet_init(int base, qemu_
-                                 sysbus_mmio_get_region(s, 0));
- }
- 
--static void
-+void
- mips_mipssim_init(MachineState *machine)
- {
-     const char *kernel_filename = machine->kernel_filename;
-@@ -146,6 +154,7 @@ mips_mipssim_init(MachineState *machine)
-     MemoryRegion *isa = g_new(MemoryRegion, 1);
-     MemoryRegion *bios = g_new(MemoryRegion, 1);
-     Clock *cpuclk;
-+    DeviceState *virtio_orgate;
-     MIPSCPU *cpu;
-     CPUMIPSState *env;
-     ResetData *reset_info;
-@@ -208,7 +217,7 @@ mips_mipssim_init(MachineState *machine)
-     /* Register 64 KB of ISA IO space at 0x1fd00000. */
-     memory_region_init_alias(isa, NULL, "isa_mmio",
-                              get_system_io(), 0, 0x00010000);
--    memory_region_add_subregion(get_system_memory(), 0x1fd00000, isa);
-+    memory_region_add_subregion(get_system_memory(), ISA_BASE, isa);
- 
-     /*
-      * A single 16450 sits at offset 0x3f8. It is attached to
-@@ -229,6 +238,23 @@ mips_mipssim_init(MachineState *machine)
-     if (nd_table[0].used)
-         /* MIPSnet uses the MIPS CPU INT0, which is interrupt 2. */
-         mipsnet_init(0x4200, env->irq[2], &nd_table[0]);
-+
-+    /*
-+     * virtio extention; register 32 virtio devices just after the ISA space
-+     * at 0x1fd10000 with stride of 512 bytes as per i386s microvm target.
-+     * register these devices in reverse order (see comments in hw/arm/virt.c)
-+     */
-+    virtio_orgate = DEVICE(object_new(TYPE_OR_IRQ));
-+    object_property_set_int(OBJECT(virtio_orgate),
-+         "num-lines", NUM_VIRTIO_TRANSPORTS, &error_fatal);
-+    qdev_realize_and_unref(virtio_orgate, NULL, &error_fatal);
-+
-+    for (int i = NUM_VIRTIO_TRANSPORTS - 1; i >= 0; i--) {
-+        sysbus_create_simple("virtio-mmio",
-+            0x1fd10000 + i * 512,
-+            qdev_get_gpio_in(virtio_orgate, i));
-+    }
-+    qdev_connect_gpio_out(DEVICE(virtio_orgate), 0, env->irq[3]);
- }
- 
- static void mips_mipssim_machine_init(MachineClass *mc)
diff --git a/qemu-guest-agent/patches/patch-hw_display_omap__dss.c b/qemu-guest-agent/patches/patch-hw_display_omap__dss.c
deleted file mode 100644
index df87f09186..0000000000
--- a/qemu-guest-agent/patches/patch-hw_display_omap__dss.c
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-hw_display_omap__dss.c,v 1.3 2023/01/20 08:36:24 adam Exp $
-
-Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
-(PR lib/43832: ssp causes common names to be defines)
-
---- hw/display/omap_dss.c.orig	2022-12-14 16:28:45.000000000 +0000
-+++ hw/display/omap_dss.c
-@@ -798,18 +798,18 @@ static void omap_rfbi_write(void *opaque
-         break;
-     case 0x58:  /* RFBI_READ */
-         if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
--            s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
-+            s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 1);
-         else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
--            s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 1);
-+            s->rfbi.rxbuf = (*s->rfbi.chip[1]->read)(s->rfbi.chip[1]->opaque, 1);
-         if (!-- s->rfbi.pixels)
-             omap_rfbi_transfer_stop(s);
-         break;
- 
-     case 0x5c:  /* RFBI_STATUS */
-         if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
--            s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
-+            s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 0);
-         else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
--            s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 0);
-+            s->rfbi.rxbuf = (*s->rfbi.chip[1]->read)(s->rfbi.chip[1]->opaque, 0);
-         if (!-- s->rfbi.pixels)
-             omap_rfbi_transfer_stop(s);
-         break;
diff --git a/qemu-guest-agent/patches/patch-hw_mips_meson.build b/qemu-guest-agent/patches/patch-hw_mips_meson.build
deleted file mode 100644
index dc3c04567a..0000000000
--- a/qemu-guest-agent/patches/patch-hw_mips_meson.build
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-hw_mips_meson.build,v 1.3 2021/08/27 03:32:37 ryoon Exp $
-
---- hw/mips/meson.build.orig	2021-08-04 16:29:07.000000000 +0000
-+++ hw/mips/meson.build
-@@ -7,7 +7,7 @@ mips_ss.add(when: 'CONFIG_MIPS_CPS', if_
- 
- if 'CONFIG_TCG' in config_all
- mips_ss.add(when: 'CONFIG_JAZZ', if_true: files('jazz.c'))
--mips_ss.add(when: 'CONFIG_MIPSSIM', if_true: files('mipssim.c'))
-+mips_ss.add(when: 'CONFIG_MIPSSIM', if_true: files('mipssim.c', 'mipssim_virtio.c'))
- mips_ss.add(when: 'CONFIG_FULOONG', if_true: files('fuloong2e.c'))
- mips_ss.add(when: 'CONFIG_MIPS_BOSTON', if_true: [files('boston.c'), fdt])
- endif
diff --git a/qemu-guest-agent/patches/patch-hw_net_etraxfs__eth.c b/qemu-guest-agent/patches/patch-hw_net_etraxfs__eth.c
deleted file mode 100644
index 834cf8dfb1..0000000000
--- a/qemu-guest-agent/patches/patch-hw_net_etraxfs__eth.c
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-hw_net_etraxfs__eth.c,v 1.3 2014/01/15 18:26:20 wiz Exp $
-
-Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
-(PR lib/43832: ssp causes common names to be defines)
-
---- hw/net/etraxfs_eth.c.orig	2013-11-27 22:15:55.000000000 +0000
-+++ hw/net/etraxfs_eth.c
-@@ -185,7 +185,7 @@ static void mdio_read_req(struct qemu_md
- 
-     phy = bus->devs[bus->addr];
-     if (phy && phy->read) {
--        bus->data = phy->read(phy, bus->req);
-+        bus->data = (*phy->read)(phy, bus->req);
-     } else {
-         bus->data = 0xffff;
-     }
-@@ -364,7 +364,7 @@ static void eth_validate_duplex(ETRAXFSE
-     int new_mm = 0;
- 
-     phy = eth->mdio_bus.devs[eth->phyaddr];
--    phy_duplex = !!(phy->read(phy, 18) & (1 << 11));
-+    phy_duplex = !!((*phy->read)(phy, 18) & (1 << 11));
-     mac_duplex = !!(eth->regs[RW_REC_CTRL] & 128);
- 
-     if (mac_duplex != phy_duplex) {
diff --git a/qemu-guest-agent/patches/patch-hw_net_xilinx__axienet.c b/qemu-guest-agent/patches/patch-hw_net_xilinx__axienet.c
deleted file mode 100644
index af632b972d..0000000000
--- a/qemu-guest-agent/patches/patch-hw_net_xilinx__axienet.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-hw_net_xilinx__axienet.c,v 1.2 2014/01/15 18:26:20 wiz Exp $
-
-Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
-(PR lib/43832: ssp causes common names to be defines)
-
---- hw/net/xilinx_axienet.c.orig	2013-11-27 22:15:55.000000000 +0000
-+++ hw/net/xilinx_axienet.c
-@@ -207,7 +207,7 @@ static uint16_t mdio_read_req(struct MDI
- 
-     phy = bus->devs[addr];
-     if (phy && phy->read) {
--        data = phy->read(phy, reg);
-+        data = (*phy->read)(phy, reg);
-     } else {
-         data = 0xffff;
-     }
diff --git a/qemu-guest-agent/patches/patch-hw_rtc_mc146818rtc.c b/qemu-guest-agent/patches/patch-hw_rtc_mc146818rtc.c
deleted file mode 100644
index 72465142ae..0000000000
--- a/qemu-guest-agent/patches/patch-hw_rtc_mc146818rtc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-hw_rtc_mc146818rtc.c,v 1.1 2020/10/04 20:39:25 thorpej Exp $
-
-Ensure the periodic timer is started as soon as the device is realized,
-and follow the real hardware's lead of updating the PF bit in REG_C even
-if it's not going to result in raising an interrupt.
-
---- hw/rtc/mc146818rtc.c.orig	2020-10-01 00:56:55.574093880 +0000
-+++ hw/rtc/mc146818rtc.c	2020-10-01 00:58:40.326479896 +0000
-@@ -155,9 +155,15 @@ static uint32_t rtc_periodic_clock_ticks
- {
-     int period_code;
- 
-+#if 0
-+    /*
-+     * Real hardware sets the PF bit rergardless if it actually
-+     * raises an interrupt.
-+     */
-     if (!(s->cmos_data[RTC_REG_B] & REG_B_PIE)) {
-         return 0;
-      }
-+#endif
- 
-     period_code = s->cmos_data[RTC_REG_A] & 0x0f;
- 
-@@ -944,6 +950,7 @@ static void rtc_realizefn(DeviceState *d
-     }
- 
-     s->periodic_timer = timer_new_ns(rtc_clock, rtc_periodic_timer, s);
-+    periodic_timer_update(s, qemu_clock_get_ns(rtc_clock), 0, true);
-     s->update_timer = timer_new_ns(rtc_clock, rtc_update_timer, s);
-     check_update_timer(s);
- 
diff --git a/qemu-guest-agent/patches/patch-hw_scsi_scsi-disk.c b/qemu-guest-agent/patches/patch-hw_scsi_scsi-disk.c
deleted file mode 100644
index 8b1be70abd..0000000000
--- a/qemu-guest-agent/patches/patch-hw_scsi_scsi-disk.c
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD: patch-hw_scsi_scsi-disk.c,v 1.1 2020/09/27 21:29:57 jakllsch Exp $
-
-Fill in more of SCSI disk block size reports to guest. Allows use of
-sector sizes outside range of 256 to 32768.
-
---- hw/scsi/scsi-disk.c.orig	2020-08-11 19:17:15.000000000 +0000
-+++ hw/scsi/scsi-disk.c
-@@ -1293,9 +1293,9 @@ static int scsi_disk_emulate_mode_sense(
-         p[2] = (nb_sectors >> 8) & 0xff;
-         p[3] = nb_sectors & 0xff;
-         p[4] = 0; /* reserved */
--        p[5] = 0; /* bytes 5-7 are the sector size in bytes */
--        p[6] = s->qdev.blocksize >> 8;
--        p[7] = 0;
-+        p[5] = (s->qdev.blocksize >> 16) & 0xff; /* bytes 5-7 are the sector size in bytes */
-+        p[6] = (s->qdev.blocksize >> 8) & 0xff;
-+        p[7] = s->qdev.blocksize & 0xff;
-         p += 8;
-     }
- 
-@@ -1993,10 +1993,10 @@ static int32_t scsi_disk_emulate_command
-         outbuf[1] = (nb_sectors >> 16) & 0xff;
-         outbuf[2] = (nb_sectors >> 8) & 0xff;
-         outbuf[3] = nb_sectors & 0xff;
--        outbuf[4] = 0;
--        outbuf[5] = 0;
--        outbuf[6] = s->qdev.blocksize >> 8;
--        outbuf[7] = 0;
-+        outbuf[4] = (s->qdev.blocksize >> 24) & 0xff;;
-+        outbuf[5] = (s->qdev.blocksize >> 16) & 0xff;
-+        outbuf[6] = (s->qdev.blocksize >> 8) & 0xff;
-+        outbuf[7] = s->qdev.blocksize & 0xff;;
-         break;
-     case REQUEST_SENSE:
-         /* Just return "NO SENSE".  */
-@@ -2062,10 +2062,10 @@ static int32_t scsi_disk_emulate_command
-             outbuf[5] = (nb_sectors >> 16) & 0xff;
-             outbuf[6] = (nb_sectors >> 8) & 0xff;
-             outbuf[7] = nb_sectors & 0xff;
--            outbuf[8] = 0;
--            outbuf[9] = 0;
--            outbuf[10] = s->qdev.blocksize >> 8;
--            outbuf[11] = 0;
-+            outbuf[8] = (s->qdev.blocksize >> 24) & 0xff;
-+            outbuf[9] = (s->qdev.blocksize >> 16) & 0xff;
-+            outbuf[10] = (s->qdev.blocksize >> 8) & 0xff;
-+            outbuf[11] = s->qdev.blocksize & 0xff;
-             outbuf[12] = 0;
-             outbuf[13] = get_physical_block_exp(&s->qdev.conf);
- 
diff --git a/qemu-guest-agent/patches/patch-hw_usb_dev-mtp.c b/qemu-guest-agent/patches/patch-hw_usb_dev-mtp.c
deleted file mode 100644
index 995ef0ead1..0000000000
--- a/qemu-guest-agent/patches/patch-hw_usb_dev-mtp.c
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-hw_usb_dev-mtp.c,v 1.5 2021/02/20 22:59:29 ryoon Exp $
-
---- hw/usb/dev-mtp.c.orig	2020-12-08 16:59:44.000000000 +0000
-+++ hw/usb/dev-mtp.c
-@@ -30,6 +30,10 @@
- #include "qemu/units.h"
- #include "qom/object.h"
- 
-+#ifndef NAME_MAX
-+#define NAME_MAX 255
-+#endif
-+
- /* ----------------------------------------------------------------------- */
- 
- enum mtp_container_type {
-@@ -618,6 +622,9 @@ static void usb_mtp_object_readdir(MTPSt
-     }
-     o->have_children = true;
- 
-+#ifndef O_DIRECTORY
-+#define O_DIRECTORY	0
-+#endif
-     fd = open(o->path, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
-     if (fd < 0) {
-         return;
diff --git a/qemu-guest-agent/patches/patch-meson.build b/qemu-guest-agent/patches/patch-meson.build
deleted file mode 100644
index 8e0a697782..0000000000
--- a/qemu-guest-agent/patches/patch-meson.build
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-meson.build,v 1.14 2023/09/27 08:24:04 adam Exp $
-
-* Detect iconv in libc properly for pkgsrc (pkgsrc removes -liconv)
-  to fix qemu-system-aarch64 link.
-* Detect curses (non-ncurses{,w} too)
-
---- meson.build.orig	2023-08-22 15:34:02.000000000 +0000
-+++ meson.build
-@@ -1184,7 +1184,7 @@ if have_system and get_option('curses').
-       has_curses_h = cc.has_header('curses.h', args: curses_compile_args)
-     endif
-     if has_curses_h
--      curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw', 'cursesw'])
-+      curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw', 'cursesw', 'curses'])
-       foreach curses_libname : curses_libname_list
-         libcurses = cc.find_library(curses_libname,
-                                     required: false)
-@@ -1201,7 +1201,7 @@ if have_system and get_option('curses').
-     endif
-   endif
-   if get_option('iconv').allowed()
--    foreach link_args : [ ['-liconv'], [] ]
-+    foreach link_args : [ [], ['-liconv'] ]
-       # Programs will be linked with glib and this will bring in libiconv on FreeBSD.
-       # We need to use libiconv if available because mixing libiconv's headers with
-       # the system libc does not work.
diff --git a/qemu-guest-agent/patches/patch-roms_u-boot-sam460ex_Makefile b/qemu-guest-agent/patches/patch-roms_u-boot-sam460ex_Makefile
deleted file mode 100644
index e09c20775b..0000000000
--- a/qemu-guest-agent/patches/patch-roms_u-boot-sam460ex_Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-roms_u-boot-sam460ex_Makefile,v 1.3 2021/02/23 09:28:33 wiz Exp $
-
-Fix unportable test(1) operator.
-
---- roms/u-boot-sam460ex/Makefile.orig	2020-12-08 17:00:58.000000000 +0000
-+++ roms/u-boot-sam460ex/Makefile
-@@ -2189,10 +2189,10 @@ M5475GFE_config :	unconfig
- 	if [ "$${CODE}" != "0" ] ; then \
- 		echo "#define CONFIG_SYS_NOR1SZ	$${CODE}" >> $(obj)include/config.h ; \
- 	fi; \
--	if [ "$${VID}" == "1" ] ; then \
-+	if [ "$${VID}" = "1" ] ; then \
- 		echo "#define CONFIG_SYS_VIDEO" >> $(obj)include/config.h ; \
- 	fi; \
--	if [ "$${USB}" == "1" ] ; then \
-+	if [ "$${USB}" = "1" ] ; then \
- 		echo "#define CONFIG_SYS_USBCTRL" >> $(obj)include/config.h ; \
- 	fi
- 	@$(MKCONFIG) -a M5475EVB m68k mcf547x_8x m547xevb freescale
-@@ -2224,10 +2224,10 @@ M5485HFE_config :	unconfig
- 	if [ "$${CODE}" != "0" ] ; then \
- 		echo "#define CONFIG_SYS_NOR1SZ	$${CODE}" >> $(obj)include/config.h ; \
- 	fi; \
--	if [ "$${VID}" == "1" ] ; then \
-+	if [ "$${VID}" = "1" ] ; then \
- 		echo "#define CONFIG_SYS_VIDEO" >> $(obj)include/config.h ; \
- 	fi; \
--	if [ "$${USB}" == "1" ] ; then \
-+	if [ "$${USB}" = "1" ] ; then \
- 		echo "#define CONFIG_SYS_USBCTRL" >> $(obj)include/config.h ; \
- 	fi
- 	@$(MKCONFIG) -a M5485EVB m68k mcf547x_8x m548xevb freescale
diff --git a/qemu-guest-agent/patches/patch-target_arm_tcg_translate-sve.c b/qemu-guest-agent/patches/patch-target_arm_tcg_translate-sve.c
deleted file mode 100644
index 59f43450c1..0000000000
--- a/qemu-guest-agent/patches/patch-target_arm_tcg_translate-sve.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-target_arm_tcg_translate-sve.c,v 1.1 2023/06/07 07:19:22 adam Exp $
-
-Avoid FSCALE define, notably on SunOS.
-
---- target/arm/tcg/translate-sve.c.orig	2022-08-30 16:41:57.000000000 +0000
-+++ target/arm/tcg/translate-sve.c
-@@ -3988,6 +3988,9 @@ TRANS_FEAT_NONSTREAMING(FTSMUL, aa64_sve
-     };                                                          \
-     TRANS_FEAT(NAME, FEAT, gen_gvec_fpst_arg_zpzz, name##_zpzz_fns[a->esz], a)
- 
-+#ifdef FSCALE
-+#undef FSCALE
-+#endif
- DO_ZPZZ_FP(FADD_zpzz, aa64_sve, sve_fadd)
- DO_ZPZZ_FP(FSUB_zpzz, aa64_sve, sve_fsub)
- DO_ZPZZ_FP(FMUL_zpzz, aa64_sve, sve_fmul)
diff --git a/qemu-guest-agent/patches/patch-target_i386_cpu.c b/qemu-guest-agent/patches/patch-target_i386_cpu.c
deleted file mode 100644
index f63c0e9ed8..0000000000
--- a/qemu-guest-agent/patches/patch-target_i386_cpu.c
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-target_i386_cpu.c,v 1.3 2023/12/28 17:15:39 adam Exp $
-
-Permit to use `-cpu host' with NVMM.
-
---- target/i386/cpu.c.orig	2023-12-19 21:24:34.000000000 +0000
-+++ target/i386/cpu.c
-@@ -26,6 +26,7 @@
- #include "tcg/helper-tcg.h"
- #include "sysemu/reset.h"
- #include "sysemu/hvf.h"
-+#include "sysemu/nvmm.h"
- #include "hvf/hvf-i386.h"
- #include "kvm/kvm_i386.h"
- #include "sev.h"
-@@ -1643,7 +1644,7 @@ uint32_t xsave_area_size(uint64_t mask,
- 
- static inline bool accel_uses_host_cpuid(void)
- {
--    return kvm_enabled() || hvf_enabled();
-+    return kvm_enabled() || hvf_enabled() || nvmm_enabled();
- }
- 
- static inline uint64_t x86_cpu_xsave_xcr0_components(X86CPU *cpu)
-@@ -7314,7 +7315,8 @@ static void x86_cpu_realizefn(DeviceStat
- 
-     if (xcc->host_cpuid_required && !accel_uses_host_cpuid()) {
-         g_autofree char *name = x86_cpu_class_get_model_name(xcc);
--        error_setg(&local_err, "CPU model '%s' requires KVM or HVF", name);
-+        error_setg(&local_err,
-+		   "CPU model '%s' requires KVM or HVF or NVMM", name);
-         goto out;
-     }
- 
diff --git a/qemu-guest-agent/patches/patch-target_i386_meson.build b/qemu-guest-agent/patches/patch-target_i386_meson.build
deleted file mode 100644
index 783b0f9d17..0000000000
--- a/qemu-guest-agent/patches/patch-target_i386_meson.build
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-target_i386_meson.build,v 1.5 2023/08/23 15:19:02 adam Exp $
-
-Permit to use `-cpu host' with NVMM.
-
---- target/i386/meson.build.orig	2023-08-22 15:34:02.000000000 +0000
-+++ target/i386/meson.build
-@@ -11,6 +11,7 @@ i386_ss.add(when: 'CONFIG_SEV', if_true:
- # x86 cpu type
- i386_ss.add(when: 'CONFIG_KVM', if_true: files('host-cpu.c'))
- i386_ss.add(when: 'CONFIG_HVF', if_true: files('host-cpu.c'))
-+i386_ss.add(when: 'CONFIG_NVMM', if_true: files('host-cpu.c'))
- 
- i386_system_ss = ss.source_set()
- i386_system_ss.add(files(
diff --git a/qemu-guest-agent/patches/patch-target_i386_nvmm_nvmm-all.c b/qemu-guest-agent/patches/patch-target_i386_nvmm_nvmm-all.c
deleted file mode 100644
index be84b6ff3d..0000000000
--- a/qemu-guest-agent/patches/patch-target_i386_nvmm_nvmm-all.c
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-target_i386_nvmm_nvmm-all.c,v 1.6 2024/02/20 14:16:58 imil Exp $
-
-Permit using older nvmm version.
-
---- target/i386/nvmm/nvmm-all.c.orig	2024-01-29 19:13:22.000000000 +0000
-+++ target/i386/nvmm/nvmm-all.c
-@@ -1171,14 +1171,10 @@ nvmm_accel_init(MachineState *ms)
-         error_report("NVMM: Unable to fetch capability, error=%d", errno);
-         return -err;
-     }
--    if (qemu_mach.cap.version < NVMM_KERN_VERSION) {
-+    if (qemu_mach.cap.version > NVMM_USER_VERSION) {
-         error_report("NVMM: Unsupported version %u", qemu_mach.cap.version);
-         return -EPROGMISMATCH;
-     }
--    if (qemu_mach.cap.state_size != sizeof(struct nvmm_x64_state)) {
--        error_report("NVMM: Wrong state size %u", qemu_mach.cap.state_size);
--        return -EPROGMISMATCH;
--    }
-
-     ret = nvmm_machine_create(&qemu_mach.mach);
-     if (ret == -1) {
diff --git a/qemu-guest-agent/patches/patch-util_coroutine-ucontext.c b/qemu-guest-agent/patches/patch-util_coroutine-ucontext.c
deleted file mode 100644
index 834f8e3737..0000000000
--- a/qemu-guest-agent/patches/patch-util_coroutine-ucontext.c
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-util_coroutine-ucontext.c,v 1.2 2024/01/30 18:20:09 adam Exp $
-
-https://github.com/omniosorg/omnios-extra/blob/master/build/qemu/patches/0008-Temporary-coroutine-patch-pending-illumos-15206.patch
-
---- util/coroutine-ucontext.c.orig	2024-01-29 19:13:22.000000000 +0000
-+++ util/coroutine-ucontext.c
-@@ -320,6 +320,12 @@ qemu_coroutine_switch(Coroutine *from_,
- 
-     ret = sigsetjmp(from->env, 0);
-     if (ret == 0) {
-+#if defined(__sun)
-+#define SIGJMP2UCONTEXT(x) ((ucontext_t *)P2ROUNDUP((uintptr_t)(x),  sizeof (upad128_t)))
-+        ucontext_t *f = SIGJMP2UCONTEXT(from->env);
-+        ucontext_t *t = SIGJMP2UCONTEXT(to->env);
-+        t->uc_mcontext.gregs[REG_FSBASE] = f->uc_mcontext.gregs[REG_FSBASE];
-+#endif
-         start_switch_fiber_asan(IS_ENABLED(CONFIG_COROUTINE_POOL) ||
-                                 action != COROUTINE_TERMINATE ?
-                                     &fake_stack_save : NULL,
diff --git a/qemu-guest-agent/patches/patch-util_osdep.c b/qemu-guest-agent/patches/patch-util_osdep.c
deleted file mode 100644
index a7a4f8cf5f..0000000000
--- a/qemu-guest-agent/patches/patch-util_osdep.c
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-util_osdep.c,v 1.1 2023/03/15 11:49:20 jperkin Exp $
-
-Don't use OFD locking on SunOS.
-https://github.com/omniosorg/omnios-extra/blob/master/build/qemu/patches/0002-illumos-OFD-locking-must-span-the-entire-file.patch
-
---- util/osdep.c.orig	2022-12-14 16:28:45.000000000 +0000
-+++ util/osdep.c
-@@ -31,6 +31,10 @@
- #include "qemu/hw-version.h"
- #include "monitor/monitor.h"
- 
-+#if defined(__sun)
-+#undef F_OFD_SETLK
-+#endif
-+
- static const char *hw_version = QEMU_HW_VERSION;
- 
- int socket_set_cork(int fd, int v)


Home | Main Index | Thread Index | Old Index