All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/19] Trivial branch for 6.0 patches
@ 2020-12-14 15:57 Laurent Vivier
  2020-12-14 15:57 ` [PULL 01/19] target/i386: tracing: format length values as hex Laurent Vivier
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Laurent Vivier

The following changes since commit 17584289af1aaa72c932e7e47c25d583b329dc45:

  Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-6.0-pull-request=
' into staging (2020-12-12 18:33:46 +0000)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/trivial-branch-for-6.0-pull-request

for you to fetch changes up to 48f670ecfcbe92f63475c516aefb6e217f469bbf:

  configure / meson: Move check for linux/btrfs.h to meson.build (2020-12-13 =
23:56:16 +0100)

----------------------------------------------------------------
Pull request trivial-patches 20201214

----------------------------------------------------------------

Dov Murik (1):
  target/i386: tracing: format length values as hex

Gan Qixin (1):
  ads7846: moves from the hw/display folder to the hw/input folder.

Michael Roth (1):
  MAINTAINERS: update my email address

Pan Nengyuan (4):
  elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init
  elf2dmp/pdb: Plug memleak in pdb_init_from_file
  block/file-posix: fix a possible undefined behavior
  blockdev: Fix a memleak in drive_backup_prepare()

Peter Maydell (2):
  qemu-options.hx: Fix minor issues in icount documentation
  CODING_STYLE.rst: Be less strict about 80 character limit

Philippe Mathieu-Daud=C3=A9 (1):
  hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition

Roman Bolshakov (1):
  configure: Test if $make actually exists

Thomas Huth (6):
  configure: Remove the obsolete check for ifaddrs.h
  configure / meson: Move check for pty.h to meson.build
  configure / meson: Move check for drm.h to meson.build
  configure / meson: Move check for sys/signal.h to meson.build
  configure / meson: Move check for sys/kcov.h to meson.build
  configure / meson: Move check for linux/btrfs.h to meson.build

Xinhao Zhang (1):
  hw/xen: Don't use '#' flag of printf format

zhouyang (1):
  fsdev: open brace '{' following struct go on the same line

 CODING_STYLE.rst                |  9 +++--
 MAINTAINERS                     |  4 +--
 block/file-posix.c              |  2 +-
 blockdev.c                      |  1 +
 configure                       | 62 +++------------------------------
 contrib/elf2dmp/pdb.c           |  1 +
 contrib/elf2dmp/qemu_elf.c      |  1 +
 fsdev/9p-marshal.h              | 12 +++----
 fsdev/file-op-9p.h              |  3 +-
 hw/arm/Kconfig                  |  2 +-
 hw/display/Kconfig              |  3 --
 hw/display/meson.build          |  1 -
 hw/input/Kconfig                |  3 ++
 hw/{display =3D> input}/ads7846.c |  0
 hw/input/meson.build            |  1 +
 hw/pci-host/pam.c               |  2 +-
 hw/pci-host/q35.c               |  2 +-
 hw/xen/xen_pt.c                 | 10 +++---
 hw/xen/xen_pt_config_init.c     |  6 ++--
 hw/xen/xen_pt_msi.c             | 16 ++++-----
 include/hw/pci-host/i440fx.h    |  2 +-
 include/hw/pci-host/pam.h       |  2 ++
 include/hw/pci-host/q35.h       |  2 +-
 linux-user/ioctls.h             |  2 +-
 linux-user/syscall.c            |  4 +--
 linux-user/syscall_defs.h       |  2 +-
 meson.build                     |  5 +++
 qemu-options.hx                 | 44 +++++++++++++----------
 target/i386/trace-events        |  6 ++--
 29 files changed, 86 insertions(+), 124 deletions(-)
 rename hw/{display =3D> input}/ads7846.c (100%)

--=20
2.29.2



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PULL 01/19] target/i386: tracing: format length values as hex
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 02/19] qemu-options.hx: Fix minor issues in icount documentation Laurent Vivier
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Dov Murik, Michael Tokarev, Laurent Vivier

From: Dov Murik <dovmurik@linux.vnet.ibm.com>

Three trace events had a literal "0x" prefix but the 'len' values were
formatted in decimal base.  Keep the prefix and format the numbers as
hex, as is usually the case for length of memory regions.

Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201103100745.160409-1-dovmurik@linux.vnet.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/i386/trace-events | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/i386/trace-events b/target/i386/trace-events
index 9f299e94a2b7..246158ae1f00 100644
--- a/target/i386/trace-events
+++ b/target/i386/trace-events
@@ -8,11 +8,11 @@ kvm_x86_update_msi_routes(int num) "Updated %d MSI routes"
 
 # sev.c
 kvm_sev_init(void) ""
-kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zu"
-kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zu"
+kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx"
+kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zx"
 kvm_sev_change_state(const char *old, const char *new) "%s -> %s"
 kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session %p pdh %p"
-kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64
+kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIx64
 kvm_sev_launch_measurement(const char *value) "data %s"
 kvm_sev_launch_finish(void) ""
 kvm_sev_launch_secret(uint64_t hpa, uint64_t hva, uint64_t secret, int len) "hpa 0x%" PRIx64 " hva 0x%" PRIx64 " data 0x%" PRIx64 " len %d"
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 02/19] qemu-options.hx: Fix minor issues in icount documentation
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
  2020-12-14 15:57 ` [PULL 01/19] target/i386: tracing: format length values as hex Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 03/19] MAINTAINERS: update my email address Laurent Vivier
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Peter Maydell, Richard Henderson, Michael Tokarev,
	Laurent Vivier

From: Peter Maydell <peter.maydell@linaro.org>

The documentation for the icount documentation has some minor issues:
 * in a couple of places it says "sleep=on|off" when in the context of the
   sentence it means specifically "sleep=on"
 * the synopsis line for the documentation has drifted out of sync
   with the synopsis line in the DEF() macro (used for "-help" output)
 * the synopsis line in the DEF() macro is missing a "][" between
   the sleep= part and the rr= part
 * the synopsis line doesn't indicate that rrsnapshot is an optional
   part of the rr=mode,rrfile=filename subgrouping
 * we don't document that sleep=on can't be used with shift=auto
   or align=on
 * the rr option description had some minor grammar and formatting
   errors and was a bit terse
 * in commit f1f4b57e88ff in 2015 the documentation of the sleep=
   suboption got added between the two paragraphs defining general
   behaviour of the icount option. This meant that the second
   paragraph talking about the behaviour of "this option" reads as
   if it's talking about sleep=on, when it's really describing -icount
   as a whole. The paragraph is better moved back up to above the
   sleep= section.
 * the summary text displayed in "-help" output didn't mention
   the record-and-replay part

