From patchwork Wed Jun 21 16:24:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9802257 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 4800260329 for ; Wed, 21 Jun 2017 16:33:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38DBC22638 for ; Wed, 21 Jun 2017 16:33:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CB9C2862E; Wed, 21 Jun 2017 16:33: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=-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 721E1285F0 for ; Wed, 21 Jun 2017 16:33:40 +0000 (UTC) Received: from localhost ([::1]:55064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiZX-0004sF-Fr for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Jun 2017 12:33:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiSO-0007KT-S7 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNiSM-0004en-6Z for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:16 -0400 Received: from mail-eopbgr30139.outbound.protection.outlook.com ([40.107.3.139]:30159 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 1dNiSL-0004eW-Ol for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:14 -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=0ncjVFoZHxNXoPTE0tnQtgq8yxZTw0FAP85WF3MKSyc=; b=cbzJEdUsSrbl8BGtsdUYzpCZG2C35gUFvTciyxqLcRwoOTtDxgx0fyB33dm2T5AOFrtWgYQI+6EyudoBOjDz0hMeuUb58tH5hqwfWhITrd1Jo28FQZsygWRuoheVl0CwxSJ9HxRQCIFJiBZmDw2GjHp1aYX1OmbSmtZY2rmiabU= 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:26:07 +0000 From: Roman Kagan To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Date: Wed, 21 Jun 2017 19:24:16 +0300 Message-Id: <20170621162424.10462-16-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: dc125b4a-e20a-4b86-f9dc-08d4b8c23acd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:HE1PR08MB0842; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 3:26IK/ohfLDKsJIFjiC9tl7gJekca+ywQCZAtia0TM5ko+GShiXvoElMZeqzgJgosZ8vi4YPky8IUyGVCpH32KwwtVrLfCaWrXnZHd1hp88jiPhZhWpoBrSJLzXjwMo6zu1ifss65woHD5MUO4BUo8namKPgDoyBXx2G15Md0svMpj3w36PHdZK5pI1xuYdCVIMBLAmyRPnd+RR3mlWdiIBOOsnbe65jI2poPQkr5pvDHsGwzzQN9xzNA3RYyotNWjU2ILHHzEXldG45oeq//19yFrmCvLHNVG6cjtUl5Y+amyJhTSpFb0C5SnFPOeMxAkcNFaQuvIT4jshEQmSaK5g==; 25:dQASfhX68reiTJE/nW6rnhC5caUI7hM1VXWRvJ3h5GY6Aarz8cXaW0b+jwHXmNRTHt5gLqm8qSu7gJMitwFE8wVMeCXt+1GgcuwtknUHJdHuA/vbrBFBmHePDYwHPGvVw6/RIfXOJmsidXEIPGPpRe4HgDkbUFbBm5gDBMUoHWH6xhmoIAF0Ik7X3TvR/CLvqCs53S154llMRB3VKK6YT4eqCqo1hzhukpEZ74IaOneXAqfTWpqJxF5IAL32aGZ4MDCGo3rvvqMiHrP2GUKZBP845+jNBqZNhNkV35ugvZUboVNo/OMdktxlomyZwl4OhA7o+TuQECgAhVVNIy9DNdQiJDhEJXc0tkc3iA5X+YC+6O+tUzYiFLfGWJ9U/cFoKfxoi0XyH2Ux8za0y6WOuK5uJnkqIGGwAyk0PFzPU3JwGIPNG52MACcVDsafAUpAkcEICTXDsge7wYFoVJkfR6rIItqhP+JZYekyPu64iuY= X-MS-TrafficTypeDiagnostic: HE1PR08MB0842: X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 31:tsyaMJAaGwqGUzQusKzV0QG0uUzuOM8frERoVPsRDDWT1rW67QJEvJYEicvsGefkiswHYzyxo8+VZwzGuSENYbvTT8BatYZg/gFtIq2TpHntw1lIfC66RtiXZ9CrKcYK+StLw1e3WjSN8OJC0KikQs0ogemI50SjRmvs3j/vIdBMTKyTmFq7D37zfwQmhUPCHibY1Z2C2mJAb/KLw56uwlht6k93kJUVJ9/sRcJ7KcQ=; 20:HdZpNKccaQEOXPqYpaqazpk0BdfXufu7Fg9tY48lNw7nK1mmC9OJBYOtjcMZUzKJzQTXgiCXlFM1Xz1k6iLu+KZ2QeRI59j40qdKX/EB2Im/QhJ27Ev0nqVR9saLQH4sejZGofc30gVgt1PwHrTVty8CfTEyYtra9l6HaQbpGC5PYDVA9jtbAJcSgI9zxSFq8uuAjS064zZTZyAyU2UArfMqDKI7utrPbyasLsaufCBrMxM4TLxGnyfSm+Gya8NVulOaJkrJMB/SDnyI5i9p/omq+c5GsqLFLWsWfhHJIAVk+gHPoSAl0ZvSLxLiFjLzlxAIEv8MczrTiHQSqp6e/bo3p3plKM3HUI0V6YxqBgYmb4KnNrLNl1pLTyjUwuNaVkaYe1eazg5YDhnpgiQP+sIYujDmgz7R2pte/0Pkpzg= 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:fNOUUvFaZB7TuO08At5uhW0/1OmxBGdT57pYhuNZaM?= =?us-ascii?Q?MbR7FZcDggtUKUidFLBih/TktR9WKIApp+wMJH2BW5EEBiDrUOnWTMja0nsA?= =?us-ascii?Q?r44O8YbBClPvqrprKbRwzxF+eTHg5p+Z6BF4pOlZo8pmRg4A1jsqxPwtssRZ?= =?us-ascii?Q?++4AScIlZLuwvfT9/XnBLtoga8w+PMQhXn6ZFBdIVeHI4cIu7Gj0EIXNgy1g?= =?us-ascii?Q?pxkJ+ZYpxyZSOgkWkn45oXjC2rAUXxdO2gt2/nq9ow/bghO1A773w4poiDQz?= =?us-ascii?Q?8ElrX1du6oTfnhlyFexZFfUq7sMUxD3Z6ZqjlSV6hio2lUTEp1+f/eghaC4R?= =?us-ascii?Q?1sB0GUf3i+MZJMJlevsKnrj24ADuF3AQC0TUqTusEXpZ+EKMcbSSEssniMcs?= =?us-ascii?Q?A7a3I9HdRtOlXkIQPvonqf3ne01dOIMxoPGaWo+rU5omlMiXnL6bIMC0kqOt?= =?us-ascii?Q?wBy+hwIauLh0Mruia5T2NfNpcXN1UkGfdh2lm3nwBkin213DXRIwVo2VGnEu?= =?us-ascii?Q?2KYnkyBZG6EYH2Kz2fcZE0302qYBrBILTNM75Df3qcgLydlbnLY6bnYY/rbs?= =?us-ascii?Q?q4tClZELGJZ7jBRU7126/lmw/DUln116zx3t6EH7iq4Y1Cpw6SVlDuzvsGa4?= =?us-ascii?Q?KqY/mEa6Hu1ZY+RFZkLTWhZxWroZCcbP4kGkwldKZlJwHz1IaNfc0RrdBolS?= =?us-ascii?Q?Y/awLI9tlXuydDZ+/eH6bNnInWd83ZY4I4XDEtE/mDYLwkjNbCg3cZSXwjf8?= =?us-ascii?Q?IPyVXZEyAHENxg1QhNPRlzDL6Rtxj1P0PwAjZwEL9P9J4U8o81s32ySMCbo/?= =?us-ascii?Q?l4xzp119A5bXj67K1nbi7nhVSg2hjHq9HcnQIihmX4T4YQIdS7PlGDmG2okn?= =?us-ascii?Q?KPnOtztOmptz4eIb42YA9aSU5L18hDfi7Mjk8NfbUBy/lq7i+QyBUUCatE2E?= =?us-ascii?Q?38AHTeRTPjmj1rj4v0hnHegLgq01KChdalKC715wc8g1+NRULcDME47pfkp9?= =?us-ascii?Q?XeveWhA62/85oRcMWFBfbkHoW/qTxxgRxQvpEWA+64NivJwYKeVwi5LQ0h7u?= =?us-ascii?Q?94mF6PsJ55URagl4mKYjYkBtFD+NrmehP8HkZWrk+Nm7PCdmQJrCViKUn+MN?= =?us-ascii?Q?QMewQa5q6bV3VYgH92ehM9Fr3Msq19?= X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(53936002)(50226002)(305945005)(81166006)(7736002)(6486002)(189998001)(8676002)(50986999)(76176999)(66066001)(6116002)(3846002)(2906002)(47776003)(25786009)(5660300001)(36756003)(1076002)(5003940100001)(6506006)(53416004)(42186005)(6666003)(4326008)(2950100002)(6512007)(38730400002)(86362001)(478600001)(33646002)(54906002)(50466002); 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:6McYeDJBT+SRGpYku3x57vZeTrWUaJBd9xNDMJp8k?= =?us-ascii?Q?5tM+ipb9HEhfjnVSGH0fSIGkj9b/KxwLYBMENfDDetfEimWYXJvXe+k7mxR0?= =?us-ascii?Q?y0sKRNAkHbtq4/t+sZZRAwLfM5ph/UyvWF91GEIjHDx2OaySRn5GG7Yuq04q?= =?us-ascii?Q?z0WFMvt2sawPuXXS5Q5KVLdq/bd+Qo+fHaCuKdReeruZje0pmlb+yt6OJ7k9?= =?us-ascii?Q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JCVPS8jq75P+2Lp6tDM?= =?us-ascii?Q?jEMytNFieLgYfR14kYdMFAmtaExF1L8rZm/qPXnWpzYkFLrP8MQDmc2Rrc+J?= =?us-ascii?Q?A=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 5:t/ZqMERxvfmrLrLPzg8mMllpPQ6ayGBMgu0uTCIzRIYLTKha8UhXisPE23O9msGN750THAB+gYoQ4kvJ0G7whrTyjOGUW1jyA9znPUlySDnJgqalLtkXc0iscN9dxrR1jaqHe2D9CXcV/Kuwe2ZjPMJ42rGtr9k5BHIhd4Wv0LLls5X2O4cEq/6rq6AFIoSXLEZYszalxxkrz6Zha10n4om6pdrgbDx3SxOSYLEo6OjjppeQ7doMQnaLfsNqldXIhqlx9XMfdyrCS4njoNgewWdmJVslida8y33bdEuQjPSjeByYJoV0/tTQj3a3ID3j+RwxJST6H8KnA6+ekmGoF09AURR1tXLSGymXBT7bJ3uwrwdbDuc7KJ1TPOvEHyR4Lx7n62r8fK7OtBHzwnbo/1ufeHYkViy5CBeYdKUz+sTUEfNVsQ08Q3wHM443cUZ1DnR68y5EvrVuZWaW5xPAYPMhWCTDD44nR3IpsbNLvInb6RGfjWZQNgCqEkp0ZK85; 24:sZ3aF050D5Q8ek70QKFgAMt82pmem4kP4SRR3czr0p+D34sNjfKNgDGHW+O8KqOr3Hca4NKUXOiMLF99YEGR2mTI3guqLF3ui6QSiYt1EWI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 7:Vt30G24uCJb9ig2MYhVAgjq6yTohwnV0EWMwF+lHslmoBnrX1D8pWVh0fAksiE9fgZutr6RbtfNcNhw5/93vT0CmtHT8zfHuxGp54WvUbykNb8/2kUnQVfS8B6uyCqJaUCfL1hJZAd+75UGd8lF6l+CZg/UhVptlZg152l1iY62lF9UxJb65tDwMOnneXETObbmTWm005LLpK4kmzaocJ3/idi0I3qyxCAhOog/eLK1d7fQ6Zw+v3Ia702jjNSlkng8Do//Hd6nAyVAsk+3/kkm23mFhMoS3Bi7sCUiOZtXNd/xgAb0wCFbgAtjTipcHcDkL9AqEuQMdQDVT47bis8+vv4+K0Ic8So2DkX2Fa20/x0zxxQTMtqj5HUsL3U2FIUJxXdubtB+TiVj2415xdfXK4lL1nmBJpiVuw+3LYgYcQALOnhyuPZbqjVxXNHRuFh64RRAZJ4CNQJjPsSpfJxm6XxlpJjqNU5ff3g4krVoESZjnq9qhXU26rUL0D2G5FB3QJA2zWc94W8hoUSAFXnGuyHONMQPOqUAal58lEzMj3wdrcK5P6lRfK8a728bQX4l2iZNQVHnBf0Uw3bSTyGkhAbzod5IIQmh+HAxXdC0RvOpiR3hKK4R15oTOMoB2Jimlzo0Jrjs4VbXFnF0K7rDvYjKKys72Ekh5kQeReEA+FgBAOKXEllHmZqyQXrWwTLf74tmooVJPF5MgBAGFYzXzRmRdvYUiSHCRy0s409h1ikv8JWgzX2vLnd2upm3Nqi0k/Sxl9WBOZClQPRV9XYfE83b9Avbf63CtrCZsun0= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 20:oxvSuW9y/rNtuT5EITIktpOCTrqEzFD+u5qXWZJ9ktxaetDjm3e2e17zv3A/zZFhogfqQVHDwR/oiyPfWWeZojpeHXJNh/5d6mpedUvrk4CsYKk1ZPvcbS2gYr/lvv/EzWi32Gs/5tammjbhGQq0CD72FLgBwQZJVyLvKDHxASw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 16:26:07.1761 (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.139 Subject: [Qemu-devel] [PATCH v2 15/23] hyperv: block SynIC use in QEMU in incompatible configurations 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 Certain configurations do not allow SynIC to be used in QEMU. In particular, - when hyperv_vpindex is off, SINT routes can't be used as they refer to the destination vCPU by vp_index - older KVM (which doesn't expose KVM_CAP_HYPERV_SYNIC2) zeroes out SynIC message and event pages on every msr load, breaking migration OTOH in-KVM users of SynIC -- SynIC timers -- do work in those configurations, and we shouldn't stop the guest from using them. Instead, introduce a SynIC property that disallows to use the SynIC within QEMU but not in KVM. The property is set during vCPU init and via compat logic (as older QEMU had no users for SynIC beyond the test device). Also a function is added that allows the devices to query the status of SynIC support across vCPUs. Signed-off-by: Roman Kagan --- v1 -> v2: - new patch include/hw/i386/pc.h | 5 +++++ target/i386/hyperv.h | 4 +++- target/i386/hyperv.c | 39 ++++++++++++++++++++++++++++++++++++++- target/i386/kvm.c | 12 ++++++++++-- 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 233216a..72b5c62 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -389,6 +389,11 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .property = "extended-tseg-mbytes",\ .value = stringify(0),\ },\ + {\ + .driver = "hyperv-synic",\ + .property = "in-kvm-only",\ + .value = "on",\ + },\ #define PC_COMPAT_2_8 \ HW_COMPAT_2_8 \ diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h index 20bbd7b..7d8753e 100644 --- a/target/i386/hyperv.h +++ b/target/i386/hyperv.h @@ -34,8 +34,10 @@ int kvm_hv_sint_route_set_sint(HvSintRoute *sint_route); uint32_t hyperv_vp_index(X86CPU *cpu); X86CPU *hyperv_find_vcpu(uint32_t vp_index); -void hyperv_synic_add(X86CPU *cpu); +void hyperv_synic_add(X86CPU *cpu, bool in_kvm_only); void hyperv_synic_reset(X86CPU *cpu); void hyperv_synic_update(X86CPU *cpu); +bool hyperv_synic_usable(void); + #endif diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index eff612c..e183638 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -23,6 +23,8 @@ typedef struct SynICState { X86CPU *cpu; + bool in_kvm_only; + bool enabled; hwaddr msg_page_addr; hwaddr evt_page_addr; @@ -78,6 +80,10 @@ static void synic_update_evt_page_addr(SynICState *synic) static void synic_update(SynICState *synic) { + if (synic->in_kvm_only) { + return; + } + synic->enabled = synic->cpu->env.msr_hv_synic_control & HV_SYNIC_ENABLE; synic_update_msg_page_addr(synic); synic_update_evt_page_addr(synic); @@ -154,6 +160,7 @@ HvSintRoute *hyperv_sint_route_new(uint32_t vp_index, uint32_t sint, } synic = get_synic(cpu); + assert(!synic->in_kvm_only); sint_route = g_new0(HvSintRoute, 1); r = event_notifier_init(&sint_route->sint_set_notifier, false); @@ -240,6 +247,11 @@ int kvm_hv_sint_route_set_sint(HvSintRoute *sint_route) return event_notifier_set(&sint_route->sint_set_notifier); } +static Property synic_props[] = { + DEFINE_PROP_BOOL("in-kvm-only", SynICState, in_kvm_only, false), + DEFINE_PROP_END_OF_LIST(), +}; + static void synic_realize(DeviceState *dev, Error **errp) { Object *obj = OBJECT(dev); @@ -258,18 +270,24 @@ static void synic_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + dc->props = synic_props; dc->realize = synic_realize; dc->reset = synic_reset; dc->user_creatable = false; } -void hyperv_synic_add(X86CPU *cpu) +void hyperv_synic_add(X86CPU *cpu, bool in_kvm_only) { Object *obj; + SynICState *synic; obj = object_new(TYPE_SYNIC); object_property_add_child(OBJECT(cpu), "synic", obj, &error_abort); object_unref(obj); + + synic = SYNIC(obj); + synic->in_kvm_only = synic->in_kvm_only || in_kvm_only; + object_property_set_bool(obj, true, "realized", &error_abort); } @@ -283,6 +301,25 @@ void hyperv_synic_update(X86CPU *cpu) synic_update(get_synic(cpu)); } +bool hyperv_synic_usable(void) +{ + CPUState *cs; + + CPU_FOREACH(cs) { + X86CPU *cpu = X86_CPU(cs); + + if (!cpu->hyperv_synic) { + return false; + } + + if (get_synic(cpu)->in_kvm_only) { + return false; + } + } + + return true; +} + static const TypeInfo synic_type_info = { .name = TYPE_SYNIC, .parent = TYPE_DEVICE, diff --git a/target/i386/kvm.c b/target/i386/kvm.c index eaa2df3..8d1d232 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -700,12 +700,20 @@ static int hyperv_init_vcpu(X86CPU *cpu) } if (cpu->hyperv_synic) { - if (kvm_vcpu_enable_cap(CPU(cpu), KVM_CAP_HYPERV_SYNIC, 0)) { + bool in_kvm_only = !cpu->hyperv_vpindex; + + if (!in_kvm_only && + kvm_vcpu_enable_cap(CPU(cpu), KVM_CAP_HYPERV_SYNIC2, 0)) { + in_kvm_only = true; + } + + if (in_kvm_only && + kvm_vcpu_enable_cap(CPU(cpu), KVM_CAP_HYPERV_SYNIC, 0)) { fprintf(stderr, "failed to enable Hyper-V SynIC\n"); return -ENOSYS; } - hyperv_synic_add(cpu); + hyperv_synic_add(cpu, in_kvm_only); } return 0;