linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Zhoujian (jay)" <jianjay.zhou@huawei.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Cc: "peterx@redhat.com" <peterx@redhat.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"wangxin (U)" <wangxinxin.wang@huawei.com>,
	"Huangweidong (C)" <weidong.huang@huawei.com>,
	"Liujinsong (Paul)" <liu.jinsong@huawei.com>
Subject: Re: [PATCH] kvm: selftests: Support dirty log initial-all-set test
Date: Tue, 3 Mar 2020 11:14:34 +0100	[thread overview]
Message-ID: <d8c4cc9f-6c9e-6d02-9eb3-32824dcc0c4c@redhat.com> (raw)
In-Reply-To: <B2D15215269B544CADD246097EACE7474BB4E091@DGGEMM528-MBX.china.huawei.com>

On 03/03/20 11:00, Zhoujian (jay) wrote:
> 
> 
>> -----Original Message-----
>> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
>> Sent: Tuesday, March 3, 2020 4:54 PM
>> To: Zhoujian (jay) <jianjay.zhou@huawei.com>; kvm@vger.kernel.org
>> Cc: peterx@redhat.com; shuah@kernel.org; linux-kselftest@vger.kernel.org;
>> linux-kernel@vger.kernel.org; wangxin (U) <wangxinxin.wang@huawei.com>;
>> Huangweidong (C) <weidong.huang@huawei.com>; Liujinsong (Paul)
>> <liu.jinsong@huawei.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?

No, thanks.

Paolo


      reply	other threads:[~2020-03-03 10:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  8:07 [PATCH] kvm: selftests: Support dirty log initial-all-set test Jay Zhou
2020-03-03  8:53 ` Paolo Bonzini
2020-03-03  8:54 ` Paolo Bonzini
2020-03-03 10:00   ` Zhoujian (jay)
2020-03-03 10:14     ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d8c4cc9f-6c9e-6d02-9eb3-32824dcc0c4c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liu.jinsong@huawei.com \
    --cc=peterx@redhat.com \
    --cc=shuah@kernel.org \
    --cc=wangxinxin.wang@huawei.com \
    --cc=weidong.huang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).