From nobody Sat May 18 12:12:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602741; cv=none; d=zohomail.com; s=zohoarc; b=cetpl9nUv4EHyPJXjZm/fdMgJFVqn6Bz+vDeb+d8EPH0iylb/uTZMt5nKXow0CfCvgki+LUHc/f2vBedTHpK6blTm3Kcbh83LXNS9quimcQxWamE6p2QGcm208jVlFVXuE882A2kOtSlQ9f2UGmknuClRPaH9Zw4GQcxqjrjrgo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602741; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iNQ9lS7EsKMnaq4ojaGLEYxIauihn/k1pWhlz/tga24=; b=HU9HIF6L0P4Tqo/6JyuUeiLpDlwGQGCApRrm/+JCmXEoRhCKT3yGsSGZRLkUizuxM0ffTK4timFH3yHD1HfsmH+iRZy5gpHMwmWb70F2BZhZom2TtktJbj1nlF8jIe5LJBEZyjYJj7/KJiqLkbvShNqhnFunWnvMRXBQx+aJFgY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602741294122.14055232094756; Mon, 4 May 2020 07:32:21 -0700 (PDT) Received: from localhost ([::1]:33344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVc8o-0001Ti-SI for importer@patchew.org; Mon, 04 May 2020 10:32:18 -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 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 Received: by mail-wm1-f72.google.com with SMTP id o26so3595534wmh.1 for ; Mon, 04 May 2020 07:29:18 -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) 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= X-MC-Unique: -2tbKlS8NA-MkG3Gr7m4BA-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Julia Suvorova Raise an error when trying to hot-plug/unplug a device through QMP to a dev= ice 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 =3D PCI_DEVICE(hotplug_dev); uint8_t *exp_cap =3D hotplug_pdev->config + hotplug_pdev->exp.exp_cap; + uint32_t sltcap =3D pci_get_word(exp_cap + PCI_EXP_SLTCAP); PCIDevice *pci_dev =3D PCI_DEVICE(dev); =20 /* Don't send event when device is enabled during qemu machine creatio= n: @@ -430,6 +431,13 @@ void pcie_cap_slot_plug_cb(HotplugHandler *hotplug_dev= , DeviceState *dev, return; } =20 + /* Check if hot-plug is disabled on the slot */ + if ((sltcap & PCI_EXP_SLTCAP_HPC) =3D=3D 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 *h= otplug_dev, Error *local_err =3D NULL; PCIDevice *pci_dev =3D PCI_DEVICE(dev); PCIBus *bus =3D pci_get_bus(pci_dev); + PCIDevice *hotplug_pdev =3D PCI_DEVICE(hotplug_dev); + uint8_t *exp_cap =3D hotplug_pdev->config + hotplug_pdev->exp.exp_cap; + uint32_t sltcap =3D pci_get_word(exp_cap + PCI_EXP_SLTCAP); + + /* Check if hot-unplug is disabled on the slot */ + if ((sltcap & PCI_EXP_SLTCAP_HPC) =3D=3D 0) { + error_setg(errp, "Hot-unplug failed: " + "unsupported by the port device '%s'", + DEVICE(hotplug_pdev)->id); + return; + } =20 pcie_cap_slot_plug_common(PCI_DEVICE(hotplug_dev), dev, &local_err); if (local_err) { --=20 MST From nobody Sat May 18 12:12:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602891; cv=none; d=zohomail.com; s=zohoarc; b=CoLl6E801SduHolx9weBVHObK/AiGkEsbqUb1NTC5LrcMzkbJJEehjyFr9MTVeUyGz3kS7jDH+Wofa3Il7Ktpy8SxCOqtUKuvaEFKOVxR7Db+DefXNuJCezvPPxbBgbT//6KWXRU0R0ZRmbmasfpcYDvJ6pml3fXIZj8V5Kmh/A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602891; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EadBmenG36bb/hqwInBfhSfoAlf8ggiqJ0AKPIGwVHo=; b=RStF9vDIqeAJtIYCkDr7FY+wyLGkr5bKr2p/7aHO6lMwuqvGWydWJpPEGHd2J3eezZhZPqI31VBl/Qn2nhhfK3h1i2dyAdc0yoIvqsJNPZPT3TYCjjKL8I4yoZaFC1hoq7oGpsIrqNDTG0GEelGb6JRHtDxYnO3wv1by4MaOPPE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602891515310.09957767583603; Mon, 4 May 2020 07:34:51 -0700 (PDT) Received: from localhost ([::1]:42244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcBE-0005KB-RO for importer@patchew.org; Mon, 04 May 2020 10:34:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc61-0004dT-4l for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:25 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:27640 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 1jVc60-0005rC-BC for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:24 -0400 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-67-92GkdTQoMb-kBULHCgrmiA-1; Mon, 04 May 2020 10:29:21 -0400 Received: by mail-wr1-f72.google.com with SMTP id q13so1981110wrn.14 for ; Mon, 04 May 2020 07:29:21 -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 l5sm13169870wmi.22.2020.05.04.07.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602563; 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=EadBmenG36bb/hqwInBfhSfoAlf8ggiqJ0AKPIGwVHo=; b=AEIwx7EDb1YAr0fsXyG+lCLYyqkES6sF/g/nAH+xmMMfxHvSCyjyBO0DgKjoc0dLhqLR3v OXJFBmRY5pLiqMhyrx8OlUEyNDbCyg8nOJR4dO5ICyNQgAUxe+pBoWqbyKNDL4CoF/OSpI 2L2kxXcPSZayyKlGTjd32Onx4X+07J0= X-MC-Unique: 92GkdTQoMb-kBULHCgrmiA-1 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=/am6Xn+onHCJUusiQFfDxyjcP5qPREb7gnWXW/2S1G4=; b=oWBE7g4ZSRgiimtKWpcGnnNTrP9954AcqvyLoBYXyQgW6iVrLOKI6TcuoREgWtBblW K3ml2UKKEPX4JDSaVC+XUxHF/isvc6TJfiF+HS/gZ9EcSz1FTkA9pWWiVGnDR09+mOjS YS1B7o0ul9QINFO8qkSED3V7wStIlNtIxyEayQhuvDVKs4z4e25R4clStIhIuQakc/Wk 8JW7FNnKns0isNJt53xTDAXUIgR0KpRx5FfcDZI13vFq6sssqFq1TohKMM/ObhPY4LSi rY9i6mTxur96JfN0+tH6CjGIr4pZj8IpuLYYmFP0AMEsf6sOsQNaHl/VPtepKiqWbwZp ZI4g== X-Gm-Message-State: AGi0PuY9Zr1/Dv1VXf7/klY/O+Q3du5zkAEALwsDGeyf2JY6fYAXTcNo bjdNrjkms3QgNVWfMT2f0gXIKTMc9xoIIZsMVpr8pUJ8k+/2FlpUU5uZSAO5UKLmYsqmEwCA+G9 AJ+MOY1w3gdRviKg= X-Received: by 2002:a5d:4991:: with SMTP id r17mr11919287wrq.150.1588602560199; Mon, 04 May 2020 07:29:20 -0700 (PDT) X-Google-Smtp-Source: APiQypIxvIUENcOZRUmgu2yxY0Nt9R2lRufAL7KTTO6KdMPRw9MPi9uTlVyOh88R5Y7SGNITQstlSg== X-Received: by 2002:a5d:4991:: with SMTP id r17mr11919263wrq.150.1588602559976; Mon, 04 May 2020 07:29:19 -0700 (PDT) Date: Mon, 4 May 2020 10:29:17 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 02/29] hw/pci/pcie: Replace PCI_DEVICE() casts with existing variable Message-ID: <20200504142814.157589-3-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Julia Suvorova A little cleanup is possible because of hotplug_pdev introduction. Signed-off-by: Julia Suvorova Message-Id: <20200427182440.92433-3-jusual@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- hw/pci/pcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 6b48d04d2c..abc99b6eff 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -449,7 +449,7 @@ void pcie_cap_slot_plug_cb(HotplugHandler *hotplug_dev,= DeviceState *dev, pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA, PCI_EXP_LNKSTA_DLLLA); } - pcie_cap_slot_event(PCI_DEVICE(hotplug_dev), + pcie_cap_slot_event(hotplug_pdev, PCI_EXP_HP_EV_PDC | PCI_EXP_HP_EV_ABP); } } @@ -490,7 +490,7 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *ho= tplug_dev, return; } =20 - pcie_cap_slot_plug_common(PCI_DEVICE(hotplug_dev), dev, &local_err); + pcie_cap_slot_plug_common(hotplug_pdev, dev, &local_err); if (local_err) { error_propagate(errp, local_err); return; @@ -509,7 +509,7 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *ho= tplug_dev, return; } =20 - pcie_cap_slot_push_attention_button(PCI_DEVICE(hotplug_dev)); + pcie_cap_slot_push_attention_button(hotplug_pdev); } =20 /* pci express slot for pci express root/downstream port --=20 MST From nobody Sat May 18 12:12:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602640; cv=none; d=zohomail.com; s=zohoarc; b=m7lSH8W9CU3lbM3YCg4OWjrWv9j0tMn/YT4er9+YbOlTCSXRVJ5O9IM5yNclkqo0FUfDdWfCrkQCwWNlvvG1uhLOo4L0pD47PQKi+Pt493MeLGKbrPT5X94JPFRaIobxBGJB9gJeQjl/KdQYiPhsBoZsyFV4TpgdkjB0cAbopGQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602640; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RVNBXQ6gCt5bQDUAiEhYyrhSoB3/uLQxROx/EqMXEOY=; b=IISYKR/wCIDZcs8HPgdFJyodjxHBfgKiKZQvvEVuU1B9tcS3vV5ZHHJ2rp8rW6sR4HtTzPg1TrQLP83/8F8dpEt3zb7bHfETH1qRQAEEeFs5R8QEGAnTWUBwfUI/vTehobUnil4+ueqOBr5avxY850aWfYbiuhBGrpuor/FpDQ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602640869449.80698285794324; Mon, 4 May 2020 07:30:40 -0700 (PDT) Received: from localhost ([::1]:53740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVc7D-0006Zj-Gx for importer@patchew.org; Mon, 04 May 2020 10:30:39 -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 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 Received: by mail-wr1-f71.google.com with SMTP id f2so10885537wrm.9 for ; Mon, 04 May 2020 07:29: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 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) 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= X-MC-Unique: SWzU5saQNFaUktpH_B9ZyA-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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-Daud=C3=A9?= , Gerd Hoffmann , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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=C3=A9 --- 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; =20 typedef enum { AML_COMPATIBILITY =3D 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; --=20 MST From nobody Sat May 18 12:12:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588604116; cv=none; d=zohomail.com; s=zohoarc; b=nSr0uG3mnIRvHBJhQevjGlrse68v5IneBeIIVbEe5yQRbCRgOcrtEb2l7QnILFAt1vudurnM2Ps/ypMyezZvTN9ZtVLf0QDPI7eDHlbMP0dxs/Yy8nVRQkPwgDEzvceGW8kGCBcz9zpTVMEMEjllLk/f0HMK2UmOZzpXgXGfjvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588604116; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7CFiYdy5xKBq+FqRALV9f5jvve8p3XfD9KaQL2vD9EY=; b=WgYAjKW6N5darA1uSLjd++/5oKGGZy28rXkz54hmEnGEvJ97Xf8dz/26CCvQ3Jn2eD7RoTxwZQ5qCZKlh7UaD7myu3pmmC1ndg64q9lVlYPKtWuueiU6m4hr+aPfhaYJeXa2uYqIIA6pg6Z18ZmkxeXrNac0bHtLr41mn7SmiJg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588604116614248.4669752082109; Mon, 4 May 2020 07:55:16 -0700 (PDT) Received: from localhost ([::1]:42428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcV1-0000OY-5g for importer@patchew.org; Mon, 04 May 2020 10:55:15 -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 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 Received: by mail-wm1-f70.google.com with SMTP id f81so3591318wmf.2 for ; Mon, 04 May 2020 07:29:25 -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) 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= X-MC-Unique: 7WejOYbsMgemnJPzwr9OKg-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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) +=3D tpm.o common-obj-$(CONFIG_IPMI) +=3D ipmi.o common-obj-$(call lnot,$(CONFIG_IPMI)) +=3D ipmi-stub.o else -common-obj-y +=3D acpi-stub.o +common-obj-y +=3D acpi-stub.o aml-build-stub.o endif -common-obj-$(CONFIG_ALL) +=3D acpi-stub.o acpi-x86-stub.o ipmi-stub.o +common-obj-$(CONFIG_ALL) +=3D acpi-stub.o aml-build-stub.o acpi-x86-stub.o= ipmi-stub.o --=20 MST From nobody Sat May 18 12:12:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603042; cv=none; d=zohomail.com; s=zohoarc; b=J4fBMpie1gNoB8co+o4EbKru5IVlVv+FbKlvacGICnDCbyAQ3AbvJ/J6npeVrDvaNEAs1mmz5sN/W7wB9IVcOHZvUHGK7t615V1a+zf7Ps5pmfo1A1fcswb19W3amclHj2/U3i54cOa7Y/UG1DC/v32y1W1Bf5O+N+ZkV7xzU1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603042; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3iDOQuTM/GBdioleUH2RjG+5kuhxga2pExwroaaGOjs=; b=bayRkonFzU3bGkTLtfPCjLh3uKGEJV9ziPPyS0vQ5XEUx6z/lB3jkdKON5OdcKZjmubUd7U8X1utuXEOm0g7zNGTdYgPwnqrIX/tbZgs1wJTD+11IQa1LTlog9U1H17Z5Za1oYjDieSZDQdQAMz5zlhSpXxeqJAlXsaSkn+WZco= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603042287172.83040406308805; Mon, 4 May 2020 07:37:22 -0700 (PDT) Received: from localhost ([::1]:53726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcDh-0001rw-24 for importer@patchew.org; Mon, 04 May 2020 10:37:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc67-0004tG-P4 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:31 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:52319 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 1jVc66-0005vZ-Tv for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:31 -0400 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-102-oDJVTEreMMCkXIoVXpfh2Q-1; Mon, 04 May 2020 10:29:28 -0400 Received: by mail-wm1-f72.google.com with SMTP id h22so4989525wml.1 for ; Mon, 04 May 2020 07:29:27 -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 h16sm21062892wrw.36.2020.05.04.07.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602569; 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=3iDOQuTM/GBdioleUH2RjG+5kuhxga2pExwroaaGOjs=; b=fEi6a0DHKQyL3UPHo7VCfJGCoX/zqeak8KSFECpgb2WMAovqK7bXTllvLZpFYjI7wC0F3Q zDYrx+Bg1AHXsHz3CLblaxsElKjXUB5QHoBdHwqJQZJriULVX/TaiwfpRLS1cajdMZ5EJk iHA6HYloy7ceEd9TtUREwCoX81HM1pU= X-MC-Unique: oDJVTEreMMCkXIoVXpfh2Q-1 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=bmWb41iB+zUkq2ymfjwDCKrhB5rQBk8dgJEafa9xU5M=; b=OdNE+bXI1Wohx4gCs2eGrnkijFGcbAF+wUB/HKP3uQ77PCuGnUvGWtY39bS8HlStLx a+hVce6NB8RhfcDabDJh/3cCCXtfB4sF7HwVzHlXgg3bzl78D7md/BNJ04dn/3RGoomy BItOUxLGvWDFUMQJPXNFKzWJ4+IrZys53pHmtAq9U9rAxW46m50ZtdO+auIcaAURa5Nc UDsr2rGkpl9YdXql6vyQUv1sROxzuxEco23/rbaeGvBcmXPGTSohDnLfcAFYAjisB31V Zzr9y6UshPbI6xvGqP15dCxoGfXRNNezCcGNnq9EoUO7uHaaPyLLZALqeLnmvSwyObdy s9fw== X-Gm-Message-State: AGi0PuYECZpMLzIg0qCt7FYIXzpHNzXfiakEWHUH0heic3zfT4efrzzo GdWxi1PxlU7C+t1dqis8aNXwzMMnVYk2b5Dm9U2OnqWWLogWDVv11MXiR9cFCOSvHiZzv3blVfT iIDVO/cEJPALFm+w= X-Received: by 2002:a1c:770f:: with SMTP id t15mr14616329wmi.178.1588602566620; Mon, 04 May 2020 07:29:26 -0700 (PDT) X-Google-Smtp-Source: APiQypIi+sLSqRuGbAM7XQfwHGVVQ5B0DEcuadm0ZTFQ8ofpVfwAbUcyiTHaRFWX7ZXSCPCX/f674g== X-Received: by 2002:a1c:770f:: with SMTP id t15mr14616312wmi.178.1588602566470; Mon, 04 May 2020 07:29:26 -0700 (PDT) Date: Mon, 4 May 2020 10:29:24 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 05/29] qtest: allow DSDT acpi table changes Message-ID: <20200504142814.157589-6-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: Laurent Vivier , Peter Maydell , Thomas Huth , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Message-Id: <20200429140003.7336-4-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..6a052c5044 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,18 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT", +"tests/data/acpi/pc/DSDT.acpihmat", +"tests/data/acpi/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.cphp", +"tests/data/acpi/pc/DSDT.dimmpxm", +"tests/data/acpi/pc/DSDT.ipmikcs", +"tests/data/acpi/pc/DSDT.memhp", +"tests/data/acpi/pc/DSDT.numamem", +"tests/data/acpi/q35/DSDT", +"tests/data/acpi/q35/DSDT.acpihmat", +"tests/data/acpi/q35/DSDT.bridge", +"tests/data/acpi/q35/DSDT.cphp", +"tests/data/acpi/q35/DSDT.dimmpxm", +"tests/data/acpi/q35/DSDT.ipmibt", +"tests/data/acpi/q35/DSDT.memhp", +"tests/data/acpi/q35/DSDT.mmio64", +"tests/data/acpi/q35/DSDT.numamem", --=20 MST From nobody Sat May 18 12:12:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602918; cv=none; d=zohomail.com; s=zohoarc; b=ZC6ly0DKBFS7XD+WJuHT/rhLi7r3YFFZ3LF49cDaJJGeOx4haHSe6FSbcuMtA0yGQukR4+8TnRClS4S6SVkeplxN52qO9+BSq2Th3Y1xPR+mFAIZioA7uhyAJ/cZerd4wgdqYvvCCQVYWPPIMq/pPe6tcZPTEMp4CUqnAkasPgA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602918; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=itmu7tz+8YX6LWqNTTBDZfH0oyb1cw8xwtWy0pZ6Qys=; b=Lc88F/fsZGVuIa9t5UKBLwi16FdWTJYhiXH0Zb48txAjdMf+c7aBEm29WPsXNsVO9r0akL5Wzs/+MC4cqU50O+jfjkqXJDgZVPX8aIhGyJxWCMwpuVUdrZSfHAbwi4+DwWjtPl4AJvXxJHea8p3p5NelNy7hOnxXzPEPEpgLbbg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602918383725.4526021032148; Mon, 4 May 2020 07:35:18 -0700 (PDT) Received: from localhost ([::1]:44334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcBh-0006EW-1z for importer@patchew.org; Mon, 04 May 2020 10:35:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc69-0004yo-P4 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:33 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:40208 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 1jVc68-0005vm-Uo for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:33 -0400 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-499-uRSSTouTPt-DQxzrKdADSw-1; Mon, 04 May 2020 10:29:30 -0400 Received: by mail-wr1-f72.google.com with SMTP id 30so363885wrp.22 for ; Mon, 04 May 2020 07:29:30 -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 w83sm14504279wmb.37.2020.05.04.07.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602572; 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=itmu7tz+8YX6LWqNTTBDZfH0oyb1cw8xwtWy0pZ6Qys=; b=KZchg0Jhlbj8a9FDaKIqDNHIVH3e8HJVy2+scpU5NImg8TSbVQxRtzV6zFpXztKq3uQ+ZX w1bAcITDe3gegwsTmwZ1ZKOwAgZM0V0MJO8DSWwXkKTo/Hgb+V570NoyS33jhyitlCw5vi FyOdK0J9uQzRlYMh+bCqDXPfHBaIMQ8= X-MC-Unique: uRSSTouTPt-DQxzrKdADSw-1 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=V7k4n5KKJ25ykZvHnBkd3lhwrbgQ3O6cOV8Obfh+XCs=; b=Y9jT9BtpIDAihRfXO/7AoS2HAGGr0HQ1AL+c+vWobA5dJe0fbV/VvkUDxVPbWrk15Z uxY5nEC0DijTiwJXW7z9Jvh5j4dVy5zeKJDQ0x9kXDYIgLGtOO3E37JQFf4avNBhKJli aq5XnO6d2gvQl7SghSKS1zP5zoAHbLRQcQTbtn0bVejpnCHxrYnVdmSt305yVMw4WboF cZ7JhoWNKPgYpM4QaewTkLDxp6qMBO9066AZA5uIMsmO/2PNAvwSOp9kyNoxZ6xXyovf nsKZ09by0/qmwJyXdYiBIoaJtbrEOz2drkqJd7yh8nEnMZlitO75ArOVx4RY+1YVKVa2 89AQ== X-Gm-Message-State: AGi0PuatawD+U0dFTRplY6S5lpsMBUsQfP2gvnl5Bsu1NmzU5ymKRk9S F9wAFroRnLsVmQh8zPB3whAUPSD6VGj6Z3zeMNPQAaMO74I2EI2HMB7hfOCIMStajgtVWrKzgpx cQU37vpBO0XgogTU= X-Received: by 2002:a05:6000:11cb:: with SMTP id i11mr20093171wrx.339.1588602569205; Mon, 04 May 2020 07:29:29 -0700 (PDT) X-Google-Smtp-Source: APiQypImRRhiJVXe5c1VsKIMZFSVCbA1G6yPSA5w8T2/B+qd3JL+2VKLXyHyCiRybUN/HXD1FE0EYw== X-Received: by 2002:a05:6000:11cb:: with SMTP id i11mr20093155wrx.339.1588602569000; Mon, 04 May 2020 07:29:29 -0700 (PDT) Date: Mon, 4 May 2020 10:29:26 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 06/29] acpi: drop pointless _STA method Message-ID: <20200504142814.157589-7-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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 , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Gerd Hoffmann When returning a constant there is no point in having a method in the first place, _STA can be a simple integer instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Message-Id: <20200429140003.7336-5-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/acpi-build.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 23c77eeb95..3a046b03e4 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1151,14 +1151,11 @@ static Aml *build_kbd_device_aml(void) { Aml *dev; Aml *crs; - Aml *method; =20 dev =3D aml_device("KBD"); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0303"))); =20 - method =3D aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_int(0x0f))); - aml_append(dev, method); + aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); =20 crs =3D aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, 0x0060, 0x0060, 0x01, 0x01)); @@ -1173,14 +1170,11 @@ static Aml *build_mouse_device_aml(void) { Aml *dev; Aml *crs; - Aml *method; =20 dev =3D aml_device("MOU"); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0F13"))); =20 - method =3D aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_int(0x0f))); - aml_append(dev, method); + aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); =20 crs =3D aml_resource_template(); aml_append(crs, aml_irq_no_flags(12)); @@ -2238,9 +2232,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, TPM_CRB_ADDR_SIZE, AML_READ_WRI= TE)); aml_append(dev, aml_name_decl("_CRS", crs)); =20 - method =3D aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_int(0x0f))); - aml_append(dev, method); + aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); =20 tpm_build_ppi_acpi(tpm, dev); =20 --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603031; cv=none; d=zohomail.com; s=zohoarc; b=PH1rpxEuNaFigYCYivKX9PDiAZZQdhkkFUJnYN0g7CDJaiRCi6CdLtyEtEFy9AzyirbsUev1D6USjFFTR8Xrm9W+gQSjyyIlEwxa0wXnrinFXMDeNTnbAVHSQAcpGryEeB//sJDfMG9n9DYMaRBxU0gkvEk8P+dkn6EHWNBrOAo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603031; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gJFzG582yZB4/rnNbmblCyq8Hpszv9jfR5i6UZ4ZYJQ=; b=JLmWTrvENH/uv7SQ/QPHI/F0RsBthpjMseZJLx6g5ObnU2eVUCwStY5YWTh4PCx4v/VxZ7p5CrrKesboOXn3k1w28oTRw4gUVf2/cpP637vbg09gFlJa/nEs5+b2spBiXjxdEz7nH97reIqa6JYw6vPu3zN6QFfRFHJOppsvzBU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603031974774.6924644155159; Mon, 4 May 2020 07:37:11 -0700 (PDT) Received: from localhost ([::1]:52902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcDW-0001X6-NH for importer@patchew.org; Mon, 04 May 2020 10:37:10 -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 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 Received: by mail-wm1-f69.google.com with SMTP id q5so4978769wmc.9 for ; Mon, 04 May 2020 07:29:33 -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) 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= X-MC-Unique: wLhKfHTKMleu3L234A83Yw-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 { =20 typedef struct ISADeviceClass { DeviceClass parent_class; + void (*build_aml)(ISADevice *dev, Aml *scope); } ISADeviceClass; =20 struct ISABus { @@ -107,6 +108,7 @@ ISADevice *isa_try_create(ISABus *bus, const char *name= ); ISADevice *isa_create_simple(ISABus *bus, const char *name); =20 ISADevice *isa_vga_init(ISABus *bus); +void isa_build_aml(ISABus *bus, Aml *scope); =20 /** * 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); } =20 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) } } =20 +void isa_build_aml(ISABus *bus, Aml *scope) +{ + BusChild *kid; + ISADevice *dev; + ISADeviceClass *dc; + + QTAILQ_FOREACH(kid, &bus->parent_obj.children, sibling) { + dev =3D ISA_DEVICE(kid->child); + dc =3D 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 =3D ISA_DEVICE(dev); --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602756; cv=none; d=zohomail.com; s=zohoarc; b=b4ky0pVoHhVqIsaMZRCLC8vi7d2Pbu50sEXuWsP3qhUEUk8/eF9F0Q4uAuyBUhgAYfTeRvc76Ha6xNnZb78pb0NyxOeJotoRKrFS2Td8b2WcV6a4HivDcWGS1Fru3WbgjJ/SdvZmJyBchk0RiI4xcV5Zo/vJDBonroRzH0r4j54= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602756; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5qBFLHcdRaQMUsQlFXqV2eHnPlF70mfC9NFWokqhExU=; b=hMhbSLW2+1rgYw+kRYxvcvhc6OWgh+VpeOVjG1+DFf5zoKKQBLt5Z2Vi7T1AnZ3YWI+xkTYkhjW945C3ChF+XrsbEKxQKSehz48ZSSNWrRasbmjP0hTF//Gdnxv9xo9daQqN31fj9HBdpaGp1xkHgbJobCgse16SeK3yLtN683U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15886027561081004.4464428222298; Mon, 4 May 2020 07:32:36 -0700 (PDT) Received: from localhost ([::1]:34224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVc94-0001pe-Oh for importer@patchew.org; Mon, 04 May 2020 10:32:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6G-0005F2-1M for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:40 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42749 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 1jVc6E-0005wg-GK for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:39 -0400 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-283-9TCcWZ9SPXuXRrJG9mm7WA-1; Mon, 04 May 2020 10:29:35 -0400 Received: by mail-wr1-f72.google.com with SMTP id j16so10828298wrw.20 for ; Mon, 04 May 2020 07:29:35 -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 u127sm14472815wme.8.2020.05.04.07.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:33 -0700 (PDT) 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=5qBFLHcdRaQMUsQlFXqV2eHnPlF70mfC9NFWokqhExU=; b=hFmjOFc3Bx5XuC5zeofTmcVFr43ViI2jTaUBFQ7gEyVyzGILyMBpNw4gCY6dEyIpLKYUPW KMszKqLWJrKhYuvsHU6LaeF6nU8G3s8dXqR2XgKI2CpXzR7JVop8Xrt9t+CP5cDhmAC6it WsCDnhNbeQCnIKTwuEdp5uRUQHgMujw= X-MC-Unique: 9TCcWZ9SPXuXRrJG9mm7WA-1 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=feEST3pElJnPhKM8FHSB9qNteiPsUjugC8IYA15rGhw=; b=AkmNuNgeY7NgSyTayyQuTL79b/lkql4Pr/Tf1y8NTt6yOLwwpldDpc4A9FOOZXKi82 ASSDj+stWIOe8ASVfY4IlFecPYH7V/Ve4fCtXOSK3FZTW0qeW1iN3Z0bFUf2AB1BzOuY o2cmUmTMBsDywPpYTYOGF1OdeHZawtiEjYlPYcjaGPdWRh8AumOTE6LpABAZqXS+iLru kUwWtlHljKsudY6VnRb84wttF78onuLYvl+2uGdFElTLALj/lKe7IUbGl1OJ5Hflimor m4wjLFmCW03aqFQvyFaaFDl50Zk3drU8n4GJqZGAacp47EvaEHu0DQtv12obismq/vTF pGug== X-Gm-Message-State: AGi0PuaVURiQ7LdnldjRt36wythnbZyJST6lnd1ur2jph/qGN4ks+LEe Kv83grHXied0uPZXlO4wGyqCJBNa4AUYUKYA9zlAY49PACx4T1AQMPpoOAEPpde+dTR5AA2PLH0 xQh2PKzGKjp7Ukek= X-Received: by 2002:adf:dcca:: with SMTP id x10mr19222681wrm.212.1588602574569; Mon, 04 May 2020 07:29:34 -0700 (PDT) X-Google-Smtp-Source: APiQypLz+U3uacPzJanbbi8OHGeShEmUSgGA/AFr8iP38JVRfxbvGX4nCouwU5+hKxuBdvp1MA/sYQ== X-Received: by 2002:adf:dcca:: with SMTP id x10mr19222666wrm.212.1588602574359; Mon, 04 May 2020 07:29:34 -0700 (PDT) Date: Mon, 4 May 2020 10:29:32 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 08/29] rtc: add RTC_ISA_BASE Message-ID: <20200504142814.157589-9-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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 , Paolo Bonzini , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Gerd Hoffmann Add and use RTC_ISA_BASE define instead of hardcoding 0x70. Signed-off-by: Gerd Hoffmann Message-Id: <20200429140003.7336-7-kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov --- include/hw/rtc/mc146818rtc.h | 1 + hw/rtc/mc146818rtc.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h index 10c93a096a..3713181b56 100644 --- a/include/hw/rtc/mc146818rtc.h +++ b/include/hw/rtc/mc146818rtc.h @@ -47,6 +47,7 @@ typedef struct RTCState { } RTCState; =20 #define RTC_ISA_IRQ 8 +#define RTC_ISA_BASE 0x70 =20 ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq); diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index dc4269cc55..d18c09911b 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -908,7 +908,6 @@ static void rtc_realizefn(DeviceState *dev, Error **err= p) { ISADevice *isadev =3D ISA_DEVICE(dev); RTCState *s =3D MC146818_RTC(dev); - int base =3D 0x70; =20 s->cmos_data[RTC_REG_A] =3D 0x26; s->cmos_data[RTC_REG_B] =3D 0x02; @@ -951,7 +950,7 @@ static void rtc_realizefn(DeviceState *dev, Error **err= p) qemu_register_suspend_notifier(&s->suspend_notifier); =20 memory_region_init_io(&s->io, OBJECT(s), &cmos_ops, s, "rtc", 2); - isa_register_ioport(isadev, &s->io, base); + isa_register_ioport(isadev, &s->io, RTC_ISA_BASE); =20 /* register rtc 0x70 port for coalesced_pio */ memory_region_set_flush_coalesced(&s->io); @@ -960,7 +959,7 @@ static void rtc_realizefn(DeviceState *dev, Error **err= p) memory_region_add_subregion(&s->io, 0, &s->coalesced_io); memory_region_add_coalescing(&s->coalesced_io, 0, 1); =20 - qdev_set_legacy_instance_id(dev, base, 3); + qdev_set_legacy_instance_id(dev, RTC_ISA_BASE, 3); qemu_register_reset(rtc_reset, s); =20 object_property_add_tm(OBJECT(s), "date", rtc_get_date, NULL); --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602674; cv=none; d=zohomail.com; s=zohoarc; b=biI4aNNuLjiL1oL4qeTCcol+GXnNBNicGoPGm9Ey5t1Ankes0A9TM7yhd0u2uVa/BfXMnuGyYVOORtuk3uvUEaPzrYrQK0svb7l3GrsJn+H/Wf/r/dWjRlO8XYgXxcvGRJ9RLggTba2x1L3VV6j9P/y0Z4PI/SrMdRDRpkD/hjY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602674; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UFJCcfUPniOf5vXc8rH2NS/WfUBDG9stKmVsBSpYF/c=; b=AyDUgWUZZxReQ7/T7hIiGXw60jJs0r5OixkEVD9ZdW7K3kBS8v6ohDE3McvnzcPZbKoOVnK6uF9GUzFWeu3LY0TmUHYxVamqjkgWXNDDL5CkzH9Q5Zu0j4NWX4d4SeKOu7FETYR2HgSvjF2fisgoqPw9XfbbP+yrVfaShlp6Nzo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602674644102.20207360305005; Mon, 4 May 2020 07:31:14 -0700 (PDT) Received: from localhost ([::1]:56548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVc7l-0007nD-Co for importer@patchew.org; Mon, 04 May 2020 10:31:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6H-0005Is-Jj for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:41 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55677 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 1jVc6G-0005yF-P1 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:41 -0400 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-489-wODYEhw2OIO1Db5pCjfO2Q-1; Mon, 04 May 2020 10:29:37 -0400 Received: by mail-wr1-f70.google.com with SMTP id x8so2089466wrl.16 for ; Mon, 04 May 2020 07:29:37 -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 v2sm6099951wrn.21.2020.05.04.07.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602580; 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=UFJCcfUPniOf5vXc8rH2NS/WfUBDG9stKmVsBSpYF/c=; b=On/eKKlodm7KxY0g5F/G3MZMsmO5lOChyCeFFxg5s7Q89PR2/uA1oTYzpBGTlGzSnJYw3F V4gcLvXAkBgP1nR72OxhyYB4sfO2GsL0/2maRSo1HWjXBdyOck5TvAKldqvM9cDgNLmy9z 99t12sWo6nMCs1EjoUXPqIlBYK7mqhs= X-MC-Unique: wODYEhw2OIO1Db5pCjfO2Q-1 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=UfPNDPekMMkFXNne2POD4HoHEu9FovxK5J/ip16ICoI=; b=WJxmIGBAWddESjdCkDct5aWziwnhTO1RIdC5BzCapguoec1dUuiJSr0a9tGlf4Wc7S kb0XCczSwHiJI0QwZT6N6QwGW9IDShfLMZ0B/mp/i/zHnbmiWAELXYocHfsmPFLLd5eh Qq9Y7154OX2+4HN/KXVcxQMZ7F0xl4IEPchIn3LSj+bfGTN98JUhEjBsaE4kx/KVR4RT n7NQo5oJ7IHN16wk6y5G8JpULksum6JAx3LrRB4UnsWZ7oB1ipTvyYJai7f2dDMFiJZP P2D2Ut2TVy87AOo/D7CrMAnbvSwpoojXNPAc32gRJdvl0U/MA770piD1BWfQLO/1OXET oedA== X-Gm-Message-State: AGi0PuatNz8F4NBFsUuf6FBU3lm0XjvGqHWoyxr2KDDPP1UisvChvelC fvVE8UeOlT5LwtQt+SArJckpGhzGIAXwAvz5ZD1tSYqk0e2+pAvKKs5VJw2r148G5CYFeUColpy 7Jarm0YzOc3Dmziw= X-Received: by 2002:a5d:6a4e:: with SMTP id t14mr6074215wrw.353.1588602576824; Mon, 04 May 2020 07:29:36 -0700 (PDT) X-Google-Smtp-Source: APiQypJ+3366N0mncyHWvmlxX0rEN7w6W0GC5GYKheErz47G9Ct4pHQMtWO6c+mtJka0uLx2lNmdTg== X-Received: by 2002:a5d:6a4e:: with SMTP id t14mr6074199wrw.353.1588602576658; Mon, 04 May 2020 07:29:36 -0700 (PDT) Date: Mon, 4 May 2020 10:29:34 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 09/29] virtio-vga: fix virtio-vga bar ordering Message-ID: <20200504142814.157589-10-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Anthoine Bourgeois With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility with stdvga. By default, bar #2 is used by virtio modern io bar. This bar is the last one introduce in the virtio pci bar layout and it's crushed by the virtio-vga reordering. So virtio-vga and modern-pio-notify are incompatible because virtio-vga failed to initialize with this option. This fix sets the modern io bar to the bar #5 to avoid conflict. Signed-off-by: Anthoine Bourgeois Message-Id: <20200422215455.10244-1-anthoine.bourgeois@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Gerd Hoffmann --- hw/display/virtio-vga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 2b4c2aa126..95757a6619 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -114,6 +114,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpc= i_dev, Error **errp) */ vpci_dev->modern_mem_bar_idx =3D 2; vpci_dev->msix_bar_idx =3D 4; + vpci_dev->modern_io_bar_idx =3D 5; =20 if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) { /* --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603887; cv=none; d=zohomail.com; s=zohoarc; b=hgPOYVYomcCG/W/ECQ9Dir2jNjXhIajhhCQK+yqEt2F0wsmVnyJqFaiLyfDNPLzTl2bSc3yWLcryjQ17YQWAyhaOpsSLqE6gOncPjbbPs3SeZ+/FAQQVLO+5GVTLpWHOsd2LCAy6VvwhOIchE4paEHqnZB7YUOUYiCLc/ymppRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603887; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Pj1uHiegKcsUZCaq6FfRPIoZitXmODiLZa/viD4waC0=; b=ZkcYkzykubkVcPjzTvRQe9AwIJDalmsdZNboXECditZPIeXlZ02n8v9uyfHELJsyai2HFER5Y1AE/XNBZVM09uSTyT1zgeilAn2ZvYMxgXA2mrNh2SXf76t0lOoA5pqs1kA20eYOyOgFl1XITQWVe5ZE5i2tKsxjIMeGptrJcy8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603887420929.7959188512957; Mon, 4 May 2020 07:51:27 -0700 (PDT) Received: from localhost ([::1]:54536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcRJ-0001dt-Ql for importer@patchew.org; Mon, 04 May 2020 10:51:25 -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 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 Received: by mail-wm1-f71.google.com with SMTP id w2so4993968wmc.3 for ; Mon, 04 May 2020 07:29:39 -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) 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= X-MC-Unique: n4REQS6WNWasS69FPNHVGQ-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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, Er= ror **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 * */ --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602828; cv=none; d=zohomail.com; s=zohoarc; b=Izm+BBX+1JtTnc+bkVQ05b/g/EOziWC7hOH6XDmhv40ej9gt6m18At11gK5R/C4NUx9XT4VaYUwWcChN3vvI/XulBSOz3A8l89qHq5qKvnu28doyzrFrJaBOEF7buUeg6EoQI8KqabFn2GC8+DpjIH1b/Q7FW4ZE+BaTAK0dJDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602828; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3q2PV09NbvebXNW9HBjqH4Zi18jqVNRNbd0N7P7VPtU=; b=QwYZnQdD/ihIi6aQxpFudOv0M9LESs4bT7yCNXpIMW3kY6wcCvNoPby2lZDFE6PEarVPOayhp6Yvu4vQrkqUVLvm8SskOxm3kPeifdss1LmEcjWt+Eq+w2lj+oa//T0INXTPt2YbYIjPuKkzcFAXkNoq6b94IgCRMDsOxu1cdQM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602828471252.1887157426704; Mon, 4 May 2020 07:33:48 -0700 (PDT) Received: from localhost ([::1]:37136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcAF-00036e-4Q for importer@patchew.org; Mon, 04 May 2020 10:33:47 -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 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 Received: by mail-wr1-f69.google.com with SMTP id f2so10886032wrm.9 for ; Mon, 04 May 2020 07:29:42 -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) 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= X-MC-Unique: Vk68ID71MmSzWNlEYwWGmg-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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. =3D=3D7309=3D=3DERROR: AddressSanitizer: heap-use-after-free on address 0x6= 04001020d18 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/vi= rtio/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/qd= ev-monitor.c:626 #8 0x555555e51213 in qmp_device_add /root/smartx/qemu-el7/qemu-test/qde= v-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-tes= t/monitor.c:3404 #11 0x555555beac8b in monitor_command_cb /root/smartx/qemu-el7/qemu-tes= t/monitor.c:4296 #12 0x555556433eb7 in readline_handle_byte util/readline.c:393 #13 0x555555be89ec in monitor_read /root/smartx/qemu-el7/qemu-test/moni= tor.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:20= 13 #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/qem= u-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-t= est/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 =3D>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 =3D=3D7309=3D=3DABORTING 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: =20 virtio_err: g_free(s->vhost_vqs); + s->vhost_vqs =3D NULL; g_free(s->inflight); + s->inflight =3D NULL; for (i =3D 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 =3D NULL; g_free(s->inflight); + s->inflight =3D NULL; =20 for (i =3D 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, =20 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 =3D NULL; inflight->fd =3D -1; --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603131; cv=none; d=zohomail.com; s=zohoarc; b=dKUit34UtYCe++y2TF5pzZ6rUk9lkNe5VqjHgtPkvMSNGQGffbxKDBz7ijQS09kvqIhreCxN/2cJgQpnro4eMcM6agZjmIg02jfz5IQ8g8kN2Tk/+0ODTLBtdB1auQF3x2OqsTTiR031RRFUw0Vz8qNAZk1Q7AkInHSW/GmNOWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603131; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZbQJE8U0g9/taY1UGB+Es2fg0Z+KJRLr1l0iTS5yKYw=; b=eRaWeB6+urX1exVPisk0kQ8F8ZVTejLw2r9WPc7K4n83VhiNTbWoq+pB72TaRhWq9wZjHh044jL0aEPiAZdt2S31tvx1qIb5o+Dr9q3cG/T6MzJL71jofXZADz/KpH8aHMsi97YtgFNM3M7gUQFa1j3Sjt7JmB2XS47k+1IPZpo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603131222620.9097539580242; Mon, 4 May 2020 07:38:51 -0700 (PDT) Received: from localhost ([::1]:60142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcF7-0004tQ-VY for importer@patchew.org; Mon, 04 May 2020 10:38:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6O-0005aK-OZ for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:48 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55053 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 1jVc6N-0006CL-Qu for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:48 -0400 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-234-vWrqXNiVMN6IwB7M45jcqg-1; Mon, 04 May 2020 10:29:45 -0400 Received: by mail-wm1-f70.google.com with SMTP id d134so89698wmd.0 for ; Mon, 04 May 2020 07:29:45 -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 x5sm1965587wro.12.2020.05.04.07.29.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602586; 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=ZbQJE8U0g9/taY1UGB+Es2fg0Z+KJRLr1l0iTS5yKYw=; b=MCXTeMozrscsRpo6MpLofvvSSHF2WLCuBXkeuFeMpqVW6NPNw+Y3Bkgnmno0EnQcukwlMs UKETtYXAT0uAznVeXQP2n+sBjmXJm6uPhfqKAiYwCW2igIZxrq0zR8xDVD1tzvF8AoLDeL Wj7B0IFYjYuQwIN+OtY8lfv1s4ptkE0= X-MC-Unique: vWrqXNiVMN6IwB7M45jcqg-1 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=bcYO/D8ZBtkupiZf8L7h1wjpZYqhLskCmEjZ4tplteM=; b=lUjrXjsL9tghZRFXlIOX4fE04HTLMUw1RgnU1qcx5oKZ7U8z2OV9vKjkHqKL4nJ+Rq NdLH5VQZSfVOY8YeFVevUcP7JjIXzTRjvJuZs7JEa63a3P6rjjw2w6org4Yt+RQOrnWQ CbEQIINEDINR3b9LXJEzIbZrvI9CbKI5dgrTKs6tfC1tQbBkieOi7EmGyU7ljtfgmEwT I02j6p7jTZaUPd4wcehLOaTQwrElLubBv6mTGt01Uq293WlRds4A8/E9UxWbzb3QbH+9 06tPiWsdon+1hY8y86USFbF+SHn7agugCUTMby2m2qyNY67a5lUee2zS42/ijr4Z/UJ4 toEQ== X-Gm-Message-State: AGi0PuZM6D0UAqiVjK+ZlMzW+UOu9Yk54MFdzkVPXc+JMhrbRLmQgdga 0nPpPH84qMzZDvBa6KYAv1hNrrxmcB5o5wDIWNKFgd/qRLFX+ZAUx5O+0nzeDLnVkcql0GgIRD7 C9tBesfYc6uU6Oag= X-Received: by 2002:a5d:494a:: with SMTP id r10mr18396919wrs.136.1588602584177; Mon, 04 May 2020 07:29:44 -0700 (PDT) X-Google-Smtp-Source: APiQypLMVZTX9H1M4Eo+2/PqOXrl37se+gPoorHIkLZYidnheaCnONpaBfkmPXUPmlmQOLyrvzHfvA== X-Received: by 2002:a5d:494a:: with SMTP id r10mr18396904wrs.136.1588602583998; Mon, 04 May 2020 07:29:43 -0700 (PDT) Date: Mon, 4 May 2020 10:29:41 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 12/29] checkpatch: fix acpi check with multiple file name Message-ID: <20200504142814.157589-13-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Alex =?utf-8?Q?Benn=C3=A9e?= , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Using global expected/nonexpected values causes false positives when testing multiple patches in one checkpatch run: one patch can change expected, another one non-expected. Use local variables within process() to fix that. Signed-off-by: Michael S. Tsirkin --- scripts/checkpatch.pl | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e658e6546f..c3d08aa99f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -35,8 +35,6 @@ my $summary_file =3D 0; my $root; my %debug; my $help =3D 0; -my $acpi_testexpected; -my $acpi_nontestexpected; =20 sub help { my ($exitcode) =3D @_; @@ -1261,21 +1259,22 @@ sub WARN { # According to tests/qtest/bios-tables-test.c: do not # change expected file in the same commit with adding test sub checkfilename { - my ($name) =3D @_; + my ($name, $acpi_testexpected, $acpi_nontestexpected) =3D @_; + if ($name =3D~ m#^tests/data/acpi/# and # make exception for a shell script that rebuilds the files not $name =3D~ m#^\.sh$# or $name =3D~ m#^tests/qtest/bios-tables-test-allowed-diff.h$#) { - $acpi_testexpected =3D $name; + $$acpi_testexpected =3D $name; } else { - $acpi_nontestexpected =3D $name; + $$acpi_nontestexpected =3D $name; } - if (defined $acpi_testexpected and defined $acpi_nontestexpected) { + if (defined $$acpi_testexpected and defined $$acpi_nontestexpected) { ERROR("Do not add expected files together with tests, " . "follow instructions in " . "tests/qtest/bios-tables-test.c: both " . - $acpi_testexpected . " and " . - $acpi_nontestexpected . " found\n"); + $$acpi_testexpected . " and " . + $$acpi_nontestexpected . " found\n"); } } =20 @@ -1325,6 +1324,9 @@ sub process { my %suppress_whiletrailers; my %suppress_export; =20 + my $acpi_testexpected; + my $acpi_nontestexpected; + # Pre-scan the patch sanitizing the lines. =20 sanitise_line_reset(); @@ -1454,11 +1456,11 @@ sub process { if ($line =3D~ /^diff --git.*?(\S+)$/) { $realfile =3D $1; $realfile =3D~ s@^([^/]*)/@@ if (!$file); - checkfilename($realfile); + checkfilename($realfile, \$acpi_testexpected, \$acpi_nont= estexpected); } elsif ($line =3D~ /^\+\+\+\s+(\S+)/) { $realfile =3D $1; $realfile =3D~ s@^([^/]*)/@@ if (!$file); - checkfilename($realfile); + checkfilename($realfile, \$acpi_testexpected, \$acpi_nont= estexpected); =20 $p1_prefix =3D $1; if (!$file && $tree && $p1_prefix ne '' && --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602903; cv=none; d=zohomail.com; s=zohoarc; b=NGfCSDSgmZA/yMemr8vDxAJELvQ0fUYM5CRvEPHxMjaUL1lnoprMOxYF1I4ocRA/dQaUea6Cvx697HQKYpUVALle6+Mb0GF1+JxpynPkhDAnHEZwrIT+hbo54vxHpUwR2gbQeSamSte0cXHPftW1TuMeWs93d/ERGAUrO3ZxMkg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602903; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fvBdJ5beAcx5ETaxyqLjGGsvHSXEGwdO8SCWGzPboug=; b=CrsfNGlB990K4xRpJRj3kxCGM2VU5tepX0/0YqEmybIJ3CMGmafeJXQrUzlCmWaYnditNZgnqJZnjPkHcgHiXtDojIW15qpyaW9QUEYEVLTg7Q+LhzacBLJ/nmwHBildHB5IRlz6X19d8bSUjjWseM9hIH8EsOnvHksyYv2vhlY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602903165461.50156948581207; Mon, 4 May 2020 07:35:03 -0700 (PDT) Received: from localhost ([::1]:42916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcBR-0005bf-R5 for importer@patchew.org; Mon, 04 May 2020 10:35:01 -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 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 Received: by mail-wm1-f70.google.com with SMTP id 71so3584318wmb.8 for ; Mon, 04 May 2020 07:29:47 -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) 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= X-MC-Unique: KhquzkfbMQytusml3nYqsA-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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) =3D @_; =20 - if ($name =3D~ m#^tests/data/acpi/# and - # make exception for a shell script that rebuilds the files - not $name =3D~ m#^\.sh$# or - $name =3D~ m#^tests/qtest/bios-tables-test-allowed-diff.h$#) { + # Note: shell script that rebuilds the expected files is in the sa= me + # directory as files themselves. + # Note: allowed diff list can be changed both when changing expect= ed + # files and when changing tests. + if ($name =3D~ m#^tests/data/acpi/# and not $name =3D~ m#^\.sh$#) { $$acpi_testexpected =3D $name; - } else { + } elsif ($name =3D~ m#^tests/qtest/bios-tables-test-allowed-diff.h$#) { $$acpi_nontestexpected =3D $name; } if (defined $$acpi_testexpected and defined $$acpi_nontestexpected) { --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603018; cv=none; d=zohomail.com; s=zohoarc; b=DCwIc25GS/xKoC7YyiD2gR0eoHUHV/3ez4xWwxLqEdRKHStj4OGMgHpbXnfSAid8WDyoAw7LCNSXodcbHNkyo1YVnzmpQRO4z1AxMSavqcJY2UVTteEHM3HGFvrApDeRvIO5AZDx8L1GFTnSwGKk162R2g21WPhyGrSuqm/hGj8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603018; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LtXVkBoCFIAVJ/jOrNLyyiGZyY5VnZEubRIet50fmJI=; b=hY8D3G2aQXuD8WaFr+OeeqIqAjyxmtbHQD9DdY87M6PjnUMjbCCL/l4XFRnwY8m5sBwzirT6s2t7UY/YvhMhN8PBztRPKwbEaNdUFdWVtFRqyxZwIVsUbJ08EdUxPH3AJDyH5eDJqTnbdjSSJs4GqSQ8ml5K3Ge9IWzDkZW4ynQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158860301853952.675330955831214; Mon, 4 May 2020 07:36:58 -0700 (PDT) Received: from localhost ([::1]:51616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcDJ-00011E-68 for importer@patchew.org; Mon, 04 May 2020 10:36:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6U-0005qR-MW for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:54 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28022 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-0006IW-Ae for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:54 -0400 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-186-N5J-0rNbOjaCcTBFRKdJ_w-1; Mon, 04 May 2020 10:29:51 -0400 Received: by mail-wm1-f72.google.com with SMTP id f128so4983967wmf.8 for ; Mon, 04 May 2020 07:29:50 -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 k17sm13605519wmi.10.2020.05.04.07.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602592; 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=LtXVkBoCFIAVJ/jOrNLyyiGZyY5VnZEubRIet50fmJI=; b=RTK7i3tHQ7D/eBtc2zeKK78TGdOKKAQJvm4tJ9hJhVZPP3xOcVXK3ShHXYvtBRJ9F6qnLt NfB3cYWxcHWDGiRtnKoFP40gQWR2l+DYA4uqB8rJwS4Bywt1VcpiAmcocSehnPkrbCZNXI FNKkXm4KMyizyrhdXqlbp1RcOx/b1fw= X-MC-Unique: N5J-0rNbOjaCcTBFRKdJ_w-1 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=7nWALb+pJoUtPTist7vsOnCoCaxtfGeZaRiKPqBS0NQ=; b=qq4uZUnleckhcbFDQvmWvSlTLWoMVhrTPpLHu1NkLOfUGJ6KIYErFpM39anEeMAvJZ IRhTtrrWrJdLWMJNnCtJyk1EAuDhxCBCSuZUmnigqdmXfHJpc1boArvg/dIURSeW7Dx0 R4Bz3unvS+0fdwArBEUP+F+T/I5SbFADQUeNB7hArbXd2FcNU0X2wX+HilHVhVMtRLaq uaeqbBZtc/huV7/OxlLThzl9Lh+mYral9o2CZsO2FCU905RKImewXQXgWARbb3GpPo0N rto66o7YUJMv0u6QiJQRlfwUmQlG18iPJB0H+QACvy0F/Lr/i/R76TbP1rlFAz8QndyI qDBQ== X-Gm-Message-State: AGi0PuYXeLvzg276h9o2b+ONebhYOzHi7ysfZxEhR6nG0CLdK6ZFS4WL bdAfTCO8UEDn7LY5FNrPILBVO4cOjqQaksY4qpBIsFw3ApU5G/lnUA8784zicfXKVBiM6uPwoAp wJ6/1OPzTg1niY6o= X-Received: by 2002:a7b:c306:: with SMTP id k6mr14454914wmj.40.1588602589216; Mon, 04 May 2020 07:29:49 -0700 (PDT) X-Google-Smtp-Source: APiQypLAxwLp6ehplwK9OFaGfUXobi8iQo/KNl/m+Nw8T3kdDPixK9zU7w/hdGJQvo8SBjgmr6KmCw== X-Received: by 2002:a7b:c306:: with SMTP id k6mr14454890wmj.40.1588602588907; Mon, 04 May 2020 07:29:48 -0700 (PDT) Date: Mon, 4 May 2020 10:29:46 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 14/29] acpi: DSDT without _STA Message-ID: <20200504142814.157589-15-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: Laurent Vivier , Peter Maydell , Thomas Huth , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" commit f6595976e699 ("acpi: drop pointless _STA method") replaced _STA method with simple name object. Update DSDT accordingly. Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 17 ----------------- tests/data/acpi/pc/DSDT | Bin 5131 -> 5125 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 6455 -> 6449 bytes tests/data/acpi/pc/DSDT.bridge | Bin 6990 -> 6984 bytes tests/data/acpi/pc/DSDT.cphp | Bin 5594 -> 5588 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 6784 -> 6778 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 5203 -> 5197 bytes tests/data/acpi/pc/DSDT.memhp | Bin 6490 -> 6484 bytes tests/data/acpi/pc/DSDT.numamem | Bin 5137 -> 5131 bytes tests/data/acpi/q35/DSDT | Bin 7869 -> 7863 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9193 -> 9187 bytes tests/data/acpi/q35/DSDT.bridge | Bin 7886 -> 7880 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8332 -> 8326 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9522 -> 9516 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 7944 -> 7938 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9228 -> 9222 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 8999 -> 8993 bytes tests/data/acpi/q35/DSDT.numamem | Bin 7875 -> 7869 bytes 18 files changed, 17 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 6a052c5044..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,18 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT", -"tests/data/acpi/pc/DSDT.acpihmat", -"tests/data/acpi/pc/DSDT.bridge", -"tests/data/acpi/pc/DSDT.cphp", -"tests/data/acpi/pc/DSDT.dimmpxm", -"tests/data/acpi/pc/DSDT.ipmikcs", -"tests/data/acpi/pc/DSDT.memhp", -"tests/data/acpi/pc/DSDT.numamem", -"tests/data/acpi/q35/DSDT", -"tests/data/acpi/q35/DSDT.acpihmat", -"tests/data/acpi/q35/DSDT.bridge", -"tests/data/acpi/q35/DSDT.cphp", -"tests/data/acpi/q35/DSDT.dimmpxm", -"tests/data/acpi/q35/DSDT.ipmibt", -"tests/data/acpi/q35/DSDT.memhp", -"tests/data/acpi/q35/DSDT.mmio64", -"tests/data/acpi/q35/DSDT.numamem", diff --git a/tests/data/acpi/pc/DSDT b/tests/data/acpi/pc/DSDT index c6adfe32d5ba6a5db2ca3e210766839547e122c8..ad4b2d46cc7865e8bafcca2e4e8= 88a03cc5483b5 100644 GIT binary patch delta 77 zcmeCyXw~3y33dr#6=3D7gtRNKha%gE#_H+d$by@-jolS@2DyoaX?kK+YqW{&va5XZ^y W8I?p-eEmb=3D68yqoiOm{Jj|BnUDii7e delta 83 zcmZqG=3D+@wJ33dtL7GYpu+_;gemyyX?e)3F4dvSAbCzp7Rcn?n(9>)vJ%p#oe!6A+e aOD4ZzR1#PB^$&&1@e9M`HY+hb76brx%@yYW diff --git a/tests/data/acpi/pc/DSDT.acpihmat b/tests/data/acpi/pc/DSDT.acp= ihmat index ad890e09aab12dd280c3d2465540db82ca1b430b..eff7aadfabe431c3ac2d28e0c67= 21eb6e322af66 100644 GIT binary patch delta 77 zcmdmPw9$ymCD5r@gANoJdPKbnMF9`gF_q{ amP~%bs3flL>mLf2;}?d>ZB}C97Y6{CS`~x< diff --git a/tests/data/acpi/pc/DSDT.bridge b/tests/data/acpi/pc/DSDT.bridge index f01fa3ad4ee6aed5262daef464a1ade41e06975d..92ae808e2e071e367f0b68b3553= 239bd56b4b766 100644 GIT binary patch delta 77 zcmX?ScEXIyCDz_975r@gANoJdPKbnK|NvLmVf+ XXH*hV@%0adOYjSWB{pj?sYwC=3DF2ZuN^ aESda56e#n(R+F2OGhme{Ppv`H8MV#pP# delta 83 zcmcbjeM_6mCD2ZuN^ aESda3 diff --git a/tests/data/acpi/pc/DSDT.dimmpxm b/tests/data/acpi/pc/DSDT.dimm= pxm index ad2800de672534dc87012f03e27b19671a330083..7fa09463c16c2f6b60114591785= 918b9d96b4f17 100644 GIT binary patch delta 77 zcmZoL{bj=3DC66_LECB?wN*uIggmyyX=3DZt_e)vJ%pCE-A&!&Z WGb)Lw`1*&!CHRHG5}P%cA|wDh`xM0h delta 83 zcmexm(qPKv66_MvAjQDID72BQmyyX?e)3F4dvSAbCzp7Rcn?n(9>)vJ%p#oe!6A+e aOD4ZzR1#PB^$&&1@e9M`HY+hjNB{ts#}&c=3D diff --git a/tests/data/acpi/pc/DSDT.ipmikcs b/tests/data/acpi/pc/DSDT.ipmi= kcs index 2633a8cecf017bfce01ba8377428b8c5433e0be2..469d13e1f6b873bb9cfa0b3af32= d1a3bc58e8f77 100644 GIT binary patch delta 76 zcmcbtaaM!NCDCqao0w!UPeaO$uk%oL`=3DM$T;e(6Jv?1_94|04bHoRSI8J`g Ws3fA|>mLf2;1>oz_975r@gANoJdPKbnK|NvLmVf+ XXH*hV@%0adOYjSWB{pj?8Hob`BYG4! delta 83 zcmca&bjyg#CD2ZuN^ aESdaz_975r@gANoJdPKbnK|NvLmVf+ XXH*hV@%0adOYjSWB{pj?y%Yoh3_}#G delta 83 zcmeCyn5e6JmyyX?e)3F4dvSAbCzp7Rcn?n(9>)vJ%p#oe!6A+e aOD4ZzR1#PB^$&&1@e9M`HY+i`6a)ZeKNYC} diff --git a/tests/data/acpi/q35/DSDT b/tests/data/acpi/q35/DSDT index 1f91888d7a485850cf27f152e247a90b208003dc..9fa4d5a405c2bcd9313b1389491= 7622bf156013e 100644 GIT binary patch delta 77 zcmdmMyWN({CD5r@gANoJdPKbnK|NvLmVd; XF)4|t`1*&!CHRHG5}Q{u3CREe1yK{h delta 83 zcmdmPyVsV>CD5r@gANoJdPKbnMF9`gF_q{ amQ2oPQW979^$&&1@e9M`HZNrok^ul)^%TAU diff --git a/tests/data/acpi/q35/DSDT.acpihmat b/tests/data/acpi/q35/DSDT.a= cpihmat index 3586f6368a77d1497c35a7571c9f6c460221d9ab..2d834a854ccddc17afd0bc4b4a9= e0886feff8e65 100644 GIT binary patch delta 77 zcmaFq{@9(%CD5r@gANoJdPKbnK|NvLmVd; XF)4|t`1*&!CHRHG5}Q{u*(m}5CR-F; delta 83 zcmaFt{?eVxCD2ZuN^ aESa3oq$IBH>mLf2;}?d>ZC=3DV`rw9PVffiZ- diff --git a/tests/data/acpi/q35/DSDT.bridge b/tests/data/acpi/q35/DSDT.bri= dge index eae3a2a8657e9986d8ac592958503c0b516faaef..b75122b24a41b8fd58b9e707103= 2298e0fc2284b 100644 GIT binary patch delta 77 zcmX?Sd%~8>CD5r@gANoJdPKbnK|NvLmVd; XF)4|t`1*&!CHRHG5}Q{uDa!x=3D{9qHM delta 83 zcmX?Md(M{2CD2ZuN^ aESa3oq$IBH>mLf2;}?d>ZC=3DWxECT?S1r?$I diff --git a/tests/data/acpi/q35/DSDT.cphp b/tests/data/acpi/q35/DSDT.cphp index 53d735a4de25c4d8e23eed102fcd01376168c5b3..c59c19ff46b9bb4fa3e06e9ffbc= beba308a80cd0 100644 GIT binary patch delta 77 zcmeBiY;)vt33dr-Q($0Ve7BKHfQiXVY_bfKy@-jolS@2DyoaX?kK+YqW{&va5XZ?y WOiCguzW$+b34UR)#OBpZ4`l)UY7~J0 delta 83 zcmZp3>~Z9B33dtTQD9(TtlY>Yz{KPrK3RszUfkT<$t9j6-ow*{$MFI)vj}H=3DaEK$r ZlF9i@O5*Ci{-JO=3Deqos0=3DA}#zWdT#Y6@CB! diff --git a/tests/data/acpi/q35/DSDT.dimmpxm b/tests/data/acpi/q35/DSDT.di= mmpxm index 02ccdd5f38d5b2356dcca89398c41dcf2595dfff..9edc104ee6b06dd9d909b65b83c= 99494d03a137d 100644 GIT binary patch delta 77 zcmdnwwZ@CfCD5r@gANoJdPKbnK|NvLmVd; XF)4|t`1*&!CHRHG5}Q{uwJQMt^luaX delta 83 zcmZ4EwaJUiCD027mg_+%L-dvSAbCzp7Rcn?n(9>)vJ%p#oe!6A+e aOD5+tDT%B5`iH{h_=3DRC|o0l@RD**sWt`z$K diff --git a/tests/data/acpi/q35/DSDT.ipmibt b/tests/data/acpi/q35/DSDT.ipm= ibt index 9e2d4f785c54629d233924a503cfe81199e22aa0..3910e9b767808962b46501da519= 45229359e3d1d 100644 GIT binary patch delta 76 zcmeCMYqH~V33dr#l4oFGT(OZ$fQiv{vNV%}h>5q8OFT!sho=3DjV;{|4Bj`-jZ$H_%Z VN+K%0{-JOQeqpf0=3DG9EGG61;j69)hQ delta 82 zcmZp&>#*Z;33dtLkY`|ERN2TSz{Kc1S(?c~+}zvAC7vVR!_$Sw@d7im2xok7h$F+2 Y$@xr5;_ANsp>R2VVVK-Ih~wlU WCM6LSU;j|J1ivs?V)JUIL`49;91{-! delta 83 zcmZqk=3D<(ok33dtLQDI)vJ%pCE-A&!%a Wn3P0ReEmb=3D68yqoiOs8-Y7_v&S`#q< delta 83 zcmZ4Jw%m=3D&CD5r@gANoJdPKbnMF9`gF_q{ amQ2oPQW979^$&&1@e9M`HZNtWQ2+p085J%7 diff --git a/tests/data/acpi/q35/DSDT.numamem b/tests/data/acpi/q35/DSDT.nu= mamem index 859a2e08710ba37f56c9c32b0235ff90cedb1905..498c843be1695a0fe1d31d88873= b57206d17d758 100644 GIT binary patch delta 77 zcmX?XyVsV>CD5r@gANoJdPKbnK|NvLmVd; XF)4|t`1*&!CHRHG5}Q{uNyq>I^-L3k delta 83 zcmdmMd)SuCCD2ZuN^ aESa3oq$IBH>mLf2;}?d>ZC=3DVGAp-!9XBB_| --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603100; cv=none; d=zohomail.com; s=zohoarc; b=b3Jm+zlI8ew7pdc6S929ruGtkIKt3ReqzS7YfZa39KrgZ4Se4QyPVR7/GJvu+u/3kJiyzMRGPGWbnnwCN3VbUmaQwvuLlrCYyPTrQLaOb7txOWMn+AwhnGU7ttflgOSie3WDfk44gBMZ9woCj/TXLKlkNvJWV/COkJ06vam/byY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603100; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eToXLQiELi/OqolKT7hKDbv8PBLrjpjtRA8gmXCmZKQ=; b=nfqfkOQ4rIJw8Cxwigzhcs8R1Yty1QcQgpX/aBu2JQRtp/MQz2KXfgEbEkYakPnBXCER7EGxrIOOyoxCe6EH71tlm4BJrVcsQdXdGCFMcu2abYaAavvbM4uzZdnNxBUrQut/PZoq8UHego57N1xI2Z43iWyToPs0FjDNWjNZXcU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603100903119.47825100172327; Mon, 4 May 2020 07:38:20 -0700 (PDT) Received: from localhost ([::1]:58380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcEd-0003xS-IF for importer@patchew.org; Mon, 04 May 2020 10:38:19 -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 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 Received: by mail-wr1-f72.google.com with SMTP id r11so10842992wrx.21 for ; Mon, 04 May 2020 07:29:52 -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) 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= X-MC-Unique: Dm-xTX_CPC-Gq2w4wp_P5Q-1 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-Google-Smtp-Source: APiQypI0T51o0KXqcaFSF/yiI1Gdpg6kzab/lIIn7u8MGd8prWsfQJVwydS+5TG5IbwCVV2JF4pqoQ== X-Received: by 2002:a05:6000:192:: with SMTP id p18mr12476847wrx.126.1588602591193; Mon, 04 May 2020 07:29:51 -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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Shameer Kolothum As per ACPI spec 6.3, Table 19-419 Object Conversion Rules, if the Buffer Field <=3D 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(-) 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]; =20 method =3D 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 <=3D 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 =3D aml_if(aml_lless(dsm_out_buf_size, aml_int(8))); + offset =3D 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 =3D 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 >=3D 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); } =20 --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603199; cv=none; d=zohomail.com; s=zohoarc; b=TkxbgDRUBFgQ6kOMvNJvThgaKEJTBtEQRACQ1YtL/napX6H92g+WDmxV6zDyatRIS6FxHEqckX4ZZaGunsM1Kn9nQ69SdXyjtgMRciQnHkE8SReaS8jrk6hxMLD36mMqaWQbH+VK56aIKWyc3Vc+4AvguaUsBNSB0O6pYY44JQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603199; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gqCybmu42mI41rHdytMlKKB4cPDVUzwPKcnB2uEO3VQ=; b=IqFf0dmiwX7WJwwfC9of9u19GBpZRxlNWfgExYA8qeRbkX+XBK00vTbPxLr0tYsYUhVOcQrbg1AdcT9cy+DXL5S4Apy0zAf0p/733nOtL35ZoRiOb3kOXmhnrLuj1JVoTxrgXdxddqeoFTNQF40Rh/YDnnQx8aVWP0y/HfOKGrE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603199337355.0486985835271; Mon, 4 May 2020 07:39:59 -0700 (PDT) Received: from localhost ([::1]:37450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcGD-0007M8-O7 for importer@patchew.org; Mon, 04 May 2020 10:39:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6Z-000638-K5 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:59 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:38182 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 1jVc6Y-0006Kr-8a for qemu-devel@nongnu.org; Mon, 04 May 2020 10:29:59 -0400 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-45-OqDmhQEtPram_b6_47x0uw-1; Mon, 04 May 2020 10:29:55 -0400 Received: by mail-wm1-f71.google.com with SMTP id l21so5001411wmh.2 for ; Mon, 04 May 2020 07:29:55 -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 h137sm402915wme.0.2020.05.04.07.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602597; 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=gqCybmu42mI41rHdytMlKKB4cPDVUzwPKcnB2uEO3VQ=; b=dtE175BupVtP44ozgyDkrBJuZzOpJSTG9z7k/uvm5a6B5E09ynGwtQ6Ik/xPfQWEirEHXq 2BWUHLe5EXm4cXDNrkJ0vQZWX4vYTX9AJYPbTwi1eU7qI9ozW4KN7/5JxWVYsO24KjnNop tvnAVOgHYXgE87emIAK9vpyXgaEP+TM= X-MC-Unique: OqDmhQEtPram_b6_47x0uw-1 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=hmDFwmjESqooVdgFwJ4n6T8cNfqvxRsTWu+AT5PSXmk=; b=U3n/SXmkSEUaH89F5wO8jxMiDNemvjYBb5yBo8Moj3gH5W7YOVOt6w0r0XTsrPjxgX pAXZxcWKeXnRjPouMfuwqaFpADQZq5lDVWPrMdY17K01Z41onDGWM0/dLW56FDqavwP2 PdHdVF9cJKxnvAW8LaklaK/prtwokilNOOXuIL6MjmQJ74V1v+cIkMBQo5Bek9RXW6St FSJ3hYdoQT+SJvhfSiVelc6hBhtzNpM5yvLcNV0NEmoQZXeHW0Qq5dg8vB8Rh1806uTX 0TaF8osWeXIYrxFftwmjxlgJBwJuHUECdw+RC5RFg9g7ruCwcWJEQMe4EqfVt5ZYvCrJ +h2w== X-Gm-Message-State: AGi0PuYlMp3NRuNz/UTIyvKpGUeHM+R/Gs5fNFABrCUxf2g2aYKW2vGr hvfbXogEU+PF0UEa9mlrn7JFh7U2UBBaXVN1K3zxT4MpCva8LR9pkeicSl+MnBHzQUjuSTSuLLv IAurW3gFZbVIkJfY= X-Received: by 2002:adf:e44b:: with SMTP id t11mr13050845wrm.188.1588602594109; Mon, 04 May 2020 07:29:54 -0700 (PDT) X-Google-Smtp-Source: APiQypJIqHQKDlkZkgVmlhRSRaEGzXwy3ZFaPlC4M5/dSNh9qkgfQtk3BZ8W0MIpPl+d4kMhRJHTEA== X-Received: by 2002:adf:e44b:: with SMTP id t11mr13050811wrm.188.1588602593819; Mon, 04 May 2020 07:29:53 -0700 (PDT) Date: Mon, 4 May 2020 10:29:51 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 16/29] nvdimm: Use configurable ACPI IO base and size Message-ID: <20200504142814.157589-17-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 , Xiao Guangrong , Shameer Kolothum , Eric Auger , Paolo Bonzini , Igor Mammedov , Eduardo Habkost , Kwangwoo Lee , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Kwangwoo Lee This patch makes IO base and size configurable to create NPIO AML for ACPI NFIT. Since a different architecture like AArch64 does not use port-mapped IO, a configurable IO base is required to create correct mapping of ACPI IO address and size. Signed-off-by: Kwangwoo Lee Signed-off-by: Eric Auger Signed-off-by: Shameer Kolothum Reviewed-by: Igor Mammedov Message-Id: <20200421125934.14952-3-shameerali.kolothum.thodi@huawei.com> Acked-by: Peter Maydell Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.h | 3 +++ include/hw/mem/nvdimm.h | 3 +++ hw/acpi/nvdimm.c | 32 ++++++++++++++++++++++---------- hw/i386/acpi-build.c | 6 ++++++ hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c | 2 ++ 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.h b/hw/i386/acpi-build.h index 007332e51c..74df5fc612 100644 --- a/hw/i386/acpi-build.h +++ b/hw/i386/acpi-build.h @@ -1,6 +1,9 @@ =20 #ifndef HW_I386_ACPI_BUILD_H #define HW_I386_ACPI_BUILD_H +#include "hw/acpi/acpi-defs.h" + +extern const struct AcpiGenericAddress x86_nvdimm_acpi_dsmio; =20 void acpi_setup(void); =20 diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h index 4807ca615b..a3c08955e8 100644 --- a/include/hw/mem/nvdimm.h +++ b/include/hw/mem/nvdimm.h @@ -26,6 +26,7 @@ #include "hw/mem/pc-dimm.h" #include "hw/acpi/bios-linker-loader.h" #include "qemu/uuid.h" +#include "hw/acpi/aml-build.h" =20 #define NVDIMM_DEBUG 0 #define nvdimm_debug(fmt, ...) \ @@ -147,10 +148,12 @@ struct NVDIMMState { */ int32_t persistence; char *persistence_string; + struct AcpiGenericAddress dsm_io; }; typedef struct NVDIMMState NVDIMMState; =20 void nvdimm_init_acpi_state(NVDIMMState *state, MemoryRegion *io, + struct AcpiGenericAddress dsm_io, FWCfgState *fw_cfg, Object *owner); void nvdimm_build_acpi(GArray *table_offsets, GArray *table_data, BIOSLinker *linker, NVDIMMState *state, diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index df0790719a..fa7bf8b507 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -900,11 +900,13 @@ void nvdimm_acpi_plug_cb(HotplugHandler *hotplug_dev,= DeviceState *dev) } =20 void nvdimm_init_acpi_state(NVDIMMState *state, MemoryRegion *io, + struct AcpiGenericAddress dsm_io, FWCfgState *fw_cfg, Object *owner) { + state->dsm_io =3D dsm_io; memory_region_init_io(&state->io_mr, owner, &nvdimm_dsm_ops, state, - "nvdimm-acpi-io", NVDIMM_ACPI_IO_LEN); - memory_region_add_subregion(io, NVDIMM_ACPI_IO_BASE, &state->io_mr); + "nvdimm-acpi-io", dsm_io.bit_width >> 3); + memory_region_add_subregion(io, dsm_io.address, &state->io_mr); =20 state->dsm_mem =3D g_array_new(false, true /* clear */, 1); acpi_data_push(state->dsm_mem, sizeof(NvdimmDsmIn)); @@ -933,13 +935,15 @@ void nvdimm_init_acpi_state(NVDIMMState *state, Memor= yRegion *io, =20 #define NVDIMM_QEMU_RSVD_UUID "648B9CF2-CDA1-4312-8AD9-49C4AF32BD62" =20 -static void nvdimm_build_common_dsm(Aml *dev) +static void nvdimm_build_common_dsm(Aml *dev, + NVDIMMState *nvdimm_state) { 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]; + AmlRegionSpace rs; =20 method =3D aml_method(NVDIMM_COMMON_DSM, 5, AML_SERIALIZED); uuid =3D aml_arg(0); @@ -950,9 +954,16 @@ static void nvdimm_build_common_dsm(Aml *dev) =20 aml_append(method, aml_store(aml_name(NVDIMM_ACPI_MEM_ADDR), dsm_mem)); =20 + if (nvdimm_state->dsm_io.space_id =3D=3D AML_AS_SYSTEM_IO) { + rs =3D AML_SYSTEM_IO; + } else { + rs =3D AML_SYSTEM_MEMORY; + } + /* map DSM memory and IO into ACPI namespace. */ - aml_append(method, aml_operation_region(NVDIMM_DSM_IOPORT, AML_SYSTEM_= IO, - aml_int(NVDIMM_ACPI_IO_BASE), NVDIMM_ACPI_IO_LEN)); + aml_append(method, aml_operation_region(NVDIMM_DSM_IOPORT, rs, + aml_int(nvdimm_state->dsm_io.address), + nvdimm_state->dsm_io.bit_width >> 3)); aml_append(method, aml_operation_region(NVDIMM_DSM_MEMORY, AML_SYSTEM_MEMORY, dsm_mem, sizeof(NvdimmDsmIn))); =20 @@ -967,7 +978,7 @@ static void nvdimm_build_common_dsm(Aml *dev) field =3D aml_field(NVDIMM_DSM_IOPORT, AML_DWORD_ACC, AML_NOLOCK, AML_PRESERVE); aml_append(field, aml_named_field(NVDIMM_DSM_NOTIFY, - NVDIMM_ACPI_IO_LEN * BITS_PER_BYTE)); + nvdimm_state->dsm_io.bit_width)); aml_append(method, field); =20 /* @@ -1268,7 +1279,8 @@ static void nvdimm_build_nvdimm_devices(Aml *root_dev= , uint32_t ram_slots) } =20 static void nvdimm_build_ssdt(GArray *table_offsets, GArray *table_data, - BIOSLinker *linker, GArray *dsm_dma_area, + BIOSLinker *linker, + NVDIMMState *nvdimm_state, uint32_t ram_slots) { Aml *ssdt, *sb_scope, *dev; @@ -1296,7 +1308,7 @@ static void nvdimm_build_ssdt(GArray *table_offsets, = GArray *table_data, */ aml_append(dev, aml_name_decl("_HID", aml_string("ACPI0012"))); =20 - nvdimm_build_common_dsm(dev); + nvdimm_build_common_dsm(dev, nvdimm_state); =20 /* 0 is reserved for root device. */ nvdimm_build_device_dsm(dev, 0); @@ -1315,7 +1327,7 @@ static void nvdimm_build_ssdt(GArray *table_offsets, = GArray *table_data, NVDIMM_ACPI_MEM_ADDR); =20 bios_linker_loader_alloc(linker, - NVDIMM_DSM_MEM_FILE, dsm_dma_area, + NVDIMM_DSM_MEM_FILE, nvdimm_state->dsm_mem, sizeof(NvdimmDsmIn), false /* high memory */); bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, mem_addr_offset, sizeof(uint32_t), @@ -1337,7 +1349,7 @@ void nvdimm_build_acpi(GArray *table_offsets, GArray = *table_data, return; } =20 - nvdimm_build_ssdt(table_offsets, table_data, linker, state->dsm_mem, + nvdimm_build_ssdt(table_offsets, table_data, linker, state, ram_slots); =20 device_list =3D nvdimm_get_device_list(); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 97f3c75cd9..7d880bec4a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -128,6 +128,12 @@ typedef struct FwCfgTPMConfig { =20 static bool acpi_get_mcfg(AcpiMcfgInfo *mcfg); =20 +const struct AcpiGenericAddress x86_nvdimm_acpi_dsmio =3D { + .space_id =3D AML_AS_SYSTEM_IO, + .address =3D NVDIMM_ACPI_IO_BASE, + .bit_width =3D NVDIMM_ACPI_IO_LEN << 3 +}; + static void init_common_fadt_data(MachineState *ms, Object *o, AcpiFadtData *data) { diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 22dee0e76c..b75087d71b 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -61,6 +61,7 @@ #include "migration/misc.h" #include "sysemu/numa.h" #include "hw/mem/nvdimm.h" +#include "hw/i386/acpi-build.h" =20 #define MAX_IDE_BUS 2 =20 @@ -297,6 +298,7 @@ static void pc_init1(MachineState *machine, =20 if (machine->nvdimms_state->is_enabled) { nvdimm_init_acpi_state(machine->nvdimms_state, system_io, + x86_nvdimm_acpi_dsmio, x86ms->fw_cfg, OBJECT(pcms)); } } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index d37c425e22..d2806c1b29 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -54,6 +54,7 @@ #include "qemu/error-report.h" #include "sysemu/numa.h" #include "hw/mem/nvdimm.h" +#include "hw/i386/acpi-build.h" =20 /* ICH9 AHCI has 6 ports */ #define MAX_SATA_PORTS 6 @@ -315,6 +316,7 @@ static void pc_q35_init(MachineState *machine) =20 if (machine->nvdimms_state->is_enabled) { nvdimm_init_acpi_state(machine->nvdimms_state, system_io, + x86_nvdimm_acpi_dsmio, x86ms->fw_cfg, OBJECT(pcms)); } } --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603855; cv=none; d=zohomail.com; s=zohoarc; b=S+R4XyWvrupx2hSzXssCyvfs44jbjeqhnuE6AAWNjEx6Pn6czj/L3bPlEai1mt7YM5aQU/M6uzjDIx5Q0kXWiTvva//SP4nj3h8Tzp1nyfAzVRrlbwYChRjgFVDRRswuuqrZ8n3SbeVihbfVLvARxVMe1iPNQe22gXiMT05M1yg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603855; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kyofElCtLr0NGuMPjOyHWPcjCxNtZ4I/3Dffj/xN218=; b=QqA1GWrhMlj79xJ3/Wqwl6WqNnBZWjK9Q0DMyuabyNK3SulfzYzWTE0Za07HorXsztLUhgDzbqbU+cajWyJPUtxfXJBq5Y9oXNtic55VjackldIyQHYEnOfNRKCUC28VxxrDNyN9mwC6NAOA2JbzsWdtl7jb24z8/1TxaM78jtk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603855205715.1399376325423; Mon, 4 May 2020 07:50:55 -0700 (PDT) Received: from localhost ([::1]:51936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcQn-0000M2-Fp for importer@patchew.org; Mon, 04 May 2020 10:50:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc8h-00020t-7H for qemu-devel@nongnu.org; Mon, 04 May 2020 10:32:12 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48907 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 1jVc8f-0008DD-Eb for qemu-devel@nongnu.org; Mon, 04 May 2020 10:32:10 -0400 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-244-v--rp5gjP7aGEsTflSk8yA-1; Mon, 04 May 2020 10:29:58 -0400 Received: by mail-wr1-f71.google.com with SMTP id r11so10843145wrx.21 for ; Mon, 04 May 2020 07:29:57 -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 v7sm270738wmg.3.2020.05.04.07.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602728; 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=kyofElCtLr0NGuMPjOyHWPcjCxNtZ4I/3Dffj/xN218=; b=A1VLfRidjlZ7tTB40G18t81L11nTTaft9AHyzawWXzA7QmoQCV2Y0JWebpOZrgLXz6oxBX mxNDaYR9SfmQs/KGqUn8WKTfSeTrl/mcNYc5xX5HPbN/iFJegYNkiwqTXAZrNqNhrv5gHd T01XkW7BYmleYg9JSWVtFxTVzcoUYPo= X-MC-Unique: v--rp5gjP7aGEsTflSk8yA-1 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=aaE2UTNnjw9bskNnUaoM6ia/J5Yf/idoEwzallZh50c=; b=HlVshVFaZd/9hlmZ8Z2QivKkMRXQZKcw4zrKlFNySdIHBEQWkaCBZTMmnr8lRLDwVQ m/WZLgpUwm7fW42P8vW948Re7xrgvxmoHHf/06eo0ljNV/z/auUKTsKmSYLcAhP4Suvv lx0lg3WHaQDOLw6B//DWECtj2nps1zTegbp2dNXu18WbvcHsFnSUB8ogJutj4P4Dtdhi 630Ymkd1KIV+lVb0CHVh8zoCqoVqOl/1Cdu6mCo74SZol9WaHjTHtQESeh0b3ILnDMan MJAQElaBzRu+3DkBzSVeHs6vNvcGB1jj6m1p5ChQ/KQCUuoyZkgJuSwMzToyEPNKp1VV UF9g== X-Gm-Message-State: AGi0PubqLjhQok6DcABq5YMb5RTP5s1gmHfZovPVkVx7ZG2gXWFz2Bu9 BM5sJuko9myGIYSkBejpVnDeyU3A/lD5vNjN23Jppo8Bmjtk2BfiGH4yH62sWnJaPxTsd1F/bxt boFHn9X5sjXQQ8AU= X-Received: by 2002:a5d:68c7:: with SMTP id p7mr3980267wrw.29.1588602596389; Mon, 04 May 2020 07:29:56 -0700 (PDT) X-Google-Smtp-Source: APiQypLKle9XSLgHXV6pyTwHwzBBzsE2cGWidLqcaLEW6t5ZRQIIfmS/KbS6ZtqQX3GvkUAdU4+76A== X-Received: by 2002:a5d:68c7:: with SMTP id p7mr3980238wrw.29.1588602596135; Mon, 04 May 2020 07:29:56 -0700 (PDT) Date: Mon, 4 May 2020 10:29:54 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 17/29] hw/arm/virt: Add nvdimm hot-plug infrastructure Message-ID: <20200504142814.157589-18-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 , Eric Auger , Shameer Kolothum , Shannon Zhao , qemu-arm@nongnu.org, Igor Mammedov , Kwangwoo Lee Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Kwangwoo Lee This adds support to init nvdimm acpi state and build nvdimm acpi tables. Please note nvdimm_support is not yet enabled. Signed-off-by: Kwangwoo Lee Signed-off-by: Eric Auger Signed-off-by: Shameer Kolothum Reviewed-by: Igor Mammedov Message-Id: <20200421125934.14952-4-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/arm/virt.h | 1 + hw/arm/virt-acpi-build.c | 6 ++++++ hw/arm/virt.c | 19 +++++++++++++++++++ hw/arm/Kconfig | 1 + hw/mem/Kconfig | 2 +- 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 60b2f521eb..6d67ace76e 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -79,6 +79,7 @@ enum { VIRT_SECURE_MEM, VIRT_PCDIMM_ACPI, VIRT_ACPI_GED, + VIRT_NVDIMM_ACPI, VIRT_LOWMEMMAP_LAST, }; =20 diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 81d41a3990..f22b1e6097 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -44,6 +44,7 @@ #include "hw/pci/pcie_host.h" #include "hw/pci/pci.h" #include "hw/arm/virt.h" +#include "hw/mem/nvdimm.h" #include "sysemu/numa.h" #include "sysemu/reset.h" #include "kvm_arm.h" @@ -826,6 +827,11 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildT= ables *tables) } } =20 + if (ms->nvdimms_state->is_enabled) { + nvdimm_build_acpi(table_offsets, tables_blob, tables->linker, + ms->nvdimms_state, ms->ram_slots); + } + if (its_class_name() && !vmc->no_its) { acpi_add_table(table_offsets, tables_blob); build_iort(tables_blob, tables->linker, vms); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 626822554d..87f29953c4 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -150,6 +150,7 @@ static const MemMapEntry base_memmap[] =3D { [VIRT_SMMU] =3D { 0x09050000, 0x00020000 }, [VIRT_PCDIMM_ACPI] =3D { 0x09070000, MEMORY_HOTPLUG_IO_LEN }, [VIRT_ACPI_GED] =3D { 0x09080000, ACPI_GED_EVT_SEL_LEN }, + [VIRT_NVDIMM_ACPI] =3D { 0x09090000, NVDIMM_ACPI_IO_LEN}, [VIRT_MMIO] =3D { 0x0a000000, 0x00000200 }, /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that siz= e */ [VIRT_PLATFORM_BUS] =3D { 0x0c000000, 0x02000000 }, @@ -1884,6 +1885,18 @@ static void machvirt_init(MachineState *machine) =20 create_platform_bus(vms); =20 + if (machine->nvdimms_state->is_enabled) { + const struct AcpiGenericAddress arm_virt_nvdimm_acpi_dsmio =3D { + .space_id =3D AML_AS_SYSTEM_MEMORY, + .address =3D vms->memmap[VIRT_NVDIMM_ACPI].base, + .bit_width =3D NVDIMM_ACPI_IO_LEN << 3 + }; + + nvdimm_init_acpi_state(machine->nvdimms_state, sysmem, + arm_virt_nvdimm_acpi_dsmio, + vms->fw_cfg, OBJECT(vms)); + } + vms->bootinfo.ram_size =3D machine->ram_size; vms->bootinfo.nb_cpus =3D smp_cpus; vms->bootinfo.board_id =3D -1; @@ -2095,6 +2108,8 @@ static void virt_memory_plug(HotplugHandler *hotplug_= dev, DeviceState *dev, Error **errp) { VirtMachineState *vms =3D VIRT_MACHINE(hotplug_dev); + MachineState *ms =3D MACHINE(hotplug_dev); + bool is_nvdimm =3D object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM); Error *local_err =3D NULL; =20 pc_dimm_plug(PC_DIMM(dev), MACHINE(vms), &local_err); @@ -2102,6 +2117,10 @@ static void virt_memory_plug(HotplugHandler *hotplug= _dev, goto out; } =20 + if (is_nvdimm) { + nvdimm_plug(ms->nvdimms_state); + } + hotplug_handler_plug(HOTPLUG_HANDLER(vms->acpi_dev), dev, &error_abort); =20 diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 188419dc1e..5364172537 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -25,6 +25,7 @@ config ARM_VIRT select DIMM select ACPI_MEMORY_HOTPLUG select ACPI_HW_REDUCED + select ACPI_NVDIMM =20 config CHEETAH bool diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig index 2ad052a536..c27844900d 100644 --- a/hw/mem/Kconfig +++ b/hw/mem/Kconfig @@ -8,4 +8,4 @@ config MEM_DEVICE config NVDIMM bool default y - depends on (PC || PSERIES) + depends on (PC || PSERIES || ARM_VIRT) --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603656; cv=none; d=zohomail.com; s=zohoarc; b=XrygRaKjH1kSI+LPRXg8bGfyF+6XzdRZztFsdZBrddQvfk3RkRuJfTkt0diLvqM8exuAxRQcku7XfNWyj+zXWd7H70sKJ1cL3P+2Ps0XLmqr+L+b5HPLTwDAPDD6dhgeNIaASZaFd1gyVGUyLHdLfE8zbEatHIo5fu4mxXraVvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603656; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AOdWrTDlgPPkMHeJucHbghgUuY8aAHcAGANlC4mF4bs=; b=eZFumfRwPh8iVGJhNC/ezmjTbZPSD0wNIIhkaEWt/ex3/eXpopetWAqElqKkoCvzhyMfXKKZdiWNtOaHhpOpY6x8bwwY5qC0K+T2U4OpXVzR2JXLKVt1uMcG7g3VGZcEh8yORMsEYDCqAOVLfi7bbqM6jGx2wcX0y6MD7rpSw50= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603656683454.33962849775116; Mon, 4 May 2020 07:47:36 -0700 (PDT) Received: from localhost ([::1]:37700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcNa-0002iw-7k for importer@patchew.org; Mon, 04 May 2020 10:47:35 -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 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 Received: by mail-wm1-f70.google.com with SMTP id u11so3585431wmc.7 for ; Mon, 04 May 2020 07:29:59 -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) 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= X-MC-Unique: OXYJzj6EOOSr5f1GXvIZoQ-1 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-Google-Smtp-Source: APiQypLuIEh7/IC/hxiyMfl3Y5UBTEdFqY0OIhqmJFZYRfabUp9B5YmiSAjoskGkNPsgsJ93k8MbDA== X-Received: by 2002:a1c:9a81:: with SMTP id c123mr14208656wme.115.1588602598453; 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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(-) diff --git a/include/hw/acpi/generic_event_device.h b/include/hw/acpi/gener= ic_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 =20 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[] =3D { ACPI_GED_MEM_HOTPLUG_EVT, ACPI_GED_PWR_DOWN_EVT, + ACPI_GED_NVDIMM_HOTPLUG_EVT, }; =20 /* @@ -110,6 +112,11 @@ void build_ged_aml(Aml *table, const char *name, Hotpl= ugHandler *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 *ho= tplug_dev, AcpiGedState *s =3D ACPI_GED(hotplug_dev); =20 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, Acp= iEventStatusBits ev) sel =3D ACPI_GED_MEM_HOTPLUG_EVT; } else if (ev & ACPI_POWER_DOWN_STATUS) { sel =3D ACPI_GED_PWR_DOWN_EVT; + } else if (ev & ACPI_NVDIMM_HOTPLUG_STATUS) { + sel =3D 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(VirtMachine= State *vms) event |=3D ACPI_GED_MEM_HOTPLUG_EVT; } =20 + if (ms->nvdimms_state->is_enabled) { + event |=3D ACPI_GED_NVDIMM_HOTPLUG_EVT; + } + dev =3D qdev_create(NULL, TYPE_ACPI_GED); qdev_prop_set_uint32(dev, "ged-event", event); =20 @@ -2088,19 +2092,20 @@ static void virt_memory_pre_plug(HotplugHandler *ho= tplug_dev, DeviceState *dev, Error **errp) { VirtMachineState *vms =3D VIRT_MACHINE(hotplug_dev); + const MachineState *ms =3D MACHINE(hotplug_dev); const bool is_nvdimm =3D object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM); =20 - 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; } =20 + if (is_nvdimm && !ms->nvdimms_state->is_enabled) { + error_setg(errp, "nvdimm is not enabled: add 'nvdimm=3Don' to '-M'= "); + return; + } + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); } =20 @@ -2245,6 +2250,7 @@ static void virt_machine_class_init(ObjectClass *oc, = void *data) hc->plug =3D virt_machine_device_plug_cb; hc->unplug_request =3D virt_machine_device_unplug_request_cb; mc->numa_mem_supported =3D true; + mc->nvdimm_supported =3D true; mc->auto_enable_numa_with_memhp =3D true; mc->default_ram_id =3D "mach-virt.ram"; =20 diff --git a/docs/specs/acpi_hw_reduced_hotplug.rst b/docs/specs/acpi_hw_re= duced_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 =20 **write_access:** =20 --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588602960; cv=none; d=zohomail.com; s=zohoarc; b=nxWFlgPTYEnAhhQUKj/naoPfXgHmPU3zJ7mECmayGoKQPx7OZPHU9elXo+PuUjvSK5AiGTvTwFifXI9i778eebLwRRX/I6JMqAdr3usr8GQAUxjSbEmwaOjMT9iewNkcCChUJpIFnkOU+637/aCQKqv2TukqEWhdMXwrjjw6a3U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588602960; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9JdaAj59qQX1+ssGIeuuDMOOR7pnCTri9GiJMN0eSeY=; b=Wk+glMs+yOrQ0pAPgdfEGIisujqy8EpubUijYX3AUyIClY7lAxrflhCzW83fvbViGR+a39WqFwPn6mZefYbVIBENpUxtf4vJEu49tFlMBcl0NgmS41wlfOT2+66zd72e8VSEYw91fOch7U+b4MCpEsD9X7s3F1r7jY4uauM4Z2o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588602960986682.8815137410022; Mon, 4 May 2020 07:36:00 -0700 (PDT) Received: from localhost ([::1]:47338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcCN-0007b7-KD for importer@patchew.org; Mon, 04 May 2020 10:35:59 -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 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 Received: by mail-wm1-f69.google.com with SMTP id u11so3585510wmc.7 for ; Mon, 04 May 2020 07:30:01 -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) 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= X-MC-Unique: 4C6Vm5fXMyay3WI-914uNQ-1 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-Google-Smtp-Source: APiQypK5tqxZNcqL40BxQYzitTUgOBWb8O0s5ODZW3d7j79LkLL4e8pGt6+e388DXi98XQFQue6rGg== X-Received: by 2002:adf:9564:: with SMTP id 91mr20143090wrs.246.1588602600693; 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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/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", diff --git a/tests/data/acpi/virt/NFIT.memhp b/tests/data/acpi/virt/NFIT.me= mhp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/virt/SSDT.memhp b/tests/data/acpi/virt/SSDT.me= mhp new file mode 100644 index 0000000000..e69de29bb2 --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603246; cv=none; d=zohomail.com; s=zohoarc; b=HBbYLKfCtVEskK0h8hPlmDqR9nwiI/Snwml/hlJQz7fNTsfaGcGa7EmZhOVDvOwaIu2ivYksib7HH103XPGVBlGIROKdgRnGCPb5+Gx2gTloZ2FWjZmiVkbpBHpMo0MwcqslpyPJrlEcRezJiVd44jFaBxZj/K0LX/SAWag77TA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603246; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bo79CUgFM2z6ABK0rxVoGCIfB5lUV00d4CJDYbtIRA8=; b=Edpbt6ZMqhdr68MPTmB5ZkEoBEa0zBjZP7pSofU0wDCdqvuajLp4tAeBgxz7MxnGFCRLdZpZi23hKJlw+Hqyj6uxc8yyFt7JMMouxbPx9DSEfubf6YMkX+JNoQBlW6q6taiOQiaIgfCtLDxZUh8f2/be8RGEoNo91SHvIypv0xY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15886032468021016.9978049094027; Mon, 4 May 2020 07:40:46 -0700 (PDT) Received: from localhost ([::1]:39642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcGz-0008FR-FE for importer@patchew.org; Mon, 04 May 2020 10:40:45 -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 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 Received: by mail-wr1-f72.google.com with SMTP id s11so10856757wru.6 for ; Mon, 04 May 2020 07:30:04 -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) 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= X-MC-Unique: -G4p8jyWPRqaM4Kw39wxog-1 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-Google-Smtp-Source: APiQypLim1edNF80L0cZwXOI7K/OFPfqaN9QEVcjl1bYJN0DUOPfu02dwcmY59NoQ14JKrR1XqF0Gg== X-Received: by 2002:a1c:4144:: with SMTP id o65mr15910834wma.78.1588602603265; Mon, 04 May 2020 07:30:03 -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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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(-) 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) }; =20 data.variant =3D ".memhp"; - test_acpi_one(" -cpu cortex-a57" + test_acpi_one(" -machine nvdimm=3Don" + " -cpu cortex-a57" " -m 256M,slots=3D3,maxmem=3D1G" " -object memory-backend-ram,id=3Dram0,size=3D128M" " -object memory-backend-ram,id=3Dram1,size=3D128M" " -numa node,memdev=3Dram0 -numa node,memdev=3Dram1" - " -numa dist,src=3D0,dst=3D1,val=3D21", + " -numa dist,src=3D0,dst=3D1,val=3D21" + " -object memory-backend-ram,id=3Dram2,size=3D128M" + " -object memory-backend-ram,id=3Dnvm0,size=3D128M" + " -device pc-dimm,id=3Ddimm0,memdev=3Dram2,node=3D0" + " -device nvdimm,id=3Ddimm1,memdev=3Dnvm0,node=3D1", &data); =20 free_test_data(&data); --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603353; cv=none; d=zohomail.com; s=zohoarc; b=VlixM8oST3RYarb3VvVBpU6w0y55/21VmLQwHhT8/2GV1EMJ8UQ/7kwXNtgC/g0Lknij12zYZYud7HdfvFnze7a3vnlbh32maSTCOadgj7wZU+F5HEwjbug8FBO7FjEyb4He0RjSYJL1cUbIMLMWNGKcY9i6L6cRslWdy+8rfxI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603353; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yUrmwWqL2K6iY/OhY7iuAMwbDTzHlgoQh3a4JQty25Y=; b=IrP63NIZvhpul3kVAivON3QxtIX+l+Y6Px+rCXp2dfbgGtbMMUcXMAqbt0szQSiu1h+7mMOw73zxwLkChbDbWX623EJh2D+0p+WZstyUGgLytMRl952u1Smtcb8WXneM6D0iEhRV3SnoeAdJER093Y2aYLD4sQkqrP2kb//RYZo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603353131212.76960442637926; Mon, 4 May 2020 07:42:33 -0700 (PDT) Received: from localhost ([::1]:46972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcIh-00037r-Qj for importer@patchew.org; Mon, 04 May 2020 10:42:31 -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 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 Received: by mail-wr1-f71.google.com with SMTP id e5so10810659wrs.23 for ; Mon, 04 May 2020 07:30:07 -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) 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= X-MC-Unique: u_z3vKRsNFeB-7tqaOqITA-1 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-Google-Smtp-Source: APiQypIyMOd6TZ/CIdtjqG2sV4rQizsU/tU9s92ws+OwklTeS4L+IesM7cZngxFsM4LdvNHEOY0JDw== X-Received: by 2002:adf:e704:: with SMTP id c4mr18803888wrm.181.1588602605743; 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 862c49e675..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,6 +1 @@ /* 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", diff --git a/tests/data/acpi/pc/SSDT.dimmpxm b/tests/data/acpi/pc/SSDT.dimm= pxm index 8ba0e67cb72daa81a65da4906d37a5e0f4af1fd4..ac55387d57e48adb99eb738a102= 308688a262fb8 100644 GIT binary patch delta 125 zcmZ3>dXJSWIM^lR9uortW7tG4X>Nb5nD}6)_~<4#t%(LAOunKU-FO)N7nn^=3DsUGbBa} TgA_0%`UAz6fQZcnjJAvbW$GgJ delta 76 zcmcb|x|WqIIM^j*EfWI+W57f%X>LFDnD}6)_~<5A^@#=3D|Og=3D&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.di= mmpxm index 2d5b721bcf9c398feb6d005761f898015042e8a4..98e6f0e3f3bb02dd419e36bdd1d= b9b94c728c406 100644 GIT binary patch delta 125 zcmZ3>dXJSWIM^lR9uortquWF-X>Nb5nD}6)_~<4#t%(LAOunKU-FO)N7nn^=3DsUGbBa} TgA_0%`UAz6fQZcnjJAvbUiu>C delta 76 zcmcb|x|WqIIM^j*EfWI+qr*flX>LFDnD}6)_~<5A^@#=3D|Og=3D&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.me= mhp index c527ac4739af3df3c3e042bf91c412033a2b73c3..730e95a46d2cce0af011ffc051d= 7342beb8f1328 100644 GIT binary patch delta 66 zcmexj++)J!66_MfBgMeL^l>7WG*kP$jq2jB1F=3DCg1XwVzFffCeAhF8JAJRT=3DDREfi 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.me= mhp index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..db61d6733284c90153e0e2c1d6c= 2ac25c22b1d84 100644 GIT binary patch literal 736 zcmZWnJ&4m_7=3DF{1Ynryuv=3Dve6ky!_O6-025G-+(0NlTIzAqUNmw7s^&hj$JlLfadz zo*?wXEh3U083lL2&DF`tL2x*5cM%-K?@e*=3DT;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 (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603336969639.6892875732065; Mon, 4 May 2020 07:42:16 -0700 (PDT) Received: from localhost ([::1]:46062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcIR-0002lU-ND for importer@patchew.org; Mon, 04 May 2020 10:42:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc6p-0006ca-Rr for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:15 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:26601 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 1jVc6o-0006cO-ER for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:15 -0400 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-231-ks6w_daLPAGLp26i6FpnVA-1; Mon, 04 May 2020 10:30:09 -0400 Received: by mail-wm1-f71.google.com with SMTP id d134so90287wmd.0 for ; Mon, 04 May 2020 07:30:09 -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 k133sm15176962wma.0.2020.05.04.07.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602611; 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=Dm0WQ9pqxtVALi8Njtzsdw3M2RP1aGt1m39O0TzxS68=; b=bwH1IfzKxkzninGGAyWlKBKGxRP4rpatujyXofANhSCh53e7h/JI6QNq3rYRdBsBKT2eei OpoGXk+SQndpZcJ0ofIFNNT2SF2g5yDAFQLmbniYddJu1ZFPCpCeSklvuTsfBOzxmfWJnv +3y32Hi3LjASFjjwNHwwtCZLDUBbZt0= X-MC-Unique: ks6w_daLPAGLp26i6FpnVA-1 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=vpBDMFw09qHmehha1zrdHcs0buJfEVnScVncHzFoem8=; b=Yhi94u2CT+tgXDcPFghKcyPBHF9TDVb2MGz0t66EphOXQakUXV2YGqhAW/kRKjI/wc QSuqXbp0Fkd5Fzs2DT5pRKtaE23xvcDzi6sQyGx7Rar6sjmxocW5mpg7d0soLyXVflew jm1SKi/CgRMXM1NWsw5c53akGhQ2fvwATpayx7CRWGElcaUhiEqRuXYd3wQ2lmCtOj/r NpaEeld/7Mo9AIV69iV6JwvBZNSEd2taeYV9dWt2iaPf8B10M+eyKdzZdrQ2O9GeT2IG UuvRz1POfmmoJqxi4nm1D0h21czw4SMMJ3eKpC6TkYnvDv6vw4TLqGkBszOORCYcdURB yhTQ== X-Gm-Message-State: AGi0PuYBl8l6As7BvTwwtSGVuj1oLuVeOUwL+ezeCdaOPL8yjSMZW4QZ JVKWLeGZi5hfaj8NM9kgijggTJklNhiV9ri1zjzGtHRpk8132v2NY66C926wl6GTiAmKzf1bwKL CGuxxQM2Pq66DlLo= X-Received: by 2002:a5d:4d0b:: with SMTP id z11mr9250571wrt.81.1588602608599; Mon, 04 May 2020 07:30:08 -0700 (PDT) X-Google-Smtp-Source: APiQypL3jKRxaVoh14IRd2pN9VLgTCWo8AVuQ4HtqiJN71bCsUoHWZNz7D6NjxObY9yR7XQS8lpKmQ== X-Received: by 2002:a5d:4d0b:: with SMTP id z11mr9250535wrt.81.1588602608270; Mon, 04 May 2020 07:30:08 -0700 (PDT) Date: Mon, 4 May 2020 10:30:06 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 22/29] Refactor vhost_user_set_mem_table functions Message-ID: <20200504142814.157589-23-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Peter Turschmid , Raphael Norwitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Raphael Norwitz vhost_user_set_mem_table() and vhost_user_set_mem_table_postcopy() have gotten convoluted, and have some identical code. This change moves the logic populating the VhostUserMemory struct and fds array from vhost_user_set_mem_table() and vhost_user_set_mem_table_postcopy() to a new function, vhost_user_fill_set_mem_table_msg(). No functionality is impacted. Signed-off-by: Raphael Norwitz Signed-off-by: Peter Turschmid Message-Id: <1585132506-13316-1-git-send-email-raphael.norwitz@nutanix.com> Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 143 +++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 76 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 08e7e63790..ec21e8fbe8 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -407,18 +407,79 @@ static int vhost_user_set_log_base(struct vhost_dev *= dev, uint64_t base, return 0; } =20 +static int vhost_user_fill_set_mem_table_msg(struct vhost_user *u, + struct vhost_dev *dev, + VhostUserMsg *msg, + int *fds, size_t *fd_num, + bool track_ramblocks) +{ + int i, fd; + ram_addr_t offset; + MemoryRegion *mr; + struct vhost_memory_region *reg; + + msg->hdr.request =3D VHOST_USER_SET_MEM_TABLE; + + for (i =3D 0; i < dev->mem->nregions; ++i) { + reg =3D dev->mem->regions + i; + + assert((uintptr_t)reg->userspace_addr =3D=3D reg->userspace_addr); + mr =3D memory_region_from_host((void *)(uintptr_t)reg->userspace_a= ddr, + &offset); + fd =3D memory_region_get_fd(mr); + if (fd > 0) { + if (track_ramblocks) { + assert(*fd_num < VHOST_MEMORY_MAX_NREGIONS); + trace_vhost_user_set_mem_table_withfd(*fd_num, mr->name, + reg->memory_size, + reg->guest_phys_addr, + reg->userspace_addr, + offset); + u->region_rb_offset[i] =3D offset; + u->region_rb[i] =3D mr->ram_block; + } else if (*fd_num =3D=3D VHOST_MEMORY_MAX_NREGIONS) { + error_report("Failed preparing vhost-user memory table msg= "); + return -1; + } + msg->payload.memory.regions[*fd_num].userspace_addr =3D + reg->userspace_addr; + msg->payload.memory.regions[*fd_num].memory_size =3D + reg->memory_size; + msg->payload.memory.regions[*fd_num].guest_phys_addr =3D + reg->guest_phys_addr; + msg->payload.memory.regions[*fd_num].mmap_offset =3D offset; + fds[(*fd_num)++] =3D fd; + } else if (track_ramblocks) { + u->region_rb_offset[i] =3D 0; + u->region_rb[i] =3D NULL; + } + } + + msg->payload.memory.nregions =3D *fd_num; + + if (!*fd_num) { + error_report("Failed initializing vhost-user memory map, " + "consider using -object memory-backend-file share=3Do= n"); + return -1; + } + + msg->hdr.size =3D sizeof(msg->payload.memory.nregions); + msg->hdr.size +=3D sizeof(msg->payload.memory.padding); + msg->hdr.size +=3D *fd_num * sizeof(VhostUserMemoryRegion); + + return 1; +} + static int vhost_user_set_mem_table_postcopy(struct vhost_dev *dev, struct vhost_memory *mem) { struct vhost_user *u =3D dev->opaque; int fds[VHOST_MEMORY_MAX_NREGIONS]; - int i, fd; size_t fd_num =3D 0; VhostUserMsg msg_reply; int region_i, msg_i; =20 VhostUserMsg msg =3D { - .hdr.request =3D VHOST_USER_SET_MEM_TABLE, .hdr.flags =3D VHOST_USER_VERSION, }; =20 @@ -433,48 +494,11 @@ static int vhost_user_set_mem_table_postcopy(struct v= host_dev *dev, u->region_rb_len =3D dev->mem->nregions; } =20 - for (i =3D 0; i < dev->mem->nregions; ++i) { - struct vhost_memory_region *reg =3D dev->mem->regions + i; - ram_addr_t offset; - MemoryRegion *mr; - - assert((uintptr_t)reg->userspace_addr =3D=3D reg->userspace_addr); - mr =3D memory_region_from_host((void *)(uintptr_t)reg->userspace_a= ddr, - &offset); - fd =3D memory_region_get_fd(mr); - if (fd > 0) { - assert(fd_num < VHOST_MEMORY_MAX_NREGIONS); - trace_vhost_user_set_mem_table_withfd(fd_num, mr->name, - reg->memory_size, - reg->guest_phys_addr, - reg->userspace_addr, off= set); - u->region_rb_offset[i] =3D offset; - u->region_rb[i] =3D mr->ram_block; - msg.payload.memory.regions[fd_num].userspace_addr =3D - reg->userspace_addr; - msg.payload.memory.regions[fd_num].memory_size =3D reg->memor= y_size; - msg.payload.memory.regions[fd_num].guest_phys_addr =3D - reg->guest_phys_addr; - msg.payload.memory.regions[fd_num].mmap_offset =3D offset; - fds[fd_num++] =3D fd; - } else { - u->region_rb_offset[i] =3D 0; - u->region_rb[i] =3D NULL; - } - } - - msg.payload.memory.nregions =3D fd_num; - - if (!fd_num) { - error_report("Failed initializing vhost-user memory map, " - "consider using -object memory-backend-file share=3Do= n"); + if (vhost_user_fill_set_mem_table_msg(u, dev, &msg, fds, &fd_num, + true) < 0) { return -1; } =20 - msg.hdr.size =3D sizeof(msg.payload.memory.nregions); - msg.hdr.size +=3D sizeof(msg.payload.memory.padding); - msg.hdr.size +=3D fd_num * sizeof(VhostUserMemoryRegion); - if (vhost_user_write(dev, &msg, fds, fd_num) < 0) { return -1; } @@ -545,7 +569,6 @@ static int vhost_user_set_mem_table(struct vhost_dev *d= ev, { struct vhost_user *u =3D dev->opaque; int fds[VHOST_MEMORY_MAX_NREGIONS]; - int i, fd; size_t fd_num =3D 0; bool do_postcopy =3D u->postcopy_listen && u->postcopy_fd.handler; bool reply_supported =3D virtio_has_feature(dev->protocol_features, @@ -559,7 +582,6 @@ static int vhost_user_set_mem_table(struct vhost_dev *d= ev, } =20 VhostUserMsg msg =3D { - .hdr.request =3D VHOST_USER_SET_MEM_TABLE, .hdr.flags =3D VHOST_USER_VERSION, }; =20 @@ -567,42 +589,11 @@ static int vhost_user_set_mem_table(struct vhost_dev = *dev, msg.hdr.flags |=3D VHOST_USER_NEED_REPLY_MASK; } =20 - for (i =3D 0; i < dev->mem->nregions; ++i) { - struct vhost_memory_region *reg =3D dev->mem->regions + i; - ram_addr_t offset; - MemoryRegion *mr; - - assert((uintptr_t)reg->userspace_addr =3D=3D reg->userspace_addr); - mr =3D memory_region_from_host((void *)(uintptr_t)reg->userspace_a= ddr, - &offset); - fd =3D memory_region_get_fd(mr); - if (fd > 0) { - if (fd_num =3D=3D VHOST_MEMORY_MAX_NREGIONS) { - error_report("Failed preparing vhost-user memory table msg= "); - return -1; - } - msg.payload.memory.regions[fd_num].userspace_addr =3D - reg->userspace_addr; - msg.payload.memory.regions[fd_num].memory_size =3D reg->memor= y_size; - msg.payload.memory.regions[fd_num].guest_phys_addr =3D - reg->guest_phys_addr; - msg.payload.memory.regions[fd_num].mmap_offset =3D offset; - fds[fd_num++] =3D fd; - } - } - - msg.payload.memory.nregions =3D fd_num; - - if (!fd_num) { - error_report("Failed initializing vhost-user memory map, " - "consider using -object memory-backend-file share=3Do= n"); + if (vhost_user_fill_set_mem_table_msg(u, dev, &msg, fds, &fd_num, + false) < 0) { return -1; } =20 - msg.hdr.size =3D sizeof(msg.payload.memory.nregions); - msg.hdr.size +=3D sizeof(msg.payload.memory.padding); - msg.hdr.size +=3D fd_num * sizeof(VhostUserMemoryRegion); - if (vhost_user_write(dev, &msg, fds, fd_num) < 0) { return -1; } --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603156; cv=none; d=zohomail.com; s=zohoarc; b=gz73GCA5g1lzg9EhkhlypYpG4vAP7ewhxKOQP5hvm7CTumKGM0uk2xiHB5eaDpAYT8vH/vVCB7fjMTAVy7aocM40eH+cPRUQvgAg4mtOr4AwrJGCJOMLNBgkIpMpUc+8eyzgqWi6TNdpr1uWVdMvSmVZ54sregoVVYP31R9cMMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603156; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UID8CLohk74zjOVDUEVQis/G1qp2PmqbcHjIyNMq0d4=; b=nE52Qstwn5yA7d6RySqwjWk8HwfbZ68scJhwzJ0QvjtMK2PVZ7ZMeS9VBtCKqb+jeFO0FHrQmZLVXrMg0hFQcbLO1o4EjDJc3P87fo4btkE7nNdFi47kxQwX8Erj6q+spOaVmUbxrtk5vnN78vPBftbY9LcmyGvpLZxYPLOwwdQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603156156153.80449860176407; Mon, 4 May 2020 07:39:16 -0700 (PDT) Received: from localhost ([::1]:33836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcFW-0005rw-UU for importer@patchew.org; Mon, 04 May 2020 10:39:14 -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 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 Received: by mail-wr1-f71.google.com with SMTP id s11so10857018wru.6 for ; Mon, 04 May 2020 07:30:11 -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) 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= X-MC-Unique: zP_pqI23PrC_Fz0LW8A4sg-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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/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", 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 --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603648; cv=none; d=zohomail.com; s=zohoarc; b=SdeM9wSts+RX5ycjHhet6nS64L8Di5jFTI/nzroRlB/ZmMRipcDJjfaYKaxXwCCMzDwpn7IOtbaHUYp0zfcwKHeXUswuJVefYj21kUbQUHdWQWw6GOCXzPAG7aUEsBp00PfJgF/ZtqTTEbPgRHCS7HhYMxIVwQFO1iMYWMjQueY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603648; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K14BES+WMFIbn9g8gN8psPne12nk195ussOGSNV/KSs=; b=k7qhlf0k9n5zjhT8eKQCSZClCsUsXPnhgLiXSijbdimmf9KgfX2fGuM6TQra1OlvLS1ftulvq7fMLHxBmz6q7PZFNfhhAp3tjETgsnWyoA5847/HOv85iZDpt+q++B4yMkl49eMFTWVtdt6TMxdXYjjB9wz4pBbEfLGB/ZENk74= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158860364801217.26286382792898; Mon, 4 May 2020 07:47:28 -0700 (PDT) Received: from localhost ([::1]:37138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcNS-0002UD-JH for importer@patchew.org; Mon, 04 May 2020 10:47:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc7M-0007cH-Q2 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:48 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:52501 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 1jVc7L-0007BT-42 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:48 -0400 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-386-6rNV01IwNXmtjoii3MQVgQ-1; Mon, 04 May 2020 10:30:14 -0400 Received: by mail-wr1-f69.google.com with SMTP id 30so365194wrp.22 for ; Mon, 04 May 2020 07:30:14 -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 x16sm12527456wrn.76.2020.05.04.07.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602646; 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=K14BES+WMFIbn9g8gN8psPne12nk195ussOGSNV/KSs=; b=BLmeD/hhazn0h1daFvgH7NrBVdTpq/6zYgxpYFPgY2n+wT9KDVVzXMfkU0CRg5eM3E+1D7 8FP3EaCA3iFfkXWKjw/AdA6vAEcDiID42FxEeGJ5JUTydzkFTQUEIhdfFbSjSpUA3bxE56 m/pcEmfDfqHH1m+uAI7+WM6ma3qR1Ho= X-MC-Unique: 6rNV01IwNXmtjoii3MQVgQ-1 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=SvK/mML0hz5y1ob99KnJXcmnCwrQAmI3Al2Kedz9fuQ=; b=RcLBIEabmJ1qDjSGmMSqFFeTRAk/an2Sjz/h5jvPM9bL8q1qsdvARV7XF/yRRjJLON AwdqJ2Rktl5JJdxolp93Fx9Sbl69YMhveuljNRdNm4ETrxHnn4w+zJc3XcvhqZNaTeoA 9kWFdAxLfh3V0TcU749Vu54g4vzhOKgBMMVgiHMIGQHMfEhQBqxn8L/wMzWi0VRg47aU ggKTeklZo9kH/5daLFBcVoqPJBoWdx7tHMPkYp/BQhpSxa6OQgkMxcXlCh6NXxpisFoM hNVbHbz2TW0E7EoSStnCEYgJnOHTX8Svwp4005nds78zoEFe8JEfJTDZwZuafEk9FLTl pxgw== X-Gm-Message-State: AGi0PuaX+gIJT2wmR65hB3N5JEx+QkQ/6/uwxYiWQOzUyRYHqV6fHDHR V8PtCI9LDKKTm+qePZWTe+95m+w6QgDuxXKKbOxbwYKLHmH2ZGtutfR6pETeUsp95JaXGhrUmTF tUzW8C9+OrdI9NKE= X-Received: by 2002:a1c:1b0b:: with SMTP id b11mr15741597wmb.182.1588602613290; Mon, 04 May 2020 07:30:13 -0700 (PDT) X-Google-Smtp-Source: APiQypL5/gC6OcLO6h+1lQ7Gh9SSFJ70lKElmnKKcHPTPeKmjofiV0X6uJ/caoKIyA2OF6b8tFrvRg== X-Received: by 2002:a1c:1b0b:: with SMTP id b11mr15741564wmb.182.1588602613044; Mon, 04 May 2020 07:30:13 -0700 (PDT) Date: Mon, 4 May 2020 10:30:10 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 24/29] acpi: Add Windows ACPI Emulated Device Table (WAET) Message-ID: <20200504142814.157589-25-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 , Eduardo Habkost , Liran Alon , Igor Mammedov , Elad Gabay , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Liran Alon Microsoft introduced this ACPI table to avoid Windows guests performing various workarounds for device erratas. As the virtual device emulated by VMM may not have the errata. Currently, WAET allows hypervisor to inform guest about two specific behaviors: One for RTC and the other for ACPI PM timer. Support for WAET have been introduced since Windows Vista. This ACPI table is also exposed by other common hypervisors by default, including: VMware, GCP and AWS. This patch adds WAET ACPI Table to QEMU. We set "ACPI PM timer good" bit in "Emualted Device Flags" field to indicate that the ACPI PM timer has been enhanced to not require multiple reads to obtain a reliable value. This results in improving the performance of Windows guests that use ACPI PM timer by avoiding unnecessary VMExits caused by these multiple reads. Co-developed-by: Elad Gabay Signed-off-by: Liran Alon Message-Id: <20200313145009.144820-3-liran.alon@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7d880bec4a..2e15f6848e 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2512,6 +2512,34 @@ build_dmar_q35(GArray *table_data, BIOSLinker *linke= r) build_header(linker, table_data, (void *)(table_data->data + dmar_star= t), "DMAR", table_data->len - dmar_start, 1, NULL, NULL); } + +/* + * Windows ACPI Emulated Devices Table + * (Version 1.0 - April 6, 2009) + * Spec: http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A= 97E-CE7CE0D98DC2/WAET.docx + * + * Helpful to speedup Windows guests and ignored by others. + */ +static void +build_waet(GArray *table_data, BIOSLinker *linker) +{ + int waet_start =3D table_data->len; + + /* WAET header */ + acpi_data_push(table_data, sizeof(AcpiTableHeader)); + /* + * Set "ACPI PM timer good" flag. + * + * Tells Windows guests that our ACPI PM timer is reliable in the + * sense that guest can read it only once to obtain a reliable value. + * Which avoids costly VMExits caused by guest re-reading it unnecessa= rily. + */ + build_append_int_noprefix(table_data, 1 << 1 /* ACPI PM timer good */,= 4); + + build_header(linker, table_data, (void *)(table_data->data + waet_star= t), + "WAET", table_data->len - waet_start, 1, NULL, NULL); +} + /* * IVRS table as specified in AMD IOMMU Specification v2.62, Section 5.2 * accessible here http://support.amd.com/TechDocs/48882_IOMMU.pdf @@ -2859,6 +2887,9 @@ void acpi_build(AcpiBuildTables *tables, MachineState= *machine) machine->nvdimms_state, machine->ram_slots); } =20 + acpi_add_table(table_offsets, tables_blob); + build_waet(tables_blob, tables->linker); + /* Add tables supplied by user (if any) */ for (u =3D acpi_table_first(); u; u =3D acpi_table_next(u)) { unsigned len =3D acpi_table_len(u); --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603276; cv=none; d=zohomail.com; s=zohoarc; b=Qw7f25SvXMOyHjcHG/eRvJ0lX25DAo2HdNfpnhdCV+UjrlU4gXFkZK9D5EODGDo4qGbW2iSOSl9HXmu42oF1ttQrEvIZNPPWPslGhS+QJpMH2AYs8nJFjJ5FGisp8lyoX3GMwj6Nl3+e9De/6BZoWxjcYNvHY7FdIIb3/78WHmk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603276; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2N91cBk7aeGymYBjy55YvlROyXKTbkYAlJPKLwnfG8w=; b=mYH/KaO0SqtHE2sloz/JOR49/pOf/Bg74jpQBhLtVBvCCHwFEtSsthgOnsFL/7abo3ep4m7s/ZW31zKUqVRRW/6+kM/rH7qJlo8OgpEstXwltuEBcW/Sl0dE+2HdudoY6CPY7R3WGUuAiCJSNnpyP8J5sTuIfzk/5wE1jjnkDy4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603276522864.2859954446768; Mon, 4 May 2020 07:41:16 -0700 (PDT) Received: from localhost ([::1]:42232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcHT-0001C9-6d for importer@patchew.org; Mon, 04 May 2020 10:41:15 -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 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 Received: by mail-wr1-f70.google.com with SMTP id y4so5804473wrt.4 for ; Mon, 04 May 2020 07:30: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 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) 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= X-MC-Unique: 4-HxNC7mNiiQ8hlVYDJZmg-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 Emul= ated 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/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", diff --git a/tests/data/acpi/pc/WAET b/tests/data/acpi/pc/WAET index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c2240f58dff6b2f765386b5a2e5= 06fda4800be3e 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..c2240f58dff6b2f765386b5a2e5= 06fda4800be3e 100644 GIT binary patch literal 40 mcmWG{bPds9U|?YEaPoKd2v%^42yhMuiZKGkKx`1r1jGQWX$JuS literal 0 HcmV?d00001 --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603605; cv=none; d=zohomail.com; s=zohoarc; b=QCeXwM9EQ1HbKANnmspk7DPYYbMW4mhKwDEGBjXWOCRfdP1nYkPqrbwZVGw9c+Ml24QLA45bafwaNNwH+JxQRrHFWaln35zz7ZsDbofyaxCqdOlSCyQ4Qq5BoO+gjdeYPwVajUZLKJUYLRFITsJ+DHzLbtUS/ISadKzhNGJr72g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603605; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lAfJ5/3TbHF/8WjmWYvb2QAzYmCal5x9QNrXZKyAwD8=; b=OZ4ybpNT2rOMmymv3rJbJdISt4+RBkNLTs+zZJOZe3fQ2tvn9ZtK1JyvuH+w6l/8+gu3ce1EKAL2PP+dPeJTcpgzuHERPyoN7QWFLw8egMRmQnwV2VxDajxrqTMrlFMhdJRyiEdS5sbT1KnKVZ16PD9xLhPWm2+NmXWaOJ2U18k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603605755463.7219682966431; Mon, 4 May 2020 07:46:45 -0700 (PDT) Received: from localhost ([::1]:34660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcMm-0001TS-Du for importer@patchew.org; Mon, 04 May 2020 10:46:44 -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 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 Received: by mail-wm1-f69.google.com with SMTP id h22so4991223wml.1 for ; Mon, 04 May 2020 07:30:18 -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) 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= X-MC-Unique: 5krrOh1WMzmg3LZC7fOK0g-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 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_enab= led); /* 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 *op= aque); 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 cre= ate_fdctrl, bool no_vmport) =20 i8042 =3D isa_create_simple(isa_bus, "i8042"); if (!no_vmport) { - vmport_init(isa_bus); + isa_create_simple(isa_bus, TYPE_VMPORT); vmmouse =3D isa_try_create(isa_bus, "vmmouse"); } else { vmmouse =3D NULL; --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603388; cv=none; d=zohomail.com; s=zohoarc; b=BLciCNfE/nBIibqulFHCYAs3RkWBA1q1QLS1lF4aIXJkXyWO+EXMd9VTrA3Q5N0VfGdN/bfVPhxVPgtrEfcsr6L4uI4JAKlTY1+GK779SvTbkS8JUHOgci4DXyY+ar9+n2e9vLlPtMKlnSBr3mGU3bMaejIoiBa2F/5TO4ogvvU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603388; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9taWolQYkCkuJj9pxcX5BmM/ZyUeLHeMpX/AHRl8L3g=; b=J61UbjsWLagKH+yDAP0CVXpERrduVY8cY14+oT3GIe0ldXGMUTn9GCEz5OwQDc3pTl1Qt1+JlNXB880g0YnY1I3MHZBCbG1Ihmv9/GOGDfcksv3kvQX+mbaowlCn3Fa6i4RNZuuYkwaV+IpXuFilELhZ0MS4DxZpWIJy3wkL5Ho= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603388847890.6154441804039; Mon, 4 May 2020 07:43:08 -0700 (PDT) Received: from localhost ([::1]:48918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcJH-0003we-JG for importer@patchew.org; Mon, 04 May 2020 10:43:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc70-0006wl-Ux for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:26 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48195 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 1jVc70-0006si-47 for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:26 -0400 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-152-v2L9NNQTMR6vC-2awv1MtQ-1; Mon, 04 May 2020 10:30:21 -0400 Received: by mail-wm1-f70.google.com with SMTP id h6so4982796wmi.7 for ; Mon, 04 May 2020 07:30:21 -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 x16sm12527958wrn.76.2020.05.04.07.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602625; 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=9taWolQYkCkuJj9pxcX5BmM/ZyUeLHeMpX/AHRl8L3g=; b=KKph9I5oI8Rx7Eoegt9vwz/bMRF3eWQN6gK77hewpENsii1eJmE0BcizIuk2L6khUKKSjn LxdmCBC3P9GriJ2hUEZ0ZwLSSJMTPCHgNkyrwKIL/tuJAahrEqcpoZOGDaRldS7RdJrzeD vLHxG4OiI5u3izVWlJw/q82cpo/D0rs= X-MC-Unique: v2L9NNQTMR6vC-2awv1MtQ-1 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=XOQ+yPY5ryjCd6v8gxzikDIi0OmSlMhwsIFIToytNIs=; b=KZtn5m9nqOM7oqoUP9OnLjcJs6yz/GXDfnLGF/xpAuVOU7cfSawe08qojThZJ4VObc oMA1MJ3YH4a9FavXWkPY5DkU9/8LV54FEMYBFSa/8v4VbBjpMEmjhDpdBuH2VBxhlgCD jJzNRJ5bj0Xw04yJ7s86hFz0sS3W8toikLto+B4ZE04ZctF7XVHbox5ip/NtGxTJ0Q3P JP6jQuvCzjREcc84Qrt8xe1mNyY1wHL9HPxLGvfxkvHWU/v6rKprI8hXtuuxj9HNSAH/ 8QHzb+SSqmor2TvvZ1B/iRTM0NdSc1V3ZfW3PwVZCiJTGHCBkk/tN5Rdy1EQSoaxJUcn R1rg== X-Gm-Message-State: AGi0Pua0OieNAKWPdesYSevIk6jFPt1DXfUj3IfsJAwIXr+UMxE2/07L VHgtOvEkbtS85OovCCnNKnDB1p66KxA+tBHEvMW6YBMXZhZXCXPiOTUYEIaEIgZy+7xTj0GxjHH JiRnRfIRuxTEmp90= X-Received: by 2002:a1c:98c3:: with SMTP id a186mr15045142wme.178.1588602620308; Mon, 04 May 2020 07:30:20 -0700 (PDT) X-Google-Smtp-Source: APiQypJOfwH+e8R062AIGPe8KDrUBcGvAE6MxhOSQ1L0MT5uefnz8EMnTOU1Lbh9wh592JlJpVQt5A== X-Received: by 2002:a1c:98c3:: with SMTP id a186mr15045121wme.178.1588602620114; Mon, 04 May 2020 07:30:20 -0700 (PDT) Date: Mon, 4 May 2020 10:30:17 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 27/29] hw/i386/vmport: Remove unused 'hw/input/i8042.h' include Message-ID: <20200504142814.157589-28-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 , Eduardo Habkost , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Remove unused "hw/input/i8042.h" include. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200504083342.24273-3-f4bug@amsat.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/vmport.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 1f31e27c8a..114141c6f3 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" -#include "hw/input/i8042.h" #include "sysemu/hw_accel.h" #include "qemu/log.h" #include "trace.h" --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603729; cv=none; d=zohomail.com; s=zohoarc; b=gY75maoN0I+TcP1p71q1QTA8krobmoZfLvwTQXdXPOAAuZSBJajmOyY6sHv7VV015EC4OjvJyWs3txecXrE0cCSqB3PhDIBdGIrTmu1+a9EWs/ZfkuyRol89+WGHpkiwLupGeKKaLnSw+ph1RwR7shm0UxGYP475v2RoNIlEi+U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603729; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NCBO1aLd2aLs6F2iVluN8cNPCS4OZGD2p7feJr3pvrU=; b=nujLuQZ2QUIWQMBEJfNs4orJyLtNtFLjjWInF1gyKYXkE7TAC4n/Yx3pH3071rZBpmfqNZ4HkeRlZjEzbAsz3i60lWRN9UtlE+yUlm9tP4xlrXCQruyMGbR9zGruIyU+LEcMDXviCSynXx6VM24ugMuwVs0AmZm0M1kXxTecV5o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603729887329.96431199878384; Mon, 4 May 2020 07:48:49 -0700 (PDT) Received: from localhost ([::1]:43128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcOm-0004yo-HA for importer@patchew.org; Mon, 04 May 2020 10:48:48 -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 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 Received: by mail-wr1-f70.google.com with SMTP id z8so3697870wrp.7 for ; Mon, 04 May 2020 07:30: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 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) 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= X-MC-Unique: _sACLOrHMk-rrsyc7xwwVw-1 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) 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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Move 'vmport' related declarations in a target-specific header. Signed-off-by: Philippe Mathieu-Daud=C3=A9 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=C3=A9 Poussineau + * + * Permission is hereby granted, free of charge, to any person obtaining a= copy + * of this software and associated documentation files (the "Software"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * 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 OT= HER + * 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 *op= aque); + +#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); =20 /* vmport.c */ -#define TYPE_VMPORT "vmport" -typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address); -void vmport_register(unsigned char command, VMPortReadFunc *func, void *op= aque); void vmmouse_get_data(uint32_t *data); void vmmouse_set_data(const uint32_t *data); =20 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" =20 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" =20 /* 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" =20 #define VMPORT_CMD_GETVERSION 0x0a --=20 MST From nobody Sat May 18 12:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588603508; cv=none; d=zohomail.com; s=zohoarc; b=lhC1u8A3XEg1/Gy68ioN4TEq6m7RPqwi29fVlpcYf5Iy7aXYJbvRzTof8oZ9Kh/7aV/jpwZe1vbWZhuDGzjiSNMRzOZzZS50vnz6YnOalz579WkUATejg9FSFlwXFLQjlIWY7dC/5syorWGWUlsx4fw8bIVkOMu00XNm2ifhn0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588603508; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L2IEAQ+0EQH/fG7yIDUY2FKAPmMX0mmGOTISpiAaTt4=; b=GpCzccvZSjmzvlCpNE/opjPkcHQ3XHXzecocG05hD8ULjf0T4X1wFYAK2hq0ndegUyo4D2A+JYkrW2jW8HaT7Z6PJn5DGN5UIeNj7DCWLZrfU7D6R7OaJF/velvSiZnr/wRC6Nk5BKdPZ4bhRnvYOD+CFXnaAOSLu7obAbqwIUg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588603508024550.4060533698854; Mon, 4 May 2020 07:45:08 -0700 (PDT) Received: from localhost ([::1]:56796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcLC-0007E3-II for importer@patchew.org; Mon, 04 May 2020 10:45:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVc76-000782-NV for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:32 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:42516 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 1jVc75-0006tb-KF for qemu-devel@nongnu.org; Mon, 04 May 2020 10:30:32 -0400 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-505-mRp4laPVOMuBC-OXVdpCXA-1; Mon, 04 May 2020 10:30:27 -0400 Received: by mail-wr1-f71.google.com with SMTP id y4so5804854wrt.4 for ; Mon, 04 May 2020 07:30:26 -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 q17sm13422759wmj.45.2020.05.04.07.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588602630; 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=L2IEAQ+0EQH/fG7yIDUY2FKAPmMX0mmGOTISpiAaTt4=; b=dWgnCDlhVly8YuRhod17Qy9k6swlr4Pb6F2AJo2LfgC0ld/lD0nFUvhG2Jq2Z0pHSVAaed 9qHjOJahisuN0OSHI5jC8C5gb9GvkVUDMbMNtvya/0G+i9NfTcRtyC9YrnBNHnzOC/e/h+ HZVFVpXp8gq2J01T+jl/YJEEOOC4GUY= X-MC-Unique: mRp4laPVOMuBC-OXVdpCXA-1 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=iRZZD2N2OQSu+hWDfRiZjbT+riutHWRlj7teaB4WBBY=; b=hgcyPfIdDVfSdJpqVuBOpLbssRCGYyCESv6EwtSYngkIFDzTBhZFoJNcFuyK/d67SS EeZWjKAK0qPzDLPAyP8NDLgyyz4N3rYvSb1zBBDeSgHadoecrhsgvYiYQEhoN4bHKw6Y 6jSu4tPqKqK8+MsSINcqGeDoUeszO+HcAyqyg/CP0bNLjhCiXzSN5z0HswYyDuqTQpgk 59any2lfnanTIQ6RRhcU4y4sLkXbAYk3tD2ElRRcvASc2fZsPpGn3nXxjgV8PaVICF/w vTFGbl1tjmjU5mxMQRXPOvBMkdyUX3YXxkIA8mn7v+vLhr3bFXUVeLRXR/bII0joENS1 cq8Q== X-Gm-Message-State: AGi0PuZOvkdvVjC8QRF0OoFerHAsjYtCNsfg7/VezOIycOd5HuX828oQ jDYWs3qHhVHudMNdhRq7ek4imWfRWb6zK2rC3vi1FOuAfGwDDE6Bb3XpCsUWdVCFUbdZDdQGNGZ V9+tYlsjjF7IHtGk= X-Received: by 2002:adf:dfcf:: with SMTP id q15mr5633238wrn.137.1588602625708; Mon, 04 May 2020 07:30:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKjJ/b1Q+SZbPlR95AFFlbRwkHssNVaYtt23eKWoX73RyqQVc/dJEkkQxmn2V+hTwQJZ4wbaQ== X-Received: by 2002:adf:dfcf:: with SMTP id q15mr5633195wrn.137.1588602625294; Mon, 04 May 2020 07:30:25 -0700 (PDT) Date: Mon, 4 May 2020 10:30:23 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 29/29] hw/i386: Make vmmouse helpers static Message-ID: <20200504142814.157589-30-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-Transfer-Encoding: quoted-printable Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 The vmmouse helpers are only used in hw/i386/vmmouse.c, make them static. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200504083342.24273-5-f4bug@amsat.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 4 ---- hw/i386/vmmouse.c | 22 +++++++++++++++++++++- hw/i386/vmport.c | 23 +---------------------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index de49a57506..05e19455bb 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -129,10 +129,6 @@ typedef struct PCMachineClass { =20 GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled); =20 -/* vmport.c */ -void vmmouse_get_data(uint32_t *data); -void vmmouse_set_data(const uint32_t *data); - /* pc.c */ extern int fd_bootchk; =20 diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index 78b36f6f5d..b3aef41327 100644 --- a/hw/i386/vmmouse.c +++ b/hw/i386/vmmouse.c @@ -25,11 +25,11 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "ui/console.h" -#include "hw/i386/pc.h" #include "hw/input/i8042.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "vmport.h" +#include "cpu.h" =20 /* debug only vmmouse */ //#define DEBUG_VMMOUSE @@ -71,6 +71,26 @@ typedef struct VMMouseState ISAKBDState *i8042; } VMMouseState; =20 +static void vmmouse_get_data(uint32_t *data) +{ + X86CPU *cpu =3D X86_CPU(current_cpu); + CPUX86State *env =3D &cpu->env; + + data[0] =3D env->regs[R_EAX]; data[1] =3D env->regs[R_EBX]; + data[2] =3D env->regs[R_ECX]; data[3] =3D env->regs[R_EDX]; + data[4] =3D env->regs[R_ESI]; data[5] =3D env->regs[R_EDI]; +} + +static void vmmouse_set_data(const uint32_t *data) +{ + X86CPU *cpu =3D X86_CPU(current_cpu); + CPUX86State *env =3D &cpu->env; + + env->regs[R_EAX] =3D data[0]; env->regs[R_EBX] =3D data[1]; + env->regs[R_ECX] =3D data[2]; env->regs[R_EDX] =3D data[3]; + env->regs[R_ESI] =3D data[4]; env->regs[R_EDI] =3D data[5]; +} + static uint32_t vmmouse_get_status(VMMouseState *s) { DPRINTF("vmmouse_get_status()\n"); diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 00d47e0c4c..1aaaab691a 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -23,10 +23,10 @@ */ #include "qemu/osdep.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" #include "sysemu/hw_accel.h" #include "qemu/log.h" #include "vmport.h" +#include "cpu.h" #include "trace.h" =20 #define VMPORT_CMD_GETVERSION 0x0a @@ -109,27 +109,6 @@ static uint32_t vmport_cmd_ram_size(void *opaque, uint= 32_t addr) return ram_size; } =20 -/* vmmouse helpers */ -void vmmouse_get_data(uint32_t *data) -{ - X86CPU *cpu =3D X86_CPU(current_cpu); - CPUX86State *env =3D &cpu->env; - - data[0] =3D env->regs[R_EAX]; data[1] =3D env->regs[R_EBX]; - data[2] =3D env->regs[R_ECX]; data[3] =3D env->regs[R_EDX]; - data[4] =3D env->regs[R_ESI]; data[5] =3D env->regs[R_EDI]; -} - -void vmmouse_set_data(const uint32_t *data) -{ - X86CPU *cpu =3D X86_CPU(current_cpu); - CPUX86State *env =3D &cpu->env; - - env->regs[R_EAX] =3D data[0]; env->regs[R_EBX] =3D data[1]; - env->regs[R_ECX] =3D data[2]; env->regs[R_EDX] =3D data[3]; - env->regs[R_ESI] =3D data[4]; env->regs[R_EDI] =3D data[5]; -} - static const MemoryRegionOps vmport_ops =3D { .read =3D vmport_ioport_read, .write =3D vmport_ioport_write, --=20 MST