From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92BDDC3F2CD for ; Tue, 3 Mar 2020 10:00:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71828214D8 for ; Tue, 3 Mar 2020 10:00:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727587AbgCCKAR convert rfc822-to-8bit (ORCPT ); Tue, 3 Mar 2020 05:00:17 -0500 Received: from szxga08-in.huawei.com ([45.249.212.255]:40674 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726694AbgCCKAR (ORCPT ); Tue, 3 Mar 2020 05:00:17 -0500 Received: from DGGEMM401-HUB.china.huawei.com (unknown [172.30.72.53]) by Forcepoint Email with ESMTP id 25233E88490DF10B5032; Tue, 3 Mar 2020 18:00:13 +0800 (CST) Received: from DGGEMM421-HUB.china.huawei.com (10.1.198.38) by DGGEMM401-HUB.china.huawei.com (10.3.20.209) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Mar 2020 18:00:12 +0800 Received: from DGGEMM528-MBX.china.huawei.com ([169.254.8.90]) by dggemm421-hub.china.huawei.com ([10.1.198.38]) with mapi id 14.03.0439.000; Tue, 3 Mar 2020 18:00:06 +0800 From: "Zhoujian (jay)" To: Paolo Bonzini , "kvm@vger.kernel.org" CC: "peterx@redhat.com" , "shuah@kernel.org" , "linux-kselftest@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "wangxin (U)" , "Huangweidong (C)" , "Liujinsong (Paul)" Subject: RE: [PATCH] kvm: selftests: Support dirty log initial-all-set test Thread-Topic: [PATCH] kvm: selftests: Support dirty log initial-all-set test Thread-Index: AQHV8TLCY4Xj3pfMjkOXUb/5I4t9Iqg2Ch2AgACW2iA= Date: Tue, 3 Mar 2020 10:00:05 +0000 Message-ID: References: <20200303080710.1672-1-jianjay.zhou@huawei.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.173.228.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org > -----Original Message----- > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > Sent: Tuesday, March 3, 2020 4:54 PM > To: Zhoujian (jay) ; kvm@vger.kernel.org > Cc: peterx@redhat.com; shuah@kernel.org; linux-kselftest@vger.kernel.org; > linux-kernel@vger.kernel.org; wangxin (U) ; > Huangweidong (C) ; Liujinsong (Paul) > > Subject: Re: [PATCH] kvm: selftests: Support dirty log initial-all-set test > > On 03/03/20 09:07, Jay Zhou wrote: > > #ifdef USE_CLEAR_DIRTY_LOG > > - if (!kvm_check_cap(KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2)) { > > - fprintf(stderr, "KVM_CLEAR_DIRTY_LOG not available, skipping > tests\n"); > > + dirty_log_manual_caps = > > + kvm_check_cap(KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2); > > + if (!dirty_log_manual_caps) { > > + fprintf(stderr, "KVM_CLEAR_DIRTY_LOG not available, " > > + "skipping tests\n"); > > + exit(KSFT_SKIP); > > + } > > + if (dirty_log_manual_caps != KVM_DIRTY_LOG_MANUAL_CAPS && > > + dirty_log_manual_caps != > KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE) { > > + fprintf(stderr, "KVM_CLEAR_DIRTY_LOG not valid caps " > > + "%"PRIu64", skipping tests\n", > > + dirty_log_manual_caps); > > exit(KSFT_SKIP); > > } > > #endif > > > > Thanks, instead of this final "if" it should be enough to do > > dirty_log_manual_caps &= (KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE > | > KVM_DIRTY_LOG_INITIALLY_SET); > > > Otherwise looks good, I'll test it and eventually apply both patches. Do I need to resubmit this patch with this modification? Regards, Jay Zhou > > Paolo