Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp186695rwl; Thu, 3 Nov 2022 22:01:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7xWmwiifcMOflUqp5ruHmo1FcI6V4ldn/pZIgaKeu7jxhYNUkiSK+0IaWYA47bkU8/KcoM X-Received: by 2002:a17:907:7fab:b0:7aa:97e5:fac2 with SMTP id qk43-20020a1709077fab00b007aa97e5fac2mr32391512ejc.553.1667538096893; Thu, 03 Nov 2022 22:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667538096; cv=none; d=google.com; s=arc-20160816; b=A77AJw/OOZZxRKC4ty03ILI0o+Q9ZPSb8giXptPhockqOTpwxVdzu93nN4BKKq5UMI 2gKDYwg3lDG7aosCANUKXo4YXGxzY1QA1rzmxpLohvJaMu/tqcvalx6l72K9lRY7qu4U TJUk5C8Rgn25msbJYjHU0xZINDHKsz4Gr/XfxNkY+AtbSHIZ4VK29vKyMhjtwXR35o/r gGOs5uN9JUyL4gN+1unEOIJ5COJVlOlBJG+E8NAAvlfjS934FKI8MWJGnLw/uqfg7Bq+ AXNmP9HSu7ONaDHIYaeRGDHC30JCeKCD42zooMpyT3XdwyXIltt51Sp6Yzde+mZPzRJP 3GZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter; bh=7XcDCyS5Tt+1ZylW1x0vh/KEQR0FAI7fKUXuYluVgDA=; b=bc83gxzzLEveAWQJaLNA3jULUmDjP8KcnCDLiMwelfWzVvW2+VufWiVo0SA+Ch3e3i m7EaPv14q5PPMEo8qngUfCyGatESMbKe3diicOY8F5jMCPLzCyBxPEhH6hMGQdRkQWqa 8Jch9d8f04C8skkZ7cV+MYzLjfDE+T/u2570Ys/lYzMK/yXzRJBwFOOOwh5AHJvBOu26 d+w3nafUsNs24DrB9VQIMd1ExFmo1QaBvMPV5N+xUEWSP7gIbEQvlXLb3yiwzFdBd89q JInybPYnwFdBuphKCAzkjPrlh8evGUMtxmPbe6MR25Qy/N2xKoWslnCnEqIT3vcJfLVU 4E7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=kmNEDKGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go13-20020a1709070d8d00b007912fb7ad6esi4728807ejc.893.2022.11.03.22.00.47; Thu, 03 Nov 2022 22:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=kmNEDKGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbiKDE5A (ORCPT + 97 others); Fri, 4 Nov 2022 00:57:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiKDE46 (ORCPT ); Fri, 4 Nov 2022 00:56:58 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 01353B78; Thu, 3 Nov 2022 21:56:57 -0700 (PDT) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id ADD3E205DA4A; Thu, 3 Nov 2022 21:56:57 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com ADD3E205DA4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667537817; bh=7XcDCyS5Tt+1ZylW1x0vh/KEQR0FAI7fKUXuYluVgDA=; h=From:To:Subject:Date:From; b=kmNEDKGcWlB8WhPB8+MllKdG5GjRQXWJGxlZJ1bmdiFUS1HhPQxFwdQH/lMGo75Kd lVn7jtG4RxTG/We1t2yJyEFmUX93gxvn4cJt1tVHssVJfjDSVaTuwpPlkLbgDayDkJ dUaDbzTDA7koB79y/W5H2sbAVVNiNpS68ZmjuVEQ= From: Saurabh Sengar To: ssengar@microsoft.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, ssengar@linux.microsoft.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, mikelley@microsoft.com, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com Subject: [PATCH] x86/Hyper-V: Expand definition of struct hv_vp_assist_page Date: Thu, 3 Nov 2022 21:56:54 -0700 Message-Id: <1667537814-15939-1-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The struct hv_vp_assist_page has 24 bytes which is defined as u64[3], expand that to expose vtl_entry_reason, vtl_ret_x64rax and vtl_ret_x64rcx field. vtl_entry_reason is updated by hypervisor for the entry reason as to why the VTL was entered on the virtual processor. Guest updates the vtl_ret_* fields to provide the register values to restore on VTL return. The specific register values that are restored which will be updated on vtl_ret_x64rax and vtl_ret_x64rcx. Also added the missing fields for synthetic_time_unhalted_timer_expired, virtualization_fault_information and intercept_message. Signed-off-by: Saurabh Sengar --- arch/x86/include/asm/hyperv-tlfs.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index f769b9db4630..b3d0f42853d2 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h @@ -377,11 +377,20 @@ struct hv_nested_enlightenments_control { struct hv_vp_assist_page { __u32 apic_assist; __u32 reserved1; - __u64 vtl_control[3]; + __u8 vtl_entry_reason; + __u8 vtl_reserved[7]; + __u64 vtl_ret_x64rax; + __u64 vtl_ret_x64rcx; struct hv_nested_enlightenments_control nested_control; __u8 enlighten_vmentry; __u8 reserved2[7]; __u64 current_nested_vmcs; + __u8 synthetic_time_unhalted_timer_expired; + __u8 reserved3[7]; + __u8 virtualization_fault_information[40]; + __u8 reserved4[8]; + __u8 intercept_message[256]; + __u8 vtl_ret_actions[256]; } __packed; struct hv_enlightened_vmcs { -- 2.34.1