From patchwork Tue Jan 7 12:53:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Rytarowski X-Patchwork-Id: 1218786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="jvgiLs+F"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47sY6m5Wzfz9sR1 for ; Wed, 8 Jan 2020 00:26:08 +1100 (AEDT) Received: from localhost ([::1]:48618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioos0-0000sH-Gp for incoming@patchwork.ozlabs.org; Tue, 07 Jan 2020 08:26:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35845) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iooNm-0003SW-R8 for qemu-devel@nongnu.org; Tue, 07 Jan 2020 07:54:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iooNl-0000rs-DY for qemu-devel@nongnu.org; Tue, 07 Jan 2020 07:54:50 -0500 Received: from mout.gmx.net ([212.227.15.19]:49057) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iooNl-0000pp-0V for qemu-devel@nongnu.org; Tue, 07 Jan 2020 07:54:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578401683; bh=PcERl262TeVj2M3QgBH1unkb+D/qsJJsIchSNao9H0c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=jvgiLs+F50gqxoO57T3Iz+GFZ5HuS/9Kg5W4OnjpPwH3qYQQryFCTbsPhX4pbnGO6 1Kz6ncZUZALgIcqiGj2Wf7sbm80dL8CDuQeThAI4HnLfAvQ3/8HotxoFDzhERQUt8M 9HrGhXW8Uf5r2OqeicDfyZfvaL9G4ciFhxYHsq5A= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([89.71.135.231]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MF3He-1ivLpb0lIW-00FUYT; Tue, 07 Jan 2020 13:54:43 +0100 From: Kamil Rytarowski To: qemu-devel@nongnu.org Subject: [PATCH 0/4] Implements the NetBSD Virtual Machine Monitor accelerator Date: Tue, 7 Jan 2020 13:53:57 +0100 Message-Id: <20200107125401.18126-1-n54@gmx.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:kv7PXygsM+7QKxU9FVA5sp91WWBmYwOxMy5J7gASuxvYuvEvFDi XtBudhWJ0D33OOUiW++Rqdfk/4bZgDOGtsuSFkB/NDk1uS0m5HTLOqzJvhODUba2urq/Sum V6eTMGco2CQIEgnHjLHWDGzOS3X1RKzy9bn8OBon7dl9+j86ZeRJ+pzeVf3OlpW8gpw/0lG ObR53H1LL7qzpGEVsJqOA== X-UI-Out-Filterresults: notjunk:1; V03:K0:8YuVoUIGsJw=:7SHs1S6EMxEVO8T9ZVCViX ZnX8y3stAwGjOJd/HohrFbwWmybUZ9UdEWDvj1V6wLVHDOkWUjz6Xu3vFYX0ylDbcMh5dkWaa 1No5ughaBBnXjIDJbZLA6lBLnCmTP8ZJk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7rZmPLo9ltz5eeLwWvLxhCr9+RLYrFz3xEhK+gpCTqmUAxNhd/Ze/DKgAOj5yZzLICzN1 cC45QGbHEKvMMA21bNH2wP+fFzZpHXqagZNXdSg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.19 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, Kamil Rytarowski , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Hello QEMU Community! Over the past year the NetBSD team has been working hard on a new user-mode API for our hypervisor that will be released as part of the upcoming NetBSD 9.0. This new API adds user-mode capabilities to create and manage virtual machines, configure memory mappings for guest machines, and create and control execution of virtual processors. With this new API we are now able to bring our hypervisor to the QEMU community! The following patches implement the NetBSD Virtual Machine Monitor accelerator (NVMM) for QEMU on NetBSD 9.0 and newer hosts. When compiling QEMU for x86_64 passing the --enable-nvmm flag will compile the accelerator for use. At runtime using the '-accel nvmm' should see a significant performance improvement over emulation, much like when using 'hax' on NetBSD. The documentation for this new API is visible at https://man.netbsd.org under the libnvmm(3) and nvmm(4) pages. NVMM was designed and implemented by Maxime Villard. Thank you for your feedback. Maxime Villard (4): Add the NVMM vcpu API Add the NetBSD Virtual Machine Monitor accelerator. Introduce the NVMM impl Add the NVMM acceleration enlightenments accel/stubs/Makefile.objs | 1 + accel/stubs/nvmm-stub.c | 43 ++ configure | 36 ++ cpus.c | 58 ++ include/sysemu/hw_accel.h | 14 + include/sysemu/nvmm.h | 35 ++ qemu-options.hx | 4 +- target/i386/Makefile.objs | 1 + target/i386/helper.c | 2 +- target/i386/nvmm-all.c | 1222 +++++++++++++++++++++++++++++++++++++ 10 files changed, 1413 insertions(+), 3 deletions(-) create mode 100644 accel/stubs/nvmm-stub.c create mode 100644 include/sysemu/nvmm.h create mode 100644 target/i386/nvmm-all.c --- 2.24.0