All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator)
@ 2021-05-04 13:31 Paolo Bonzini
  2021-05-04 13:31 ` [PULL v2 02/11] Add NVMM accelerator: configure and build logic Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-05-04 13:31 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit e93d8bcf9dbd5b8dd3b9ddbb1ece6a37e608f300:

  Merge remote-tracking branch 'remotes/philmd/tags/mips-20210502' into staging (2021-05-03 12:05:12 +0100)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 9ba5db49aea924175b8f23edd388fa2452206d20:

  glib-compat: accept G_TEST_SLOW environment variable (2021-05-04 14:15:35 +0200)

v1->v2: check for new-enough NetBSD, add another 0.57 preparation patch

----------------------------------------------------------------
* NetBSD NVMM support
* RateLimit mutex
* Prepare for Meson 0.57 upgrade

----------------------------------------------------------------
Joelle van Dyne (1):
      slirp: add configure option to disable smbd

Paolo Bonzini (6):
      oslib-win32: do not rely on macro to get redefined function name
      ratelimit: protect with a mutex
      configure: reindent meson invocation
      configure: handle meson options that have changed type
      gitlab-ci: use --meson=internal for CFI jobs
      glib-compat: accept G_TEST_SLOW environment variable

Reinoud Zandijk (4):
      Add NVMM accelerator: configure and build logic
      Add NVMM accelerator: x86 CPU support
      Add NVMM accelerator: acceleration enlightenments
      Add NVMM Accelerator: add maintainers for NetBSD/NVMM

 .gitlab-ci.yml                    |   10 +-
 MAINTAINERS                       |   11 +
 accel/Kconfig                     |    3 +
 block/block-copy.c                |    2 +
 blockjob.c                        |    3 +
 configure                         |  119 ++--
 include/glib-compat.h             |   17 +
 include/qemu/ratelimit.h          |   14 +
 include/sysemu/hw_accel.h         |    1 +
 include/sysemu/nvmm.h             |   26 +
 meson.build                       |   16 +-
 meson_options.txt                 |    2 +
 net/slirp.c                       |   16 +-
 qemu-options.hx                   |    8 +-
 target/i386/helper.c              |    2 +-
 target/i386/meson.build           |    1 +
 target/i386/nvmm/meson.build      |    8 +
 target/i386/nvmm/nvmm-accel-ops.c |  111 ++++
 target/i386/nvmm/nvmm-accel-ops.h |   24 +
 target/i386/nvmm/nvmm-all.c       | 1226 +++++++++++++++++++++++++++++++++++++
 util/oslib-win32.c                |    2 +-
 21 files changed, 1562 insertions(+), 60 deletions(-)
 create mode 100644 include/sysemu/nvmm.h
 create mode 100644 target/i386/nvmm/meson.build
 create mode 100644 target/i386/nvmm/nvmm-accel-ops.c
 create mode 100644 target/i386/nvmm/nvmm-accel-ops.h
 create mode 100644 target/i386/nvmm/nvmm-all.c
-- 
2.31.1



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

* [PULL v2 02/11] Add NVMM accelerator: configure and build logic
  2021-05-04 13:31 [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator) Paolo Bonzini
@ 2021-05-04 13:31 ` Paolo Bonzini
  2021-05-04 13:31 ` [PULL v2 11/11] glib-compat: accept G_TEST_SLOW environment variable Paolo Bonzini
  2021-05-10 11:32 ` [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator) Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-05-04 13:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kamil Rytarowski, Reinoud Zandijk

From: Reinoud Zandijk <reinoud@NetBSD.org>

Signed-off-by: Kamil Rytarowski <kamil@NetBSD.org>
Signed-off-by: Reinoud Zandijk <reinoud@NetBSD.org>

Message-Id: <20210402202535.11550-2-reinoud@NetBSD.org>
[Check for nvmm_vcpu_stop. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/Kconfig     |  3 +++
 configure         |  8 +++++++-
 meson.build       | 14 ++++++++++++++
 meson_options.txt |  2 ++
 qemu-options.hx   |  8 ++++----
 5 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/accel/Kconfig b/accel/Kconfig
index 461104c771..8bdedb7d15 100644
--- a/accel/Kconfig
+++ b/accel/Kconfig
@@ -1,6 +1,9 @@
 config WHPX
     bool
 
+config NVMM
+    bool
+
 config HAX
     bool
 
diff --git a/configure b/configure
index 4f374b4889..268460d63d 100755
--- a/configure
+++ b/configure
@@ -352,6 +352,7 @@ kvm="auto"
 hax="auto"
 hvf="auto"
 whpx="auto"
+nvmm="auto"
 rdma="$default_feature"
 pvrdma="$default_feature"
 gprof="no"
@@ -1107,6 +1108,10 @@ for opt do
   ;;
   --enable-hvf) hvf="enabled"
   ;;