Fix these errors.

Fixes: https://bugs.launchpad.net/qemu/+bug/1774412
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201121213506.15599-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 qemu-options.hx | 44 +++++++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index e60ad42976d0..ae8872d1d664 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3958,30 +3958,34 @@ SRST
 ERST
 
 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
-    "-icount [shift=N|auto][,align=on|off][,sleep=on|off,rr=record|replay,rrfile=<filename>,rrsnapshot=<snapshot>]\n" \
+    "-icount [shift=N|auto][,align=on|off][,sleep=on|off][,rr=record|replay,rrfile=<filename>[,rrsnapshot=<snapshot>]]\n" \
     "                enable virtual instruction counter with 2^N clock ticks per\n" \
     "                instruction, enable aligning the host and virtual clocks\n" \
-    "                or disable real time cpu sleeping\n", QEMU_ARCH_ALL)
+    "                or disable real time cpu sleeping, and optionally enable\n" \
+    "                record-and-replay mode\n", QEMU_ARCH_ALL)
 SRST
-``-icount [shift=N|auto][,rr=record|replay,rrfile=filename,rrsnapshot=snapshot]``
+``-icount [shift=N|auto][,align=on|off][,sleep=on|off][,rr=record|replay,rrfile=filename[,rrsnapshot=snapshot]]``
     Enable virtual instruction counter. The virtual cpu will execute one
     instruction every 2^N ns of virtual time. If ``auto`` is specified
     then the virtual cpu speed will be automatically adjusted to keep
     virtual time within a few seconds of real time.
 
-    When the virtual cpu is sleeping, the virtual time will advance at
-    default speed unless ``sleep=on|off`` is specified. With
-    ``sleep=on|off``, the virtual time will jump to the next timer
-    deadline instantly whenever the virtual cpu goes to sleep mode and
-    will not advance if no timer is enabled. This behavior give
-    deterministic execution times from the guest point of view.
-
     Note that while this option can give deterministic behavior, it does
     not provide cycle accurate emulation. Modern CPUs contain
     superscalar out of order cores with complex cache hierarchies. The
     number of instructions executed often has little or no correlation
     with actual performance.
 
+    When the virtual cpu is sleeping, the virtual time will advance at
+    default speed unless ``sleep=on`` is specified. With
+    ``sleep=on``, the virtual time will jump to the next timer
+    deadline instantly whenever the virtual cpu goes to sleep mode and
+    will not advance if no timer is enabled. This behavior gives
+    deterministic execution times from the guest point of view.
+    The default if icount is enabled is ``sleep=off``.
+    ``sleep=on`` cannot be used together with either ``shift=auto``
+    or ``align=on``.
+
     ``align=on`` will activate the delay algorithm which will try to
     synchronise the host clock and the virtual clock. The goal is to
     have a guest running at the real frequency imposed by the shift
@@ -3991,15 +3995,17 @@ SRST
     ``shift`` is ``auto``. Note: The sync algorithm will work for those
     shift values for which the guest clock runs ahead of the host clock.
     Typically this happens when the shift value is high (how high
-    depends on the host machine).
-
-    When ``rr`` option is specified deterministic record/replay is
-    enabled. Replay log is written into filename file in record mode and
-    read from this file in replay mode.
-
-    Option rrsnapshot is used to create new vm snapshot named snapshot
-    at the start of execution recording. In replay mode this option is
-    used to load the initial VM state.
+    depends on the host machine). The default if icount is enabled
+    is ``align=off``.
+
+    When the ``rr`` option is specified deterministic record/replay is
+    enabled. The ``rrfile=`` option must also be provided to
+    specify the path to the replay log. In record mode data is written
+    to this file, and in replay mode it is read back.
+    If the ``rrsnapshot`` option is given then it specifies a VM snapshot
+    name. In record mode, a new VM snapshot with the given name is created
+    at the start of execution recording. In replay mode this option
+    specifies the snapshot name used to load the initial VM state.
 ERST
 
 DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 03/19] MAINTAINERS: update my email address
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
  2020-12-14 15:57 ` [PULL 01/19] target/i386: tracing: format length values as hex Laurent Vivier
  2020-12-14 15:57 ` [PULL 02/19] qemu-options.hx: Fix minor issues in icount documentation Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 04/19] hw/xen: Don't use '#' flag of printf format Laurent Vivier
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Michael Roth, Thomas Huth, Michael Tokarev, Laurent Vivier

From: Michael Roth <michael.roth@amd.com>

I've recently switched employers and the current email address is out
of date.

Signed-off-by: Michael Roth <michael.roth@amd.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201027060253.353054-1-michael.roth@amd.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index d48a4e8a8b75..f9d14078bc08 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2427,7 +2427,7 @@ F: scripts/simplebench/
 
 QAPI
 M: Markus Armbruster <armbru@redhat.com>
