From patchwork Sun Oct 1 21:36:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongli Zhang X-Patchwork-Id: 147173 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1105907vqb; Sun, 1 Oct 2023 16:57:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+jo5YH2z7ZZNeBpemvU281DwDCc8Sc2LY+CcLTPg8ec0VJzY5sx4EaPEZm9Gz/g6DjB7y X-Received: by 2002:a17:903:228c:b0:1bd:d92d:6b2 with SMTP id b12-20020a170903228c00b001bdd92d06b2mr9761640plh.10.1696204647580; Sun, 01 Oct 2023 16:57:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696204647; cv=pass; d=google.com; s=arc-20160816; b=UtaZmAY0D1bYksYqosXlx8GRurzNxE8ZREs/CWkDyVPzp7lkYxS0rTVS+zEq41QQFE 1D3e9e7vhYuDTo2aPyrQBq5vbIljcDFPkrjrkEhg+Kw2j6Sqf01IxyV/QsN9wtcVEOrG zAMcvOa8d1naXMy22vPzVfi1wY1CAN3aUhgo7O08Rx41gLJPFuMjUD9whK9aZWWby8Kw /2TxLaSJ6Voy78vIP7m5Q+WTr6i02/HcgenFL3J97XzlS13AgJ6SGMpNMc4iWz/z36il oRpIQ4o/A97mv1KToebf9oaaWzvwYZkV+4PE48ja8mvcrxFHKdL83wFEfrbmkcsxxcdu ADJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=2RlcX5xRoWECOjQUyLtUtoGf9mD0ijduDwCw45zUdJM=; fh=N5zCzbt/6CyOdkTTq46+AhFv8Zgy/hfIIUP0VEkBmKk=; b=f9fmzVNXSJ10ZofC0tC8jxAy5HahOy0k33vcTmoBGtTMdUkYtFjd+Q9njJVxo+UZOm l0ZOZE619ahekHlTaVun2SxcvG8Fp5AZeLkwRNT1MmDrE9cUAEj7zGKhf2x+OLttwa61 uJ/DJJTfE7vIa+0u4yIwFpG7g+ApXz4S586BDot79OBJyzQTHUwA34g4iz+3tdu1zqvH 6pcc9EwiMMk7ANvTCZ9YiRzSPgCqkBvLWEjOB8L0MljSErZqUewRAmp9VRVcqGZEV4et Wvd9AObmRXIHlz6ZHCy+/IktdmFKwRaME+gXg+wHjCqP2HTUWQBBOJZS+gXJvsDZz0d7 HyLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=v6qJ3Bui; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=CSVD+kiQ; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x12-20020a1709028ecc00b001b87bd2f7b0si24062356plo.402.2023.10.01.16.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 16:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=v6qJ3Bui; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=CSVD+kiQ; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C4467802C7EF; Sun, 1 Oct 2023 14:59:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235412AbjJAVkj (ORCPT + 18 others); Sun, 1 Oct 2023 17:40:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjJAVkh (ORCPT ); Sun, 1 Oct 2023 17:40:37 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3623C9; Sun, 1 Oct 2023 14:40:34 -0700 (PDT) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 391LYEkQ021871; Sun, 1 Oct 2023 21:39:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=2RlcX5xRoWECOjQUyLtUtoGf9mD0ijduDwCw45zUdJM=; b=v6qJ3BuindB91l0q9vWJ0IfsojNaC6thF8prF8lhX4z+Xc0eeW0sGNNF4fXMTnKxrHNO F0zIGogwqanmUswAKd4/c6KP5UhLAdrsl94qEJtkcYqqoXjGPTsaYVA5XMtl/O0lQ22x Dwj+iOglwRZATRfv1+esQgWtknr6F8Vql94EYz0HB6urSVdnc8o5k5zsy89g/nrtHnES 1MNp5aixf0hZ9GpYsV7M7Mq/1TipfyIj3ud7ZW6iHByLV5hUprKQ4FO+7xEfpxAGN3/A 5HEFnzkV4sqg6UrKH31g7wMFuhKzRN0nE7Z6foWt5g+wGExLTD1QX1hjo0OQfbkakJhJ 0A== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3teaf41jea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 01 Oct 2023 21:39:59 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 391JfC34001409; Sun, 1 Oct 2023 21:39:58 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3tea43vwku-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 01 Oct 2023 21:39:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kjxtpZvE1hNOpmCKyVEtIlup9ZB1jjMvJ7CyCSIlvYr/FQu1fiDDQ3NsRylooJ88AjTBtR8vH7T6P5lIp2vks/vWtZo2RcRPrK15m+Ezz3SBdM1h0xkOuD5no0Mc3NludBUg9TovAH4wtU0ofRGDv4vFrgvqCsf9nfQjulETWZ+/icIgHk1b+eX0rcunZ0B1tHVyHUPFJGzr+S/mSt9cbQ8s4C05dLzjOQ8PmNRkCvBJVX2b1wR8RajaAmiHF6Y4nQcYgKGV1Qb+j1ctpEq9wzUKx93C4eP9mpXc6Kdy8TK/effBAFRC9D52JxQIe5bS9ZoW5LY18AxYsoZbSuwrZg== 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=2RlcX5xRoWECOjQUyLtUtoGf9mD0ijduDwCw45zUdJM=; b=jlaqnjkL5c5JQMjS3RlGlytg3/Q3s3k6yAzk2oxOVcCjalBdaA1biPJ647pG4NAeA0Wgi0qnRHkJDkx5pHnVS5m4nzW6Ip8B3tvr4WWmWZSeTvpKXmH2VTBoHMViRkZ2bzUEDgWqxVqPz5MhQcWnH/UMf0LuFz45lbpPOuyT3g6RKk4papL59tyTwX5dfeyiDZt0edwrjnxUizlk6/RWCRJz/AlWi4sQjFiKKtQIATz8skEMH2oQF6cbRpcb6judEVkYF2/tZ9w3R8q1ehgs+A7hhzXtzWloqs4M5xTwdCJ1mZzd6v1rxDQFo8QCk0CH1fnTdZh4kb28HXjdFUTSpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2RlcX5xRoWECOjQUyLtUtoGf9mD0ijduDwCw45zUdJM=; b=CSVD+kiQHPRZjwn5khX737WNIgakhqkQybZG3/QXm+By7uavn/Z7iX5pY0xrQyoSu91qwesZhbO2nfeO5zjv7mCsKFj746HnfBOxsfIyxtK8UoBMu/n17qT+UgXw3MGc11yDoB38sndUcXicEMi2eZESVmGqvt+5w4lIKX3GAmI= Received: from BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) by PH0PR10MB4613.namprd10.prod.outlook.com (2603:10b6:510:33::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.26; Sun, 1 Oct 2023 21:39:56 +0000 Received: from BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::7e3d:f3b3:7964:87c3]) by BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::7e3d:f3b3:7964:87c3%7]) with mapi id 15.20.6838.028; Sun, 1 Oct 2023 21:39:55 +0000 From: Dongli Zhang To: kvm@vger.kernel.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, seanjc@google.com, pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Subject: [PATCH 1/1] KVM: x86: remove always-false condition in kvmclock_sync_fn Date: Sun, 1 Oct 2023 14:36:37 -0700 Message-Id: <20231001213637.76686-1-dongli.zhang@oracle.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BL1P222CA0021.NAMP222.PROD.OUTLOOK.COM (2603:10b6:208:2c7::26) To BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB2663:EE_|PH0PR10MB4613:EE_ X-MS-Office365-Filtering-Correlation-Id: 30c633ce-1145-4d14-66e6-08dbc2c6f3f6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r/ZwTSB7RVVsix8Nvqz3AAcOz8NbO1J+P+OtXOj2/1E2aiWWURzFdioLxFE4+cjnWdQWelP1vNPo1RYD3hWgdMxMSXJR4+sZPydlhuy2qZ+PMjPdxGpVkww/z95EVoJXqvDqBRwUHF4FT6hp/ialDDmjOizDn3CakhP4fm/rRKPsaxV6c7/SWaUQowKJ+vMHCmUZfl0I4wQFiZv0AXUub1hDL40Y3+guPd0NlYZ0FYHdIy8bgpX+YBbv9KBJ3Ub5h522MZfQgfd1QT3j6K8k/THfuSL4kreWKmzNX68Gt3ki3J/kSEFV/BsYOEN/uWdBDZQiAvjcKyLYaJFtL4OlCN7N9rG6O8K2duLvHCLnFzhd1ZhcTsS/dOVXCtxz4LRWDA+N64IO4MQn4lxjaikCdblNvqxZCA0mMPx+6ocOmQhehRqhUW0Clp2sr+h1y6JtBOH8Dto5D3n/mBcFrKYM3r4hF52S7BGGI2D6H0RDBgRj3eSKHxpcqLKBSbtCuEshsot64KtjRmoJvKAIJleLS9Afud/+t/nJpw9cK8eaPMo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB2663.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(136003)(39860400002)(376002)(366004)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(966005)(478600001)(41300700001)(2616005)(1076003)(26005)(2906002)(316002)(5660300002)(6486002)(6506007)(66946007)(66556008)(66476007)(6512007)(8676002)(6666004)(8936002)(4326008)(44832011)(86362001)(36756003)(83380400001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jpBFl8gLSCNo/jH9EWLf7PDyZsbv9cQn6Elp54c/kLyxStgPveiWjPbQq7SDTKUmKOUplLUtht72FSYXQ4b/vH6HMbvN2D6JKGoALAil9xaClGp8Um1Pv7DCKmN8AbxS3ey91I50kYeKWa7XyVAwnRtt4hWKlP6sVtxYsS9n/PU8p11Jy6HaEKOYbRo+NIstjlGYeuCERpIU/cs4qqPhisuP9hP3QKpaRsGCruo3VpbyADCmRDx22WCG5ZNnDwGejid1dLHwRUZm1mDdaBv5iX/JKez8Nr3nZloSvvI5x0/01NafIKETlCRfFkQJsCIHZO6V8E3YRoi14DSdjsx4ZsFszSOHpeYTJO8ZlRBkYhrqlCJH8+itWPIQtPOzQ9X180nU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cq+fJZRmLXrHhDbErZiiuLurXmqh07+19rj6vtbCizDk8EZpMMTa4HPupBL8NA3aqGoG2LU+RHVMIeFVZZ/Lr5sTLHZb6cpu7pS+fTAIKZ479SgeawocQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30c633ce-1145-4d14-66e6-08dbc2c6f3f6 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2663.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2023 21:39:55.7958 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FYOiOTKlcpEIvVzDG+LjuBkSmhtmXGWrkwGGsm1vC72f9csyCByu096W8CZxNqDN+yXaYOjM+BV+6OvPEefcNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4613 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-01_18,2023-09-28_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310010174 X-Proofpoint-GUID: a7yzKAR8WWfZFUx_4J9ZqcsqEUsXzF07 X-Proofpoint-ORIG-GUID: a7yzKAR8WWfZFUx_4J9ZqcsqEUsXzF07 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 01 Oct 2023 14:59:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778599484540481744 X-GMAIL-MSGID: 1778599484540481744 The 'kvmclock_periodic_sync' is a readonly param that cannot change after bootup. The kvm_arch_vcpu_postcreate() is not going to schedule the kvmclock_sync_work if kvmclock_periodic_sync == false. As a result, the "if (!kvmclock_periodic_sync)" can never be true if the kvmclock_sync_work = kvmclock_sync_fn() is scheduled. Inspired by: https://lore.kernel.org/kvm/a461bf3f-c17e-9c3f-56aa-726225e8391d@oracle.com/ Signed-off-by: Dongli Zhang --- arch/x86/kvm/x86.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9f18b06bbda6..38fd04a286c7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3290,9 +3290,6 @@ static void kvmclock_sync_fn(struct work_struct *work) kvmclock_sync_work); struct kvm *kvm = container_of(ka, struct kvm, arch); - if (!kvmclock_periodic_sync) - return; - schedule_delayed_work(&kvm->arch.kvmclock_update_work, 0); schedule_delayed_work(&kvm->arch.kvmclock_sync_work, KVMCLOCK_SYNC_PERIOD);