+  --disable-nvmm) nvmm="disabled"
+  ;;
+  --enable-nvmm) nvmm="enabled"
+  ;;
   --disable-whpx) whpx="disabled"
   ;;
   --enable-whpx) whpx="enabled"
@@ -1848,6 +1853,7 @@ disabled with --disable-FEATURE, default is enabled if available
   kvm             KVM acceleration support
   hax             HAX acceleration support
   hvf             Hypervisor.framework acceleration support
+  nvmm            NVMM acceleration support
   whpx            Windows Hypervisor Platform acceleration support
   rdma            Enable RDMA-based migration
   pvrdma          Enable PVRDMA support
@@ -6410,7 +6416,7 @@ NINJA=$ninja $meson setup \
         -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
         -Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug \
         -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
-        -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \
+        -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf -Dnvmm=$nvmm \
         -Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \
         -Dcocoa=$cocoa -Dgtk=$gtk -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
         -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
diff --git a/meson.build b/meson.build
index 1ffdc9e6c4..2829ed2b86 100644
--- a/meson.build
+++ b/meson.build
@@ -87,6 +87,7 @@ if cpu in ['x86', 'x86_64']
   accelerator_targets += {
     'CONFIG_HAX': ['i386-softmmu', 'x86_64-softmmu'],
     'CONFIG_HVF': ['x86_64-softmmu'],
+    'CONFIG_NVMM': ['i386-softmmu', 'x86_64-softmmu'],
     'CONFIG_WHPX': ['i386-softmmu', 'x86_64-softmmu'],
   }
 endif
@@ -170,6 +171,7 @@ version_res = []
 coref = []
 iokit = []
 emulator_link_args = []
+nvmm =not_found
 hvf = not_found
 if targetos == 'windows'
   socket = cc.find_library('ws2_32')
@@ -227,6 +229,14 @@ if not get_option('hax').disabled()
     accelerators += 'CONFIG_HAX'
   endif
 endif
+if targetos == 'netbsd'
+  if cc.has_header_symbol('nvmm.h', 'nvmm_cpu_stop', required: get_option('nvmm'))
+    nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
+  endif
+  if nvmm.found()
+    accelerators += 'CONFIG_NVMM'
+  endif
+endif
 
 tcg_arch = config_host['ARCH']
 if not get_option('tcg').disabled()
@@ -270,6 +280,9 @@ endif
 if 'CONFIG_HVF' not in accelerators and get_option('hvf').enabled()
   error('HVF not available on this platform')
 endif
+if 'CONFIG_NVMM' not in accelerators and get_option('nvmm').enabled()
+  error('NVMM not available on this platform')
+endif
 if 'CONFIG_WHPX' not in accelerators and get_option('whpx').enabled()
   error('WHPX not available on this platform')
 endif
@@ -2581,6 +2594,7 @@ if have_system
   summary_info += {'HAX support':       config_all.has_key('CONFIG_HAX')}
   summary_info += {'HVF support':       config_all.has_key('CONFIG_HVF')}
   summary_info += {'WHPX support':      config_all.has_key('CONFIG_WHPX')}
