From patchwork Mon May 4 14:29:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19527C3A5A9 for ; Mon, 4 May 2020 14:32:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D63B020757 for ; Mon, 4 May 2020 14:32:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aa9W0n47" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D63B020757 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVc8j-0001Ti-Tl for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:32:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc5z-0004ZH-83 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:23 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47909 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc5y-0005nx-AR for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602561; 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=iNQ9lS7EsKMnaq4ojaGLEYxIauihn/k1pWhlz/tga24=; b=aa9W0n47REg0q8OHy7sG+52xfRdz1Jq0Atyy2Zq/v+e91bvjwui1272olFLOg+/OBB4xAR f81/t2c9GCRVN8gLN6rfBlx6TJrE2WLsPbnPgjKR/WSML8zf+5KFBm8qj7VwWKHpCJYNnX +WIbI53cUAlzuAje+G8b09AbJtPoAI0= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-24--2tbKlS8NA-MkG3Gr7m4BA-1; Mon, 04 May 2020 10:29:19 -0400 X-MC-Unique: -2tbKlS8NA-MkG3Gr7m4BA-1 Received: by mail-wm1-f72.google.com with SMTP id o26so3595534wmh.1 for ; Mon, 04 May 2020 07:29:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2TfSO6YI3NjUeMo8pj4D4ib48WZ7vfY2z5+JNtWiNow=; b=ijF4hmPGCeoJIAfYn9vZ/ZpCcWOnZ3pJPu9r0QKpUPvXuyJ+dKwh2tg6PzI8xQyLnC 2ozMbVHJMGNBNF9StdXWM2MdVJVkrXNqf9O4y2g7Y7wJm2MA4/T84k3ARtXpEJHNagpw lgIBlXiOGt4UchVlOfvpSva28S0ijhau4f1eNd3/Su8McJkQHOo/5isG/cP8s48ztece Wpxvgyu3hEazQCvfDpfqeK2OoZX5bTno+6qF2vhmPSsyOIhgcpcEc2HZwrN+6R5yq+ck 0uUKfV1nWjLmLm9/5l+hWgJla5YPe6JsP3f2pI9fEKM1HdKcVinrbS+m14ihM/gjUvwq s8Wg== X-Gm-Message-State: AGi0PuaLC3YGcr+XHpPZG25bOTjuDT7X2PM+rm+QGKZRyX/3f6PVbnkb noA/l/WAMItm5sd/gemOFhqn8hQvC8sQGoi/zxx6PNQToPzqkF5tK42BKMnOPRn3Jm2KQ33soKs MxWDDqOAENh3tZrw= X-Received: by 2002:adf:eec3:: with SMTP id a3mr14292602wrp.164.1588602557754; Mon, 04 May 2020 07:29:17 -0700 (PDT) X-Google-Smtp-Source: APiQypI75pTeHi0Vq96RhfuCymuKTdrHh8JAMSoeXkncHs9sLO/cOObQueXlsWrRveiPhfE2LE0MpA== X-Received: by 2002:adf:eec3:: with SMTP id a3mr14292510wrp.164.1588602556517; Mon, 04 May 2020 07:29:16 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id z6sm6412504wrt.57.2020.05.04.07.29.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:16 -0700 (PDT) Date: Mon, 4 May 2020 10:29:14 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 01/29] hw/pci/pcie: Forbid hot-plug if it's disabled on the slot Message-ID: <20200504142814.157589-2-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Julia Suvorova Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Julia Suvorova Raise an error when trying to hot-plug/unplug a device through QMP to a device with disabled hot-plug capability. This makes the device behaviour more consistent and provides an explanation of the failure in the case of asynchronous unplug. Signed-off-by: Julia Suvorova Message-Id: <20200427182440.92433-2-jusual@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- hw/pci/pcie.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 0eb3a2a5d2..6b48d04d2c 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -415,6 +415,7 @@ void pcie_cap_slot_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, { PCIDevice *hotplug_pdev = PCI_DEVICE(hotplug_dev); uint8_t *exp_cap = hotplug_pdev->config + hotplug_pdev->exp.exp_cap; + uint32_t sltcap = pci_get_word(exp_cap + PCI_EXP_SLTCAP); PCIDevice *pci_dev = PCI_DEVICE(dev); /* Don't send event when device is enabled during qemu machine creation: @@ -430,6 +431,13 @@ void pcie_cap_slot_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, return; } + /* Check if hot-plug is disabled on the slot */ + if ((sltcap & PCI_EXP_SLTCAP_HPC) == 0) { + error_setg(errp, "Hot-plug failed: unsupported by the port device '%s'", + DEVICE(hotplug_pdev)->id); + return; + } + /* To enable multifunction hot-plug, we just ensure the function * 0 added last. When function 0 is added, we set the sltsta and * inform OS via event notification. @@ -470,6 +478,17 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev, Error *local_err = NULL; PCIDevice *pci_dev = PCI_DEVICE(dev); PCIBus *bus = pci_get_bus(pci_dev); + PCIDevice *hotplug_pdev = PCI_DEVICE(hotplug_dev); + uint8_t *exp_cap = hotplug_pdev->config + hotplug_pdev->exp.exp_cap; + uint32_t sltcap = pci_get_word(exp_cap + PCI_EXP_SLTCAP); + + /* Check if hot-unplug is disabled on the slot */ + if ((sltcap & PCI_EXP_SLTCAP_HPC) == 0) { + error_setg(errp, "Hot-unplug failed: " + "unsupported by the port device '%s'", + DEVICE(hotplug_pdev)->id); + return; + } pcie_cap_slot_plug_common(PCI_DEVICE(hotplug_dev), dev, &local_err); if (local_err) { From patchwork Mon May 4 14:29:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BB81C3A5A9 for ; Mon, 4 May 2020 14:30:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2772920752 for ; Mon, 4 May 2020 14:30:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WSPX1s9F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2772920752 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVc78-0006Zj-8g for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:30:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc64-0004le-MR for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:28 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:30559 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc63-0005uH-QY for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602566; 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=RVNBXQ6gCt5bQDUAiEhYyrhSoB3/uLQxROx/EqMXEOY=; b=WSPX1s9FyizLf/Lw1AEVG019Gy2DxMSczdDM7DHtFZ5U+pzAxPBC6968zrBTeiHLdlMyE7 AI7fy2lktinWWsjI06DpxICmH+42YW2hJp1LIIa9L/9zu42LNRcBAT1Yc7OPyvp2Kq/XE7 qLPgAcFh5Q3CNQonrkilCMVV5J4ZvdY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-SWzU5saQNFaUktpH_B9ZyA-1; Mon, 04 May 2020 10:29:23 -0400 X-MC-Unique: SWzU5saQNFaUktpH_B9ZyA-1 Received: by mail-wr1-f71.google.com with SMTP id f2so10885537wrm.9 for ; Mon, 04 May 2020 07:29:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=FdYlmucZgrrExS0b58B/UTT/h6F9NNUpPPWcF8bmd5g=; b=SzFOZ6hFHTA7KrCs6sMNrdjpsR4ccQ3VwwGnmpy0D5pJ+KuScUm9qX9NNJ4wZPCmsu DTQriDAiO+Ith1PDaEVjg8k2SvB0oLdcNI5RzyVSRF8cdCjt5ODzmBLvT+NFr6LRp830 GOR/nw73GlieLSbAlLJAXzkh/Mgh3zPAtdFv2z3gBccfVRY2uSs0Wuv1+N+qtsJ/P92B pmbEWOnBQNd3Qlj7QxNsqMMhOBo+Mr1VhuTQMEkrHQIX2cbC3HQiqSAoKAMSkG1vC7CO 3mpuIRmm7LuAsFEEbYGJ0n9s8vKHqr5HyjUR42R/3PD89BEq1E15kgCIVqlMA6JSHUU5 0SMQ== X-Gm-Message-State: AGi0PubAnKmdpgCEyuiaV1Z6QJkuYzaiZz/9OummVaYkYopO9qaFTr52 u0DUGUlKZoEAsRMK/iRpHQ4A0MGEUfGauG7RWJNtjn0nLRC30kjdIb1XpllTTBHR93Yv727GgPD iBhRAyhpkmJq/kHY= X-Received: by 2002:adf:de08:: with SMTP id b8mr6998272wrm.76.1588602562253; Mon, 04 May 2020 07:29:22 -0700 (PDT) X-Google-Smtp-Source: APiQypIlTRZu2f7D3ENRjnzjyZQ1+CGYfWiPg5OcES4XO/b8gNznMiN12K4gJuzWHAisO1NTaI/nUA== X-Received: by 2002:adf:de08:: with SMTP id b8mr6998259wrm.76.1588602562096; Mon, 04 May 2020 07:29:22 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id l16sm18804044wrp.91.2020.05.04.07.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:21 -0700 (PDT) Date: Mon, 4 May 2020 10:29:20 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 03/29] move 'typedef Aml' to qemu/types.h Message-ID: <20200504142814.157589-4-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.61; envelope-from=mst@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 01:21:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Philippe =?utf-8?q?Mathieu-D?= =?utf-8?b?YXVkw6k=?= , Gerd Hoffmann , Igor Mammedov Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Message-Id: <20200429140003.7336-2-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- include/hw/acpi/aml-build.h | 1 - include/qemu/typedefs.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 0f4ed53d7f..1539fe0667 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -33,7 +33,6 @@ struct Aml { uint8_t op; AmlBlockFlags block_flags; }; -typedef struct Aml Aml; typedef enum { AML_COMPATIBILITY = 0, diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 375770a80f..ecf3cde26c 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -24,6 +24,7 @@ typedef struct AdapterInfo AdapterInfo; typedef struct AddressSpace AddressSpace; typedef struct AioContext AioContext; +typedef struct Aml Aml; typedef struct AnnounceTimer AnnounceTimer; typedef struct BdrvDirtyBitmap BdrvDirtyBitmap; typedef struct BdrvDirtyBitmapIter BdrvDirtyBitmapIter; From patchwork Mon May 4 14:29:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 030AFC3A5A9 for ; Mon, 4 May 2020 14:55:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C21AD206B9 for ; Mon, 4 May 2020 14:55:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NTKtNCLb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C21AD206B9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcUw-0000OY-Sn for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:55:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc9p-0003TM-Eh for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:21 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:22020 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc9o-0008VJ-Cc for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602799; 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=7CFiYdy5xKBq+FqRALV9f5jvve8p3XfD9KaQL2vD9EY=; b=NTKtNCLbq6zAKkd1YkK4oUWZmSV3pxYAEKEVqgeHuf/h8zFZlO95H2JC/C71UyFxZD8uIo TNulGD/miBhDDAA+SI4jNluvM+7ot6mWbVLTjZ/YzCnnESdhlbvavzfS5XC56mlwdiyUFb WDLt+VcYVENR+iCT8IIDxl5zlxD+ju8= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-95-7WejOYbsMgemnJPzwr9OKg-1; Mon, 04 May 2020 10:29:25 -0400 X-MC-Unique: 7WejOYbsMgemnJPzwr9OKg-1 Received: by mail-wm1-f70.google.com with SMTP id f81so3591318wmf.2 for ; Mon, 04 May 2020 07:29:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JRBmE8DpKczmzdQy5ljVjs1IfdrTue9vhDooFsQOZLw=; b=YVGSxf7ghfZTBwHPVgGMwdElFQJaUd3rJ1djpmchc1L5DX8amZpyZBN2hfuW3B/pCD CnKjkSYdFJR1wkqYuEBFT+vQWoEtvqS+Nanb5R1vu/Gw6KeVayC/s5c9+V4EkE3Yz+Cf OZKWZK4C8kw4/PL3BzBfepPhgdeToSQVrKe0/vHikN/jSrPmk20wM2uYsXLCuKOR1btF FMAtcOMHahJQc+/PNJm6zhYd/ujHLv7uGadZjPWBxPkR+maWD+etTRdGYFG6EcIiZHmS I7Z8GkJrv1UVI/4E1tdWHYbsWBK04d4guSQEZTAK0I4K7pWXs9KoUkfjW8Lyq+5KI1vs rOzw== X-Gm-Message-State: AGi0Pub2yI5ax3/LNHRsDnnJ5BuhEH/155ZvqenvHeMSOJFhVYgnYR7V ZaZQYufc6zHE4ejUXGk/kchzG2aWXOIQy77udQpUoDFWe7NzsxRSxpAim3cuYGuP38gTyOHsU4R aRcHy017hpRrGQE4= X-Received: by 2002:a7b:cdfa:: with SMTP id p26mr14860026wmj.186.1588602564523; Mon, 04 May 2020 07:29:24 -0700 (PDT) X-Google-Smtp-Source: APiQypI32bfvp4kNFdMrvwcifITD+rmyGEDlRc6OBeyQkLYtRxGRFs/3PE0GpW9FzxOiLW23xpSCMw== X-Received: by 2002:a7b:cdfa:: with SMTP id p26mr14860015wmj.186.1588602564328; Mon, 04 May 2020 07:29:24 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id s24sm14080673wmj.28.2020.05.04.07.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:23 -0700 (PDT) Date: Mon, 4 May 2020 10:29:22 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 04/29] acpi: add aml builder stubs Message-ID: <20200504142814.157589-5-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Gerd Hoffmann , Igor Mammedov Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Needed when moving aml builder code to devices. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Message-Id: <20200429140003.7336-3-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/aml-build-stub.c | 79 ++++++++++++++++++++++++++++++++++++++++ hw/acpi/Makefile.objs | 4 +- 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 hw/acpi/aml-build-stub.c diff --git a/hw/acpi/aml-build-stub.c b/hw/acpi/aml-build-stub.c new file mode 100644 index 0000000000..58b2e16227 --- /dev/null +++ b/hw/acpi/aml-build-stub.c @@ -0,0 +1,79 @@ +/* + * ACPI aml builder stubs for platforms that don't support ACPI. + * + * Copyright (c) 2006 Fabrice Bellard + * Copyright (c) 2016 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/acpi/acpi.h" +#include "hw/acpi/aml-build.h" + +void aml_append(Aml *parent_ctx, Aml *child) +{ +} + +Aml *aml_resource_template(void) +{ + return NULL; +} + +Aml *aml_device(const char *name_format, ...) +{ + return NULL; +} + +Aml *aml_eisaid(const char *str) +{ + return NULL; +} + +Aml *aml_name_decl(const char *name, Aml *val) +{ + return NULL; +} + +Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t max_base, + uint8_t aln, uint8_t len) +{ + return NULL; +} + +Aml *aml_irq_no_flags(uint8_t irq) +{ + return NULL; +} + +Aml *aml_int(const uint64_t val) +{ + return NULL; +} + +Aml *aml_package(uint8_t num_elements) +{ + return NULL; +} + +Aml *aml_dma(AmlDmaType typ, AmlDmaBusMaster bm, AmlTransferSize sz, + uint8_t channel) +{ + return NULL; +} + +Aml *aml_buffer(int buffer_size, uint8_t *byte_list) +{ + return NULL; +} diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs index 777da07f4d..cab9bcd457 100644 --- a/hw/acpi/Makefile.objs +++ b/hw/acpi/Makefile.objs @@ -20,6 +20,6 @@ common-obj-$(CONFIG_TPM) += tpm.o common-obj-$(CONFIG_IPMI) += ipmi.o common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o else -common-obj-y += acpi-stub.o +common-obj-y += acpi-stub.o aml-build-stub.o endif -common-obj-$(CONFIG_ALL) += acpi-stub.o acpi-x86-stub.o ipmi-stub.o +common-obj-$(CONFIG_ALL) += acpi-stub.o aml-build-stub.o acpi-x86-stub.o ipmi-stub.o From patchwork Mon May 4 14:29:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F02B3C3A5A9 for ; Mon, 4 May 2020 14:37:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9C822087E for ; Mon, 4 May 2020 14:37:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KIZwd7zM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9C822087E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcDR-0001X6-OI for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:37:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6F-0005Da-Da for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:39 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:29370 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6E-0005wQ-5T for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602577; 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=gJFzG582yZB4/rnNbmblCyq8Hpszv9jfR5i6UZ4ZYJQ=; b=KIZwd7zMSgfU8BWzH4/IgQS+VDvQPkSRLlGP+GFM6WTRbgfKgRjIrIEQifZ9dEv2a9ef27 gYIAcC5I4/o2NexVpdZpHahU4772ojH+nSUFM/3pZjsFLzM3rTHlC4nDPEVuC7GQsdmwLI WS4p/i0Fa6p0MQSDNVOFuwsFjonF2fY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-wLhKfHTKMleu3L234A83Yw-1; Mon, 04 May 2020 10:29:33 -0400 X-MC-Unique: wLhKfHTKMleu3L234A83Yw-1 Received: by mail-wm1-f69.google.com with SMTP id q5so4978769wmc.9 for ; Mon, 04 May 2020 07:29:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0MjHyyDWDqhYfXPWccymj7uxRKiJrrSPTEpq3PGIndE=; b=csWhx31ALJRbXibd3vYdl5JhpS0nX6hmvt00S8zQ08NgBBZ1UADbVLInDWhheDvGP5 bxD7tlt+KrNlbbYKzpVZ//jnStqQgXy4A3NcY0CywQnzdqj0I35mH094hX0FcJ6kieab KMM/Pa3JZPLM22mUm9RLgOlDXyTyb2UtC3g1wXxWDiiZuZHyCWoVf0snvKclxx1pyVwa 04cvCyNGpOYkmV0jR/DP4vv+wrphZzOzYbtDtoTorij/wOTsf6GwPQMopMspcC/+p5OV +Dsx2qok+KyTSDNbTiKqKWb8jh9EZ60AjePSTO6ffz6maFl5fLftZjN7CvYyMRt5jrle F5Sg== X-Gm-Message-State: AGi0PuYZxRGqVjKgyBaGTw3zcbBRAK/uT62RD5WWnY/GUoA0doKITPdi 3RTGx6Azf3fVxUuTFDJbP4vCB2cw0ZzYO/OvywiDS8jxw/6xDIsO86S4pfw0z0c/XNIX0AhjXjQ iMpLVFrvYDWc8RMA= X-Received: by 2002:adf:e483:: with SMTP id i3mr18393645wrm.88.1588602572080; Mon, 04 May 2020 07:29:32 -0700 (PDT) X-Google-Smtp-Source: APiQypJcR9UMJO77NohzYNucfZbMyOc+lca8j9zIhjRf1w/+d8Q9RtsUxGU51kI7ggkAfekvbXgxIA== X-Received: by 2002:adf:e483:: with SMTP id i3mr18393627wrm.88.1588602571917; Mon, 04 May 2020 07:29:31 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id b191sm14778221wmd.39.2020.05.04.07.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:31 -0700 (PDT) Date: Mon, 4 May 2020 10:29:29 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 07/29] acpi: add ISADeviceClass->build_aml() Message-ID: <20200504142814.157589-8-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.61; envelope-from=mst@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 01:21:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , Gerd Hoffmann , Igor Mammedov , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Also add isa_aml_build() function which walks all isa devices. This allows to move aml builder code to isa devices. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Message-Id: <20200429140003.7336-6-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/isa/isa.h | 2 ++ hw/i386/acpi-build.c | 1 + hw/isa/isa-bus.c | 15 +++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 59a4d4b50a..02c2350274 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -69,6 +69,7 @@ typedef struct IsaDmaClass { typedef struct ISADeviceClass { DeviceClass parent_class; + void (*build_aml)(ISADevice *dev, Aml *scope); } ISADeviceClass; struct ISABus { @@ -107,6 +108,7 @@ ISADevice *isa_try_create(ISABus *bus, const char *name); ISADevice *isa_create_simple(ISABus *bus, const char *name); ISADevice *isa_vga_init(ISABus *bus); +void isa_build_aml(ISABus *bus, Aml *scope); /** * isa_register_ioport: Install an I/O port region on the ISA bus. diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 3a046b03e4..97f3c75cd9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1288,6 +1288,7 @@ static void build_isa_devices_aml(Aml *table) error_report("No ISA bus, unable to define IPMI ACPI data"); } else { build_acpi_ipmi_devices(scope, BUS(obj), "\\_SB.PCI0.ISA"); + isa_build_aml(ISA_BUS(obj), scope); } aml_append(table, scope); diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 798dd9194e..1f2189f4d5 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -207,6 +207,21 @@ ISADevice *isa_vga_init(ISABus *bus) } } +void isa_build_aml(ISABus *bus, Aml *scope) +{ + BusChild *kid; + ISADevice *dev; + ISADeviceClass *dc; + + QTAILQ_FOREACH(kid, &bus->parent_obj.children, sibling) { + dev = ISA_DEVICE(kid->child); + dc = ISA_DEVICE_GET_CLASS(dev); + if (dc->build_aml) { + dc->build_aml(dev, scope); + } + } +} + static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent) { ISADevice *d = ISA_DEVICE(dev); From patchwork Mon May 4 14:29:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283476 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F487C3A5A9 for ; Mon, 4 May 2020 14:51:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1614F206D9 for ; Mon, 4 May 2020 14:51:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AUxUy2m2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1614F206D9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcRF-0001dt-6B for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:51:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc9Y-0003IA-Qi for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:04 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:44197 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc9X-0008OX-EP for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602782; 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=Pj1uHiegKcsUZCaq6FfRPIoZitXmODiLZa/viD4waC0=; b=AUxUy2m2cnqJ3edvOZm8PZx4vtZ3c2jFFnJvf+izhybmulGvCzv2iEqWY1jebZ8rjALHhN toHF8aNn5yLYFMKNMWLrytj1iknaMaexK4c4g0JgMsaScdZ1ULTv4q9dIxIlPgezZ/4vqP Bhdgy57iOuVAYpfttYgPc9oWwOSZuA4= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-n4REQS6WNWasS69FPNHVGQ-1; Mon, 04 May 2020 10:29:40 -0400 X-MC-Unique: n4REQS6WNWasS69FPNHVGQ-1 Received: by mail-wm1-f71.google.com with SMTP id w2so4993968wmc.3 for ; Mon, 04 May 2020 07:29:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rmx3ZXSO8zrSOq3lTewsvFGussmCJbclHSwavQ1LcnQ=; b=aXzi28WbWY1HLcjyCyubxO6fgxGz99xnivOh7+6HhyLkBeLWswvn+5vHQI1yslyyZF PIE643UQSPsZ7a9ohAGLPNx4Uqy1tAqRGDDUD8YImmJSUXJLPKEo0ktdqPDjkvbVSmJf x25qsry0pnBNUYRg5r+LbCmgoC06s4eNNgtWjQyWO1ge+ZlHOLPnbO/v5OprwhgqgZQz aePf/uvJQ1pqMHO/uywRkuo3aq/u20QIPefyE1ARPCPWrUJggR5Vi/U1ZGOgFNn2fRU2 lc3KmkNtGencKz+arDKlH0fjelLG7VVB91YOyv19JbcmCpKNz2Nt6OGLl2+9Pw8u55rg hgEQ== X-Gm-Message-State: AGi0PubDJ/vqbxZxhm1jDRH+mRBC7M///H3VEwyEDwuNOB+gwyh16AGf DHar4r9H5CgpGA0W3fq70NIhWC3W307/Uil05vuFmyttFFpoJ3XmTKSEFwVhWUtiKA1sr1WHTb2 ror1HlGtqRxExet8= X-Received: by 2002:adf:f606:: with SMTP id t6mr7336338wrp.321.1588602578884; Mon, 04 May 2020 07:29:38 -0700 (PDT) X-Google-Smtp-Source: APiQypKoTLGaFqOI2OxQoWfuPdv3XBHb9hR+89vG81T6klD1qhZ31j3io7LWPtKyiTD9gNU+HZZ9cw== X-Received: by 2002:adf:f606:: with SMTP id t6mr7336320wrp.321.1588602578625; Mon, 04 May 2020 07:29:38 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id g25sm13335649wmh.24.2020.05.04.07.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:38 -0700 (PDT) Date: Mon, 4 May 2020 10:29:37 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 10/29] virtio-pci: update virtio pci bar layout documentation Message-ID: <20200504142814.157589-11-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anthoine Bourgeois , Peter Maydell , Gerd Hoffmann Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Anthoine Bourgeois The modern io bar was never documented. Signed-off-by: Anthoine Bourgeois Message-Id: <20200422215455.10244-2-anthoine.bourgeois@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Gerd Hoffmann --- hw/virtio/virtio-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4cb784389c..d028c17c24 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1705,6 +1705,7 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp) * * region 0 -- virtio legacy io bar * region 1 -- msi-x bar + * region 2 -- virtio modern io bar (off by default) * region 4+5 -- virtio modern memory (64bit) bar * */ From patchwork Mon May 4 14:29:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B3DC47257 for ; Mon, 4 May 2020 14:33:38 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 117F3206E6 for ; Mon, 4 May 2020 14:33:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AhZ5GvvH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 117F3206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcA4-00036e-U9 for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:33:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6N-0005YG-Uh for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:47 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21962 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6L-00067L-N9 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602585; 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=3q2PV09NbvebXNW9HBjqH4Zi18jqVNRNbd0N7P7VPtU=; b=AhZ5GvvHexLEU9wy7pvbF16h1QvFOYs+HS2BjX9BMeMueTpuQtnkvw0WLV3UuuuXkdlq4M DlXPVYf2eR+21rmLQ7dTfvRwXJsKy38oiuheUqOL96VbFF1UTXyWZFzoyUq13hpNtywT/7 HL2CVPZ7/G9laF8kRAQsnrZLSrl2iU8= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-Vk68ID71MmSzWNlEYwWGmg-1; Mon, 04 May 2020 10:29:42 -0400 X-MC-Unique: Vk68ID71MmSzWNlEYwWGmg-1 Received: by mail-wr1-f69.google.com with SMTP id f2so10886032wrm.9 for ; Mon, 04 May 2020 07:29:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rU763mQvG3h2UpJIPCYuJYZp3kdhMWRTa5wGYsAN1vY=; b=aivJPQrUrGwz6SwVVHlK5ZnYfhEKChjjm6ydO9S89gatbfaSn3AJ23W3Pv4zfOU0UW WeDkK/ohFlnYc8oe38/iwpFxLVAdy7Htg2X8zba4PXjjltwWRpqfQCUHNHKA2ExsJirw c8J8X/BGzx6WWzy/2ftYJKz6x/aF6Xn3SMomfN/hiuSOkry+jdd1YA1v5y0k7SA7ye4I VJFi4scFTH8gapEIKZR2acbyOwDFNjXMBvJDKJCZjt7L9K/vvJIqE0GXmG7zMGC2V+8z FgBHwjHQKIa0Yr0Y7XbyZb3+Hj1c2SIMa0iivVoq+vsuQLQrLMWnm8lJ+Y+CLx7ABAKT OsOQ== X-Gm-Message-State: AGi0PubgCaMJRqS095TP8NJI5fdyPhZChRmmwZLehNBD+LMiVV/9/1hB zV6q1BGzkfjdPzBe3Kp5iiE4BxobPl9FN8KdkXoEFOYoGeZ9xF0vUgr48r99EaP+T2llABtRJsA uw4vIAtIosRERbFk= X-Received: by 2002:adf:fccc:: with SMTP id f12mr1094069wrs.267.1588602581322; Mon, 04 May 2020 07:29:41 -0700 (PDT) X-Google-Smtp-Source: APiQypKEX14lmYHjOf+7NYs/f3sK1v7cf+CYP3Zbu6NsY/7DI923/S8Kvv4QqZJ8B4BJ3BF+yHC5LQ== X-Received: by 2002:adf:fccc:: with SMTP id f12mr1094044wrs.267.1588602581024; Mon, 04 May 2020 07:29:41 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id t16sm19385536wrm.26.2020.05.04.07.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:40 -0700 (PDT) Date: Mon, 4 May 2020 10:29:39 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 11/29] vhost-user-blk: fix invalid memory access Message-ID: <20200504142814.157589-12-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=207.211.31.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 05:09:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-block@nongnu.org, Max Reitz , Li Feng , Raphael Norwitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Li Feng when s->inflight is freed, vhost_dev_free_inflight may try to access s->inflight->addr, it will retrigger the following issue. ==7309==ERROR: AddressSanitizer: heap-use-after-free on address 0x604001020d18 at pc 0x555555ce948a bp 0x7fffffffb170 sp 0x7fffffffb160 READ of size 8 at 0x604001020d18 thread T0 #0 0x555555ce9489 in vhost_dev_free_inflight /root/smartx/qemu-el7/qemu-test/hw/virtio/vhost.c:1473 #1 0x555555cd86eb in virtio_reset /root/smartx/qemu-el7/qemu-test/hw/virtio/virtio.c:1214 #2 0x5555560d3eff in virtio_pci_reset hw/virtio/virtio-pci.c:1859 #3 0x555555f2ac53 in device_set_realized hw/core/qdev.c:893 #4 0x5555561d572c in property_set_bool qom/object.c:1925 #5 0x5555561de8de in object_property_set_qobject qom/qom-qobject.c:27 #6 0x5555561d99f4 in object_property_set_bool qom/object.c:1188 #7 0x555555e50ae7 in qdev_device_add /root/smartx/qemu-el7/qemu-test/qdev-monitor.c:626 #8 0x555555e51213 in qmp_device_add /root/smartx/qemu-el7/qemu-test/qdev-monitor.c:806 #9 0x555555e8ff40 in hmp_device_add /root/smartx/qemu-el7/qemu-test/hmp.c:1951 #10 0x555555be889a in handle_hmp_command /root/smartx/qemu-el7/qemu-test/monitor.c:3404 #11 0x555555beac8b in monitor_command_cb /root/smartx/qemu-el7/qemu-test/monitor.c:4296 #12 0x555556433eb7 in readline_handle_byte util/readline.c:393 #13 0x555555be89ec in monitor_read /root/smartx/qemu-el7/qemu-test/monitor.c:4279 #14 0x5555563285cc in tcp_chr_read chardev/char-socket.c:470 #15 0x7ffff670b968 in g_main_context_dispatch (/lib64/libglib-2.0.so.0+0x4a968) #16 0x55555640727c in glib_pollfds_poll util/main-loop.c:215 #17 0x55555640727c in os_host_main_loop_wait util/main-loop.c:238 #18 0x55555640727c in main_loop_wait util/main-loop.c:497 #19 0x555555b2d0bf in main_loop /root/smartx/qemu-el7/qemu-test/vl.c:2013 #20 0x555555b2d0bf in main /root/smartx/qemu-el7/qemu-test/vl.c:4776 #21 0x7fffdd2eb444 in __libc_start_main (/lib64/libc.so.6+0x22444) #22 0x555555b3767a (/root/smartx/qemu-el7/qemu-test/x86_64-softmmu/qemu-system-x86_64+0x5e367a) 0x604001020d18 is located 8 bytes inside of 40-byte region [0x604001020d10,0x604001020d38) freed by thread T0 here: #0 0x7ffff6f00508 in __interceptor_free (/lib64/libasan.so.4+0xde508) #1 0x7ffff671107d in g_free (/lib64/libglib-2.0.so.0+0x5007d) previously allocated by thread T0 here: #0 0x7ffff6f00a88 in __interceptor_calloc (/lib64/libasan.so.4+0xdea88) #1 0x7ffff6710fc5 in g_malloc0 (/lib64/libglib-2.0.so.0+0x4ffc5) SUMMARY: AddressSanitizer: heap-use-after-free /root/smartx/qemu-el7/qemu-test/hw/virtio/vhost.c:1473 in vhost_dev_free_inflight Shadow bytes around the buggy address: 0x0c08801fc150: fa fa 00 00 00 00 04 fa fa fa fd fd fd fd fd fa 0x0c08801fc160: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 04 fa 0x0c08801fc170: fa fa 00 00 00 00 00 01 fa fa 00 00 00 00 04 fa 0x0c08801fc180: fa fa 00 00 00 00 00 01 fa fa 00 00 00 00 00 01 0x0c08801fc190: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 04 fa =>0x0c08801fc1a0: fa fa fd[fd]fd fd fd fa fa fa fd fd fd fd fd fa 0x0c08801fc1b0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa 0x0c08801fc1c0: fa fa 00 00 00 00 00 fa fa fa fd fd fd fd fd fd 0x0c08801fc1d0: fa fa 00 00 00 00 00 01 fa fa fd fd fd fd fd fa 0x0c08801fc1e0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fd 0x0c08801fc1f0: fa fa 00 00 00 00 00 01 fa fa fd fd fd fd fd fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==7309==ABORTING Signed-off-by: Li Feng Message-Id: <20200417101707.14467-1-fengli@smartx.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 4 ++++ hw/virtio/vhost.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 17df5338e7..6c485d1c9e 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -441,7 +441,9 @@ reconnect: virtio_err: g_free(s->vhost_vqs); + s->vhost_vqs = NULL; g_free(s->inflight); + s->inflight = NULL; for (i = 0; i < s->num_queues; i++) { virtio_delete_queue(s->virtqs[i]); } @@ -462,7 +464,9 @@ static void vhost_user_blk_device_unrealize(DeviceState *dev, Error **errp) vhost_dev_cleanup(&s->dev); vhost_dev_free_inflight(s->inflight); g_free(s->vhost_vqs); + s->vhost_vqs = NULL; g_free(s->inflight); + s->inflight = NULL; for (i = 0; i < s->num_queues; i++) { virtio_delete_queue(s->virtqs[i]); diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 01ebe12f28..aff98a0ede 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1514,7 +1514,7 @@ void vhost_dev_set_config_notifier(struct vhost_dev *hdev, void vhost_dev_free_inflight(struct vhost_inflight *inflight) { - if (inflight->addr) { + if (inflight && inflight->addr) { qemu_memfd_free(inflight->addr, inflight->size, inflight->fd); inflight->addr = NULL; inflight->fd = -1; From patchwork Mon May 4 14:29:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACDBAC3A5A9 for ; Mon, 4 May 2020 14:34:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 781F42075A for ; Mon, 4 May 2020 14:34:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JsejLQdF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 781F42075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcBN-0005bf-Ks for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:34:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6R-0005g8-0f for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27914 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6Q-0006Hu-5h for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602589; 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=fvBdJ5beAcx5ETaxyqLjGGsvHSXEGwdO8SCWGzPboug=; b=JsejLQdFFWBuUIwffX5jqbP+muc4gUs5Ra2QRUlcUptWbpWI2bDxW31uFxnaC4jvKIZB/W a8r+3PZs7bbQ3+TyGc60UVpNdmUnai56SS3TECdb2WpxXe0myH4pCZGa+GWAw1g9jaFeEu xqtPi8nk4S4v+xxjMyDqYrYEI21ea4A= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-222-KhquzkfbMQytusml3nYqsA-1; Mon, 04 May 2020 10:29:48 -0400 X-MC-Unique: KhquzkfbMQytusml3nYqsA-1 Received: by mail-wm1-f70.google.com with SMTP id 71so3584318wmb.8 for ; Mon, 04 May 2020 07:29:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JtHWGy8MS63RnTw62YE9/Nri9iozspFrFIvB4vm6Ufs=; b=Fl2bYaAcH/D9oBBMlPquI1GWW1wMr9ooKnT0Z52yVTOW/k7hWCgKyPCfF/ndYMzcVl mlxQftG6/bmidwmAWjusGRgYjZF4UQo/LbJnaTyZZX1R7wAlrqHRRYk2eyCl2fbyZuPZ uDUX+EO/iXohxb1QbdP/NuD7B3kdDMFlAehFQOxxDfBTvMrwMO7/CEGux6Iikzcb5tLS Nm2S+0wMTL/nB7w1YHib5nU9oDLhrJUIYuPq5IbjAitlBzxEg7LM/jtRMH0zR0VqwVAe Nt7t1CcAY0fxkMSqzls5VIL3mfX0F50qeUh581tRHiEbWLBXsYBa/uj8eFs2UEzJuTP+ rXmg== X-Gm-Message-State: AGi0PuY/pg45XfivW7oFLI6lr8V3PZV157+k8+BqI6fsgckkMe2N6Nrz 6nNAm3ChJ27VJpXwwZWgCn8mBE7O9Q96Krs608LVGcjSvEiL6TfiNRmVymKjGHnqOoZCiVvoDjb WjoydpYAl422WiEg= X-Received: by 2002:a1c:2d02:: with SMTP id t2mr14915846wmt.98.1588602586629; Mon, 04 May 2020 07:29:46 -0700 (PDT) X-Google-Smtp-Source: APiQypL5sKwavcakxQbGvb9qxGQ6DHp601FwURtWt/44KzPdJGYk6p0W6MXPtmzbRVz62eQQ2RoLxA== X-Received: by 2002:a1c:2d02:: with SMTP id t2mr14915822wmt.98.1588602586400; Mon, 04 May 2020 07:29:46 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id a24sm13411437wmb.24.2020.05.04.07.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:46 -0700 (PDT) Date: Mon, 4 May 2020 10:29:44 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 13/29] checkpatch: ignore allowed diff list Message-ID: <20200504142814.157589-14-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex =?utf-8?q?Benn=C3=A9e?= , Peter Maydell , Richard Henderson , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Allow changing allowed diff list at any point: - when changing code under test - when adding expected files It's just a list of files so easy to review and merge anyway. Signed-off-by: Michael S. Tsirkin --- scripts/checkpatch.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c3d08aa99f..0ba213e9f2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1261,12 +1261,13 @@ sub WARN { sub checkfilename { my ($name, $acpi_testexpected, $acpi_nontestexpected) = @_; - if ($name =~ m#^tests/data/acpi/# and - # make exception for a shell script that rebuilds the files - not $name =~ m#^\.sh$# or - $name =~ m#^tests/qtest/bios-tables-test-allowed-diff.h$#) { + # Note: shell script that rebuilds the expected files is in the same + # directory as files themselves. + # Note: allowed diff list can be changed both when changing expected + # files and when changing tests. + if ($name =~ m#^tests/data/acpi/# and not $name =~ m#^\.sh$#) { $$acpi_testexpected = $name; - } else { + } elsif ($name =~ m#^tests/qtest/bios-tables-test-allowed-diff.h$#) { $$acpi_nontestexpected = $name; } if (defined $$acpi_testexpected and defined $$acpi_nontestexpected) { From patchwork Mon May 4 14:29:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 186155 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp181114ill; Mon, 4 May 2020 07:38:00 -0700 (PDT) X-Google-Smtp-Source: APiQypI8VW5efyvB7AVraEFF2JlVnwK9IO83YUsDCY85Q4lJfSk87louCywlFWqXe5BKOBEOOD89 X-Received: by 2002:a37:e310:: with SMTP id y16mr16966935qki.275.1588603080020; Mon, 04 May 2020 07:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588603080; cv=none; d=google.com; s=arc-20160816; b=rgpIPqI2+p7Ui4b/N6WIqGtKDklUY/hdEVqqamSohR0zVmydmc9Y5Ewc1OG2QQ1Wsq 25YAuJMGYCeFtWW+ht6Fc7EOrp7Hnnvds/yJ9F/H1/KnmPeqoQtnJMslpYUwmAOEgsql oANiWb2Bq9RfrFp6fMCuS66TCUzwOGWWOhaHSmQDuP+XKoG+9ValuL4AhO/vva8BEa1M 6RubUoQuINCAwkataeVv/1sah1j23szkVHOF2iX07lvOIXOsfTfRV0i3WH6yr095RXps wPtPj6gBMdDgSafGzBTXyJdnfDZBErogyKpFB2H35NJ9ywMbNEElRCp4OrmUhKlvTYse MjVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:to:from:date:dkim-signature; bh=eToXLQiELi/OqolKT7hKDbv8PBLrjpjtRA8gmXCmZKQ=; b=r7EYYiF6/iPwkbHcJF5nCpArcKVV5pB1iOGxIZ003oXkXhCCanFFVMS3peDjKjxm81 2hM+HMEl8zV32FaoWo4adaGe7Cty9m5dTw2jhyp3KmDjw6g/DGtAIMygJ/kogWaeqhl2 IEMijYzlowKpAZIDVGyBTuBydMxeim3ENBGVZw6x86vWS2zEC9DkJL+qRjCW6xl4B7AZ AhrUnktium20MUbiVorO8w2pX3TZ2F2Xl25m9itZ6YwuDHb6imu2g8UFMG6s351KVkMr FpmmThBHEym0jQuiy/67RqXhFgbGIJ7UC2rtO2HjG7rLe5JqqKl8FWWv+kZH7fwy3WcA j5GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="Eba4/IOX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id q3si6350154qvu.196.2020.05.04.07.37.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 May 2020 07:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="Eba4/IOX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:55338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcEJ-0002Za-Gq for patch@linaro.org; Mon, 04 May 2020 10:37:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6Y-00060c-Lj for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28209 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6X-0006JY-Cv for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602596; 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=eToXLQiELi/OqolKT7hKDbv8PBLrjpjtRA8gmXCmZKQ=; b=Eba4/IOXUCfhF/49F6dlOKZr9bJP2vnoMQx4B0SfkU+onzqWEAc29+g/bk3eNCrUGkn/2b dPqCxMYtpxuZzpppNDCJET2lImwsrzmNXqzdpVVOlg6jrccCcZA8Pl+xZywcg1T/nRmqYQ lng8FfV6q3b9A+DNXFnF5AGofr6Zud4= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-Dm-xTX_CPC-Gq2w4wp_P5Q-1; Mon, 04 May 2020 10:29:52 -0400 X-MC-Unique: Dm-xTX_CPC-Gq2w4wp_P5Q-1 Received: by mail-wr1-f72.google.com with SMTP id r11so10842992wrx.21 for ; Mon, 04 May 2020 07:29:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DGleufk736LANkC6r/eufWZtid2misO75KfvqBBNzzY=; b=Aky5itMvwSszfnzGbOUaXocF77kc7Keb7QhViEAmGC8MoYCtdCkgBKRHtUuX48ohWp y3YsYmmgZ502rAPfXny9B6iMkDrbKXwbFLjeSv8vJpaZG3pDZ6gsc4uzvFdjsSNGRTzM gx/jvf0QnM7JYzETLG7yV4gE+P/+slMJgRNBBwwq9QPiFaJAe7hAAU9VoZ8FhHYwrPRC vIVe4yDWKOlKoNusebPeME45utjICNM06aCzNmWcuvfEuIQUg2ZgMn5i3hG+shmtfRG2 6pwB8gTdF4UahwQJGAxencgns0U4EgDn7/HmKP7NnF4BOi0PAEaFS3d2LxgHE8eg59/L B8+g== X-Gm-Message-State: AGi0PuYNGLK58+1L2sFv0x66sJRH87olF8CyuJ796rC0JdPshNaC4/b0 mwpMOy9jxuItfoAmm1msxv2eLrxt3IRWlxtv8X3IuK6P2OBlO83Ij0W5Uf5oCujGR7Dy0saXU8v vk5pQ4GrN6UX0mcU= X-Received: by 2002:a05:6000:192:: with SMTP id p18mr12476878wrx.126.1588602591511; Mon, 04 May 2020 07:29:51 -0700 (PDT) X-Received: by 2002:a05:6000:192:: with SMTP id p18mr12476847wrx.126.1588602591193; Mon, 04 May 2020 07:29:51 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id f7sm17778746wrt.10.2020.05.04.07.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:50 -0700 (PDT) Date: Mon, 4 May 2020 10:29:49 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 15/29] hw/acpi/nvdimm: Fix for NVDIMM incorrect DSM output buffer length Message-ID: <20200504142814.157589-16-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Xiao Guangrong , Shameer Kolothum , Eric Auger , Paolo Bonzini , Igor Mammedov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Shameer Kolothum As per ACPI spec 6.3, Table 19-419 Object Conversion Rules, if the Buffer Field <= to the size of an Integer (in bits), it will be treated as an integer. Moreover, the integer size depends on DSDT tables revision number. If revision number is < 2, integer size is 32 bits, otherwise it is 64 bits. Current NVDIMM common DSM aml code (NCAL) uses CreateField() for creating DSM output buffer. This creates an issue in arm/virt platform where DSDT revision number is 2 and results in DSM buffer with a wrong size(8 bytes) gets returned when actual length is < 8 bytes. This causes guest kernel to report, "nfit ACPI0012:00: found a zero length table '0' parsing nfit" In order to fix this, aml code is now modified such that it builds the DSM output buffer in a byte by byte fashion when length is smaller than Integer size. Suggested-by: Igor Mammedov Signed-off-by: Shameer Kolothum Reviewed-by: Igor Mammedov Message-Id: <20200421125934.14952-2-shameerali.kolothum.thodi@huawei.com> Acked-by: Peter Maydell Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ hw/acpi/nvdimm.c | 40 +++++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) -- MST diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..eb8bae1407 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/SSDT.dimmpxm", +"tests/data/acpi/q35/SSDT.dimmpxm", diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index eb6a37b14e..df0790719a 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -938,6 +938,7 @@ static void nvdimm_build_common_dsm(Aml *dev) Aml *method, *ifctx, *function, *handle, *uuid, *dsm_mem, *elsectx2; Aml *elsectx, *unsupport, *unpatched, *expected_uuid, *uuid_invalid; Aml *pckg, *pckg_index, *pckg_buf, *field, *dsm_out_buf, *dsm_out_buf_size; + Aml *whilectx, *offset; uint8_t byte_list[1]; method = aml_method(NVDIMM_COMMON_DSM, 5, AML_SERIALIZED); @@ -1091,13 +1092,46 @@ static void nvdimm_build_common_dsm(Aml *dev) /* RLEN is not included in the payload returned to guest. */ aml_append(method, aml_subtract(aml_name(NVDIMM_DSM_OUT_BUF_SIZE), aml_int(4), dsm_out_buf_size)); + + /* + * As per ACPI spec 6.3, Table 19-419 Object Conversion Rules, if + * the Buffer Field <= to the size of an Integer (in bits), it will + * be treated as an integer. Moreover, the integer size depends on + * DSDT tables revision number. If revision number is < 2, integer + * size is 32 bits, otherwise it is 64 bits. + * Because of this CreateField() canot be used if RLEN < Integer Size. + * + * Also please note that APCI ASL operator SizeOf() doesn't support + * Integer and there isn't any other way to figure out the Integer + * size. Hence we assume 8 byte as Integer size and if RLEN < 8 bytes, + * build dsm_out_buf byte by byte. + */ + ifctx = aml_if(aml_lless(dsm_out_buf_size, aml_int(8))); + offset = aml_local(2); + aml_append(ifctx, aml_store(aml_int(0), offset)); + aml_append(ifctx, aml_name_decl("TBUF", aml_buffer(1, NULL))); + aml_append(ifctx, aml_store(aml_buffer(0, NULL), dsm_out_buf)); + + whilectx = aml_while(aml_lless(offset, dsm_out_buf_size)); + /* Copy 1 byte at offset from ODAT to temporary buffer(TBUF). */ + aml_append(whilectx, aml_store(aml_derefof(aml_index( + aml_name(NVDIMM_DSM_OUT_BUF), offset)), + aml_index(aml_name("TBUF"), aml_int(0)))); + aml_append(whilectx, aml_concatenate(dsm_out_buf, aml_name("TBUF"), + dsm_out_buf)); + aml_append(whilectx, aml_increment(offset)); + aml_append(ifctx, whilectx); + + aml_append(ifctx, aml_return(dsm_out_buf)); + aml_append(method, ifctx); + + /* If RLEN >= Integer size, just use CreateField() operator */ aml_append(method, aml_store(aml_shiftleft(dsm_out_buf_size, aml_int(3)), dsm_out_buf_size)); aml_append(method, aml_create_field(aml_name(NVDIMM_DSM_OUT_BUF), aml_int(0), dsm_out_buf_size, "OBUF")); - aml_append(method, aml_concatenate(aml_buffer(0, NULL), aml_name("OBUF"), - dsm_out_buf)); - aml_append(method, aml_return(dsm_out_buf)); + aml_append(method, aml_return(aml_name("OBUF"))); + aml_append(dev, method); } From patchwork Mon May 4 14:29:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 186158 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp187944ill; Mon, 4 May 2020 07:46:57 -0700 (PDT) X-Google-Smtp-Source: APiQypJgDoOhZ2yD5EK8Xzl5CENnCebfHcvWYAwI60zFxmFmD4AP+Dif49DXlmk/S1XNZlSD+gc3 X-Received: by 2002:a05:620a:13bc:: with SMTP id m28mr16055064qki.211.1588603617163; Mon, 04 May 2020 07:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588603617; cv=none; d=google.com; s=arc-20160816; b=aje/ds7nW3iTZJGyisrFp1n7Ltvp3uaNr8twmrdKqSVjDp23lRaOIzAxGllNO1bZQB 8sY2Pru/lKg5vQYmeUBbyK8crmf9txzeHf/kg4QtT5TRtVlUBmilrmFOUdigK1+3HJl2 tQ8UpKbbDhT3Ci/YnKBchcL37d+o/5v+1Y9lg/MdVEJceQhyTipsiWF2z5bSxvuGYfnx Lf4Ai57u2A07u38JQI6Cos7jydFHefK7xJpjC3Wf5N62lhizIlcRsjoezAM8QCbQuGO9 ZmIeDkIQwiU3gATU2eCysMqq6PkV9eaX68mtejfbt7kdWFH1EPsFSOE9fdLNDKmYxho6 A0CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:to:from:date:dkim-signature; bh=AOdWrTDlgPPkMHeJucHbghgUuY8aAHcAGANlC4mF4bs=; b=i5I33frpGZ+bfGstcBv53qlEsOA6+o/cjPuWajQ1TTNBtg5YYIAthcDTBJO3xt1ipe W+st53A/RVIQZNTlr83lV4Kde1mjEr7NRkJW9ksNm/d0boiZlMw9YSzOJKfX9YYl/RsF vIA6NOq1/Z15/xbf6SNvRYVfNM5cIqld6MrF2KV+vFbejhl49B6lBaTZ2wWDAK6Y4hJ2 0PD/mSgof+vvh8ZHUeV5ZGK1DP8SdpXo09iJKeqGzJtn/SJja2mjtfwTSL+jxZB31JVm Q/XylNUSjEjyrhQNtTmAsNYcchXXpqikDGmz3EHysJ7LJr0qHgt2RZNd66mvXOfFrlkC KCjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="J7fn/ih1"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id l6si6430102qtk.213.2020.05.04.07.46.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 May 2020 07:46:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="J7fn/ih1"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:33690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcMy-00014T-It for patch@linaro.org; Mon, 04 May 2020 10:46:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc9a-0003Lp-8L for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:06 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:46109 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc9X-0008OT-8q for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602782; 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=AOdWrTDlgPPkMHeJucHbghgUuY8aAHcAGANlC4mF4bs=; b=J7fn/ih1nH9/dkPQwBkvaDlrUpIyfh13Q1nfiIf40dMagpHQYJHVpqkoE+4NDtEp0dmMbM B+XfK4hJ+Th1OnI/RHdnPwqQtUbEIoDAfvySRjL4q9UtyegKpBDIWr+K7jIukCiDwVuthM Yf7aTqzBBnZw7VyZSwVLGkiDWou/JmM= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-OXYJzj6EOOSr5f1GXvIZoQ-1; Mon, 04 May 2020 10:29:59 -0400 X-MC-Unique: OXYJzj6EOOSr5f1GXvIZoQ-1 Received: by mail-wm1-f70.google.com with SMTP id u11so3585431wmc.7 for ; Mon, 04 May 2020 07:29:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vk5zcT78ttafQi3FbOHb+B7bkLDdTDjQjWP7o7Og/l0=; b=aR+sFK+H2HIqb7LwHn6q4W5MjYT/S/ICmJc7iqlKqRMEDzV4su9oIBY62sAL/BoiaS x5XdxDaAdQYtATDjmwL+kyE1+ZPJhnGXaa/df9OgfQdPlOruZtzznzu+gI7sAHSsIZPs GQA76M05/wnD4jBFwE08ePbulVZ05uqkIW9aqaRdIhRM3aO85gPANNV+D0u/ngf8Hl1h D4VKvdOZXd5O+I/yIDBA+FRq2ZT7D7m6gZ9ogG1K93vUz6bq5COPBTGb4Yo7H+tN8kSN LhDav5J3yogIHsUxkmU7oyMEWbYq8eUy3pcwepumfUjHW/IBq8zZwlVuZef8cx8Nzd8x Yj9A== X-Gm-Message-State: AGi0PuakEDlVdvwM34L4adFNzEMxb9lFQk+ggeY4gvS3x7bkY3iTaj5S X+rQqDWnQZ8wmRmmer9Jg48/Z9oMe1Rh8UhHfIq/VwlgOsDxXBMTv1LsB26/A/6WTKkxTxES2sT /7/NH8fPDZuh4kn0= X-Received: by 2002:a1c:9a81:: with SMTP id c123mr14208675wme.115.1588602598667; Mon, 04 May 2020 07:29:58 -0700 (PDT) X-Received: by 2002:a1c:9a81:: with SMTP id c123mr14208656wme.115.1588602598453; Mon, 04 May 2020 07:29:58 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id w4sm19316679wro.28.2020.05.04.07.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:58 -0700 (PDT) Date: Mon, 4 May 2020 10:29:56 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 18/29] hw/arm/virt: Add nvdimm hotplug support Message-ID: <20200504142814.157589-19-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=207.211.31.81; envelope-from=mst@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 08:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, Eric Auger , Shameer Kolothum , Igor Mammedov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Shameer Kolothum This adds support for nvdimm hotplug events through GED and enables nvdimm for the arm/virt. Now Guests with ACPI can have both cold and hot plug of nvdimms. Hot removal functionality is not yet supported. Signed-off-by: Shameer Kolothum Reviewed-by: Igor Mammedov Reviewed-by: Eric Auger Message-Id: <20200421125934.14952-5-shameerali.kolothum.thodi@huawei.com> Acked-by: Peter Maydell Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/generic_event_device.h | 1 + hw/acpi/generic_event_device.c | 15 ++++++++++++++- hw/arm/virt.c | 16 +++++++++++----- docs/specs/acpi_hw_reduced_hotplug.rst | 3 ++- 4 files changed, 28 insertions(+), 7 deletions(-) -- MST diff --git a/include/hw/acpi/generic_event_device.h b/include/hw/acpi/generic_event_device.h index d157eac088..9eb86ca4fd 100644 --- a/include/hw/acpi/generic_event_device.h +++ b/include/hw/acpi/generic_event_device.h @@ -82,6 +82,7 @@ */ #define ACPI_GED_MEM_HOTPLUG_EVT 0x1 #define ACPI_GED_PWR_DOWN_EVT 0x2 +#define ACPI_GED_NVDIMM_HOTPLUG_EVT 0x4 typedef struct GEDState { MemoryRegion io; diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index 021ed2bf23..5d17f78a1e 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -16,6 +16,7 @@ #include "hw/acpi/generic_event_device.h" #include "hw/irq.h" #include "hw/mem/pc-dimm.h" +#include "hw/mem/nvdimm.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "qemu/error-report.h" @@ -23,6 +24,7 @@ static const uint32_t ged_supported_events[] = { ACPI_GED_MEM_HOTPLUG_EVT, ACPI_GED_PWR_DOWN_EVT, + ACPI_GED_NVDIMM_HOTPLUG_EVT, }; /* @@ -110,6 +112,11 @@ void build_ged_aml(Aml *table, const char *name, HotplugHandler *hotplug_dev, aml_notify(aml_name(ACPI_POWER_BUTTON_DEVICE), aml_int(0x80))); break; + case ACPI_GED_NVDIMM_HOTPLUG_EVT: + aml_append(if_ctx, + aml_notify(aml_name("\\_SB.NVDR"), + aml_int(0x80))); + break; default: /* * Please make sure all the events in ged_supported_events[] @@ -175,7 +182,11 @@ static void acpi_ged_device_plug_cb(HotplugHandler *hotplug_dev, AcpiGedState *s = ACPI_GED(hotplug_dev); if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { - acpi_memory_plug_cb(hotplug_dev, &s->memhp_state, dev, errp); + if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) { + nvdimm_acpi_plug_cb(hotplug_dev, dev); + } else { + acpi_memory_plug_cb(hotplug_dev, &s->memhp_state, dev, errp); + } } else { error_setg(errp, "virt: device plug request for unsupported device" " type: %s", object_get_typename(OBJECT(dev))); @@ -192,6 +203,8 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev) sel = ACPI_GED_MEM_HOTPLUG_EVT; } else if (ev & ACPI_POWER_DOWN_STATUS) { sel = ACPI_GED_PWR_DOWN_EVT; + } else if (ev & ACPI_NVDIMM_HOTPLUG_STATUS) { + sel = ACPI_GED_NVDIMM_HOTPLUG_EVT; } else { /* Unknown event. Return without generating interrupt. */ warn_report("GED: Unsupported event %d. No irq injected", ev); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 87f29953c4..171e6908ec 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -568,6 +568,10 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms) event |= ACPI_GED_MEM_HOTPLUG_EVT; } + if (ms->nvdimms_state->is_enabled) { + event |= ACPI_GED_NVDIMM_HOTPLUG_EVT; + } + dev = qdev_create(NULL, TYPE_ACPI_GED); qdev_prop_set_uint32(dev, "ged-event", event); @@ -2088,19 +2092,20 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { VirtMachineState *vms = VIRT_MACHINE(hotplug_dev); + const MachineState *ms = MACHINE(hotplug_dev); const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM); - if (is_nvdimm) { - error_setg(errp, "nvdimm is not yet supported"); - return; - } - if (!vms->acpi_dev) { error_setg(errp, "memory hotplug is not enabled: missing acpi-ged device"); return; } + if (is_nvdimm && !ms->nvdimms_state->is_enabled) { + error_setg(errp, "nvdimm is not enabled: add 'nvdimm=on' to '-M'"); + return; + } + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); } @@ -2245,6 +2250,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) hc->plug = virt_machine_device_plug_cb; hc->unplug_request = virt_machine_device_unplug_request_cb; mc->numa_mem_supported = true; + mc->nvdimm_supported = true; mc->auto_enable_numa_with_memhp = true; mc->default_ram_id = "mach-virt.ram"; diff --git a/docs/specs/acpi_hw_reduced_hotplug.rst b/docs/specs/acpi_hw_reduced_hotplug.rst index 911a98255b..0bd3f9399f 100644 --- a/docs/specs/acpi_hw_reduced_hotplug.rst +++ b/docs/specs/acpi_hw_reduced_hotplug.rst @@ -63,7 +63,8 @@ GED IO interface (4 byte access) bits: 0: Memory hotplug event 1: System power down event - 2-31: Reserved + 2: NVDIMM hotplug event + 3-31: Reserved **write_access:** From patchwork Mon May 4 14:29:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 186154 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp179018ill; Mon, 4 May 2020 07:35:26 -0700 (PDT) X-Google-Smtp-Source: APiQypKCOboO5w3wOrGZY4NE5cGP4ZEBDLZNIwYd4Bp8Qa3AQBDPNu7kT5PtIB8zdqlhbWadpRMS X-Received: by 2002:a0c:df03:: with SMTP id g3mr17290930qvl.240.1588602926866; Mon, 04 May 2020 07:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588602926; cv=none; d=google.com; s=arc-20160816; b=I8NZIoqiI4hbjUuaFGHf2wMmwYsjmHjNbbc+kYHIpcfVGhOBtK39aUgkfYGsHGQniI DzK6XicTIH8hsNz4Zdrq/QgPPX6MeHwxdWmlv5y5Ms8FEbEJ3g8Wwc+WBK1nqrEHLLC1 6gA5i6QlTqB0s0mkE+VGRa4iujp3hBxR7IaDiObk5JU7txvEubJP2KzF3jDfA5njdYuh 7rNxm6p8ZyrQoMxfv6KHLFFoVxstTbIFtwavs3/67eSHD69PiBTXk3MI16R/EFdhC6A0 yGCXWPkHehCJIJxFyQZkYfGyl9OPF72Ko6hA4I5VHE4U4+8mW744LnFzQCwC0b1Tm7x/ xzWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:to:from:date:dkim-signature; bh=9JdaAj59qQX1+ssGIeuuDMOOR7pnCTri9GiJMN0eSeY=; b=gEIEN8TXBAzb4TWwe41Nb943ZnoLKwNNudfhevdzfNVDHXLvBqimgL9OF7uPw4OsQO lgczE7QSBxHXaaQb6juf5mxObwHU3zRBoAXyq88PLWSesoTNsAN9mxiyOU+WE5Lf6Q5f U7JDGB49N0EeneVtVe4UeO8vp5tPySn35huqVHWyKJjqHcSzEtVL7cVE+Gx7Sg1HDMzE ufM6NuV2Vx6k4eKvPoa7ahqsHd6g1xL5Bhfdavss2Xp6Qj6Rs31y6WsPoRgmmU1HT8Nv 1xXumkl/tzEmrWH1phhQd5eXEnDZWA+z7gO9VwtVJPfcfwTT9Glb+vCk8kjGnW0pi/xC P9Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=NomrVr+m; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id a80si6250437qkb.213.2020.05.04.07.35.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 May 2020 07:35:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=NomrVr+m; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:43338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcBq-0005lh-B6 for patch@linaro.org; Mon, 04 May 2020 10:35:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc9Y-0003Gr-Br for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:04 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43674 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc9X-0008OQ-2i for qemu-devel@nongnu.org; Mon, 04 May 2020 10:33:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602782; 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=9JdaAj59qQX1+ssGIeuuDMOOR7pnCTri9GiJMN0eSeY=; b=NomrVr+myR515ZNDNoW6V9Bpd+NynkTlDQytQESCSM8JmBkPqucj4Y+b7HIDUUTGv2eU7S XumEEUnZ6g2Hiq9B+x5SJk2E9A1Dl2lqDY7WsVfrBJUPK8mXs2nV/8dlA+aR9lzGOKQ662 YIimvWBrUP7Z8YTjbUqEEQ6O1rZZq+o= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-82-4C6Vm5fXMyay3WI-914uNQ-1; Mon, 04 May 2020 10:30:02 -0400 X-MC-Unique: 4C6Vm5fXMyay3WI-914uNQ-1 Received: by mail-wm1-f69.google.com with SMTP id u11so3585510wmc.7 for ; Mon, 04 May 2020 07:30:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7Dg2dAHDf47qVIx0QAoV4cInszMLMlbrh7i8c4DIwb8=; b=DSEsmpySegxxoqS8QIHXIzQoVtuReyGO5nF5HawkxMWgJabp34tWqgXqHnMd6caNdN 0XVKxILuvo8MNvjUrANRALflHri9BUdghFkYCIbdFwd2KpG+m5URkTCa1waMm9ncZBg3 ME5MW47niieYMHTNDC4Uf+qJaORqBDtFsDYsJb3t6oGLxRBkItYHFcVLWiH0Zeq08A/+ 2kdquRNgxVc84j6qsw7gWRCFXVVzPjHJBrl6fDcWE8nYfG4AOrcaF9GDG0mDtz3j+6b8 3GZz4ILNDAHj1g01BNz1B9RREXaWa82phGvTelhFWFLEIwg/tBRmJ3E/OQGl6IRJ3tDY uxjA== X-Gm-Message-State: AGi0PuaZwrAoqVjCKiCVsSbRDZC+jDyDG4SeXs+GR/vV2/YLlRFwem3K Sffgli2/7VjhB+hGDugfEbi6apuhj+m4BbxKQII18cZMh3O57gpVODHUMn2AYh7yPT3qSKYumSa ASvPK3IweUDsAt04= X-Received: by 2002:adf:9564:: with SMTP id 91mr20143111wrs.246.1588602600852; Mon, 04 May 2020 07:30:00 -0700 (PDT) X-Received: by 2002:adf:9564:: with SMTP id 91mr20143090wrs.246.1588602600693; Mon, 04 May 2020 07:30:00 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id m15sm13593345wmc.35.2020.05.04.07.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:00 -0700 (PDT) Date: Mon, 4 May 2020 10:29:58 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 19/29] tests: Update ACPI tables list for upcoming arm/virt test changes Message-ID: <20200504142814.157589-20-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Shameer Kolothum , Eric Auger , Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Shameer Kolothum This is in preparation to update test_acpi_virt_tcg_memhp() with pc-dimm and nvdimm. Update the bios-tables-test-allowed-diff.h with the affected ACPI tables so that "make check" doesn't fail. Also add empty files for new tables required for new test. Signed-off-by: Shameer Kolothum Message-Id: <20200421125934.14952-6-shameerali.kolothum.thodi@huawei.com> Acked-by: Peter Maydell Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/data/acpi/virt/NFIT.memhp | 0 tests/data/acpi/virt/SSDT.memhp | 0 3 files changed, 3 insertions(+) create mode 100644 tests/data/acpi/virt/NFIT.memhp create mode 100644 tests/data/acpi/virt/SSDT.memhp diff --git a/tests/data/acpi/virt/NFIT.memhp b/tests/data/acpi/virt/NFIT.memhp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/virt/SSDT.memhp b/tests/data/acpi/virt/SSDT.memhp new file mode 100644 index 0000000000..e69de29bb2 -- MST diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index eb8bae1407..862c49e675 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1,6 @@ /* List of comma-separated changed AML files to ignore */ "tests/data/acpi/pc/SSDT.dimmpxm", "tests/data/acpi/q35/SSDT.dimmpxm", +"tests/data/acpi/virt/DSDT.memhp", +"tests/data/acpi/virt/SSDT.memhp", +"tests/data/acpi/virt/NFIT.memhp", From patchwork Mon May 4 14:30:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 186156 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp182600ill; Mon, 4 May 2020 07:39:57 -0700 (PDT) X-Google-Smtp-Source: APiQypJpKoWer/DH2fqPSqprkXGHp8BtFDq5V/KWrBUbz7IX/Clauv07pNnL90Zo2XGw6Ltivpwl X-Received: by 2002:a37:668b:: with SMTP id a133mr9178950qkc.488.1588603197743; Mon, 04 May 2020 07:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588603197; cv=none; d=google.com; s=arc-20160816; b=y236wQvX/thrtu+bTQOUsjIMS0e/OKr/rGZeFk1qR7l0gNu/8sBMqjA4+BwYsm2eFl 2OVrxW6mk4TjUW8fFADavTCfHDGGP+aUQf0LD4rOUNFpXntjQWsAbginEV8/RFfyZaTp g0D2ssTIlglCK+xsG4/YVaXYfQnE3j0q4Td3VXN52Po6FZsBjHzmC5cFd93OkoQ38qFX lSzOduxebp1DNtjwf6ZGuMgoV33tWDfcIm+zbiL9cfGkWbLkgOMqSYhPFV0g9c7XDRG6 lZbgmaLsnvcf9E0fa+dB+YpQvAwNVESvcU9FoG5JoDsRh2jzQpQEsqAdraY+3UCWbEOO 4+cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:to:from:date:dkim-signature; bh=Bo79CUgFM2z6ABK0rxVoGCIfB5lUV00d4CJDYbtIRA8=; b=ALZUv7yYAD22K4aplz7o9rDiBF5Tzb6DoFLa5XvrmFvRVjMT+5gC0H7HoA3OLkal+o uvP1h8Qvx/DaLmWFXFQQILfJNBISQQpQQFT5m0lDN3T4XmhEJHPsVLES4lS0jsDmqGC7 NcPDcHiR2LwQplHqb1h8Tc1xmQ6MDo/Q/xjD//PTG0vQ2CFFISPM72Jo3/w7UDrbR44o cM8In5HaO/to+5epj484nqS0tVd2UWw8wNoTc3BoKMjXpmBlTGIj1Y91m3pg8S4Dsygj VfGwyuOq9bSBpbDIbUXN/sLuq7r1sdaUzx4A2Wn9qWVlZDeebVAfabkWeRfyWo8/2t3K 3ing== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=UN8T5TB7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id v22si6228503qka.27.2020.05.04.07.39.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 May 2020 07:39:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=UN8T5TB7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:35702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcGD-0006eC-7x for patch@linaro.org; Mon, 04 May 2020 10:39:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6i-0006Mm-Co for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:08 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:24436 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6h-0006Ws-5M for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602606; 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=Bo79CUgFM2z6ABK0rxVoGCIfB5lUV00d4CJDYbtIRA8=; b=UN8T5TB74ZENRqE4sCO3dl37OPXi6A/pEsfImV6nfN9vn00v/CDvbczMbDhTFAFgyhOXte ycbj/ZAmtBzKIkdREVNeyRt9VYhjLf4liP8sHg8qGJlCZZbWHGkqrA1bi6ZzbKB46WAKDW wr2R5SgfcfkLTDQDyCYtM1PxoehGXGE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-273--G4p8jyWPRqaM4Kw39wxog-1; Mon, 04 May 2020 10:30:04 -0400 X-MC-Unique: -G4p8jyWPRqaM4Kw39wxog-1 Received: by mail-wr1-f72.google.com with SMTP id s11so10856757wru.6 for ; Mon, 04 May 2020 07:30:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HiyhWJdustdM3N2mnLTkt5fy7WWcO4+CQ1UxAjOBv98=; b=Pg9iOuwVrYT51VKVZK7zoSAjtKNeNK6p0dIGYg93gZdsBE9ZtJ0hr90bN7zceztvyg 2Gy/cCxfSMd56tYweFFD4t+Jih3lfBI9KeBZX7clNDwBUk/wz1elyuFBWaMvvGpomU6w 1nS6ALa0RNr1qY6nGIqm08U0wRnSnwXPY7HVtDcYN0RkqTMEON4Yqw44Bq42R9x/lqYj l4lMEFoME5q3RvfMAc7kCCANHDFumfco1iogOkRz/35RE3mKCI2Ee3yNyTmdKm0sc1YL 5Utit3O9K3PPqrLJsecosLBww5FUt/j5kPy4u+28DWpe5uMA59BLxwQh+dLulJJaKUhO CrBA== X-Gm-Message-State: AGi0Pubji8Y3HyO9qjBvs0fCaqrqheNjdIaNG1IQSE/+flmnPom+pjuX jOIX1cAZfsOsCu3Lsg4+/9kW9qECHm1bcaYvL39l+MA5TNoOcjeB8NjQ1VM4z9HDA++9fMxq3DS t2Z/mEWOqh3HvGVE= X-Received: by 2002:a1c:4144:: with SMTP id o65mr15910856wma.78.1588602603432; Mon, 04 May 2020 07:30:03 -0700 (PDT) X-Received: by 2002:a1c:4144:: with SMTP id o65mr15910834wma.78.1588602603265; Mon, 04 May 2020 07:30:03 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id 138sm14799517wmb.14.2020.05.04.07.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:02 -0700 (PDT) Date: Mon, 4 May 2020 10:30:00 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 20/29] bios-tables-test: test pc-dimm and nvdimm coldplug for arm/virt Message-ID: <20200504142814.157589-21-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=207.211.31.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 05:09:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Shameer Kolothum , Eric Auger , Paolo Bonzini , Igor Mammedov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Shameer Kolothum Since we now have both pc-dimm and nvdimm support, update test_acpi_virt_tcg_memhp() to include those. Signed-off-by: Shameer Kolothum Message-Id: <20200421125934.14952-7-shameerali.kolothum.thodi@huawei.com> Acked-by: Peter Maydell Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- MST diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 0a597bbacf..c9843829b3 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -927,12 +927,17 @@ static void test_acpi_virt_tcg_memhp(void) }; data.variant = ".memhp"; - test_acpi_one(" -cpu cortex-a57" + test_acpi_one(" -machine nvdimm=on" + " -cpu cortex-a57" " -m 256M,slots=3,maxmem=1G" " -object memory-backend-ram,id=ram0,size=128M" " -object memory-backend-ram,id=ram1,size=128M" " -numa node,memdev=ram0 -numa node,memdev=ram1" - " -numa dist,src=0,dst=1,val=21", + " -numa dist,src=0,dst=1,val=21" + " -object memory-backend-ram,id=ram2,size=128M" + " -object memory-backend-ram,id=nvm0,size=128M" + " -device pc-dimm,id=dimm0,memdev=ram2,node=0" + " -device nvdimm,id=dimm1,memdev=nvm0,node=1", &data); free_test_data(&data); From patchwork Mon May 4 14:30:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 186157 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp184361ill; Mon, 4 May 2020 07:42:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLU31DK9qg8uc1h3ap2L+LheKoodeSV64MTW01BHoHiIrGHLLxVu3IToQ31bXsKFSTLLjBz X-Received: by 2002:a37:a2d1:: with SMTP id l200mr16513993qke.236.1588603327461; Mon, 04 May 2020 07:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588603327; cv=none; d=google.com; s=arc-20160816; b=bUFHncurPRbDGdqCLm7WSE5PKlJVj+iSEiEifw6bXbbHyFsJfwAatylz0tXurz9GiL RCh98mqy9lNf+AuicQEQBZD9sbYwSdyFPEJDyktLRAmY/eQ8yPbNTdLNaWVIQXrMtcAn 0k++TAyW3rZqUjsfnddqa6ivX8oaBIezm7SkdBqaBDi/3DjWd5pd9/ecgqhX7UyznLJu LEiC/ItYNd7JV5Ll4b9j6GgSsRopovvvcQb8rmpZw4XwwuTRRs9ZJIpKcEuP0IK4A5bB Pzm6NMld5W7NDAY5E7BMMewMNPd/bB17a0BtPLXv0VH5DW3vfLxFP3QTFMnMs1YF4KF9 pmSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:to:from:date:dkim-signature; bh=yUrmwWqL2K6iY/OhY7iuAMwbDTzHlgoQh3a4JQty25Y=; b=MaJHNgkc+ZhybIybYQhoyeChjPPJhmqHw+llVo6s/05/gFa51pA08r/nI/Xs0PARNv FW5TdhfxGPhXydBr6LihcycLcM52nKrWVmhZLLMk8RllMfT2jWN2u7I9EDgQ5k/QdT+e gbptKt1XFHmviq5CIvNOg7vDKXliPTvPM6yKppLu5MSv9Iwz9TQL8bTpQ8pG5g4CMoWE 7u4k3BrEUG/7c7JPulLSZA87xLfTEKJhmILMpKI1rIjq6p7oI4y8lYlBga/XKtXXzKkO dS4gEFeIkdbzXte2d0UaXmqkopEs+bxdWXCdYtG5ZLnlOVXRyHRI8n9TkQyCNBZwygQB 4vPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=WzwExoTX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id j13si6533817qta.151.2020.05.04.07.42.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 May 2020 07:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=WzwExoTX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:43956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcII-0001ty-Sk for patch@linaro.org; Mon, 04 May 2020 10:42:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6l-0006SV-54 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:11 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:21536 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6j-0006aA-RK for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602609; 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=yUrmwWqL2K6iY/OhY7iuAMwbDTzHlgoQh3a4JQty25Y=; b=WzwExoTXDPMGXW2q5HVLqfOqRS3D4d3bCVDxYKWgyFSgpRpG1KSedTOCcugws2rakmsXWZ i685NmxytMayBpWmYaXlTxcztKJ0qS9R1W1ReYFKIHkGF3ilhHhlDpKptYnNrtQSECNEEH VPYdp+oDpbSSh2M1xHKR0S3FSHuZd74= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-u_z3vKRsNFeB-7tqaOqITA-1; Mon, 04 May 2020 10:30:07 -0400 X-MC-Unique: u_z3vKRsNFeB-7tqaOqITA-1 Received: by mail-wr1-f71.google.com with SMTP id e5so10810659wrs.23 for ; Mon, 04 May 2020 07:30:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iBQgoo6mUjltyYaN6V5AQ7kWH/joO2eUflEQVfyPDqg=; b=ohgc0CiCbUUY+NVrwwoTNCuFtNXzF073thKTXtLY+dSkytURExd/aRhK4BkN7tXKBY OuLQOpN6ffL9KIK7XDQotYoC0uNBhsp6R09oLXMU8gHnk7IwwZhxI4q0Ma8fcdVzycKg RmnO9Di9gNMhooPKcgDYJudQR7n4Gp8YjS6CX0Hu30GKiJM3aRV/BxwYQDJG1UIrARQz TPkhuXSPQLt1fiVl7c7Q57L9dYvLikzeTH3CDe7btWyDKOGa3CHJtiAwPKJCwb3yDbKh iwX/8mYYCWprnIhzHnZzEbhv/ttuN2YNZUx6ewUUFb+3D8wLg46JPXRbimp06HPUzYjN 4mPA== X-Gm-Message-State: AGi0PuaX6dOqZyUve1p4gXz1xQsm5EppPastFtNv1NPKpoCXCiJWmw+x eETnRwFky3Je8w3BnQpt2t70NrWG2V1w9jA6FLSEJ7wEVqVfb/PZrqA98q+w7dnT70Ri+oFxc5O h/cCho372paShYs4= X-Received: by 2002:adf:e704:: with SMTP id c4mr18803916wrm.181.1588602605994; Mon, 04 May 2020 07:30:05 -0700 (PDT) X-Received: by 2002:adf:e704:: with SMTP id c4mr18803888wrm.181.1588602605743; Mon, 04 May 2020 07:30:05 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id a67sm14733024wmc.30.2020.05.04.07.30.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:05 -0700 (PDT) Date: Mon, 4 May 2020 10:30:03 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 21/29] tests/acpi: add expected tables for bios-tables-test Message-ID: <20200504142814.157589-22-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=207.211.31.81; envelope-from=mst@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 08:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Shameer Kolothum , Eric Auger , Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Shameer Kolothum Because of the following changes, the expeacted tables for bios-tables-test needs to be updated. 1. Changed NVDIM DSM output buffer AML code. 2. Updated arm/virt test_acpi_virt_tcg_memhp() to add pc-dimm/nvdimm Signed-off-by: Shameer Kolothum Message-Id: <20200421125934.14952-8-shameerali.kolothum.thodi@huawei.com> Acked-by: Peter Maydell Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 5 ----- tests/data/acpi/pc/SSDT.dimmpxm | Bin 685 -> 734 bytes tests/data/acpi/q35/SSDT.dimmpxm | Bin 685 -> 734 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6644 -> 6668 bytes tests/data/acpi/virt/NFIT.memhp | Bin 0 -> 224 bytes tests/data/acpi/virt/SSDT.memhp | Bin 0 -> 736 bytes 6 files changed, 5 deletions(-) diff --git a/tests/data/acpi/pc/SSDT.dimmpxm b/tests/data/acpi/pc/SSDT.dimmpxm index 8ba0e67cb72daa81a65da4906d37a5e0f4af1fd4..ac55387d57e48adb99eb738a102308688a262fb8 100644 GIT binary patch delta 125 zcmZ3>dXJSWIM^lR9uortW7tG4X>Nb5nD}6)_~<4#t%(LAOunKU-FO)N7nn^=sUGbBa} TgA_0%`UAz6fQZcnjJAvbW$GgJ delta 76 zcmcb|x|WqIIM^j*EfWI+W57f%X>LFDnD}6)_~<5A^@#=|Og=&z-FO(~3Mv!1m>CkI dh5cO|Ll_eMokHD;1(_H?bo!F?%?lZA83Fei6ZHT9 diff --git a/tests/data/acpi/q35/SSDT.dimmpxm b/tests/data/acpi/q35/SSDT.dimmpxm index 2d5b721bcf9c398feb6d005761f898015042e8a4..98e6f0e3f3bb02dd419e36bdd1db9b94c728c406 100644 GIT binary patch delta 125 zcmZ3>dXJSWIM^lR9uortquWF-X>Nb5nD}6)_~<4#t%(LAOunKU-FO)N7nn^=sUGbBa} TgA_0%`UAz6fQZcnjJAvbUiu>C delta 76 zcmcb|x|WqIIM^j*EfWI+qr*flX>LFDnD}6)_~<5A^@#=|Og=&z-FO(~3Mv!1m>CkI dh5cO|Ll_eMokHD;1(_H?bo!F?%?lZA83FS;6XgH^ diff --git a/tests/data/acpi/virt/DSDT.memhp b/tests/data/acpi/virt/DSDT.memhp index c527ac4739af3df3c3e042bf91c412033a2b73c3..730e95a46d2cce0af011ffc051d7342beb8f1328 100644 GIT binary patch delta 66 zcmexj++)J!66_MfBgMeL^l>7WG*kP$jq2jB1F=Cg1XwVzFffCeAhF8JAJRT=DREfi z%xf&Mz2`Pir~{&ofdfQyG(dQa3da8 literal 0 HcmV?d00001 diff --git a/tests/data/acpi/virt/SSDT.memhp b/tests/data/acpi/virt/SSDT.memhp index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..db61d6733284c90153e0e2c1d6c2ac25c22b1d84 100644 GIT binary patch literal 736 zcmZWnJ&4m_7=F{1Ynryuv=ve6ky!_O6-025G-+(0NlTIzAqUNmw7s^&hj$JlLfadz zo*?wXEh3U083lL2&DF`tL2x*5cM%-K?@e*=T;7-Od*1JPpXcE-P1*XE0AOy_+fvgM z^q#D08a)F*{Xs{_tQJ#O0FU+9ezSw@vROEagI9HnmiQA&>UP6JQO~5}~Z64Mnvw zY+ErcAR}x9XE39S5im?~i@}LFCFj@yO3@`)kSxrd1o2Hog_0x3J#f(n8@M!%1lT2q z6Jm8#juK%h-|N%mEE@9&_-9pypc>!7*C8JuYZjQl__`2oA({8ccl~|O@$5xK?^Ua8 nUz82zqC>`BY*Tb6M!7_p|2F_GvB7H_Joz7 X-Patchwork-Id: 283481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57877C3A5A9 for ; Mon, 4 May 2020 14:39:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21E1D20752 for ; Mon, 4 May 2020 14:39:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="S+9b4AEI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21E1D20752 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcFS-0005rw-6T for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:39:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6q-0006e3-Lc for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:16 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:22283 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6o-0006di-Le for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602613; 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=UID8CLohk74zjOVDUEVQis/G1qp2PmqbcHjIyNMq0d4=; b=S+9b4AEIhh085Y0o5Zbnj9LB5zrPNz9JqfLyKRqRUOFJQVLD6JTOppLfQyum6CRffGOl4v 8TxxrzWIWK7OB+eAPYIaYwVxCC6sL5b1HG1coJHXKxl+8JCcJeA/+1Ndo4k+Idjen9yDgd C82dnFxATzMISnfhNUFKHuKlMg7SauY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-zP_pqI23PrC_Fz0LW8A4sg-1; Mon, 04 May 2020 10:30:12 -0400 X-MC-Unique: zP_pqI23PrC_Fz0LW8A4sg-1 Received: by mail-wr1-f71.google.com with SMTP id s11so10857018wru.6 for ; Mon, 04 May 2020 07:30:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PIecKvn+pW1NWjGz2AOTukLgcDwueyrP0dqTTa10Ozk=; b=r8NuG6YQtv0UPbF/xl3+nNlXH+bi4Lo0tITdCFY6vgdu223SGS/9ar0QSsIEPAjdUU D0I8cHTUJ5CW6gCQfGUIUEvFSF4azgvcmrQ9jxFSVushI4OVDRpX7d2T+MwM1NzShlag mNtYP2RVSdrcyT7ndleDeaTgM8ud3xl0s1C+NFpcmmtkGP5GRVNKcVmo16Esl+6w4uKg /tRNM8DWtBuREpcVytE3O4DRnyDdRJ5SNAUA+Pukf6yqKQJpiOX53lD+s2JxBHPIqJDp 6DhuudL181azZq2TZNmx17K70AqvmXRQcTCadpbBOA96Pt9dcA54rn1AUIrh9uOYeOdY keOw== X-Gm-Message-State: AGi0PuYIi0jaugzPI7l4muJQKXrvjwKYwlDUh3w+ekIhdjnDda4oCbPA Gmuyg4FSpxuKz+vMgqXjgppLElyoymwWytaiNXjvfyhGsicXwvYeh5i4t3bYYCu0t8DX9yTB74D OO9NTna9MhfI3vOE= X-Received: by 2002:adf:f981:: with SMTP id f1mr1559142wrr.244.1588602610655; Mon, 04 May 2020 07:30:10 -0700 (PDT) X-Google-Smtp-Source: APiQypK0L8Q1A1DOlwpMbsQmynBirbqCK+R+s7bEyY229DpqoXVmSWjT7sbkY/6/6B5RUJBvnEaS4A== X-Received: by 2002:adf:f981:: with SMTP id f1mr1559127wrr.244.1588602610499; Mon, 04 May 2020 07:30:10 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id u12sm14364098wmu.25.2020.05.04.07.30.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:10 -0700 (PDT) Date: Mon, 4 May 2020 10:30:08 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 23/29] acpi: unit-test: Ignore diff in WAET ACPI table Message-ID: <20200504142814.157589-24-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Liran Alon , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Liran Alon This is done as a preparation for the following patch to expose WAET ACPI table to guest. This patch performs steps 1-3 as describes in tests/qtest/bios-tables-test.c. Signed-off-by: Liran Alon Message-Id: <20200313145009.144820-2-liran.alon@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ tests/data/acpi/pc/WAET | 0 tests/data/acpi/q35/WAET | 0 3 files changed, 2 insertions(+) create mode 100644 tests/data/acpi/pc/WAET create mode 100644 tests/data/acpi/q35/WAET diff --git a/tests/data/acpi/pc/WAET b/tests/data/acpi/pc/WAET new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/WAET b/tests/data/acpi/q35/WAET new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..b269a1e3e5 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/WAET", +"tests/data/acpi/q35/WAET", From patchwork Mon May 4 14:30:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C34B4C3A5A9 for ; Mon, 4 May 2020 14:41:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DBBE20752 for ; Mon, 4 May 2020 14:41:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dk64Qy/t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DBBE20752 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcHM-0001C9-MS for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:41:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6u-0006lA-EK for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:20 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48719 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6t-0006jX-DR for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602618; 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=2N91cBk7aeGymYBjy55YvlROyXKTbkYAlJPKLwnfG8w=; b=dk64Qy/ta2LX1drYv0VfA9JxyLf0DONPbsF4+h780/6mJYAp3xp9uZWyr+vxkUJi94bkS1 ZuIG9ROgO9TuOWGFFiZMfAwphMDTX6oEJDcy5jHgVIeQ6TFubwSPS4Iqy7hvV6EKYMWS4I OaVs1eD0zzxVDgg3nCNlO00nP7nyWiY= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-78-4-HxNC7mNiiQ8hlVYDJZmg-1; Mon, 04 May 2020 10:30:16 -0400 X-MC-Unique: 4-HxNC7mNiiQ8hlVYDJZmg-1 Received: by mail-wr1-f70.google.com with SMTP id y4so5804473wrt.4 for ; Mon, 04 May 2020 07:30:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KDde8SgK/ldUN87GHz4uiNYcfNlAns6jsj/DZnuAhTk=; b=NZx5WXZ8qtAyt22Ueyvz7eJ234iAtTgUYPPbqYWOQKwwvxi2nZPWdlEA1t87BoTF2W OHK0ILOScYSYiRvnpxO+Ky8zhsGNdoCa8vbOlVDIxJc6Mw8K4QMaxtF8kHoa8/7zzMWL vAYgG9YCZ2q00P92rumGxjYFbYE5/h5BWdLvJaSNNOxaB7RgQG9Ce4ninIRR45U0RlP5 b3ODNhw3W8G1UrpDOVdUdI2irYJC5/uR+cX/DvajfAxMSo2mucqRORbWrstrY9zwY61N Vgiqf+Xw83HarSG49MNZYMwFiLdi2bccdxiTS8LsqEjgGB0DUASF+HusowZ2/Ebkt/bu fJoQ== X-Gm-Message-State: AGi0Pub5Zl/I1rMuE+PSPhAlF9xtFLyCdDQRC+2TIFfV+QNVvPaopwct ZXajqEtgEhuBf0t/v8tisPkQb86nPK3HiIDLxo5MglEuuXLilM+K6sd4Uf5sLp3FsxvBb34Kw7t g2S2/3eTa8IzClrQ= X-Received: by 2002:adf:82ac:: with SMTP id 41mr17130008wrc.110.1588602615388; Mon, 04 May 2020 07:30:15 -0700 (PDT) X-Google-Smtp-Source: APiQypJwPeQgmiX3K49346YelqjkIrD+bKwChmOK44nTHVuoqJI9rKf4p7R/Y2tAHDXO/SL8StM91A== X-Received: by 2002:adf:82ac:: with SMTP id 41mr17129986wrc.110.1588602615146; Mon, 04 May 2020 07:30:15 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id i129sm14553865wmi.20.2020.05.04.07.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:14 -0700 (PDT) Date: Mon, 4 May 2020 10:30:13 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 25/29] acpi: unit-test: Update WAET ACPI Table expected binaries Message-ID: <20200504142814.157589-26-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=205.139.110.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 04:24:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Liran Alon , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Liran Alon This is done according to step (6) in the process described at tests/qtest/bios-tables-test.c. Expected WAET.dsl: [000h 0000 4] Signature : "WAET" [Windows ACPI Emulated Devices Table] [004h 0004 4] Table Length : 00000028 [008h 0008 1] Revision : 01 [009h 0009 1] Checksum : 88 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPCWAET" [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 4] Flags (decoded below) : 00000002 RTC needs no INT ack : 0 PM timer, one read only : 1 Raw Table Data: Length 40 (0x28) 0000: 57 41 45 54 28 00 00 00 01 88 42 4F 43 48 53 20 // WAET(.....BOCHS 0010: 42 58 50 43 57 41 45 54 01 00 00 00 42 58 50 43 // BXPCWAET....BXPC 0020: 01 00 00 00 02 00 00 00 // ........ Signed-off-by: Liran Alon Message-Id: <20200313145009.144820-4-liran.alon@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- tests/data/acpi/pc/WAET | Bin 0 -> 40 bytes tests/data/acpi/q35/WAET | Bin 0 -> 40 bytes 3 files changed, 2 deletions(-) diff --git a/tests/data/acpi/pc/WAET b/tests/data/acpi/pc/WAET index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c2240f58dff6b2f765386b5a2e506fda4800be3e 100644 GIT binary patch literal 40 mcmWG{bPds9U|?YEaPoKd2v%^42yhMuiZKGkKx`1r1jGQWX$JuS literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/WAET b/tests/data/acpi/q35/WAET index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c2240f58dff6b2f765386b5a2e506fda4800be3e 100644 GIT binary patch literal 40 mcmWG{bPds9U|?YEaPoKd2v%^42yhMuiZKGkKx`1r1jGQWX$JuS literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index b269a1e3e5..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/WAET", -"tests/data/acpi/q35/WAET", From patchwork Mon May 4 14:30:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283478 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8A20C3A5A9 for ; Mon, 4 May 2020 14:46:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BF53206D9 for ; Mon, 4 May 2020 14:46:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FTHTSQ7L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BF53206D9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcMi-0001TS-Lp for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:46:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6w-0006pb-Iq for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:22 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:30500 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc6v-0006mw-Ki for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602620; 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=lAfJ5/3TbHF/8WjmWYvb2QAzYmCal5x9QNrXZKyAwD8=; b=FTHTSQ7LRw3LKCJwFfBDgf+2uaTpe//f/4dqJf1sZ1aCEAdWPDx8SvSnau74sKEUHhIvVL OboO1VLNyIYmuTotpvxCjQVdYLzGKShagdpJIYR1chV+KNfMQRuqGY6ZhtDDFwNy66qBCI 5O9G9Hfa+3559ZM9GahxI+v+8cdWY5U= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-5krrOh1WMzmg3LZC7fOK0g-1; Mon, 04 May 2020 10:30:18 -0400 X-MC-Unique: 5krrOh1WMzmg3LZC7fOK0g-1 Received: by mail-wm1-f69.google.com with SMTP id h22so4991223wml.1 for ; Mon, 04 May 2020 07:30:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=9VtA+lfLhyvx9BGaosLru1/AAtx+gXAahmsNpkaZs5I=; b=TuBiMuRPw4K7GYMTSCndf84Ko+wZuS23GJSm1mJKrng0LkkMz4GN5v6plOBy1NSeuy 28Bm4poV9kUUrObQ3MZ9LLeJr78tG8MbnrtQs1X0NOygzVBXR2G1ZdLhkHWdrk0+MldZ 5TWOXrcR2M2bO6BbwOE7sUbZt15O9KbaEg7EuLdpwlY6sxUSh4E4gYw73pSIei4eKu4E C5720ECEe2w0mfuEzSqfJW5F3vAB7RTi+FTiq4cX+5CM+SYZWnmsEZPL/Iyz/6Zu6I5r H0ZRmu1RbBnsG++vNMzeU3e7lqJL9vJFGb/LNlbnhcebbd1wcxcSPxmqxyYweGYc/eLy +06g== X-Gm-Message-State: AGi0PuZIC+kScUmzf/bCQ0V+FjkDudpKyAFB898oXK1FWVmUaku1mDu8 /swE2FZdN6bzOLxUaJd5FRiQQVUAZov5js8tjmWgMYhWuMDT6aS5c30NHMMDjIXQ27+3t7vA5VY d2zlx9XIOicNi+yM= X-Received: by 2002:adf:e582:: with SMTP id l2mr5949048wrm.392.1588602617587; Mon, 04 May 2020 07:30:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJt819Ha7ezsa30jzyl8gPBeY6EarOlgRO9Y52hho646cF735I+z+caggyygowvOgKUDGaLiQ== X-Received: by 2002:adf:e582:: with SMTP id l2mr5949032wrm.392.1588602617435; Mon, 04 May 2020 07:30:17 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id w12sm18914535wrk.56.2020.05.04.07.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:17 -0700 (PDT) Date: Mon, 4 May 2020 10:30:15 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 26/29] hw/i386/pc: Create 'vmport' device in place Message-ID: <20200504142814.157589-27-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=207.211.31.81; envelope-from=mst@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 08:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , Philippe =?utf-8?q?Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200504083342.24273-2-f4bug@amsat.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 6 ------ hw/i386/pc.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 6ab6eda046..26e2a3d92b 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -132,12 +132,6 @@ GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled); /* vmport.c */ #define TYPE_VMPORT "vmport" typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address); - -static inline void vmport_init(ISABus *bus) -{ - isa_create_simple(bus, TYPE_VMPORT); -} - void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque); void vmmouse_get_data(uint32_t *data); void vmmouse_set_data(const uint32_t *data); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5143c51653..84669ddc84 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1152,7 +1152,7 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, bool no_vmport) i8042 = isa_create_simple(isa_bus, "i8042"); if (!no_vmport) { - vmport_init(isa_bus); + isa_create_simple(isa_bus, TYPE_VMPORT); vmmouse = isa_try_create(isa_bus, "vmmouse"); } else { vmmouse = NULL; From patchwork Mon May 4 14:30:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 283477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 215FAC3A5A9 for ; Mon, 4 May 2020 14:48:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DBA4F206A5 for ; Mon, 4 May 2020 14:48:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CdNmfnvZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBA4F206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcOi-0004yo-0L for qemu-devel@archiver.kernel.org; Mon, 04 May 2020 10:48:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc72-0006z0-4L for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:28 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:50346 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVc71-0006st-1Y for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602626; 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=NCBO1aLd2aLs6F2iVluN8cNPCS4OZGD2p7feJr3pvrU=; b=CdNmfnvZC/UNK2tOpIEgunLFKHgOW4FFHZkoE0hl+qbo5WlsLqkPc52jFuuBNBcWuetnh2 4gaRNzScYAEl0gezsJdy7RGBJip77YWMgbftc1akeil+jjlR1TMjcEcyjEkEYtpm+pVAIv SeScyqGDkV560/d7TRo1XUJbgThCDDQ= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-71-_sACLOrHMk-rrsyc7xwwVw-1; Mon, 04 May 2020 10:30:24 -0400 X-MC-Unique: _sACLOrHMk-rrsyc7xwwVw-1 Received: by mail-wr1-f70.google.com with SMTP id z8so3697870wrp.7 for ; Mon, 04 May 2020 07:30:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=KDH+uIa1iy/4EI4LPUlxUORLJ/6b+eATnz4vYJlDr4s=; b=n15osL4YCnvndoWjqekgw0NQ08hOp8ii5hQOw7v7sTwvGa8rAB2b7mUT3jfM+VmLqe wqC0Qv0IIm1VA0scEnSA2ljikctu1/hccsfD2sp58lF0T3h96jbc5gV7pan/nSpB70N6 c/qbE5kQbDbzrv86MiCAtNeKgOxJL7Vfo+eYNKvItdN/59YHOkMnvjkILVUJhdtetPll Z2gZYOLhd87CP8NKQ8LYUaV4brlWwzGRA+I2kSiDT3rKSxLB661Yr3D057VJDhAvHxIz yZbYBMQPZgmd6zw/yP8YCBZn1KsUbWLq9W1OugTkABgu1S27v8KvChBGKkPkJwDxqoS3 F42w== X-Gm-Message-State: AGi0PuYZRMB5Z0jGp60PVlajVjrinTWUeI9SPyNWMcw1qYrHOdGBksQV nI+o9ca4MDh82ScBRv4fTbAv4LG7n6j2iR51dzh/9vMEJs/Uieu9TfgyqroLajqk0islpEa4K/W UQZRhgXBOM7ygiqo= X-Received: by 2002:a1c:6a08:: with SMTP id f8mr14270267wmc.132.1588602623238; Mon, 04 May 2020 07:30:23 -0700 (PDT) X-Google-Smtp-Source: APiQypK9NsyZYkCQwKRNVucEGY8Aq6HzBCO2IB4uDZLxAbTqwUlrroiq4IOYmuM07Mm5Lc/dJz60xQ== X-Received: by 2002:a1c:6a08:: with SMTP id f8mr14270248wmc.132.1588602623043; Mon, 04 May 2020 07:30:23 -0700 (PDT) Received: from redhat.com (bzq-109-66-7-121.red.bezeqint.net. [109.66.7.121]) by smtp.gmail.com with ESMTPSA id h1sm14166869wme.42.2020.05.04.07.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:22 -0700 (PDT) Date: Mon, 4 May 2020 10:30:20 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 28/29] hw/i386: Add 'vmport.h' local header Message-ID: <20200504142814.157589-29-mst@redhat.com> References: <20200504142814.157589-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200504142814.157589-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=207.211.31.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 05:09:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , Philippe =?utf-8?q?Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Move 'vmport' related declarations in a target-specific header. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200504083342.24273-4-f4bug@amsat.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/vmport.h | 34 ++++++++++++++++++++++++++++++++++ include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 1 + hw/i386/vmmouse.c | 1 + hw/i386/vmport.c | 1 + 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 hw/i386/vmport.h diff --git a/hw/i386/vmport.h b/hw/i386/vmport.h new file mode 100644 index 0000000000..47eda7a22b --- /dev/null +++ b/hw/i386/vmport.h @@ -0,0 +1,34 @@ +/* + * QEMU VMPort emulation + * + * Copyright (C) 2007 Hervé Poussineau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef HW_I386_VMPORT_H +#define HW_I386_VMPORT_H + +#define TYPE_VMPORT "vmport" + +typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address); + +void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque); + +#endif diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 26e2a3d92b..de49a57506 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -130,9 +130,6 @@ typedef struct PCMachineClass { GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled); /* vmport.c */ -#define TYPE_VMPORT "vmport" -typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address); -void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque); void vmmouse_get_data(uint32_t *data); void vmmouse_set_data(const uint32_t *data); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 84669ddc84..f6b8431c8b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -91,6 +91,7 @@ #include "qapi/qmp/qerror.h" #include "config-devices.h" #include "e820_memory_layout.h" +#include "vmport.h" #include "fw_cfg.h" #include "trace.h" diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index e8e62bd96b..78b36f6f5d 100644 --- a/hw/i386/vmmouse.c +++ b/hw/i386/vmmouse.c @@ -29,6 +29,7 @@ #include "hw/input/i8042.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "vmport.h" /* debug only vmmouse */ //#define DEBUG_VMMOUSE diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 114141c6f3..00d47e0c4c 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -26,6 +26,7 @@ #include "hw/i386/pc.h" #include "sysemu/hw_accel.h" #include "qemu/log.h" +#include "vmport.h" #include "trace.h" #define VMPORT_CMD_GETVERSION 0x0a