From patchwork Wed Jun 21 16:24:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9802297 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 D29D960329 for ; Wed, 21 Jun 2017 16:40:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88E2A2863B for ; Wed, 21 Jun 2017 16:40:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A2132863A; Wed, 21 Jun 2017 16:40: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 6C7F22863A for ; Wed, 21 Jun 2017 16:40:03 +0000 (UTC) Received: from localhost ([::1]:55098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNifi-0002Tz-4b for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Jun 2017 12:40:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiSJ-0007Fw-UG for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNiSH-0004db-8G for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:11 -0400 Received: from mail-ve1eur01on0106.outbound.protection.outlook.com ([104.47.1.106]:64350 helo=EUR01-VE1-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 1dNiSG-0004dC-N9 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:09 -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=zgcVjTGGjNKKbRPWEJBb9vfHaFgdvqNjMhRe0WXMKbE=; b=Uvgd4DzqUoHpi1Z48yS8aYEEEjfbrb+janKEk6gOpR+9b7NVImqewU+uDWnWUOGYQQjy1c099sRHZPtHcA5TgvB7KmeEehgoi1EKyJrtknpwmlNIIqEirh8etDbpgbm8sW3USTieGd0DNapxzz162mbi6XryLBiF/VT/frVAxPc= 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:01 +0000 From: Roman Kagan To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Date: Wed, 21 Jun 2017 19:24:15 +0300 Message-Id: <20170621162424.10462-15-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: 9c745090-0ba0-4c9a-3f61-08d4b8c23790 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:HE1PR08MB0842; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 3:VJZUzlmm4HjRcJtPSI9s+/OUlSclgziM+jB09kxQcETWlaBpDHAJAonhreFVGoqw7ul1HBpB6HB8eBa2bQzFbdZEbyk36sywq9uOp/yty/+1McQS5NbJQK+RUB0Ye0/gtbBXj1prYkd7Zid19kweC7f0Jy2jZ5yv+suOFnrGqcMza0es8NkEPvtzzfd/noMEkN6pxfAPWZRzmrQFD+sVVWdh2ou4yxiZgX5cXHOotgyyWLvUqQYUOTskynz64MxsPGG2Jm0GSeBdisXS3cjchaTnkrLx8eTwNVrTBvNKbadru8+3X2Y1GYtWqv5rT2AUlPkUTQeTBDGaPEV6jebvsQ==; 25:jjBTC9l3R8UJ/PJ/CfCHL+TWNuc14ADdpb/j47XcFATpL8bHBGwqQDDf2hA92i0SOZNulvSisiMWatUJ28rF75G/OjB9IRjCim8aoErfUgKIPSUfS5zckVnaDHf2ChsQEeITqLIW8IdXEHQWdWPwwgYVo4X7w5FB3WImu5Lv9QybZEVSN51zacr6rPTPeVJYXoLJU5uVe3PykTuB8nfPk+hzylDvU26IZNp/8E5nyj6VQ7QrLozdkZXRstkHPj78j33ijjLjc8pRlBytwfeErKuUyYg9CdhReU+bRqLtLXq1UN1vZIVKcmJQhmnaerGn6L5ntxBvX/kro9ipX/ozqzaUMRsw7JJJpiNRT8XT4M9GkMS9vIyR2/xRrl+EV1b6eBbt3zzbXIo8kaVx+6VgnPj+JspAr3vdB7GKTr/jVX/LApIt10VYBANzCsDDohnpIcHnKUyDIbxCKmNGjlCBj1MxJ/RJqjc0YEpnXKdVWjA= X-MS-TrafficTypeDiagnostic: HE1PR08MB0842: X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 31:HAuSAG6VWQa67nPLUnUaCJ028reFGLFdr/bvZMJy3fdjX2np9WTWoxyTSRJpOUOygmAA43fEvju+b4yGMUrBkkz6qK4iv81PJHzew+mkYey0zj80fuv0ZASV/NnYqRWS+JKCS7YYmqAyFVbTSJ2SHABPCsZxXFM4BeYNip8bUA3GjD5+pjxAUCt0z784kM3W4q18n+ReXlh4YmJJYAuTcw0iFXGOOTNVPFhoskMGZZA=; 20:uAsyPtMWJrHS3PDuM++4q8lrl0xs7bKxiINfLMBgEzNSdRVa7u/C520gm/j5jCMFGjr+4u2YPLI/7TpsxVrw8PdNQF6IvxhfwsMx5ZxwWrGtw+QBbDQkbKojwuqcIPKmAHrLa7PUVSirddSNdRi4a3iwWA3mcgRaO+LbrkVzs5dr58yE14K9tdiDBOvf2AO4ZxbIQoIMNhXz4NejJzpmXvc3l4j4E+3V2uaLDdX7u7KKFmYPGgHdjWIIUdvPJ2EWu4HLzBrwn6nkpIRDjKH8YskNIpDyf6dy8TUnzAxlFQ+BtFHwEbOwaqT/NXziZdhAQ0ebyMWOUbMWgiyFasu337v16In3k11qUJc3rmnsF4XtPEaa+Bk/Zvq2JvejgjML8CpTeUI2/l8eB/E4EWTxzC3dlS5eMlxArqUX/Tqybnk= 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:gUxuqHmqn/GTVjlt6IqY2Uhr2vKEOoW0PWAAXXKZN8?= =?us-ascii?Q?EbhBYomKhqITh7kpayW8xcl45/ML07OKVOm4LTnNZNYaHXIPYlAfIDO+ZmBi?= =?us-ascii?Q?A5CBmnATHqWG0uz3OpP+yMZGdD7XXNyFlu39JZEqWCnbJv0F/msC3jPok4/x?= =?us-ascii?Q?KtxZSoxOC3k1jlMZmjl5//bSmb9B0aP0mun4UnlU82AN8rI1U12oiS1ZOT/G?= =?us-ascii?Q?/VhS9/yngizg1hDMcxFpNR7ECGz2Db/jbnZySjUw2bFqZ931JTqceHSFSVF7?= =?us-ascii?Q?t3Iw3hqzxpA7Ux7bPxJpGbCZpgNr+EWaarI6gXo2k1y6cUrgCp4jkRyfQKbR?= =?us-ascii?Q?KJFdb+KOHXj1bR0YYPBCVyNk4OPS6pMwF+kLI3q+e4BpaqhDxyHLyALs0Bmc?= =?us-ascii?Q?zqlLRz48OamBEGHaTdA85e36yRVMILRHV4yb7shdsC1r3kEKDRsJ6y49X+mS?= =?us-ascii?Q?fE5uEecOJIQaIiQkbpO/KTXQXlMxhuqtOg35m2UZOR00hbAdf59w+AXG5vCX?= =?us-ascii?Q?2Fd2lX495pIk5kEiB0B8TWQjx4pP2UNiIjzuMN71C1wpzaDCdIvnoOqFf/qk?= =?us-ascii?Q?HN02l2p4DQkZPiPXCvpWY8JfylrQLoScReBJTF3vi7gEX2g/1nUEn36nTgRc?= =?us-ascii?Q?KiiyyshjJ80zw0/rFhdO3FCdQHgsRkBp7SGdO8aKrwS4SfR2eviEN/DwuHKH?= =?us-ascii?Q?mx5D8JGi4nPxEojAZGOTFfgU4yFF/4h5aOElM3/HQ/HUK2INY3XrvCSkrjgr?= =?us-ascii?Q?Fb/shm0fa6R91Eh4jIUN5IfMPfdA0NUOgVh2arj+IXp0psIN/PrxJYPQDYZb?= =?us-ascii?Q?Bx9Ci94Y2UPty7k1Uu9gBngqwjN+rTAm0DhSqKhzwKrjMtzDSq97IYVdVZfV?= =?us-ascii?Q?i5emlzjJJ7TRH34D9M3xPNGRGbT+7+D0P3GIdc1qXFXPXefGoeERU+3MiX5D?= =?us-ascii?Q?9bAzc9bhZ+S/r0IFybJMxibxemeBQ+P56JqllalwRcCH0j7+WzcCCuuzQ+ai?= =?us-ascii?Q?p6EMhTE5CAx3Zo5QY0JZ3lstlKZ6K8J5256jqvGKuecnR8yOjYVi6FkoGf/L?= =?us-ascii?Q?H6oLF2jV2iUCa7N2GDQ6vvJbGfJEY7yfHLYTfiN1GeN2v/w25StW6IUI2T2C?= =?us-ascii?Q?xxS6kdtwtObrAh2z5amp8qJxsQuLYC?= 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)(5890100001)(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:f95OLIvpEw6cGub7JiA3Z6EkTdWwax+SBqi1cT2VV?= =?us-ascii?Q?ybpfHwgz9AZ1Aw4YRIYPSzCX5jGkFh2I7SxLhLuBf2FbrMJQV/ufUZHCpI6Y?= =?us-ascii?Q?DlVrgxz0KmyE5ZZwjcQ0v8Eptlv49bE7Qn+jhI4hDmJRTIWIQc+UeG5+218M?= =?us-ascii?Q?yMqu7KGM6sUh5zlCoEB9Ys4u5jV+77DVw8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ec4i74q4W4dK2TtBkDLQW33coQwIm0?= =?us-ascii?Q?NWmAvfiPxzNVRFLqrO/4SrEJtQpTQQ6LluZq5rhCrPy8e1OdQaqhyYM9zaPz?= =?us-ascii?Q?hIcWdElflsSOjwyZYH1c8jVquB3h4UYSjUgmDnGVOrPYrhoXhc8mW+y/jxjS?= =?us-ascii?Q?k=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 5:Rq8DXBpB4xJp/qa1+/becSYidQzApfh39tcU/WkgItWwOr17857VVL96H31L10YLrPJRx2Jx4ZiVQS0rsPl1a2U7KRMQLqceszRfAcXziqDUQVz8YOuYonz5RCA0ywmuldyj5qUnfLgKi2cC7w3jzNQgPWql52I8bDdWdB3vPo1RXlo/IZJqHbj1ObXGK8OReNZvqlQFgphWKTC3WcY3+MA7qZ0YY9ejPZFOW2kEXF380B+D0eOSUCQxYisv0xT4k5moJEWJWzjfzBYQr7j9x5JW/Rucrm6hYbfhUf7Ky78WiacvswGe4/Z/EEbkg1c+T/ws5j1Qh8yB1G5jofF14puD/aHsvhh3fiV9xcigIVJ7mj4kjnZSjkPM9BO/KZOKWoIfDdBxP974+GnhOT4IiYPwmyue7IGAr/GgwpABCFS+eOyyiNKUc1kiOZOClHEGhGBLWXq598tRnzAcsqoYin4XbiRNmsFewLevUF0rS3APDNoDeRIetrK0jg94YvF7; 24:I/P/M6Xgs5n5k1lYNyDFD7aR4pQDpN7ncuLHanzbXl+aI74elNPASiRYy60jOEV4yEy5VHHVUGarustj4sYJ0LIcEBeYJ/htf6F7HU0OsVg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 7:lr1Vd5RYRGVazsBamenCw24huztVS5xLbVv2ExpDj/Cg4iOWG6bZD74aorfWXs3j3Cm4UASDxAFysYgA/xaVoX/GI9m8N+8Lrk+n5Lz/O+eVkI67kna6CsdHOm62BBwL8KiX8EX4iBKE1cuNmjnPRYyOxKKfxguDVpkhng6SKXkXp8xhesWSMmcBCvzo0G7TcDMpn6UoVe7X8l9EkOtru6It8tqR4gsOmLdviEpVi4PcWgwHF8VwcaPMd4qav5onRKygPBawtXRNHmlPrQEExRgfNTaKpEqlvJy8jrrXbJmO+OGSIXWgcbfOhpjh5S06Lsx4MQQkAOPagGdD03MwsdorezO8mRpOad6AN2iffV3go3NYLExTgyL496J3hAVWdiNmG6SSojD/HvCe0sd5jPRL4K72Jz1H9wRb8Gg1xJigEMgPMeQWCax0NYDz1/bRVLs0hwIeipN2RODybtQB3EufEBxYFGciyY+ZB/c+OZaqW1u9+aD0c/IfnNnz6PwTM2eQLJ0aYyBInhYDOrQq7HBRhlHOHDPNVfiQbemXXwhJZ7RhxLWqjAFBavJzT2/fluRYsPDaVgzirUVxkhGfCh+769HwW4WvyFIhcWAcFWC4TX7i6G/8w4JzTb3A/Fgiy3dP51Y2NiEpPpFeDhySzPM6xeqULfCUzPaQPGfMPC8zDDpnoBRWEODIPjT6L9sUk/PFWMXjEWfCYgGSDZUwesRsH+C7QUtyuo+qrlbSFnNmLEm4xs+Vi/ZaVLVx9lxawo25MeMcSJFwA99KUVyueocCF4OWiJtLVSdxIlACr5M= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 20:pb72Hd/J0MDr3e8msR5bGHoqjrjYXJpSdkw5hWdlfOkTU35gIJLmZ4UN2Oduj2a8uZt0GLSxIPvwrGuIxfNdqoxZKuHtcPZBmQbVAUd8nnrXO4U2Axhf6EkCAGqH/IS6NN5NTMX0UuVAJCVuMNAdwQ7RXl+d5mRzICk+SnSp4vg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 16:26:01.7384 (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: 104.47.1.106 Subject: [Qemu-devel] [PATCH v2 14/23] hyperv: qom-ify SynIC 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 Make Hyper-V SynIC a device which is attached as a child to X86CPU. For now it only makes SynIC visibile in the qom hierarchy, and maintains its internal fields in sync with the respecitve msrs of the parent cpu (the fields will be used in followup patches). Signed-off-by: Roman Kagan --- v1 -> v2: - was patch 13 in v1 - drop unnecessary QOM properties (but keep the fields) - move KVM_CAP_HYPERV_SYNIC setting and SynIC creation to hyperv_init_vcpu target/i386/hyperv.h | 4 ++ target/i386/hyperv.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++- target/i386/kvm.c | 14 ++++++- target/i386/machine.c | 9 ++++ 4 files changed, 134 insertions(+), 4 deletions(-) diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h index af5fc05..20bbd7b 100644 --- a/target/i386/hyperv.h +++ b/target/i386/hyperv.h @@ -34,4 +34,8 @@ 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_reset(X86CPU *cpu); +void hyperv_synic_update(X86CPU *cpu); + #endif diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index 012c79d..eff612c 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -13,12 +13,27 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" +#include "qapi/error.h" +#include "hw/qdev-properties.h" #include "hyperv.h" #include "hyperv_proto.h" +typedef struct SynICState { + DeviceState parent_obj; + + X86CPU *cpu; + + bool enabled; + hwaddr msg_page_addr; + hwaddr evt_page_addr; +} SynICState; + +#define TYPE_SYNIC "hyperv-synic" +#define SYNIC(obj) OBJECT_CHECK(SynICState, (obj), TYPE_SYNIC) + struct HvSintRoute { uint32_t sint; - X86CPU *cpu; + SynICState *synic; int gsi; EventNotifier sint_set_notifier; EventNotifier sint_ack_notifier; @@ -37,6 +52,37 @@ X86CPU *hyperv_find_vcpu(uint32_t vp_index) return X86_CPU(qemu_get_cpu(vp_index)); } +static SynICState *get_synic(X86CPU *cpu) +{ + SynICState *synic = + SYNIC(object_resolve_path_component(OBJECT(cpu), "synic")); + assert(synic); + return synic; +} + +static void synic_update_msg_page_addr(SynICState *synic) +{ + uint64_t msr = synic->cpu->env.msr_hv_synic_msg_page; + hwaddr new_addr = (msr & HV_SIMP_ENABLE) ? (msr & TARGET_PAGE_MASK) : 0; + + synic->msg_page_addr = new_addr; +} + +static void synic_update_evt_page_addr(SynICState *synic) +{ + uint64_t msr = synic->cpu->env.msr_hv_synic_evt_page; + hwaddr new_addr = (msr & HV_SIEFP_ENABLE) ? (msr & TARGET_PAGE_MASK) : 0; + + synic->evt_page_addr = new_addr; +} + +static void synic_update(SynICState *synic) +{ + synic->enabled = synic->cpu->env.msr_hv_synic_control & HV_SYNIC_ENABLE; + synic_update_msg_page_addr(synic); + synic_update_evt_page_addr(synic); +} + int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) { CPUX86State *env = &cpu->env; @@ -65,6 +111,7 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) default: return -1; } + synic_update(get_synic(cpu)); return 0; case KVM_EXIT_HYPERV_HCALL: { uint16_t code; @@ -95,6 +142,7 @@ HvSintRoute *hyperv_sint_route_new(uint32_t vp_index, uint32_t sint, HvSintAckClb sint_ack_clb, void *sint_ack_clb_data) { + SynICState *synic; HvSintRoute *sint_route; EventNotifier *ack_notifier; int r, gsi; @@ -105,6 +153,8 @@ HvSintRoute *hyperv_sint_route_new(uint32_t vp_index, uint32_t sint, return NULL; } + synic = get_synic(cpu); + sint_route = g_new0(HvSintRoute, 1); r = event_notifier_init(&sint_route->sint_set_notifier, false); if (r) { @@ -135,7 +185,7 @@ HvSintRoute *hyperv_sint_route_new(uint32_t vp_index, uint32_t sint, sint_route->gsi = gsi; sint_route->sint_ack_clb = sint_ack_clb; sint_route->sint_ack_clb_data = sint_ack_clb_data; - sint_route->cpu = cpu; + sint_route->synic = synic; sint_route->sint = sint; sint_route->refcount = 1; @@ -189,3 +239,60 @@ int kvm_hv_sint_route_set_sint(HvSintRoute *sint_route) { return event_notifier_set(&sint_route->sint_set_notifier); } + +static void synic_realize(DeviceState *dev, Error **errp) +{ + Object *obj = OBJECT(dev); + SynICState *synic = SYNIC(dev); + + synic->cpu = X86_CPU(obj->parent); +} + +static void synic_reset(DeviceState *dev) +{ + SynICState *synic = SYNIC(dev); + synic_update(synic); +} + +static void synic_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + + dc->realize = synic_realize; + dc->reset = synic_reset; + dc->user_creatable = false; +} + +void hyperv_synic_add(X86CPU *cpu) +{ + Object *obj; + + obj = object_new(TYPE_SYNIC); + object_property_add_child(OBJECT(cpu), "synic", obj, &error_abort); + object_unref(obj); + object_property_set_bool(obj, true, "realized", &error_abort); +} + +void hyperv_synic_reset(X86CPU *cpu) +{ + device_reset(DEVICE(get_synic(cpu))); +} + +void hyperv_synic_update(X86CPU *cpu) +{ + synic_update(get_synic(cpu)); +} + +static const TypeInfo synic_type_info = { + .name = TYPE_SYNIC, + .parent = TYPE_DEVICE, + .instance_size = sizeof(SynICState), + .class_init = synic_class_init, +}; + +static void synic_register_types(void) +{ + type_register_static(&synic_type_info); +} + +type_init(synic_register_types) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 9bf7f08..eaa2df3 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -648,8 +648,7 @@ static int hyperv_handle_properties(CPUState *cs) env->features[FEAT_HYPERV_EAX] |= HV_VP_RUNTIME_AVAILABLE; } if (cpu->hyperv_synic) { - if (!has_msr_hv_synic || - kvm_vcpu_enable_cap(cs, KVM_CAP_HYPERV_SYNIC, 0)) { + if (!has_msr_hv_synic) { fprintf(stderr, "Hyper-V SynIC is not supported by kernel\n"); return -ENOSYS; } @@ -700,6 +699,15 @@ static int hyperv_init_vcpu(X86CPU *cpu) } } + if (cpu->hyperv_synic) { + if (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); + } + return 0; } @@ -1084,6 +1092,8 @@ void kvm_arch_reset_vcpu(X86CPU *cpu) for (i = 0; i < ARRAY_SIZE(env->msr_hv_synic_sint); i++) { env->msr_hv_synic_sint[i] = HV_SINT_MASKED; } + + hyperv_synic_reset(cpu); } } diff --git a/target/i386/machine.c b/target/i386/machine.c index ded5e34..90cc3a9 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -7,6 +7,7 @@ #include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "migration/cpu.h" +#include "hyperv.h" #include "sysemu/kvm.h" @@ -629,11 +630,19 @@ static bool hyperv_synic_enable_needed(void *opaque) return false; } +static int hyperv_synic_post_load(void *opaque, int version_id) +{ + X86CPU *cpu = opaque; + hyperv_synic_update(cpu); + return 0; +} + static const VMStateDescription vmstate_msr_hyperv_synic = { .name = "cpu/msr_hyperv_synic", .version_id = 1, .minimum_version_id = 1, .needed = hyperv_synic_enable_needed, + .post_load = hyperv_synic_post_load, .fields = (VMStateField[]) { VMSTATE_UINT64(env.msr_hv_synic_control, X86CPU), VMSTATE_UINT64(env.msr_hv_synic_evt_page, X86CPU),