From patchwork Fri Sep 21 08:22:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 10609325 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 D55A015A6 for ; Fri, 21 Sep 2018 08:41:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C57EB2DD59 for ; Fri, 21 Sep 2018 08:41:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9E162DD5F; Fri, 21 Sep 2018 08:41:13 +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.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,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 5012F2DD5E for ; Fri, 21 Sep 2018 08:41:13 +0000 (UTC) Received: from localhost ([::1]:54492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3Gzw-0007kk-IG for patchwork-qemu-devel@patchwork.kernel.org; Fri, 21 Sep 2018 04:41:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3Ghu-0006gv-T3 for qemu-devel@nongnu.org; Fri, 21 Sep 2018 04:22:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3Ghr-0001fp-LV for qemu-devel@nongnu.org; Fri, 21 Sep 2018 04:22:34 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:13861 helo=EUR04-HE1-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 1g3Ghr-0001cU-95 for qemu-devel@nongnu.org; Fri, 21 Sep 2018 04:22:31 -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:X-MS-Exchange-SenderADCheck; bh=MxsQ20adqcFcOpcliB/uBWism1O8lsT7oWCTc85FxQQ=; b=G0qShfbx1q3JRMVLDNunOYCM7usZ19M2z2FoyC6RGPbvizqoL6MjUFB3k0X2iMPIUF19ZH0BdObKStD6U3g/eKH/4xOKNHdoEVhUkAMPt+td8HlWm8YACod1lBHqXbIJtmRwcmecKBwylLQuufRW9FmgzrpitqOn4oZLtKalzSg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; Received: from rkaganb.sw.ru (185.231.240.5) by AM0PR08MB3588.eurprd08.prod.outlook.com (2603:10a6:208:e1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 08:22:26 +0000 From: Roman Kagan To: qemu-devel@nongnu.org Date: Fri, 21 Sep 2018 11:22:07 +0300 Message-Id: <20180921082217.29481-1-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1P193CA0003.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:bd::13) To AM0PR08MB3588.eurprd08.prod.outlook.com (2603:10a6:208:e1::30) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9bf3661e-64dd-4363-5d1f-08d61f9b5dd4 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3588; X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3588; 3:kdfO7xo6kV2ZlsZSqovhJQnRu41yKPNXR9Y6pAlacUW42re+dQotlpQBbBISR8QUhnxgCLEnHCfOij0yd8LBwhFb8SYJqAGC0k//0bZH//+L0yqVUIlQ+LKQUhpW2MxENmcZF5cB0GTlxxpwDwigkYwy56eYxyWACz+bI5RfygiMRRQ0VeON8OVcPdUnjGhQmFFUVo/GlcHzu6tbg9AgTjJv8ilF3TsWQnV45e+pxcuc6Z6/iguAGgxK+IHwdw0m; 25:LM6RyZ6wfTdUXtzjtSI0t4Pq2hMc892sNbzkFmT1MZVZQeWE3sddbdKW+b/R3494oAy6U5l/kQM5kcaTL6q1GeO9zOaXXntx5i1uYUzl+FBEqeYtsL5sZUYQ921CgF9BQVcc6tDj3x6qTAiNikQr9ggS586nx2SIfBNk+iivebcWQ+ALC6eqczr/Fs9RxBoS+sVi+erqV30uO0vumwzgAwcSJf4JiRQnRYcA1zDgYJfh2fz/Ca/vIWb9yVFLenl99PLXTDT7RJm3/Qf5Nr0gZR12SVcK45/4hVIIxQeKXwNqWoWX0Im1TRbZICoMmL2DYDH3zIp8XrUsqLigfw/v3A==; 31:Hjma0woZA9xthIyL5SUZat8O4RwJlxUQYtry5azU6bXjXJ1ZJStukgJByP5tvsJsdXAHoqslOI8zTZlgWa49P3dW1xLl2EWShm6kWhpTnS+f0HDXqN6xp782+ik3fSkHWb+HieGHkw25W9N3+H/Gd+RjGwap2fHyP0PF4l2NxzqxZ/fyzmlxgwZXQuWm50SmTHj64g5OCPF03Ju1B8T6JePo+aBxLfJbx7WSexAqqyY= X-MS-TrafficTypeDiagnostic: AM0PR08MB3588: X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3588; 20:dreNaWWEDoOeXqYNg2HDbqcyKRMktg24oT0Sr5j0byiMQenYZWWw09brEJDqjoyLGtAZGRMEejnKWHeBWgUYQHhUsm4QwXIGLsPnX0ZB0Kej4vxsp4HgZeAKO5acKJ+iYtEFhevNMxdq3PI0zFYbqBGObOtyatVDfNkfaHNlP/EjQ+lbNVw5lIlWgRYd8DLARc2IzO7nzgCrKxAFT8NSSe8FrjvQZYtbueHK8Qbu9LDwNe1gB+t/+6bsRFgnU++DvesA373Azmfb0s/CD4vsXPh3A3T58hyWfhUT8jeqGvqjRaGOnrfEcawjCoMhVVQ6pdmhq+d2G90Af6Lgn+DqTXeqCkLF0p1Ig4ZJMlGTO0APEgGGtTqHfOGZHjHLlDVLdnf7hUeuTOa6SdZIrRxnM9DnKKo1Zi8BD32ve/wSjUQCM/9PvUkGr8LllPFKe9Uy56fE0wC0Rz9WhgP8nUptuU7mdEAnqaaeh5q+B5elL7rKuZc2eqjcnmM5u6zwev1C; 4:Rrmtw2hKkmlSy5O1SIZqsRzLr01qG3cjT14W0WiLW4GyLukgp3ZcI0uGRZw2D76p33PsZFs/MG9uYL6WkY05JVs3aoABpEXzeMzqoTArfd1xzhxcGuBItoyRkJEBZWHA44lO2JK6rAN7nJKjRvcA5xvdfQPwY2h4RLh/mvasz7VcbOtB5HZE0e9wpxLfOr2HdlwG0WGR+yEMCGEHXf+b7637zIe0gyRYRfcmRXo3iaR72mHN5ov/PrDn8RlG6HxhHfT6RdtwfCZ/aSsysUFRrA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231355)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699051); SRVR:AM0PR08MB3588; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB3588; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(136003)(396003)(39850400004)(366004)(376002)(189003)(199004)(6916009)(16526019)(5660300001)(36756003)(3846002)(54906003)(48376002)(6506007)(476003)(486006)(52116002)(1076002)(386003)(51416003)(186003)(6116002)(16586007)(2906002)(66066001)(6512007)(7416002)(50226002)(53936002)(25786009)(106356001)(53416004)(81166006)(47776003)(316002)(956004)(2616005)(7736002)(8936002)(305945005)(8676002)(2351001)(105586002)(97736004)(4326008)(86362001)(6666003)(68736007)(478600001)(6486002)(2361001)(50466002)(26005)(69596002)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB3588; H:rkaganb.sw.ru; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR08MB3588; 23:5iq9htLfM2RheHwnYSaHrZAexpkULVT7e1C1cqHms?= Zk5S31TVf1oNmLZyNjxJVj6TPCr0iJqYWb0i2H8gebZX6s8exhjUASaOxECmGI9iWiYpbdFjQRENGoSm2IXovG36q9UImSUau75o7iQM1+HxvHnGVpxNfAwRCx4q5evq7AEJaN939+gnHtGznwc3ku6DSVtlOP2X0FzJUrAR7n0ZNiF/yku47dmg/24VpBeO+FHhXkK2ap5Vaei9CfNQTwzU7IO3F5XlD/PGtYPw3S154p7HEKGvluHVN5tWWKftZltg6FYtbB+9aSxKjGmSUZOo+xZBYWeolDgin5+5yp9csmf+hMQp5lYkrjy4QGJXxto9bgP5Pg1HdLTpV8aecUw98GxJ0uZEh9ExniyGXiRy+dHpIQUJroiRTaDAQPtmN6KJTLGjKNbi7ADtjnYWetGrnypAGRFlNXrf9luxtqoDG/fk0BDDDEFy6KGyzHPIJWPZzIqQ0fjuo82cjib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MB3588; 20:Y1A6JbDfcUSdiuPfWgl6JkSTN03jKhBgqOmswYk8EBE5/7QDX+3Z2OjdWZw+MjuxQF6JwOWO7E1L5kPCb4GAfv9/KxBZpOtKJH0HbCcWABykUiRQvFj+Ma5kWPFsJ4Mb6rqnR5mtI7vGTjyoKogMzkQYomzQjTok2llSv7zaVDs= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 08:22:26.2848 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bf3661e-64dd-4363-5d1f-08d61f9b5dd4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3588 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.7.117 Subject: [Qemu-devel] [PATCH 00/10] hyperv: add connection infrastructure 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: Vijayabhaskar Balakrishna , Eduardo Habkost , Konrad Rzeszutek Wilk , "Michael S. Tsirkin" , Venu Busireddy , Liran Alon , Paolo Bonzini , Si-Wei Liu , Igor Mammedov , Boris Ostrovsky , Karl Heubaum Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series introduces the infrastructure to send and receive Hyper-V messages and events. More specifically, - SynIC is turned into a full-fledged device managing the memory regions used for QEMU->guest communication - machinery is introduced to post messages and signal events to the guest - infrastructure is added to subscribe to messages and events from the guest, and to dispatch the received messages and events to the subscribers Based-on: 20180921082041.29380-1-rkagan@virtuozzo.com Roman Kagan (10): hyperv:synic: split capability testing and setting hyperv: qom-ify SynIC hyperv: only add SynIC in compatible configurations hyperv: make overlay pages for SynIC hyperv: add synic message delivery hyperv: add synic event flag signaling hyperv: process SIGNAL_EVENT hypercall hyperv: add support for KVM_HYPERV_EVENTFD hyperv: process POST_MESSAGE hypercall hyperv_testdev: add SynIC message and event testmodes include/hw/hyperv/hyperv-proto.h | 1 + include/hw/hyperv/hyperv.h | 58 +++- include/hw/i386/pc.h | 8 + target/i386/cpu.h | 1 + target/i386/hyperv.h | 4 + hw/hyperv/hyperv.c | 542 ++++++++++++++++++++++++++++++- hw/misc/hyperv_testdev.c | 165 +++++++++- target/i386/cpu.c | 2 + target/i386/hyperv-stub.c | 13 + target/i386/hyperv.c | 54 ++- target/i386/kvm.c | 45 ++- target/i386/machine.c | 9 + 12 files changed, 872 insertions(+), 30 deletions(-)