Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp323986lqh; Fri, 31 May 2024 02:27:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWijS+z5YR4/kpS6YrmLFGAt6QzrxgGNMNLNWwtzoDwyhuElTHekk6KrsDtKAksfz4aFKxA6SoUwWXYwsnc1aVLbaYzlhimYCuQ81JpBA== X-Google-Smtp-Source: AGHT+IEe7kbKLVE8e0kDv+GloPCJ9k2k3DFWxk6OOmBSRmgGp8H4CCzP9++gsXtSQWktzjiDMebE X-Received: by 2002:a17:906:6dc4:b0:a67:90b:9b8b with SMTP id a640c23a62f3a-a682272f33emr84877866b.72.1717147656895; Fri, 31 May 2024 02:27:36 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67eaf654dfsi71406166b.818.2024.05.31.02.27.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 02:27:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=iNZdVjcW; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-196580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196580-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 715681F294B8 for ; Fri, 31 May 2024 09:27:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C013A81727; Fri, 31 May 2024 09:27:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="iNZdVjcW" Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2067.outbound.protection.outlook.com [40.107.100.67]) (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 CA8C978C92; Fri, 31 May 2024 09:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.67 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717147643; cv=fail; b=j8XwWCUBdyp5tj6TOjRMYMMbhSELgL3ORHY6CE0HCnah1CCaYEO1PQWaS/hGd5DMhEu6Ux9FoiJXnaO+hqxa+MtGh9LmsaTcEToUDKsZQZssxSuFfr/ijWv3K3HW9/ape0ca+PErpwJPyp4u257BrwaymF8bHq4Qvzo9s9mV+gM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717147643; c=relaxed/simple; bh=mgqhPFIcjmL+kYZxfLQQg4a+Q30a7EqY/dXkRMcfxgY=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=afsVE2h1LtMaUM7zmhp+H4ITkrdjw7GUp925ZXm2Bm+X9Q6VU9lpbJJrT0CQeKnyc2+c68qXAUBw1uHBhVNpbQQ+AxDs3EWC6WqZZCqENseo3lgYJy+b9bwRr24ok7aaN0hkR+8jjVLA/htZhmPdxa8WQnlX2rFfAF8uX81s8AU= 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=iNZdVjcW; arc=fail smtp.client-ip=40.107.100.67 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=A5y6L3GshN7x3C2cQZTXOVZpwXOrEbqyygeJhgCSVU+ihq+L0TUPiE01YNEjyQl5XdJ6U+LoAepmzqL2XmK/1UAo9geNS3Z6ZfCWyTBTMNSdV6xGypOfXRmz2Lhx2BtxHXHAhrY/9JyAMDc4GWa9dVW7cimTqfaO3eA9B3Hv4GNeOPddC3u/GkV4Qwxy6fpi6dqVOczv5j5znrRWARYc7Tyu14Mh1AsPReG9jnGiTj7kBfl5zj8DLIrDfEwsllnx73jONi1PRI5CSpxEsrvwU06BYxtCnskeskslqQqI9YYIoAvJPz/T52tQxf/DizRCbC0pJd0zVxS1L1eq1CmJAg== 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=o/J3CYrImIWEGN1dpKfgx/c5+IFjxmpL5oWhmgHfmWc=; b=lQg3ef0oKxXk5vNexufCxps5CjtkVEb+x/aBgCfQSQdRORfhgUwg3XmuujFfpgJEgYiDLqS6ErttGUWCX/m2Jm1itBwgtW2Ta0Go3tNodgq+s4CrQU80R6sJZTU7a9xdqbE8PpsdBqPGB7bj9zV+X3eMMcBIOD26gFsxGn2VmDA44XGb0OSYJt2AY1HfaNa6sxsV+iO5VHaKSacyyOcP+INYdpHcFmL8LuR8vXgIBkjGwSV31nabC7H2hejGk9VhoykphsMtUdwyGj7bt6+jOdQxlg9B3OxVy0a8RDLT5Xu0coKnb+aVsLoHvKLLcJnto3ZaeSwdYv0Pc7iolprTKg== 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=o/J3CYrImIWEGN1dpKfgx/c5+IFjxmpL5oWhmgHfmWc=; b=iNZdVjcWJvurgYBzE6p9su0o+rhLZyJC28b9CwWG04tns9ccjEfBoFzbQp13Ig/QFXp6YDCBehjpr3aGvMqY56SqHEadsvO+i5TuzSui+D2hghwxE6qoNsqPZ88uNU2pzCTkiA06HvKH5E9SMYUqtkqRb1YZ1NwRYP1CveHyq80= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) by DM4PR12MB6303.namprd12.prod.outlook.com (2603:10b6:8:a3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Fri, 31 May 2024 09:27:19 +0000 Received: from DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::6318:26e5:357a:74a5]) by DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::6318:26e5:357a:74a5%6]) with mapi id 15.20.7633.018; Fri, 31 May 2024 09:27:19 +0000 Message-ID: Date: Fri, 31 May 2024 14:57:09 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] KVM: x86: Expose per-vCPU APICv status To: Alejandro Jimenez , kvm@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, suravee.suthikulpanit@amd.com, vashegde@amd.com, mlevitsk@redhat.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, mark.kanda@oracle.com References: <20240429155738.990025-1-alejandro.j.jimenez@oracle.com> <20240429155738.990025-2-alejandro.j.jimenez@oracle.com> Content-Language: en-US From: Vasant Hegde In-Reply-To: <20240429155738.990025-2-alejandro.j.jimenez@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0133.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:bf::15) To DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) 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: DS7PR12MB6048:EE_|DM4PR12MB6303:EE_ X-MS-Office365-Filtering-Correlation-Id: d28898b3-66f5-4a49-6f87-08dc8153de1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dDh6ZGZCcjU3TXFmYmZsNUh3ZktOVjY4Zk12QjlPSnNoTEJHbGwxeWwzOHEz?= =?utf-8?B?OWVsMEZ4WXc0SWJrUm82bUtxQmFZcit2L0tGblM2Z3JybkpNSGszbGlaM0VF?= =?utf-8?B?WDJzR3dxL0hpSWh0b2d2cTh5b3FIb3RBbWI5OVhjaWFPNlJBRHdZbkJBVTBh?= =?utf-8?B?Z2hLZC9HdTdLd0l4QlpJdmxhVVloWlJXcXUzZm5MS0JTT2J1dWpvQ3NuOWx0?= =?utf-8?B?MFZVeVV4WjNMbU9xaFd4TFBGdnZ5YVFRdEt1TG4vY3BkS2J4am5YNVM1VXhi?= =?utf-8?B?eHIvS0NnUXFuQ0IyS3JKdXQ2V3k3ZTNhbVFlODdYM3NCckdIMStucURYNFYv?= =?utf-8?B?SE81eVhXNGkyYUZQOGVlQ1AwcE1LSTJKYmFzYWpIckFKdUFVaHd5UEdiV0p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1g5UFc5UDJiUTkr?= =?utf-8?B?ai9haWxSUUZ3VEdwZjRBS0d5Uk9YVnEvWVo1akJNbFNURytld3NhZEhSN1d4?= =?utf-8?B?ZHMwU3FxN2NEVVI2SG1hMldGcGhUTjZUM1dNM2pXK1RUUENxTEFwUEZ4cW42?= =?utf-8?B?elMyRWxsOEVLb2ZuNk10SXVsblpFRXdMR0NPemcrcUNMbGF5VWZHVnBWSjBs?= =?utf-8?B?QjUxN281UWJjRkxSSkdTaUJhSVloTUhUdkxkZmFzM0FEOFliOTVMOWRscWkz?= =?utf-8?B?bzFWa1ZpQmd6TlR1TE0vTGNMOXJWQVQya0IvVm9lVG1udlZ5QXVEeTY4bzhP?= =?utf-8?B?YnhQbGVTVXVwenJmUGZqMjlsd0NWMTZxb2FGbHJTS1YyNkVsRlNFNGRNKzBW?= =?utf-8?B?Zzd5ZXhMbjhjSkJVUjBnVkwwWVczc2d2UnBaamZodHltZVppNlVhWnNRPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6048.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ekRPM0FKQnhZNzFUcVJPakNSM3NnOHE5eDNlWmhsTk0rOHJLRy9SQVkyT1hu?= =?utf-8?B?OUVPSnpPVTYzNk5pRS9CU0FvRXBSclE1anJKOElwbEMxeS9mWXhDbElpZmJa?= =?utf-8?B?Sm83V0JQcDZ0bzBCVGpDNEJ6RnVQZ2plTHNtL04zNE9LUTV5Wk5LTFdnQzM0?= =?utf-8?B?RzBaOEgwaXZBc3FxK3EzUXJSWldQc2RBdzN1QVl2bmVSaSt2Rm5LTEtIQTl4?= =?utf-8?B?MURFQjFaTWdLNHM1MjFIV0MwNFBuUlJlTTY4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ZS9l?= =?utf-8?B?V3hIS3ZFS1llT1lzMzJjMUEvQ3E3TVFHNWNYZU5xWWorQXV6TXg2WFhGMEhD?= =?utf-8?Q?qJGz+3rWKNNPkJIAq1md4Nc3N?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d28898b3-66f5-4a49-6f87-08dc8153de1c X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6048.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 09:27:19.1624 (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: 3AcmsmghOv67vTDIkQmvXUTJZoxhJGGuJq365aCbHfjUqlVD8PD8OhMZXGlFiwZ2LOb9I5Kz8wcSKiddJEtLqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6303 On 4/29/2024 9:27 PM, Alejandro Jimenez wrote: > Expose the APICv activation status of individual vCPUs via the stats > subsystem. In special cases a vCPU's APICv can be deactivated/disabled > even though there are no VM-wide inhibition reasons. The only current > example of this is AVIC for a vCPU running in nested mode. This type of > inhibition is not recorded in the VM inhibit reasons or visible in > current tracepoints. > > Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde -Vasant > --- > arch/x86/include/asm/kvm_host.h | 1 + > arch/x86/kvm/lapic.c | 1 + > arch/x86/kvm/x86.c | 2 ++ > 3 files changed, 4 insertions(+) > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 1d13e3cd1dc5..12f30cb5c842 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1573,6 +1573,7 @@ struct kvm_vcpu_stat { > u64 preemption_other; > u64 guest_mode; > u64 notify_window_exits; > + u64 apicv_active; > }; > > struct x86_instruction_info; > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c > index cf37586f0466..37fe75a5db8c 100644 > --- a/arch/x86/kvm/lapic.c > +++ b/arch/x86/kvm/lapic.c > @@ -2872,6 +2872,7 @@ int kvm_create_lapic(struct kvm_vcpu *vcpu, int timer_advance_ns) > */ > if (enable_apicv) { > apic->apicv_active = true; > + vcpu->stat.apicv_active = apic->apicv_active; > kvm_make_request(KVM_REQ_APICV_UPDATE, vcpu); > } > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index e9ef1fa4b90b..0451c4c8d731 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -304,6 +304,7 @@ const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { > STATS_DESC_COUNTER(VCPU, preemption_other), > STATS_DESC_IBOOLEAN(VCPU, guest_mode), > STATS_DESC_COUNTER(VCPU, notify_window_exits), > + STATS_DESC_IBOOLEAN(VCPU, apicv_active), > }; > > const struct kvm_stats_header kvm_vcpu_stats_header = { > @@ -10625,6 +10626,7 @@ void __kvm_vcpu_update_apicv(struct kvm_vcpu *vcpu) > goto out; > > apic->apicv_active = activate; > + vcpu->stat.apicv_active = apic->apicv_active; > kvm_apic_update_apicv(vcpu); > static_call(kvm_x86_refresh_apicv_exec_ctrl)(vcpu); >