lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 3 Feb 2021 11:07:16 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Ben Gardon <bgardon@...gle.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Cc:     Peter Xu <peterx@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Peter Shier <pshier@...gle.com>,
        Peter Feiner <pfeiner@...gle.com>,
        Junaid Shahid <junaids@...gle.com>,
        Jim Mattson <jmattson@...gle.com>,
        Yulei Zhang <yulei.kernel@...il.com>,
        Wanpeng Li <kernellwp@...il.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Xiao Guangrong <xiaoguangrong.eric@...il.com>,
        Andrew Jones <drjones@...hat.com>,
        Thomas Huth <thuth@...hat.com>
Subject: Re: [PATCH v2 28/28] KVM: selftests: Disable dirty logging with vCPUs
 running

On 02/02/21 19:57, Ben Gardon wrote:
> Disabling dirty logging is much more intestesting from a testing
> perspective if the vCPUs are still running. This also excercises the
> code-path in which collapsible SPTEs must be faulted back in at a higher
> level after disabling dirty logging.
> 
> To: linux-kselftest@...r.kernel.org
> CC: Peter Xu <peterx@...hat.com>
> CC: Andrew Jones <drjones@...hat.com>
> CC: Thomas Huth <thuth@...hat.com>
> Signed-off-by: Ben Gardon <bgardon@...gle.com>
> ---
>   tools/testing/selftests/kvm/dirty_log_perf_test.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/testing/selftests/kvm/dirty_log_perf_test.c b/tools/testing/selftests/kvm/dirty_log_perf_test.c
> index 604ccefd6e76..d44a5b8ef232 100644
> --- a/tools/testing/selftests/kvm/dirty_log_perf_test.c
> +++ b/tools/testing/selftests/kvm/dirty_log_perf_test.c
> @@ -205,11 +205,6 @@ static void run_test(enum vm_guest_mode mode, void *arg)
>   		}
>   	}
>   
> -	/* Tell the vcpu thread to quit */
> -	host_quit = true;
> -	for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
> -		pthread_join(vcpu_threads[vcpu_id], NULL);
> -
>   	/* Disable dirty logging */
>   	clock_gettime(CLOCK_MONOTONIC, &start);
>   	vm_mem_region_set_flags(vm, PERF_TEST_MEM_SLOT_INDEX, 0);
> @@ -217,6 +212,11 @@ static void run_test(enum vm_guest_mode mode, void *arg)
>   	pr_info("Disabling dirty logging time: %ld.%.9lds\n",
>   		ts_diff.tv_sec, ts_diff.tv_nsec);
>   
> +	/* Tell the vcpu thread to quit */
> +	host_quit = true;
> +	for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
> +		pthread_join(vcpu_threads[vcpu_id], NULL);
> +
>   	avg = timespec_div(get_dirty_log_total, p->iterations);
>   	pr_info("Get dirty log over %lu iterations took %ld.%.9lds. (Avg %ld.%.9lds/iteration)\n",
>   		p->iterations, get_dirty_log_total.tv_sec,
> 

Queued the two selftests patches, because why not.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