From patchwork Fri Sep 21 08:20:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 10609327 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 3B1A91390 for ; Fri, 21 Sep 2018 08:42:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 291562DD5B for ; Fri, 21 Sep 2018 08:42:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D1FC2DD70; Fri, 21 Sep 2018 08:42:44 +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 9E8152DD5B for ; Fri, 21 Sep 2018 08:42:43 +0000 (UTC) Received: from localhost ([::1]:54505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3H1O-0000kK-Sj for patchwork-qemu-devel@patchwork.kernel.org; Fri, 21 Sep 2018 04:42:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3GgM-0005Hy-VG for qemu-devel@nongnu.org; Fri, 21 Sep 2018 04:21:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3GgK-0006CM-4B for qemu-devel@nongnu.org; Fri, 21 Sep 2018 04:20:58 -0400 Received: from mail-am5eur02on0705.outbound.protection.outlook.com ([2a01:111:f400:fe07::705]:42144 helo=EUR02-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 1g3GgJ-0005vY-T2 for qemu-devel@nongnu.org; Fri, 21 Sep 2018 04:20:56 -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=bzfkAEek3synxTe6PSOGhhhEd/K/up5EhGpjeOvn+5E=; b=dfQyz9Qs6ZsyjDtbjM/ss+28/9z0tZKIi/eeGKcZRhkla+etuvWJwdJq2qVHhuzk2bzpJWkpq4PDzT48zp1R62kmRXwRNoOUGYuXDAIn4uhNaiacsWSAz3LQRNfA5lCvDtMSQK9FnQJrruCAL0+yKKxbXpjYdiZGaQ9X5awmx4Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; Received: from rkaganb.sw.ru (185.231.240.5) by AM0PR08MB3585.eurprd08.prod.outlook.com (2603:10a6:208:e1::26) 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:20:49 +0000 From: Roman Kagan To: qemu-devel@nongnu.org Date: Fri, 21 Sep 2018 11:20:36 +0300 Message-Id: <20180921082041.29380-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: DB6P18901CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:4:16::15) To AM0PR08MB3585.eurprd08.prod.outlook.com (2603:10a6:208:e1::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00e77f16-4a09-4bbc-4af3-08d61f9b23d9 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3585; X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3585; 3:TqmybcKebp9XdOIhAgXpFftkK7CBnhgy+dVhiisCvuMRiyth3ZHPeXLv6baTsnQUw5ik/HJKifBefhhvySM65kzsZJqrIDNdr8qzSb3Su1nKBhqq4xnZ01iNBkNqMxXy7kzxuvmn+SXV9OXkQX4tAysVDEtM+K/Rq1UkaSTTDsJpE4w6CilATaZeKuQA2I3uyJYjMQX+5x1S+HzqhOp0Bh78DQVC0mA+fPoYaTfLyCl+T7QSHP48TgC21cUIrJB1; 25:PJTd8IngcFSya0LkJB7weOwL+podCVu0mOptSmYzWz0ro8JQvzqjohDobSOItAgIDim5eewJxl3VJS+/gu/PYrJvQhDmO2xabTCpPPJWFtpY1xCutadnViXWm6tk4Iko1blAXdFS2y8f9/FHxdBuBuL3LMGxp4ovkTt6ZHMTgBL+cHeW6z+ZcTDjQAb8BMOZ+QJ+C3m8SIWqtEczdv7t6udNsxsHtQWPLOX0zB+UVXwaXEOKgI8XrlbfCL2JJrTBrbwXmjSBpmCePVDSxHUpZkh84ZwW8IS1qlxqpkaYg7E9urFyTR+9LZJXMXqodxzamB3G8xy4KY2MuUr/6O/w+Q==; 31:uSkuUkt4k+KmTWJ5FpTzN90WHgTpe4PiTbjAQ4YqvvVlo/2/28q3wgfYvmjOt1uuSahx2D8Nno3MAFk5qQMZFob/lwvARo+JHXoYt4xCfcITqwd2fEv8CagHGhadcjJP1yXJU4ulwhzHEpnQ9pR3rOW9MFNmyEihzIQ4vo3AaEpdYyJYTwpVPsD0LQyGvOtsKseWb/UxIp/xuLfVFrLuNory++r7HcfS6ljlS6ltIPA= X-MS-TrafficTypeDiagnostic: AM0PR08MB3585: X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3585; 20:lyFIzBYX8qpUQMyQJXzb+cr2LghIOD8/7w2GAjLHcmU/QkoOeKJMvNs7KYpdPnh2M7VlizbvM4RFv724u+tcXgDskMLCf0yXEghTwYSg80RLnldxYHCtIj+G/Dh8BfphbFWoNIrMVBQVL8DnrDDSgNhKrwtNwk/lb4JKs55WceR1HQ+VvHuuVv431DU3YV9Hosu19P6v5VMYJVaksUBwMLepAc635z1pJzLrVys1S15LtWefYWCtuRfjitDBUIR8ebd0vYQeq4ym/svUN3iTu37sCelgDPVC7fsstpBae/89IEXCM5RV4orLaFvH1d/opK6iFfi7bLq+KaGdxUkiso9AgDY2SQYT+6eT5OzFL8tb4XgERuyxrz0Dr3CMfNCpqMKjWMMvVNQZJDfQGj9d/gGqV7+yuge5uqzOKFmy/JEGVjnrk9gSwhfVZBhQGACEzBi+ExBlJ5F3LkJZaIf9JIZ1wrZ/nPM4Xf0mdlthXrsNm8xZ7rCl4nUFGWy4cDeM; 4:CTlcHdbB+WrsOf+sZhjPsuFnFLyMHYmxyiO+7isO67AzZdD6okTQFRIk9cv6cMDRV86wvoD7hk+VbeVBBENaNQoD0uJc7FexGY+VwqULIvLU4PIaa46buej8PILbhUxgh0CtiEcdYukj7c/BIK0ZEPwDDxXBgmyDxiYJiG1/k6zp3rG1tn/VLrsEdU/HUHpipjXac6ASZNsOu4UwTjhq4eT1u+Qjxwvr75EZimJy+2QCcu0i9ERqK/fsEAxOrkeTAfmIvIqFHjdoFwuUxKPZ0Q== 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)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699051); SRVR:AM0PR08MB3585; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB3585; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(376002)(346002)(366004)(396003)(136003)(39850400004)(189003)(199004)(86362001)(6666003)(4326008)(2906002)(16586007)(7736002)(305945005)(50466002)(50226002)(16526019)(52116002)(51416003)(478600001)(6506007)(956004)(2616005)(8676002)(186003)(476003)(6916009)(54906003)(3846002)(48376002)(25786009)(6116002)(26005)(2351001)(386003)(316002)(47776003)(53936002)(5660300001)(36756003)(7416002)(105586002)(66066001)(486006)(1076002)(6512007)(6486002)(68736007)(53416004)(81166006)(2361001)(97736004)(8936002)(106356001)(81156014)(69596002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB3585; 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; AM0PR08MB3585; 23:isNl/kjAHRq7+6lqHGDTjVGfpEIvbeD74yIR3bnON?= Ff3xx0jYHms0qn3oBC66XdniuaS3OEjnaxDVeYdyorDW+p3NmBU96DYT/MStNf+54UzEOSXqS3eXc65oANYTI84Lfb6xWWt/Ee5T8OQWRXJhQQ2vCSWdDUE+qiCLkRQE6dzezUoz/3t30moL14uGHJ9QfhIHXpL/WxWOkjwAUjRYWtm0fEddKCay/qFTiNfZjEDHAxum3I/WnRNfxJBQhEgubpQ15ctnpl8S19ohaPhfTNYqq5Px+fNEuqbeaDO3xjs151W65fx7cl2andJLQtfKMjONxMKJSOGJ5SxvXGm9PSewrEKFDVzIjhPEYSZYLc0cibucRkUo5stQZs3ICkJ7YrByi727GjpYs8aPRcR6io7Sh+XqFVVG9d48fcII8F6OOLeq7F6LDM1dUsKg0A6hh89TqCrELTKWMC8Ko6VG6kaBBPPcp21a9wJk8nH5v2u/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fx89yQJL3kdyolxErKbh5D2N+m4LvvbS1DDGMm+pjW859Nr274vdKRpseWeTxPJr0j+YKoZ0btyAPtQ= X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3585; 6:45e6yPlnok61d+zyTsDsRq8r3F6CNiQ0Ub4DriBivBi6TO+IodW57GKGnVcBNBMdOEk9DgyGGln6/YaBqwfAwJZTbeCZDOwYkNd87ojaarj8duHueEQvz5osO3yxO5M/NVzxO1S7sLzgaN4HZ4SOz2arzAifkA/Du3ZEq9zXVDangixBTf650YyN0LlnO8L1tl4ZRhPEDIsmW6vLuvaG257zwtTecf8xjRy1dibUhOSEZs9kFH1IbPEW2GjRu3zKCCFMMyiHoqCUYa3ikygDiE6z65M34ofm/0JItBBGB624l2wCuADwdEtH+Q9O0W4h6l+xnMWDqlWPqN9EffxewcN1YH1cRhGfkQlX43dXvTFZ842xZHHmtcV03WC7oC+yHbzl5pX+jg+kQs5mntt2zaiYLo2ePlnyekS1zLoezJkK0Ti4F3pVRS66YgctKkSicgYXXztM7HV1Y+HiAJzsAA==; 5:VfeCPCUbgZveJ44GmYISh0jrOdV8Plzl2qa1OQnoiMsi+rPWebI4XGGkl5+jQNVC5cTSMJec6Cy5MTuJZTPIYlRgndVMoTaPDr8s3NCo7F/OwldsfIssyGeld1UsfBXH3PT+/cU7A2u57Io9poaP7UJq2y6x1wSrBgbw3+5tzPs=; 7:Ebh6uAVo6bV8FteyGhKMHSAO9glSuI3rHQOZe+hqAS9mLTReqoSi5J7g+056F3cN75Iu+8Y5Mi0lTd9H5udawHsK6mLhN2RT3wr41GKR8jO3SlFKh1xj5//4NC0fMz6ll6zIlhiLVlt46BluXU3ReFZ6xPtuF5mwNtS6+NrcJ3eqobg0zIBLoLsM314mWlX5c2JViTW2sZz9bhIWyBXbwtuvQv8A+m4DHYMUX8SDCbHxXjq3jkMeLJNllw1Ly0rb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3585; 20:zbUkStyA5tBt4Ud83soZQLc1SsNoSMgA9RJStLq0J+tAkc8EYCmXjd/gKb3hYjpVm1twoa/VEMw08fcOQfvQGBIZ4FBDr09Kin2S69/KjtVbtCUBclle5YebhH0RtUrMoYUjiSMEtvYV23yMS5iplted8OH6eGnrBZdC8WT0a2A= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 08:20:49.0451 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00e77f16-4a09-4bbc-4af3-08d61f9b23d9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3585 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe07::705 Subject: [Qemu-devel] [PATCH 0/5] hyperv: move to hw/ and allow opt-out 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 restructures Hyper-V emulation code such that - most of it lives in hw/ and bears no target-specific dependencies - it's only built when CONFIG_HYPERV=y (default on x86+KVM) Based-on: 20180921081836.29230-1-rkagan@virtuozzo.com Roman Kagan (5): hyperv: split hyperv-proto.h into x86 and arch-independent parts hyperv: make hyperv_vp_index inline hyperv: factor out arch-independent API into hw/hyperv default-configs: collect CONFIG_HYPERV* in hyperv.mak i386: add hyperv-stub for CONFIG_HYPERV=n default-configs/hyperv.mak | 2 + default-configs/i386-softmmu.mak | 2 +- include/hw/hyperv/hyperv-proto.h | 129 +++++++++++++++++++ {target/i386 => include/hw/hyperv}/hyperv.h | 23 ++-- target/i386/hyperv-proto.h | 115 +---------------- target/i386/hyperv.h | 15 +-- {target/i386 => hw/hyperv}/hyperv.c | 79 ++---------- hw/misc/hyperv_testdev.c | 2 +- target/i386/hyperv-stub.c | 33 +++++ target/i386/hyperv.c | 130 +------------------- target/i386/kvm.c | 5 +- hw/Makefile.objs | 1 + hw/hyperv/Makefile.objs | 1 + target/i386/Makefile.objs | 4 +- 14 files changed, 201 insertions(+), 340 deletions(-) create mode 100644 default-configs/hyperv.mak create mode 100644 include/hw/hyperv/hyperv-proto.h copy {target/i386 => include/hw/hyperv}/hyperv.h (59%) copy {target/i386 => hw/hyperv}/hyperv.c (65%) create mode 100644 target/i386/hyperv-stub.c create mode 100644 hw/hyperv/Makefile.objs