-M: Michael Roth <mdroth@linux.vnet.ibm.com>
+M: Michael Roth <michael.roth@amd.com>
 S: Supported
 F: qapi/
 X: qapi/*.json
@@ -2471,7 +2471,7 @@ F: tests/data/qobject/qdict.txt
 T: git https://repo.or.cz/qemu/armbru.git qapi-next
 
 QEMU Guest Agent
-M: Michael Roth <mdroth@linux.vnet.ibm.com>
+M: Michael Roth <michael.roth@amd.com>
 S: Maintained
 F: qga/
 F: docs/interop/qemu-ga.rst
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 04/19] hw/xen: Don't use '#' flag of printf format
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 03/19] MAINTAINERS: update my email address Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 05/19] hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition Laurent Vivier
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Kai Deng, Michael Tokarev, Laurent Vivier, Xinhao Zhang

From: Xinhao Zhang <zhangxinhao1@huawei.com>

Fix code style. Don't use '#' flag of printf format ('%#') in
format strings, use '0x' prefix instead

Signed-off-by: Xinhao Zhang <zhangxinhao1@huawei.com>
Signed-off-by: Kai Deng <dengkai1@huawei.com>
Message-Id: <20201104133709.3326630-1-zhangxinhao1@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/xen/xen_pt.c             | 10 +++++-----
 hw/xen/xen_pt_config_init.c |  6 +++---
 hw/xen/xen_pt_msi.c         | 16 ++++++++--------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 6d359ee486f5..a5f3dd590c13 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -489,7 +489,7 @@ static int xen_pt_register_regions(XenPCIPassthroughState *s, uint16_t *cmd)
         pci_register_bar(&s->dev, i, type, &s->bar[i]);
 
         XEN_PT_LOG(&s->dev, "IO region %i registered (size=0x%08"PRIx64
-                   " base_addr=0x%08"PRIx64" type: %#x)\n",
+                   " base_addr=0x%08"PRIx64" type: 0x%x)\n",
                    i, r->size, r->base_addr, type);
     }
 
@@ -578,7 +578,7 @@ static void xen_pt_check_bar_overlap(PCIBus *bus, PCIDevice *d, void *opaque)
         if (ranges_overlap(arg->addr, arg->size, r->addr, r->size)) {
             XEN_PT_WARN(&s->dev,
                         "Overlapped to device [%02x:%02x.%d] Region: %i"
-                        " (addr: %#"FMT_PCIBUS", len: %#"FMT_PCIBUS")\n",
+                        " (addr: 0x%"FMT_PCIBUS", len: 0x%"FMT_PCIBUS")\n",
                         pci_bus_num(bus), PCI_SLOT(d->devfn),
                         PCI_FUNC(d->devfn), i, r->addr, r->size);
             arg->rc = true;
@@ -618,8 +618,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
     pci_for_each_device(pci_get_bus(d), pci_dev_bus_num(d),
                         xen_pt_check_bar_overlap, &args);
     if (args.rc) {
-        XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS
-                    ", len: %#"FMT_PCIBUS") is overlapped.\n",
+        XEN_PT_WARN(d, "Region: %d (addr: 0x%"FMT_PCIBUS
+                    ", len: 0x%"FMT_PCIBUS") is overlapped.\n",
                     bar, sec->offset_within_address_space,
                     int128_get64(sec->size));
     }
@@ -786,7 +786,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
 
     /* register real device */
     XEN_PT_LOG(d, "Assigning real physical device %02x:%02x.%d"
-               " to devfn %#x\n",
+               " to devfn 0x%x\n",
                s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function,
                s->dev.devfn);
 
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index c8724cc7c855..c5c4e943a845 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -1622,7 +1622,7 @@ static int xen_pt_pcie_size_init(XenPCIPassthroughState *s,
         case PCI_EXP_TYPE_PCIE_BRIDGE:
         case PCI_EXP_TYPE_RC_EC:
         default:
-            XEN_PT_ERR(d, "Unsupported device/port type %#x.\n", type);
+            XEN_PT_ERR(d, "Unsupported device/port type 0x%x.\n", type);
             return -1;
         }
     }
@@ -1645,11 +1645,11 @@ static int xen_pt_pcie_size_init(XenPCIPassthroughState *s,
         case PCI_EXP_TYPE_PCIE_BRIDGE:
         case PCI_EXP_TYPE_RC_EC:
         default:
-            XEN_PT_ERR(d, "Unsupported device/port type %#x.\n", type);
+            XEN_PT_ERR(d, "Unsupported device/port type 0x%x.\n", type);
             return -1;
         }
     } else {
-        XEN_PT_ERR(d, "Unsupported capability version %#x.\n", version);
+        XEN_PT_ERR(d, "Unsupported capability version 0x%x.\n", version);
         return -1;
     }
 
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index fb4b887b92b1..b71563f98a8b 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -123,7 +123,7 @@ static int msi_msix_setup(XenPCIPassthroughState *s,
             *ppirq = XEN_PT_UNASSIGNED_PIRQ;
         } else {
             XEN_PT_LOG(&s->dev, "requested pirq %d for MSI%s"
-                       " (vec: %#x, entry: %#x)\n",
+                       " (vec: 0x%x, entry: 0x%x)\n",
                        *ppirq, is_msix ? "-X" : "", gvec, msix_entry);
         }
     }
@@ -142,7 +142,7 @@ static int msi_msix_setup(XenPCIPassthroughState *s,
                                      msix_entry, table_base);
         if (rc) {
             XEN_PT_ERR(&s->dev,
-                       "Mapping of MSI%s (err: %i, vec: %#x, entry %#x)\n",
+                       "Mapping of MSI%s (err: %i, vec: 0x%x, entry 0x%x)\n",
                        is_msix ? "-X" : "", errno, gvec, msix_entry);
             return rc;
         }
@@ -165,8 +165,8 @@ static int msi_msix_update(XenPCIPassthroughState *s,
     int rc = 0;
     uint64_t table_addr = 0;
 
-    XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec %#x gflags %#x"
-               " (entry: %#x)\n",
+    XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec 0x%x gflags 0x%x"
+               " (entry: 0x%x)\n",
                is_msix ? "-X" : "", pirq, gvec, gflags, msix_entry);
 
     if (is_msix) {
@@ -208,11 +208,11 @@ static int msi_msix_disable(XenPCIPassthroughState *s,
     }
 
     if (is_binded) {
-        XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec %#x\n",
+        XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec 0x%x\n",
                    is_msix ? "-X" : "", pirq, gvec);
         rc = xc_domain_unbind_msi_irq(xen_xc, xen_domid, gvec, pirq, gflags);
         if (rc) {
-            XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, gvec: %#x)\n",
+            XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, gvec: 0x%x)\n",
                        is_msix ? "-X" : "", errno, pirq, gvec);
             return rc;
         }
@@ -539,7 +539,7 @@ int xen_pt_msix_init(XenPCIPassthroughState *s, uint32_t base)
     }
 
     if (id != PCI_CAP_ID_MSIX) {
-        XEN_PT_ERR(d, "Invalid id %#x base %#x\n", id, base);
+        XEN_PT_ERR(d, "Invalid id 0x%x base 0x%x\n", id, base);
         return -1;
     }
 
@@ -582,7 +582,7 @@ int xen_pt_msix_init(XenPCIPassthroughState *s, uint32_t base)
         XEN_PT_ERR(d, "Can't open /dev/mem: %s\n", strerror(errno));
         goto error_out;
     }
