From patchwork Fri Oct 19 05:20:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10648673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B3F2C181D for ; Fri, 19 Oct 2018 05:24:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A50BD28A3D for ; Fri, 19 Oct 2018 05:24:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9903328B4F; Fri, 19 Oct 2018 05:24:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 48D8828A3D for ; Fri, 19 Oct 2018 05:24:43 +0000 (UTC) Received: from localhost ([::1]:47064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNH8-0007YV-If for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Oct 2018 01:24:42 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Li Qiang --- 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) +#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); @@ -3277,8 +3279,8 @@ static void vfio_pci_nohotplug_dev_class_init(ObjectClass *klass, void *data) } static const TypeInfo vfio_pci_nohotplug_dev_info = { - .name = "vfio-pci-nohotplug", - .parent = "vfio-pci", + .name = TYPE_VFIO_PCI_NOHOTPLUG, + .parent = TYPE_VFIO_PCI, .instance_size = sizeof(VFIOPCIDevice), .class_init = vfio_pci_nohotplug_dev_class_init, }; From patchwork Fri Oct 19 05:20:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10648667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2174112B for ; Fri, 19 Oct 2018 05:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1DE828928 for ; Fri, 19 Oct 2018 05:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B604E28B3C; Fri, 19 Oct 2018 05:22:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A01128928 for ; Fri, 19 Oct 2018 05:22:09 +0000 (UTC) Received: from localhost ([::1]:47051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNEe-0004tQ-J0 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Oct 2018 01:22:08 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP As the documentation says "use TYPE_FOO constants" This also changes the parent of ap-device's MACRO. Signed-off-by: Li Qiang --- 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) } static const TypeInfo ap_device_info = { - .name = AP_DEVICE_TYPE, + .name = TYPE_AP_DEVICE, .parent = TYPE_DEVICE, .instance_size = sizeof(APDevice), .class_size = 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" -#define VFIO_AP_DEVICE_TYPE "vfio-ap" +#define TYPE_VFIO_AP_DEVICE "vfio-ap" typedef struct VFIOAPDevice { APDevice apdev; @@ -36,7 +36,7 @@ typedef struct VFIOAPDevice { } VFIOAPDevice; #define VFIO_AP_DEVICE(obj) \ - OBJECT_CHECK(VFIOAPDevice, (obj), VFIO_AP_DEVICE_TYPE) + OBJECT_CHECK(VFIOAPDevice, (obj), TYPE_VFIO_AP_DEVICE) static void vfio_ap_compute_needs_reset(VFIODevice *vdev) { @@ -69,7 +69,7 @@ static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp) if (!group_path) { error_setg(errp, "%s: no iommu_group found for %s: %s", - VFIO_AP_DEVICE_TYPE, vapdev->vdev.sysfsdev, gerror->message); + TYPE_VFIO_AP_DEVICE, vapdev->vdev.sysfsdev, gerror->message); return NULL; } @@ -147,7 +147,7 @@ static void vfio_ap_reset(DeviceState *dev) } static const VMStateDescription vfio_ap_vmstate = { - .name = VFIO_AP_DEVICE_TYPE, + .name = TYPE_VFIO_AP_DEVICE, .unmigratable = 1, }; @@ -167,8 +167,8 @@ static void vfio_ap_class_init(ObjectClass *klass, void *data) } static const TypeInfo vfio_ap_info = { - .name = VFIO_AP_DEVICE_TYPE, - .parent = AP_DEVICE_TYPE, + .name = TYPE_VFIO_AP_DEVICE, + .parent = TYPE_AP_DEVICE, .instance_size = sizeof(VFIOAPDevice), .class_init = 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 -#define AP_DEVICE_TYPE "ap-device" +#define TYPE_AP_DEVICE "ap-device" typedef struct APDevice { DeviceState parent_obj; } APDevice; #define AP_DEVICE(obj) \ - OBJECT_CHECK(APDevice, (obj), AP_DEVICE_TYPE) + OBJECT_CHECK(APDevice, (obj), TYPE_AP_DEVICE) #endif /* HW_S390X_AP_DEVICE_H */ From patchwork Fri Oct 19 05:20:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10648669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7211112B for ; Fri, 19 Oct 2018 05:22:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B761B28928 for ; Fri, 19 Oct 2018 05:22:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB99B28B3C; Fri, 19 Oct 2018 05:22:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 558E628928 for ; Fri, 19 Oct 2018 05:22:12 +0000 (UTC) Received: from localhost ([::1]:47052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNEh-0004vo-Fz for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Oct 2018 01:22:11 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 **errp) } static const VMStateDescription vfio_platform_amd_xgbe_vmstate = { - .name = TYPE_VFIO_AMD_XGBE, + .name = "vfio-amd-xgbe", .unmigratable = 1, }; 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) } static const VMStateDescription vfio_ap_vmstate = { - .name = TYPE_VFIO_AP_DEVICE, + .name = "vfio-ap", .unmigratable = 1, }; 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) } static const VMStateDescription vfio_platform_calxeda_xgmac_vmstate = { - .name = TYPE_VFIO_CALXEDA_XGMAC, + .name = "vfio-calxeda-xgmac", .unmigratable = 1, }; 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[] = { }; static const VMStateDescription vfio_ccw_vmstate = { - .name = TYPE_VFIO_CCW, + .name = "vfio-ccw", .unmigratable = 1, }; 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: } static const VMStateDescription vfio_platform_vmstate = { - .name = TYPE_VFIO_PLATFORM, + .name = "vfio-platform", .unmigratable = 1, }; From patchwork Fri Oct 19 05:20:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10648671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3585F1750 for ; Fri, 19 Oct 2018 05:24:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2100128A3D for ; Fri, 19 Oct 2018 05:24:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14CEF28B4F; Fri, 19 Oct 2018 05:24:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A07D728A3D for ; Fri, 19 Oct 2018 05:24:40 +0000 (UTC) Received: from localhost ([::1]:47063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNH5-0007Sc-FN for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Oct 2018 01:24:39 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Li Qiang Reviewed-by: Eric Auger --- 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 notifier"); + "failed to initialize resample eventfd notifier"); return NULL; } } From patchwork Fri Oct 19 05:20:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10648665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E0D2109C for ; Fri, 19 Oct 2018 05:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE89E28928 for ; Fri, 19 Oct 2018 05:22:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E171E28B3C; Fri, 19 Oct 2018 05:22:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9ECEA28928 for ; Fri, 19 Oct 2018 05:22:08 +0000 (UTC) Received: from localhost ([::1]:47050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNEd-0004sk-Pn for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Oct 2018 01:22:07 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Li Qiang --- 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 = g_malloc0(sizeof(EventNotifier)); ret = event_notifier_init(intp->unmask, 0); if (ret) { + event_notifier_cleanup(intp->interrupt); g_free(intp->interrupt); g_free(intp->unmask); g_free(intp); From patchwork Fri Oct 19 05:20:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10648679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 63BE214E2 for ; Fri, 19 Oct 2018 05:27:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 506A428A3D for ; Fri, 19 Oct 2018 05:27:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43B8328B54; Fri, 19 Oct 2018 05:27:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DD51E28A3D for ; Fri, 19 Oct 2018 05:27:06 +0000 (UTC) Received: from localhost ([::1]:47079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNJS-00016Z-6E for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Oct 2018 01:27:06 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Li Qiang --- 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, Error **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); From patchwork Fri Oct 19 05:20:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10648677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04B2D14E2 for ; Fri, 19 Oct 2018 05:27:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFE6F28A3D for ; Fri, 19 Oct 2018 05:27:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2FD728B54; Fri, 19 Oct 2018 05:27:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A25228A3D for ; Fri, 19 Oct 2018 05:27:00 +0000 (UTC) Received: from localhost ([::1]:47078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDNJL-00010X-MF for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Oct 2018 01:26:59 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Li Qiang --- 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, Error **errp) error_setg(errp, "%s", gerr->message); g_error_free(gerr); g_free(path); - return; + goto out; } g_free(path); vdev->compat = contents; @@ -691,6 +691,8 @@ out: return; } + qemu_mutex_destroy(&vdev->intp_mutex); + if (vdev->vbasedev.name) { error_prepend(errp, ERR_PREFIX, vdev->vbasedev.name); } else {