[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <B2D15215269B544CADD246097EACE7474BB4E091@DGGEMM528-MBX.china.huawei.com>
Date: Tue, 3 Mar 2020 10:00:05 +0000
From: "Zhoujian (jay)" <jianjay.zhou@...wei.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
CC: "peterx@...hat.com" <peterx@...hat.com>,
"shuah@...nel.org" <shuah@...nel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"wangxin (U)" <wangxinxin.wang@...wei.com>,
"Huangweidong (C)" <weidong.huang@...wei.com>,
"Liujinsong (Paul)" <liu.jinsong@...wei.com>
Subject: RE: [PATCH] kvm: selftests: Support dirty log initial-all-set test
> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@...hat.com]
> Sent: Tuesday, March 3, 2020 4:54 PM
> To: Zhoujian (jay) <jianjay.zhou@...wei.com>; kvm@...r.kernel.org
> Cc: peterx@...hat.com; shuah@...nel.org; linux-kselftest@...r.kernel.org;
> linux-kernel@...r.kernel.org; wangxin (U) <wangxinxin.wang@...wei.com>;
> Huangweidong (C) <weidong.huang@...wei.com>; Liujinsong (Paul)
> <liu.jinsong@...wei.com>
> 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
Powered by blists - more mailing lists