-    XEN_PT_LOG(d, "table_off = %#x, total_entries = %d\n",
+    XEN_PT_LOG(d, "table_off = 0x%x, total_entries = %d\n",
                table_off, total_entries);
     msix->table_offset_adjust = table_off & 0x0fff;
     msix->phys_iomem_base =
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 05/19] hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 04/19] hw/xen: Don't use '#' flag of printf format Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 06/19] fsdev: open brace '{' following struct go on the same line Laurent Vivier
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Michael Tokarev, Laurent Vivier, Julia Suvorova

From: Philippe Mathieu-Daudé <philmd@redhat.com>

While this change helps triskaidekaphobic developers, it
is a good practice to avoid magic values and using constant
definitions instead.

Introduce the PAM_REGIONS_COUNT and use it. No logical change.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Julia Suvorova <jusual@redhat.com>
Message-Id: <20201202132038.1276404-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/pci-host/pam.c            | 2 +-
 hw/pci-host/q35.c            | 2 +-
 include/hw/pci-host/i440fx.h | 2 +-
 include/hw/pci-host/pam.h    | 2 ++
 include/hw/pci-host/q35.h    | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c
index a4962057833f..454dd120db97 100644
--- a/hw/pci-host/pam.c
+++ b/hw/pci-host/pam.c
@@ -62,7 +62,7 @@ void init_pam(DeviceState *dev, MemoryRegion *ram_memory,
 
 void pam_update(PAMMemoryRegion *pam, int idx, uint8_t val)
 {
-    assert(0 <= idx && idx <= 12);
+    assert(0 <= idx && idx < PAM_REGIONS_COUNT);
 
     memory_region_set_enabled(&pam->alias[pam->current], false);
     pam->current = (val >> ((!(idx & 1)) * 4)) & PAM_ATTR_MASK;
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index b67cb9c29f8e..2eb729dff585 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -641,7 +641,7 @@ static void mch_realize(PCIDevice *d, Error **errp)
     init_pam(DEVICE(mch), mch->ram_memory, mch->system_memory,
              mch->pci_address_space, &mch->pam_regions[0],
              PAM_BIOS_BASE, PAM_BIOS_SIZE);
-    for (i = 0; i < 12; ++i) {
+    for (i = 0; i < ARRAY_SIZE(mch->pam_regions) - 1; ++i) {
         init_pam(DEVICE(mch), mch->ram_memory, mch->system_memory,
                  mch->pci_address_space, &mch->pam_regions[i+1],
                  PAM_EXPAN_BASE + i * PAM_EXPAN_SIZE, PAM_EXPAN_SIZE);
diff --git a/include/hw/pci-host/i440fx.h b/include/hw/pci-host/i440fx.h
index 6c16eaf876dd..24fd53942cab 100644
--- a/include/hw/pci-host/i440fx.h
+++ b/include/hw/pci-host/i440fx.h
@@ -29,7 +29,7 @@ struct PCII440FXState {
     MemoryRegion *system_memory;
     MemoryRegion *pci_address_space;
     MemoryRegion *ram_memory;
-    PAMMemoryRegion pam_regions[13];
+    PAMMemoryRegion pam_regions[PAM_REGIONS_COUNT];
     MemoryRegion smram_region;
     MemoryRegion smram, low_smram;
 };
diff --git a/include/hw/pci-host/pam.h b/include/hw/pci-host/pam.h
index fec5cd35d60f..c1fd06ba2ae6 100644
--- a/include/hw/pci-host/pam.h
+++ b/include/hw/pci-host/pam.h
@@ -80,6 +80,8 @@
 #define SMRAM_C_BASE_SEG_MASK  ((uint8_t)0x7)
 #define SMRAM_C_BASE_SEG       ((uint8_t)0x2)  /* hardwired to b010 */
 
+#define PAM_REGIONS_COUNT       13
+
 typedef struct PAMMemoryRegion {
     MemoryRegion alias[4];  /* index = PAM value */
     unsigned current;
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index bbb958176565..ab989698ef8f 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -44,7 +44,7 @@ struct MCHPCIState {
     MemoryRegion *pci_address_space;
     MemoryRegion *system_memory;
     MemoryRegion *address_space_io;
-    PAMMemoryRegion pam_regions[13];
+    PAMMemoryRegion pam_regions[PAM_REGIONS_COUNT];
     MemoryRegion smram_region, open_high_smram;
     MemoryRegion smram, low_smram, high_smram;
     MemoryRegion tseg_blackhole, tseg_window;
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 06/19] fsdev: open brace '{' following struct go on the same line
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 05/19] hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 07/19] CODING_STYLE.rst: Be less strict about 80 character limit Laurent Vivier
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Michael Tokarev, Laurent Vivier, zhouyang

From: zhouyang <zhouyang789@huawei.com>

I found some style problems while check the code using checkpatch.pl.
This commit fixs the issue below:
ERROR: open brace '{' following struct go on the same line

Signed-off-by: zhouyang <zhouyang789@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201209060735.2760943-1-zhouyang789@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 fsdev/9p-marshal.h | 12 ++++--------
 fsdev/file-op-9p.h |  3 +--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/fsdev/9p-marshal.h b/fsdev/9p-marshal.h
index 8f3babb60a05..ceaf2f521ec4 100644
--- a/fsdev/9p-marshal.h
+++ b/fsdev/9p-marshal.h
@@ -1,21 +1,18 @@
 #ifndef QEMU_9P_MARSHAL_H
 #define QEMU_9P_MARSHAL_H
 
-typedef struct V9fsString
-{
+typedef struct V9fsString {
     uint16_t size;
     char *data;
 } V9fsString;
 
-typedef struct V9fsQID
-{
+typedef struct V9fsQID {
     uint8_t type;
     uint32_t version;
     uint64_t path;
 } V9fsQID;
 
-typedef struct V9fsStat
-{
+typedef struct V9fsStat {
     int16_t size;
     int16_t type;
     int32_t dev;
@@ -35,8 +32,7 @@ typedef struct V9fsStat
     int32_t n_muid;
 } V9fsStat;
 
-typedef struct V9fsIattr
-{
+typedef struct V9fsIattr {
     int32_t valid;
     int32_t mode;
     int32_t uid;
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index d51cec2f3be0..42f677cf38c2 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -110,8 +110,7 @@ typedef union V9fsFidOpenState V9fsFidOpenState;
 
 void cred_init(FsCred *);
 
-struct FileOperations
-{
+struct FileOperations {
     int (*parse_opts)(QemuOpts *, FsDriverEntry *, Error **errp);
     int (*init)(FsContext *, Error **errp);
     void (*cleanup)(FsContext *);
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 07/19] CODING_STYLE.rst: Be less strict about 80 character limit
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (5 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 06/19] fsdev: open brace '{' following struct go on the same line Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 08/19] ads7846: moves from the hw/display folder to the hw/input folder Laurent Vivier
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Michael S . Tsirkin, qemu-trivial,
	Michael Tokarev, Laurent Vivier, Markus Armbruster

From: Peter Maydell <peter.maydell@linaro.org>

Relax the wording about line lengths a little bit; this goes with the
checkpatch changes to warn at 100 characters rather than 80.

(Compare the Linux kernel commit bdc48fa11e46f8; our coding style is
not theirs, but the rationale is good and applies to us too.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20201106112940.31300-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 CODING_STYLE.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/CODING_STYLE.rst b/CODING_STYLE.rst
index 8b13ef0669eb..7bf4e39d4871 100644
--- a/CODING_STYLE.rst
+++ b/CODING_STYLE.rst
@@ -85,8 +85,13 @@ Line width
 Lines should be 80 characters; try not to make them longer.
 
 Sometimes it is hard to do, especially when dealing with QEMU subsystems
-that use long function or symbol names.  Even in that case, do not make
-lines much longer than 80 characters.
+that use long function or symbol names. If wrapping the line at 80 columns
+is obviously less readable and more awkward, prefer not to wrap it; better
+to have an 85 character line than one which is awkwardly wrapped.
+
+Even in that case, try not to make lines much longer than 80 characters.
+(The checkpatch script will warn at 100 characters, but this is intended
+as a guard against obviously-overlength lines, not a target.)
 
 Rationale:
 
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 08/19] ads7846: moves from the hw/display folder to the hw/input folder.
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (6 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 07/19] CODING_STYLE.rst: Be less strict about 80 character limit Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 09/19] configure: Test if $make actually exists Laurent Vivier
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Peter Maydell, Michael Tokarev, Laurent Vivier, Gan Qixin

From: Gan Qixin <ganqixin@huawei.com>

ads7846 is a touch-screen controller that is an input device rather
than a display device, so move it to the hw/input folder.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20201115123503.1110665-1-ganqixin@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/arm/Kconfig                  | 2 +-
 hw/display/Kconfig              | 3 ---
 hw/display/meson.build          | 1 -
 hw/input/Kconfig                | 3 +++
 hw/{display => input}/ads7846.c | 0
 hw/input/meson.build            | 1 +
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename hw/{display => input}/ads7846.c (100%)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index eb8a8844cf86..0a242e4c5d8a 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -156,7 +156,7 @@ config TOSA
 
 config SPITZ
     bool
-    select ADS7846 # display
+    select ADS7846 # touch-screen controller
     select MAX111X # A/D converter
     select WM8750  # audio codec
     select MAX7310 # GPIO expander
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 15d59e10dc2c..ca46b5830e73 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -9,9 +9,6 @@ config EDID
 config FW_CFG_DMA
     bool
 
-config ADS7846
-    bool
-
 config VGA_CIRRUS
     bool
     default y if PCI_DEVICES
diff --git a/hw/display/meson.build b/hw/display/meson.build
index dad3bd2b414b..9d79e3951d9e 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -6,7 +6,6 @@ softmmu_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-regi
 softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
 softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
 
-softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
 softmmu_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
 softmmu_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c'))
 softmmu_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c'))
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index 64f14daabf6c..55865bb38696 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -1,6 +1,9 @@
 config ADB
     bool
 
+config ADS7846
+    bool
+
 config LM832X
     bool
     depends on I2C
diff --git a/hw/display/ads7846.c b/hw/input/ads7846.c
similarity index 100%
rename from hw/display/ads7846.c
rename to hw/input/ads7846.c
diff --git a/hw/input/meson.build b/hw/input/meson.build
index e7285b15ae6d..0042c3f0dc54 100644
--- a/hw/input/meson.build
+++ b/hw/input/meson.build
@@ -1,5 +1,6 @@
 softmmu_ss.add(files('hid.c'))
 softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c'))
+softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
 softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c'))
 softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c'))
 softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c'))
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 09/19] configure: Test if $make actually exists
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (7 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 08/19] ads7846: moves from the hw/display folder to the hw/input folder Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 10/19] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Laurent Vivier
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Daniel P . Berrangé,
	qemu-trivial, Michael Tokarev, Laurent Vivier, Roman Bolshakov

From: Roman Bolshakov <r.bolshakov@yadro.com>

configure doesn't detect if $make is installed on the build host.
This is also helpful for hosts where an alias for make is used, i.e.
configure would fail if gmake is not present on macOS.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200825202755.50626-5-r.bolshakov@yadro.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index 3f823ed16374..c20ed86ff35b 100755
--- a/configure
+++ b/configure
@@ -1875,6 +1875,10 @@ if test -z "$python"
 then
     error_exit "Python not found. Use --python=/path/to/python"
 fi
+if ! has "$make"
+then
+    error_exit "GNU make ($make) not found"
+fi
 
 # Note that if the Python conditional here evaluates True we will exit
 # with status 1 which is a shell 'false' value.
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 10/19] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (8 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 09/19] configure: Test if $make actually exists Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file Laurent Vivier
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Li Qiang, Viktor Prutyanov, qemu-trivial,
	Michael Tokarev, Pan Nengyuan, Laurent Vivier, Euler Robot,
	Chen Qun

From: Pan Nengyuan <pannengyuan@huawei.com>

Missing g_error_free in QEMU_Elf_init() error path. Fix that.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201023061218.2080844-4-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 contrib/elf2dmp/qemu_elf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/elf2dmp/qemu_elf.c b/contrib/elf2dmp/qemu_elf.c
index 0db781658628..b601b6d7ba44 100644
--- a/contrib/elf2dmp/qemu_elf.c
+++ b/contrib/elf2dmp/qemu_elf.c
@@ -126,6 +126,7 @@ int QEMU_Elf_init(QEMU_Elf *qe, const char *filename)
     qe->gmf = g_mapped_file_new(filename, TRUE, &gerr);
     if (gerr) {
         eprintf("Failed to map ELF dump file \'%s\'\n", filename);
+        g_error_free(gerr);
         return 1;
     }
 
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (9 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 10/19] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 12/19] block/file-posix: fix a possible undefined behavior Laurent Vivier
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Li Qiang, Viktor Prutyanov, qemu-trivial,
	Michael Tokarev, Pan Nengyuan, Laurent Vivier, Euler Robot,
	Chen Qun

From: Pan Nengyuan <pannengyuan@huawei.com>

Missing g_error_free in pdb_init_from_file() error path. Fix that.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201023061218.2080844-5-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 contrib/elf2dmp/pdb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c
index a5bd40c99dca..b3a65470680d 100644
--- a/contrib/elf2dmp/pdb.c
+++ b/contrib/elf2dmp/pdb.c
@@ -285,6 +285,7 @@ int pdb_init_from_file(const char *name, struct pdb_reader *reader)
     reader->gmf = g_mapped_file_new(name, TRUE, &gerr);
     if (gerr) {
         eprintf("Failed to map PDB file \'%s\'\n", name);
+        g_error_free(gerr);
         return 1;
     }
 
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 12/19] block/file-posix: fix a possible undefined behavior
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (10 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 13/19] blockdev: Fix a memleak in drive_backup_prepare() Laurent Vivier
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Li Qiang, qemu-trivial, Michael Tokarev,
	Pan Nengyuan, Laurent Vivier, Euler Robot, Chen Qun,
	Stefano Garzarella

From: Pan Nengyuan <pannengyuan@huawei.com>

local_err is not initialized to NULL, it will cause a assert error as below:
qemu/util/error.c:59: error_setv: Assertion `*errp == NULL' failed.

Fixes: c6447510690
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Message-Id: <20201023061218.2080844-8-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 block/file-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/file-posix.c b/block/file-posix.c
index 83e2cc55306c..9804681d5c44 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2111,7 +2111,7 @@ static void raw_aio_attach_aio_context(BlockDriverState *bs,
 #endif
 #ifdef CONFIG_LINUX_IO_URING
     if (s->use_linux_io_uring) {
-        Error *local_err;
+        Error *local_err = NULL;
         if (!aio_setup_linux_io_uring(new_context, &local_err)) {
             error_reportf_err(local_err, "Unable to use linux io_uring, "
                                          "falling back to thread pool: ");
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 13/19] blockdev: Fix a memleak in drive_backup_prepare()
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (11 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 12/19] block/file-posix: fix a possible undefined behavior Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 14/19] configure: Remove the obsolete check for ifaddrs.h Laurent Vivier
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Li Qiang, qemu-trivial, Michael Tokarev,
	Pan Nengyuan, Laurent Vivier, Euler Robot, Chen Qun

From: Pan Nengyuan <pannengyuan@huawei.com>

'local_err' seems forgot to propagate in error path, it'll cause
a memleak. Fix it.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Message-Id: <20201023061218.2080844-7-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 blockdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/blockdev.c b/blockdev.c
index 412354b4b6ac..2431448c5d41 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1827,6 +1827,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
     if (set_backing_hd) {
         bdrv_set_backing_hd(target_bs, source, &local_err);
         if (local_err) {
+            error_propagate(errp, local_err);
             goto unref;
         }
     }
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 14/19] configure: Remove the obsolete check for ifaddrs.h
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (12 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 13/19] blockdev: Fix a memleak in drive_backup_prepare() Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 15/19] configure / meson: Move check for pty.h to meson.build Laurent Vivier
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Richard Henderson, Thomas Huth, Michael Tokarev,
	Laurent Vivier

From: Thomas Huth <thuth@redhat.com>

The code that used HAVE_IFADDRS_H has been removed in commit
0a27af918b ("io: use bind() to check for IPv4/6 availability"),
so we don't need this check in the configure script anymore.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201118171052.308191-2-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/configure b/configure
index c20ed86ff35b..1df5c848110e 100755
--- a/configure
+++ b/configure
@@ -3107,14 +3107,6 @@ EOF
     fi
 fi
 
-##########################################
-# getifaddrs (for tests/test-io-channel-socket )
-
-have_ifaddrs_h=yes
-if ! check_include "ifaddrs.h" ; then
-  have_ifaddrs_h=no
-fi
-
 #########################################
 # libdrm check
 have_drm_h=no
@@ -6219,9 +6211,6 @@ fi
 if test "$auth_pam" = "yes" ; then
     echo "CONFIG_AUTH_PAM=y" >> $config_host_mak
 fi
-if test "$have_ifaddrs_h" = "yes" ; then
-    echo "HAVE_IFADDRS_H=y" >> $config_host_mak
-fi
 if test "$have_drm_h" = "yes" ; then
   echo "HAVE_DRM_H=y" >> $config_host_mak
 fi
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 15/19] configure / meson: Move check for pty.h to meson.build
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (13 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 14/19] configure: Remove the obsolete check for ifaddrs.h Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 16/19] configure / meson: Move check for drm.h " Laurent Vivier
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, qemu-trivial, Michael Tokarev, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

This check can be done in a much shorter way in meson.build

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201118171052.308191-3-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure   | 9 ---------
 meson.build | 1 +
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/configure b/configure
index 1df5c848110e..39e61b275806 100755
--- a/configure
+++ b/configure
@@ -2332,12 +2332,6 @@ else
   l2tpv3=no
 fi
 
-if check_include "pty.h" ; then
-  pty_h=yes
-else
-  pty_h=no
-fi
-
 cat > $TMPC <<EOF
 #include <sys/mman.h>
 int main(int argc, char *argv[]) {
@@ -6687,9 +6681,6 @@ if test "$sheepdog" = "yes" ; then
   add_to deprecated_features "sheepdog"
   echo "CONFIG_SHEEPDOG=y" >> $config_host_mak
 fi
-if test "$pty_h" = "yes" ; then
-  echo "HAVE_PTY_H=y" >> $config_host_mak
-fi
 if test "$have_mlockall" = "yes" ; then
   echo "HAVE_MLOCKALL=y" >> $config_host_mak
 fi
diff --git a/meson.build b/meson.build
index f344b25955f9..ef053c98376d 100644
--- a/meson.build
+++ b/meson.build
@@ -836,6 +836,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]
 config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
 config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
 
+config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
 config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
 
 ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 16/19] configure / meson: Move check for drm.h to meson.build
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (14 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 15/19] configure / meson: Move check for pty.h to meson.build Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 17/19] configure / meson: Move check for sys/signal.h " Laurent Vivier
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, qemu-trivial, Michael Tokarev, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

This check can be done in a much shorter way in meson.build

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201118171052.308191-4-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure   | 10 ----------
 meson.build |  1 +
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/configure b/configure
index 39e61b275806..ec2fae9e09c0 100755
--- a/configure
+++ b/configure
@@ -3101,13 +3101,6 @@ EOF
     fi
 fi
 
-#########################################
-# libdrm check
-have_drm_h=no
-if check_include "libdrm/drm.h" ; then
-    have_drm_h=yes
-fi
-
 #########################################
 # sys/signal.h check
 have_sys_signal_h=no
@@ -6205,9 +6198,6 @@ fi
 if test "$auth_pam" = "yes" ; then
     echo "CONFIG_AUTH_PAM=y" >> $config_host_mak
 fi
-if test "$have_drm_h" = "yes" ; then
-  echo "HAVE_DRM_H=y" >> $config_host_mak
-fi
 if test "$have_broken_size_max" = "yes" ; then
     echo "HAVE_BROKEN_SIZE_MAX=y" >> $config_host_mak
 fi
diff --git a/meson.build b/meson.build
index ef053c98376d..fc7ae6f86826 100644
--- a/meson.build
+++ b/meson.build
@@ -836,6 +836,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]
 config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
 config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
 
+config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
 config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
 config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
 
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 17/19] configure / meson: Move check for sys/signal.h to meson.build
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (15 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 16/19] configure / meson: Move check for drm.h " Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 18/19] configure / meson: Move check for sys/kcov.h " Laurent Vivier
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, qemu-trivial, Michael Tokarev, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

This check can be done in a much shorter way in meson.build

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201118171052.308191-5-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure   | 10 ----------
 meson.build |  1 +
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/configure b/configure
index ec2fae9e09c0..4f0f9c99d3d2 100755
--- a/configure
+++ b/configure
@@ -3101,13 +3101,6 @@ EOF
     fi
 fi
 
-#########################################
-# sys/signal.h check
-have_sys_signal_h=no
-if check_include "sys/signal.h" ; then
-  have_sys_signal_h=yes
-fi
-
 ##########################################
 # VTE probe
 
@@ -6204,9 +6197,6 @@ fi
 if test "$have_openpty" = "yes" ; then
     echo "HAVE_OPENPTY=y" >> $config_host_mak
 fi
-if test "$have_sys_signal_h" = "yes" ; then
-    echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak
-fi
 
 # Work around a system header bug with some kernel/XFS header
 # versions where they both try to define 'struct fsxattr':
diff --git a/meson.build b/meson.build
index fc7ae6f86826..a790cc527cf9 100644
--- a/meson.build
+++ b/meson.build
@@ -839,6 +839,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]
 config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
 config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
 config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
+config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h'))
 
 ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
 arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 18/19] configure / meson: Move check for sys/kcov.h to meson.build
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (16 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 17/19] configure / meson: Move check for sys/signal.h " Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-14 15:57 ` [PULL 19/19] configure / meson: Move check for linux/btrfs.h " Laurent Vivier
  2020-12-15 12:03 ` [PULL 00/19] Trivial branch for 6.0 patches Peter Maydell
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, qemu-trivial, Michael Tokarev, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

This check can be done in a much shorter way in meson.build. And while
we're at it, rename the #define to HAVE_SYS_KCOV_H to match the other
HAVE_someheader_H symbols that we already have.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201118171052.308191-6-thuth@redhat.com>
[lv: s/signal/kcov/]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure            | 9 ---------
 linux-user/ioctls.h  | 2 +-
 linux-user/syscall.c | 2 +-
 meson.build          | 1 +
 4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index 4f0f9c99d3d2..6c13964b247a 100755
--- a/configure
+++ b/configure
@@ -4402,12 +4402,6 @@ if compile_prog "" "" ; then
   syncfs=yes
 fi
 
-# check for kcov support (kernel must be 4.4+, compiled with certain options)
-kcov=no
-if check_include sys/kcov.h ; then
-    kcov=yes
-fi
-
 # check for btrfs filesystem support (kernel must be 3.9+)
 btrfs=no
 if check_include linux/btrfs.h ; then
@@ -6112,9 +6106,6 @@ fi
 if test "$syncfs" = "yes" ; then
   echo "CONFIG_SYNCFS=y" >> $config_host_mak
 fi
-if test "$kcov" = "yes" ; then
-  echo "CONFIG_KCOV=y" >> $config_host_mak
-fi
 if test "$btrfs" = "yes" ; then
   echo "CONFIG_BTRFS=y" >> $config_host_mak
 fi
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 585874f090ff..8efb4d38c014 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -715,7 +715,7 @@
   IOCTL_IGNORE(TIOCSTOP)
 #endif
 
-#ifdef CONFIG_KCOV
+#ifdef HAVE_SYS_KCOV_H
   IOCTL(KCOV_ENABLE, 0, TYPE_NULL)
   IOCTL(KCOV_DISABLE, 0, TYPE_NULL)
   IOCTL(KCOV_INIT_TRACE, IOC_R, TYPE_ULONG)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 27adee908ebc..063130be048c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -73,7 +73,7 @@
 #ifdef CONFIG_SENDFILE
 #include <sys/sendfile.h>
 #endif
-#ifdef CONFIG_KCOV
+#ifdef HAVE_SYS_KCOV_H
 #include <sys/kcov.h>
 #endif
 
diff --git a/meson.build b/meson.build
index a790cc527cf9..04cdea75dd50 100644
--- a/meson.build
+++ b/meson.build
@@ -839,6 +839,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]
 config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
 config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
 config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
+config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h'))
 config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h'))
 
 ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PULL 19/19] configure / meson: Move check for linux/btrfs.h to meson.build
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (17 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 18/19] configure / meson: Move check for sys/kcov.h " Laurent Vivier
@ 2020-12-14 15:57 ` Laurent Vivier
  2020-12-15 12:03 ` [PULL 00/19] Trivial branch for 6.0 patches Peter Maydell
  19 siblings, 0 replies; 21+ messages in thread
From: Laurent Vivier @ 2020-12-14 15:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, qemu-trivial, Michael Tokarev, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

This check can be done in a much shorter way in meson.build. And while
we're at it, rename the #define to HAVE_BTRFS_H to match the other
HAVE_someheader_H symbols that we already have.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201118171052.308191-7-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure                 | 9 ---------
 linux-user/syscall.c      | 2 +-
 linux-user/syscall_defs.h | 2 +-
 meson.build               | 1 +
 4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index 6c13964b247a..cb21108d34c3 100755
--- a/configure
+++ b/configure
@@ -4402,12 +4402,6 @@ if compile_prog "" "" ; then
   syncfs=yes
 fi
 
-# check for btrfs filesystem support (kernel must be 3.9+)
-btrfs=no
-if check_include linux/btrfs.h ; then
-    btrfs=yes
-fi
-
 # Search for bswap_32 function
 byteswap_h=no
 cat > $TMPC << EOF
@@ -6106,9 +6100,6 @@ fi
 if test "$syncfs" = "yes" ; then
   echo "CONFIG_SYNCFS=y" >> $config_host_mak
 fi
-if test "$btrfs" = "yes" ; then
-  echo "CONFIG_BTRFS=y" >> $config_host_mak
-fi
 if test "$inotify" = "yes" ; then
   echo "CONFIG_INOTIFY=y" >> $config_host_mak
 fi
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 063130be048c..7bf99beb1814 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -112,7 +112,7 @@
 #include <linux/if_alg.h>
 #include <linux/rtc.h>
 #include <sound/asound.h>
-#ifdef CONFIG_BTRFS
+#ifdef HAVE_BTRFS_H
 #include <linux/btrfs.h>
 #endif
 #ifdef HAVE_DRM_H
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index cabbfb762dd9..b934d0b60676 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1006,7 +1006,7 @@ struct target_rtc_pll_info {
 #define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int)
 
 /* btrfs ioctls */
-#ifdef CONFIG_BTRFS
+#ifdef HAVE_BTRFS_H
 #define TARGET_BTRFS_IOC_SNAP_CREATE            TARGET_IOWU(BTRFS_IOCTL_MAGIC, 1)
 #define TARGET_BTRFS_IOC_SCAN_DEV               TARGET_IOWU(BTRFS_IOCTL_MAGIC, 4)
 #define TARGET_BTRFS_IOC_FORGET_DEV             TARGET_IOWU(BTRFS_IOCTL_MAGIC, 5)
diff --git a/meson.build b/meson.build
index 04cdea75dd50..fba6413056a3 100644
--- a/meson.build
+++ b/meson.build
@@ -836,6 +836,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]
 config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
 config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
 
+config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h'))
 config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
 config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
 config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PULL 00/19] Trivial branch for 6.0 patches
  2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
                   ` (18 preceding siblings ...)
  2020-12-14 15:57 ` [PULL 19/19] configure / meson: Move check for linux/btrfs.h " Laurent Vivier
@ 2020-12-15 12:03 ` Peter Maydell
  19 siblings, 0 replies; 21+ messages in thread
From: Peter Maydell @ 2020-12-15 12:03 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: QEMU Trivial, Michael Tokarev, QEMU Developers

On Mon, 14 Dec 2020 at 16:06, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit 17584289af1aaa72c932e7e47c25d583b329dc45:
>
>   Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-6.0-pull-request=
> ' into staging (2020-12-12 18:33:46 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu.git tags/trivial-branch-for-6.0-pull-request
>
> for you to fetch changes up to 48f670ecfcbe92f63475c516aefb6e217f469bbf:
>
>   configure / meson: Move check for linux/btrfs.h to meson.build (2020-12-13 =
> 23:56:16 +0100)
>
> ----------------------------------------------------------------
> Pull request trivial-patches 20201214
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-12-15 12:05 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 15:57 [PULL 00/19] Trivial branch for 6.0 patches Laurent Vivier
2020-12-14 15:57 ` [PULL 01/19] target/i386: tracing: format length values as hex Laurent Vivier
2020-12-14 15:57 ` [PULL 02/19] qemu-options.hx: Fix minor issues in icount documentation Laurent Vivier
2020-12-14 15:57 ` [PULL 03/19] MAINTAINERS: update my email address Laurent Vivier
2020-12-14 15:57 ` [PULL 04/19] hw/xen: Don't use '#' flag of printf format Laurent Vivier
2020-12-14 15:57 ` [PULL 05/19] hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition Laurent Vivier
2020-12-14 15:57 ` [PULL 06/19] fsdev: open brace '{' following struct go on the same line Laurent Vivier
2020-12-14 15:57 ` [PULL 07/19] CODING_STYLE.rst: Be less strict about 80 character limit Laurent Vivier
2020-12-14 15:57 ` [PULL 08/19] ads7846: moves from the hw/display folder to the hw/input folder Laurent Vivier
2020-12-14 15:57 ` [PULL 09/19] configure: Test if $make actually exists Laurent Vivier
2020-12-14 15:57 ` [PULL 10/19] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Laurent Vivier
2020-12-14 15:57 ` [PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file Laurent Vivier
2020-12-14 15:57 ` [PULL 12/19] block/file-posix: fix a possible undefined behavior Laurent Vivier
2020-12-14 15:57 ` [PULL 13/19] blockdev: Fix a memleak in drive_backup_prepare() Laurent Vivier
2020-12-14 15:57 ` [PULL 14/19] configure: Remove the obsolete check for ifaddrs.h Laurent Vivier
2020-12-14 15:57 ` [PULL 15/19] configure / meson: Move check for pty.h to meson.build Laurent Vivier
2020-12-14 15:57 ` [PULL 16/19] configure / meson: Move check for drm.h " Laurent Vivier
2020-12-14 15:57 ` [PULL 17/19] configure / meson: Move check for sys/signal.h " Laurent Vivier
2020-12-14 15:57 ` [PULL 18/19] configure / meson: Move check for sys/kcov.h " Laurent Vivier
2020-12-14 15:57 ` [PULL 19/19] configure / meson: Move check for linux/btrfs.h " Laurent Vivier
2020-12-15 12:03 ` [PULL 00/19] Trivial branch for 6.0 patches Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.