From patchwork Wed Jun 21 16:24:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9802241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9BCCB600C5 for ; Wed, 21 Jun 2017 16:29:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D0972862B for ; Wed, 21 Jun 2017 16:29:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81D0528633; Wed, 21 Jun 2017 16:29:30 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 CFF612862B for ; Wed, 21 Jun 2017 16:29:29 +0000 (UTC) Received: from localhost ([::1]:55046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiVU-0001Ul-Ss for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Jun 2017 12:29:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiRx-0006vY-PX for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:25:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNiRu-0004Wh-Oi for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:25:49 -0400 Received: from mail-eopbgr30100.outbound.protection.outlook.com ([40.107.3.100]:23032 helo=EUR03-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNiRu-0004W9-Dh for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:25:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=t7vgwbIa22RE0tO52VmfPVzaQ2AAeMzXKFehH7WSedg=; b=auOY+lt1QglMF+GO8yNpGhrslnxPtP+ZUL64fVeqOjmyVvAav/tum7Dwq8Ni3VMbhRBpfKSUXHFlTovlq1JT71M5/KI+Hje8T9+x40/fAYQ3mk26AegmGvgAOKnaoH2YIqDlBylFvObn/nJr3l4ptGNwgkRO6GT7In6nM/ykvqY= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from rkaganb.sw.ru (195.214.232.6) by HE1PR08MB0842.eurprd08.prod.outlook.com (2a01:111:e400:59b2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Wed, 21 Jun 2017 16:25:39 +0000 From: Roman Kagan To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Date: Wed, 21 Jun 2017 19:24:11 +0300 Message-Id: <20170621162424.10462-11-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170621162424.10462-1-rkagan@virtuozzo.com> References: <20170621162424.10462-1-rkagan@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2P15301CA0022.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::32) To HE1PR08MB0842.eurprd08.prod.outlook.com (2a01:111:e400:59b2::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a29a95f0-b55d-4824-90c0-08d4b8c22a94 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:HE1PR08MB0842; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 3:yJoPrrCLbJQYtLkn+AURXYG94cl9BEXX7n5B3iaWci4X9LE9BkuBWtH3G4JOwEeS1L03BF83O6c7/1sF1mzyotl5lA9RV0/EO2t9hExELobuS/Vlhkt2A5kfy1uPHBVa2Ttd4sF/4zUZE+AjHov/f67V9UhJoHcmgGXMOqIdZXE0p/ADNkPgu4Sg8UQSRT94ppSoNbrzrTJamlJsU/0fWCKzGY73fKEZ23FwW6K6Dv6/mVtSzaJ4W7Yk3Xxk0N0dDAWITT+uIOJphsNo+M1nBZpNDSxb++rwGqzq3mfRnBJ/bKIs5B4qVw8G+kPWUfOWZvCW/JWT40+udHjMvAhSJw==; 25:2WWwMHcotIh5eShwZCNi3Ia7CrqJl1jG3v4l00lzLt4as0LVGzrdUnkMe+FitqL66ZrgBNmzewyRPHsyayQypMR4QVAbhmzgq5Y3tIsoHZWEUk7JZS7ZJ0lEl+gsYurqOguPJETGIiVm6/acRYs2rSKJjf29nz+TEfyLtH5g09QOuuQ4t6u4P7Vl9pNJBOt2Z8J30eLP2LTbi4lXe1ioRPuvOyI1ZhYGhhLYt7qHCK1sRBJ6iGRxlrrGtU5mTNnK0spRCWYFPre/4Cl6AHfoRdyAlfn0x9jUSGPnKKcARoFwLUdHmz1imFIneULlBKXqdI+4MronrE8e11uoWTGgAWQ+VQgMyjKuD81kJJd3zrGf8VlrNt72TyDC4C1s86WQakdHrHYO22pWbjsuBmSSnHirf4zj3UGGImqIjHP1TdnFJf3aUa9bWETNP2/Ovu5O92Wvc1xtsm0GRJRrf/Op4pUyjMYg4vMq35KQNlmZ9Xo= X-MS-TrafficTypeDiagnostic: HE1PR08MB0842: X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 31:gJ9xJUzwoELO4kOzdLg8ggF2/8VIJ/XYuJurho5XodjMO1XiJzeuOBBWTJaCe7nwOm0bEMVrgSDI3oOt1Lbeubi/o+NcD2zfQH+ZoSWqclXlUSW+LotsV3sPR7rRCf0dA8nEzi5OYuzGO+feuwX86p7Ihul2q/TNuKItoRf/DppaX7zFffQTGvSeaQx+1HqOR3r93QvW21ocmqIQT8uNXlztpEngveSImoG42P0wTvE=; 20:gkApAJ59UwmXNt58GMqRUzmDOTD9NG8ZqDVz/i7dIwGl6u/3ZZPYW7DbkqpVEWoUyV5L/T4fNCgfzBM10+iFFb2i2rd2QO9q9igJ9dh8twiY9uu9e2ZBRpUar9Vbf5YzEkkZm3PNI9us813Lu/2mLiKjRNV36Xenccw0Km5bz1J7s5a+Ff3mb9QJFQhLacaz9xuKUYG1OvnzBkEPAv8oyoWf5Tc+H6ldQCq7go8aSCNjctJa6DSM/7L7Z6DOT+j3U9tRgyKNdB0eza5MEUxcsKFdh8nVzWjuPIzsYDFgfn8qx4lOof0j7i7fIEehm5RJNI4g6/IzJrDPYB6DlLKiKGLfv3/uVCW7Ght+iQRJgDDc+jHzGj8rVx/Ip4zdmtyFSj+1FBqT+Q+sb5jXI6hl6F95TbRm0QC+PwEcAmxL4O4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR08MB0842; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR08MB0842; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0842; 4:1vqEAlmglbz3xzMxj2/QLDUv7IMSyOw8Kvb8yFCs4u?= =?us-ascii?Q?vQY5JcMwJ1dwszKE6i3qcNpBnpdSzttxT9Z245Crqkd9h+iYgHhkvWfMecOp?= =?us-ascii?Q?7mzY/J9NJ8fiuYSYbw96LkfNQkP7M/Cre0jJ5me9fxLpAUbC22X04+WqjW+L?= =?us-ascii?Q?BCi9UVz0ApVwX8sVkbJaVUkiP78V1lpwOvfZh3uuSxoEfc165lD1VeQ0xCGF?= =?us-ascii?Q?rKFrT/ljV1Rjgs2yvMg48UQpfvNgfBUnIMeolE170Cbzf/lDiLqmmVkBTQMf?= =?us-ascii?Q?0pZlPagG5sztUbUqFZULD+W91l5QtYOGOEa33yhCIVggm2YL2y+vQA6mPTce?= =?us-ascii?Q?eVJASTNKsCPP7Kd5jYcFm1xaaktbRImNG3CNifGD0sW+OpoT4f08rB52WBbE?= =?us-ascii?Q?CkMpqUn+Sb0W2pWd9UL5DeY3cZyFb2Ej49GS0KN/zEMWBF6hsJnP1CNl42gW?= =?us-ascii?Q?3HOIUBzkGiPR8CgPMn6vXqF9dE4c4U47/EdhKjAdHliLCCirTpTeeTfmRB4+?= =?us-ascii?Q?IxwAzZEslK5AP/DtishV21EhQAawItxd+8XNlSHbA9UiSN4HNWAVn0AO2MCW?= =?us-ascii?Q?hHcSmOn0ZFJoqlGg1tDctOzstmvf4FwXDZSrZBQfe0p7B4zfGVB0jGVjqd/n?= =?us-ascii?Q?Ex0T6YwIB+aJBzE/yTesjKnwpTxWyZsB0qnea370XCwfgc6wrjptXfnVXmlB?= =?us-ascii?Q?AMHcPNex1QZ0MeTW1/JkDessd3qwTBmarONsghEZRpt6N26+svGa1JWOzfPM?= =?us-ascii?Q?NVWXk2pW9F+Pido3hl4czxargn3/L7yK9VAh+L+DP0BsXEP32lKTykulH8eM?= =?us-ascii?Q?eBExEGVV1GnFRxRQ8W2EIcOZnqMG0N/MBTicVhFSNPjZHcA/KjlLlad4hmZF?= =?us-ascii?Q?zVF6OFnlNkM6AhBl0fPR/O/fuOqygFYvPne7QSJHjGkitxwQQMXh+e/QgrYA?= =?us-ascii?Q?vzQPkwGLtnNpQFIWGCdkBzX1bsJ9oaJTuY+WRUAxTuycO4ZBvEpnoJV8yCJ7?= =?us-ascii?Q?IpN0mlodxPGKWPmjK+tejxi/jLUuM3/fqDmF4PzSWSRnLAszy2XMis9TXJcy?= =?us-ascii?Q?uSL5R3pHivT1JTrUxTm76dwuS2D3Wy9nmuTGcphVrmcedF3FXKQmw2btBWPd?= =?us-ascii?Q?mFZ2AnyEtVK4m2S/IyEu9GF2kI1X0H?= X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(6666003)(4326008)(2950100002)(6512007)(6506006)(5003940100001)(42186005)(53416004)(54906002)(50466002)(86362001)(38730400002)(33646002)(478600001)(50986999)(76176999)(66066001)(53936002)(81166006)(7736002)(6486002)(189998001)(8676002)(50226002)(305945005)(36756003)(25786009)(5660300001)(1076002)(3846002)(6116002)(47776003)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR08MB0842; H:rkaganb.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0842; 23:jJequngxVocCwqsWrxw65VjAje1+Gv4eVVwdNXhSJ?= =?us-ascii?Q?crCJC63W1Xff/LtZm07GcAvjtMOSUPtGgyuVE+A1U2I6Wmv0CzB0oaHe+XVc?= =?us-ascii?Q?v0JyFAnjPA9JpGcVo/vnzh0eZ0r6674bcvlebMqxXYIbJdSUPeI8DG7/IgUp?= =?us-ascii?Q?AIe8mKm9p5eDzXeP7KHSC2Ey6Ijw/5VjK+PZtyYXgEcMileIF2uZnopbvsj/?= =?us-ascii?Q?pGPWfNUQvSubNkedYKqB54/HN/MkJATrBAL4t6OcM4set5UR5rw14MGwOD8s?= =?us-ascii?Q?pcF56LWan9YJ5uouBSjzHfw/nSbapDl73xSgbiJzVKap1Bi5EYrvtX5oiF+h?= =?us-ascii?Q?Rg5gDvaPR+nRuz5pCnVr+0cX/Pd0WtPou+ixc4a5igD81oGEDemVtyADVIYN?= =?us-ascii?Q?KHcedn0DiE6XgUlOV17j3UMU3luTPLkyspl9EF7bzA+ixw3l3RQ8Nc3AxlSP?= =?us-ascii?Q?0896v1SKLIt2org/DJIu4EqhqJIc3BQNAeqb4Y+xYA1PmyEaEcmq7vtwq1Ld?= =?us-ascii?Q?bj8mKclIcGq1+GuQ0MJuJNH+yb1KKTz4A1NsVP0iOlT/uIgUIEupG6y6ZGBO?= =?us-ascii?Q?nTBCRNJpzTQqdwhJsT7N33C5FHDhQSp6AdN0YuJXxIICt+9rVPSJBexss/NU?= =?us-ascii?Q?PijfwdrpvQ8LwRBw2X8TuP+BdtfNx0Tq/qgsbemDSfmm+Wvc7XtybZxCwyd6?= =?us-ascii?Q?6Bp+cGSuxEFgLPl+rdjQknqiB+QWDRdw4Dh3X5/utTqxjgAPuWTTrdl5fW+H?= =?us-ascii?Q?dqLKbYjeMGQRn6h4kwp4ziAC3qVaxUzN6cLL8nkrcfvQe8/FuoS51cO1p4NW?= =?us-ascii?Q?lGjMeUAicN5pIMxnNiRTfmFK+neml+Ad7te8COueGgG/ETQtAr/9satMvLxL?= =?us-ascii?Q?BrD5oowmy43e3BrobUEpfQPQBaZaXP75l75Yk6HiHIqBY41tQa3cu3vG2I6l?= =?us-ascii?Q?i4XdpdtCAejSwWXLPtxZWst7N85owrMeVvNDhQy6L0e53kcQMiAEZLjHFixR?= =?us-ascii?Q?vs=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0842; 6:pqClnzHTNTqr8p/J732UNq9+Fss00n+KYwQ0MUBXry?= =?us-ascii?Q?LElHseEpbUMxQq8PSZVE/zbCbt1TgdPDt5hjEZ9dTN99RPh+iDIatScxm8Ia?= =?us-ascii?Q?bMPJwVClVNLY1Rp5vpNi/6+JBMsxADTQ9bf1VJBVyqgbxFzX09PWH/oxLq70?= =?us-ascii?Q?qwL8YCL/E7LgdF5utPJAou5kQv2W8TlnJyY6wl9/IkU7JKjeRNcWe6Bhl00u?= =?us-ascii?Q?F/FxiH29jhCIIyoaat37rpnwioRIREPUCF5yGf/4qezpGLgrJMjiGRdEhxhy?= =?us-ascii?Q?6c2iqpkZ2MNz1maGhZXzXfbUZbreg7vwn5InIR1f5R/FDav8ZtIX8I+sf+mG?= =?us-ascii?Q?FzpQ6qckgx2ZiguZUcweYef7Cg5XqFiCUAOPQzl/UsBMURExeWeA/Be/ziKl?= =?us-ascii?Q?Y6EUhA9Nklsm6SPg+yrcouRuTPeAZ4nCawFLXLu1fCUJplIhPYJMZXsbjtuA?= =?us-ascii?Q?w/ULXjtQCIziBPJ/YMoFrLolRZvCw04ECPkWlY50SEyx/kOrfxYsrycgIRRC?= =?us-ascii?Q?Tq39m//HTlcKfxb9HoD492MZc0j+hQ5HXxRdBChg+JBoW7lni35gmtKaHYBR?= =?us-ascii?Q?xmvZRy13w4DYGv5WcHx/+RTarivcPU7uri7IYi4Keubp61saP1V5I4Anf31X?= =?us-ascii?Q?tYK48OpsLdpK0DA5hpYY1nEM+/P9OLvZqj8onV7zy+mW+pQdfsIUzDCvDQly?= =?us-ascii?Q?GSqdtX+UCuprDUYw5jSW79WZAjUzaLYv64bWBcLZYEWN9aBEaV6mU9K6uovl?= =?us-ascii?Q?VgL+w2xJlldSo4eqD5gPcyTxVrV3WCkDrPBV8f25XvnwC6Imvpd0MeCZKKsj?= =?us-ascii?Q?ER1aJ4LLOFWgBbdRIC7YQpnW1sZSWjZ55NfncPghw7AFsujO8ekWevpD0frS?= =?us-ascii?Q?zKgIXMf8Kf1sGhh5nDiD64WWAIIyINSuqHOPtSlFCjzsbHkqkbIK/nIO1l0m?= =?us-ascii?Q?okyX7MsGMNMCxehEqVXOT2dCSQxeehAXMyX8bst2t5sOVLO9AeLtf3CpZI/i?= =?us-ascii?Q?U=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 5:29i29vwU3QG+1Zxsgyb7uQYJIuxB3DIfr70e0sFteNYsCytALqye73wYRPa0U12Udk/RRGM5nzhO2zxNIvtnpKMhbSAXNskYddRz5e5OkoVqtPLQeJXyuLGhcbOFh0p4CgkEAYQHx+GYbLkcoCHV8hyR8Bawb36AjoYuul1JLf0ios64VflCXD4e3MC9lcFE2ibj2Hs3drBRQBiYcq0yM8A3IAfLa+OEwHlDCuQMdwXE4xDsbqT0A/TN3v4xvunxoFNG05DSN8ewH9xQ6iBMbGGVmk7aH3PgcmykcHSTs6TlMCVhKsECm5D4dIy1bniQMQPf9dwGwvyBKcARvtDzZ0FbqBhbd/m9McU9565HAx3QS9Xaz1kytm/5Iz8PlgftMZuHy24jjHaIQ3p3Uzr6luKfkyRccY5IOpVDpLjtUjzkbs8pVQTXwkCXO3d2s1NG43ROMILOZqhz8yQqKi10D22Niw1snKozONvOWNTCSUTlD4nMCU01kHrpFPQWbzeg; 24:aNmsPR2KFJvylHlAs4STNpWbC+Uv1u2t6mMuUVSbGfydg3gVn1u0ABj4OeVTn2JNuJsi+luZb3pRBg7GodW5JnEF3CbkTTqYiUeLLEoAGgE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 7:vpsf1lrrtAZQzSIMLMQ/FQmuKPFyfkYjn5rgJbFFfgz3T36KgyACwqgx0ujzqRzRampyfD6r+bxB3/u86lVaaZrXs2C6GUCeJu9jxYRd8nZqQ3VR5jCMRO2Fq7K6e1b0u+Httinx8ZJoq7duKb6lRNLUO+cm46pu51l9tPWfyJZERqv8D3mEpzhAFq2kj0J9a2cTQb8FgN5QCIhJvRZHaDTgiHaB3uVDSi3AOs4a6C17LzWw5NuuSC9GrNfu8GO0U5IFM8fdmF7cHW6qw5GULyLi3UnwX01xj0iHdR6fik8WqoU+iB1fAG//g7On92zIKdzmHcmR4GqRWR04QTJs5RXIHd5LGev2DRMXBR4eRK/W3RZcjRt3a+OW4isRKR8Emfb+peK920LmS8kTSea05NnHe7wT9MJqjou2qAlWMcl7vckmDknfKzctbZ3RYWmSHvWDgU17TMQVpyEHBPFIUlD6DlHqkthIA9yqODKO0VIS1VaVvwVjaJ/KpQb+AxU4vTSSwYt+bRbCbIbf54lGyrhZ1uDPrf48h27qjTG4LxnWRTJOeUY+7kz4geycEQe52rYCvn1vrpVZfpXrC6klsOgUMIX3RnUTkKFBY+MVNhJxKy62c9a58pLe/Vn1q+MsO0eOpePtB0DeSMRV6r/+GH9ZoXFQXJhEcNiqKsTVXHVsHkWZLL7wGz0nNXUtP+xbucQsVwGUQ0RM4XvyF4R9l5fnk445HqAtHXCmu0yirOwDcwg8JxYWjcV4azRN8ET+oSprhGpPm0SND5UF4rB5nXDFIHWEYede/mph1ScW7XU= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 20:7WcSM/aOLzW34GLRR9mu0svoIew66t1rp+88luih6k89O+mFMZ8MXKua2/lZRXdc3TneeqLgApVnpwjCe3j6ZW2AlvMNFc8pDVojuNf43FYkgEVpQj8U4kngXQs9QFao1vOCmUiBPwtxhY5Im8tzDmcnYDdgEByKzfjz+fr5wD8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 16:25:39.9564 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB0842 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.3.100 Subject: [Qemu-devel] [PATCH v2 10/23] hyperv: synic: only setup ack notifier if there's a callback 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: "Denis V . Lunev" , Evgeny Yakovlev , Igor Mammedov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP There's no point setting up an sint ack notifier if no callback is specified. Signed-off-by: Roman Kagan --- target/i386/hyperv.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index 2121d8f..3594bd0 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -77,15 +77,14 @@ static void kvm_hv_sint_ack_handler(EventNotifier *notifier) HvSintRoute *sint_route = container_of(notifier, HvSintRoute, sint_ack_notifier); event_notifier_test_and_clear(notifier); - if (sint_route->sint_ack_clb) { - sint_route->sint_ack_clb(sint_route); - } + sint_route->sint_ack_clb(sint_route); } HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, HvSintAckClb sint_ack_clb) { HvSintRoute *sint_route; + EventNotifier *ack_notifier; int r, gsi; sint_route = g_new0(HvSintRoute, 1); @@ -94,13 +93,15 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, goto err; } - r = event_notifier_init(&sint_route->sint_ack_notifier, false); - if (r) { - goto err_sint_set_notifier; - } + ack_notifier = sint_ack_clb ? &sint_route->sint_ack_notifier : NULL; + if (ack_notifier) { + r = event_notifier_init(ack_notifier, false); + if (r) { + goto err_sint_set_notifier; + } - event_notifier_set_handler(&sint_route->sint_ack_notifier, - kvm_hv_sint_ack_handler); + event_notifier_set_handler(ack_notifier, kvm_hv_sint_ack_handler); + } gsi = kvm_irqchip_add_hv_sint_route(kvm_state, vp_index, sint); if (gsi < 0) { @@ -109,7 +110,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, r = kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, &sint_route->sint_set_notifier, - &sint_route->sint_ack_notifier, gsi); + ack_notifier, gsi); if (r) { goto err_irqfd; } @@ -123,8 +124,10 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, err_irqfd: kvm_irqchip_release_virq(kvm_state, gsi); err_gsi: - event_notifier_set_handler(&sint_route->sint_ack_notifier, NULL); - event_notifier_cleanup(&sint_route->sint_ack_notifier); + if (ack_notifier) { + event_notifier_set_handler(ack_notifier, NULL); + event_notifier_cleanup(ack_notifier); + } err_sint_set_notifier: event_notifier_cleanup(&sint_route->sint_set_notifier); err: @@ -139,8 +142,10 @@ void kvm_hv_sint_route_destroy(HvSintRoute *sint_route) &sint_route->sint_set_notifier, sint_route->gsi); kvm_irqchip_release_virq(kvm_state, sint_route->gsi); - event_notifier_set_handler(&sint_route->sint_ack_notifier, NULL); - event_notifier_cleanup(&sint_route->sint_ack_notifier); + if (sint_route->sint_ack_clb) { + event_notifier_set_handler(&sint_route->sint_ack_notifier, NULL); + event_notifier_cleanup(&sint_route->sint_ack_notifier); + } event_notifier_cleanup(&sint_route->sint_set_notifier); g_free(sint_route); }