From patchwork Tue Dec 13 11:17:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 633503 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3014210pvb; Tue, 13 Dec 2022 03:23:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf71ShxZLcFwLr1gVFKDr/wjfedZ10M/xNUTG/ZSIz7+7dUHaGzwsNmdhILZinIMZEipSEmU X-Received: by 2002:a0c:ab59:0:b0:4c6:ea60:60ab with SMTP id i25-20020a0cab59000000b004c6ea6060abmr29968467qvb.32.1670930591228; Tue, 13 Dec 2022 03:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670930591; cv=none; d=google.com; s=arc-20160816; b=J5K6X7ZQJ5j7lB3Q5qTcD44jVejbLy4/NVu3HV/1jIPrqictMi1b5vea0cwOhVOGgt VvvBO4lY79cyrEaY80M9WOAeDvegcG7aNIBh8437j5FPZkUG4RMbG7v17SD+P/lBePgA rfBdOzgIBi3kfQB+pmYONBWQCOXY2SQdMdtBad2WE+puV7hT+nmq00D4AgPlvrYJfuTN VX4RdeGQ/7nx7swqtzdEPFRoToOO+PRYRFy7DecaA76y8o8bJ6Z2EApuGG91CkccdUKA jBGV5Wswe+WVFeBmOLnFYKDcYaLHUE9bop722f+wXFKFTeGFngpWqu7oFKmt9wVt2ly2 pRww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=LRz/PChng4kYvY8iimXYL9efkHh1kt02Yg4D6mTZQ/Y=; b=ER84Slud8PKhAyNgGbG8d3UGNvvvUlzFf87YcsaX04D0phRvTqdliUSVX/ERgNhaWk b1gDQogHUK4yZIu+tRspiSFBQWAhi964ji0cp3S6X70XZ+sP/ghxV+4zBAvneoLpKjBB GOP6QsGriMAMXhv55CC/A0x41dImxS5uAYl97Smzane9w6c9yp81r3sQVaBHLMqsP/Dh OSwSDr/g9iLSjuNDW1CDn4lP2+3Y+9Kwowds78UG2MrwiMYyK7Gys/yz16/eNCv7V8Go +BhhGzCIX8MP0dAKXdUbAgCPzoRPg0IeaQdz/KE9E6IQ9JvRuLtPAJSI71Lfs7/DCTJ/ dzhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CIE7C5sC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bp7-20020a05620a458700b006fbf7a09e45si2314716qkb.442.2022.12.13.03.23.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Dec 2022 03:23:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CIE7C5sC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p53Hv-0004G8-Di; Tue, 13 Dec 2022 06:17:31 -0500 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 1p53Hf-0004EJ-Uo for qemu-devel@nongnu.org; Tue, 13 Dec 2022 06:17:17 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p53Hc-0002Lr-Bq for qemu-devel@nongnu.org; Tue, 13 Dec 2022 06:17:13 -0500 Received: by mail-wm1-x332.google.com with SMTP id k22-20020a05600c1c9600b003d1ee3a6289so7686433wms.2 for ; Tue, 13 Dec 2022 03:17:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LRz/PChng4kYvY8iimXYL9efkHh1kt02Yg4D6mTZQ/Y=; b=CIE7C5sCmH9BmxyaaMBWWaZurfVXvP1eSrlgJkG9OcDy/1S1bUyksWF569KAwCf4U6 9FACWkIj9WzfgM5kpVLVrNYwt/aZsBDTInBuonKM91XD8BhoQ8k1aFl5a+Ja9lFo4LFP JS+mksY3lS6bKB8VLRpkGPBT0C4H2ooeOA5WiCPU/lgm6KMxiLz+vS1bxCCR2KGxJVMT BNwipI2S+lPbFfuNBp9Izb1iNeDlO+Vv/8285bhk8fC+5i6Bdq2F3S9ZQJYOxULGzkFC 82kI6nsbG55RFYibQHaCFDvjCnnmRWqMYk6ZEDll9gzdJGXUJQBoP3ZiAtyboWLRosMM vYpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LRz/PChng4kYvY8iimXYL9efkHh1kt02Yg4D6mTZQ/Y=; b=UnSumek4TXl2uhbEt9PCEM8bH/Mk0ohOf8FcfyJRnfcBikdatfKbk+I938azBQb/2h vaSu06knNsnqsJ1zh0G5+VgC28oAz7fwCNWrCW1BAAIMzWu6pUNWk+s1dA/88wFsiePX dGwlgGujTCpvsh7LJ3UlVJy9ol5qHzCViz1sBcLgSk0ZNNzkhuLKTZ2WwxubaMZvlP7z /3wLgbZDJw6dfw8ytOqeku30RsJKjZUvuNOqs1Nk7asAegIWscd7UodS2mtYRwvwQxe2 7JMhhcORjPAx0Fs6JoLEwHl6InIUbXkUoUPDRkbEp56JEDml0++kCIf33crZhkG0czXz hQvQ== X-Gm-Message-State: ANoB5pm3h8rU37JBLH2EH3amHC7GcOFgxTmQd4iNwppJ8B6cm/sOODST YEm5rktNOUp7V2hWu80zpir1TaOUJzV2yfFiTXs= X-Received: by 2002:a05:600c:4e14:b0:3d0:7477:bc89 with SMTP id b20-20020a05600c4e1400b003d07477bc89mr15811767wmq.22.1670930229955; Tue, 13 Dec 2022 03:17:09 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bv28-20020a0560001f1c00b002423620d356sm11319811wrb.35.2022.12.13.03.17.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Dec 2022 03:17:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Jonah Palmer , Thomas Huth , Laurent Vivier Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , "Michael S. Tsirkin" , Greg Kurz , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 v2 0/6] hw/virtio: Split ioconfig / qmp code from virtio.c Date: Tue, 13 Dec 2022 12:17:01 +0100 Message-Id: <20221213111707.34921-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These are the uncontroversial patches of my previous series "hw/virtio: Build most objects as target independent units": https://lore.kernel.org/qemu-devel/20221212230517.28872-1-philmd@linaro.org/ Housekeeping in hw/virtio/virtio.c: - Make qmp_virtio_feature_map_t[] arrays static/const - Extract I/O config accessors - Extract QMP code Since v1: - Addressed Richard review comments (restrict scope) Philippe Mathieu-Daudé (6): hw/virtio: Add missing "hw/core/cpu.h" include hw/virtio: Rename virtio_ss[] -> specific_virtio_ss[] hw/virtio: Guard and restrict scope of qmp_virtio_feature_map_t[] hw/virtio: Constify qmp_virtio_feature_map_t[] hw/virtio: Extract config read/write accessors to virtio-config-io.c hw/virtio: Extract QMP related code virtio-qmp.c hw/virtio/meson.build | 42 +- hw/virtio/virtio-config-io.c | 204 +++++++++ hw/virtio/virtio-qmp.c | 659 +++++++++++++++++++++++++++++ hw/virtio/virtio-qmp.h | 20 + hw/virtio/virtio.c | 798 +---------------------------------- 5 files changed, 908 insertions(+), 815 deletions(-) create mode 100644 hw/virtio/virtio-config-io.c create mode 100644 hw/virtio/virtio-qmp.c create mode 100644 hw/virtio/virtio-qmp.h