Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CDAEC433FE for ; Tue, 23 Nov 2021 04:28:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233125AbhKWE3k (ORCPT ); Mon, 22 Nov 2021 23:29:40 -0500 Received: from mail.kingsoft.com ([114.255.44.145]:16254 "EHLO mail.kingsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbhKWE3i (ORCPT ); Mon, 22 Nov 2021 23:29:38 -0500 X-Greylist: delayed 903 seconds by postgrey-1.27 at vger.kernel.org; Mon, 22 Nov 2021 23:29:37 EST X-AuditID: 0a580155-fe9e070000024f67-1b-619c69e9146d Received: from mail.kingsoft.com (bogon [10.88.1.78]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.kingsoft.com (SMG-2-NODE-85) with SMTP id 56.23.20327.9E96C916; Tue, 23 Nov 2021 12:11:21 +0800 (HKT) Received: from KSbjmail4.kingsoft.cn (10.88.1.79) by KSBJMAIL3.kingsoft.cn (10.88.1.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 23 Nov 2021 12:11:21 +0800 Received: from KSbjmail4.kingsoft.cn ([fe80::8036:b70b:7d3c:4ee2]) by KSBJMAIL4.kingsoft.cn ([fe80::8036:b70b:7d3c:4ee2%11]) with mapi id 15.01.2375.017; Tue, 23 Nov 2021 12:11:21 +0800 From: =?utf-8?B?eWFvYWlsaSBb5LmI54ix5YipXQ==?= To: Wanpeng Li , Sean Christopherson CC: Aili Yao , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , "Thomas Gleixner" , Ingo Molnar , "Borislav Petkov" , Dave Hansen , "the arch/x86 maintainers" , "H. Peter Anvin" , kvm , LKML Subject: RE: [PATCH] KVM: LAPIC: Per vCPU control over kvm_can_post_timer_interrupt Thread-Topic: [PATCH] KVM: LAPIC: Per vCPU control over kvm_can_post_timer_interrupt Thread-Index: AQHX31HuUhGu3lfAGEub9LSWCeOdcqwPZTAAgACBzgCAAI8NcA== Date: Tue, 23 Nov 2021 04:11:21 +0000 Message-ID: <3204a646aa9d43d0b9af8da1c5ddf79f@kingsoft.com> References: <20211122095619.000060d2@gmail.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.88.2.22] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGIsWRmVeSWpSXmKPExsXCFcHop/syc06iQfNCfYvPG/6xWbzY0M5o MW2juMXW6VfYLDpnb2C3eL1+HavFnKmFFpd3zWGzuHRgAZPF/m3/WC2Onr/FZLF501Rmi0mt l5ktdt15wmLxY8NjVotnrVdZHAQ8nhycx+TxvbWPxWPnrLvsHgs2lXpsWtXJ5vHu3Dl2j3kn Az3e77vK5tE49Rqbx+dNch4nWr6wBnBHcdmkpOZklqUW6dslcGX0nm9gKfhjV/F1Ik8D4xrb LkYODgkBE4nN/yy7GLk4hAQmM0k8a5rKDOG8YJRYcO4DG4Szl1Fi6YtFTF2MnBxsAq4Sf7d+ YATpFhHwlbj2OAOkhlmgnUVi7Y7FrCA1wgKhEjOXfQWrFxEIk1i4uBPKdpJ4/uAoG4jNIqAq 8f1nKzPIHF4Ba4m7T6CumMIoce7HJxaQGk6BQImjTevBZjIKyEpMe3QfbA6zgLjE3GmzwOIS AgISS/acZ4awRSVePv4HFZeT2HCikx1kPrOApsT6XfoQrYoSU7ofsoPYvAKCEidnPmGZwCg2 C8nUWQgds5B0zELSsYCRZRUjS3FuutEmRkjUh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