Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2243846lqo; Sun, 19 May 2024 22:07:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMeqHMUv1DZWrYG+RMpJT9J/sIhZVcXuqAzOYQF76tJwL+777rszBIjDS631SWLNw9xlK1LB+MuRdtrsbtixBcKX8qjzqiiCGTOF4D3A== X-Google-Smtp-Source: AGHT+IEmOiCHEtJmQqAzxUDsouHWWzusiH0eQGpZPkoFs5JeIz1CiL91JlGsXuzsKaqjK/ZEHGiB X-Received: by 2002:a17:902:82ca:b0:1e2:bdef:3973 with SMTP id d9443c01a7336-1f2ed3c34efmr61132775ad.33.1716181627034; Sun, 19 May 2024 22:07:07 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0b9cfba7si229887395ad.92.2024.05.19.22.07.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 22:07:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183414-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=j01nvbp8; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-183414-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183414-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A0CD6281E3F for ; Mon, 20 May 2024 05:07:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CA7414AB2; Mon, 20 May 2024 05:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="j01nvbp8" Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2069.outbound.protection.outlook.com [40.107.92.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 826A8DDA3; Mon, 20 May 2024 05:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.69 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716181616; cv=fail; b=CaHPCAq9ezQx4lSBdOlPxziTRlFY1rloqZcfsRUIsqAxcADpLXrjhkmJYkMz2yG7PnWZMK5va0PerLDdGUDkgQso6a9MLwe5QY2iDEpHTDFMKqhva4irh7tix/pR33PNoIjMO2oo7tBrQEGt3KuFmfMlbKiasMKBSKd6A9zrTpE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716181616; c=relaxed/simple; bh=cpnylsIT6vrnU1Zd7YJ2kUEqO5z/2MnBpfXYIua/gps=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=n6YLcfwhD4m1VGguSt99Z8QEysieeX2kK6y8FA0LA7wZwyqP8oqWgF/ny28cMz5OqAsusAnviN+IvP3oahrbdr4RByBI7eHswQzwqgk51RTAi942JgCtIXYX2I9NCByZ6DBYn/O31GrKqK5fkNqM10RfGY9x/1qyYwLH0ECvRJ8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=j01nvbp8; arc=fail smtp.client-ip=40.107.92.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lXDFBb8VAzXu2M76REIStvXe9A1lyhsLL2bVP0gn4xTi4zvnSPC7+aBq7eFLdcS9sL0WHBUzRIrYGCKf99c+AtnvraXGSr6IiVXln6KpH02dqX42gXGvlDjvwgfFdD+0WYOQzR+v0m8pkD2TcuPeOHj8olw2oBazAJUcFa+wi2bplFNaIssd/R+DR5gqY+DzaRz9c3AqD+vWGSwaOsFfazY7yWkqnFrMCfCeyCNZFn3ixIbkDM5Q3mAB+0M5ppu+GVfhzFGz07FKq7qJZW18s8hyMBuSKDZCDQUIOmi7Rlih3+lMBgPvwqOc+wRpc4Bi+sNqfUvogjCFMZhQVmrgOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=mJ5pW+rwTkuxDKuirHLQuxXNhJPZbzEiRTh/F74IXwU=; b=E+JsPeZGup+BwdBK0keAl8rdBBu+bWLQEMI9mpgmTs/uHCvTJUWQZj3QSGr+MNiAcwVbm5XBiuHUiRxa7NGO9dPjYp/vVdSHTkaqLkIL5EZkDXUg5YXU92TtXaR9ZT+TESJHwtUc3cKI0qjSrOTDidNUTxvczIg5MQsWA/fa0I+oZE6Vp4tvg0P6+K4Wu7apVHWU/UhR/vfa8qnikakZy34wp3gjuEcxOSFb1TTdm6m4wdyeXC1yHVCqRGZiBD0PunvjoQ2PDdE5ez07C0ZfFoKKgnlFj23i13XsZ4guPcYbo4SVkHnBO+Pbz8HiZuyUWLmyBLVVnO6xuxc9g5R96A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mJ5pW+rwTkuxDKuirHLQuxXNhJPZbzEiRTh/F74IXwU=; b=j01nvbp8Iu5p4c3hdKHERZD81byZqtgMFJzz3JZ9KqOw4NqRCw412RFDlUgRcz8HYYRg+inoTEDcrs2WFoS/PYzI9OoR6NR4O4S0c0O6VQQ1Ru+o1VoU/SwaL4hxwwh3sSVFx+CPODvX+0PTDTfFFQD4yUFtHtQPln9rUyOxRRU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB6588.namprd12.prod.outlook.com (2603:10b6:510:210::10) by IA1PR12MB8287.namprd12.prod.outlook.com (2603:10b6:208:3f5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Mon, 20 May 2024 05:06:51 +0000 Received: from PH7PR12MB6588.namprd12.prod.outlook.com ([fe80::5e9c:4117:b5e0:cf39]) by PH7PR12MB6588.namprd12.prod.outlook.com ([fe80::5e9c:4117:b5e0:cf39%6]) with mapi id 15.20.7587.030; Mon, 20 May 2024 05:06:51 +0000 Message-ID: <35c0dee9-0e25-4000-5386-2480db4ab1b4@amd.com> Date: Mon, 20 May 2024 10:36:44 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2] KVM: SEV-ES: Don't intercept MSR_IA32_DEBUGCTLMSR for SEV-ES guests Content-Language: en-US To: Sean Christopherson Cc: pbonzini@redhat.com, thomas.lendacky@amd.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, michael.roth@amd.com, nikunj.dadhania@amd.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, santosh.shukla@amd.com, Ravi Bangoria References: <20240416050338.517-1-ravi.bangoria@amd.com> <9252b68e-2b6a-6173-2e13-20154903097d@amd.com> <305b84aa-3897-40f4-873b-dc512a2da61f@amd.com> From: Ravi Bangoria In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0246.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:21a::16) To PH7PR12MB6588.namprd12.prod.outlook.com (2603:10b6:510:210::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB6588:EE_|IA1PR12MB8287:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b9b3901-51c3-4a75-9fa3-08dc788aa8b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|7416005|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?cGhGLzJzOW9FaHNOaFJsU3ZmM1VGdmdFWlBJMjFHOC9wcEFlVFc0L0pLalVP?= =?utf-8?B?Q0NiYWMya2dQeWNrOXVDTFd4aktyYlJFMWEzcTBUN1VLRUJ3VTl2d0JlUGZB?= =?utf-8?B?Tm1DNGlEUW5XTWd6Ti9rTFhlb3FYTjE3dTR0bzU2enlLRC82eVZtWUpTMldT?= =?utf-8?B?cjgyWlg2YzByMitXYlp5QXZncnJQd3lFZWxCWDRSNEJRQnJTK3BScnZkL2E4?= =?utf-8?B?VnplV215cDJzSG5mbTY2MUlRYWVZS2EyN25IVGZTZDZ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RDZsWks0Y0ZzS243L01BczRZeFljTk9NRnAy?= =?utf-8?B?ejNyK2tNcjFmOVFGRThYbjZ6UmJQRGlUQ0NyMzZ1aGphWXhVZWJzcHlCNjQx?= =?utf-8?B?MVJzSkpDbkhleHNxcXZUUDJwZFFrZmkzREJJY0lDaExMelI4ZDRuTVhrQjJ5?= =?utf-8?B?Q2RWUE5DUDVWKzdnZmhETzJsb0M5K3BWR0hGZVdhb2lmTnlHK05zQ3ZuUGU3?= =?utf-8?B?WGsrTHprL3B4TjBFdmVmb3pNR1Y0d1FycVlGUkQwMEtSZnZ6enhVRnk0OFp3?= =?utf-8?B?N1VyTGpWNTJ6dVUydG1WRHFZWlhJWVFKQzBwb0kzTWZmS0ZVU0NJOUtxQ2cr?= =?utf-8?B?WlZTT1V5Nmh0dGFtUllFK2ZoS3cybDdzeEtqanNMSXB5RDAzWVZJd285dllp?= =?utf-8?B?bEczLytEZTV4b0tZZzg2M0Rkait5ckR1RUZkSFRZT0g3QVRvWWtsbnl1amhu?= =?utf-8?B?aDltOEliQ1RKRkM2eTkrMjlwQnZVSUp0OVd3YjBURlZBSzIzMGVoRkFTSk5j?= =?utf-8?B?UHhhcU9mZUh3aE5pYklOWFZtcUFKTTFOM1ljcDRtcU9GZ1ZqcHBOUWR3PT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB6588.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(7416005)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TVJjeFBHaWxaaWpnUmVZd055aXp0amwrVm9tbGQvMzMrd3ZkL0xQdUZJd3ZB?= =?utf-8?B?WkVWWnRsQ21qUFl2cTUyYTU3NlI4TytmdzhRQm1UNkM1SWVqa2wvOG9wQVBH?= =?utf-8?B?NjR4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Y3Z2JzOUFGZkZXQVdFd2tGZDNzenNnRXc0?= =?utf-8?B?aHIwMEQ2QlEyYlVYTUkvakJwNjh4Y3F2cjR2bGZNOXovOGczMFJpWW4wbnMz?= =?utf-8?B?YXpXaVJPSVRnZ0dpNkZjdHBCUE5seXpUd1JUaWI3RGZBaVY4djRhMkduemJK?= =?utf-8?B?RERiMFZzUEJXRFF4TG9BSGR1NDRGRmVTeEpsQjRUcUQwSlpyMDlpT1d6OEp6?= =?utf-8?Q?chKabC3O2FZrzgNNT7BnJh+7k?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b9b3901-51c3-4a75-9fa3-08dc788aa8b4 X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB6588.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2024 05:06:51.4219 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aQe4Se7Wshv57r/rs4Pab4zNbP49pl958nxPrZftgTB/G2G2hV2uUHlDky9hajaJwXDa5JS2kVs1IfTNZr2sAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8287 On 20-May-24 10:34 AM, Ravi Bangoria wrote: > On 17-May-24 8:01 PM, Sean Christopherson wrote: >> On Fri, May 17, 2024, Ravi Bangoria wrote: >>> On 08-May-24 12:37 AM, Sean Christopherson wrote: >>>> So unless I'm missing something, the only reason to ever disable LBRV would be >>>> for performance reasons. Indeed the original commits more or less says as much: >>>> >>>> commit 24e09cbf480a72f9c952af4ca77b159503dca44b >>>> Author: Joerg Roedel >>>> AuthorDate: Wed Feb 13 18:58:47 2008 +0100 >>>> >>>> KVM: SVM: enable LBR virtualization >>>> >>>> This patch implements the Last Branch Record Virtualization (LBRV) feature of >>>> the AMD Barcelona and Phenom processors into the kvm-amd module. It will only >>>> be enabled if the guest enables last branch recording in the DEBUG_CTL MSR. So >>>> there is no increased world switch overhead when the guest doesn't use these >>>> MSRs. >>>> >>>> but what it _doesn't_ say is what the world switch overhead is when LBRV is >>>> enabled. If the overhead is small, e.g. 20 cycles?, then I see no reason to >>>> keep the dynamically toggling. >>>> >>>> And if we ditch the dynamic toggling, then this patch is unnecessary to fix the >>>> LBRV issue. It _is_ necessary to actually let the guest use the LBRs, but that's >>>> a wildly different changelog and justification. >>> >>> The overhead might be less for legacy LBR. But upcoming hw also supports >>> LBR Stack Virtualization[1]. LBR Stack has total 34 MSRs (two control and >>> 16*2 stack). Also, Legacy and Stack LBR virtualization both are controlled >>> through the same VMCB bit. So I think I still need to keep the dynamic >>> toggling for LBR Stack virtualization. >> >> Please get performance number so that we can make an informed decision. I don't >> want to carry complexity because we _think_ the overhead would be too high. > > LBR Virtualization overhead for guest entry + exit roundtrip is ~450 cycles* on > a Genoa machine. Also, LBR MSRs (except MSR_AMD_DBG_EXTN_CFG) are of swap type I meant LBR Stack MSRs.