From patchwork Wed Jun 21 16:24:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9802277 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 AC2C960329 for ; Wed, 21 Jun 2017 16:36:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D5CF205F8 for ; Wed, 21 Jun 2017 16:36:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91DE5284FF; Wed, 21 Jun 2017 16:36:45 +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 CE920205F8 for ; Wed, 21 Jun 2017 16:36:44 +0000 (UTC) Received: from localhost ([::1]:55082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNicV-0007bW-Pp for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Jun 2017 12:36:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiSU-0007Pu-W7 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNiSS-0004gJ-BM for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:23 -0400 Received: from mail-eopbgr30128.outbound.protection.outlook.com ([40.107.3.128]:21312 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 1dNiSR-0004fn-TO for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:26:20 -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=nk7vakpQwkRXWVLTDjNzbafsILblkuh5CL7KMOhoosw=; b=QhpdgxfORdi6YvZsuVY/2ly4fBnJM0HKfATG5qsts35/HVeMTFkinDWIvgGfMqEPTR163LRUpg0nCJ8rCWLJpNyS2VD90BywaDE5neDDsfLgEzHFU28ZcnvcwbVbqKKtsWmCrc7n8vSkOIIOcRVsZRep0ct7GmF81u2R72f8duA= 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:12 +0000 From: Roman Kagan To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Date: Wed, 21 Jun 2017 19:24:17 +0300 Message-Id: <20170621162424.10462-17-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: 66ced0d8-0f80-448c-75bb-08d4b8c23e6d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:HE1PR08MB0842; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 3:XxC5YJRx70BEPO3aWRJQgi8CLPzP04bQcYDEKzJlW2XsMdp671m4hVIkysQnkzDB9VgE7dmitJtelKBRU50khjl/rhwBpM0c+CQzsImFkWOHtCXnMGP9sqiLk55X8lMEdIL1f3z8XCYICas7nx3Xa3ZvAFgsTO2YDbVig+aNkewL3eD0maC1kxM2dR0X1LGtTLi8eJR05SWN9wR5XrHEcfhf+OID2IxfCprVP3eotYqGVqAoSpF+4nf4QL+HB2RuiMNB6l52NXANyXWe5agdfEa+qz/hnfKLjdYOCIIoBRa7d7e/sDO99tZV2UL0/VvWpJGZJl01nafJnqjLmXOiUg==; 25:Vz3wnmwQSmYqO+FokH72Vc7Z0zL+oSh4ZO7uqrxEL0fGSB08ZVPk9fRilTKEv8V98GE703VlUfo/ersTTXyyL1G4S7UPdEMAbAnMiXzYwVEzvCjYSsza6nwbevqMakSzZyCfbaLpBc6KzVraDYTGwryur1DdfdnHC1Lz27X9W8+l/t892jR5T8taet0ImfnQKEx66t5Tb2DH5Hvr1tbrn7xPrOdpO0aiy008rl/BN+iL9lXvhhxFHWbCcmCHUxpzH0KxcmEV00tTXh0GzPhHKri2z5iXnnWPdq5HDuAmCI8hSkPOx8Q/uwtKk1wqhATMiJBS8WZqElABUm5i9fGPu4+HCVGn7pp4/e+ygTtErLHxYQkA6woPgCaBOaY42/zAih+JHZqREKSTcjbYb6gnZoLX67jYFcClPNyNgdDTQso2CtAGL84TliFk78ExzQVztPWrnQLu/PNzOvmnTGi5pWC+OHDn++Rsl9XKZ+d9AAs= X-MS-TrafficTypeDiagnostic: HE1PR08MB0842: X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 31:Olz9V1aoFz9odS+RnPA9zJ/3Hp+OBUAVzym/m5K4Jskr8VKxTqPMusx1ld9glqeXNPyDfzFn6poUhK3l7LqJH5202ohJRbbDCqHk5tVY+LQC4y/4xxZKEg7fnF27IDF5HG4MTnYEiiVS9I+/RU8e6RuiZ0eTNcdx5xVWIFrvmsr8HCBsx3mAcni6JDA9W10/+AvEpL0a3XR2VautW4Eh9moyoxRY2HGrXxtpZ9B7NHs=; 20:42BrmdgtC+xlP44ujDR9uuGY88c1YnP3qdkc0H2oJK8PjhZpXhChXpxe38zHJoD4C4STsUVDTbEHc05ZofJ9qn3yF1oNF5M0WROvwFZhaTcC3BB0t0I+Txy2Z/9g60DOq22S25413SHg5CPAUYIDzDwmzMWzc6FEXam8yKGHfvxHntHLyeQ30HEK/OGUmJ6Z2OR9H5kY5pw9mXQVGgie8DGmmyjiyZf0oV3opT6HAoKKQX4BoV2RPr1y6Fm2v9LjtUp8Cx41has/hTAtie7CAElb8FB4NjgEZYV9aSi3t1t03LRaW5zM4hXhZtplZffujueKiRmoY27yumpBUMxrT3U/zO9c1fQBccUJDBKf3RTZZwe//1Gxzvd3EGD3kZ5SIUROFHzFJpW9Bpuj25K0laAGiM5KagnR1ww+3v4DT7Y= 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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?= =?us-ascii?Q?PaydLU2bw2F8hxZuviMgSsb3QW3ufxGTg2T8FyoYmZPDjh0XJGVZKmX+Tj5r?= =?us-ascii?Q?xvL9dqkN4ENgwnXGzxDDUQxDwuyAtCrqCboPehWa7uVpyZSrv61ve+lqYOGp?= =?us-ascii?Q?f+fE6S/7iNioEFxUzKRMcHrqkH3N8szwD/FyKTNd4LQnY96XpQUaOwjGl/qg?= =?us-ascii?Q?BfemRFv+LUPVjg0vIZWED8Z+AE4sm5LftxhtTYGxVdrqzflaFp6dt3I+PZpW?= =?us-ascii?Q?VwLYa0vOL5Vl8oZPzdn4QX9HiEkCoXH+b1EenyCZLUjYpwA0KT6aQ3td/A6v?= =?us-ascii?Q?qwLA7MyhioHLIt2U18AeEUDeqs+Q3v?= 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)(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:ieVLJLKCo6IsRUNOJ7UtQH8CRhtjam7WA30kASNLL?= =?us-ascii?Q?+uBIBqyI1ZEHBaJ2HJfBCBUnY/5xd/RWnDsJ022HqEe4R5l8oLDKqL8GvOl6?= =?us-ascii?Q?zvQUwjKKIJvyYj13LIRIOyPtR/uiFWKzDxtklnlQ2ggzpX53ESWjyoH+cmHX?= =?us-ascii?Q?T8wAcJRfSCit+jaiTkYyXMe4rMhp+Bdnz1IjxfwvjxQdvlOjVM2WJjvanJO8?= =?us-ascii?Q?uY8tpDUclX6cPwi6f5rKCNSnnD+4eCvkix2pZPkxp23mzXsZ9dg7sbwDksJg?= =?us-ascii?Q?1J4QEkID5Gak1Ek/mV4zejKYXUWU96QuRLigCfMyzh1BbPZqigxaD/l+pZQd?= =?us-ascii?Q?kO9ImdlhrezVVHy85aw4qxEq8haF4jCSRsBAZnFcYvlf7nhhjTVKThI0Eaa4?= =?us-ascii?Q?yKxMOGWYGovNtaeujXxftFi04usy0llcmW3JSptJxrCt1aYiuKIP9OF3UEuy?= =?us-ascii?Q?dfLEt6poWkuc0acwlLTalqYpwqJPpgRJjx9aDFhtQd5e96VKjIF+mnry7ZFn?= =?us-ascii?Q?Oa9Yrx7G++lxT0ADINJLmFGpLJq3iZeV9HS6VwI4LTdq/IXgSLrksDH37Fga?= =?us-ascii?Q?zSV8AcX4t2e4iBFN4poLt6jYUzboOgENuMdxKNFv9Kw5NjNUXP6vr9uuIC1G?= =?us-ascii?Q?BaHqUnR4KQH5zq3k2Jq5ue/rsrMmbenH8NI9mpXCiFfa2OWlqlF94XvvZCMU?= =?us-ascii?Q?naLyb/RrF6jkxR0nb/eMhpniU001p26sBsg1fz5G0lKkCK8GToEt5kQF/DP4?= =?us-ascii?Q?9IgLjlKLdZ7xTsvQfOHGNzWZgOMcJ3j6nYGUsnL3jvEW9eBKknVFIFAY91st?= =?us-ascii?Q?2PRcJSknxjxEsAiUwSs8xf8bLIFIQhdol3WZvFWPt30p5lhfnTNrXjjwtEak?= =?us-ascii?Q?IQxR4wj7oCQZONy0i1Ko/LPOwDMODzBMsQeoLKCid6Qc5df1HvYsCnLCIEwL?= =?us-ascii?Q?yuT9NmK0+mogyfT0H6GxGKbsEba4JM6iWvv76gcxHD41Rtuyd6U8B2VwKNoc?= =?us-ascii?Q?U0=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0842; 6:5d35tvl/6NvD+zDCk69hIehi5aJfB4t/0+1PYDwui9?= =?us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R5TpXzUast?= =?us-ascii?Q?GrfSujiiXxCk+7gUS15fScMXhnnNXKdQeJZml2IQsl77cYFR0RhDc3b1ntY5?= =?us-ascii?Q?Q=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 5:tL9zeIyOppjJY3wWUa0YgeLPO820xjfCR2XSD5PZocCYjyQyjt8pyf6aDJY7BlpcvX8rhSt8vMciRganWunnq7ScyIPdx2UAK+mXIcj1ilrHUmza9JcNf1OBc33klWtjx8J44FFQbmZVIQ8FQ7rGq12K12ok6Ikxx7JlgL0Z9zQiABwwU3eTF3omO8XEOLmWaojPEJzsXTTZvqLjl/iX0PLWuAfaiR1rMI0x+h8fKYIhK6LoPjv2r/DWjvoUVZWDQE+ygoIBoFjUTwKiZO8MaryuihXD9A/Td31GiGsnr/NGMdSyDSqCKW0eFZhcb6ECAYiLIEZGX9mgNDFh2nzpcoxA3y3F7I87H3HyPUgBbmu2oyrUf/uDaGuOWOJjIWLJWemCm3rw+/mNKTdFyP6lJPPzpCetzSVlNy3lsrMHscwwHUm8XS7aHkRBuVqZinsYhof1wJS4AHDfgWuZTOJcA38CWbm8gHWZisulyHp2sF7KWpCGJ3F0q/pk2BefzKk3; 24:jQz3nZYEtoJ7XO4wxS7fnp3oB3VYBe6KPuvciWNBx8q/KVavmcklVkjLv1XbjySI0Env4W13C0CbVEfEK+Ja33OSypQQQwzWGroKz45zdPw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 7:WrCfOpVT5NCjZToFN7mnOM3gQ0A7EPvrOnH+UQDzernvhzUvOeB108++K0ax6/AKlDx657NMxxCHo7K4lGPk6LajQSQfzVXJ24pDwUgZGu5lLdzEwe9ElshwTOIu5lKlt7JAlZ6yshsBO9K8LDPCHze1+FXn+sbAN93C8PUvQ524FjVOW/D3tCZV3LcdwXvBjWkV7FqM0LFrLL+tvTte2iP7NhlCj2HPmf+IUonEjsCgEZXpU4zx153xthLQ8nHYVUodUV72Wowc2C7XRIu0RCxlYSU5kTezMt6hEviRq9dlu+LB6nVJkrILBwHjHu6fkYZgA+OQbfzYrkMtJnjG8Io8hz9VF7ZpnPQDwcEp2KQcLMduKuteJdL0kDgVjd5NjA/nrMwmrKs9kQYckbk9CXJHXrhEfL4+WPeJEc76b5g7L6XiRLeJIG3HKdyf/gBHn/AkLzDvajLnOT8CwJzp5/RdKIMSVJYjusOw0GRqex2X8PWarA1y6VBns6q3K16qvA505M94urz1mHcG4trJhqFokI8dlTr4zPEqzIxQV3z+ikjOZjs87mv1UHaTtgHNrX5BmHiwbIJ+Ocs9k6e48CytJ/IXGqEoYh0N2IKUsDEyEOF3beZHP8TVouHBEkh3cCJyuMbjMdJmZXUiiB97Ptj5muLsUpjFMdAh8FZVXykz6g0NaJL+QzhjdeQhjvsdT1KgEx3jDHuinNoZ9wOWsVPGBmg/gQ+wv4ETdIWPwqEuTcLo9XSnEQA4YIDR8667DS1GzbRlnnqdLtoAAUrqgjx7stoCNgaXX4PJgDQT1l4= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 20:kA119LaNinghr9AQNoJBuxAwQZ1ytuZFHK53S24EfCqJJBaILHLNbGl7asC8Aj5U6Hrd/BslDY+zzc3ZAxYl9Rxq0Z1A4rzMa91RygUwA8Qgquprs1GslPi0j6q+KPvQzfTftHqMxkemH0xZ9eLI2NHuHFAiA3jnDM6yMRHaEdY= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 16:26:12.6451 (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.128 Subject: [Qemu-devel] [PATCH v2 16/23] hyperv: make overlay pages for 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 Per Hyper-V spec, SynIC message and event flag pages are to be implemented as so called overlay pages. That is, they are owned by the hypervisor and, when mapped into the guest physical address space, overlay the guest physical pages such that 1) the overlaid guest page becomes invisible to the guest CPUs until the overlay page is turned off 2) the contents of the overlay page is preserved when it's turned off and back on, even at a different address; it's only zeroed at vcpu reset This particular nature of SynIC message and event flag pages is ignored in the current code, and guest physical pages are used directly instead. This (mostly) works because the actual guests seem not to depend on the features listed above. This patch implements those pages as the spec mandates. Since the extra RAM regions, which introduce migration incompatibility, are only added when in_kvm_only == false, no extra compat logic is necessary. Signed-off-by: Roman Kagan --- v1 -> v2: - was patch 15 in v1 - add comment on using async_safe_run_on_cpu target/i386/hyperv.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 6 deletions(-) diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index e183638..dca85de 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -15,6 +15,9 @@ #include "qemu/main-loop.h" #include "qapi/error.h" #include "hw/qdev-properties.h" +#include "exec/address-spaces.h" +#include "sysemu/cpus.h" +#include "migration/vmstate.h" #include "hyperv.h" #include "hyperv_proto.h" @@ -28,6 +31,10 @@ typedef struct SynICState { bool enabled; hwaddr msg_page_addr; hwaddr evt_page_addr; + MemoryRegion msg_page_mr; + MemoryRegion evt_page_mr; + struct hyperv_message_page *msg_page; + struct hyperv_event_flags_page *evt_page; } SynICState; #define TYPE_SYNIC "hyperv-synic" @@ -67,6 +74,17 @@ 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; + if (new_addr == synic->msg_page_addr) { + return; + } + + if (synic->msg_page_addr) { + memory_region_del_subregion(get_system_memory(), &synic->msg_page_mr); + } + if (new_addr) { + memory_region_add_subregion(get_system_memory(), new_addr, + &synic->msg_page_mr); + } synic->msg_page_addr = new_addr; } @@ -75,6 +93,17 @@ 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; + if (new_addr == synic->evt_page_addr) { + return; + } + + if (synic->evt_page_addr) { + memory_region_del_subregion(get_system_memory(), &synic->evt_page_mr); + } + if (new_addr) { + memory_region_add_subregion(get_system_memory(), new_addr, + &synic->evt_page_mr); + } synic->evt_page_addr = new_addr; } @@ -89,6 +118,15 @@ static void synic_update(SynICState *synic) synic_update_evt_page_addr(synic); } + +static void async_synic_update(CPUState *cs, run_on_cpu_data data) +{ + SynICState *synic = data.host_ptr; + qemu_mutex_lock_iothread(); + synic_update(synic); + qemu_mutex_unlock_iothread(); +} + int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) { CPUX86State *env = &cpu->env; @@ -99,11 +137,6 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) return -1; } - /* - * For now just track changes in SynIC control and msg/evt pages msr's. - * When SynIC messaging/events processing will be added in future - * here we will do messages queues flushing and pages remapping. - */ switch (exit->u.synic.msr) { case HV_X64_MSR_SCONTROL: env->msr_hv_synic_control = exit->u.synic.control; @@ -117,7 +150,13 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) default: return -1; } - synic_update(get_synic(cpu)); + /* + * this will run in this cpu thread before it returns to KVM, but in a + * safe environment (i.e. when all cpus are quiescent) -- this is + * necessary because we're changing memory hierarchy + */ + async_safe_run_on_cpu(CPU(cpu), async_synic_update, + RUN_ON_CPU_HOST_PTR(get_synic(cpu))); return 0; case KVM_EXIT_HYPERV_HCALL: { uint16_t code; @@ -256,13 +295,34 @@ static void synic_realize(DeviceState *dev, Error **errp) { Object *obj = OBJECT(dev); SynICState *synic = SYNIC(dev); + char *msgp_name, *evtp_name; + uint32_t vp_index; synic->cpu = X86_CPU(obj->parent); + + /* memory region names have to be globally unique */ + vp_index = hyperv_vp_index(synic->cpu); + msgp_name = g_strdup_printf("synic-%u-msg-page", vp_index); + evtp_name = g_strdup_printf("synic-%u-evt-page", vp_index); + + memory_region_init_ram(&synic->msg_page_mr, obj, msgp_name, + sizeof(*synic->msg_page), &error_abort); + memory_region_init_ram(&synic->evt_page_mr, obj, evtp_name, + sizeof(*synic->evt_page), &error_abort); + vmstate_register_ram(&synic->msg_page_mr, dev); + vmstate_register_ram(&synic->evt_page_mr, dev); + synic->msg_page = memory_region_get_ram_ptr(&synic->msg_page_mr); + synic->evt_page = memory_region_get_ram_ptr(&synic->evt_page_mr); + + g_free(msgp_name); + g_free(evtp_name); } static void synic_reset(DeviceState *dev) { SynICState *synic = SYNIC(dev); + memset(synic->msg_page, 0, sizeof(*synic->msg_page)); + memset(synic->evt_page, 0, sizeof(*synic->evt_page)); synic_update(synic); }