From nobody Mon Feb 9 01:17:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1768217562; cv=pass; d=zohomail.com; s=zohoarc; b=Uhj+EZI+Bnaqr7pcChzmsUTKWYTaYp4yymU0l2Jlq5bJKlNSP95lhHV2UVLbpI4e2BlA9bp/UHA5HifxsXvp4vW/FEctXeN55WpPZ/zS4ucDwE0taOI84cnh4wFu3V1nYv82j/J8h8kZHgo+DXUolieLwS1yTXRpHJV8L5dJx/U= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768217562; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=L9yi1pQqUMZrqvYb89KgIKzE6gat+2ZHQ1oo8uvysws=; b=hyt7lsPKjO3cnLWzy5vq7e8AlvKCvlDOo8tCCK4IwQZHUteeKW5LRIMlFA6t7T5CLE+QcRVq1rk+yYd6uUSaz2yVWli3R5UFBHXTnd4E5L2fPMTD13fLcVCRyQ1urn0gyitctNuQoWjbH7iNr4JnltE9Bi+Wfz68g/8Zr2AWzsA= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768217562422747.7188968884556; Mon, 12 Jan 2026 03:32:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vfG9d-0002xO-9Q; Mon, 12 Jan 2026 06:32:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfG9V-0002v6-CS for qemu-devel@nongnu.org; Mon, 12 Jan 2026 06:32:06 -0500 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfG9T-0002Jg-CH for qemu-devel@nongnu.org; Mon, 12 Jan 2026 06:32:05 -0500 Received: from pps.filterd (m0127839.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60C9FUiJ2142740; Mon, 12 Jan 2026 03:32:01 -0800 Received: from dm5pr21cu001.outbound.protection.outlook.com (mail-centralusazon11021126.outbound.protection.outlook.com [52.101.62.126]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 4bkpqgk4u3-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 12 Jan 2026 03:32:01 -0800 (PST) Received: from PH7PR02MB9992.namprd02.prod.outlook.com (2603:10b6:510:2f5::16) by DM8PR02MB8071.namprd02.prod.outlook.com (2603:10b6:8:18::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.7; Mon, 12 Jan 2026 11:32:00 +0000 Received: from PH7PR02MB9992.namprd02.prod.outlook.com ([fe80::e2e9:fa4e:10d7:f7c1]) by PH7PR02MB9992.namprd02.prod.outlook.com ([fe80::e2e9:fa4e:10d7:f7c1%4]) with mapi id 15.20.9499.005; Mon, 12 Jan 2026 11:32:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= proofpoint20171006; bh=L9yi1pQqUMZrqvYb89KgIKzE6gat+2ZHQ1oo8uvys ws=; b=ks5PIi+6PnBtsSKMnk9MG6yCj+Pu2wdAdAUo0D2o2mDS1AsXDZjkb1aXg OLN3wl9nFJIpcfYDku6Wug8HavyMZ60e4/9OnlhCvVQsjiGxG/nLrHqvLjDdFe4h PQ6QqpcYyCH/kIqo9l62DcyXZLI8Anh43QWw3EumTS/xcU3DCRFdAw1tSZgw/b+p UI+CUw0NYyvve/Zi0CJRK+5/JfeznZi3q8O5c2VbQqjEybeFkiIl4l9YlDL1HJow hLzPxfekqiRriOHs2OtS+bWzqvkGxG3G7z+MKK0etggE7VODMc51hcZAnWZFcgUI L3qKlBCY0LV5OsEwbqzXZOt57h7Ug== ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uO8yHMAnKsaJPYusRp5u4cJeuGAmElu/TuOiYJfxUkr+KPi9pbdoFPMfcNS8nzfT4D0gPOD0Xoe2BX/d1XX+M7Dq0AjOt3BSxZnqAja5Ypb+6DFieoZqCejZ25ihmnJRhG/fiGufiSjoMHJbvZ31dHHUlTpB30I1C/q4cWaet5+Pbpw0QduwWwGajGuXIpxyWDYnOydz+Z2Mo/uSMQhFipaMmO9MDOdkfYWY7e5IybSqKTtZeHt1ifUJZ21zRb52SY67s8uez/rhPQM+0L3J4C/88pzPxMzE4pEtm6InYYz4Y9GR2tcNhY84phdPC6VhqCv/SMuoZJZROuNgXStCNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L9yi1pQqUMZrqvYb89KgIKzE6gat+2ZHQ1oo8uvysws=; b=NNcf4hq7CiCJRigzFy/MdT1Mb6T3/x/jOKzWXIcXEILdiAcgqgnlEv9nXp1YPoge3IdXC4ALNzn/mxcjfLNRL/N3bXojHVU3ohMUtvdIR9tShlH/EKSfp/xCQ22Zq7MBCszcdL2Wo8amECASCZPHNmy2hoiEUM9YNt3Jrn1balYF9ONfhYbnMWG/LRHfKOjcjXIyaeIGDJStduBjQlAI4QxPJIHHpUPg8ye6e5+kCJhQVe50YSW2syl2vJlzjFhP56v5GTDn11z6dM2cu9QmAlHQAnHcGlFkS0acu4t1sM3VcBQ+IihbIEgCUAW3/loHAOaGNFHGv9IsWv2TyfGobw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L9yi1pQqUMZrqvYb89KgIKzE6gat+2ZHQ1oo8uvysws=; b=f1/QW3U+ixEh4jXbql9fvR0f4eq1KB/4qVUX717CI1483ZSAJbdtjtKPawXnmtOwLyA9z0F1h9imot85GECeRt3PMFt+KaUt956E8blUY9c3xvnHsOKJ9PLFZf9n+paWowzyrKkoF1Eutj8WAoW4g0HNNyErHMgNE3pDilpf2shYIBkv4LKaJoHhXN/hyW5OBTP9ZZQY/gVneplg+fc6gncHeSYwFA4KQF0FX1iLeqw6jCuDhOCfcZj8pjcIuocyVQs4Nknbhu3iiW24qj4LZIts+ySQfywXhuN5XcN4SeRv0exVyDzRn0HIv3YZ+iBgiw2ZY/G+h2gNtrIVNHQNqw== From: Florian Schmidt To: Paolo Bonzini , Zhao Liu , Marcelo Tosatti Cc: qemu-devel@nongnu.org, Florian Schmidt Subject: [RFC PATCH 1/2] Add HvExtCallQueryCapabilities Date: Mon, 12 Jan 2026 11:31:37 +0000 Message-ID: <20260112113139.3762156-2-flosch@nutanix.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112113139.3762156-1-flosch@nutanix.com> References: <20260112113139.3762156-1-flosch@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: PH7P223CA0022.NAMP223.PROD.OUTLOOK.COM (2603:10b6:510:338::14) To PH7PR02MB9992.namprd02.prod.outlook.com (2603:10b6:510:2f5::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR02MB9992:EE_|DM8PR02MB8071:EE_ X-MS-Office365-Filtering-Correlation-Id: e6a3c844-ced3-4b37-b74a-08de51ce334a x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?nx1O1+bYQP5h1CcNU4rBYFjAJc5hVacljHnZdpuXzYHcy+QjMntrO3y/9iNR?= =?us-ascii?Q?OeDEX/d6PVOqAwDAyIplZPukkLN/9mKcFhrr6hdievtVgv+UDASSDaoWG0CR?= =?us-ascii?Q?rtaNIgsekwVG31hfMshYnrCkz0RFgIYR4hkooyijYxaXjFv6zhSvdU2/7JfB?= =?us-ascii?Q?AjNjW3tbLbeIB4tylfTYPaqM5ypyuw00bVhivF06n0AJT6F7dVwEzYugo8PN?= =?us-ascii?Q?b31+Klp6hEVJaoR5pzerMGKNP7s7eKI3qlL7XTJ64ObWBVK5nJPliCnSMq1d?= =?us-ascii?Q?hs2BljwmC3fIqSCag/ad7QHrrfIeDYKkTOlyhwNtyT8ocXXUO0N2hWwLll4F?= =?us-ascii?Q?104ANrJN7RDrM2F+c60/a5ZFC++gVx5r2S4Iodc3XJNmeW5eBKN7On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xKGKlHs2DmUIL3spx7/wDnIaBGcb?= =?us-ascii?Q?UV8agFLt2QQqxYGnnftvjl8kwVZswarNoGkD8ohbwkw4WemFYElHIRJZCXTH?= =?us-ascii?Q?Zz+4kzXnG24KNNPjjSJ7cr9rkP2sWazVgoz+UZIMGda+i+ndzw+v4eVR+2S4?= =?us-ascii?Q?67GiFCQmWmZeDxGutb6JSop2jAiEmK3dRDVw1a4UCpt+Y19Kq4ed7S40ns5V?= =?us-ascii?Q?h0fPsnr7BXZJPkWtn/DXumWf2Hh+IVvyTuZA?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR02MB9992.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ExU1YavSKwZg5P/Kvzu5ov0oXE67+bquRo2nSeYcK2WMiItSmskxWbpFh/F4?= =?us-ascii?Q?69P3K0XN2uTCy72NFSYvT2prVzifUgDACTBGYCkgOVL62SLbQH5MIuftoqIx?= =?us-ascii?Q?hAlF/nX8zNeEwAU8N5kXbAQADlY0okoih5pO/kkIWKwLJc057olGvSYmogtP?= =?us-ascii?Q?mapLD4l8CTsWCul0jeAufOChiF35/c2mNHa1aPF35d53R20SHPYhlIOum7aq?= =?us-ascii?Q?el6RGm67Rj889jy23kqpvjd5Q7cfi0mxgdteRv1Rf6vstFlYqvCG6k5A7HYG?= =?us-ascii?Q?PDmZ/aKBw8lJlOYzBuZ2VgDIRzgHgVBdS5B0kVNAtxYviSMwPWIv8LMcsb+x?= =?us-ascii?Q?vJA13x/owm3S5DEyJ/YYWKU6462ptwfo4FQNcwFm0tTiL6XZlhktJri5fcgA?= =?us-ascii?Q?2u/1H7yrtqgRx5/e84D0jg06MqWunbJrDm33hfrc404kn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lDKK9en+y+nGua8uhzejcSSGMMYIATxmKlB2mogGeHkT+kogWmRiuO?= =?us-ascii?Q?GEU/YeGt5Rcq87Q/Ae0kHEVUs8mgabykqEqdYqs9Wyg5bYi9Dc2i/v0acyMF?= =?us-ascii?Q?/tVlrMO9sgNoqeME7wLAJIgPUabjmV80t4L3Pea1La9cEKkP3MwABuBcoGqH?= =?us-ascii?Q?fbEUBCzxefNHkte2QajV4ot5m9ONhmxxC/UTphlVFPElMClxBplCs2IAhty6?= =?us-ascii?Q?6HrBxaYcux6SYY8M9NCyxa45294DXDZklipGvO7tVOlc1K8yhYPpaW9q8O2c?= =?us-ascii?Q?5MxzxuvgaxJJNmv2pymUWw5yIns4O9QimF0tv6bJf2/dmf9OOe92GhPhNk5o?= =?us-ascii?Q?R0kBNk5wWdjJx9ojYhu+bZZdglAKobZczLdsAb3sI3xdGzVZR8JuN2jS8I9R?= =?us-ascii?Q?ZVRqUmPNEbBnx10uI4gVm4E66ci+g+w=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6a3c844-ced3-4b37-b74a-08de51ce334a X-MS-Exchange-CrossTenant-AuthSource: PH7PR02MB9992.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2026 11:31:59.9621 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uwIGyejMsxl0ROLdoSeZtUx1wmt8T4UFr6XST98tBCsKjTz8SODEEYS7524GZpl9/jh8P2hlySBlhGl/X4eP4FqkYddnEjfU6k8WBOkcnYQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR02MB8071 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEyMDA5MSBTYWx0ZWRfXyb+SKYl74OuY LJCr1MEt2ZnF+Fov2SSlncGWUqhA5cLr6J1wMlBPzFQ1sNY7j4O6KU8kJklVvT5GAvmf4ju3myM XZqfIXW97Au4QFH0bvEA33XeqFLIWbl34DskNQScoYU9bo7APB33E7Dfso6W7/zRmd5lIPBZ+Q3 vrdCFfq65A4jeP65aQCJs3CvNsX+vszQyrfwtc+9CUxSMb5X+mL9Qd6ds8MjEYORO5ecdKlke7/ BMe/4A1oHBkr0YtN/xKP3t5aV0zPNVSv9yPqIBbad9NPdKTPTAA7Brq0T+GgeHLF87TvdjV+7QS aAGfIDjNcro3vPI9ybE879KmmqfbDk4WCKhklE7xRdltRA74rpjFrgeD4zK2cSkWbkuuuN/ZtZ5 F9iLbD1FHJQlhcwiVucgU3azrnff0kPRuYai7klmJ5YEx0p0WnsUDSQwwZSnub90ezbzlhEWu3u 7/0eBpHhBRrGIO9tPbQ== X-Proofpoint-GUID: Lb-McQRejPRn02vWRR99G7GY-XstCyES X-Authority-Analysis: v=2.4 cv=TKpIilla c=1 sm=1 tr=0 ts=6964dbb1 cx=c_pps a=5b8Bh1zS2Xw7e9bM89c5zw==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=vUbySO9Y5rIA:10 a=0kUYKlekyDsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=64Cc0HZtAAAA:8 a=gL5P_E_7iFiinnyR3ZwA:9 X-Proofpoint-ORIG-GUID: Lb-McQRejPRn02vWRR99G7GY-XstCyES X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-12_03,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.151.68; envelope-from=flosch@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1768217564545158500 Content-Type: text/plain; charset="utf-8" On CPUID leaf 0x40000003, EBX bit 20 signals that we support the HvExtCallQueryCapabilities hypercall. This returns a bit field which signals which further extended hypercalls are supported (as a way to conserve CPUID leaf bits). For now, we don't support any extended hypercalls, but we'll add HvExtCallGetBootZeroedMemory in a followup patch. Signed-off-by: Florian Schmidt --- hw/hyperv/hyperv.c | 28 ++++++++++++++++++++++++++++ include/hw/hyperv/hyperv-proto.h | 1 + include/hw/hyperv/hyperv.h | 5 +++++ target/i386/kvm/hyperv-proto.h | 1 + target/i386/kvm/hyperv.c | 14 ++++++++++++++ target/i386/kvm/kvm.c | 3 +++ 6 files changed, 52 insertions(+) diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 27e323a819..13a42a68b2 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -699,6 +699,34 @@ int hyperv_set_event_flag_handler(uint32_t conn_id, Ev= entNotifier *notifier) return set_event_flag_handler(conn_id, notifier); } =20 +uint16_t hyperv_ext_hcall_query_caps(uint64_t sup, uint64_t outgpa, bool f= ast) +{ + uint16_t ret; + uint64_t *supported =3D NULL; + hwaddr len; + + if (fast) { + ret =3D HV_STATUS_INVALID_HYPERCALL_CODE; + goto cleanup; + } + + len =3D sizeof(*supported); + supported =3D cpu_physical_memory_map(outgpa, &len, 1); + if (!supported || len < sizeof(*supported)) { + ret =3D HV_STATUS_INSUFFICIENT_MEMORY; + goto cleanup; + } + + *supported =3D sup; + ret =3D HV_STATUS_SUCCESS; + +cleanup: + if (supported) { + cpu_physical_memory_unmap(supported, sizeof(*supported), 1, len); + } + return ret; +} + uint16_t hyperv_hcall_signal_event(uint64_t param, bool fast) { EventFlagHandler *handler; diff --git a/include/hw/hyperv/hyperv-proto.h b/include/hw/hyperv/hyperv-pr= oto.h index fffc5ce342..f1d1d2eb26 100644 --- a/include/hw/hyperv/hyperv-proto.h +++ b/include/hw/hyperv/hyperv-proto.h @@ -35,6 +35,7 @@ #define HV_POST_DEBUG_DATA 0x0069 #define HV_RETRIEVE_DEBUG_DATA 0x006a #define HV_RESET_DEBUG_SESSION 0x006b +#define HV_EXT_CALL_QUERY_CAPABILITIES 0x8001 #define HV_HYPERCALL_FAST (1u << 16) =20 /* diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h index 63a8b65278..921e1623f7 100644 --- a/include/hw/hyperv/hyperv.h +++ b/include/hw/hyperv/hyperv.h @@ -96,6 +96,11 @@ uint16_t hyperv_hcall_retreive_dbg_data(uint64_t ingpa, = uint64_t outgpa, */ uint16_t hyperv_hcall_post_dbg_data(uint64_t ingpa, uint64_t outgpa, bool = fast); =20 +/* + * Process HVCALL_EXT_QUERY_CAPABILITIES hypercall. + */ +uint16_t hyperv_ext_hcall_query_caps(uint64_t sup, uint64_t outgpa, bool f= ast); + uint32_t hyperv_syndbg_send(uint64_t ingpa, uint32_t count); uint32_t hyperv_syndbg_recv(uint64_t ingpa, uint32_t count); void hyperv_syndbg_set_pending_page(uint64_t ingpa); diff --git a/target/i386/kvm/hyperv-proto.h b/target/i386/kvm/hyperv-proto.h index a9f056f2f3..4eb2955ac5 100644 --- a/target/i386/kvm/hyperv-proto.h +++ b/target/i386/kvm/hyperv-proto.h @@ -46,6 +46,7 @@ */ #define HV_POST_MESSAGES (1u << 4) #define HV_SIGNAL_EVENTS (1u << 5) +#define HV_ENABLE_EXT_HYPERCALLS (1u << 20) =20 /* * HV_CPUID_FEATURES.EDX bits diff --git a/target/i386/kvm/hyperv.c b/target/i386/kvm/hyperv.c index f7a81bd270..1ac5c26799 100644 --- a/target/i386/kvm/hyperv.c +++ b/target/i386/kvm/hyperv.c @@ -51,6 +51,15 @@ static void async_synic_update(CPUState *cs, run_on_cpu_= data data) bql_unlock(); } =20 +static uint64_t calc_supported_ext_hypercalls(X86CPU *cpu) +{ + uint64_t ret =3D 0; + + /* For now, no extended hypercalls are supported. */ + + return ret; +} + int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) { CPUX86State *env =3D &cpu->env; @@ -108,6 +117,11 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_= exit *exit) exit->u.hcall.result =3D hyperv_hcall_reset_dbg_session(out_param); break; + case HV_EXT_CALL_QUERY_CAPABILITIES: + exit->u.hcall.result =3D + hyperv_ext_hcall_query_caps(calc_supported_ext_hypercalls(= cpu), + out_param, fast); + break; default: exit->u.hcall.result =3D HV_STATUS_INVALID_HYPERCALL_CODE; } diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 7b9b740a8e..5d8553ef0c 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -1594,6 +1594,9 @@ static int hyperv_fill_cpuids(CPUState *cs, /* Unconditionally required with any Hyper-V enlightenment */ c->eax |=3D HV_HYPERCALL_AVAILABLE; =20 + /* No reason to not always support HvExtCallQueryCapabilities (?) */ + c->ebx |=3D HV_ENABLE_EXT_HYPERCALLS; + /* SynIC and Vmbus devices require messages/signals hypercalls */ if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC) && !cpu->hyperv_synic_kvm_only) { --=20 2.39.5 From nobody Mon Feb 9 01:17:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1768217563; cv=pass; d=zohomail.com; s=zohoarc; b=ZSX5jlayUH2fOnb9xMPRNqkgjtWLvjH4JwyAfrTkA9OHnmAFBOXTG4Spmpg4mH18BBhIhx8eWIpN9u+oc1757EvkEEMlPgFl++/kv6za2gUySbMEVryhfstiEmagvl/h0QYe53SCsAtDSzOUmuRQGqfMpgLej+7X7JfKNj6IO1E= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768217563; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6CzeoI7NAHssxTUP30IgKtjCm9Xls+b69uBxt8n2sZs=; b=buR0cihxxk1rReOKtLwwKoSJq3JMUPQ3p8Y9yzVpy/pjIIXWm94p/B7Dp6ce2Dute05Rd7Gv+BLnl/UWzrHGbfXcMSIUVhzfkk5EQ1qpVFt2q//YyTUHQ6Pc4/qoEMd8nUKZ4HXC6mdI8IhWn6Ra4n9jPV3ONRGJtJ/3+qX1E34= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768217563026614.1020742529054; Mon, 12 Jan 2026 03:32:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vfG9d-0002xv-Sy; Mon, 12 Jan 2026 06:32:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfG9X-0002vM-2q for qemu-devel@nongnu.org; Mon, 12 Jan 2026 06:32:08 -0500 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfG9U-0002Jk-Nz for qemu-devel@nongnu.org; Mon, 12 Jan 2026 06:32:06 -0500 Received: from pps.filterd (m0127840.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60C9GeNd1978786; Mon, 12 Jan 2026 03:32:03 -0800 Received: from cy3pr05cu001.outbound.protection.outlook.com (mail-westcentralusazon11023122.outbound.protection.outlook.com [40.93.201.122]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 4bkkys39e0-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 12 Jan 2026 03:32:02 -0800 (PST) Received: from PH7PR02MB9992.namprd02.prod.outlook.com (2603:10b6:510:2f5::16) by DM8PR02MB8071.namprd02.prod.outlook.com (2603:10b6:8:18::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.7; Mon, 12 Jan 2026 11:32:01 +0000 Received: from PH7PR02MB9992.namprd02.prod.outlook.com ([fe80::e2e9:fa4e:10d7:f7c1]) by PH7PR02MB9992.namprd02.prod.outlook.com ([fe80::e2e9:fa4e:10d7:f7c1%4]) with mapi id 15.20.9499.005; Mon, 12 Jan 2026 11:32:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= proofpoint20171006; bh=6CzeoI7NAHssxTUP30IgKtjCm9Xls+b69uBxt8n2s Zs=; b=dcq77kNUA6rHVFdvhxePjGfiEdYfnl1ps73FJvALLXO1/3mfOJYfVv3Dc tpcC3x44JWBx7NAxD+0UnTJWMQnQy2X8Plc636pace2ZIXHnT+ioe0yyaqS81SOH KEbFRIwL8eKT56J9HTsIwhmhfSFScMJNTRKDmFcjuUk3dQYB0W2QoIEKzWGNt9CT kBKXtNoQSxY3/nWCVBZyGyPpqXS1FX/ZxKBzGbYml7oyutrFfIiFwPkUoiDUjVcx zKrlE5MPH6pdHggYcGbe9BZ22JKRAVSaAa4jl2YkHONjzFGPP16NQgis2VR6dd0U rZ1PLgVijIyhcpsQW7mn7hrmJDWxQ== ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BlKjkZ7JNm4tEX/kdmIv2IgCPf7jZ7VgWNgyQWNPwJpjStEBtOSjTHsNg+UbuCl1TNkrydMNyEXD0SGWr8QgPIhWcFbLL6uSi2IxGtHFgWCAM4Y05Iwc02V8eJlG+Lyru984NVabfbpIP+ykhkwySiKSJXIY5BPJSFNTSXICRgGlzrT2ZPr1r3I2a/E6zrVJbI26Pbq9HgwcZ64q3yYAU8bnawnzvtup0AkbXg8a4DXCGkIc8idjkdOU1xb54Y4sSOikYWSkQb2XPVyJleIWGJWomRKsSgBjPE8blKfHuTENlJphmh6EADFjjAEHq44u2yf1LA+yjumCE2ojzj/Z9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6CzeoI7NAHssxTUP30IgKtjCm9Xls+b69uBxt8n2sZs=; b=QZz/D2O6Sq4Pj2nKQs/C3JgSDlo2TmsN5VhPmiUs5ldJ+sUIfy2xLGLXLlgtYizHrshD2TQaR/ElYsMSA0JPtNl1/QMD6cASm91w52qWCChSxiQOC22dRQ4B+cQL60vweh8EgRRqjekpCFyxYIuYbrjQkVgf1/xvweUIxFTBvJSAyPKwPDAgxe9jOISgllOftluCb7mLuuit8DII+HfX6SJapUDQNegj/XQdZgP9cfc11fqsK6Kx7ErkaoYhMIBDnFPNncCGJtDUhAUC6oM8w/9KspDYy/3daFxtkIbhQItyc0+sCO/8DKavdtznbd++w4tJrk6jRPJcvXv2sBJ8Ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6CzeoI7NAHssxTUP30IgKtjCm9Xls+b69uBxt8n2sZs=; b=fwWvEltRIo6mfVkdgtr/AK9nRcpO/9/VNvdLAqJ+PfSyaC5kb1Mok87t3WEW6zfSD1sCLxxVdAcMRFqJfoTOtpvSnqCJ+zfg/Mt4aq3sPjrcxTm+8+q7DD1uQ6Bs7g+NpsTdFF6fzARNa8pusHoejgHYa7HYwfS4yctWyPwEt72LP5baPQnUuFEhu4+swFhrOOph3WAUSv2qgD0Le1XagD+QpqvgpoOE/Krf693igSAKZnlEtqLrlytR4/RCncYfBIC0wFDPZ5PDuH38Z1Np8dy5Fr3SzZzVi+mYwtZuf+wMWpSRgFvaAqMIEZO2LAsixRb1DfJL/C73sp3moQkH6g== From: Florian Schmidt To: Paolo Bonzini , Zhao Liu , Marcelo Tosatti Cc: qemu-devel@nongnu.org, Florian Schmidt Subject: [RFC PATCH 2/2] Add HvExtCallGetBootZeroedMemory Date: Mon, 12 Jan 2026 11:31:38 +0000 Message-ID: <20260112113139.3762156-3-flosch@nutanix.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112113139.3762156-1-flosch@nutanix.com> References: <20260112113139.3762156-1-flosch@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: PH7P223CA0022.NAMP223.PROD.OUTLOOK.COM (2603:10b6:510:338::14) To PH7PR02MB9992.namprd02.prod.outlook.com (2603:10b6:510:2f5::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR02MB9992:EE_|DM8PR02MB8071:EE_ X-MS-Office365-Filtering-Correlation-Id: 41438703-af75-4b01-791f-08de51ce3423 x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?UCAqBP2wLmhGyTtB8sUStl0NELFHPvEEXXYopIU4qeBRLUjt6cC8mTuqcJoy?= =?us-ascii?Q?J9+rDPMAfiVOdjWqlpOlKkqyf6MbEaSUva9CJUcVeE8RyLiqYT1DVPxOV/Po?= =?us-ascii?Q?OVQa/PUN8w2YF5/mDCEeA8ZN/HWZMBB4XcK5nTBH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dkEpQV0nRORaLz0umdytKHveLyixU5DZ8dYD+eWo3h?= =?us-ascii?Q?P3CPE/YsKBrKQd8oiOw/fVKPVbAfLW2b1DTN5r6OhmRba+e1nRwJwjMnbgE7?= =?us-ascii?Q?AKKpU+PEZISgvmi4Xq1Dak0NWGd3raZMfiTU9anjnsBiOBMguSjVXjpR2zqQ?= =?us-ascii?Q?bum1LdX2LT+EEVp1V4JrmxeyJC4b7X32cd70OGm5vop+lAdHgNL4ofNIZA+F?= =?us-ascii?Q?j5TnMDkf8b/LMrtbGvidu4a5MJn1rWPubJYUDVq9Om0LLMemVZBw/oJWHr3e?= =?us-ascii?Q?fB1mH8BiS0HK5PNrUq99nGyQYmqMJgQUEWbrcWSFXe76l2qX/8ns+8MDp4jR?= =?us-ascii?Q?gYchCiDkJRBycIowFUsPAB1UiVBbeQ778UknxGC8zOTbGWC9rHsFXfXT81yo?= =?us-ascii?Q?/iqIZh7rqNLBhcJF+QR0ZAjazYV99S+DxGK+/QcS8QTkPfiTrFmcH4ojPDH1?= =?us-ascii?Q?BeUNRGOedmHgJFiMlOXNoM7DKBbwKaW7j6uJ?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR02MB9992.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IKM9HNQxNaLnI8B1+QUUC+C+g7hwNy2PfMvbQ4DvulHGKcNMBas9FrEcat/i?= =?us-ascii?Q?BEfzswFXEkODY0L/N59fe+A11JeIlwLg/+wq136u1imuMc3o5vSYBN1wJU6G?= =?us-ascii?Q?Jhhs0e9NY0GaCfIs6uRXIKDDc/C8m1cm0K+lkR7giEX/DAoqbe/d+sZrQqjK?= =?us-ascii?Q?mrl1GiX7Jz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UMy1+AdrXdf5?= =?us-ascii?Q?y+Fqa+II6Aek1T7qBSy50KDfNonwl71wa5qvTTQB4x5UxFWGB2iQSyqlQUWz?= =?us-ascii?Q?8DlRRxZw31/ZUdzrPnvf3QwcAH7EgUE49hs3JLhXru0nxKn2SF08zsFd7R2Z?= =?us-ascii?Q?CQDwOCq+3z1U5LeBjg2eitBM6XxiobWmYekpViqJKMzTMe2KcdaY7noQALGO?= =?us-ascii?Q?T5nPPzw5iwJVr+lMTV/xj46081SNNSslB5TqP6g7xaG3UoYKKxNlzjxCmx8U?= =?us-ascii?Q?FkKEtkthDUJaoDMgk9PaN64SvpVSUHEBPiIZZg7ONjdce2bZgawqbATFZc8+?= =?us-ascii?Q?jbMEcIzkb+VpbbOvEsTwK0YQ0zL73hzmGP6s4GB3tOvBimTftmbB/sq+v3gA?= =?us-ascii?Q?c84PLziSER3sTIdsA6zd9BKZFGreWKSknurTI2vxAFnDiYpUxfcy11GCczSm?= =?us-ascii?Q?dCn6zSkWDnwyfdOTroOlcExV4V3e9ADFWbWK4jQiKnRFNZCiSyWmRkYBeQSn?= =?us-ascii?Q?yjzdDhiMkN/hIimrzyYM/PorYwPQB2ET6W6AIRkldv9lgbtx5A/sDimX3YJV?= =?us-ascii?Q?HoZnmJ51HDyZnpNNbtATgly8cAjYHcGm9o5twrV89+p65nYuT6tZE53fQQ1U?= =?us-ascii?Q?lo/ZcyKa6DetPLhFB+Hszl9eMyBAF22Fz9Jc8Eefuw4alQVJtJGjDE4ytnVC?= =?us-ascii?Q?OtOJWkRVc1aX/d+bCSd19fCAhM8u7VM=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41438703-af75-4b01-791f-08de51ce3423 X-MS-Exchange-CrossTenant-AuthSource: PH7PR02MB9992.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2026 11:32:01.3998 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mVYWWbQhotPfwrWEl3GbDJNocYVC9rFvHdcLY6HOc5/avl5rgUrtX0PejMEVCXLUF+LmTpICETHH/uvmaYWucjqGVE9pOZFl7Bip6mlHltw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR02MB8071 X-Proofpoint-ORIG-GUID: XkHZ1an0_-qnaseZE222Nc08UsNzNQFH X-Proofpoint-GUID: XkHZ1an0_-qnaseZE222Nc08UsNzNQFH X-Authority-Analysis: v=2.4 cv=J8unLQnS c=1 sm=1 tr=0 ts=6964dbb2 cx=c_pps a=FNmKuShaFFLZE4HaRSHjWw==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=vUbySO9Y5rIA:10 a=0kUYKlekyDsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=64Cc0HZtAAAA:8 a=kxB6lYKRGD2xpD5JXEMA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEyMDA5MSBTYWx0ZWRfX4HkcP4GA5LkZ GAFsGqWlcOgm0OCAtYoVCxslTKsU87vNnWDyhe9HzIR9Xk1DlvOsupGHz0BsiSop2TQl0Sia2Pf eig/vtxXfGXF8fMj1dGVNhf3LJfwhiZ4pue9uanwXuWmhrj1O2Lgtg0IUXsDZcBnxfEdPvZPv2q oxJ+NQcw274l5oQR1p8fS4dFOgwqw2yrS0WlisQpryBT+7HMBwTRcW+dTFL596OoIWKq3wqtRmf 99hwwpvj41mKXdUT+RCuj0uo5v2CHh011DzwKqsZgdbbL4bXsJG2pMpYHjKWs/Y5pJd06xYSZsJ KiDMgs+D4pcdTitn/RPTCx07O07y1zH3VZH+4TAOp3c7jFGmqHd9AAqz6oQR5rRUVXWTRr27IHB mxm9HppRn6xNF992YO65v65sz+B7xgZvn3+wsANgg6q76XchT8/w8HRQ89iaTnV83yDoRcotkFd c4rLn61MXNRrnrALBuw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-12_03,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.151.68; envelope-from=flosch@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1768217564584158500 Content-Type: text/plain; charset="utf-8" This call allows a guest to ask the hypervisor which of its (guest physical) memory ranges were already zeroed out by the hypervisor, which means there's no need for the guest to zero them out again at boot. For now, we simply send one entry back that says "all 64-bit-adddressable memory is zeroed out". This seems to work fine. Note that memory devies hotplugged later will still be zeroed out. Signed-off-by: Florian Schmidt --- docs/system/i386/hyperv.rst | 5 +++++ hw/hyperv/hyperv.c | 34 ++++++++++++++++++++++++++++++++ include/hw/hyperv/hyperv-proto.h | 11 +++++++++++ include/hw/hyperv/hyperv.h | 5 +++++ target/i386/cpu.c | 2 ++ target/i386/cpu.h | 1 + target/i386/kvm/hyperv-proto.h | 5 +++++ target/i386/kvm/hyperv.c | 12 ++++++++++- 8 files changed, 74 insertions(+), 1 deletion(-) diff --git a/docs/system/i386/hyperv.rst b/docs/system/i386/hyperv.rst index 1c1de77feb..7d2be2109e 100644 --- a/docs/system/i386/hyperv.rst +++ b/docs/system/i386/hyperv.rst @@ -256,6 +256,11 @@ Existing enlightenments =20 Recommended: ``hv-evmcs`` (Intel) =20 +``hv-boot-zeroed-mem`` + Enables the HvExtGetBootZeroedMemory hypercall. This allows a Windows gu= est to + inquire which memory has already been zeroed out by the host and thus do= esn't + need to be zeroed out at boot again. + Supplementary features ---------------------- =20 diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 13a42a68b2..d1b15c089e 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -727,6 +727,40 @@ cleanup: return ret; } =20 +uint16_t hyperv_ext_hcall_get_boot_zeroed_memory(uint64_t outgpa, bool fas= t) +{ + uint16_t ret; + struct hyperv_get_boot_zeroed_memory_output *zero_ranges =3D NULL; + hwaddr len; + + if (fast) { + ret =3D HV_STATUS_INVALID_HYPERCALL_CODE; + goto cleanup; + } + + len =3D sizeof(*zero_ranges); + zero_ranges =3D cpu_physical_memory_map(outgpa, &len, 1); + if (!zero_ranges || len < sizeof(*zero_ranges)) { + ret =3D HV_STATUS_INSUFFICIENT_MEMORY; + goto cleanup; + } + + /* + * All memory we pass through will always be zeroed. + * (Check if that's actually true!) + */ + zero_ranges->range_count =3D 1; + zero_ranges->ranges[0].start_pfn =3D 0x0; + zero_ranges->ranges[0].page_count =3D 0x10000000000000; + ret =3D HV_STATUS_SUCCESS; + +cleanup: + if (zero_ranges) { + cpu_physical_memory_unmap(zero_ranges, sizeof(*zero_ranges), 1, le= n); + } + return ret; +} + uint16_t hyperv_hcall_signal_event(uint64_t param, bool fast) { EventFlagHandler *handler; diff --git a/include/hw/hyperv/hyperv-proto.h b/include/hw/hyperv/hyperv-pr= oto.h index f1d1d2eb26..5bf5684d11 100644 --- a/include/hw/hyperv/hyperv-proto.h +++ b/include/hw/hyperv/hyperv-proto.h @@ -36,6 +36,7 @@ #define HV_RETRIEVE_DEBUG_DATA 0x006a #define HV_RESET_DEBUG_SESSION 0x006b #define HV_EXT_CALL_QUERY_CAPABILITIES 0x8001 +#define HV_EXT_CALL_GET_BOOT_ZEROED_MEMORY 0x8002 #define HV_HYPERCALL_FAST (1u << 16) =20 /* @@ -192,4 +193,14 @@ struct hyperv_retrieve_debug_data_output { uint32_t retrieved_count; uint32_t remaining_count; } __attribute__ ((__packed__)); + +struct hyperv_get_boot_zeroed_memory_range { + uint64_t start_pfn; + uint64_t page_count; +} __attribute__ ((__packed__)); + +struct hyperv_get_boot_zeroed_memory_output { + uint64_t range_count; + struct hyperv_get_boot_zeroed_memory_range ranges[255]; +} __attribute__ ((__packed__)); #endif diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h index 921e1623f7..54cd2fff72 100644 --- a/include/hw/hyperv/hyperv.h +++ b/include/hw/hyperv/hyperv.h @@ -101,6 +101,11 @@ uint16_t hyperv_hcall_post_dbg_data(uint64_t ingpa, ui= nt64_t outgpa, bool fast); */ uint16_t hyperv_ext_hcall_query_caps(uint64_t sup, uint64_t outgpa, bool f= ast); =20 +/* + * Process HVCALL_EXT_GET_BOOT_ZEROED_MEMORY hypercall. + */ +uint16_t hyperv_ext_hcall_get_boot_zeroed_memory(uint64_t outgpa, bool fas= t); + uint32_t hyperv_syndbg_send(uint64_t ingpa, uint32_t count); uint32_t hyperv_syndbg_recv(uint64_t ingpa, uint32_t count); void hyperv_syndbg_set_pending_page(uint64_t ingpa); diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 37803cd724..d4160f3334 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -10492,6 +10492,8 @@ static const Property x86_cpu_properties[] =3D { HYPERV_FEAT_TLBFLUSH_EXT, 0), DEFINE_PROP_BIT64("hv-tlbflush-direct", X86CPU, hyperv_features, HYPERV_FEAT_TLBFLUSH_DIRECT, 0), + DEFINE_PROP_BIT64("hv-boot-zeroed-mem", X86CPU, hyperv_features, + HYPERV_FEAT_BOOT_ZEROED_MEMORY, 0), DEFINE_PROP_ON_OFF_AUTO("hv-no-nonarch-coresharing", X86CPU, hyperv_no_nonarch_cs, ON_OFF_AUTO_OFF), #ifdef CONFIG_SYNDBG diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 2bbc977d90..a42eacd800 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1463,6 +1463,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *c= pu, FeatureWord w); #define HYPERV_FEAT_XMM_INPUT 18 #define HYPERV_FEAT_TLBFLUSH_EXT 19 #define HYPERV_FEAT_TLBFLUSH_DIRECT 20 +#define HYPERV_FEAT_BOOT_ZEROED_MEMORY 21 =20 #ifndef HYPERV_SPINLOCK_NEVER_NOTIFY #define HYPERV_SPINLOCK_NEVER_NOTIFY 0xFFFFFFFF diff --git a/target/i386/kvm/hyperv-proto.h b/target/i386/kvm/hyperv-proto.h index 4eb2955ac5..ec38b717e4 100644 --- a/target/i386/kvm/hyperv-proto.h +++ b/target/i386/kvm/hyperv-proto.h @@ -94,6 +94,11 @@ #define HV_NESTED_DIRECT_FLUSH (1u << 17) #define HV_NESTED_MSR_BITMAP (1u << 19) =20 +/* + * HV_EXT_CALL_QUERY_CAPABILITIES bits + */ +#define HV_EXT_CAP_GET_BOOT_ZEROED_MEMORY (1u << 0) + /* * Basic virtualized MSRs */ diff --git a/target/i386/kvm/hyperv.c b/target/i386/kvm/hyperv.c index 1ac5c26799..f92ea7e0a2 100644 --- a/target/i386/kvm/hyperv.c +++ b/target/i386/kvm/hyperv.c @@ -55,7 +55,9 @@ static uint64_t calc_supported_ext_hypercalls(X86CPU *cpu) { uint64_t ret =3D 0; =20 - /* For now, no extended hypercalls are supported. */ + if (hyperv_feat_enabled(cpu, HYPERV_FEAT_BOOT_ZEROED_MEMORY)) { + ret |=3D HV_EXT_CAP_GET_BOOT_ZEROED_MEMORY; + } =20 return ret; } @@ -122,6 +124,14 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_= exit *exit) hyperv_ext_hcall_query_caps(calc_supported_ext_hypercalls(= cpu), out_param, fast); break; + case HV_EXT_CALL_GET_BOOT_ZEROED_MEMORY: + if (!hyperv_feat_enabled(cpu, HYPERV_FEAT_BOOT_ZEROED_MEMORY))= { + exit->u.hcall.result =3D HV_STATUS_INVALID_HYPERCALL_CODE; + } else { + exit->u.hcall.result =3D + hyperv_ext_hcall_get_boot_zeroed_memory(out_param, fas= t); + } + break; default: exit->u.hcall.result =3D HV_STATUS_INVALID_HYPERCALL_CODE; } --=20 2.39.5