From patchwork Tue Jun 6 18:19:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9769605 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 8B0FF6035D for ; Tue, 6 Jun 2017 18:36:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 835A92026B for ; Tue, 6 Jun 2017 18:36:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7805428472; Tue, 6 Jun 2017 18:36:04 +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 D3DD82026B for ; Tue, 6 Jun 2017 18:36:03 +0000 (UTC) Received: from localhost ([::1]:39685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIJKk-0002jV-Ub for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Jun 2017 14:36:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIJ5X-00060Y-Gr for qemu-devel@nongnu.org; Tue, 06 Jun 2017 14:20:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIJ5T-0007Ol-Nr for qemu-devel@nongnu.org; Tue, 06 Jun 2017 14:20:19 -0400 Received: from mail-eopbgr30103.outbound.protection.outlook.com ([40.107.3.103]:45293 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 1dIJ5T-0007Ny-DX for qemu-devel@nongnu.org; Tue, 06 Jun 2017 14:20:15 -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=Qg2O874Dtzr70vPOMw+swAy5FMdqC9eExWDRifaUnpk=; b=IcTavIDq71C9neNHMBnVkG0/Nz7iYpUVNSCx+5i+xPJrmYYzZvxzMUNvSiKXUb+VJ6wYAVOr5wOho1649X1xNWI2StTpJK/gNn1SjarEOnm7eB7owFOFtugBTqE9aySPHe5i9DEmDKKBZAo4heG89fxaTKgS+CC9d54v6xAlWzE= 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 VI1PR08MB0847.eurprd08.prod.outlook.com (2a01:111:e400:5a05::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Tue, 6 Jun 2017 18:20:13 +0000 From: Roman Kagan To: qemu-devel@nongnu.org Date: Tue, 6 Jun 2017 21:19:43 +0300 Message-Id: <20170606181948.16238-19-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170606181948.16238-1-rkagan@virtuozzo.com> References: <20170606181948.16238-1-rkagan@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR1001CA0042.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::28) To VI1PR08MB0847.eurprd08.prod.outlook.com (2a01:111:e400:5a05::17) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR08MB0847: X-MS-Office365-Filtering-Correlation-Id: a786061c-c4f8-4f5b-66ef-08d4ad08ad18 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:VI1PR08MB0847; X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0847; 3:b7VUoiutsVeKKryGsXtk8luRo0Udz8G4318heXh1yBqyEc20jc7qLZ+o7GsRSB79IP72Czs+AgJ6JQ6xfU+t+KXqv8BQavvCtyONXB40hzh19Lo870E465AnfA10EF6LutwnWy5TPVKW26UINFh1rKv9fJcgL357mqyB9jftDzR/JPTNmy540Jdujl7Rrxe5Amho0D52cLwcQQ1VlGA83lbwAeVsobL55aPNJXlo+PRTzmmWx5yaKYX9qEJMkFtBnjIQFDzb9QS1pMa+71cIW1PTVV5cOkqqbXQ4WopeP+NZt6iYc3+5u21zzSTUJCKgFOSu3hkX5JbDen3gXYS3tA==; 25:PWraAB3/VYPUGdUx9YWdG4aUpNbeqRo/NtfxIGVY8e4RXbtnkywOYKrasSKZgNhfetGaZ1nob45XCvvIcNRshSf8eiNK02M1X9d5exihTIOO9wtaSOHrathgi7D/sTK8uI/ZjU6rEfPoBNSNIXt2msYeOnRCz7diIVJwakMEgfyhQW+1lKbvLhD7QY1AZQWQNo/c5aLjdgPw67k1o426WzUFc8q36ruRzKTdfjC54+bOunutR5EV33cCVUNB06oEwTFyd0hNeRNfTqNpQMUKA5hBDUWPhtN21Duui77rgw6t5sLtRD2cCJRuliJH5NXpZZ+uK+zBSU/AkpuchX+02x5xlOoXpu7IjrSgSXma+Xo8etAqvxHkdR7tTnx22I8EtcJ6SFu+PwiQYdgtmTcdCnBwuETj+TYXpJ+XsNFAR7wXZmQ0woVRPYpTZ6Dr3VRShVLdzkqVWFZmeU1icFqoFfUyZQFGmataNeqY4ApaFOc= X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0847; 31:Bs9/Hup9srf/UoT2uaXWxntrUQuVu7Lz6h4bHuhGubMDZtM2/c4P1R9Jb+nymHJc1bo30gUW9MZa5VPjajt8s2ogMJQS12kmS2SB3O25ampc2jh5/nxR/WvUhojGgf7Oer/RhePHPJGBhc/5qqsw1WC1eo81TuJAeuw7QfwQgW9HNwd2m4vswl0ZGZ77hXgU3Xqinxeb97cl7BIP5pt0NHoti1jWfdfn8ZOxGiCA4u1hRWEvloU7IShYIuay1teLVDIFJdP5HsXWjcN8fL39lg==; 20:9zVIElYTSGOQGysVvTyuvoXGMSX1PCrlvecBfSiaNsgJ2Pd9feksYX0mWSX+fPJ781bfKsmpJ/lZciboXFVy4SsT7kQEkeg1GZwbapS++6L/Wd/VVSD3Pj6oUDHT9Q2gH6zcj36w0pa6AabsfDVSUC2rUU7Q1DINoXBMRy/2QyWYrKu5CKr7DtJHH7eSWw1NHn7k3TJyDxnxZ8LwlbHm7sY/R/KVgls0IDXG+AntFfLxr+0EM/JoqSwr6WVReyWfUNGgCklRFxtWr7SW12uII7ZOuYo6M71pHmpAYlcBXqbyUwYjxTuVsg1sdgIsVi8pqOHrH3OeZFLHJ7SATXgOYt1xAW+H9fQ8scYtSXvvhG0OuCCtHZi7lTKqnHb11ZmodgqPfMZXYU3pAelw3Cu/OYkt/wGAK18ZjuJIbfYPlZc= 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)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR08MB0847; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR08MB0847; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB0847; 4:EUDA73a0kzAeBNc0cTGQInKjafc2PgUAooJbCP8GHX?= =?us-ascii?Q?CupPWxpbqrkfMogiRnOCP8g8xGpb0b1/CDf5CQ/8MPhdcpTZmfdHnySIlUhy?= =?us-ascii?Q?s5IwU/eYNS0rKS7zskcKvRff9IAT9oCe8bTx5WASibbpO+DDHFKmbKydIZLu?= =?us-ascii?Q?N2GSl2FF6URuSQ6u5bsdiezAVF8TJjLTh1w9U5HPJTlGeeJ7q/DeRcwAXq9c?= =?us-ascii?Q?DVH9LRMY5QfXE21lBAKBtT72SuVRQuDMMDVjzw0zoqJOuKMMaaRc4rB6vBsJ?= =?us-ascii?Q?DDyWJ552fwDUDAXPXqY2czYGn+b2xo4V/qKEV1uiVUxMhqEtnparEc5kfF+k?= =?us-ascii?Q?r0Vw8JknE4sEQ2PW11gJ1ETwVZdIFxPgeZa2zOYYcIAVYfMsjbdIuozepPN8?= =?us-ascii?Q?3EDsPnGkW2wNLT8I1lRTEmmnwVrDDoFtdWoUwb8V8RgM3FSeJuxmiK1RmxAu?= =?us-ascii?Q?Wl6X4FrxkGm9ESogDTqn0gyxC6kklxDB13WbnE/Bb5aiB1eNKMYWYVnqFge7?= =?us-ascii?Q?U6awIQ4sMCXFKPaGfec17dnxu081HXDEJyyoIebEXzvYzFc3JbtoPVJwHmof?= =?us-ascii?Q?bw5mQewBAXGL0htbNyQvdBVfvyC7EFtotYu9M0/3eDxWksLiwj+WsnG1GfdG?= =?us-ascii?Q?xCpFxwfEuwwCZw4jzSrHKLXnYkGgexg0qcEYDh2WboYRDvb+3zZLUDWOIthl?= =?us-ascii?Q?bfL3YGSDEt4MVDXFxH00OXfBjo6rE4xgHaPE3Vm7zib3FSwRIEq7KIVcpgU0?= =?us-ascii?Q?AWaMOcsdRPiTYWbNcRvvqBndIKATjxIxutdYD5wZQYRKCyFdVAc5x/SySuST?= =?us-ascii?Q?gE0bITWxtK2vuRh3VDSE5zLSgcvaLr/lHt1qAxw+cn/7XB6f9W6YuFvUEt3p?= =?us-ascii?Q?9hTon3aKxxrs5jQ72wfAkgsl6d/PnJVejPoyxkqtL8R2hbI6D5lJxjHSPU7f?= =?us-ascii?Q?07M7BPV9QWU97cpalhH+DNnbFmt0HDQM5DG9SSgQMBpwObldToXHf+DEl1cL?= =?us-ascii?Q?Saygnnwzu0hamckyZrEhHS7vq1QenWEqtjqCNYBtwl8Sno1Lb48YOZTjN1Yv?= =?us-ascii?Q?Mm7b3mqsY2ch16shkNvGIHDRwcFkoDsZANxPPsHQJLcoaroOpvLCfKXAKpbf?= =?us-ascii?Q?YlzC0EXoTPz8FVJ0YdbjjNxjA/BhOn?= X-Forefront-PRVS: 033054F29A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39410400002)(39400400002)(39840400002)(39450400003)(48376002)(33646002)(36756003)(47776003)(6486002)(478600001)(66066001)(5003940100001)(2361001)(2906002)(5660300001)(2351001)(50226002)(81166006)(8676002)(25786009)(1076002)(6512007)(6916009)(53416004)(76176999)(42186005)(189998001)(38730400002)(53936002)(4326008)(50986999)(107886003)(7736002)(110136004)(6666003)(6116002)(3846002)(54906002)(2950100002)(86362001)(6506006)(305945005); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR08MB0847; H:rkaganb.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB0847; 23:DSd+1VFJVhFC1l3YklATg3R/iflTsjD33umvrivAT?= =?us-ascii?Q?mDa1hHvwFG1TO747J8IgUrvowOS+zg8S0mnWorCYcDK00NhIAqiiwqEHFlRy?= =?us-ascii?Q?F68uQCq1m0z3m1xoCVgmOuZQaw9DB35VUX6hjwVSnmpqwPisylzea8BuInJX?= =?us-ascii?Q?izrivmErnDpBP8TtFNuWm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uDxhiBuLtPYscO2tr+Kf9jvkRIpu8be9vmdCDVnFC7yUkupfWJt6XnCfGrSYR4g3R7sUipH0mo9vIPWfsCyfd48CAE95gVkxVFDvX1v8QbdNTmgF0; 24:Ryd95olJ6uR7EaP4HGDfPya6awxMv62vXSOfCLVd4kKrHgyvcJfyi307t6YoruF6PpKZFRk+ei2ll15deNC+Iqj3Cyu8rzTMwjWGgtJatw0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0847; 7:+WdVbIKKCsT0dBJN8J3Pm3CbZQSDYzzoRCB9yscvGDKJnlPjGkIM52hIrK6V6ErUJOyVrQ3cnK2bMDik5TLNS/LAc1rC7+SI96f/LnXoR9TYgNcMDdD4ZlgvqZqCwKtMpuf7GGzSZbFi1rOdIt3O90sz3JIXn1lwp9Qnc+FcdK+AvbFMyaIhfyvAApthnf7UZ/ECc/z0VBR/QvCMvsUwf1I/Nc9RfdYv+gMrkE9FghPZX8SUIO1XEIVUO+HzcZc4FeGsVOpLChnjZjxeBpCGM+18sByXB6KbR6Cqw/vwZ9Vzf2LduPdQi6um4QHUm06mF6RlSCUCUgVz4RosVvOzPA==; 20:w7xJv1EDoZoj1XjzxKbUk94dd3fiw/l180+ggtjAZ5+dy00409/E9IHaMzCpPJomzyKZM+9/H80d9CjrnWz7b4o5Kq+NGNMuDNBL8xLy1PBapz68Ss+ZSp/lbXO7gAihOVoOxsZbEXGqWu+4+nogoKHOVsZXjjFRGiE/XeTuZnQ= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 18:20:13.4296 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0847 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.3.103 Subject: [Qemu-devel] [PATCH 18/23] hyperv: add synic event flag signaling 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: Paolo Bonzini , Evgeny Yakovlev , Eduardo Habkost , "Denis V . Lunev" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add infrastructure to signal SynIC event flags by atomically setting the corresponding bit in the event flags page and firing a SINT if necessary. Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 2 ++ target/i386/hyperv.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h index fa3e988..a2d4304 100644 --- a/target/i386/hyperv.h +++ b/target/i386/hyperv.h @@ -39,4 +39,6 @@ void hyperv_synic_update(X86CPU *cpu); int hyperv_post_msg(HvSintRoute *sint_route, struct hyperv_message *msg); +int hyperv_set_evt_flag(HvSintRoute *sint_route, unsigned evtno); + #endif diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index 0a7f9b1..dcf49e4 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -17,6 +17,7 @@ #include "hw/qdev-properties.h" #include "exec/address-spaces.h" #include "sysemu/cpus.h" +#include "qemu/bitops.h" #include "migration/vmstate.h" #include "hyperv.h" #include "hyperv_proto.h" @@ -189,6 +190,37 @@ int hyperv_post_msg(HvSintRoute *sint_route, struct hyperv_message *src_msg) return 0; } +/* + * Set given event flag for a given sint on a given vcpu, and signal the sint. + */ +int hyperv_set_evt_flag(HvSintRoute *sint_route, unsigned evtno) +{ + int ret; + SynICState *synic = sint_route->synic; + unsigned long *flags, set_mask; + unsigned set_idx; + + if (evtno > HV_EVENT_FLAGS_COUNT) { + return -EINVAL; + } + if (!synic->enabled || !synic->evt_page_addr) { + return -ENXIO; + } + + set_idx = BIT_WORD(evtno); + set_mask = BIT_MASK(evtno); + flags = synic->evt_page->slot[sint_route->sint].flags; + + if ((atomic_fetch_or(&flags[set_idx], set_mask) & set_mask) != set_mask) { + ret = kvm_hv_sint_route_set_sint(sint_route); + memory_region_set_dirty(&synic->evt_page_mr, 0, + sizeof(*synic->evt_page)); + } else { + ret = 0; + } + return ret; +} + static void async_synic_update(CPUState *cs, run_on_cpu_data data) { SynICState *synic = data.host_ptr;