+  summary_info += {'NVMM support':      config_all.has_key('CONFIG_NVMM')}
   summary_info += {'Xen support':       config_host.has_key('CONFIG_XEN_BACKEND')}
   if config_host.has_key('CONFIG_XEN_BACKEND')
     summary_info += {'xen ctrl version':  config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']}
diff --git a/meson_options.txt b/meson_options.txt
index 9734019995..91034420a1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -33,6 +33,8 @@ option('whpx', type: 'feature', value: 'auto',
        description: 'WHPX acceleration support')
 option('hvf', type: 'feature', value: 'auto',
        description: 'HVF acceleration support')
+option('nvmm', type: 'feature', value: 'auto',
+       description: 'NVMM acceleration support')
 option('xen', type: 'feature', value: 'auto',
        description: 'Xen backend support')
 option('xen_pci_passthrough', type: 'feature', value: 'auto',
diff --git a/qemu-options.hx b/qemu-options.hx
index fd21002bd6..dadf11fae9 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -26,7 +26,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
     "-machine [type=]name[,prop[=value][,...]]\n"
     "                selects emulated machine ('-machine help' for list)\n"
     "                property accel=accel1[:accel2[:...]] selects accelerator\n"
-    "                supported accelerators are kvm, xen, hax, hvf, whpx or tcg (default: tcg)\n"
+    "                supported accelerators are kvm, xen, hax, hvf, nvmm, whpx or tcg (default: tcg)\n"
     "                vmport=on|off|auto controls emulation of vmport (default: auto)\n"
     "                dump-guest-core=on|off include guest memory in a core dump (default=on)\n"
     "                mem-merge=on|off controls memory merge support (default: on)\n"
@@ -58,7 +58,7 @@ SRST
 
     ``accel=accels1[:accels2[:...]]``
         This is used to enable an accelerator. Depending on the target
-        architecture, kvm, xen, hax, hvf, whpx or tcg can be available.
+        architecture, kvm, xen, hax, hvf, nvmm, whpx or tcg can be available.
         By default, tcg is used. If there is more than one accelerator
         specified, the next one is used if the previous one fails to
         initialize.
@@ -135,7 +135,7 @@ ERST
 
 DEF("accel", HAS_ARG, QEMU_OPTION_accel,
     "-accel [accel=]accelerator[,prop[=value][,...]]\n"
-    "                select accelerator (kvm, xen, hax, hvf, whpx or tcg; use 'help' for a list)\n"
+    "                select accelerator (kvm, xen, hax, hvf, nvmm, whpx or tcg; use 'help' for a list)\n"
     "                igd-passthru=on|off (enable Xen integrated Intel graphics passthrough, default=off)\n"
     "                kernel-irqchip=on|off|split controls accelerated irqchip support (default=on)\n"
     "                kvm-shadow-mem=size of KVM shadow MMU in bytes\n"
@@ -145,7 +145,7 @@ DEF("accel", HAS_ARG, QEMU_OPTION_accel,
 SRST
 ``-accel name[,prop=value[,...]]``
     This is used to enable an accelerator. Depending on the target
-    architecture, kvm, xen, hax, hvf, whpx or tcg can be available. By
+    architecture, kvm, xen, hax, hvf, nvmm, whpx or tcg can be available. By
     default, tcg is used. If there is more than one accelerator
     specified, the next one is used if the previous one fails to
     initialize.
-- 
2.31.1




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

* [PULL v2 11/11] glib-compat: accept G_TEST_SLOW environment variable
  2021-05-04 13:31 [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator) Paolo Bonzini
  2021-05-04 13:31 ` [PULL v2 02/11] Add NVMM accelerator: configure and build logic Paolo Bonzini
@ 2021-05-04 13:31 ` Paolo Bonzini
  2021-05-10 11:32 ` [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator) Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-05-04 13:31 UTC (permalink / raw)
  To: qemu-devel

Provide an alternative way to pass the desired thoroughness of the
test.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/glib-compat.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/glib-compat.h b/include/glib-compat.h
index 695a96f7ea..4542e920d5 100644
--- a/include/glib-compat.h
+++ b/include/glib-compat.h
@@ -100,6 +100,23 @@ g_unix_get_passwd_entry_qemu(const gchar *user_name, GError **error)
 }
 #endif /* G_OS_UNIX */
 
+static inline bool
+qemu_g_test_slow(void)
+{
+    static int cached = -1;
+    if (cached == -1) {
+        cached = g_test_slow() || getenv("G_TEST_SLOW") != NULL;
+    }
+    return cached;
+}
+
+#undef g_test_slow
+#undef g_test_thorough
+#undef g_test_quick
+#define g_test_slow() qemu_g_test_slow()
+#define g_test_thorough() qemu_g_test_slow()
+#define g_test_quick() (!qemu_g_test_slow())
+
 #pragma GCC diagnostic pop
 
 #endif
-- 
2.31.1



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

* Re: [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator)
  2021-05-04 13:31 [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator) Paolo Bonzini
  2021-05-04 13:31 ` [PULL v2 02/11] Add NVMM accelerator: configure and build logic Paolo Bonzini
  2021-05-04 13:31 ` [PULL v2 11/11] glib-compat: accept G_TEST_SLOW environment variable Paolo Bonzini
@ 2021-05-10 11:32 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2021-05-10 11:32 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Tue, 4 May 2021 at 14:33, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit e93d8bcf9dbd5b8dd3b9ddbb1ece6a37e608f300:
>
>   Merge remote-tracking branch 'remotes/philmd/tags/mips-20210502' into staging (2021-05-03 12:05:12 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 9ba5db49aea924175b8f23edd388fa2452206d20:
>
>   glib-compat: accept G_TEST_SLOW environment variable (2021-05-04 14:15:35 +0200)
>
> v1->v2: check for new-enough NetBSD, add another 0.57 preparation patch
>
> ----------------------------------------------------------------
> * NetBSD NVMM support
> * RateLimit mutex
> * Prepare for Meson 0.57 upgrade
>


Applied, thanks.

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

-- PMM


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

end of thread, other threads:[~2021-05-10 11:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 13:31 [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator) Paolo Bonzini
2021-05-04 13:31 ` [PULL v2 02/11] Add NVMM accelerator: configure and build logic Paolo Bonzini
2021-05-04 13:31 ` [PULL v2 11/11] glib-compat: accept G_TEST_SLOW environment variable Paolo Bonzini
2021-05-10 11:32 ` [PULL v2 00/11] Misc patches for 2021-04-30 (incl. NVMM accelerator) 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.