From patchwork Mon Oct 23 17:24:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej S. Szmigiero" X-Patchwork-Id: 1853910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SDhtP2CSwz26jS for ; Tue, 24 Oct 2023 04:26:05 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quygE-0005jy-TD; Mon, 23 Oct 2023 13:25:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quyg4-0005hp-Cy for qemu-devel@nongnu.org; Mon, 23 Oct 2023 13:25:24 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quyg2-0007Yr-Dv for qemu-devel@nongnu.org; Mon, 23 Oct 2023 13:25:20 -0400 Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1quyfg-0002q3-O8; Mon, 23 Oct 2023 19:24:56 +0200 From: "Maciej S. Szmigiero" To: Paolo Bonzini , Richard Henderson , Eduardo Habkost , David Hildenbrand Cc: "Michael S . Tsirkin" , Marcel Apfelbaum , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , Eric Blake , Markus Armbruster , qemu-devel@nongnu.org Subject: =?utf-8?q?=5BPATCH_v8_0/9=5D_Hyper-V_Dynamic_Memory_Protocol_driver?= =?utf-8?q?_=28hv-balloon_=F0=9F=8E=88=EF=B8=8F=29?= Date: Mon, 23 Oct 2023 19:24:26 +0200 Message-ID: X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Received-SPF: pass client-ip=37.28.154.113; envelope-from=mail@maciej.szmigiero.name; helo=vps-vb.mhejs.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Maciej S. Szmigiero" This is a continuation of the v7 of the patch series located here: https://lore.kernel.org/qemu-devel/cover.1693240836.git.maciej.szmigiero@oracle.com/ Changes from v7: * Rebase onto the current QEMU git master now that the David's memslots patch series was merged there. * Split out the hot-add part of the driver to a separate patch. * Make "query-hv-balloon-status-report" only return a GenericError. * Remove "@data" parameter description from "HV_BALLOON_STATUS_REPORT" qapi since the build system complains about it. * Reformat qapi descriptions according to received review comments. * Collect David's and Markus' "Reviewed-by" and "Acked-by" tags. * Fix a memslot name formatting issue. * Add myself to MAINTAINERS. David Hildenbrand (2): memory-device: Support empty memory devices memory-device: Drop size alignment check Maciej S. Szmigiero (7): Add Hyper-V Dynamic Memory Protocol definitions Add Hyper-V Dynamic Memory Protocol driver (hv-balloon) base Add Hyper-V Dynamic Memory Protocol driver (hv-balloon) hot-add support qapi: Add query-memory-devices support to hv-balloon qapi: Add HV_BALLOON_STATUS_REPORT event and its QMP query command hw/i386/pc: Support hv-balloon MAINTAINERS: Add an entry for Hyper-V Dynamic Memory Protocol Kconfig.host | 3 + MAINTAINERS | 8 + hw/core/machine-hmp-cmds.c | 15 + hw/hyperv/Kconfig | 10 + hw/hyperv/hv-balloon-internal.h | 33 + hw/hyperv/hv-balloon-our_range_memslots.c | 201 +++ hw/hyperv/hv-balloon-our_range_memslots.h | 110 ++ hw/hyperv/hv-balloon-page_range_tree.c | 228 +++ hw/hyperv/hv-balloon-page_range_tree.h | 118 ++ hw/hyperv/hv-balloon.c | 1766 +++++++++++++++++++++ hw/hyperv/meson.build | 1 + hw/hyperv/trace-events | 18 + hw/i386/Kconfig | 1 + hw/i386/pc.c | 22 + hw/mem/memory-device.c | 49 +- include/hw/hyperv/dynmem-proto.h | 423 +++++ include/hw/hyperv/hv-balloon.h | 18 + include/hw/mem/memory-device.h | 7 +- meson.build | 28 +- meson_options.txt | 2 + monitor/monitor.c | 1 + qapi/machine.json | 101 +- scripts/meson-buildoptions.sh | 3 + 23 files changed, 3153 insertions(+), 13 deletions(-) create mode 100644 hw/hyperv/hv-balloon-internal.h create mode 100644 hw/hyperv/hv-balloon-our_range_memslots.c create mode 100644 hw/hyperv/hv-balloon-our_range_memslots.h create mode 100644 hw/hyperv/hv-balloon-page_range_tree.c create mode 100644 hw/hyperv/hv-balloon-page_range_tree.h create mode 100644 hw/hyperv/hv-balloon.c create mode 100644 include/hw/hyperv/dynmem-proto.h create mode 100644 include/hw/hyperv/hv-balloon.h Acked-by: David Hildenbrand