From nobody Fri May 3 14:15:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539926709776963.8507778875043; Thu, 18 Oct 2018 22:25:09 -0700 (PDT) Received: from localhost ([::1]:47064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNHY-0007YV-2B for importer@patchew.org; Fri, 19 Oct 2018 01:25:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNDE-0003lQ-NL for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDNDD-0000FT-GD for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:40 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:36527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDNDD-0008Qq-4L for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:39 -0400 Received: by mail-pl1-x642.google.com with SMTP id y11-v6so15348814plt.3 for ; Thu, 18 Oct 2018 22:20:27 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id p1-v6sm25075191pff.128.2018.10.18.22.20.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 22:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C6GC4FegF/DeRED9Thh44LjHYPTKDnlveYDPw4cG/cE=; b=ck/dIEY8icGaviaEJSmtecMP7V+4bmzsPsW51ifVarWffhbY5+QsLaG2jMS8G0jhf8 Gih4lPCUquHYxBr68Um5wC5P221fEXDf4JJkYTO6B6ykIEwgvetsENJZVqcRnEtDVk1H nryN1hcJf3J7w18R8/8IAytasskeVyb/ds+5HM4xJis4LEijUFWnjXil3dyQKUJJEnSc 9Jy8Gu+eldK6Bt+QJ9AFoTH5ODDiGEwmIUJll4atEnT7EI2H2voZ1m8FdlMa3DIEi+Rn KHUNhfk5w1yUvCL/Du/bHuOkGwnwKzMpgyj8yEyseTcq6Xq+AEqY6JcP07KUpcRHCHsa vvcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=C6GC4FegF/DeRED9Thh44LjHYPTKDnlveYDPw4cG/cE=; b=q0e77wpVVmYAGuiRDekzbMa8faL9iMY1UB9POwGra4Z7K5NdctNA1PYQzkJ2VBT4oT FDqL2biSsEgwGgLYcZ+zGt7LnWZF/Vkzm9yAmkxnx04Tg/A5FtLX1mMOPvo/uXw++lxh w6uexoXcFMaf0NgWpX0XldtLveNRH+ATKdpOY4Vrxcsl74Bd7x/CdrR4Jr+Sfk8kumx4 AIqG23OooQxZ+cw8iXlfksKWs972AtI1yR8lZa+0ckBWC4AT6EZWn6aslWu8O2aUcWV8 8q9Rr5RiuXw99W+NcsvAkgbe0g6dpydwhkHsU+0jahyLvFJH0xf4/OyVTc6C3PXwnkwI wBew== X-Gm-Message-State: ABuFfoiP2trNel9EQWz08T9MKfDcJ8xADD3aPQB1ompPYzC9sSV3w44p ky4zc9BfXnxBnb/1KRX7Z3s= X-Google-Smtp-Source: ACcGV61SR5iIl464aZL5Uke02yU/vnrZyiKW4Hvhx6fSqpxsCwxDn+vrZ7zJkcWvbxZ2knxLGf1hbA== X-Received: by 2002:a17:902:9896:: with SMTP id s22-v6mr32103895plp.113.1539926426690; Thu, 18 Oct 2018 22:20:26 -0700 (PDT) From: Li Qiang To: alex.williamson@redhat.com Date: Thu, 18 Oct 2018 22:20:06 -0700 Message-Id: <1539926412-21831-2-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> References: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH 1/7] vfio-pci: make "vfio-pci-nohotplug" as MACRO X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , philmd@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 8b73582..1f05b57 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -40,6 +40,8 @@ #define TYPE_VFIO_PCI "vfio-pci" #define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI) =20 +#define TYPE_VFIO_PCI_NOHOTPLUG "vfio-pci-nohotplug" + static void vfio_disable_interrupts(VFIOPCIDevice *vdev); static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled); =20 @@ -3277,8 +3279,8 @@ static void vfio_pci_nohotplug_dev_class_init(ObjectC= lass *klass, void *data) } =20 static const TypeInfo vfio_pci_nohotplug_dev_info =3D { - .name =3D "vfio-pci-nohotplug", - .parent =3D "vfio-pci", + .name =3D TYPE_VFIO_PCI_NOHOTPLUG, + .parent =3D TYPE_VFIO_PCI, .instance_size =3D sizeof(VFIOPCIDevice), .class_init =3D vfio_pci_nohotplug_dev_class_init, }; --=20 1.8.3.1 From nobody Fri May 3 14:15:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539926572109473.9970075560568; Thu, 18 Oct 2018 22:22:52 -0700 (PDT) Received: from localhost ([::1]:47051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNFB-0004tQ-Jp for importer@patchew.org; Fri, 19 Oct 2018 01:22:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNDD-0003kn-Sv for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDNDC-0000Cd-Qz for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:39 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:37117) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDNDB-0008SP-7Y for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:38 -0400 Received: by mail-pf1-x441.google.com with SMTP id j23-v6so15952801pfi.4 for ; Thu, 18 Oct 2018 22:20:30 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id p1-v6sm25075191pff.128.2018.10.18.22.20.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 22:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=v8nqSrxq6p2/soPpQJtI3t+myRc39om4RGG5eDPB1IA=; b=I7au/dfpADNCGr1Uxnl//uAUtbG4rElCTMrlcVeHaXGEsitfiEKvloiJBXAd3QHSQ6 rOZCa9Ik1xz/vY63UbS3cOrWtXB9SlaMuPIkm+RM+Z2YnIt8dDbUWwhT+uyXU8PqZB2O IPByiil3/UJ49tKqX9C1IJCV3ZNLFKRThpbSffSJlsO1Th33XCJiGaMzg/4NdibcrpMA VxLw2eiDTdw6jwQ06rPoCfm0mMzUU9TI9nRpoCAI6rwMjIn92fmdlw6p5qu5/m6XijLj 7a448hYfGQzQUX3RmobJAx1OXrZmubFdLbL4pW+vtBWWNUlEA/Ag+rNMO1g4lorZ5kc+ ILLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=v8nqSrxq6p2/soPpQJtI3t+myRc39om4RGG5eDPB1IA=; b=ZH2Ct0JuXc0hw5BHW9XyynZF3bDMbUqNjcAMgK9HFPWnSMnW9huOJMz/+atD5zOK42 Lz3dIhM2gsVyNcaQQuFxPVPjFT5qivo8ghMlljZWGhmoSrrgoh62MQKjR/Kmd+xeOjW6 EBm7LrzqyU+DGU3l1saYh+PubKZqp8eHVmKGwEdr1jsPrsLSmX1hqp+Mtn4XaNuktRAp YYju4Sq1XvuiMddgG/z/mnG42eZGkW7MeHwfhnXdU2KrF1g8kDXvf4TZDXJ/5xOuXzk9 yG/RDgjwvzRb0YrdJhwKP1Hag22mTHX8IcE0/2qgvATNL8b+rCouhBtpBduDl6lVIE9s K3ig== X-Gm-Message-State: ABuFfoidwpXLkhFfSTtygizhzvwEQlAqcDK400Fh/kzPnrGFQsyGYk90 ZBWkLSn7c5LlwserfkA+SzI= X-Google-Smtp-Source: ACcGV63ImtsZOG0TByV9b2Olrt7vkUF54l62IJ8u7Ht3/im/Gdai5yO1XKlGCEGRRvNRmx3y6zZZeg== X-Received: by 2002:a62:76d8:: with SMTP id r207-v6mr33545117pfc.216.1539926429886; Thu, 18 Oct 2018 22:20:29 -0700 (PDT) From: Li Qiang To: alex.williamson@redhat.com Date: Thu, 18 Oct 2018 22:20:07 -0700 Message-Id: <1539926412-21831-3-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> References: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH 2/7] vfio: ap-device: make it more QOMConventional X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , philmd@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" As the documentation says "use TYPE_FOO constants" This also changes the parent of ap-device's MACRO. Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/s390x/ap-device.c | 2 +- hw/vfio/ap.c | 12 ++++++------ include/hw/s390x/ap-device.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/s390x/ap-device.c b/hw/s390x/ap-device.c index f5ac8db..64a5f11 100644 --- a/hw/s390x/ap-device.c +++ b/hw/s390x/ap-device.c @@ -22,7 +22,7 @@ static void ap_class_init(ObjectClass *klass, void *data) } =20 static const TypeInfo ap_device_info =3D { - .name =3D AP_DEVICE_TYPE, + .name =3D TYPE_AP_DEVICE, .parent =3D TYPE_DEVICE, .instance_size =3D sizeof(APDevice), .class_size =3D sizeof(DeviceClass), diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 3962bb7..b332395 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -28,7 +28,7 @@ #include "hw/s390x/ap-bridge.h" #include "exec/address-spaces.h" =20 -#define VFIO_AP_DEVICE_TYPE "vfio-ap" +#define TYPE_VFIO_AP_DEVICE "vfio-ap" =20 typedef struct VFIOAPDevice { APDevice apdev; @@ -36,7 +36,7 @@ typedef struct VFIOAPDevice { } VFIOAPDevice; =20 #define VFIO_AP_DEVICE(obj) \ - OBJECT_CHECK(VFIOAPDevice, (obj), VFIO_AP_DEVICE_TYPE) + OBJECT_CHECK(VFIOAPDevice, (obj), TYPE_VFIO_AP_DEVICE) =20 static void vfio_ap_compute_needs_reset(VFIODevice *vdev) { @@ -69,7 +69,7 @@ static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev,= Error **errp) =20 if (!group_path) { error_setg(errp, "%s: no iommu_group found for %s: %s", - VFIO_AP_DEVICE_TYPE, vapdev->vdev.sysfsdev, gerror->mes= sage); + TYPE_VFIO_AP_DEVICE, vapdev->vdev.sysfsdev, gerror->mes= sage); return NULL; } =20 @@ -147,7 +147,7 @@ static void vfio_ap_reset(DeviceState *dev) } =20 static const VMStateDescription vfio_ap_vmstate =3D { - .name =3D VFIO_AP_DEVICE_TYPE, + .name =3D TYPE_VFIO_AP_DEVICE, .unmigratable =3D 1, }; =20 @@ -167,8 +167,8 @@ static void vfio_ap_class_init(ObjectClass *klass, void= *data) } =20 static const TypeInfo vfio_ap_info =3D { - .name =3D VFIO_AP_DEVICE_TYPE, - .parent =3D AP_DEVICE_TYPE, + .name =3D TYPE_VFIO_AP_DEVICE, + .parent =3D TYPE_AP_DEVICE, .instance_size =3D sizeof(VFIOAPDevice), .class_init =3D vfio_ap_class_init, }; diff --git a/include/hw/s390x/ap-device.h b/include/hw/s390x/ap-device.h index 765e908..d7eced4 100644 --- a/include/hw/s390x/ap-device.h +++ b/include/hw/s390x/ap-device.h @@ -10,13 +10,13 @@ #ifndef HW_S390X_AP_DEVICE_H #define HW_S390X_AP_DEVICE_H =20 -#define AP_DEVICE_TYPE "ap-device" +#define TYPE_AP_DEVICE "ap-device" =20 typedef struct APDevice { DeviceState parent_obj; } APDevice; =20 #define AP_DEVICE(obj) \ - OBJECT_CHECK(APDevice, (obj), AP_DEVICE_TYPE) + OBJECT_CHECK(APDevice, (obj), TYPE_AP_DEVICE) =20 #endif /* HW_S390X_AP_DEVICE_H */ --=20 1.8.3.1 From nobody Fri May 3 14:15:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539926571510866.4330219460307; Thu, 18 Oct 2018 22:22:51 -0700 (PDT) Received: from localhost ([::1]:47052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNFF-0004vo-4z for importer@patchew.org; Fri, 19 Oct 2018 01:22:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNDE-0003lZ-TK for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDNDD-0000Fw-PE for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:40 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:37032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDNDD-0008WP-DD for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:39 -0400 Received: by mail-pl1-x643.google.com with SMTP id bh10-v6so1967509plb.4 for ; Thu, 18 Oct 2018 22:20:33 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id p1-v6sm25075191pff.128.2018.10.18.22.20.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 22:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xz2dLbRaxiMdxNLdrHB1BhxE8uIIvIpCIjvgHz6/NhQ=; b=kOJPHazNfwA96GNUYP7hqWsoPsk4cvlUkuisZ+qZVxe4TXHYWXTQCjhS7TGRWDL7RF kIOf8wjX+tY/MzvdqKc3retGRqQfVAiMqJstqdXz/A6TLPQQbQIu3ixfcGUxLssAsa4M IKlnXzXWldzRcs3MzBDb/qexDk+KkqPrZ1bpAP6ySwp1SQdGPMCfjG9opOEUKX0cOdpk y+iMUalPa8q0RWsgo37oS1kPuBYNSTxf+hQF7vf1S7RIaqB8anaS07/jhBwEmbMlUKrA VW2QxiumgaC7sXzuAf2/iMcg9iwOz9Cku4GQBJEJeMXjkOynxAkz3/bXgGbp4VnN30iD K/cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Xz2dLbRaxiMdxNLdrHB1BhxE8uIIvIpCIjvgHz6/NhQ=; b=nQIoX1rR26Magyo2/E/Cq+KQ8CbzIxol9IgryaNXN6DshrzIhSdPUUXr696XKXiioM FhqWySuf5Gexz6C2SDsnbSqrTw0usGnrJSKFA7sYA9uqpsF0afD+WLFICZYD+VjuZuje sex+R7DmunL7vIOhq1A/2W13TOlvORdvCMFUWRSgrZc9lubfl1/BS9hLbokyEpoMWsS9 q3Xy1gox2diuH0OxIVkdT/Q9ptiF2VNdb/oH9v+FnjLcWCEK1/3TWdC12yNWv3RZtxdR MGTBhpSPuNh6HDiJjUmHSW88BBnq5ZIyKqJuXx3OhTcNfn8St9jOL2SmT7yMVcJZ4p05 zhBQ== X-Gm-Message-State: ABuFfohK7TCXG7fLc0W6Rq3V1YvdiNgkCPps/S2UXq4MIr5r8v3J2UKa NohYgzvhmoZOHBa+nJdKBLhlRywi X-Google-Smtp-Source: ACcGV61UQvTjQPy17j/tGhDsUD4fGN3rh/K02jJePW4A4NBYdUq7uWblIoYXGgCZDGbKiBn+BQtl1A== X-Received: by 2002:a17:902:59d2:: with SMTP id d18-v6mr697542plj.116.1539926432379; Thu, 18 Oct 2018 22:20:32 -0700 (PDT) From: Li Qiang To: alex.williamson@redhat.com Date: Thu, 18 Oct 2018 22:20:08 -0700 Message-Id: <1539926412-21831-4-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> References: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 Subject: [Qemu-devel] [PATCH 3/7] vfio: drop TYPE_FOO MACRO in VMStateDescription X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , philmd@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" As the vmstate structure names aren't related with the QOM type names. Per Peter's mail: -->https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02175.html Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/amd-xgbe.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/calxeda-xgmac.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/platform.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/vfio/amd-xgbe.c b/hw/vfio/amd-xgbe.c index ee64a3b..1b06c0f 100644 --- a/hw/vfio/amd-xgbe.c +++ b/hw/vfio/amd-xgbe.c @@ -26,7 +26,7 @@ static void amd_xgbe_realize(DeviceState *dev, Error **er= rp) } =20 static const VMStateDescription vfio_platform_amd_xgbe_vmstate =3D { - .name =3D TYPE_VFIO_AMD_XGBE, + .name =3D "vfio-amd-xgbe", .unmigratable =3D 1, }; =20 diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index b332395..35b01b3 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -147,7 +147,7 @@ static void vfio_ap_reset(DeviceState *dev) } =20 static const VMStateDescription vfio_ap_vmstate =3D { - .name =3D TYPE_VFIO_AP_DEVICE, + .name =3D "vfio-ap", .unmigratable =3D 1, }; =20 diff --git a/hw/vfio/calxeda-xgmac.c b/hw/vfio/calxeda-xgmac.c index e7767c4..6cc608b 100644 --- a/hw/vfio/calxeda-xgmac.c +++ b/hw/vfio/calxeda-xgmac.c @@ -26,7 +26,7 @@ static void calxeda_xgmac_realize(DeviceState *dev, Error= **errp) } =20 static const VMStateDescription vfio_platform_calxeda_xgmac_vmstate =3D { - .name =3D TYPE_VFIO_CALXEDA_XGMAC, + .name =3D "vfio-calxeda-xgmac", .unmigratable =3D 1, }; =20 diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 9246729..4786d46 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -466,7 +466,7 @@ static Property vfio_ccw_properties[] =3D { }; =20 static const VMStateDescription vfio_ccw_vmstate =3D { - .name =3D TYPE_VFIO_CCW, + .name =3D "vfio-ccw", .unmigratable =3D 1, }; =20 diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 64c1af6..ba03dcd 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -697,7 +697,7 @@ out: } =20 static const VMStateDescription vfio_platform_vmstate =3D { - .name =3D TYPE_VFIO_PLATFORM, + .name =3D "vfio-platform", .unmigratable =3D 1, }; =20 --=20 1.8.3.1 From nobody Fri May 3 14:15:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539926709840764.6406286479735; Thu, 18 Oct 2018 22:25:09 -0700 (PDT) Received: from localhost ([::1]:47063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNHU-0007Sc-70 for importer@patchew.org; Fri, 19 Oct 2018 01:25:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNDI-0003p0-Qp for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDNDD-0000Do-1V for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:44 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:39798) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDNDC-00008u-Jo for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:38 -0400 Received: by mail-pf1-x444.google.com with SMTP id c25-v6so15957053pfe.6 for ; Thu, 18 Oct 2018 22:20:36 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id p1-v6sm25075191pff.128.2018.10.18.22.20.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 22:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IdpPtMN+1tvjhH8+MjtAOaOD7Ixl5KgLuxsYPNyaDPQ=; b=iR6/sM8q7ZVOhdLzGgIxiSO9M/d39I0Sj2P1hnWTBdMKaudQmeSGXKKe1CHwmMPMi9 unutToCY5vMPa9DGv5MZ5it5t3R91LmjUVvEu3KI0lnYTLNY4HjQuZJjumegrKD8TsQa gCXijs34nHgXB49ZpaUSWmSPAwzVSnwKYSVDjKqM/pfrTr13SMPXa0wDBt3vb2/2EvhU 7ISJr4etvP3aA7arVdHadUcUdufmwMmffBmyWFnLhDbrXyaB95tXBcrvDuaSdpqlOpfv CqbyQD5V35VHGNfmUK4iMkfv9lgFsZf/dAyI+oGBeNKfEO3WRpLjR7qTkdVnR2iGyNqz 7Jtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IdpPtMN+1tvjhH8+MjtAOaOD7Ixl5KgLuxsYPNyaDPQ=; b=nOVM1tUxFtuZ8h/CVJWY2rttrK97tIa98XlK8arku3Z7YBDyUJUsuQzGUQBrqPXgb8 8f0LjkXSzvNNP1SoKSiwN6DROb0z9QDW4+jqKMNgQvdx8bKc0PamjyUhvDdl4X7D5rBv 781pNKRDpg67zeJDEHupU3xNuz4X3Ba5071PIvAWrx1RpMhvy6P0slj32pfvRGtIs1Wu 3gcB3p8lM2ws43uY9W/kNMaGXxDRVDbjNeZbO7eHEIHtPyss4dFNPlJiSx9qPZGUS22j yNpEpMfxCLwHSWbC9We/or9PMC/lDk6LO5ihbEfc7RUCzQapLGYN71A60pS6xPEQ2nbk 0OsQ== X-Gm-Message-State: ABuFfoiIliHknyEqTxQw1lPDdsyo+IB9U/8QEAclkifQ9jO6PXnxzFV2 Hl2QRKjsyEWfYB+nq+xunak= X-Google-Smtp-Source: ACcGV60svSlE1RPpRIi5ef44Ck+qbuSLbB7pCDTgdOG4XmQKZQpr3yHsAeuBye3JitnC5cS45xWJKQ== X-Received: by 2002:a62:37c1:: with SMTP id e184-v6mr33752778pfa.112.1539926435303; Thu, 18 Oct 2018 22:20:35 -0700 (PDT) From: Li Qiang To: alex.williamson@redhat.com Date: Thu, 18 Oct 2018 22:20:09 -0700 Message-Id: <1539926412-21831-5-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> References: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [PATCH 4/7] vfio: paltform: fix a typo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , philmd@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Li Qiang Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index ba03dcd..5992fe7 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -72,7 +72,7 @@ static VFIOINTp *vfio_init_intp(VFIODevice *vbasedev, g_free(intp->interrupt); g_free(intp); error_setg_errno(errp, -ret, - "failed to initialize trigger eventd notifier"); + "failed to initialize trigger eventfd notifier"); return NULL; } if (vfio_irq_is_automasked(intp)) { @@ -84,7 +84,7 @@ static VFIOINTp *vfio_init_intp(VFIODevice *vbasedev, g_free(intp->unmask); g_free(intp); error_setg_errno(errp, -ret, - "failed to initialize resample eventd notifie= r"); + "failed to initialize resample eventfd notifi= er"); return NULL; } } --=20 1.8.3.1 From nobody Fri May 3 14:15:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539926560557909.6016328753792; Thu, 18 Oct 2018 22:22:40 -0700 (PDT) Received: from localhost ([::1]:47050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNF9-0004sk-Dw for importer@patchew.org; Fri, 19 Oct 2018 01:22:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNDE-0003lR-NT for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDNDD-0000F6-E0 for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:40 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:35320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDNDC-00009V-Vl for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:39 -0400 Received: by mail-pf1-x444.google.com with SMTP id l17-v6so15958946pff.2 for ; Thu, 18 Oct 2018 22:20:38 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id p1-v6sm25075191pff.128.2018.10.18.22.20.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 22:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8MIrDqrp3Yt71lG6bUOK6Htdxo6OYsbx0/yHbOzIvMg=; b=YfyXYXlho0BjK9XWShyQSLxhH3nwh64iScsWW139Subib5gunyt5iSIJPCkHYiic4c 1jUbzSVtEdEBLnzzAHwG89rjS1rMzafItlXMMUr/3m7bHpqKriOolWKjmG6wWzYZ2Eyq UfSyCNS91MFMaiJeay3Jz+EW0S8OhekC/1XCbpwjwv0wL/oxLNXjpGN9+ajYy4L/hobK r07bUY0by2EauIuAtiIYDem9cTpl7zDjTFdUBDmjH6YWv+tX9Z/sMxeIJ0F+QsOJXZNU VO0J/XNUDoasKMgToVOoVi7AynaKwvGyG0O8IFfLxuN4SHvXENCVm8R7Zm4AAN18ZA/J faOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8MIrDqrp3Yt71lG6bUOK6Htdxo6OYsbx0/yHbOzIvMg=; b=TU2f4Ok7FQ6/HX5tSST1zc13kVDEzjEPZiKsRrURM/E/uGBROBRch/bKpw7gbr32x7 II47cyKEB41DagbsuSsw5muMorMfvpThrPZGgJl3L/iir/TKJkaODn3+ByFmNNkYEAPH ynmyZjQfeeKK1vTDiSBeLwtDowzOQ5wi27LZ+zLt7KMVGiyZ9XIkt29Lcbsaph3PBzvd BvAtxiE05rAGBSHqlUxWkCBa5a3cfRD28zF9sTAo4FrSaoe/zoF9X3BPL9kAfZz2h3+D HLOFg08LJzkUCbHYyztEkeRCZGnNHgWt1xZl4Z/tOAhOFFjoN9xwh1QIK0r9v3KiOiiR JRgw== X-Gm-Message-State: ABuFfojXiZGgEarj43MiGc++8PgEKBvBmwFpAMleC1JgbrnNcrMqvElU LAFw/eI7OfN2UPQ8HoG6V1I= X-Google-Smtp-Source: ACcGV639cRlrmaZfjBhCJa5A4RYhAG4zWQobPmC47Hw6AJx6UWvNZxzQmE/x5hpWt6Oa2tHtLJGHDg== X-Received: by 2002:a63:6c4a:: with SMTP id h71-v6mr30877774pgc.326.1539926437702; Thu, 18 Oct 2018 22:20:37 -0700 (PDT) From: Li Qiang To: alex.williamson@redhat.com Date: Thu, 18 Oct 2018 22:20:10 -0700 Message-Id: <1539926412-21831-6-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> References: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [PATCH 5/7] vfio: platform: cleanup the notifier in error path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , philmd@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 5992fe7..6a4fd7b 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -80,6 +80,7 @@ static VFIOINTp *vfio_init_intp(VFIODevice *vbasedev, intp->unmask =3D g_malloc0(sizeof(EventNotifier)); ret =3D event_notifier_init(intp->unmask, 0); if (ret) { + event_notifier_cleanup(intp->interrupt); g_free(intp->interrupt); g_free(intp->unmask); g_free(intp); --=20 1.8.3.1 From nobody Fri May 3 14:15:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539926849350567.2376188865265; Thu, 18 Oct 2018 22:27:29 -0700 (PDT) Received: from localhost ([::1]:47079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNJo-00016Z-71 for importer@patchew.org; Fri, 19 Oct 2018 01:27:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNDG-0003mh-9w for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDNDF-0000Jb-DY for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:42 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:46574) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDNDF-0000Go-0T for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:41 -0400 Received: by mail-pf1-x442.google.com with SMTP id r64-v6so15939904pfb.13 for ; Thu, 18 Oct 2018 22:20:40 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id p1-v6sm25075191pff.128.2018.10.18.22.20.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 22:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P5I5yDi0F4ETJbyDNMwViQBBsC/Sq9RTgNeWgLfZkH8=; b=DwT30R+xb5FyBASu0lZhILN3p+B8btLOxTv27zxoO+60iPGPCvW0qxBlHzWSy2C2Sv o94LbzgxpnOBT1Dr0Og3hpBp65pPLA+OToN/XKaUhset3Caim7qh7tHgdVEoqf+J4R/m k9MgK/RyhoI8KiqvrjP/8FNiXtXz5OKYGQPlpQVa0kuyIlOVvKzKcVaUMEXEaR2bUc4J Nt1ykQ8hb8XygrXjG7Uhy3fREWT3HuYqlZFgCwBP+wWHW73F9gD8TpPoIDI//Zb7JmC9 51j/v3/wJzQeFb7vRuQEaLI7TqxQBKN0V5hvGd66vl/cGvlhYZV9p8v2blRtWMzZkJtW j1WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=P5I5yDi0F4ETJbyDNMwViQBBsC/Sq9RTgNeWgLfZkH8=; b=q58tP28teFRy0QrwFi/Fsg/G6mbV7FkgyUdiF24WcyQXG6hGCdmJt2X96nIIo2m/t5 rsVUuVmAfg5M/CFanpiRtuxM4zfys9Ta3sFt7/SLEJQ2e7JLnO3s2dB2TJi8EYBk7gS8 dzbQ3csKxanGP2NDIlpSdCq7nLi3YUgZCmW30hU5aZwJWSvrjeUz8f5c3ZbxScKfpQVh Arztc5kY0+IpmRvYXmdpmi8KLJkdaC5mZ3xzlRWezT4qWCcsf9qE1St5dnYS88wmW4yY ob9rvBkoRf0ITWUy5US3w/2LA6pLUcMpYymv/phdE9JofX1Bk7FW0IPsdxMzkFhBPO9b 4PHQ== X-Gm-Message-State: ABuFfogHB+yGXyBjacF+JDqKgtNJs72auK83T4Sdl1niqu/MgTkG9nAC w6lpQLGPGscv/5skgnM5Nyk= X-Google-Smtp-Source: ACcGV62sTvnBrivcXkp5DARjDuYbtfeKopIduHxzxGBrYFEIqaZn+5Bjl7RoUKvODVEdGT+IuxvccQ== X-Received: by 2002:a65:664e:: with SMTP id z14-v6mr30124318pgv.347.1539926440121; Thu, 18 Oct 2018 22:20:40 -0700 (PDT) From: Li Qiang To: alex.williamson@redhat.com Date: Thu, 18 Oct 2018 22:20:11 -0700 Message-Id: <1539926412-21831-7-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> References: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::442 Subject: [Qemu-devel] [PATCH 6/7] vfio: platform: free timer in error path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , philmd@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 6a4fd7b..ba19143 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -518,6 +518,7 @@ static int vfio_populate_device(VFIODevice *vbasedev, E= rror **errp) return 0; irq_err: timer_del(vdev->mmap_timer); + timer_free(vdev->mmap_timer); QLIST_FOREACH_SAFE(intp, &vdev->intp_list, next, tmp) { QLIST_REMOVE(intp, next); g_free(intp); --=20 1.8.3.1 From nobody Fri May 3 14:15:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153992684523032.67525055638646; Thu, 18 Oct 2018 22:27:25 -0700 (PDT) Received: from localhost ([::1]:47078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNJj-00010X-Qd for importer@patchew.org; Fri, 19 Oct 2018 01:27:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNDJ-0003qF-SZ for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDNDH-0000QJ-O3 for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:45 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:36527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDNDH-0000NT-En for qemu-devel@nongnu.org; Fri, 19 Oct 2018 01:20:43 -0400 Received: by mail-pl1-x641.google.com with SMTP id y11-v6so15349089plt.3 for ; Thu, 18 Oct 2018 22:20:43 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id p1-v6sm25075191pff.128.2018.10.18.22.20.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 22:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LbLynbA5qgE9ZN0X4/1tR62dpBQQE/RPx/rLsDwpskA=; b=ac98Hi3Zoo7KcCJcxeTLsn/ZEU0ABHIZTJL4ASY9xOh7IkyNQj1LP5qaCmnrzkZbwi lNHYJtAHxh0uaQ6q4y2RVRtDeLK/iM/hv8tZCuognxN8pGe+SaRy9fo23zZ5eVjxZn2+ xrBO29my2qS/Mryzm66Ly3jdJbwrKbF5YuXTh8DEvvdMKHf07/wCZgV77rwn+NneZiYD UANn1C+tig7hQsp3Kg5Tniah1FzrNA4Oh5gK4WB2zj9Msb7wWWtK/61rmX2Kz/JrO2DD gYpuygMN31lj4hbcsUc7NHtQ439vNYzkkRkVC0A/+ISH+3A34VzdyFw90dRkr1Jw90WL 122A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LbLynbA5qgE9ZN0X4/1tR62dpBQQE/RPx/rLsDwpskA=; b=C15et/h146FrRE/B9jv6ZQcqlKTHmCIHPuQg62YYPJWCs2FlcbxmRtZ/Q6JmZPqUC2 GaJBizqEfIkR2Htd4VsUv5e4Gwor1Kn4i2+JOPpM6CnXG/5njnBCJfWIVI83lfiv8muz 9i6XX7Im8/3I7GZQESQAciABGY5HbbPDIvahUgrdtSqi5h6cvxaG8Fwb65Tpdbb5qlZn QEMiN9CSogAV7FhgxAs3nVMuRo3cVZYQZtU5liZ9YXdagKW88/Za/PmEWhizDnmnH/8A IWsSlIxHWRYSnkqrpZhGR3Hg6eAP8qs/haLVm2V7czyi/Xa1BwH79bxQb6Mv0bfMYW3k aADQ== X-Gm-Message-State: ABuFfoiHCmdxFR9Tj733WgtonyWlZ5QeGZyqpODs05eAXADFQ7Dd15XN HkWqVGuGRZz7wpON6Yr7iqAny9IG X-Google-Smtp-Source: ACcGV609MhAwWCbflD9weMhH8BOgG/7r9l6DN32k++wShkcJR4HSP3LXxu7VLWgJkgfkxuDa4Wt20g== X-Received: by 2002:a17:902:e01:: with SMTP id 1-v6mr27696714plw.207.1539926442548; Thu, 18 Oct 2018 22:20:42 -0700 (PDT) From: Li Qiang To: alex.williamson@redhat.com Date: Thu, 18 Oct 2018 22:20:12 -0700 Message-Id: <1539926412-21831-8-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> References: <1539926412-21831-1-git-send-email-liq3ea@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 Subject: [Qemu-devel] [PATCH 7/7] vfio: platform: destory mutex in error path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , philmd@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index ba19143..e9d9e80 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -668,7 +668,7 @@ static void vfio_platform_realize(DeviceState *dev, Err= or **errp) error_setg(errp, "%s", gerr->message); g_error_free(gerr); g_free(path); - return; + goto out; } g_free(path); vdev->compat =3D contents; @@ -691,6 +691,8 @@ out: return; } =20 + qemu_mutex_destroy(&vdev->intp_mutex); + if (vdev->vbasedev.name) { error_prepend(errp, ERR_PREFIX, vdev->vbasedev.name); } else { --=20 1.8.3.1