From patchwork Mon Jul 10 23:04:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 701099 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5423101wrs; Mon, 10 Jul 2023 16:06:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlF6iYFaO7VB2FqYCMlUO3Lvd9aZfJaDbgIZHA4txptdDtTUzIxFjFvq6fEF7nbXAnXk7As4 X-Received: by 2002:ac8:7fca:0:b0:3ff:2fae:b4bb with SMTP id b10-20020ac87fca000000b003ff2faeb4bbmr15106942qtk.37.1689030414397; Mon, 10 Jul 2023 16:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689030414; cv=none; d=google.com; s=arc-20160816; b=hfsthFzsG4DZiuOnKMGRqHVZy0/EfxI8nB3CRNVhyZq2gYQ1IeJdCbUZ9QhQwrhyV4 dfQu1Kk7/lFus+9FeidtqpUnlJFmwLbFyj9sh3Ga1Nm1LIEG6atz8gbKr7KEBbliHJ+f 1hZYExtVT6/i5hZ5/EWL3Dqr2RCpi1FUp6O7oSVspi2xMrSp9+WYghe55g+0cUZRzVyK DQCHm/CXVwyncKaufhJi4UGbON1pZ/DBMhzHxN/zwq69Igj+mxgSa+RHynJY3LaN+QHL fADyTfnaIeVY+uUWO+WyRKjfSOkXWH83pXix+QIvEsyzL2bqqbg5/Wm+7pjvaG2YzPQq nSbA== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b1yF9+I+eRXG7++9iT7lOKTZwoXP1PUCE8vxaJW/z4w=; fh=X2OS929T+Aa0AlNZhzgxPBAGY+pEkxStfq9vMtooKZQ=; b=d8pvI+Q2rh522sfjeDRAYWjTN7nc6p/qyJz/8JRdymK4IOVcy/HScUhzOivM9Rob+r dAda1N5XYo198D9Xu0DyobXlF2UY3E175jIGJ7VP4nJZnVIqrnBZsq2dukfATITdCbSM vFfMr4uNSwNUhIcbgsa8wRX2YEz7J6qqjVOxeLb3xcserKgLVbV8NAijtAA6/Y/kqYnS SFSLW2oaLmWlfmED4ynQUR+v2RhnSreHZ1lfk0G6XnpBsUVkjyPMc1dTFCv9m7t1PBVQ LSW67zHPVeO142kaIapW+lnoOcWxH3U9RemuT19G2XxmY//Pb1bS9THO2fE8YcnJ6zMM KgNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gmP8WiT4; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t8-20020ac85888000000b0040349cff069si327838qta.748.2023.07.10.16.06.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 16:06:54 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=gmP8WiT4; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIzwQ-0002lR-B9; Mon, 10 Jul 2023 19:05:15 -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 1qIzwM-0002WF-Uw for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIzwI-0004a0-Di for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689030294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b1yF9+I+eRXG7++9iT7lOKTZwoXP1PUCE8vxaJW/z4w=; b=gmP8WiT4E1fgozuNfqZ+3FbtbRSA22bOfVVMAOx3i4X5YVa7q7IlN+a5ZnM1Zv+rr4fW1d 1SeTm1V+2U+vppt9KiRqm61NmVNqKwSeBv+qS+w23CsJ5H+i3MRoMRgY7+GZu67cnczt28 2PTPhblHVViGyqaqpCH1IGt3v/DIZUY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-435-I8xdiB1iPoeAMqEPn6qD5Q-1; Mon, 10 Jul 2023 19:04:53 -0400 X-MC-Unique: I8xdiB1iPoeAMqEPn6qD5Q-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3fbfc766a78so24389415e9.3 for ; Mon, 10 Jul 2023 16:04:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689030292; x=1691622292; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=b1yF9+I+eRXG7++9iT7lOKTZwoXP1PUCE8vxaJW/z4w=; b=lIGsQjXRSJI8JrmPh9h3CN5HhnifiF+0OMKLf0T2mtvjRcVVglluXIpUDzSPYdssqY BraP0VthjOjK8NNRTWLq2Ta9L/MSC26yE4vqnfCvv3stkx5qmsaqtLAioZGuNB4PFSoZ X5ehRKmqf0onc3Ft6NTISB9Am8i1eM3fgWcqpuOMYl8ngIJavZleEUTRZy86PodwwWRo KJwc9g46bY9DiqkphirXhMwcj4K9ZbSq6cuti2GVjHQdK/s34SpxWjq9l2IJqP1rnA+L jy3KpFqoPxSB5P4AyeLXxa2yj0YGJvX9v2L4uqtoeoMGCV8sb/yt4iwUhRchXVGTcUMi rdcg== X-Gm-Message-State: ABy/qLYyUVt4oNyn5GEKse3qYk4VXFqlk4eIrbHulhk0/hqinTwAfp5Y LR0haCyhQI90JuTRYpOj1gSAVj5E6Ge2ZIevtWp4KgDY9fNGUPTLOoMURHugP8RBB6uMNXDKA2Y hBZYW8DAm1Z23xypnfIBMnefpwm7AQVI/vrlxDMLOgvsYffttitekPJbQwrzod3kZUT11 X-Received: by 2002:a1c:e915:0:b0:3fb:b5dc:dab1 with SMTP id q21-20020a1ce915000000b003fbb5dcdab1mr11486440wmc.39.1689030291890; Mon, 10 Jul 2023 16:04:51 -0700 (PDT) X-Received: by 2002:a1c:e915:0:b0:3fb:b5dc:dab1 with SMTP id q21-20020a1ce915000000b003fbb5dcdab1mr11486421wmc.39.1689030291518; Mon, 10 Jul 2023 16:04:51 -0700 (PDT) Received: from redhat.com ([2.52.3.112]) by smtp.gmail.com with ESMTPSA id f18-20020a7bcd12000000b003fa999cefc0sm919598wmj.36.2023.07.10.16.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 16:04:51 -0700 (PDT) Date: Mon, 10 Jul 2023 19:04:49 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Paolo Bonzini , Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= , Eduardo Habkost Subject: [PULL 50/66] include: attempt to document device_class_set_props Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Alex Bennée I'm still not sure how I achieve by use case of the parent class defining the following properties: static Property vud_properties[] = { DEFINE_PROP_CHR("chardev", VHostUserDevice, chardev), DEFINE_PROP_UINT16("id", VHostUserDevice, id, 0), DEFINE_PROP_UINT32("num_vqs", VHostUserDevice, num_vqs, 1), DEFINE_PROP_END_OF_LIST(), }; But for the specialisation of the class I want the id to default to the actual device id, e.g.: static Property vu_rng_properties[] = { DEFINE_PROP_UINT16("id", VHostUserDevice, id, VIRTIO_ID_RNG), DEFINE_PROP_UINT32("num_vqs", VHostUserDevice, num_vqs, 1), DEFINE_PROP_END_OF_LIST(), }; And so far the API for doing that isn't super clear. Signed-off-by: Alex Bennée Message-Id: <20230710153522.3469097-2-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/qdev-core.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 06cadfc492..196ebf6d91 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -926,6 +926,15 @@ BusState *sysbus_get_default(void); char *qdev_get_fw_dev_path(DeviceState *dev); char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev); +/** + * device_class_set_props(): add a set of properties to an device + * @dc: the parent DeviceClass all devices inherit + * @props: an array of properties, terminate by DEFINE_PROP_END_OF_LIST() + * + * This will add a set of properties to the object. It will fault if + * you attempt to add an existing property defined by a parent class. + * To modify an inherited property you need to use???? + */ void device_class_set_props(DeviceClass *dc, Property *props); /** From patchwork Mon Jul 10 23:04:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 701103 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5424083wrs; Mon, 10 Jul 2023 16:09:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlH8AljeIgBA7sOxuhkpDl/wqr32eW8FTY/8eJwVx3dPSKMqLOQ5Ne+475oM63xN0ojAizZm X-Received: by 2002:a37:87c6:0:b0:767:287d:6df6 with SMTP id j189-20020a3787c6000000b00767287d6df6mr12940477qkd.37.1689030552481; Mon, 10 Jul 2023 16:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689030552; cv=none; d=google.com; s=arc-20160816; b=JH8acwRO9Cw/JTlefHP+q6pQDG3T/HdEQcohaJIfVf16PRJ8MCHArbsIa8OYZF+0Pd d/jpffWiBBYxc+RgLy/83HvockN83Jw93BFCeLVBRpeZTCBsC9K9PoDef/CsyWliVf2+ chQgoJ9yQQ7FYOnzL2QJwVgNSZVWdnVarOfuX6Gx24zvCIJgawzJ76XKZPKHBPErrVNW YVhQBk1S+6NglOu9tluauDGh1KXqJat3xxyPpmhIUDOMNE2Z0TFR6ihXSuE/gkvMg6Tn rWQ5IywEktSXO4zqfVwKrbhG+Qm5wRlhR68ajhb1l3x43Xr61Dh793DH33uZKYYxgOKx G7cw== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gchxlBA+cB22tJPCzqHzEwVhVGuwa/sdVVkoeiXPLUI=; fh=X2OS929T+Aa0AlNZhzgxPBAGY+pEkxStfq9vMtooKZQ=; b=gOz+atf1EAhJESoePAi6b/hsup96/U9/s2vaFQOomzn0JTplmgRJdouCfwlYRUtshs dWhhH0z6krNhzj8sbd9B8s4y6OcaD4RH3EE2zZvCedVJT7Rv2J5nMd+rCHqqYV9wALv9 +iRigusSveAbnL66CBA62vWLYZer47t0v3180n3zmALvZvXOSlRCrTNUbNIXklx+81Ya QNggWddx3pPq+hhsz88tXXJSLEHO9b6oX/6B57QoUgr8agpBwWzKv10fKDQJlX8L5nGY FDTEJIWU29wYfjUsHuXDuTSGZsRYaF03JE+wUcHcMfLPNaWbl7e7L2bKvSUqQBQs+RLP 88gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="G2mU1m/X"; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s21-20020a05620a29d500b00767dfe07ec4si104002qkp.164.2023.07.10.16.09.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 16:09:12 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b="G2mU1m/X"; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIzwO-0002eo-9c; Mon, 10 Jul 2023 19:05:12 -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 1qIzwN-0002Wc-0O for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIzwJ-0004aQ-HR for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689030297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gchxlBA+cB22tJPCzqHzEwVhVGuwa/sdVVkoeiXPLUI=; b=G2mU1m/X4XbvivAUIsXsvsYRY+yX0mxuj6Jzu7OUBkkVWyv9pdR4e0EIOwsYAnVd3q9/d9 YpaNPtgveE2SXMzGclktkq9d9JfyMSDCqD4wjfBRSv++9SDBuI5ZTienby34kWlIcfKYEd DHqNUU+7Cycy/DLRBtOYttoVrknCHtg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-418-7o4Kbhw3Mta-FYhKux5faw-1; Mon, 10 Jul 2023 19:04:56 -0400 X-MC-Unique: 7o4Kbhw3Mta-FYhKux5faw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fbfc766a78so24389635e9.3 for ; Mon, 10 Jul 2023 16:04:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689030295; x=1691622295; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gchxlBA+cB22tJPCzqHzEwVhVGuwa/sdVVkoeiXPLUI=; b=aGP38018cSoUpKTXNn1rIQ38JFuzRgy/NuqPV5ahUZrA+aWGUCIWi2m/mele0U2hPk qIh/ql+UUiWVRziE2eAcBQwUj3UY++8keHEXNlwACP9iVp3I7wg/UJKUemHPkvxLvuTl 6lKMrDQkO1Wplc8tUhV2MUrUsNaslQwL+SPj/UPxU06/JPDPRSsqankkDiXq8NZiM7bP eZrm2S4kAVLQVgZyl8Jae84XqcsqQhpaBpnSMSTuIm1pOCu3J6qlrKu9cWULrGiAcFyE 23y2erg73bxsWAGZC3/l8EjyeCJCHYpHH8tON4SHX3qMXojvjw7KYx4tMeHd41DqSXGE XWGQ== X-Gm-Message-State: ABy/qLZD2CzGctMhNWBX+Y8LKdhQ3okJ5qOoZqySHl1XjV8gPUKTlAlJ 8SDxZUeCI9VKyjC3iaklr43gT8FLSaYe3jFWh6aBINi5h2+68R9AhrXdZdr2WFPah+ShHLdxzD/ 5LdVt2WfXhATjxESPGUauE3BGTYrQIKGqqNbYZmy8Y4MrS0jM1Pm7AN+FT/SxFtRYpwXH X-Received: by 2002:a7b:cbd8:0:b0:3f9:9a93:217f with SMTP id n24-20020a7bcbd8000000b003f99a93217fmr11257220wmi.3.1689030294797; Mon, 10 Jul 2023 16:04:54 -0700 (PDT) X-Received: by 2002:a7b:cbd8:0:b0:3f9:9a93:217f with SMTP id n24-20020a7bcbd8000000b003f99a93217fmr11257202wmi.3.1689030294415; Mon, 10 Jul 2023 16:04:54 -0700 (PDT) Received: from redhat.com ([2.52.3.112]) by smtp.gmail.com with ESMTPSA id a25-20020a1cf019000000b003fbb346279dsm919922wmb.38.2023.07.10.16.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 16:04:53 -0700 (PDT) Date: Mon, 10 Jul 2023 19:04:51 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Paolo Bonzini , Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= , Eduardo Habkost Subject: [PULL 51/66] include/hw: document the device_class_set_parent_* fns Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Alex Bennée These are useful functions for when you want proper inheritance of functionality across realize/unrealize calls. Signed-off-by: Alex Bennée Message-Id: <20230710153522.3469097-3-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/qdev-core.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 196ebf6d91..884c726a87 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -952,9 +952,36 @@ void device_class_set_props(DeviceClass *dc, Property *props); void device_class_set_parent_reset(DeviceClass *dc, DeviceReset dev_reset, DeviceReset *parent_reset); + +/** + * device_class_set_parent_realize() - set up for chaining realize fns + * @dc: The device class + * @dev_realize: the device realize function + * @parent_realize: somewhere to save the parents realize function + * + * This is intended to be used when the new realize function will + * eventually call its parent realization function during creation. + * This requires storing the function call somewhere (usually in the + * instance structure) so you can eventually call + * dc->parent_realize(dev, errp) + */ void device_class_set_parent_realize(DeviceClass *dc, DeviceRealize dev_realize, DeviceRealize *parent_realize); + + +/** + * device_class_set_parent_unrealize() - set up for chaining unrealize fns + * @dc: The device class + * @dev_unrealize: the device realize function + * @parent_unrealize: somewhere to save the parents unrealize function + * + * This is intended to be used when the new unrealize function will + * eventually call its parent unrealization function during the + * unrealize phase. This requires storing the function call somewhere + * (usually in the instance structure) so you can eventually call + * dc->parent_unrealize(dev); + */ void device_class_set_parent_unrealize(DeviceClass *dc, DeviceUnrealize dev_unrealize, DeviceUnrealize *parent_unrealize); From patchwork Mon Jul 10 23:04:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 701101 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5424000wrs; Mon, 10 Jul 2023 16:09:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlErmmyPMYgIbavJs9MgdeO82cdXjtc9yGCXGktKgGjlmQzQ1jgoXSZlzi7ZyYgJtYnVdrMU X-Received: by 2002:a0c:a98d:0:b0:629:58a7:9a9d with SMTP id a13-20020a0ca98d000000b0062958a79a9dmr12538840qvb.10.1689030539829; Mon, 10 Jul 2023 16:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689030539; cv=none; d=google.com; s=arc-20160816; b=ptXEMHWKMOGKSKzxUFNZbNFN83CIE76EScB3Tev07XhGZ0BgbkPBvuHFjSzJzgFQij d3hSjMVKB24aT4nfUssJ4vO7Bn+BGJvA3Ec+BHZwvQ9nMEB+2gsVSXT5Uh/vIXzD9/8J 4fPJLJV73zDG5Uhhba44O51bx3iGJRsyydOjmEK/FuOgUfozwu4pNyauSY45I22a3cVa eRgTNCcF6YUYwdpG6JFkryr9R7kXrTDvt6ry73/hpWJb9Y2Y4Zo6EjQMQ5JHpom8B92G o0qyDxXZTcAwIZ1IwOG9yyh4sxDMyx/1Sae2zAtez2cCb+PFPSqPGd4qDppCxll9jdeE 8CDw== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8aPiUq53zYt0kY/8LueF30ebx/Uzyl1lsl0vCB8gSxM=; fh=wZv3K3Suul9q2tUUqG0rotgguO7VNDvTm2LjH2rLwBc=; b=waifBAluSxG0DRJmMgcLo8TQVD/RykXZQuN3U8E8FMvgXH3pqtsZPkAQVRA03d9+y4 uT5QkMyYK5E/GRJRxbMtQ6BmlO/sTAEi9g+sOiBhhNWdRDJSrwiLASj4DuJNp3XK86eH /Fl9qh9pBcNRDsLsuOdbGVe/26dvl4EURd7rTSMqYkIVQ5hnkYak6RaMRA0FUF1MwHLk fPcgavEL+C+OlMIZ7kwaULYapaQERFmKjb3VquW4ASfvxTArtTjxGPAQp8L3vXkuJee9 k0QFVtJ80w0eQSSyLzMidOLLyTvuW4g8pWmplDsAS4V8C7wjRqKMbjyHhmSZEtJef2ZK Y1Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LSQLJjku; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fi1-20020a0562141a4100b006300ecc8054si276545qvb.113.2023.07.10.16.08.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 16:08:59 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=LSQLJjku; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIzwO-0002gl-GM; Mon, 10 Jul 2023 19:05:12 -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 1qIzwM-0002W1-TX for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIzwJ-0004b7-HR for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689030303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8aPiUq53zYt0kY/8LueF30ebx/Uzyl1lsl0vCB8gSxM=; b=LSQLJjku7VmvSrifoSWry2+ggQSIceHmlEGgdThNG0VeV72fX0zCUvdrjgAkwu/K8A1Wep sMnl+XwL8ZISXPa2RDiWXPjwxYjLlyxVdgcm+4CnmWQVxgZ4kJ7pSzvsXHqtZmO0BZt6Uo Xgsr4InQuuJXp4AuPyZRvU+Zz8La5rk= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-423-nkfSFsBBPBW9bu2aNwGY9Q-1; Mon, 10 Jul 2023 19:04:59 -0400 X-MC-Unique: nkfSFsBBPBW9bu2aNwGY9Q-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3fbdf34184eso31734845e9.1 for ; Mon, 10 Jul 2023 16:04:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689030298; x=1691622298; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8aPiUq53zYt0kY/8LueF30ebx/Uzyl1lsl0vCB8gSxM=; b=d+i77AyXPZw+it7Red+UqlrbPtSJJd7BxwNYEqvNuPixBtjbPDDvI3ExakXpBSHjlE NVS1G36IUfh/umeVa/pIq1hfQEAtuX1x+xxViaKtJfIKNTD1XwJ20cZ3zK+YAlTQ/jjq Be2iIpywYPXhON/DMaydxdWJaBTxt9OqqDlqcgidFQF/6qiy6wkH3e09kOKD81gDcuJz KAxDfhHDmSgc4ym5y7J+PTcd7GExCPQIShzx2hMgsYBI/rgweYokPHYGlfToJwF9p+3m DOz68CPVk+RNLs2UfWjXb2nzq0ACwmQDUA1kMmqpAxb5Sv2tOj9LDoTdjQHoM5SNY5Hk y5vA== X-Gm-Message-State: ABy/qLZeXWRHbNVWePsfRziSjxVff/4YUpId309zlrlwNMfHFt+cH3gT qHqcr0plWyri5y3TPci9yZAua9X777O//hpD+sbFp65Ej0UMT8oglDPbmaybXsn0fgpA70W1ZrC qFLjSrOGq/ZO5FUXdYnQogNUjC7VkuNOVKuSGt216tI9c0V2gryNgQuueaeK5A87HvYwB X-Received: by 2002:a1c:6a0c:0:b0:3f7:e3dd:8a47 with SMTP id f12-20020a1c6a0c000000b003f7e3dd8a47mr12334816wmc.11.1689030298060; Mon, 10 Jul 2023 16:04:58 -0700 (PDT) X-Received: by 2002:a1c:6a0c:0:b0:3f7:e3dd:8a47 with SMTP id f12-20020a1c6a0c000000b003f7e3dd8a47mr12334790wmc.11.1689030297762; Mon, 10 Jul 2023 16:04:57 -0700 (PDT) Received: from redhat.com ([2.52.3.112]) by smtp.gmail.com with ESMTPSA id s21-20020a7bc395000000b003fbc89af035sm946671wmj.17.2023.07.10.16.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 16:04:57 -0700 (PDT) Date: Mon, 10 Jul 2023 19:04:54 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9?= Lureau , Gerd Hoffmann , Jason Wang , Stefan Hajnoczi , Viresh Kumar , "Gonglei (Arei)" , virtio-fs@redhat.com Subject: [PULL 52/66] hw/virtio: fix typo in VIRTIO_CONFIG_IRQ_IDX comments Message-ID: <7e8094f0dfd04d4772b65dc92dd087dc86783dc4.1689030052.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Alex Bennée Fixes: 544f0278af (virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX) Signed-off-by: Alex Bennée Message-Id: <20230710153522.3469097-4-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/display/vhost-user-gpu.c | 4 ++-- hw/net/virtio-net.c | 4 ++-- hw/virtio/vhost-user-fs.c | 4 ++-- hw/virtio/vhost-user-gpio.c | 2 +- hw/virtio/vhost-vsock-common.c | 4 ++-- hw/virtio/virtio-crypto.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 543ea92721..e8ee03094e 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -521,7 +521,7 @@ vhost_user_gpu_guest_notifier_pending(VirtIODevice *vdev, int idx) /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ @@ -538,7 +538,7 @@ vhost_user_gpu_guest_notifier_mask(VirtIODevice *vdev, int idx, bool mask) /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index d51067123b..7102ec4817 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3362,7 +3362,7 @@ static bool virtio_net_guest_notifier_pending(VirtIODevice *vdev, int idx) } /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return false */ @@ -3394,7 +3394,7 @@ static void virtio_net_guest_notifier_mask(VirtIODevice *vdev, int idx, } /* *Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c index 83fc20e49e..49d699ffc2 100644 --- a/hw/virtio/vhost-user-fs.c +++ b/hw/virtio/vhost-user-fs.c @@ -161,7 +161,7 @@ static void vuf_guest_notifier_mask(VirtIODevice *vdev, int idx, /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ @@ -177,7 +177,7 @@ static bool vuf_guest_notifier_pending(VirtIODevice *vdev, int idx) /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c index d6927b610a..3b013f2d0f 100644 --- a/hw/virtio/vhost-user-gpio.c +++ b/hw/virtio/vhost-user-gpio.c @@ -194,7 +194,7 @@ static void vu_gpio_guest_notifier_mask(VirtIODevice *vdev, int idx, bool mask) /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c index 321262f6b3..12ea87d7a7 100644 --- a/hw/virtio/vhost-vsock-common.c +++ b/hw/virtio/vhost-vsock-common.c @@ -129,7 +129,7 @@ static void vhost_vsock_common_guest_notifier_mask(VirtIODevice *vdev, int idx, /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ @@ -146,7 +146,7 @@ static bool vhost_vsock_common_guest_notifier_pending(VirtIODevice *vdev, /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c index a6d7e1e8ec..44faf5a522 100644 --- a/hw/virtio/virtio-crypto.c +++ b/hw/virtio/virtio-crypto.c @@ -1210,7 +1210,7 @@ static void virtio_crypto_guest_notifier_mask(VirtIODevice *vdev, int idx, /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ @@ -1229,7 +1229,7 @@ static bool virtio_crypto_guest_notifier_pending(VirtIODevice *vdev, int idx) /* * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1 - * as the Marco of configure interrupt's IDX, If this driver does not + * as the macro of configure interrupt's IDX, If this driver does not * support, the function will return */ From patchwork Mon Jul 10 23:04:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 701100 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5423901wrs; Mon, 10 Jul 2023 16:08:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlF2TBaC9eDLn9ui+WBBt5suSHCH7wjv5l5rVvRFwbwKEefKY0+Iol5d8k7wmyDIFiIG8qAs X-Received: by 2002:a05:620a:2903:b0:767:261d:1ef6 with SMTP id m3-20020a05620a290300b00767261d1ef6mr16124728qkp.59.1689030527660; Mon, 10 Jul 2023 16:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689030527; cv=none; d=google.com; s=arc-20160816; b=jhhz1Vpb4edbJUxTqToKS3oyl7gVkkFiLcyEv780B2CtWvmqyp7E33mJ1qr8wC/kFV o84Nw21Je6JfzgaRQpsxF/fD7Uua6ftQbw5zlFVm676qbFWArcp+tJJDrQeb6NQ68MYf ucpqRi/khf4AbGjRYDD3RmR8xRFYsBN2p5EjRH9ZrLLUQMN1KgzSNaUdRvrR9WUr4XQu fVQ3Ffrkq3LiN/yfaiKnaPBMFvrihui+LgO5KhJMWWUDQNIhQumNshHdO/8ZAdqGsL4Q ITune3KC7mUiO1P2buyF3vYogzDFnQ8JvfreIMBN0X+Yxecl2CP/jadJeXoCym2BVeSg dXCw== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kvUl4/drtgXBRU9CPKwk/PRPx+0o4aik4MUaSEpTsWY=; fh=bKEfGR6OWIOEmawFrsUeGlunEsgeCf73L/I7Ij4GOvk=; b=bqhyfEvCzreLoZXd0eBQ1h7Tb4RQ1ucxslPcljrtawmwjD5GJNwy8RZ1s6WJVRJQzp ihbdK+cnB7w86YldHHCW/8ISZT8tdMdy7fcqqoD2v92ZFWKUMnc0/iTl4Tr50yOhI/Tx WRDyiQHAFdCqLBl+45uEnc7IkKVRQ+Xh4r/UYWF69Md8Z2Vet8NEVm6We7p9NBXtLgEL xXI9bdDcRjngoVmzELZ2/xy8kUFrNtxTnIhnxKIcgnXprcioiF4x7wc+/6vRqSJWovNM xOlpQXqMpgIwbOEIEZgTMTivrV1IT7xTM5tShxAQbfNi0gZt8GHK2WUTK4pZf4fV6w3P pLSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OGoH6s7n; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u1-20020a05620a0c4100b00767dc58f2f8si316012qki.48.2023.07.10.16.08.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 16:08:47 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=OGoH6s7n; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIzwU-000393-QF; Mon, 10 Jul 2023 19:05:20 -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 1qIzwO-0002jW-Rg for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIzwI-0004b4-45 for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689030303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvUl4/drtgXBRU9CPKwk/PRPx+0o4aik4MUaSEpTsWY=; b=OGoH6s7nZoIoRySJsq9ijNwdg10El6/UvJg04JXN1NG3++wf/9WaSHNIK/DeF4tCjMDZFF Ht/9EC5TwWzU3cIobhuoR3tmXWf8LrkkcXv+DoexfU2i908wStkygFqTIwsvRm3UPvesLg JJJsoXNAiQOQtfdJ0GkItKU9UrpYumk= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-395-MdwVQz74M_izAgPUrrNMfg-1; Mon, 10 Jul 2023 19:05:02 -0400 X-MC-Unique: MdwVQz74M_izAgPUrrNMfg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fbb34f7224so33549135e9.2 for ; Mon, 10 Jul 2023 16:05:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689030300; x=1691622300; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kvUl4/drtgXBRU9CPKwk/PRPx+0o4aik4MUaSEpTsWY=; b=IQKkT9DgYvWGD3c9CJgR3PkVk8yy4JKUrkV2sfz+m7xaRdhtUWOEzI5auGmCXUYvdU 2GbMbaXK9aZHbi058MpqtIb95GssEBV+EFHo9W24GY5159lvRhvhG+w3q9f4p+wvFThR clz/m7DiSgmyOT6r9HwNhrSaZSdpDNckzXR1HbTpiNW0k/9jdLEbH4ETbDlIlzpJG2Sg w1CUkSEA5osaoV596mlTEBc0KPoiqUnRnWgX2ChiZMuPJwRDIP9i6B2SCDL+bKnYSno0 ZXB63fkjm+8iuhWVIXQXWPCYkR4h3ob2AiW40tm8VqPu66/oQC0VIJ5JqBYVk8sGdKJ9 YV1g== X-Gm-Message-State: ABy/qLZ+lDEOr9LIRqjsVDUmqyjKEhQykh3b9BqMJIn2RpXlWo9FFGAd HN2SNy9SZdH2POQRfSSl5ABWgwAdSZmbfGT+E2pL4WZbCTvOZOVI1NWTgukGtbUqJgTbJOI0rv/ MY5e9ycnkVamRSC6tLoIRYOpnUhpWNzFFxbT1X3zMq3oRPHGF4uVsq9aDbqWPKNEithHv X-Received: by 2002:a1c:f712:0:b0:3fb:e643:1225 with SMTP id v18-20020a1cf712000000b003fbe6431225mr14193474wmh.13.1689030300437; Mon, 10 Jul 2023 16:05:00 -0700 (PDT) X-Received: by 2002:a1c:f712:0:b0:3fb:e643:1225 with SMTP id v18-20020a1cf712000000b003fbe6431225mr14193448wmh.13.1689030300141; Mon, 10 Jul 2023 16:05:00 -0700 (PDT) Received: from redhat.com ([2.52.3.112]) by smtp.gmail.com with ESMTPSA id l15-20020a1c790f000000b003fc01f7b415sm9206642wme.39.2023.07.10.16.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 16:04:59 -0700 (PDT) Date: Mon, 10 Jul 2023 19:04:58 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= Subject: [PULL 53/66] include/hw/virtio: document virtio_notify_config Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20230710153522.3469097-5-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 0492d26900..0671989383 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -276,6 +276,13 @@ extern const VMStateInfo virtio_vmstate_info; int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id); +/** + * virtio_notify_config() - signal a change to device config + * @vdev: the virtio device + * + * Assuming the virtio device is up (VIRTIO_CONFIG_S_DRIVER_OK) this + * will trigger a guest interrupt and update the config version. + */ void virtio_notify_config(VirtIODevice *vdev); bool virtio_queue_get_notification(VirtQueue *vq); From patchwork Mon Jul 10 23:05:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 701102 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5424051wrs; Mon, 10 Jul 2023 16:09:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvgDOr3W9oL99GvIE/wshuER7vOxZrEnToAIPuySJDcRT0WGW5glD5UhIE7dw/1+P+BhdA X-Received: by 2002:a05:622a:151:b0:403:a8d2:85f with SMTP id v17-20020a05622a015100b00403a8d2085fmr7881396qtw.33.1689030548646; Mon, 10 Jul 2023 16:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689030548; cv=none; d=google.com; s=arc-20160816; b=dpYmlvVCyojQpUEEzKkPB0HhPpolX7H4ZcOgKUqx91j+aKFnR9yBk3B/X2fM12NP3k G8EXmWvI9n0z8QA1Ln070mu1Yr3CSwaYkU/FL7TqRFdM1awXhJ73cb7eksUGjRUOoEjN 101OWk1OnwXL11ELFhdDhY8vbPiEtugRbYxc3dIm1fy4R2UqFuR5eN1fSBKEUSRB6Wxv sb59BSdot8Xl6+yc0KKr7HOCNRvNuTvwWZbo8LpNQewK89D6FjdcwWqmV2XIPuklvhMV n7S6OgOFAvEa6BNeljoKXb2L4wYgQOIF+y7xVYjwjpMgHqwm4dXEZfC2QAKUxCXKkWCM vjog== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Lr23N/kbsARVVr5iF+Jste9DzcTEbZfcy58ahS6NDeE=; fh=bKEfGR6OWIOEmawFrsUeGlunEsgeCf73L/I7Ij4GOvk=; b=WZyf0neHSGt/+WoOKpMommj/37yAcNHhyMb22yHIbjWL5q0ULb+CVDFvChHp9LGZmo pkvHD5suKMiZJTyAdnWAX/B0MjLeFmDXjw3WWN3Q0nnDXWEYWyVBXfSziYz/R6VVklL1 nxklkv88fxOL27mzXgozxmwWbjjyKAM58z6wx9dYhLqD2dBw/xI80nT4lexIWvi6M7sV L4AbAsiZXz0/dP+gT92k2gK79TGnsgboJsnqNK3WJSehuS77gC6HWmDg6k3CtxU8gbM2 dNFzadhfZLIYfd9jkWK3STyWOL3sIH/VN7ggBs2Bw9y/HBpTuJ2snomDKvr6df6U3xz7 JMQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e5smPRA2; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t16-20020a05622a149000b003f683dbaadcsi336706qtx.274.2023.07.10.16.09.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 16:09:08 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=e5smPRA2; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIzwf-0003jf-Ql; Mon, 10 Jul 2023 19:05: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 1qIzwR-000306-OA for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIzwJ-0004mQ-II for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689030306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lr23N/kbsARVVr5iF+Jste9DzcTEbZfcy58ahS6NDeE=; b=e5smPRA2/l96QhTLog8h9OPyArZMjwsbfW5DN5S8o0k/xuwfd+6WlhLBRD9L6jyqDso2j6 dLnzlMXqYJ44tQLprzFB1jAZfM/ZCYEOVIHe3peoUWyvSa4A5WPkGd+Cd0onSXFirGUHNs F2thQUcsdEfV0RCC6+t5S260UIFEpC8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-lG3QSu20NqCodVKUi7eNGA-1; Mon, 10 Jul 2023 19:05:05 -0400 X-MC-Unique: lG3QSu20NqCodVKUi7eNGA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3fa9a282fffso29964105e9.1 for ; Mon, 10 Jul 2023 16:05:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689030303; x=1691622303; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Lr23N/kbsARVVr5iF+Jste9DzcTEbZfcy58ahS6NDeE=; b=eb5pF/Qwhmt4gJ3TCbBSkk2GjjIj468pJ7X3RuBgz/kAYSzELSxOXtI6lx+JSnPq3i ZwKYCrZjKgqKdakLizRmWSRDe+Cqj2s/REzVyjAsclnHgbZIYFS2nSt1pcbreOh+GOg+ +gJZRyjY4NdeIMrXVY4EgKahdXk1HPAN6T2zNrg9KzunKgKK+je582bqAErou4qQthHA /cMgJnWVviYbjDrQhFoOuj191Ya44cQ1BHK7rzODYNhsTVi/NiPoxxMTkonJnZPgVeUe RKdzw0d4+PjRZBtAS7/EFmHR12fyV3crfz3wm5p0rE62ZysuPlWkHif/plRN0lkiEGUG Mmpw== X-Gm-Message-State: ABy/qLaVj1EjZ4126OJalhzKpbUHfnWEGGOdKZnuUCWwQ85Xm+QU4CZO Pl9X76GGN+8z6xddVbhfWzP5rf8xUkVV3ezOYRz9eRq18npRqtLN9wvT5chlxMHyqzu464CdWem T2r6mLFySuRdPW2mDRd06m2ZpFuGyAirTtvcm2N46eBW1je/g517+dIGq30jy3HRPUzl0 X-Received: by 2002:a5d:4d4d:0:b0:313:ed1d:39d5 with SMTP id a13-20020a5d4d4d000000b00313ed1d39d5mr11259275wru.35.1689030303517; Mon, 10 Jul 2023 16:05:03 -0700 (PDT) X-Received: by 2002:a5d:4d4d:0:b0:313:ed1d:39d5 with SMTP id a13-20020a5d4d4d000000b00313ed1d39d5mr11259264wru.35.1689030303312; Mon, 10 Jul 2023 16:05:03 -0700 (PDT) Received: from redhat.com ([2.52.3.112]) by smtp.gmail.com with ESMTPSA id q10-20020adfdfca000000b003144b95e1ecsm565441wrn.93.2023.07.10.16.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 16:05:02 -0700 (PDT) Date: Mon, 10 Jul 2023 19:05:00 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= Subject: [PULL 54/66] include/hw/virtio: add kerneldoc for virtio_init Message-ID: <3b6256c2c57061c365cfad7857e12fd8d15ca3c8.1689030052.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20230710153522.3469097-6-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 0671989383..631490bda4 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -219,6 +219,12 @@ struct VirtioDeviceClass { void virtio_instance_init_common(Object *proxy_obj, void *data, size_t vdev_size, const char *vdev_name); +/** + * virtio_init() - initialise the common VirtIODevice structure + * @vdev: pointer to VirtIODevice + * @device_id: the VirtIO device ID (see virtio_ids.h) + * @config_size: size of the config space + */ void virtio_init(VirtIODevice *vdev, uint16_t device_id, size_t config_size); void virtio_cleanup(VirtIODevice *vdev); From patchwork Mon Jul 10 23:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 701104 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5424296wrs; Mon, 10 Jul 2023 16:09:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlGfAFDNIY3BN8CWbZ1MdrUuEsVUJrJVTAxyBwgM47z1GZBso2qwS24tGIzyt3L6lFTKhoYO X-Received: by 2002:a05:622a:24d:b0:403:ae16:3f49 with SMTP id c13-20020a05622a024d00b00403ae163f49mr6128514qtx.1.1689030579470; Mon, 10 Jul 2023 16:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689030579; cv=none; d=google.com; s=arc-20160816; b=VUvDhFMieWCjXLvGq2L92N9OJvi5ZVwr1QD84SnVMgr4P8u0j2jOFxqCK7dTHIeLG4 eIjirRBvIfkte3A6/hEjS5RsrHhELWGD0ATyf19WhDpFL1ooaCuLghZOkYEMUupARkXE yKYErLgZaytJ4ZSPYmODkqRKXMjlmjd3uBKIGAI+8AzWHCxoTtKpyxhIg0Jp+D8MOjX3 0bdTR2k1NC2Iqk+ELNb/uC0SB95G+bRDCNh3hUBZB0ii+mXcU+KrDX2KbkRg39OtsVCD Y0DFtwczsT8wDus1dbsKNfoe44oWAt66jeJv3vR7R7VFUlg9dHaSc33XmngZbMZOYSi2 fVpg== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6owJwf2FkV6CUX/2hjmF+Amv1PF8cnNyFJlq3/wOoXQ=; fh=bKEfGR6OWIOEmawFrsUeGlunEsgeCf73L/I7Ij4GOvk=; b=Oau1TyD+yX4oSB1M4Y8OODMS5WyXQklvd+EGUPxkPkoe6gc23wTyFzZUIggX7fKr2y 9G37qhF2obyZbw9iaKmQRCwQzgtFQYtKzkau23/k7hJTUq/CApOwPLHrGPx9zj3joQ0D NjGsaaWQSPtFcFmQP/xGhtui1z9rUorOTT6q9RS9nx7e0uv9UUI1W7U8Dw2AQYW9bOOF oQEX4aSk1kjHnLfwdvWLAGh1EcmbTXxnv+w8g7oZt87oe6jfzSEzUrXRNRtTsdJQw+Ib RRbEDn8qVnpuaj4Ok3biU8/A6W77pfYJzj2cZxNeffqzk38woPjSnq/SGHhP+mg1X8s0 rF9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HVD60UHH; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h7-20020a05622a170700b00403996b66ffsi330877qtk.359.2023.07.10.16.09.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 16:09:39 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=HVD60UHH; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIzwi-00049C-3v; Mon, 10 Jul 2023 19:05:32 -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 1qIzwe-0003ZA-Ed for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIzwP-0004oi-Re for qemu-devel@nongnu.org; Mon, 10 Jul 2023 19:05:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689030312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6owJwf2FkV6CUX/2hjmF+Amv1PF8cnNyFJlq3/wOoXQ=; b=HVD60UHH9nAcwMaoqc0sX0nl22LcovFePQrzwuaoZsUsnh2N135mFJQ5nyMQuEHNbQ3i82 kGFN3/41LugFkwXoix1VzHeXZWAmq+NbfoUbouAalNXNlAelsjsxA1EiWYf2ELMuPTN/G1 4qV5hEgsIKfc8kOcamU/bqLAp/ExOCk= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-153-OedXWG-nMO6ol65hFNEDpg-1; Mon, 10 Jul 2023 19:05:08 -0400 X-MC-Unique: OedXWG-nMO6ol65hFNEDpg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3141c6f4173so2720879f8f.1 for ; Mon, 10 Jul 2023 16:05:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689030306; x=1691622306; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6owJwf2FkV6CUX/2hjmF+Amv1PF8cnNyFJlq3/wOoXQ=; b=fmC8WpDUgGbNz9JZl2Zmo6/kXbY51TgsIVIfBnH6/18FBudEki7YGh6OCzR8G7WfSf jN2B9d33XRrD2Iek0qyEswbDK/lsdacwvvRxAYDQbqOVwOQaMF++JwTsRIpB16WWEll9 f4e1h+V2Mple7a95lpjmn0MqbTw3aCEFwhEyPRX1WByvShcRI1P2fgVFFgVH7chmwGF7 pWLP8TWAP5EOGBcS1626Fo4at9gW/lWm7lkOWOUv0s9FFJg2oIsmJiaSHroVIIKjq+JT uGloPlVzjqXHOXm+0PQs8FtLSkTjVniNPtUojtAJEod0tFO2o7PTrwzHww7C1QNnU81j qEIA== X-Gm-Message-State: ABy/qLY8gEdbEJyUdnaiDKWmqB+ThlzVXCYr59RVi3s/JV+GFPuiqL+V Dj70mk/HzIJ/wnfVDCBD53cEDLPgq7E6BbS1bZNxCMUvMfpst9ef6hhC3BFBztues0ceL6jgB3D o/y0E1A0uCWPjxzth7AdvrYKRWU9sAIdJ9CwunoYQGub4/zA4WcDfQBQ5yEl3kgdSq/HB X-Received: by 2002:adf:ec0e:0:b0:313:e57b:e96d with SMTP id x14-20020adfec0e000000b00313e57be96dmr11872738wrn.36.1689030305907; Mon, 10 Jul 2023 16:05:05 -0700 (PDT) X-Received: by 2002:adf:ec0e:0:b0:313:e57b:e96d with SMTP id x14-20020adfec0e000000b00313e57be96dmr11872727wrn.36.1689030305703; Mon, 10 Jul 2023 16:05:05 -0700 (PDT) Received: from redhat.com ([2.52.3.112]) by smtp.gmail.com with ESMTPSA id c3-20020a5d4cc3000000b00311299df211sm578797wrt.77.2023.07.10.16.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 16:05:05 -0700 (PDT) Date: Mon, 10 Jul 2023 19:05:03 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= Subject: [PULL 55/66] include/hw/virtio: document some more usage of notifiers Message-ID: <661dee7bd08dd93d15b898d43821bb46b2aa422c.1689030052.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Alex Bennée Lets document some more of the core VirtIODevice structure. Signed-off-by: Alex Bennée Message-Id: <20230710153522.3469097-7-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 631490bda4..c8f72850bc 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -150,10 +150,18 @@ struct VirtIODevice VMChangeStateEntry *vmstate; char *bus_name; uint8_t device_endian; + /** + * @user_guest_notifier_mask: gate usage of ->guest_notifier_mask() callback. + * This is used to suppress the masking of guest updates for + * vhost-user devices which are asynchronous by design. + */ bool use_guest_notifier_mask; AddressSpace *dma_as; QLIST_HEAD(, VirtQueue) *vector_queues; QTAILQ_ENTRY(VirtIODevice) next; + /** + * @config_notifier: the event notifier that handles config events + */ EventNotifier config_notifier; bool device_iotlb_enabled; };