From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954883; cv=none; d=zohomail.com; s=zohoarc; b=QQEjics0MtdXwjafB0nU1bVTlNgyXxrH+aXWa8yaRyUWMZGDP7QanxxGyKSVr+eWnZceOrgcBnIPwIz0MODOVMeR0Mf2MwThVUhkXZy8h2lNj48/5Jpw2MEws978N+15P51Ak6Hh8ChNxkIsU9nzFM6g39f2f1BUi6HkrW4vGSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954883; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=6NcCg5xKWT+cJ/GsSaNTEefS39uXSXMUdwSN24u99dU=; b=bg/u4hrAfXXSsK4JYp3W6oDaAAvEYfBjvpFDu/e5aSkg8n8P0I2Npy7N6ht7iRgh9zutHhggGFX6PIbQuaXTTvuFV4/3lcBkked7o+lek4CxClu0jf+YMhvBJA6rETJOqAbWOdhu/EJnpLiT0Z5f0agkFz372d0XmRmYKUz53cs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954883709989.8943983482105; Fri, 31 Dec 2021 04:48:03 -0800 (PST) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-311-8V3TjjHrOf-IYMSNp8YAXQ-1; Fri, 31 Dec 2021 07:48:01 -0500 Received: by mail-wr1-f72.google.com with SMTP id v15-20020adf8b4f000000b001a24c46d6ceso7534990wra.15 for ; Fri, 31 Dec 2021 04:48:01 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id z22sm27087048wmp.40.2021.12.31.04.47.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954883; 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=6NcCg5xKWT+cJ/GsSaNTEefS39uXSXMUdwSN24u99dU=; b=RAutLF0tQ6EnsZUi2Zt8IatzvF2DN/dd6LwuHXC0uDWAqysrgUyShQyqx6dsZrwfzdPIfu uic9RXuhMdDC59LuaAbzb//ObKbSHa67zufJoQcCVg6LzGNhzcXMjvNJKFl93kQ8yAWNf5 Hao9ZjtmWYC5zHqy4IWpgcDTC0IZlfU= X-MC-Unique: 8V3TjjHrOf-IYMSNp8YAXQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6NcCg5xKWT+cJ/GsSaNTEefS39uXSXMUdwSN24u99dU=; b=KDrHU0KUE9CzJnNSWZ572mgq5YII0t8FICn+h+ClSqwEz8gk+z8VK5+Wr5yMlFAEhN t2FTIvqWZ+VMlC/zGXbZfH0JmELHMNFE4d0GRNZS/uk6hMsQGkrwm1h5RO1+3FYdOlnx 7snTLNkxMifeh5llBgO695bX439Bf82phZcc2BNXhOwxgalsvXVIfIN17E+qosBygIWs lEqWmuuOdSC6xnL1x275UQs3ubLcsjckANX1Px/8j343FRCkQ4ZlpLpSaELkWWcZn78w os0wZxVCH+ufdtldY+nnIFjwkNMdpPYmT6AT0g05RZeR2Q7MGiHW3u9a/Q1HDAdPgJbq UbiQ== X-Gm-Message-State: AOAM530QSw+C+rtHBxib5ZwXfxS2NFw668sGJS2SeaEuHdjJ3SQjnnl3 +2lu8OJfzqW7ZiiaVd0IEIVVh2015XMoN/hIlRuvXIHKlXTqY1ZdI4pj/GBwbhaHBIrTQLeAWzd WwTFzPIHM4e7cCw== X-Received: by 2002:a5d:64aa:: with SMTP id m10mr30161357wrp.500.1640954880465; Fri, 31 Dec 2021 04:48:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpE7zljcX2Zs1AtVs6KxXh79ZF4AojGyjRG+XuQUYtpzNrdxvva9O53mzoMdkLXVEVNKIALA== X-Received: by 2002:a5d:64aa:: with SMTP id m10mr30161345wrp.500.1640954880292; Fri, 31 Dec 2021 04:48:00 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 01/20] hw/qdev: Cosmetic around documentation Date: Fri, 31 Dec 2021 13:47:35 +0100 Message-Id: <20211231124754.1005747-2-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954884216000003 From: Philippe Mathieu-Daud=C3=A9 Add empty lines to have a clearer distinction between different functions declarations. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yanan Wang Message-Id: <20211218130437.1516929-2-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/qdev-core.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 20d3066595e..59a822ffceb 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -321,6 +321,7 @@ compat_props_add(GPtrArray *arr, * The returned object has a reference count of 1. */ DeviceState *qdev_new(const char *name); + /** * qdev_try_new: Try to create a device on the heap * @name: device type to create @@ -329,6 +330,7 @@ DeviceState *qdev_new(const char *name); * does not exist, rather than asserting. */ DeviceState *qdev_try_new(const char *name); + /** * qdev_realize: Realize @dev. * @dev: device to realize @@ -347,6 +349,7 @@ DeviceState *qdev_try_new(const char *name); * qdev_realize_and_unref() instead. */ bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp); + /** * qdev_realize_and_unref: Realize @dev and drop a reference * @dev: device to realize @@ -372,6 +375,7 @@ bool qdev_realize(DeviceState *dev, BusState *bus, Erro= r **errp); * would be incorrect. For that use case you want qdev_realize(). */ bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp); + /** * qdev_unrealize: Unrealize a device * @dev: device to unrealize @@ -450,6 +454,7 @@ typedef enum { * For named input GPIO lines, use qdev_get_gpio_in_named(). */ qemu_irq qdev_get_gpio_in(DeviceState *dev, int n); + /** * qdev_get_gpio_in_named: Get one of a device's named input GPIO lines * @dev: Device whose GPIO we want @@ -497,6 +502,7 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const= char *name, int n); * For named output GPIO lines, use qdev_connect_gpio_out_named(). */ void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin); + /** * qdev_connect_gpio_out: Connect one of a device's anonymous output GPIO = lines * @dev: Device whose GPIO to connect @@ -524,6 +530,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); */ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, qemu_irq pin); + /** * qdev_get_gpio_out_connector: Get the qemu_irq connected to an output GP= IO * @dev: Device whose output GPIO we are interested in @@ -541,6 +548,7 @@ void qdev_connect_gpio_out_named(DeviceState *dev, cons= t char *name, int n, * by the platform-bus subsystem. */ qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, i= nt n); + /** * qdev_intercept_gpio_out: Intercept an existing GPIO connection * @dev: Device to intercept the outbound GPIO line from @@ -582,6 +590,7 @@ BusState *qdev_get_child_bus(DeviceState *dev, const ch= ar *name); * hold of an input GPIO line to manipulate it. */ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handler handler, int n); + /** * qdev_init_gpio_out: create an array of anonymous output GPIO lines * @dev: Device to create output GPIOs for @@ -610,6 +619,7 @@ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handl= er handler, int n); * handler. */ void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pins, int n); + /** * qdev_init_gpio_out: create an array of named output GPIO lines * @dev: Device to create output GPIOs for @@ -623,6 +633,7 @@ void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pin= s, int n); */ void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, const char *name, int n); + /** * qdev_init_gpio_in_named_with_opaque: create an array of input GPIO lines * for the specified device --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954887; cv=none; d=zohomail.com; s=zohoarc; b=UguJSXWLkAfwG2IhNcBdT6R+qrEWy7r+IcAbYYUPfeTOXQUSS6evNnarG0F83ZIgpn3+/lYIYn0HOf92i3+X5wpfDHA0q3l+44HvPyIxLA/M1FkHH3LPrKKEMLgOTxzasSe6+/+kqef6GqTHh4Ae8yqJhdZGqnYnZxPh+v5VpL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954887; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=w+4sOFVvGeEBA7BnPdfDCmGmrSKk6Q3SFRcpoINpXLs=; b=hgq3BvKje3Ag/CCZ2yfLixBf+oScUtiXQXH20EtYjB/fbmRuq+nvmZGIT66nTwoIoNdj0/e/hauMIpvEG0ryUlr2i5FnVEaxSVVIGjnVXh8mb/ZgUvVK3cRsIcDpUpcKDgAHuTh/iSntgq8rmiULpLDi0h16wHrC9SF8bHKrwsY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954887924796.5038496447922; Fri, 31 Dec 2021 04:48:07 -0800 (PST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-503-UahCR82AODyB36kU_Oz-sw-1; Fri, 31 Dec 2021 07:48:06 -0500 Received: by mail-wr1-f69.google.com with SMTP id g6-20020adfbc86000000b001a2d62be244so6238215wrh.23 for ; Fri, 31 Dec 2021 04:48:05 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id r7sm25915338wrt.77.2021.12.31.04.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954887; 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=w+4sOFVvGeEBA7BnPdfDCmGmrSKk6Q3SFRcpoINpXLs=; b=WjT3nnVcpn996B/KLPepHl0FNciZIifax+7FLZwoKdqnnefLx6y4JgHxHXRnTmLtB8WS4+ PLEm7cMjQsg6LsnV0/I5omnBaUXXEBZSQsN8VOowXZFFPPqKf2soXjVhyEh9jS3PfJsn/w jZB4ic3AE/5JnSlp7gbH8XkmO3U2S00= X-MC-Unique: UahCR82AODyB36kU_Oz-sw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w+4sOFVvGeEBA7BnPdfDCmGmrSKk6Q3SFRcpoINpXLs=; b=ViKYPMJpikUz4kCrnyxIiaUgikZZ2h0sDt8ofWNY8YM51yRJfvcI3VU9ghizRboUk+ EKPaKxbDL5NXI8BVfXZ6Ys7pj6YokcyWAABQ4TzGqj3P3tPoDPbkd1wyMxKBDJoVcgQr Jf2REasMZ/u7LBGdWsToXcrBbxEAlOUsqzCcfw0zMIGDyn/s9wdB6ZaKZ922JLkIOJAx Z5fAZFGgEpxS/MbO1SHmO6bG4SShTs2oeMymi+Cl73b+bUHu1lV1C24wsRtywB4v+xLa LtnBs7dlaLjsixXM0V7llQg7A0hGRvaSwxNbSalSHqsAJKaZlZ7a1FWLSLUk2znlrd4/ AXCg== X-Gm-Message-State: AOAM531x5xAeT+HmkSymu6VOe109jXNMLJ2NXERLCrgZtUUavdke5+it ngmwWZUbT6KGOIu2IIf+y4v5bumqrxq51+AEPWuKIHbM8JEekooWqV/odJ/oKnlL3dPmG7jt1KG e8qRc9oZAbQITAg== X-Received: by 2002:a5d:5552:: with SMTP id g18mr29566583wrw.488.1640954884853; Fri, 31 Dec 2021 04:48:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLVTENjJV+R2FLSYKqDJYJt9nlJEAyU3i2Iu97NnYhrmRKk/KTo07di/XWcmiH/9jMF9bLIg== X-Received: by 2002:a5d:5552:: with SMTP id g18mr29566569wrw.488.1640954884653; Fri, 31 Dec 2021 04:48:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/20] hw/qdev: Correct qdev_init_gpio_out_named() documentation Date: Fri, 31 Dec 2021 13:47:36 +0100 Message-Id: <20211231124754.1005747-3-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954890574000001 From: Philippe Mathieu-Daud=C3=A9 qdev_init_gpio_out_named() is described as qdev_init_gpio_out(), and referring to itself in an endless loop, which is confusing. Fix. Reported-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yanan Wang Message-Id: <20211218130437.1516929-3-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/qdev-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 59a822ffceb..dcf20c69b89 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -621,7 +621,7 @@ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handl= er handler, int n); void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pins, int n); =20 /** - * qdev_init_gpio_out: create an array of named output GPIO lines + * qdev_init_gpio_out_named: create an array of named output GPIO lines * @dev: Device to create output GPIOs for * @pins: Pointer to qemu_irq or qemu_irq array for the GPIO lines * @name: Name to give this array of GPIO lines --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954892; cv=none; d=zohomail.com; s=zohoarc; b=egce2J7K+6RDWunb+Z38IZpstKB1VN4xj5z4dXRKtSKC+miwt2Y9M7Kys6TnsCdRkXINeccVoCpF5O+npQYkkhTR0FQuWE3k19La1aePAzAqHXj2O2ofZkQWK1fibMJHwS8BOTg7Jp5TCw4X+eqa/MsPXB34gUfmu+YDWOb/oWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954892; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JTqiL35hH/fnhlD9CAtxeQRLllRocCsMZlpBqswrwZk=; b=U99ryr6kULsH18XXOH2TsbfKoV/Fr157VKnfyTWIxkn3jE9ZDoFumqDSnGDdcqJDWku7p9m+kz5FrGVrlvKnncC0Y7rXGpg0xFW+b6WRcb/vIwTVYPkcjWKFQoTVSdBtuI0LwPFX0sAou+SPJJVb7Qs7opbgptzj5K2c+3phsmw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954892345587.5832610486789; Fri, 31 Dec 2021 04:48:12 -0800 (PST) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-477-N1Y9j-_oPP2-pZr3InMgQA-1; Fri, 31 Dec 2021 07:48:10 -0500 Received: by mail-wr1-f71.google.com with SMTP id v15-20020adf8b4f000000b001a24c46d6ceso7535149wra.15 for ; Fri, 31 Dec 2021 04:48:10 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id y11sm31550168wry.70.2021.12.31.04.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954891; 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=JTqiL35hH/fnhlD9CAtxeQRLllRocCsMZlpBqswrwZk=; b=ECoZA3aVdYDNAbEVAnHxFuqa1wG7lG+yfJ7d/4v6cQoWLYbMe252qjx+SQjoRXOtuGIFfA bF/qnVnxFnYXehkOSoKstrv/WaryJ4rorj+O8auI5Qu4Gx82FUmCCKYKfR1wX/1lSRMBpL 8FUne6kLuVQEshrQREk20GaXu/k30No= X-MC-Unique: N1Y9j-_oPP2-pZr3InMgQA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JTqiL35hH/fnhlD9CAtxeQRLllRocCsMZlpBqswrwZk=; b=v7lHpDb/8Mp+Ts4Yak6MBTWUDvYuzoCaix7I8k+3BhMNcIXu9S/1WkNOafHDZspt6w m8wSk1K3VJyChE7RqMc9rwC+ABzhGuDdWsr25XSzrWDzNnnfL18Ryyd3oHfOzQzwlyfz 91Z5O/kC7YVaGWvKgZOkkhP7Ua+6YV+fSIccgujeab367qzhpZ5NkOijdrjEYYoEbNNv GpXyD+jPK2DdVE+aI6vht+c2ghs+p6FNDZscUv0WUeysAA9HImqr5J3ehJuta40Dvjl5 ROKg4CObCIi8fGIPY0MBhSZ4LC9JTyZWaElSRvHAL6J7co1jAugqZ5/9qXxmXD/mEnAq 4xZA== X-Gm-Message-State: AOAM533j3uFHiXyiRSSZCuY8ijQZuc8bl+tDsR84MIJmlkcQmDDXsLjk XTVhmvd2W9gdTweq1J1oxz0pxuDJPQnWNUf+BsXZt6L0RMZKDcL51hgtsjMolcbqDtYvJNtLzxa MRemn2uX4zYV9EA== X-Received: by 2002:a5d:6d8a:: with SMTP id l10mr29419132wrs.527.1640954889202; Fri, 31 Dec 2021 04:48:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwr/EmqueGAyqLvgcx4UNeUxXdD+Kd40nXpHzxituCIozj2AWoPC+VvUnNH9ocWmeRXHzswhg== X-Received: by 2002:a5d:6d8a:: with SMTP id l10mr29419120wrs.527.1640954889066; Fri, 31 Dec 2021 04:48:09 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 03/20] hw/qdev: Correct qdev_connect_gpio_out_named() documentation Date: Fri, 31 Dec 2021 13:47:37 +0100 Message-Id: <20211231124754.1005747-4-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954894796000001 From: Philippe Mathieu-Daud=C3=A9 qdev_connect_gpio_out_named() is described as qdev_connect_gpio_out(), and referring to itself in an endless loop, which is confusing. Fix. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yanan Wang Message-Id: <20211218130437.1516929-4-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/qdev-core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index dcf20c69b89..424c48daf6e 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -504,7 +504,8 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const= char *name, int n); void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin); =20 /** - * qdev_connect_gpio_out: Connect one of a device's anonymous output GPIO = lines + * qdev_connect_gpio_out_named: Connect one of a device's named output + * GPIO lines * @dev: Device whose GPIO to connect * @name: Name of the output GPIO array * @n: Number of the anonymous output GPIO line (which must be in range) @@ -526,7 +527,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); * qemu_irqs at once, or to connect multiple outbound GPIOs to the * same qemu_irq; see qdev_connect_gpio_out() for details. * - * For named output GPIO lines, use qdev_connect_gpio_out_named(). + * For anonymous output GPIO lines, use qdev_connect_gpio_out(). */ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, qemu_irq pin); --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954896; cv=none; d=zohomail.com; s=zohoarc; b=lbE2lRkAnZrc6ty3hLAtQAKQZfT+2oDyfTRRJVqlt6W5pcKd43sNBFbPqf6p1HCyjh/2jycWRztPzSPlGaJ9DHGoxMZSjPtJmHRBfmleMRon7EI9pC4VbXSNZDTS4MA74WYSLZSbbUVMmClPBFd04lQy+D7a+tEyF0CL3k6BM5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954896; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uQrjre6Db1sZNkT4sskEN8IBgNsCcPmlEpkvvQNs6e4=; b=YCK3LieR9GmR4IsCuw3nFWx8ZJz3K5vW1aZqH1utNHll9xdtR5u66EqNplaLKDdCE5tuww3SymdPOHL2tvIggLLdSu4CNt4GXFdCQjUYitDF/y/9FFo9N14cNLBL+5THWk+fKAfHsEF++y5hUwA7hqPKWnY8+oKxjiZFgw+AM+c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954896906780.9850931583983; Fri, 31 Dec 2021 04:48:16 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-7-xP0t0e2LPA-NQpIVRLWe9g-1; Fri, 31 Dec 2021 07:48:14 -0500 Received: by mail-wr1-f70.google.com with SMTP id t30-20020adfa2de000000b001a24004e1fbso7514530wra.10 for ; Fri, 31 Dec 2021 04:48:14 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id g6sm27436067wri.67.2021.12.31.04.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954896; 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=uQrjre6Db1sZNkT4sskEN8IBgNsCcPmlEpkvvQNs6e4=; b=JZO+Wzo5fvgLhBsdymW1W8HZjZoqw/hfiC9x46R3w50k1nYqBpNAzW0Key9dTNM+lcTdQG oSyy1g9drjCr4IwrZLY9EkC6QFITOwvvWDL1BQKUc3pkFlVaD+l+er8zq1Ps2aqvjoe9aB wQZRSX9xk84DexgcVKOGgU0aj1tu2u4= X-MC-Unique: xP0t0e2LPA-NQpIVRLWe9g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uQrjre6Db1sZNkT4sskEN8IBgNsCcPmlEpkvvQNs6e4=; b=V4vbtK1gSUr1cz4h65qOgU+Oh6oxCPAdrHMyKkTxTm++X2Jh3CoeSUb1hYpgA77rG6 8h2/4t4fPLmxLuushB3C1wR7tfF58os6ekvOfyfDE3J1JefLSuLIOfwdMP0zQW2y2wG/ qJ9BZHFm0/H0qIZuxhnOs0J2n7KcwGwLlMnaxGW8cvSwwn+HYmM9pCM+1DAoeSFUaUnT YC9DYKN8L1IVgErbxwdahcHxpzKuU7PRrx0kcXeQc5kRgJIJ/tnJZLRJIX5DJ28Nk0So hJzuI6D4pbJDSLjhN54CTxD4mwuKQwkZjk8el5L9bq0fXULJv5H9LM6rz6sytK9iRYv1 EqPQ== X-Gm-Message-State: AOAM5335aQwIfMThMcfSJZltGBx+n2drslW8dBUHtbpND+X2vFshvk1n LHZEgUTZnJCs7CzXb8BLRpUTZpqFlzhhytaMKWQTjIQSg36SXtTL6TfCExVmh3zeUjfPUZIYpMM +4ij2Esj3iS1W3A== X-Received: by 2002:a5d:488a:: with SMTP id g10mr15576223wrq.653.1640954893572; Fri, 31 Dec 2021 04:48:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzj64MCdxk3k9Hhr8hj4/AtZ9Fw4XMI0Tl40rrw40U5RcpByN32mz7ctTQDt60mIgKX5OMRdg== X-Received: by 2002:a5d:488a:: with SMTP id g10mr15576206wrq.653.1640954893349; Fri, 31 Dec 2021 04:48:13 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 04/20] hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter Date: Fri, 31 Dec 2021 13:47:38 +0100 Message-Id: <20211231124754.1005747-5-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954898068000001 From: Philippe Mathieu-Daud=C3=A9 @pin is an input where we connect a device output. Rename it @input_pin to simplify the documentation. Reviewed-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211218130437.1516929-5-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/qdev-core.h | 6 +++--- hw/core/gpio.c | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 424c48daf6e..d19c9417520 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -476,7 +476,7 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const= char *name, int n); * qdev_connect_gpio_out: Connect one of a device's anonymous output GPIO = lines * @dev: Device whose GPIO to connect * @n: Number of the anonymous output GPIO line (which must be in range) - * @pin: qemu_irq to connect the output line to + * @input_pin: qemu_irq to connect the output line to * * This function connects an anonymous output GPIO line on a device * up to an arbitrary qemu_irq, so that when the device asserts that @@ -509,7 +509,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); * @dev: Device whose GPIO to connect * @name: Name of the output GPIO array * @n: Number of the anonymous output GPIO line (which must be in range) - * @pin: qemu_irq to connect the output line to + * @input_pin: qemu_irq to connect the output line to * * This function connects an anonymous output GPIO line on a device * up to an arbitrary qemu_irq, so that when the device asserts that @@ -530,7 +530,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); * For anonymous output GPIO lines, use qdev_connect_gpio_out(). */ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, - qemu_irq pin); + qemu_irq input_pin); =20 /** * qdev_get_gpio_out_connector: Get the qemu_irq connected to an output GP= IO diff --git a/hw/core/gpio.c b/hw/core/gpio.c index 8e6b4f5edf3..80d07a6ec99 100644 --- a/hw/core/gpio.c +++ b/hw/core/gpio.c @@ -115,17 +115,18 @@ qemu_irq qdev_get_gpio_in(DeviceState *dev, int n) } =20 void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, - qemu_irq pin) + qemu_irq input_pin) { char *propname =3D g_strdup_printf("%s[%d]", name ? name : "unnamed-gpio-out", n); - if (pin && !OBJECT(pin)->parent) { + if (input_pin && !OBJECT(input_pin)->parent) { /* We need a name for object_property_set_link to work */ object_property_add_child(container_get(qdev_get_machine(), "/unattached"), - "non-qdev-gpio[*]", OBJECT(pin)); + "non-qdev-gpio[*]", OBJECT(input_pin)); } - object_property_set_link(OBJECT(dev), propname, OBJECT(pin), &error_ab= ort); + object_property_set_link(OBJECT(dev), propname, + OBJECT(input_pin), &error_abort); g_free(propname); } =20 @@ -165,9 +166,9 @@ qemu_irq qdev_intercept_gpio_out(DeviceState *dev, qemu= _irq icpt, return disconnected; } =20 -void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin) +void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq input_pin) { - qdev_connect_gpio_out_named(dev, NULL, n, pin); + qdev_connect_gpio_out_named(dev, NULL, n, input_pin); } =20 void qdev_pass_gpios(DeviceState *dev, DeviceState *container, --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954900; cv=none; d=zohomail.com; s=zohoarc; b=F2fC6vEtjqW4U2Hok9GSpFlwsahrHE8JSh+2s6YaJPAcy2yIYdw/gUMv2IlmM3Q7DhA2q8CmWLYdGC4vWizBWS+wSYJ7hq6C4RewFmq+PMjNEpwwQkeSfQmAc0YHCdF+xNLX4WYnDRTbjTuxVGDv7mAdkbyDIWuuJyyzPde8XFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954900; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=xmB2pjpPBRixvCwzPKhtMpmRFUaHeigjOeRVD50Cfio=; b=dpfO6/9z+eqXXaOW9QdRGlTxU5SK2a/7sM3lZoFpnk6xbNV/WAP94B5qbCHLIh+Jurz8wfGu3jhJHwbxXAgs6JrCZ6GKbpCr2gQR91i5bxAG+hgNCEVa+mzECjvdVFspq/lcBQ6qhwXR4ZwcCe3ix2S+od36eNGI/DiP00qoGNQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954900760800.1680692689588; Fri, 31 Dec 2021 04:48:20 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-249-JCxV63l-NFSqHW17CZG4UA-1; Fri, 31 Dec 2021 07:48:18 -0500 Received: by mail-wr1-f70.google.com with SMTP id r9-20020adfb1c9000000b001a2981d9356so7542481wra.20 for ; Fri, 31 Dec 2021 04:48:18 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id n12sm29245382wrf.29.2021.12.31.04.48.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954900; 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=xmB2pjpPBRixvCwzPKhtMpmRFUaHeigjOeRVD50Cfio=; b=S2eJcC8nLqFyPr0p002FeUR7pI/RFZJ+G6WGE/9dMRghQu39BecATaljpg2aULW3AmZMbz GXjGjoEh/cBWBIfgWqD8mJHAEtxI57E16rNW8ta99YPLLmJK9ahvKD5YelJfUWglnGSqpB ruY1iYYPChrGvRmLgNEVHqIdl0r/bQ8= X-MC-Unique: JCxV63l-NFSqHW17CZG4UA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xmB2pjpPBRixvCwzPKhtMpmRFUaHeigjOeRVD50Cfio=; b=D3XYsKCd2YhbHoptXXTMcssI1rZWmSjaY7gK91PMN+du5LKKDu+UR/I54V+t8Z42N2 g5qKEn3teSRfgDm+P4xMNa1QAbWdrVzpKQCto3pzeDucHYt3tAQEyvHrAaqlYmghzc9P XpiPvrNERDoucRVWDbLG2Md59akxew50p0PAYQXlF/uUNPYUCXJXIj0iOCLk0T06JGUM Ciq0Tszkg9DWnUFbCMAssqNskp+ssSJw3czpVFUTlxRtvAM3rH5WdyA6rPNg5i9o3+iw obgIU3td69LvJo1bt1qJwRiGGI5LkLWpks88aXiZ5EqWfzV8krgmbZ8tq+X0J1zbmJG4 aFjg== X-Gm-Message-State: AOAM530hCa8vOiwAGuU2eMD2dZ0mRIcGw8Cyq/N+v0+qbAksXxkL6veW XQyaRT+bGFjQPZjuNzPwA7S9I01DYIfg6MLkNrePCZG+H+0cN+s824O059Rj3vUUxIfCdXLGoiw rSMoPP05EMfQuew== X-Received: by 2002:a05:6000:108a:: with SMTP id y10mr28770147wrw.335.1640954897842; Fri, 31 Dec 2021 04:48:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGpX+LsFprT8hw+VLP7mQuNE1tHjfABBtig5YpWxcStgP8CjRRA5QN/vTAZNPggMwuurC+fQ== X-Received: by 2002:a05:6000:108a:: with SMTP id y10mr28770140wrw.335.1640954897698; Fri, 31 Dec 2021 04:48:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 05/20] tests/unit/test-smp-parse: Pass machine type as argument to tests Date: Fri, 31 Dec 2021 13:47:39 +0100 Message-Id: <20211231124754.1005747-6-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954902272000001 Use g_test_add_data_func() instead of g_test_add_func() so we can pass the machine type to the tests (we will soon have different machine types). Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211216132015.815493-2-philmd@redhat.com> --- tests/unit/test-smp-parse.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index b02450e25a3..37c6b4981db 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -487,9 +487,10 @@ static void machine_base_class_init(ObjectClass *oc, v= oid *data) mc->name =3D g_strdup(SMP_MACHINE_NAME); } =20 -static void test_generic(void) +static void test_generic(const void *opaque) { - Object *obj =3D object_new(TYPE_MACHINE); + const char *machine_type =3D opaque; + Object *obj =3D object_new(machine_type); MachineState *ms =3D MACHINE(obj); MachineClass *mc =3D MACHINE_GET_CLASS(obj); SMPTestData *data =3D &(SMPTestData){{ }}; @@ -525,9 +526,10 @@ static void test_generic(void) object_unref(obj); } =20 -static void test_with_dies(void) +static void test_with_dies(const void *opaque) { - Object *obj =3D object_new(TYPE_MACHINE); + const char *machine_type =3D opaque; + Object *obj =3D object_new(machine_type); MachineState *ms =3D MACHINE(obj); MachineClass *mc =3D MACHINE_GET_CLASS(obj); SMPTestData *data =3D &(SMPTestData){{ }}; @@ -599,8 +601,12 @@ int main(int argc, char *argv[]) =20 g_test_init(&argc, &argv, NULL); =20 - g_test_add_func("/test-smp-parse/generic", test_generic); - g_test_add_func("/test-smp-parse/with_dies", test_with_dies); + g_test_add_data_func("/test-smp-parse/generic", + TYPE_MACHINE, + test_generic); + g_test_add_data_func("/test-smp-parse/with_dies", + TYPE_MACHINE, + test_with_dies); =20 g_test_run(); =20 --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954905; cv=none; d=zohomail.com; s=zohoarc; b=JYBuQbsQ3qJTuvjmly9OIvWSInZ0cWou0gXVltXCi85FZemq4VM5CzS0jR/3obVoxmdzxg159kWvo6LZ/vfS+pCWpEgCmYUtnvPJD+MMWiZsj1GT/OUiprcfYT7xHQUkxnNtf9H0DAsdsIsbeJvc2BxV6jJymyYyskvCrRFs4QM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954905; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=xnirtv3DDKZob6GdBwHAAuf1H+WbvfHFWSgEQSJCoyk=; b=borX7v03CAKPmEMAOVv2CE4rM+nuO79U55zy5oTHGHCMZfuX77vho7HjG/LlHVLLbIWVSP3ZAgpqicb7mihi6FjM8IG/jfuRaqFWvjkJbAi5cpP0kT74mAV2MzhwMAtTcZ5tjLC5a9zn5iXukrO8QGjx22GZGBLkkwq/YqWY2KU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954905089245.5043147685535; Fri, 31 Dec 2021 04:48:25 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-3a_gG_jQOjqhX1seSW5xKQ-1; Fri, 31 Dec 2021 07:48:23 -0500 Received: by mail-wr1-f70.google.com with SMTP id v6-20020adfa1c6000000b001a26d0c3e32so7474568wrv.14 for ; Fri, 31 Dec 2021 04:48:22 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id i8sm27098781wmq.4.2021.12.31.04.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954904; 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=xnirtv3DDKZob6GdBwHAAuf1H+WbvfHFWSgEQSJCoyk=; b=bzmJiQAPeqCFvskXUt+qNHuatjMEwd4a4hlOvXxYhVD6CnOVo+w5711OMfUQ3DVChA+kEZ +01w/L2XyFlg+ZZi803A3n7GyPOAjkGPuf2rQ4Knk4+RtjGElWPO8HH4wsdoIilADUoQfS ZPmRg92M/Iv2fpgCiKrgRDkye7/zbAE= X-MC-Unique: 3a_gG_jQOjqhX1seSW5xKQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xnirtv3DDKZob6GdBwHAAuf1H+WbvfHFWSgEQSJCoyk=; b=KfqCIp1C7Rj0pk3APypNhG1ysWyQjYj4YHhhRIZoxNtJaqvMC98jzL9iFzhzdBgADb GzkQiXfBq8dEGsnXNAR2xubA91G8UUuBHyKpS8AwwHiGtu2Q+rXQRsHLys0qdEPk69+8 TYeSwxGEpbx9HYeyek2FGrxJa7VEDuSdKG1kw9Uaas6539MFEhrwQ8IjiRs7SCkpcP1F i0w0g9nExs4YUa9z9Hx9trEIJE1Neg2NpHOUgHX3tGE+mgKNqTnUUUR8SlhVLpTNKtiE AZssYW82ht/NDRriHnkpqRWbv9Ms/BB/Lfw1yeVNfA+d8KwyTR/9sLSmBiwybPFolDGM pFuA== X-Gm-Message-State: AOAM533VogFWVOXObLW5bbZxllsLB6irZuX5uT138n7k1ZIIdsHFXQXk ErLCiw6ZKhzmSk00yw/YMnzqhMTNBaDcSFx8PTgGK1uQoTYzRX+J6wmE4XZY7AIZKGrnqpVGjmx kUzE/bY1J0EHa6Q== X-Received: by 2002:a5d:608a:: with SMTP id w10mr27929588wrt.596.1640954902009; Fri, 31 Dec 2021 04:48:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGpjjk4tzWjiPHjEdm1o8BkJteGLRBGEKRaLEhLNX1O1ySxoGayuX1MD+2dg7MQyDSpgtMDQ== X-Received: by 2002:a5d:608a:: with SMTP id w10mr27929581wrt.596.1640954901873; Fri, 31 Dec 2021 04:48:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 06/20] tests/unit/test-smp-parse: Split the 'generic' test in valid / invalid Date: Fri, 31 Dec 2021 13:47:40 +0100 Message-Id: <20211231124754.1005747-7-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954906912000001 Split the 'generic' test in two tests: 'valid' and 'invalid'. This will allow us to remove the hack which modifies the MachineClass internal state. Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211216132015.815493-3-philmd@redhat.com> --- tests/unit/test-smp-parse.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 37c6b4981db..425ed6b6b92 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -487,7 +487,7 @@ static void machine_base_class_init(ObjectClass *oc, vo= id *data) mc->name =3D g_strdup(SMP_MACHINE_NAME); } =20 -static void test_generic(const void *opaque) +static void test_generic_valid(const void *opaque) { const char *machine_type =3D opaque; Object *obj =3D object_new(machine_type); @@ -508,6 +508,18 @@ static void test_generic(const void *opaque) smp_parse_test(ms, data, true); } =20 + object_unref(obj); +} + +static void test_generic_invalid(const void *opaque) +{ + const char *machine_type =3D opaque; + Object *obj =3D object_new(machine_type); + MachineState *ms =3D MACHINE(obj); + MachineClass *mc =3D MACHINE_GET_CLASS(obj); + SMPTestData *data =3D &(SMPTestData){}; + int i; + /* Force invalid min CPUs and max CPUs */ mc->min_cpus =3D 2; mc->max_cpus =3D 511; @@ -601,9 +613,12 @@ int main(int argc, char *argv[]) =20 g_test_init(&argc, &argv, NULL); =20 - g_test_add_data_func("/test-smp-parse/generic", + g_test_add_data_func("/test-smp-parse/generic/valid", TYPE_MACHINE, - test_generic); + test_generic_valid); + g_test_add_data_func("/test-smp-parse/generic/invalid", + TYPE_MACHINE, + test_generic_invalid); g_test_add_data_func("/test-smp-parse/with_dies", TYPE_MACHINE, test_with_dies); --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954909; cv=none; d=zohomail.com; s=zohoarc; b=c66gm/2f3MzCXIVc2SnMaiwDdDG60B4dXHTKjgS+RcRUoSt6nAt2gnk3Y/F3ENlazpcYb9Fracx6JuePsW1HpZ9aAvx9+fCn/m6o797fzw709RdQg68MIspJZ4fSLsAQAwG1LjzEfb/KpLrWHJNLYM6FiNsYFClK7kL2pRLXdYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954909; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=LZnXNA41P8rnHQZzG3aZIcc3lAwNKADYkmB/wiXRFOM=; b=KgbRN1VvfFnCUqUvMw+xN3t0RJ88CL3zVh4aX0TW/6xx/vrlFnoSUokttbREg0nMWkut16AvsZfA2Q4oDycCMqh3Wgcbm8ih/Ph8fXHEdTgRspl97Q0m5kd4VfFeQtfG+G2X1S+E3uj1jGtTyDi5qTAeixRRAfdBvUaZ1UOuNW0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954909354717.1646987245413; Fri, 31 Dec 2021 04:48:29 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-553-Sl6t0Gm3MXaOMEfQ1W3XAw-1; Fri, 31 Dec 2021 07:48:27 -0500 Received: by mail-wr1-f70.google.com with SMTP id d13-20020adf9b8d000000b001a2aa837f8dso7537615wrc.3 for ; Fri, 31 Dec 2021 04:48:27 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id o12sm26897129wrv.76.2021.12.31.04.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954908; 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=LZnXNA41P8rnHQZzG3aZIcc3lAwNKADYkmB/wiXRFOM=; b=AGPsh1Vxqy2YJsgeEP7nbDnr/qPp5iRFKcOoG+PHu51uJ8syrw+7i1iAA06BE9UsE0BFGj 2TOPZ96uPfU3ORBgsQlugI9YWNYvXeUhRq0QBdZiddlsPsvFuJmvUmfybK1m/L6GlYoEvN EcG8DXjWSAzU3fkzYy8hMVdIDJWpvNQ= X-MC-Unique: Sl6t0Gm3MXaOMEfQ1W3XAw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LZnXNA41P8rnHQZzG3aZIcc3lAwNKADYkmB/wiXRFOM=; b=byugPFCT3l05Y7elk0fYXSryHIGjSabY25mVrGCgRaBE0dB+E0TCJCP+WBaNfCAs3R SUpbg7XWYDXX8Tzo2HlkRzHoffM/kMHZRWfgGPaDGEJHpBMsQb4tBcGGVtrunHm55ex/ qrCyDGSm5PdwtAbEOiIUHtL/NnDqlAGjwxHf4c0Djzo4dJLqfaLHKVDqjPXIlD8pmp7Y YWKSsAJVtmLAXABc95qta55SHpal/rIqctOI1IjmNIa2iMer4UkVDID84VgBcxr/OXoH OPFViQdSznKCRGuNZy4avdwVLtThlx78XazeZsHkczJ67hRKkmMJ2dTlBVyhwG85HFqg uJlA== X-Gm-Message-State: AOAM532fahtZVRdVnBY0kFI01Fa68Zn1Nu5TMjHp0NQpFrFkTglDTs5l 0Wse20hloAXQ3qcR7pLnEmXX2x7M8cZFa5pyPwc0qSyvY77RHMHHqI1jJrNwQbDj47b0EN35TwJ N8t2TXJ9l+iuKMQ== X-Received: by 2002:a05:600c:1c26:: with SMTP id j38mr29484086wms.101.1640954906387; Fri, 31 Dec 2021 04:48:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyKs2Fn/4Ysvytqby1xZZsHJbDEmw2T9jWMcZMHMLmEooeT9Tc58gFht5kTWivmv8ogzCxsw== X-Received: by 2002:a05:600c:1c26:: with SMTP id j38mr29484075wms.101.1640954906190; Fri, 31 Dec 2021 04:48:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 07/20] tests/unit/test-smp-parse: Add 'smp-with-dies' machine type Date: Fri, 31 Dec 2021 13:47:41 +0100 Message-Id: <20211231124754.1005747-8-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954911450000001 Avoid modifying the MachineClass internals by adding the 'smp-with-dies' machine, which inherits from TYPE_MACHINE. Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211216132015.815493-4-philmd@redhat.com> --- tests/unit/test-smp-parse.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 425ed6b6b92..f66cf7bb598 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -487,6 +487,16 @@ static void machine_base_class_init(ObjectClass *oc, v= oid *data) mc->name =3D g_strdup(SMP_MACHINE_NAME); } =20 +static void machine_with_dies_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + + mc->min_cpus =3D MIN_CPUS; + mc->max_cpus =3D MAX_CPUS; + + mc->smp_props.dies_supported =3D true; +} + static void test_generic_valid(const void *opaque) { const char *machine_type =3D opaque; @@ -548,9 +558,6 @@ static void test_with_dies(const void *opaque) unsigned int num_dies =3D 2; int i; =20 - /* Force the SMP compat properties */ - mc->smp_props.dies_supported =3D true; - for (i =3D 0; i < ARRAY_SIZE(data_generic_valid); i++) { *data =3D data_generic_valid[i]; unsupported_params_init(mc, data); @@ -588,9 +595,6 @@ static void test_with_dies(const void *opaque) smp_parse_test(ms, data, false); } =20 - /* Restore the SMP compat properties */ - mc->smp_props.dies_supported =3D false; - object_unref(obj); } =20 @@ -602,6 +606,10 @@ static const TypeInfo smp_machine_types[] =3D { .class_init =3D machine_base_class_init, .class_size =3D sizeof(MachineClass), .instance_size =3D sizeof(MachineState), + }, { + .name =3D MACHINE_TYPE_NAME("smp-with-dies"), + .parent =3D TYPE_MACHINE, + .class_init =3D machine_with_dies_class_init, } }; =20 @@ -620,7 +628,7 @@ int main(int argc, char *argv[]) TYPE_MACHINE, test_generic_invalid); g_test_add_data_func("/test-smp-parse/with_dies", - TYPE_MACHINE, + MACHINE_TYPE_NAME("smp-with-dies"), test_with_dies); =20 g_test_run(); --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954913; cv=none; d=zohomail.com; s=zohoarc; b=OJixaO4guRBjKlpqCTbSzfQF1sYFI3QerfDr8rbzdWxL1KYWcVOI3i9zZ6sr3vuwhXAK45Azm1Psj1lkieJFfl19uZHIrZmyAtCbHcg115CxsTL6EC4Z5Z/lCOxXgpDFylLmL9Hdvw+mJsL7r+t819brGqjhuRLLuqdyCW7hjH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954913; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=pjJ0UEI6mxoPBPhQ4qwChpI2WWsxbhsBTViV87e9vj8=; b=CRSYNKZ7Dy4Ik2ic2DCCTn5d7IcliaXik9hhkxdy8A9MDIOMk+I+Vtnm1wrsmfQAS/rc1oNgbF1aftSzcTuFnYMd9+eG2g3Us1LIWqkJub/C6HENv0LQNrqLEn/KeRlkOrDaOXUztzdt0ip7kG/s7IxenxrbUahNF51llpSDfFQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954913956285.5047355156604; Fri, 31 Dec 2021 04:48:33 -0800 (PST) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-107-hdAd0J1vNCOjmEAGwRZiIw-1; Fri, 31 Dec 2021 07:48:31 -0500 Received: by mail-wr1-f71.google.com with SMTP id v15-20020adf8b4f000000b001a24c46d6ceso7535510wra.15 for ; Fri, 31 Dec 2021 04:48:31 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id i4sm28833365wmd.34.2021.12.31.04.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954913; 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=pjJ0UEI6mxoPBPhQ4qwChpI2WWsxbhsBTViV87e9vj8=; b=fX0TN9c0OZsCx732xvpoaSC4GFGDP6CCugIHkYri8Dt4mxqQyfsUMhP/yDDsrZ/P7Y8zYI ULBKsjvRCg9RrTCFukPdWq8aYqrYuGKiywMD8kxnqIks+Sh5hdeqOoHyYLyXlJJ+n+uDRN IEWbtltUzjmD/Bl/x9IFAmDkulxXT3U= X-MC-Unique: hdAd0J1vNCOjmEAGwRZiIw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pjJ0UEI6mxoPBPhQ4qwChpI2WWsxbhsBTViV87e9vj8=; b=h6YTxmHR7dHbJv3xOJVqwsA0ZqhLFJSrZW6cEET7QTGz7RLOYiPr1aMcEDRkeydgzT NdyuflzXBmUvh2PbMfGgeNhVhaYVORS56vfcbo1HYCSiKau57FVw2Tp31WSuMbJP6rG0 sRIp0jJBgHoLv/rqZr2Sg0ZtIxKzHYoWG34LHFYqmtbw5+8Y/tZDSqHSeXo+RuiYekGE 1r9REzOKc6xUXsImEZkh5XEUnZIojrAMm8bb3vkEdFKoC/fF1vVV1duabdTNMW3oGvZT RdFeC/qx4XC5KqetsRYtLQtEtNBEQPBttZioaJmfArGwy9hXOc4JxV6MSXRoudOk4Ygz Jg2w== X-Gm-Message-State: AOAM530YulxSGRrGXlwNHTTDmARCJHLMKIEGj/f3YihKr2qa6ZkMDTHS Doy2Avme+ElHsBRn+a8zZoVuKkL2auoWr+hFBCcJkJQe+bX+lKqytvo7J8Y9kwnVCX/hNm9kJYo wbmh+WsA2KjoMkA== X-Received: by 2002:a5d:5847:: with SMTP id i7mr14528731wrf.450.1640954910719; Fri, 31 Dec 2021 04:48:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwytI4jANY9FirMbwDS536/kl1pGIL8C8dk6hG/uhRuLHAFY7TSpsl/85aQQT/F8wlj1+Sw0Q== X-Received: by 2002:a5d:5847:: with SMTP id i7mr14528723wrf.450.1640954910588; Fri, 31 Dec 2021 04:48:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 08/20] tests/unit/test-smp-parse: Add 'smp-generic-invalid' machine type Date: Fri, 31 Dec 2021 13:47:42 +0100 Message-Id: <20211231124754.1005747-9-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954914443000001 Avoid modifying the MachineClass internals by adding the 'smp-generic-invalid' machine, which inherits from TYPE_MACHINE. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yanan Wang Message-Id: <20211216132015.815493-5-philmd@redhat.com> --- tests/unit/test-smp-parse.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index f66cf7bb598..47e11089e22 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -487,6 +487,17 @@ static void machine_base_class_init(ObjectClass *oc, v= oid *data) mc->name =3D g_strdup(SMP_MACHINE_NAME); } =20 +static void machine_generic_invalid_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + + /* Force invalid min CPUs and max CPUs */ + mc->min_cpus =3D 2; + mc->max_cpus =3D 511; + + mc->smp_props.dies_supported =3D false; +} + static void machine_with_dies_class_init(ObjectClass *oc, void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); @@ -530,10 +541,6 @@ static void test_generic_invalid(const void *opaque) SMPTestData *data =3D &(SMPTestData){}; int i; =20 - /* Force invalid min CPUs and max CPUs */ - mc->min_cpus =3D 2; - mc->max_cpus =3D 511; - for (i =3D 0; i < ARRAY_SIZE(data_generic_invalid); i++) { *data =3D data_generic_invalid[i]; unsupported_params_init(mc, data); @@ -541,10 +548,6 @@ static void test_generic_invalid(const void *opaque) smp_parse_test(ms, data, false); } =20 - /* Reset the supported min CPUs and max CPUs */ - mc->min_cpus =3D MIN_CPUS; - mc->max_cpus =3D MAX_CPUS; - object_unref(obj); } =20 @@ -606,6 +609,10 @@ static const TypeInfo smp_machine_types[] =3D { .class_init =3D machine_base_class_init, .class_size =3D sizeof(MachineClass), .instance_size =3D sizeof(MachineState), + }, { + .name =3D MACHINE_TYPE_NAME("smp-generic-invalid"), + .parent =3D TYPE_MACHINE, + .class_init =3D machine_generic_invalid_class_init, }, { .name =3D MACHINE_TYPE_NAME("smp-with-dies"), .parent =3D TYPE_MACHINE, @@ -625,7 +632,7 @@ int main(int argc, char *argv[]) TYPE_MACHINE, test_generic_valid); g_test_add_data_func("/test-smp-parse/generic/invalid", - TYPE_MACHINE, + MACHINE_TYPE_NAME("smp-generic-invalid"), test_generic_invalid); g_test_add_data_func("/test-smp-parse/with_dies", MACHINE_TYPE_NAME("smp-with-dies"), --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954917; cv=none; d=zohomail.com; s=zohoarc; b=PhfpPCw7fRAGeID91+uHuZ56QdiwUTmUGceqpXlsfEC/g0UWNUmUqMgEsbHYaFnNRsMstAngByoD63lxBvlWMbmFCiRyQptDqwQ1eWxIkLcbtgHIWso/TN8ww7UnW/+oWkxsz9ma6uY6jhyZo9kqMTWFlOxcB4pi67j9VAtRkgo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954917; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=nbR8NxQZs7YkrQ3yuCz8vFimELBnb1M3sZi54BOV0WM=; b=n75cdookrkzA2CoaEdi8AVe5TyuwTdsv14KlH/PJbwv5LI4Ur+PAhQk6ZPSJaMtt7x0SzHVyaeZR0yZulbETGeCByzPxtEAGGfSMgR9Uqc12TQlz+JiEX6dem9DwS1cLibOX6SD+zjsNoEEDaz8xnPF28DEAhhDrChLodMxKn6U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1640954917961977.9832797610634; Fri, 31 Dec 2021 04:48:37 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-166-gM6EPg8AP8eIEfM0bIWrfA-1; Fri, 31 Dec 2021 07:48:36 -0500 Received: by mail-wm1-f69.google.com with SMTP id v23-20020a05600c215700b0034566adb612so7477262wml.0 for ; Fri, 31 Dec 2021 04:48:35 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id s1sm28612788wmh.35.2021.12.31.04.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954917; 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=nbR8NxQZs7YkrQ3yuCz8vFimELBnb1M3sZi54BOV0WM=; b=QPhyGC+E9gq0U4P9wWe78ESIaOr1NcJHaVN3s/Wytb2970bwK64u0WojfzX3mvCr1Snfwn MWnCSb1coktiVighL0hKmP3Qi40M2UQjD7V+R+w/gGlk1dKSAr5ztJj+pHX2sNh7pxcCf5 gUAEHHMvyUOGS1yJ0DIflOnde71ZTDU= X-MC-Unique: gM6EPg8AP8eIEfM0bIWrfA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nbR8NxQZs7YkrQ3yuCz8vFimELBnb1M3sZi54BOV0WM=; b=3bQm8/NLVkWe72D5vLx7Pi0B8WP73mER1ClElwxFoCb9CeDdIOYYD8IMd/wA0QMoJs SM4IWCW5MMr+fL4eaWW6WP3QZcJyMPGWVlQBTdseiZhn5VZL9p3TsBn8lD4VoFvad5sv yK3r5if8uZnYc0bsuAjU6jbIp2vl6fjG7qqLuMeLfNTt+94jPGGFjmM0Lx1Kssh9hELA tMH1x1QUWxSGLr5ij1KNaLSeuij12FYYhY01DCth/BMyKHXRtc307GKxE6CwXYdeAjNl MuezzBRS3VKBQYPSj2UtUXXR0hC6GsuzAsjoIulX9L4Ru0aQupKhMWHs3bBj2T4nYu6f vFrw== X-Gm-Message-State: AOAM532oz6UjiuuP32XsxRSq79Z4jNFurO4VwdGSEJB8bqSFCHC5LhnZ 0X/u4zrL4/3VOwoJSzT+/X+5TmW86+ljK8OqrV5Y8g0Ls4zNkbETmMhVe2zdv9sx2s/mvC8gAd2 0XC66LvWUuHzcMw== X-Received: by 2002:a05:6000:184e:: with SMTP id c14mr28538580wri.265.1640954914992; Fri, 31 Dec 2021 04:48:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9YE/5NIGr9Y/NjiZIWtunOEs/HjJFI7BIHdtYrVBFQPtZuaY6MJYxcWN73YRQLGbS81iaYQ== X-Received: by 2002:a05:6000:184e:: with SMTP id c14mr28538574wri.265.1640954914805; Fri, 31 Dec 2021 04:48:34 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 09/20] tests/unit/test-smp-parse: Add 'smp-generic-valid' machine type Date: Fri, 31 Dec 2021 13:47:43 +0100 Message-Id: <20211231124754.1005747-10-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954919030000001 Keep the common TYPE_MACHINE class initialization in machine_base_class_init(), make it abstract, and move the non-common code to a new class: "smp-generic-valid". Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yanan Wang Message-Id: <20211216132015.815493-6-philmd@redhat.com> --- tests/unit/test-smp-parse.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 47e11089e22..b20bf2c2359 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -478,13 +478,19 @@ static void machine_base_class_init(ObjectClass *oc, = void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 + mc->smp_props.prefer_sockets =3D true; + + mc->name =3D g_strdup(SMP_MACHINE_NAME); +} + +static void machine_generic_valid_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + mc->min_cpus =3D MIN_CPUS; mc->max_cpus =3D MAX_CPUS; =20 - mc->smp_props.prefer_sockets =3D true; mc->smp_props.dies_supported =3D false; - - mc->name =3D g_strdup(SMP_MACHINE_NAME); } =20 static void machine_generic_invalid_class_init(ObjectClass *oc, void *data) @@ -606,9 +612,14 @@ static const TypeInfo smp_machine_types[] =3D { { .name =3D TYPE_MACHINE, .parent =3D TYPE_OBJECT, + .abstract =3D true, .class_init =3D machine_base_class_init, .class_size =3D sizeof(MachineClass), .instance_size =3D sizeof(MachineState), + }, { + .name =3D MACHINE_TYPE_NAME("smp-generic-valid"), + .parent =3D TYPE_MACHINE, + .class_init =3D machine_generic_valid_class_init, }, { .name =3D MACHINE_TYPE_NAME("smp-generic-invalid"), .parent =3D TYPE_MACHINE, @@ -629,7 +640,7 @@ int main(int argc, char *argv[]) g_test_init(&argc, &argv, NULL); =20 g_test_add_data_func("/test-smp-parse/generic/valid", - TYPE_MACHINE, + MACHINE_TYPE_NAME("smp-generic-valid"), test_generic_valid); g_test_add_data_func("/test-smp-parse/generic/invalid", MACHINE_TYPE_NAME("smp-generic-invalid"), --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954922; cv=none; d=zohomail.com; s=zohoarc; b=ArRrz7iCSIQOPwx72MAgbxbBelmI2SgYgx7BN64QcyX2hzoLofibgR4EWZsGKbywgET9WHWAXMd8Cl99zY9NCWmQiWBkmXw29gpJ/nZxoxfvE24WomgthfzvwxaFZ/R8QDw7+k+XQI2M+a0aFw8z6lSF48jOvujemMs4ZaPxJpI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954922; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=cHb0d47BqaQovUrZGLdCQsKap1jR8qeraBMow5jr+io=; b=SzptKEtMObjx57DdY3b8l1wLGtDps6aGV2qHNFMHDLUGiJ9jyGGUy6ri32DcvdOnMmo2dJV3cKq1jC8a89INFG76G0+Y6CuwR3bowy0HVEudsRjGISbZDWjpJbzNSCbfAXjweqlQma3pGyiJz9cnJp839wSWkz/b71iA96kU26g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1640954922644176.13932050405128; Fri, 31 Dec 2021 04:48:42 -0800 (PST) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-638-rCQr-4QSP5aFF4eECgQQ0A-1; Fri, 31 Dec 2021 07:48:40 -0500 Received: by mail-wr1-f72.google.com with SMTP id d13-20020adf9b8d000000b001a2aa837f8dso7537817wrc.3 for ; Fri, 31 Dec 2021 04:48:40 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id m3sm26830443wrv.95.2021.12.31.04.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954922; 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=cHb0d47BqaQovUrZGLdCQsKap1jR8qeraBMow5jr+io=; b=UHG/oNExRHSAt39MTNr1surjs+x+RbaxDm8mIB27G9VCbunSCCRftUTJas5nrTNmfOKFpJ XuDylgNd75zqIzeTZqAHXev5xpgOZIukqI6YTsFkvU5SKpLvNjWunxaIUtFMXNJ9q/SUBq 5rDyeHETwuBBFkyLDc++fcNbKe2oPcs= X-MC-Unique: rCQr-4QSP5aFF4eECgQQ0A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cHb0d47BqaQovUrZGLdCQsKap1jR8qeraBMow5jr+io=; b=gAShdMbEKkSAwCIxoYkwmOyoO5RZ1hy4aOEOeJhq7zXwuqyWFDSdxNIlEe382mHWme Ey9qxkQTd323BiXGpoabPY9wBcAYkIEjysnBpnXbjZUSJSVb4vwb0IxRq/+5t2kJ4upA Xh9F1EIjNMST8lZTZQFfvYAIEIR0kk+tB5A8qsA0VZ8KgwVnOaSQQ0Ugnnz3J1yLVKxA VHf5MRr/EMxZqBHImKw4mPu8INqcZMeUYYX589CQVuQKRG8/xaI7a1MjWdzzzHsy0//K nc6hlNrvbJ+GX5bub7BvhhfaHXPd/PTHlCKyMtBq+eJkP5pzMFImiEfb1UsvIzErX9zg ZkTQ== X-Gm-Message-State: AOAM533zod0xlYU4kuYru1tzURAOEuIudlTZVBLY5OjtvT0tUzc5QQFF VIcKWOTAd7iHgNFfkH3xii0Z1ZGASh/IO08gh8BVQzTSlmi52G2sRQGW6tU3DhCdhJkZTYwGIZg wfPjpEILz9S0XEg== X-Received: by 2002:a5d:624f:: with SMTP id m15mr28453956wrv.13.1640954919406; Fri, 31 Dec 2021 04:48:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8tV+HTVMllwUuNbaYaFtmIe6xnL7PYjuMrZsxJOvKNowv2IA3MlKADyRUi5fakEyReup9Wg== X-Received: by 2002:a5d:624f:: with SMTP id m15mr28453947wrv.13.1640954919255; Fri, 31 Dec 2021 04:48:39 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , Richard Henderson Subject: [PULL 10/20] tests/unit/test-smp-parse: Simplify pointer to compound literal use Date: Fri, 31 Dec 2021 13:47:44 +0100 Message-Id: <20211231124754.1005747-11-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954923711000001 We can simply use a local variable (and pass its pointer) instead of a pointer to a compound literal. Reviewed-by: Andrew Jones Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211216132015.815493-7-philmd@redhat.com> --- tests/unit/test-smp-parse.c | 66 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index b20bf2c2359..395929b66cf 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -520,19 +520,19 @@ static void test_generic_valid(const void *opaque) Object *obj =3D object_new(machine_type); MachineState *ms =3D MACHINE(obj); MachineClass *mc =3D MACHINE_GET_CLASS(obj); - SMPTestData *data =3D &(SMPTestData){{ }}; + SMPTestData data =3D {}; int i; =20 for (i =3D 0; i < ARRAY_SIZE(data_generic_valid); i++) { - *data =3D data_generic_valid[i]; - unsupported_params_init(mc, data); + data =3D data_generic_valid[i]; + unsupported_params_init(mc, &data); =20 - smp_parse_test(ms, data, true); + smp_parse_test(ms, &data, true); =20 /* Unsupported parameters can be provided with their values as 1 */ - data->config.has_dies =3D true; - data->config.dies =3D 1; - smp_parse_test(ms, data, true); + data.config.has_dies =3D true; + data.config.dies =3D 1; + smp_parse_test(ms, &data, true); } =20 object_unref(obj); @@ -544,14 +544,14 @@ static void test_generic_invalid(const void *opaque) Object *obj =3D object_new(machine_type); MachineState *ms =3D MACHINE(obj); MachineClass *mc =3D MACHINE_GET_CLASS(obj); - SMPTestData *data =3D &(SMPTestData){}; + SMPTestData data =3D {}; int i; =20 for (i =3D 0; i < ARRAY_SIZE(data_generic_invalid); i++) { - *data =3D data_generic_invalid[i]; - unsupported_params_init(mc, data); + data =3D data_generic_invalid[i]; + unsupported_params_init(mc, &data); =20 - smp_parse_test(ms, data, false); + smp_parse_test(ms, &data, false); } =20 object_unref(obj); @@ -563,45 +563,45 @@ static void test_with_dies(const void *opaque) Object *obj =3D object_new(machine_type); MachineState *ms =3D MACHINE(obj); MachineClass *mc =3D MACHINE_GET_CLASS(obj); - SMPTestData *data =3D &(SMPTestData){{ }}; + SMPTestData data =3D {}; unsigned int num_dies =3D 2; int i; =20 for (i =3D 0; i < ARRAY_SIZE(data_generic_valid); i++) { - *data =3D data_generic_valid[i]; - unsupported_params_init(mc, data); + data =3D data_generic_valid[i]; + unsupported_params_init(mc, &data); =20 /* when dies parameter is omitted, it will be set as 1 */ - data->expect_prefer_sockets.dies =3D 1; - data->expect_prefer_cores.dies =3D 1; + data.expect_prefer_sockets.dies =3D 1; + data.expect_prefer_cores.dies =3D 1; =20 - smp_parse_test(ms, data, true); + smp_parse_test(ms, &data, true); =20 /* when dies parameter is specified */ - data->config.has_dies =3D true; - data->config.dies =3D num_dies; - if (data->config.has_cpus) { - data->config.cpus *=3D num_dies; + data.config.has_dies =3D true; + data.config.dies =3D num_dies; + if (data.config.has_cpus) { + data.config.cpus *=3D num_dies; } - if (data->config.has_maxcpus) { - data->config.maxcpus *=3D num_dies; + if (data.config.has_maxcpus) { + data.config.maxcpus *=3D num_dies; } =20 - data->expect_prefer_sockets.dies =3D num_dies; - data->expect_prefer_sockets.cpus *=3D num_dies; - data->expect_prefer_sockets.max_cpus *=3D num_dies; - data->expect_prefer_cores.dies =3D num_dies; - data->expect_prefer_cores.cpus *=3D num_dies; - data->expect_prefer_cores.max_cpus *=3D num_dies; + data.expect_prefer_sockets.dies =3D num_dies; + data.expect_prefer_sockets.cpus *=3D num_dies; + data.expect_prefer_sockets.max_cpus *=3D num_dies; + data.expect_prefer_cores.dies =3D num_dies; + data.expect_prefer_cores.cpus *=3D num_dies; + data.expect_prefer_cores.max_cpus *=3D num_dies; =20 - smp_parse_test(ms, data, true); + smp_parse_test(ms, &data, true); } =20 for (i =3D 0; i < ARRAY_SIZE(data_with_dies_invalid); i++) { - *data =3D data_with_dies_invalid[i]; - unsupported_params_init(mc, data); + data =3D data_with_dies_invalid[i]; + unsupported_params_init(mc, &data); =20 - smp_parse_test(ms, data, false); + smp_parse_test(ms, &data, false); } =20 object_unref(obj); --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954927; cv=none; d=zohomail.com; s=zohoarc; b=ck0Eeh/88H9jwD7XaRzqP0pAJiMnR5QXzIyHcBDPbJDJADXJIu6lq6Yh0OUn6o08VT/CRHOEy6MzA+s21V61huP35Alb0LQAfvfF0ZRfmfSWVe4c+uVB28Xxu+CuFWmtmzxHXIFBaW7Qiw1a/Y3YssbuCCP307TwJGAjaRP7XHs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954927; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Brj1G/fUhqiziIlPAK7440LnFkqvsAAYMyPJBvFCKgI=; b=lBCkIQ9M9/IrE82YjPn2S9242c9lOYB95MGjGngf1zXnJoy2+02fTbYBWd31PrTCFMyiftdH1+kW35BZ6nLf2uB0rfW5g3QONiGgw03o1cY4HWbq6DjCt95xxuxc4DLogLVVTCEH2rrfHU/QWIAqStdNC3qVuRcdtHZKBkzxkgY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954927442641.3639291767903; Fri, 31 Dec 2021 04:48:47 -0800 (PST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-193-LzVi-ouQM3-aSax4819efg-1; Fri, 31 Dec 2021 07:48:45 -0500 Received: by mail-wr1-f69.google.com with SMTP id v6-20020adfa1c6000000b001a26d0c3e32so7474955wrv.14 for ; Fri, 31 Dec 2021 04:48:45 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id y13sm30613911wrd.89.2021.12.31.04.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954926; 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=Brj1G/fUhqiziIlPAK7440LnFkqvsAAYMyPJBvFCKgI=; b=gZtErJpTOvBmSSG7x/l7xSPX+lT4EVVC7wRXtmAsJ8vK/gJfohC+fulXoG8IlOAcUbYF7p 8W5WgxY1D3JscAS3amBLhwziICj9YE0sk1GapB5Bg0rTqGjcRCD0kSZPml4BDjqL/MPg69 u6JT7jVg4hsloyyTVZ85uyvIsmPFJOI= X-MC-Unique: LzVi-ouQM3-aSax4819efg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Brj1G/fUhqiziIlPAK7440LnFkqvsAAYMyPJBvFCKgI=; b=Q6ulP/y3wad1DN8xn1iNyFUgOgTIo2hk/q6FduqQ9zzg2mPcxwBMZFBa1gV10I/m4V gKevwBPz8zEY31GN8hhVsY8xah8HAGIfyAj13rsFyxMK/6C9Gv8SoENqs9k4HywRivWu 0rHfbe/r8NaZzGSX30gAzR5mpBjvwy8dtXCqmqbk1wi6vY6+jgQuSkAaoP2vTRekSc7g N4eZ8MDiLWQCZdIQHqJ6tWfjrQ1OxwS6HtATH5Qc7hZzsA+4H0XydWf7N4KcBaTk/rn4 rMdqQzuw8eBWvpL6r2CtfUXO82WaBH1CGHSxjJyxJsLU1fVlU7P2hJw1j00RIr+Y3RZc Lw8Q== X-Gm-Message-State: AOAM5313ivmrYTT+8KHwQVJhMAc9G8rAiR1Fuz9gcWk8hZGEGyilxVu5 3oMm74mUlisES6ny1mP/c1wwUe8gMOn87XcOp8rnJBKrTqRuZkGthFYYnkLPeLIvllwuwzAVhFo aYQW7RMTnxC1GoQ== X-Received: by 2002:a1c:e909:: with SMTP id q9mr29066562wmc.184.1640954923960; Fri, 31 Dec 2021 04:48:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJy90nhSNQRqRCtDsglq5R4j8vlK7YYBdk+5cfY1o18jPVz+ZSFniMUeYEu5f0EA3d07dHlgYw== X-Received: by 2002:a1c:e909:: with SMTP id q9mr29066551wmc.184.1640954923785; Fri, 31 Dec 2021 04:48:43 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , Richard Henderson Subject: [PULL 11/20] tests/unit/test-smp-parse: Constify some pointer/struct Date: Fri, 31 Dec 2021 13:47:45 +0100 Message-Id: <20211231124754.1005747-12-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954928320000001 Declare structures const when we don't need to modify them at runtime. Reviewed-by: Andrew Jones Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211216132015.815493-8-philmd@redhat.com> --- tests/unit/test-smp-parse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 395929b66cf..0f98c9509ee 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -83,7 +83,7 @@ typedef struct SMPTestData { * then test the automatic calculation algorithm of the missing * values in the parser. */ -static struct SMPTestData data_generic_valid[] =3D { +static const struct SMPTestData data_generic_valid[] =3D { { /* config: no configuration provided * expect: cpus=3D1,sockets=3D1,cores=3D1,threads=3D1,maxcpus=3D1 = */ @@ -285,7 +285,7 @@ static struct SMPTestData data_generic_valid[] =3D { }, }; =20 -static struct SMPTestData data_generic_invalid[] =3D { +static const struct SMPTestData data_generic_invalid[] =3D { { /* config: -smp 2,dies=3D2 */ .config =3D SMP_CONFIG_WITH_DIES(T, 2, F, 0, T, 2, F, 0, F, 0, F, = 0), @@ -319,7 +319,7 @@ static struct SMPTestData data_generic_invalid[] =3D { }, }; =20 -static struct SMPTestData data_with_dies_invalid[] =3D { +static const struct SMPTestData data_with_dies_invalid[] =3D { { /* config: -smp 16,sockets=3D2,dies=3D2,cores=3D4,threads=3D2,maxc= pus=3D16 */ .config =3D SMP_CONFIG_WITH_DIES(T, 16, T, 2, T, 2, T, 4, T, 2, T,= 16), @@ -356,7 +356,7 @@ static char *smp_config_to_string(SMPConfiguration *con= fig) config->has_maxcpus ? "true" : "false", config->maxcpus); } =20 -static char *cpu_topology_to_string(CpuTopology *topo) +static char *cpu_topology_to_string(const CpuTopology *topo) { return g_strdup_printf( "(CpuTopology) {\n" @@ -372,7 +372,7 @@ static char *cpu_topology_to_string(CpuTopology *topo) } =20 static void check_parse(MachineState *ms, SMPConfiguration *config, - CpuTopology *expect_topo, const char *expect_err, + const CpuTopology *expect_topo, const char *expect= _err, bool is_valid) { g_autofree char *config_str =3D smp_config_to_string(config); @@ -466,7 +466,7 @@ static void smp_parse_test(MachineState *ms, SMPTestDat= a *data, bool is_valid) } =20 /* The parsed results of the unsupported parameters should be 1 */ -static void unsupported_params_init(MachineClass *mc, SMPTestData *data) +static void unsupported_params_init(const MachineClass *mc, SMPTestData *d= ata) { if (!mc->smp_props.dies_supported) { data->expect_prefer_sockets.dies =3D 1; --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954933; cv=none; d=zohomail.com; s=zohoarc; b=E85+L49cl2OV6zOsVSShhbFRsr7kNp7MhD6zuU6kN+KWkCa1JYgLmaoudesknUVPAc1pllED7GVhYyYmAFwTl2d1GEQkX11BW589zXuV1g3R+DEfP+VOm8Z/t33NFgPlt625nJh0sQR2wfoheAjkdw7bdercRPya6i59CyxaM9E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954933; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=hsVRkZQQlYo23KD5v3C/Ge6K5dTEdtnnVoVPT34mCE4=; b=BP2D9Yuu0DhVvE8W2JdogXMcUjZQRSzlYaQ9jWNT4zu//ZXY1HNnwkZ7asW5JJCDR7E+jUjdTahSR4FrNgKl/L5/HHIZioDJojOQe69bdmEWnggF4CSE/SOXB8NW4UIVJQYqQbO5y0+H+L7fjy4YPqWiwQ9Sk273EnSmBjMajbs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1640954933277570.8578536762335; Fri, 31 Dec 2021 04:48:53 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-672-fXi6MIxWN0mUC8bnoN4TuQ-1; Fri, 31 Dec 2021 07:48:49 -0500 Received: by mail-wm1-f72.google.com with SMTP id m9-20020a05600c4f4900b0034644da3525so155486wmq.3 for ; Fri, 31 Dec 2021 04:48:49 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id y8sm29630532wrd.10.2021.12.31.04.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954932; 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=hsVRkZQQlYo23KD5v3C/Ge6K5dTEdtnnVoVPT34mCE4=; b=XRg5555KL3mJN8P7EXKHxqqqPfwXEB6El61resA6pIdMhoRyg4Nvp9nNGTfyhdW9oo/55c GF23gSDUsHrtVU+l/tOLwvABL+kg8Pd2T/L2ctX6AEJ7SYn4ERXNr1k6A68WxVKhKzFmTT hrrfsGXMACeYlPdU0A130tlRI/MaqKw= X-MC-Unique: fXi6MIxWN0mUC8bnoN4TuQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hsVRkZQQlYo23KD5v3C/Ge6K5dTEdtnnVoVPT34mCE4=; b=vj6Hughallaw7eWjL4IRPqGdlBlaLbVBic1SjRLakWffOIyOwjapzzyXh2AQ1G0f88 KddfQZ9O/9XFruqM+oes9Ai3QbBwFDppA7euhgeNdbbF6f3BU2h7yKH6z5ORz+Y8Eb8T YYYnBAifYJmiN433D7VuT2vJSoIeNH1gmkNJLZBJ8OhenHLYj+v/qXayQiusnBCTsNkX Gt71yjIhFwJA9bxq63B7fkYoQA4dCEyHr1Kr1G0VKtXw7qTrOG0DmFeQ0JDBq3X+Wnoj TTLon7o4wAHkTUZNPKdKMqpNY2X6NkgOmVavsyGtYvk4E7llezE8BDv2BS+UAUykcViU pvmA== X-Gm-Message-State: AOAM533PtdiE/AM86RRngVQ2qh3IBw/ICMMO40biUhN4MLDnkJQDvamf Kie7vAny/kBmc/hsjJuhXhuzg+WHzxtpdOwHsX+aDt0ssV/Ey+YXsPNXGamMAFzAvNQpLDaiNgN 2JjiWhDY9uqf5qQ== X-Received: by 2002:a5d:5610:: with SMTP id l16mr6398369wrv.418.1640954928281; Fri, 31 Dec 2021 04:48:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyieMidFLfH0xBtqYWhHJ0rm5v6YpWRS1mJ4KxW21ZPG/WM6HPzrQIEfgaoZwPKPzPnbCpaUQ== X-Received: by 2002:a5d:5610:: with SMTP id l16mr6398363wrv.418.1640954928129; Fri, 31 Dec 2021 04:48:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , Richard Henderson Subject: [PULL 12/20] hw/core: Rename smp_parse() -> machine_parse_smp_config() Date: Fri, 31 Dec 2021 13:47:46 +0100 Message-Id: <20211231124754.1005747-13-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954934884000001 All methods related to MachineState are prefixed with "machine_". smp_parse() does not need to be an exception. Rename it and const'ify the SMPConfiguration argument, since it doesn't need to be modified. Reviewed-by: Andrew Jones Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211216132015.815493-9-philmd@redhat.com> --- include/hw/boards.h | 3 ++- hw/core/machine-smp.c | 6 ++++-- hw/core/machine.c | 2 +- tests/unit/test-smp-parse.c | 8 ++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 9c1c1901046..7597cec4400 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -34,7 +34,8 @@ HotpluggableCPUList *machine_query_hotpluggable_cpus(Mach= ineState *machine); void machine_set_cpu_numa_node(MachineState *machine, const CpuInstanceProperties *props, Error **errp); -void smp_parse(MachineState *ms, SMPConfiguration *config, Error **errp); +void machine_parse_smp_config(MachineState *ms, + const SMPConfiguration *config, Error **errp= ); =20 /** * machine_class_allow_dynamic_sysbus_dev: Add type to list of valid devic= es diff --git a/hw/core/machine-smp.c b/hw/core/machine-smp.c index 116a0cbbfab..2cbfd574293 100644 --- a/hw/core/machine-smp.c +++ b/hw/core/machine-smp.c @@ -44,7 +44,8 @@ static char *cpu_hierarchy_to_string(MachineState *ms) } =20 /* - * smp_parse - Generic function used to parse the given SMP configuration + * machine_parse_smp_config: Generic function used to parse the given + * SMP configuration * * Any missing parameter in "cpus/maxcpus/sockets/cores/threads" will be * automatically computed based on the provided ones. @@ -63,7 +64,8 @@ static char *cpu_hierarchy_to_string(MachineState *ms) * introduced topology members which are likely to be target specific shou= ld * be directly set as 1 if they are omitted (e.g. dies for PC since 4.1). */ -void smp_parse(MachineState *ms, SMPConfiguration *config, Error **errp) +void machine_parse_smp_config(MachineState *ms, + const SMPConfiguration *config, Error **errp) { MachineClass *mc =3D MACHINE_GET_CLASS(ms); unsigned cpus =3D config->has_cpus ? config->cpus : 0; diff --git a/hw/core/machine.c b/hw/core/machine.c index 53a99abc560..3993c534b90 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -761,7 +761,7 @@ static void machine_set_smp(Object *obj, Visitor *v, co= nst char *name, return; } =20 - smp_parse(ms, config, errp); + machine_parse_smp_config(ms, config, errp); } =20 static void machine_class_init(ObjectClass *oc, void *data) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 0f98c9509ee..b6df8137fcc 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -337,7 +337,7 @@ static const struct SMPTestData data_with_dies_invalid[= ] =3D { }, }; =20 -static char *smp_config_to_string(SMPConfiguration *config) +static char *smp_config_to_string(const SMPConfiguration *config) { return g_strdup_printf( "(SMPConfiguration) {\n" @@ -371,7 +371,7 @@ static char *cpu_topology_to_string(const CpuTopology *= topo) topo->cores, topo->threads, topo->max_cpus); } =20 -static void check_parse(MachineState *ms, SMPConfiguration *config, +static void check_parse(MachineState *ms, const SMPConfiguration *config, const CpuTopology *expect_topo, const char *expect= _err, bool is_valid) { @@ -380,8 +380,8 @@ static void check_parse(MachineState *ms, SMPConfigurat= ion *config, g_autofree char *output_topo_str =3D NULL; Error *err =3D NULL; =20 - /* call the generic parser smp_parse() */ - smp_parse(ms, config, &err); + /* call the generic parser */ + machine_parse_smp_config(ms, config, &err); =20 output_topo_str =3D cpu_topology_to_string(&ms->smp); =20 --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954936; cv=none; d=zohomail.com; s=zohoarc; b=A7ccbVX/GcVGH+QzLMA5L+/88+vy08ECNzbkHB21Ki36u3/vdJDES+eSA5wDKOriyBgwiUfzEoyXTsTp8ppzhBcu1dMJRWuge1i2uPve1pHjDQhlo3R+B0NfXVXpiwztaYqsQ6I8c3MNSx/rm036S/gJURx9ctX77/L1EfKQscE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954936; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=9JX8D87/LEKsaXl8Ex10SP502prmszBQakHSaMn3/tI=; b=HdwrnchP5axAf7f56n9NzgiOyMFUyAJFs+m9oci8ed2NLaGVWTNczq+Ne4WtEvpLtHWl8wid9V/aEyqOQpCiov7NWU0+kxL/8TN6rWXZCTdi+ZdxBBLKqFUR84DCTyGm3przjHf1AudnGvEjgKs4IY3V4psAcy6IL3Ai+G83EDI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954936434427.61859809823613; Fri, 31 Dec 2021 04:48:56 -0800 (PST) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-391-A5rvO7J2PLW9Cm_YBI2lUA-1; Fri, 31 Dec 2021 07:48:53 -0500 Received: by mail-wr1-f71.google.com with SMTP id t30-20020adfa2de000000b001a24004e1fbso7515195wra.10 for ; Fri, 31 Dec 2021 04:48:53 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id m17sm26763398wrw.11.2021.12.31.04.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954935; 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=9JX8D87/LEKsaXl8Ex10SP502prmszBQakHSaMn3/tI=; b=CwdvnSaOTqC3lax9tPAzREcHV5AbCgmIp0V/i8KJW1eEJCh1dHwGvF86OKc/nJpAJJNQA4 yK3UCPn4Wsqn80B5JZBlceGw1XSOGNGGkJGuz/Ri6rc3S/eUlGLeQ1n4yMqzxnQXg/K1o/ ooiWYnCmzmn6Gns9DpGmrd2rGNODWkM= X-MC-Unique: A5rvO7J2PLW9Cm_YBI2lUA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9JX8D87/LEKsaXl8Ex10SP502prmszBQakHSaMn3/tI=; b=It83VUXB4vIHP9iJLkWKkgREWEU8XN3go4VgX5IF2slabumYY8j0FiCxxzKwpb59RN OZhykohEkYoV2QXgCUAkNmKzjLzc4WqEkNRct+//minnTy+DsI6iocmhGlyQUCwD62M/ fKMKi/ri4UE3I7vPtST+aMuzw+M1WI41c9JqV41b3F44U9YHRqnnda+jbgI8qfflLeb6 7mkAZ2ys3yIf54IaTmbWWfEEWWhRD1mK+55wog+WuqUa7v1uhncu31Neg3gsF8Jbtc65 oAZFt8b7BiznE5Y2MkDPL9V/pleguu2vFRt5EriMxuKWAOIb/IyfXzhJ4nr2A6FrryYi WOog== X-Gm-Message-State: AOAM533YqG1x8rVG5945pW6zUw0nYEo2DJ00GjEvzkdo9WxAMyFSr0id /HgyFjslZNeDgVZ9tIgYdcpRoOUxMezOfUut3oV6PXX3Ig24KZZVd7Ujp3s+onQk+msmCFlNlC5 HRHaGDLY4rjYH0g== X-Received: by 2002:a5d:6dac:: with SMTP id u12mr28656584wrs.233.1640954932543; Fri, 31 Dec 2021 04:48:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzo8OWlah1bRgYua66cksuSvwH/bV8Mog7xAMHg3MPIkkDberGOMj4p6rumOE4S8s5Y+DfLEQ== X-Received: by 2002:a5d:6dac:: with SMTP id u12mr28656571wrs.233.1640954932340; Fri, 31 Dec 2021 04:48:52 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 13/20] qemu-options: Improve readability of SMP related Docs Date: Fri, 31 Dec 2021 13:47:47 +0100 Message-Id: <20211231124754.1005747-14-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954937383000001 From: Yanan Wang We have a description in qemu-options.hx for each CPU topology parameter to explain what it exactly means, and also an extra declaration for the target-specific one, e.g. "for PC only" when describing "dies", and "for PC, it's on one die" when describing "cores". Now we are going to introduce one more non-generic parameter "clusters", it will make the Doc less readable and if we still continue to use the legacy way to describe it. So let's at first make two tweaks of the Docs to improve the readability and also scalability: 1) In the -help text: Delete the extra specific declaration and describe each topology parameter level by level. Then add a note to declare that different machines may support different subsets and the actual meaning of the supported parameters will vary accordingly. 2) In the rST text: List all the sub-hierarchies currently supported in QEMU, and correspondingly give an example of -smp configuration for each of them. Signed-off-by: Yanan Wang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211228092221.21068-2-wangyanan55@huawei.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qemu-options.hx | 74 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 7d475109478..b39377de3fc 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -207,14 +207,26 @@ ERST =20 DEF("smp", HAS_ARG, QEMU_OPTION_smp, "-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,sockets=3Dsockets][,dies=3Ddie= s][,cores=3Dcores][,threads=3Dthreads]\n" - " set the number of CPUs to 'n' [default=3D1]\n" + " set the number of initial CPUs to 'n' [default=3D1]\n" " maxcpus=3D maximum number of total CPUs, including\n" " offline CPUs for hotplug, etc\n" - " sockets=3D number of discrete sockets in the system\n" - " dies=3D number of CPU dies on one socket (for PC only= )\n" - " cores=3D number of CPU cores on one socket (for PC, i= t's on one die)\n" - " threads=3D number of threads on one CPU core\n", - QEMU_ARCH_ALL) + " sockets=3D number of sockets on the machine board\n" + " dies=3D number of dies in one socket\n" + " cores=3D number of cores in one die\n" + " threads=3D number of threads in one core\n" + "Note: Different machines may have different subsets of the CPU topolo= gy\n" + " parameters supported, so the actual meaning of the supported pa= rameters\n" + " will vary accordingly. For example, for a machine type that sup= ports a\n" + " three-level CPU hierarchy of sockets/cores/threads, the paramet= ers will\n" + " sequentially mean as below:\n" + " sockets means the number of sockets on the machine bo= ard\n" + " cores means the number of cores in one socket\n" + " threads means the number of threads in one core\n" + " For a particular machine type board, an expected CPU topology h= ierarchy\n" + " can be defined through the supported sub-option. Unsupported pa= rameters\n" + " can also be provided in addition to the sub-option, but their v= alues\n" + " must be set as 1 in the purpose of correct parsing.\n", + QEMU_ARCH_ALL) SRST ``-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,sockets=3Dsockets][,dies=3Ddies][= ,cores=3Dcores][,threads=3Dthreads]`` Simulate a SMP system with '\ ``n``\ ' CPUs initially present on @@ -225,27 +237,57 @@ SRST initial CPU count will match the maximum number. When only one of them is given then the omitted one will be set to its counterpart's value. Both parameters may be specified, but the maximum number of CPUs must - be equal to or greater than the initial CPU count. Both parameters are - subject to an upper limit that is determined by the specific machine - type chosen. + be equal to or greater than the initial CPU count. Product of the + CPU topology hierarchy must be equal to the maximum number of CPUs. + Both parameters are subject to an upper limit that is determined by + the specific machine type chosen. =20 - To control reporting of CPU topology information, the number of socket= s, - dies per socket, cores per die, and threads per core can be specified. - The sum `` sockets * cores * dies * threads `` must be equal to the - maximum CPU count. CPU targets may only support a subset of the topolo= gy - parameters. Where a CPU target does not support use of a particular - topology parameter, its value should be assumed to be 1 for the purpose - of computing the CPU maximum count. + To control reporting of CPU topology information, values of the topolo= gy + parameters can be specified. Machines may only support a subset of the + parameters and different machines may have different subsets supported + which vary depending on capacity of the corresponding CPU targets. So + for a particular machine type board, an expected topology hierarchy can + be defined through the supported sub-option. Unsupported parameters can + also be provided in addition to the sub-option, but their values must = be + set as 1 in the purpose of correct parsing. =20 Either the initial CPU count, or at least one of the topology paramete= rs must be specified. The specified parameters must be greater than zero, explicit configuration like "cpus=3D0" is not allowed. Values for any omitted parameters will be computed from those which are given. + + For example, the following sub-option defines a CPU topology hierarchy + (2 sockets totally on the machine, 2 cores per socket, 2 threads per + core) for a machine that only supports sockets/cores/threads. + Some members of the option can be omitted but their values will be + automatically computed: + + :: + + -smp 8,sockets=3D2,cores=3D2,threads=3D2,maxcpus=3D8 + + The following sub-option defines a CPU topology hierarchy (2 sockets + totally on the machine, 2 dies per socket, 2 cores per die, 2 threads + per core) for PC machines which support sockets/dies/cores/threads. + Some members of the option can be omitted but their values will be + automatically computed: + + :: + + -smp 16,sockets=3D2,dies=3D2,cores=3D2,threads=3D2,maxcpus=3D16 + Historically preference was given to the coarsest topology parameters when computing missing values (ie sockets preferred over cores, which were preferred over threads), however, this behaviour is considered liable to change. Prior to 6.2 the preference was sockets over cores over threads. Since 6.2 the preference is cores over sockets over thre= ads. + + For example, the following option defines a machine board with 2 socke= ts + of 1 core before 6.2 and 1 socket of 2 cores after 6.2: + + :: + + -smp 2 ERST =20 DEF("numa", HAS_ARG, QEMU_OPTION_numa, --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954940; cv=none; d=zohomail.com; s=zohoarc; b=i2EqppNqw3RPkJY8bW6eKtFugoao9Mtqtpxbl929h0UhEfep5U7WZxoIonbs6Zc0GJ0taVy6bivaXkmvmegJtiOwn5VqlsLz9M2+vmeL7IDzeK1MkGk40fPr1Zwdho+Px1S+aakBmmBS2Trm/Bp3I4y2gJjCXRVFhyZO8Z1LF8U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954940; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=wRGnTZ/XLILKmWFtYsMNltRv2S3GsR7Kd42iwaxNPRc=; b=SRG/SnTzgVcIriIr+yqQwXMWUecEyOkdas43oXEDDS1YwhZvvDQbnZ3vNT+1rxNap3WAFnpkmkBMZg6W06fptHNo+u2t2+8FMa9NThblLe2kVoSbxn+1dCQebWYEDSPxdTCipUWsDnv0xZYhsC72qY/87z9RzqQYYC1lciFwy40= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954940168975.4577933930763; Fri, 31 Dec 2021 04:49:00 -0800 (PST) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-527-abNR2s1XP5SX-xv8P7OM2A-1; Fri, 31 Dec 2021 07:48:58 -0500 Received: by mail-wr1-f72.google.com with SMTP id t30-20020adfa2de000000b001a24004e1fbso7515265wra.10 for ; Fri, 31 Dec 2021 04:48:57 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id ay29sm28438051wmb.13.2021.12.31.04.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954939; 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=wRGnTZ/XLILKmWFtYsMNltRv2S3GsR7Kd42iwaxNPRc=; b=c3TQtHBXu6D0QCs+Zu+cNknhg1E8kDeO71BS5pm5tI1gdNYlwCMA10Vht37wpN/v9734aI OgHb5YyAvv7ps5J4+nkfUoPOj1KcNRDSKm6OlOHmuzrRZQh/MyvNoLaprvD+4nIrgdMsMO sVjQQLHa2YTg0LPjeDjuS0IIkRI2qcs= X-MC-Unique: abNR2s1XP5SX-xv8P7OM2A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wRGnTZ/XLILKmWFtYsMNltRv2S3GsR7Kd42iwaxNPRc=; b=xw6sbuvIWaALCzzAoVobwyBXCku0dA82Cjou6rvbwGRSblpczZZLT7w+/njCZCmDvX PpxZ520DnF+q0xQwFm5wAtI3H++1Lrb51+clZwZimQ+cFDYSxQ+aP2Mt4dCCMzjyXa6n 2jNts4iDVG6jeirY2pBa5a+HiGcYaE4y+rKJdCKtz5SJ2pT4svtLyVYR9jFOOs0XCtqB MCqBA0aSzHWPO2IXJXn1eVggBKRjPuFEsZ6LgOYrnBa4m9ArxqYn1qbt6C9YLxXEozQ9 sJs0PBJJbjGSFaiA2xlwDuUe2lTKLzUSTJZo8Kofwt1wfvXQFM1h76u8U1h+gssP8N8b rQWQ== X-Gm-Message-State: AOAM530BTV8HtKF0Uk4Z+1xf1Jjw0fN5xe1nXNj/vyS8HKwrJ+TAHypB BMIpE3n/x689KfmcKDwl+NNEMyxw28blz7W7k39b2GSQFevTTNcjA1+pd2n0Fnv/TtXs4X+gH9Y aQZrmBQwEs1BHlA== X-Received: by 2002:a05:6000:2c9:: with SMTP id o9mr29313038wry.377.1640954936851; Fri, 31 Dec 2021 04:48:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOX7ujFYtjAJ/WubxHtWh4q+rNs2hLoB/xDUv76yYDBP3mJiM8jtRG3xb7jDx5xYvvh1ziHg== X-Received: by 2002:a05:6000:2c9:: with SMTP id o9mr29313027wry.377.1640954936582; Fri, 31 Dec 2021 04:48:56 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 14/20] hw/core/machine: Introduce CPU cluster topology support Date: Fri, 31 Dec 2021 13:47:48 +0100 Message-Id: <20211231124754.1005747-15-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954941764000001 From: Yanan Wang The new Cluster-Aware Scheduling support has landed in Linux 5.16, which has been proved to benefit the scheduling performance (e.g. load balance and wake_affine strategy) on both x86_64 and AArch64. So now in Linux 5.16 we have four-level arch-neutral CPU topology definition like below and a new scheduler level for clusters. struct cpu_topology { int thread_id; int core_id; int cluster_id; int package_id; int llc_id; cpumask_t thread_sibling; cpumask_t core_sibling; cpumask_t cluster_sibling; cpumask_t llc_sibling; } A cluster generally means a group of CPU cores which share L2 cache or other mid-level resources, and it is the shared resources that is used to improve scheduler's behavior. From the point of view of the size range, it's between CPU die and CPU core. For example, on some ARM64 Kunpeng servers, we have 6 clusters in each NUMA node, and 4 CPU cores in each cluster. The 4 CPU cores share a separate L2 cache and a L3 cache tag, which brings cache affinity advantage. In virtualization, on the Hosts which have pClusters (physical clusters), if we can design a vCPU topology with cluster level for guest kernel and have a dedicated vCPU pinning. A Cluster-Aware Guest kernel can also make use of the cache affinity of CPU clusters to gain similar scheduling performance. This patch adds infrastructure for CPU cluster level topology configuration and parsing, so that the user can specify cluster parameter if their machines support it. Signed-off-by: Yanan Wang Message-Id: <20211228092221.21068-3-wangyanan55@huawei.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 [PMD: Added '(since 7.0)' to @clusters in qapi/machine.json] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/machine.json | 5 ++++- include/hw/boards.h | 6 +++++- hw/core/machine-smp.c | 26 +++++++++++++++++++------- hw/core/machine.c | 3 +++ softmmu/vl.c | 3 +++ qemu-options.hx | 7 ++++--- 6 files changed, 38 insertions(+), 12 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index edeab6084b7..372535b3482 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1404,7 +1404,9 @@ # # @dies: number of dies per socket in the CPU topology # -# @cores: number of cores per die in the CPU topology +# @clusters: number of clusters per die in the CPU topology (since 7.0) +# +# @cores: number of cores per cluster in the CPU topology # # @threads: number of threads per core in the CPU topology # @@ -1416,6 +1418,7 @@ '*cpus': 'int', '*sockets': 'int', '*dies': 'int', + '*clusters': 'int', '*cores': 'int', '*threads': 'int', '*maxcpus': 'int' } } diff --git a/include/hw/boards.h b/include/hw/boards.h index 7597cec4400..f49a2578ead 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -129,10 +129,12 @@ typedef struct { * SMPCompatProps: * @prefer_sockets - whether sockets are preferred over cores in smp parsi= ng * @dies_supported - whether dies are supported by the machine + * @clusters_supported - whether clusters are supported by the machine */ typedef struct { bool prefer_sockets; bool dies_supported; + bool clusters_supported; } SMPCompatProps; =20 /** @@ -299,7 +301,8 @@ typedef struct DeviceMemoryState { * @cpus: the number of present logical processors on the machine * @sockets: the number of sockets on the machine * @dies: the number of dies in one socket - * @cores: the number of cores in one die + * @clusters: the number of clusters in one die + * @cores: the number of cores in one cluster * @threads: the number of threads in one core * @max_cpus: the maximum number of logical processors on the machine */ @@ -307,6 +310,7 @@ typedef struct CpuTopology { unsigned int cpus; unsigned int sockets; unsigned int dies; + unsigned int clusters; unsigned int cores; unsigned int threads; unsigned int max_cpus; diff --git a/hw/core/machine-smp.c b/hw/core/machine-smp.c index 2cbfd574293..b39ed21e654 100644 --- a/hw/core/machine-smp.c +++ b/hw/core/machine-smp.c @@ -37,6 +37,10 @@ static char *cpu_hierarchy_to_string(MachineState *ms) g_string_append_printf(s, " * dies (%u)", ms->smp.dies); } =20 + if (mc->smp_props.clusters_supported) { + g_string_append_printf(s, " * clusters (%u)", ms->smp.clusters); + } + g_string_append_printf(s, " * cores (%u)", ms->smp.cores); g_string_append_printf(s, " * threads (%u)", ms->smp.threads); =20 @@ -71,6 +75,7 @@ void machine_parse_smp_config(MachineState *ms, unsigned cpus =3D config->has_cpus ? config->cpus : 0; unsigned sockets =3D config->has_sockets ? config->sockets : 0; unsigned dies =3D config->has_dies ? config->dies : 0; + unsigned clusters =3D config->has_clusters ? config->clusters : 0; unsigned cores =3D config->has_cores ? config->cores : 0; unsigned threads =3D config->has_threads ? config->threads : 0; unsigned maxcpus =3D config->has_maxcpus ? config->maxcpus : 0; @@ -82,6 +87,7 @@ void machine_parse_smp_config(MachineState *ms, if ((config->has_cpus && config->cpus =3D=3D 0) || (config->has_sockets && config->sockets =3D=3D 0) || (config->has_dies && config->dies =3D=3D 0) || + (config->has_clusters && config->clusters =3D=3D 0) || (config->has_cores && config->cores =3D=3D 0) || (config->has_threads && config->threads =3D=3D 0) || (config->has_maxcpus && config->maxcpus =3D=3D 0)) { @@ -97,8 +103,13 @@ void machine_parse_smp_config(MachineState *ms, error_setg(errp, "dies not supported by this machine's CPU topolog= y"); return; } + if (!mc->smp_props.clusters_supported && clusters > 1) { + error_setg(errp, "clusters not supported by this machine's CPU top= ology"); + return; + } =20 dies =3D dies > 0 ? dies : 1; + clusters =3D clusters > 0 ? clusters : 1; =20 /* compute missing values based on the provided ones */ if (cpus =3D=3D 0 && maxcpus =3D=3D 0) { @@ -113,41 +124,42 @@ void machine_parse_smp_config(MachineState *ms, if (sockets =3D=3D 0) { cores =3D cores > 0 ? cores : 1; threads =3D threads > 0 ? threads : 1; - sockets =3D maxcpus / (dies * cores * threads); + sockets =3D maxcpus / (dies * clusters * cores * threads); } else if (cores =3D=3D 0) { threads =3D threads > 0 ? threads : 1; - cores =3D maxcpus / (sockets * dies * threads); + cores =3D maxcpus / (sockets * dies * clusters * threads); } } else { /* prefer cores over sockets since 6.2 */ if (cores =3D=3D 0) { sockets =3D sockets > 0 ? sockets : 1; threads =3D threads > 0 ? threads : 1; - cores =3D maxcpus / (sockets * dies * threads); + cores =3D maxcpus / (sockets * dies * clusters * threads); } else if (sockets =3D=3D 0) { threads =3D threads > 0 ? threads : 1; - sockets =3D maxcpus / (dies * cores * threads); + sockets =3D maxcpus / (dies * clusters * cores * threads); } } =20 /* try to calculate omitted threads at last */ if (threads =3D=3D 0) { - threads =3D maxcpus / (sockets * dies * cores); + threads =3D maxcpus / (sockets * dies * clusters * cores); } } =20 - maxcpus =3D maxcpus > 0 ? maxcpus : sockets * dies * cores * threads; + maxcpus =3D maxcpus > 0 ? maxcpus : sockets * dies * clusters * cores = * threads; cpus =3D cpus > 0 ? cpus : maxcpus; =20 ms->smp.cpus =3D cpus; ms->smp.sockets =3D sockets; ms->smp.dies =3D dies; + ms->smp.clusters =3D clusters; ms->smp.cores =3D cores; ms->smp.threads =3D threads; ms->smp.max_cpus =3D maxcpus; =20 /* sanity-check of the computed topology */ - if (sockets * dies * cores * threads !=3D maxcpus) { + if (sockets * dies * clusters * cores * threads !=3D maxcpus) { g_autofree char *topo_msg =3D cpu_hierarchy_to_string(ms); error_setg(errp, "Invalid CPU topology: " "product of the hierarchy must match maxcpus: " diff --git a/hw/core/machine.c b/hw/core/machine.c index 3993c534b90..a4a2df405f3 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -742,10 +742,12 @@ static void machine_get_smp(Object *obj, Visitor *v, = const char *name, .has_cpus =3D true, .cpus =3D ms->smp.cpus, .has_sockets =3D true, .sockets =3D ms->smp.sockets, .has_dies =3D true, .dies =3D ms->smp.dies, + .has_clusters =3D true, .clusters =3D ms->smp.clusters, .has_cores =3D true, .cores =3D ms->smp.cores, .has_threads =3D true, .threads =3D ms->smp.threads, .has_maxcpus =3D true, .maxcpus =3D ms->smp.max_cpus, }; + if (!visit_type_SMPConfiguration(v, name, &config, &error_abort)) { return; } @@ -932,6 +934,7 @@ static void machine_initfn(Object *obj) ms->smp.max_cpus =3D mc->default_cpus; ms->smp.sockets =3D 1; ms->smp.dies =3D 1; + ms->smp.clusters =3D 1; ms->smp.cores =3D 1; ms->smp.threads =3D 1; } diff --git a/softmmu/vl.c b/softmmu/vl.c index 620a1f1367e..d9e4c619d3e 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -726,6 +726,9 @@ static QemuOptsList qemu_smp_opts =3D { }, { .name =3D "dies", .type =3D QEMU_OPT_NUMBER, + }, { + .name =3D "clusters", + .type =3D QEMU_OPT_NUMBER, }, { .name =3D "cores", .type =3D QEMU_OPT_NUMBER, diff --git a/qemu-options.hx b/qemu-options.hx index b39377de3fc..fd1f8135fb5 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -206,13 +206,14 @@ SRST ERST =20 DEF("smp", HAS_ARG, QEMU_OPTION_smp, - "-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,sockets=3Dsockets][,dies=3Ddie= s][,cores=3Dcores][,threads=3Dthreads]\n" + "-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,sockets=3Dsockets][,dies=3Ddie= s][,clusters=3Dclusters][,cores=3Dcores][,threads=3Dthreads]\n" " set the number of initial CPUs to 'n' [default=3D1]\n" " maxcpus=3D maximum number of total CPUs, including\n" " offline CPUs for hotplug, etc\n" " sockets=3D number of sockets on the machine board\n" " dies=3D number of dies in one socket\n" - " cores=3D number of cores in one die\n" + " clusters=3D number of clusters in one die\n" + " cores=3D number of cores in one cluster\n" " threads=3D number of threads in one core\n" "Note: Different machines may have different subsets of the CPU topolo= gy\n" " parameters supported, so the actual meaning of the supported pa= rameters\n" @@ -228,7 +229,7 @@ DEF("smp", HAS_ARG, QEMU_OPTION_smp, " must be set as 1 in the purpose of correct parsing.\n", QEMU_ARCH_ALL) SRST -``-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,sockets=3Dsockets][,dies=3Ddies][= ,cores=3Dcores][,threads=3Dthreads]`` +``-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,sockets=3Dsockets][,dies=3Ddies][= ,clusters=3Dclusters][,cores=3Dcores][,threads=3Dthreads]`` Simulate a SMP system with '\ ``n``\ ' CPUs initially present on the machine type board. On boards supporting CPU hotplug, the optional '\ ``maxcpus``\ ' parameter can be set to enable further CPUs to be --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954944; cv=none; d=zohomail.com; s=zohoarc; b=AT47Qbarr64flWeqh7StyOlQN8IQZGyvQI3PQJlXbMEmC6HbtFznWSD/ec2Kam3lKmdF8arYZUsGtjyAsbv1XTiDZQ+oiH3YlS8PKNUXP3AEQDdMeWv8mRT5hiIxHD6Q1+T4J7JuOLzuaFO4ZVmG7LY836GTIKO0eXf4WQ6dNbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954944; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=XCjuVcTQ882USvAWxyDE+kQvzyHlN9CrhkHSlEa88PU=; b=nZPBXhzrPZAAictHUU985xWINS5NQr9KvyiUrCNzpcyZEDCUTZ+mA9jVCJr0XpcCKH0B4oUnB6VDTf906UOCaMMta3VbaclwuFQvP/pjFb5t33KtaNQcTQErXHnjD93ToCdgFjzZ6vbkxKAvZsFJQNiurIS9Vnx95bndkp4iBWk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954944472886.7590803717407; Fri, 31 Dec 2021 04:49:04 -0800 (PST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-183-UuphCsIWOVi20h1M-ERgAg-1; Fri, 31 Dec 2021 07:49:02 -0500 Received: by mail-wr1-f69.google.com with SMTP id r7-20020adfbb07000000b001a254645f13so7578225wrg.7 for ; Fri, 31 Dec 2021 04:49:02 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id m3sm26831117wrv.95.2021.12.31.04.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954943; 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=XCjuVcTQ882USvAWxyDE+kQvzyHlN9CrhkHSlEa88PU=; b=d3ffUxkNdjzX4e+c7+oBjq1rc4g78T6BpaVR9IULYegM3quhGEOL082n9O5gU29VI9DRg5 X3mubTv1/snOZ03jSrYpZs7KHB0fDp2UY7lwoE2iluldf0lhBHD5/Zn2GpTUhV3Eqg9Cng lh15+sxcpzkxpL3NiUwa9+ET4uxJzoI= X-MC-Unique: UuphCsIWOVi20h1M-ERgAg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XCjuVcTQ882USvAWxyDE+kQvzyHlN9CrhkHSlEa88PU=; b=2Cvo1tNY9slRTQwWNSwkTKBSgCRlHMrtJhxClJHuKkbwb88BS4zpbu+kOoQ+x6Q6h/ kf5TBQNgcv/vAF0KSIjFt4y6+fuWEmDjO0aoFCGCIFGXM6sxFIA2HcB7BpmpoGf4ew2S HJOiCxzMgPg5Sft9n9c5dTj4p8ymGdWJnLsu5HEbAh2aMGlF4H1iMlt1qjVWNzm9CPPX aSIweGr0u6VmSBsSb96536Hv+FYDxigykThDs0yGI6Cd1wNU+/JPp8gisejrUPra6EVR b2Yu1NMlkCV2eIucH8WGCUiZ/6FmV4YwZkdOK+HulgbQFP607sKP7k71NpL9JimRWKds vE4A== X-Gm-Message-State: AOAM530GYaVbAgzLkscMiGqLzBicI2F33IipxYZEWSChgvDBopXOr7yX mDVuZQ0v8ImmD5kiTIB2On5G4J85pIgxGIbo4lXgLRV1WXnoh1FiIWCWYc1u3v1IKm6VJEegd3n 9MXl/9RO8JV9bDA== X-Received: by 2002:a5d:65d2:: with SMTP id e18mr6677507wrw.310.1640954941066; Fri, 31 Dec 2021 04:49:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMuznmFowzZ1h+S1ZeWEN3+iVQLWSKwyrbZ8HMnUgP/RVSfhjOhYbrTiwdRISEOt+j2Qn0OQ== X-Received: by 2002:a5d:65d2:: with SMTP id e18mr6677498wrw.310.1640954940877; Fri, 31 Dec 2021 04:49:00 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 15/20] tests/unit/test-smp-parse: Add testcases for CPU clusters Date: Fri, 31 Dec 2021 13:47:49 +0100 Message-Id: <20211231124754.1005747-16-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954946165000001 From: Yanan Wang Add testcases for parsing of the four-level CPU topology hierarchy, ie sockets/clusters/cores/threads, which will be supported on ARM virt machines. Signed-off-by: Yanan Wang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211228092221.21068-5-wangyanan55@huawei.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/unit/test-smp-parse.c | 130 ++++++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 7 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index b6df8137fcc..331719bbc4b 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -61,6 +61,20 @@ .has_maxcpus =3D hf, .maxcpus =3D f, \ } =20 +/* + * Currently a 4-level topology hierarchy is supported on ARM virt machines + * -sockets/clusters/cores/threads + */ +#define SMP_CONFIG_WITH_CLUSTERS(ha, a, hb, b, hc, c, hd, d, he, e, hf, f)= \ + { \ + .has_cpus =3D ha, .cpus =3D a, \ + .has_sockets =3D hb, .sockets =3D b, \ + .has_clusters =3D hc, .clusters =3D c, \ + .has_cores =3D hd, .cores =3D d, \ + .has_threads =3D he, .threads =3D e, \ + .has_maxcpus =3D hf, .maxcpus =3D f, \ + } + /** * @config - the given SMP configuration * @expect_prefer_sockets - the expected parsing result for the @@ -290,6 +304,10 @@ static const struct SMPTestData data_generic_invalid[]= =3D { /* config: -smp 2,dies=3D2 */ .config =3D SMP_CONFIG_WITH_DIES(T, 2, F, 0, T, 2, F, 0, F, 0, F, = 0), .expect_error =3D "dies not supported by this machine's CPU topolo= gy", + }, { + /* config: -smp 2,clusters=3D2 */ + .config =3D SMP_CONFIG_WITH_CLUSTERS(T, 2, F, 0, T, 2, F, 0, F, 0,= F, 0), + .expect_error =3D "clusters not supported by this machine's CPU to= pology", }, { /* config: -smp 8,sockets=3D2,cores=3D4,threads=3D2,maxcpus=3D8 */ .config =3D SMP_CONFIG_GENERIC(T, 8, T, 2, T, 4, T, 2, T, 8), @@ -337,20 +355,40 @@ static const struct SMPTestData data_with_dies_invali= d[] =3D { }, }; =20 +static const struct SMPTestData data_with_clusters_invalid[] =3D { + { + /* config: -smp 16,sockets=3D2,clusters=3D2,cores=3D4,threads=3D2,= maxcpus=3D16 */ + .config =3D SMP_CONFIG_WITH_CLUSTERS(T, 16, T, 2, T, 2, T, 4, T, 2= , T, 16), + .expect_error =3D "Invalid CPU topology: " + "product of the hierarchy must match maxcpus: " + "sockets (2) * clusters (2) * cores (4) * threads = (2) " + "!=3D maxcpus (16)", + }, { + /* config: -smp 34,sockets=3D2,clusters=3D2,cores=3D4,threads=3D2,= maxcpus=3D32 */ + .config =3D SMP_CONFIG_WITH_CLUSTERS(T, 34, T, 2, T, 2, T, 4, T, 2= , T, 32), + .expect_error =3D "Invalid CPU topology: " + "maxcpus must be equal to or greater than smp: " + "sockets (2) * clusters (2) * cores (4) * threads = (2) " + "=3D=3D maxcpus (32) < smp_cpus (34)", + }, +}; + static char *smp_config_to_string(const SMPConfiguration *config) { return g_strdup_printf( "(SMPConfiguration) {\n" - " .has_cpus =3D %5s, cpus =3D %" PRId64 ",\n" - " .has_sockets =3D %5s, sockets =3D %" PRId64 ",\n" - " .has_dies =3D %5s, dies =3D %" PRId64 ",\n" - " .has_cores =3D %5s, cores =3D %" PRId64 ",\n" - " .has_threads =3D %5s, threads =3D %" PRId64 ",\n" - " .has_maxcpus =3D %5s, maxcpus =3D %" PRId64 ",\n" + " .has_cpus =3D %5s, cpus =3D %" PRId64 ",\n" + " .has_sockets =3D %5s, sockets =3D %" PRId64 ",\n" + " .has_dies =3D %5s, dies =3D %" PRId64 ",\n" + " .has_clusters =3D %5s, clusters =3D %" PRId64 ",\n" + " .has_cores =3D %5s, cores =3D %" PRId64 ",\n" + " .has_threads =3D %5s, threads =3D %" PRId64 ",\n" + " .has_maxcpus =3D %5s, maxcpus =3D %" PRId64 ",\n" "}", config->has_cpus ? "true" : "false", config->cpus, config->has_sockets ? "true" : "false", config->sockets, config->has_dies ? "true" : "false", config->dies, + config->has_clusters ? "true" : "false", config->clusters, config->has_cores ? "true" : "false", config->cores, config->has_threads ? "true" : "false", config->threads, config->has_maxcpus ? "true" : "false", config->maxcpus); @@ -363,11 +401,12 @@ static char *cpu_topology_to_string(const CpuTopology= *topo) " .cpus =3D %u,\n" " .sockets =3D %u,\n" " .dies =3D %u,\n" + " .clusters =3D %u,\n" " .cores =3D %u,\n" " .threads =3D %u,\n" " .max_cpus =3D %u,\n" "}", - topo->cpus, topo->sockets, topo->dies, + topo->cpus, topo->sockets, topo->dies, topo->clusters, topo->cores, topo->threads, topo->max_cpus); } =20 @@ -391,6 +430,7 @@ static void check_parse(MachineState *ms, const SMPConf= iguration *config, (ms->smp.cpus =3D=3D expect_topo->cpus) && (ms->smp.sockets =3D=3D expect_topo->sockets) && (ms->smp.dies =3D=3D expect_topo->dies) && + (ms->smp.clusters =3D=3D expect_topo->clusters) && (ms->smp.cores =3D=3D expect_topo->cores) && (ms->smp.threads =3D=3D expect_topo->threads) && (ms->smp.max_cpus =3D=3D expect_topo->max_cpus)) { @@ -472,6 +512,11 @@ static void unsupported_params_init(const MachineClass= *mc, SMPTestData *data) data->expect_prefer_sockets.dies =3D 1; data->expect_prefer_cores.dies =3D 1; } + + if (!mc->smp_props.clusters_supported) { + data->expect_prefer_sockets.clusters =3D 1; + data->expect_prefer_cores.clusters =3D 1; + } } =20 static void machine_base_class_init(ObjectClass *oc, void *data) @@ -491,6 +536,7 @@ static void machine_generic_valid_class_init(ObjectClas= s *oc, void *data) mc->max_cpus =3D MAX_CPUS; =20 mc->smp_props.dies_supported =3D false; + mc->smp_props.clusters_supported =3D false; } =20 static void machine_generic_invalid_class_init(ObjectClass *oc, void *data) @@ -502,6 +548,7 @@ static void machine_generic_invalid_class_init(ObjectCl= ass *oc, void *data) mc->max_cpus =3D 511; =20 mc->smp_props.dies_supported =3D false; + mc->smp_props.clusters_supported =3D false; } =20 static void machine_with_dies_class_init(ObjectClass *oc, void *data) @@ -512,6 +559,18 @@ static void machine_with_dies_class_init(ObjectClass *= oc, void *data) mc->max_cpus =3D MAX_CPUS; =20 mc->smp_props.dies_supported =3D true; + mc->smp_props.clusters_supported =3D false; +} + +static void machine_with_clusters_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + + mc->min_cpus =3D MIN_CPUS; + mc->max_cpus =3D MAX_CPUS; + + mc->smp_props.clusters_supported =3D true; + mc->smp_props.dies_supported =3D false; } =20 static void test_generic_valid(const void *opaque) @@ -607,6 +666,56 @@ static void test_with_dies(const void *opaque) object_unref(obj); } =20 +static void test_with_clusters(const void *opaque) +{ + const char *machine_type =3D opaque; + Object *obj =3D object_new(machine_type); + MachineState *ms =3D MACHINE(obj); + MachineClass *mc =3D MACHINE_GET_CLASS(obj); + SMPTestData data =3D {}; + unsigned int num_clusters =3D 2; + int i; + + for (i =3D 0; i < ARRAY_SIZE(data_generic_valid); i++) { + data =3D data_generic_valid[i]; + unsupported_params_init(mc, &data); + + /* when clusters parameter is omitted, it will be set as 1 */ + data.expect_prefer_sockets.clusters =3D 1; + data.expect_prefer_cores.clusters =3D 1; + + smp_parse_test(ms, &data, true); + + /* when clusters parameter is specified */ + data.config.has_clusters =3D true; + data.config.clusters =3D num_clusters; + if (data.config.has_cpus) { + data.config.cpus *=3D num_clusters; + } + if (data.config.has_maxcpus) { + data.config.maxcpus *=3D num_clusters; + } + + data.expect_prefer_sockets.clusters =3D num_clusters; + data.expect_prefer_sockets.cpus *=3D num_clusters; + data.expect_prefer_sockets.max_cpus *=3D num_clusters; + data.expect_prefer_cores.clusters =3D num_clusters; + data.expect_prefer_cores.cpus *=3D num_clusters; + data.expect_prefer_cores.max_cpus *=3D num_clusters; + + smp_parse_test(ms, &data, true); + } + + for (i =3D 0; i < ARRAY_SIZE(data_with_clusters_invalid); i++) { + data =3D data_with_clusters_invalid[i]; + unsupported_params_init(mc, &data); + + smp_parse_test(ms, &data, false); + } + + object_unref(obj); +} + /* Type info of the tested machine */ static const TypeInfo smp_machine_types[] =3D { { @@ -628,6 +737,10 @@ static const TypeInfo smp_machine_types[] =3D { .name =3D MACHINE_TYPE_NAME("smp-with-dies"), .parent =3D TYPE_MACHINE, .class_init =3D machine_with_dies_class_init, + }, { + .name =3D MACHINE_TYPE_NAME("smp-with-clusters"), + .parent =3D TYPE_MACHINE, + .class_init =3D machine_with_clusters_class_init, } }; =20 @@ -648,6 +761,9 @@ int main(int argc, char *argv[]) g_test_add_data_func("/test-smp-parse/with_dies", MACHINE_TYPE_NAME("smp-with-dies"), test_with_dies); + g_test_add_data_func("/test-smp-parse/with_clusters", + MACHINE_TYPE_NAME("smp-with-clusters"), + test_with_clusters); =20 g_test_run(); =20 --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954948; cv=none; d=zohomail.com; s=zohoarc; b=E/mwSyp51oly/m0fnfZLxbL/2NZKvRXTqmAFlwlpisy5qmr5cuC5+mgcDur1HRP9N003bHw96cIbmAyNpZC3t/2gY9f1vOpucwWvx32PdPaEUWLDLOVOCb2ADZ7nRO32wcKeQatXiL4KWRNsc2UsggO+1X5NmNZ/RuhZW6KObWw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954948; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=AG4y2rzxLZGbpvB29+PEEBcSZMHPBx+rIwBTw7mt+eU=; b=cEK2T6e/UtiCcaglmOb4KS2AKJ8rxH9ckfgVZbc5RQgJzzMdZgvxMsY2e8mvL96WAa87qlqiF3uw5sXi0+PUmr3n24Dt3mk52/a9UIqPtkW746tI1Z4UPH4wEipPfAElyzrZ6+NHtNOc6rgr3Vntxlv18lETmUhAAi/ZQYq9ILM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954948113929.4646592336476; Fri, 31 Dec 2021 04:49:08 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-647-05_OikK3Mu6MyTAKnJawkA-1; Fri, 31 Dec 2021 07:49:06 -0500 Received: by mail-wr1-f70.google.com with SMTP id d13-20020adf9b8d000000b001a2aa837f8dso7538222wrc.3 for ; Fri, 31 Dec 2021 04:49:06 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id n12sm19710271wmq.30.2021.12.31.04.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:49:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954947; 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=AG4y2rzxLZGbpvB29+PEEBcSZMHPBx+rIwBTw7mt+eU=; b=bbsCgI0S/TnwcZraEvjSz3RlGMNtlJVplTDe8FYAIt+ZyztLC2pceyIvqvRDnXHjGBojfT 8e5FT+mx9OlBrx6b9itR8RMK4prB5VxQMIM/sKso3e/dmIN4lRPkNJe/ZXsI3pQZxcrWFD 4o7PHVjPZuKjUiOqFpgqt8oMpqAgljo= X-MC-Unique: 05_OikK3Mu6MyTAKnJawkA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AG4y2rzxLZGbpvB29+PEEBcSZMHPBx+rIwBTw7mt+eU=; b=YbM2yT/dGts/TckTUE5O1Nzf4yLW0JEdiM3k/C+eR/1+vw+AGCtoVDvR7W+MqEXDFo dbXBH0sLSNbb9VIFEiC3suYnCA+n+WsNzBwqxF2+18SXg3qlt6E+U3GiYi15vTeknmr4 ka7q56+kHpTpKJyMDDCWe8T3jPGI2hm+puTAG0Llxo7qA4bzsGizsoQrZpWzmnELnHR8 Po6Z3wUVvAMxkRtVKrxDbP1cp/7BMiIzX1utIu6UfQQl8gxUVgNBL9LlzLe8Z139kpPC nXoZ2gTjxBi5Cv6OJDZTXT1p7q31dB2NfZXFHVsWOup6cvzf/hbNFYva+SaIlICNehvT ALtA== X-Gm-Message-State: AOAM530cxH6Q+dg8EoqffCPgl9Nyr33NAAqPmLtOrJ30yt3fg1TnEEej HX4eJnvZWGO9mjUGHZ2r8ftpq0C9Ssz27FfFvP976sBY86OJtEhF/XpwTg9bX9RFuiK6adMpleP /5s1U9kydthBhQA== X-Received: by 2002:a05:600c:2059:: with SMTP id p25mr29424787wmg.151.1640954945204; Fri, 31 Dec 2021 04:49:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJx05hAnb72YWkxkRepho8vs7YnTo9QVVn0H4PymlCOSsxHLImvD4DGOKDMx1FXhptHL1jOISw== X-Received: by 2002:a05:600c:2059:: with SMTP id p25mr29424781wmg.151.1640954945059; Fri, 31 Dec 2021 04:49:05 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 16/20] tests/unit/test-smp-parse: No need to explicitly zero MachineClass members Date: Fri, 31 Dec 2021 13:47:50 +0100 Message-Id: <20211231124754.1005747-17-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954948621000001 From: Yanan Wang The default value of the MachineClass members is 0, which means we don't have to explicitly zero them. Also the value of "mc->smp_props.prefer_sockets" will be taken care of by smp_parse_test(), we don't necessarily need the statement in machine_base_class_init() either. Signed-off-by: Yanan Wang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211228092221.21068-6-wangyanan55@huawei.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/unit/test-smp-parse.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 331719bbc4b..72d83d1bbc9 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -523,8 +523,6 @@ static void machine_base_class_init(ObjectClass *oc, vo= id *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 - mc->smp_props.prefer_sockets =3D true; - mc->name =3D g_strdup(SMP_MACHINE_NAME); } =20 @@ -534,9 +532,6 @@ static void machine_generic_valid_class_init(ObjectClas= s *oc, void *data) =20 mc->min_cpus =3D MIN_CPUS; mc->max_cpus =3D MAX_CPUS; - - mc->smp_props.dies_supported =3D false; - mc->smp_props.clusters_supported =3D false; } =20 static void machine_generic_invalid_class_init(ObjectClass *oc, void *data) @@ -546,9 +541,6 @@ static void machine_generic_invalid_class_init(ObjectCl= ass *oc, void *data) /* Force invalid min CPUs and max CPUs */ mc->min_cpus =3D 2; mc->max_cpus =3D 511; - - mc->smp_props.dies_supported =3D false; - mc->smp_props.clusters_supported =3D false; } =20 static void machine_with_dies_class_init(ObjectClass *oc, void *data) @@ -559,7 +551,6 @@ static void machine_with_dies_class_init(ObjectClass *o= c, void *data) mc->max_cpus =3D MAX_CPUS; =20 mc->smp_props.dies_supported =3D true; - mc->smp_props.clusters_supported =3D false; } =20 static void machine_with_clusters_class_init(ObjectClass *oc, void *data) @@ -570,7 +561,6 @@ static void machine_with_clusters_class_init(ObjectClas= s *oc, void *data) mc->max_cpus =3D MAX_CPUS; =20 mc->smp_props.clusters_supported =3D true; - mc->smp_props.dies_supported =3D false; } =20 static void test_generic_valid(const void *opaque) --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954952; cv=none; d=zohomail.com; s=zohoarc; b=TJ5I8KHtvLUgicNnnqyJ4eN3ZUf5l1jFbFM6qTriUuE7HjXcuWIX3A+uWKZt/Hr6pEn3fDua1LTIu6q6gKnlBAxWv/DTV+x4zQwpcDL7dQxquksMt84r/KykI4XGl3hoLkDKZ6EWRo66LEDtwVNQWqX7FlpeDg/UzCaTWR2w7zU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954952; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=bClaEEXntH4eCLk8QgonvKJOvx/K9+KjgTtycd8N1c0=; b=NTTBFMNF2ADsaodkGEx8GgRqW+t3P6kiMiHb3YOZkmO080yeYZfaqWMVBTqBrRswvBKOtdOFqzkJgq3mSIYqz7RAAXfJnCL/5EtoS4s7VLw+scJrY9IrOCUzFaP0w80rrkOGyaL4vMTzhFDuRUnBrNN4e1FEMSa9rI6IDcCKRCI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954952403830.3716883724494; Fri, 31 Dec 2021 04:49:12 -0800 (PST) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-369-rqHw0draMnqTcVz2OuxchQ-1; Fri, 31 Dec 2021 07:49:10 -0500 Received: by mail-wr1-f71.google.com with SMTP id h12-20020adfa4cc000000b001a22dceda69so7513768wrb.16 for ; Fri, 31 Dec 2021 04:49:10 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id b14sm24166561wri.112.2021.12.31.04.49.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954951; 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=bClaEEXntH4eCLk8QgonvKJOvx/K9+KjgTtycd8N1c0=; b=QpKQ2b2tbbe7hmy9LYcNgoR8krME+IbtMQHFSIFciafg38NVCilW7o9ToCu6h9jhQlOSoP Zh5DcMWGM0nF+RZ28I+mZZi+oxJXmrJdwqffb2oqp0qTZ8PkkKWuR5EEJtyN8qe+SOF3bj HpqGskI3zHl7yEkp7gwYCUaitH9hVPA= X-MC-Unique: rqHw0draMnqTcVz2OuxchQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bClaEEXntH4eCLk8QgonvKJOvx/K9+KjgTtycd8N1c0=; b=XrSMy2IIL0vnTAETQNJmEnpAsfCqE4XICsfkyRoGo+AFHoThrjFy1rXubncH+eP50G uUiMujyOUfL2e0ZVv96grqZj5ubqnadqvYZzgQmsoFt9TY8NdzLAmMzwaSJSuf7RaO/g eldlJkFLV0vdCnEAD21soZetnF7WTji+ILadX+cDLXneDIhGCdqdl3+NNqFVDvSLZKzV 4uTMxhPkTHhcME6dMyoA24Z5ak8zzDs2H0ZxTRz3IAC4MH7SmibGEI5Ui4DH+FBuenjl +KUp+gSQLMectWnKkO/dM9yMzsXuLekUvgRoJb3GnF/TyQP1kj6DFtAawANj7kEi9/YR 1LAQ== X-Gm-Message-State: AOAM533X4wB17HNR3s6HzA+2ex+k0xWnL5XQj25rvCPwxEiOC1g4OY5v F0cu5aKW5bq5rQ0ChkQV+uzuazbCqSYMrmGgvWavVoaPQLC0TQBKvCuy81vl+ZwYZ97+qKirFxQ Yt73JI7ljgBhP8w== X-Received: by 2002:a7b:cc90:: with SMTP id p16mr29756334wma.98.1640954949513; Fri, 31 Dec 2021 04:49:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWuCwwlXTyrcrYJKmEn7ys2XzdLsNHWQa3xdMufv+f+nHpUFYJbRjDgnt/SKcBQprZWli78Q== X-Received: by 2002:a7b:cc90:: with SMTP id p16mr29756326wma.98.1640954949315; Fri, 31 Dec 2021 04:49:09 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 17/20] tests/unit/test-smp-parse: Keep default MIN/MAX CPUs in machine_base_class_init Date: Fri, 31 Dec 2021 13:47:51 +0100 Message-Id: <20211231124754.1005747-18-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954953244000001 From: Yanan Wang Most machine types in test-smp-parse will be OK to have the default MIN/MAX CPUs except "smp-generic-invalid", let's keep the default values in machine_base_class_init which will be inherited. And if we hope a different value for a specific machine, modify it in its own initialization function. Signed-off-by: Yanan Wang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211228092221.21068-7-wangyanan55@huawei.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/unit/test-smp-parse.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 72d83d1bbc9..fdc39a846ca 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -523,15 +523,10 @@ static void machine_base_class_init(ObjectClass *oc, = void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 - mc->name =3D g_strdup(SMP_MACHINE_NAME); -} - -static void machine_generic_valid_class_init(ObjectClass *oc, void *data) -{ - MachineClass *mc =3D MACHINE_CLASS(oc); - mc->min_cpus =3D MIN_CPUS; mc->max_cpus =3D MAX_CPUS; + + mc->name =3D g_strdup(SMP_MACHINE_NAME); } =20 static void machine_generic_invalid_class_init(ObjectClass *oc, void *data) @@ -547,9 +542,6 @@ static void machine_with_dies_class_init(ObjectClass *o= c, void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 - mc->min_cpus =3D MIN_CPUS; - mc->max_cpus =3D MAX_CPUS; - mc->smp_props.dies_supported =3D true; } =20 @@ -557,9 +549,6 @@ static void machine_with_clusters_class_init(ObjectClas= s *oc, void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 - mc->min_cpus =3D MIN_CPUS; - mc->max_cpus =3D MAX_CPUS; - mc->smp_props.clusters_supported =3D true; } =20 @@ -718,7 +707,6 @@ static const TypeInfo smp_machine_types[] =3D { }, { .name =3D MACHINE_TYPE_NAME("smp-generic-valid"), .parent =3D TYPE_MACHINE, - .class_init =3D machine_generic_valid_class_init, }, { .name =3D MACHINE_TYPE_NAME("smp-generic-invalid"), .parent =3D TYPE_MACHINE, --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954956; cv=none; d=zohomail.com; s=zohoarc; b=afuNmE3TZnT7XXDSFQf6WHKa8IbCURqGB6AQVOaJBBfIjXEH3Yx6GNo8+zdpgTqwfNiKPBng14fmVDbB+A1J9sGrY+K0LG/1iGmw9008oICohLpRER/h10bK9KCdWRd3C+AVoEKudZFWaWPhIj1xlGNwEUN/bVK41i8YQcXgTpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954956; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=5twDjfVw/oTpCn6cBBCJzXNnnYheekXKgSPRSk/tbyo=; b=WwHGtp3IOe/K1BkMYWmoW2IB4lrJ7Qdfw3qqSHOkif+OrU6TC4BWpRxk7GEwpnysdDI/j5fROpTjKpODSBo9Nl7uOmbYxxkonIpatWy/3osnBjRtEZj/VvZhGCFSsY9C7gIgLnQnBTYcAd43GtUaFyHpClpEUkqALtE6z++C2aE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1640954956821734.3916417684267; Fri, 31 Dec 2021 04:49:16 -0800 (PST) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-654-wXJayfGPPEasFcA6N6CaQA-1; Fri, 31 Dec 2021 07:49:15 -0500 Received: by mail-wr1-f71.google.com with SMTP id q21-20020adfab15000000b001a24b36e47eso7487634wrc.2 for ; Fri, 31 Dec 2021 04:49:14 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id 1sm19669463wrb.13.2021.12.31.04.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954956; 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=5twDjfVw/oTpCn6cBBCJzXNnnYheekXKgSPRSk/tbyo=; b=KzU6ILCBMF0qcPaLfV/F1Wx0/v8JUUs7rVDSC2AGhQfZrIKZ9pFr/Jo2T6Wb2RNL+MaCVN icpNBaeHuAQ8Omhsv1sols0yTAHPeDLvnhePJj7IFRZju3bhmBySZcob9UiJ+1vSdqexFY gy1fGEvNM/SKaLnRBNcPLUBXUt/XTHo= X-MC-Unique: wXJayfGPPEasFcA6N6CaQA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5twDjfVw/oTpCn6cBBCJzXNnnYheekXKgSPRSk/tbyo=; b=b73RYGRrOcWcS8cBM3EDFatib17+BfWfVArGDXU6bHRQgBWlOigBZrsvI6JapZrzhe HmAQAtnSN2r+OANis1luntCVi94kf547IOjGpcQvkhFfMHmasbyBSb+GdihWTZDv4VhK roCcfkzQ2HsxbJiuzaRBgzldx8qeJf5IaqgIqOa5xfkeSUsFeJoSD3MGgdMccv9gPRIz JLouh2qUjpwrVPKeUGayfw2T7ggWVPqNoM/M1wTb4kYACtszKiKBHZzMQPy4VtlNyIky BcWjz5gwwQ+qh0yOJpkEHE25n6GB0BM6yiCn4c2Vh+6gfpzjWqAhV9lFyZUNDLmgjO3P qqdw== X-Gm-Message-State: AOAM530cTtJNR6TLlJiyr7cgbwgUCygEyMCHN/IGeNADbTDv1V7E/Z38 L581uFWM6MGMjt1VNwKNUBPqNQ/votU6OhKm2ZZ0BnXICeFqByrlpY13gkOhKBTFhVV3Lktl1N1 vbl6iyxDtKg9Odw== X-Received: by 2002:adf:f741:: with SMTP id z1mr29545966wrp.54.1640954953836; Fri, 31 Dec 2021 04:49:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDBCnBviOpIeEQUNaD3s4Pg6XjeK+jAvXOg8/JmI2P1j78IsAJsY56lM/US3xdURAST+byUQ== X-Received: by 2002:adf:f741:: with SMTP id z1mr29545957wrp.54.1640954953646; Fri, 31 Dec 2021 04:49:13 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 18/20] MAINTAINERS: Self-recommended as reviewer of "Machine core" Date: Fri, 31 Dec 2021 13:47:52 +0100 Message-Id: <20211231124754.1005747-19-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954957864000001 From: Yanan Wang I've built interests in the generic machine subsystem and have also been working on projects related to this part, self-recommand myself as a reviewer so that I can help to review some patches familiar to me, and have a chance to learn more continuously. Signed-off-by: Yanan Wang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211228092221.21068-8-wangyanan55@huawei.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 54565368054..fe5eea76f67 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1631,6 +1631,7 @@ Machine core M: Eduardo Habkost M: Marcel Apfelbaum R: Philippe Mathieu-Daud=C3=A9 +R: Yanan Wang S: Supported F: cpu.c F: hw/core/cpu.c --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954963; cv=none; d=zohomail.com; s=zohoarc; b=iPfEoDU5KBSPQ47uIvUEmJ6nCV4nf7j+GO5xNelyhYQNH8v/H2gl4NVPQFd6u48GJp3HVtPFGWdUGP+PZ3yqHFd2M+xRv8+BKuPIQQxebWYRFfAPQ+4+y5N6+bAlfW+7NYWTqWCvRJKUZEfR8SPMMbiCMNL1VUiHhB62kDbzG8k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954963; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=93VPh+l1pFg92Ehm7FnMqhc0uWxRDWcIdf0CzMkvjbk=; b=jWgbdA9DqfRG9469de/R5f+xvZu+Cx52Ml7iBg9I6e3vz0GsrcbZhdJqUjnWy6ceUFxaqPo+wrvU5sK3CZuV4wQKg+KmqKqIluhByRsOMF6ecK/pZwA+HpjfuCHsUOKxFNahxKBdADM3rt6FIwmamLK8mkMpifi7gVICAI+MXVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954963233894.9326485745478; Fri, 31 Dec 2021 04:49:23 -0800 (PST) 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-361-QPjOxbAnMGGTCZ_zte4SKw-1; Fri, 31 Dec 2021 07:49:19 -0500 Received: by mail-wr1-f70.google.com with SMTP id j26-20020adfb31a000000b001a2356afd4fso7512544wrd.21 for ; Fri, 31 Dec 2021 04:49:19 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id l26sm26399403wrz.44.2021.12.31.04.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:49:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954962; 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=93VPh+l1pFg92Ehm7FnMqhc0uWxRDWcIdf0CzMkvjbk=; b=D0nCwUwD9PoQzUzF8DcC9V7RgW2Bzjllf04rRcVesoeS6CpvwftDDbuC5j4YkKz4v3kpb5 QJXsh+Tl5BnlVKYAt4TQpGYiZBP7l5DSe5M2Gfd+8eNIAtc08anHVw0Fivs5vaW9oz9qOh n1NGeyreO2mtUevxjtj8xttUlMkyOVw= X-MC-Unique: QPjOxbAnMGGTCZ_zte4SKw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=93VPh+l1pFg92Ehm7FnMqhc0uWxRDWcIdf0CzMkvjbk=; b=tEcnAHuTK/i5jsMYFn2ipAk0Y62XC+9mwEa2d3J4QswLkIZmN37Ud0VdVBxTCDcznx uwoeQnKJcubm17xX0Km2f3sjQD0dsjd0atVWWUI4fQrEXFzAhtpXDqI+j1dSOHPbhET3 HeuYuV+mbXDIOG58Iealnve1kDewyL6Q0qv4uGjgIXoVBpA0mdYoAGu4CBTyVl2pv1K+ Z4lE6GwKhstjf7bRwYlpzECqHTcDuwDlWBs0oLT0khu1NuO9P1oZPqTYahuEixfvj2p+ BcH70ZO1ztS5KbIcoG5LvntHimVSCS0NfX6VU9passwW0XtpbQmx1C7fj6qeTQFBMUaS UMCw== X-Gm-Message-State: AOAM532h0LmAdeurXH1rCZKAHToS9GXfhjjCL3aDHWoMHRAHfOmC9KmZ b6RbJemcJNw7T9LxickNcJzwRmiy0NhPs58lrpbkRjlQxU5qHFtZKHhsbKrQdHT4ZvTMYDdkjfU VDn7L7K/wDVoUrw== X-Received: by 2002:a5d:56c2:: with SMTP id m2mr29302470wrw.313.1640954958224; Fri, 31 Dec 2021 04:49:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7CYZVL3mgRAeJ2vF4LSDCeG8wD0+tbRSix0I/GbFEekILPoeksc7hgOZi3yej2AcoCxK6rg== X-Received: by 2002:a5d:56c2:: with SMTP id m2mr29302458wrw.313.1640954958019; Fri, 31 Dec 2021 04:49:18 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 19/20] MAINTAINERS: Change philmd's email address Date: Fri, 31 Dec 2021 13:47:53 +0100 Message-Id: <20211231124754.1005747-20-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954964641000001 The philmd@redhat.com email address will stop working on 2022-01-01, change it to my personal email address. Update .mailmap in case anyone wants to send me an email because of some past commit I authored. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211231000759.707519-1-philmd@redhat.com> --- .gitlab-ci.d/edk2/Dockerfile | 2 +- .mailmap | 1 + MAINTAINERS | 18 +++++++++--------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.d/edk2/Dockerfile b/.gitlab-ci.d/edk2/Dockerfile index b4584d1cf64..13029310f6d 100644 --- a/.gitlab-ci.d/edk2/Dockerfile +++ b/.gitlab-ci.d/edk2/Dockerfile @@ -3,7 +3,7 @@ # FROM ubuntu:16.04 =20 -MAINTAINER Philippe Mathieu-Daud=C3=A9 +MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 # Install packages required to build EDK2 RUN apt update \ diff --git a/.mailmap b/.mailmap index c45d1c53014..5113f55b3a0 100644 --- a/.mailmap +++ b/.mailmap @@ -63,6 +63,7 @@ Paul Burton Paul Burton Paul Burton Paul Burton +Philippe Mathieu-Daud=C3=A9 Stefan Brankovic Yongbok Kim =20 diff --git a/MAINTAINERS b/MAINTAINERS index fe5eea76f67..ae6c74f3ff5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1630,7 +1630,7 @@ F: pc-bios/bios-microvm.bin Machine core M: Eduardo Habkost M: Marcel Apfelbaum -R: Philippe Mathieu-Daud=C3=A9 +R: Philippe Mathieu-Daud=C3=A9 R: Yanan Wang S: Supported F: cpu.c @@ -1811,7 +1811,7 @@ F: docs/virtio-net-failover.rst T: git https://github.com/jasowang/qemu.git net =20 Parallel NOR Flash devices -M: Philippe Mathieu-Daud=C3=A9 +M: Philippe Mathieu-Daud=C3=A9 T: git https://gitlab.com/philmd/qemu.git pflash-next S: Maintained F: hw/block/pflash_cfi*.c @@ -2227,7 +2227,7 @@ F: hw/isa/piix4.c F: include/hw/southbridge/piix.h =20 Firmware configuration (fw_cfg) -M: Philippe Mathieu-Daud=C3=A9 +M: Philippe Mathieu-Daud=C3=A9 R: Gerd Hoffmann S: Supported F: docs/specs/fw_cfg.txt @@ -2525,7 +2525,7 @@ F: scripts/coccinelle/errp-guard.cocci =20 GDB stub M: Alex Benn=C3=A9e -R: Philippe Mathieu-Daud=C3=A9 +R: Philippe Mathieu-Daud=C3=A9 S: Maintained F: gdbstub* F: include/exec/gdbstub.h @@ -2536,7 +2536,7 @@ Memory API M: Paolo Bonzini M: Peter Xu M: David Hildenbrand -R: Philippe Mathieu-Daud=C3=A9 +R: Philippe Mathieu-Daud=C3=A9 S: Supported F: include/exec/ioport.h F: include/exec/memop.h @@ -3030,14 +3030,14 @@ F: include/hw/i2c/smbus_slave.h F: include/hw/i2c/smbus_eeprom.h =20 Firmware schema specifications -M: Philippe Mathieu-Daud=C3=A9 +M: Philippe Mathieu-Daud=C3=A9 R: Daniel P. Berrange R: Kashyap Chamarthy S: Maintained F: docs/interop/firmware.json =20 EDK2 Firmware -M: Philippe Mathieu-Daud=C3=A9 +M: Philippe Mathieu-Daud=C3=A9 R: Gerd Hoffmann S: Supported F: hw/i386/*ovmf* @@ -3275,7 +3275,7 @@ F: block/null.c NVMe Block Driver M: Stefan Hajnoczi R: Fam Zheng -R: Philippe Mathieu-Daud=C3=A9 +R: Philippe Mathieu-Daud=C3=A9 L: qemu-block@nongnu.org S: Supported F: block/nvme* @@ -3518,7 +3518,7 @@ F: tests/tcg/Makefile.include Integration Testing with the Avocado framework W: https://trello.com/b/6Qi1pxVn/avocado-qemu R: Cleber Rosa -R: Philippe Mathieu-Daud=C3=A9 +R: Philippe Mathieu-Daud=C3=A9 R: Wainer dos Santos Moschetta R: Beraldo Leal S: Odd Fixes --=20 2.33.1 From nobody Sun May 19 12:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954965; cv=none; d=zohomail.com; s=zohoarc; b=CwZff48VcpzyesHQCikXBabEy6kOJR4C5l4/qj8id4iJjmc27aL2zCdT7UCgI2sop+Njcgtxcw2QGn5/uIOjGP0t5CuniNMWjSwqMCwkyfj4MlU8laiHbkMPLBSbBihVoYhdoF9R3i2s1kxBiEJSN0MIStGA7nx2X1fqtYxTccI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954965; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=X3dwL7UtUUj/bBavCjeaTxvYP5y2clkbdynk8B+7VuI=; b=engindzqgzeWYmxdehzlAyUTtzX2uZd6N/ROK2c+6paT9txsOdR96+uws02Jb7qFLFPk3E0Z3FKtXCqXe+iSdcv/3t9kN7f1fMxr9CLhCwJO/oh39ys0jK/Ix2+hg2aacTjN6nAxJKrk+zWCT2A9oPiOKkRptYCnumgvplhx9XQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954965562915.3913991173606; Fri, 31 Dec 2021 04:49:25 -0800 (PST) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-379-8zYCRhYkMICWvjLVV085Fg-1; Fri, 31 Dec 2021 07:49:23 -0500 Received: by mail-wr1-f71.google.com with SMTP id j26-20020adfb31a000000b001a2356afd4fso7512610wrd.21 for ; Fri, 31 Dec 2021 04:49:23 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id b2sm29767671wrd.35.2021.12.31.04.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:49:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954964; 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=X3dwL7UtUUj/bBavCjeaTxvYP5y2clkbdynk8B+7VuI=; b=i8VrunZDfcYDADik+fQE45eXh9qw9d2zUtyM+PThPPRTAoJImT3mC3SAi3vvDlr05bwqN6 jaYR2u67TMw2eYAYzrWVlzNTyrr2ighU4PSFihnZbhL/l4mK4E6TepkTI6zPts4NMw6C/7 afUQmWRX5YzWLo7nSKHenUjafVBsc4Q= X-MC-Unique: 8zYCRhYkMICWvjLVV085Fg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X3dwL7UtUUj/bBavCjeaTxvYP5y2clkbdynk8B+7VuI=; b=w5XycOz234qszGZzhsxr2L7rHADbSIvjNBghdritd6WfA7tYgFzifgBrf5jv+Cj/PA TNz6wO25ZfQjZiMdCzX6lQshFM6F/XkxHYcY/6EKoQ7872hsCbT+roe1biw2zpzQOK3j ByNOUokmRqheHpDBt4NdWFh6jQbNB2kEmWWXXrV12ovHr8GyrfIubjXSFock6vIujGFP BW71bDKS2YqM6tTiYq2yL/nsl2mgIAFWIsTmjG5V3UThG8U9cCTfy+ht1yEdrNQzO9ul AHoq/ar7pqqNW67S7p9tsh7hXFJ89lq+oSwwgyABHxFRpAejgWacnytWQySIgbCP5rbZ ntQw== X-Gm-Message-State: AOAM530yaVkBVa3y5A+fuMSYpp8fcK9vrKrvBu2XJgUjoZgqthwZ0mn6 lC2SfbPwzKXIwjhQZ90FYLrtruAa+AgXP/7+LbdbOSmGJRs02BCC+Cwxm7yQbp0Qx96JAzhq2xy xAZ5YdGsTb9M4Qw== X-Received: by 2002:adf:fbc1:: with SMTP id d1mr29563981wrs.648.1640954962557; Fri, 31 Dec 2021 04:49:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJweyDImbM9rqmy0pSxNjJC0aepMxZCZ6hSBZkraB7FthuRAMPLQU6/PWHYLBHNy2QLBqWnirg== X-Received: by 2002:adf:fbc1:: with SMTP id d1mr29563971wrs.648.1640954962368; Fri, 31 Dec 2021 04:49:22 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , Li Zhijian , Zhang Chen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 20/20] MAINTAINERS: email address change Date: Fri, 31 Dec 2021 13:47:54 +0100 Message-Id: <20211231124754.1005747-21-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954966979000001 From: Li Zhijian Fujitsu's mail service has migrated to O365 months ago, the lizhijian@cn.fujitsu.com address will stop working on 2022-06-01, change it to my new email address lizhijian@fujitsu.com. Signed-off-by: Li Zhijian Acked-by: Zhang Chen Message-Id: <20211231050901.360-1-lizhijian@cn.fujitsu.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index ae6c74f3ff5..f871d759fdf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2982,7 +2982,7 @@ F: docs/COLO-FT.txt =20 COLO Proxy M: Zhang Chen -M: Li Zhijian +M: Li Zhijian S: Supported F: docs/colo-proxy.txt F: net/colo* --=20 2.33.1