Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp709885ybz; Wed, 15 Apr 2020 17:13:57 -0700 (PDT) X-Google-Smtp-Source: APiQypLsMO6kNC0DwaPZlSE1BswTCDB6VbEqP8RM1+yfqCUK7BQ4nrTP53CqHa+QWOQJOlgEXhrL X-Received: by 2002:aa7:cac6:: with SMTP id l6mr27705010edt.265.1586996037077; Wed, 15 Apr 2020 17:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586996037; cv=none; d=google.com; s=arc-20160816; b=L6anzTeYilDN8q8QlB+ZyOUk4HqP0mBFUOsQ0sOzhEm1R9sU6k0H4WadNPGBJILZkG EgBCyxH0e1cJKiJo3ZtPer+SLF9uVYIIWWmPyO4g7ECLfaL04hydk8iK3Sc97qaUj2bW Dyp9AgtYfG2aBz9CQENqT9q4PAtsUcK48O3qWSmZFnu9NYl5xcDmBLvYc/O+5g6bet0h Yv4aR8r8HXJnVOl3gEj0E3ICndVu/O8ZWAerbeudfIgmBzx61RHfm7CEZIekkyK2Rks2 yyF4XLoYdqVdBuvprXZL2PPFL6iLaK13pjSpPnHuRI2NU8vW7C26fFqcbVWzp7+eQDGo x5Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=C0vYOJO4v4REcjYahYU+BEluO/YhMr3LnC3HEtpWFrM=; b=TeU3ZGcOFUNmOoKF9WvSNoo31kXwLIViJh6jJ5lXN+Umo8DFgfiHlbPUfBWWqM95W8 XrPA2mVJjprAhrDlxgNZcs4m/2RCbU/K5Kcyfbmx8SjtxDCcLHbJq1vvdNQWEVMakaZi va5eSwAmdrFJvoa/vol1AAw7FPUje5BmGxXG5uZ+uFJYjMhXvdjemqs+5Bemj1dBx5ia 1pio1eMBRRqK03S6GKjlrCF89+KI3mTNgm5vdWquRXO+nHqqpMg20IDCo2HaRi/Aq5/h CDXoIiyJJHR0Q2zLZDLsR6RsJU6WGHWDoFAgMpPhzFZj9GL4n97R+kpBRngoMxrhE36X V2+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bLXAHyto; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si1925819edq.225.2020.04.15.17.13.34; Wed, 15 Apr 2020 17:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bLXAHyto; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1414570AbgDOPLf (ORCPT + 99 others); Wed, 15 Apr 2020 11:11:35 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:58289 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2393131AbgDOPL3 (ORCPT ); Wed, 15 Apr 2020 11:11:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586963488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C0vYOJO4v4REcjYahYU+BEluO/YhMr3LnC3HEtpWFrM=; b=bLXAHytosK8av7sofohPvmQMYcFny/v1XNc+m7Sql2y76wVO9OwPP6SgmX7uGD/rcFwh+y w4uUKQjOi2BRTJ+Tcr6cF0LERHszx3aeYnahPbwzAnoK7JH/FgOFUfkIh9/kILjJystrZ9 39Tm5tASOsEX+RLf4tcvlCZlpame7+g= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-162-BEMnQwfqOpKJ2JOPmfkwIw-1; Wed, 15 Apr 2020 11:11:24 -0400 X-MC-Unique: BEMnQwfqOpKJ2JOPmfkwIw-1 Received: by mail-wm1-f69.google.com with SMTP id q5so4043845wmc.9 for ; Wed, 15 Apr 2020 08:11:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C0vYOJO4v4REcjYahYU+BEluO/YhMr3LnC3HEtpWFrM=; b=ZKCNJ2h9Z+VMv+nk17d7XteLlcd1Or4BjCK+LUA5z2vQdNXy4YWB9qGHzH5Mca+RJ8 tPi4S/UYYmipjLrjM1USo+ND4Nh14Zris8oKI6p+u7pZkdFAY3DgfJyA8V6FMBCLUQZJ OtzId6AT8Zj9cZ8LocWzB3D037pS4FM7dww0RQKHOQDhiwym/dup1qKuM0jt4nqqa1xk g9GSdKcSETeqwjaYlnW2NuwOLburrnIxS6d76MwTV01twxynRQ/jZ90+FQEC1fN2vOiY de7Cbg6nhTNLdcWjXSPtFTkuqvjru+1za+NRWS7W2WQSHiE8cOYvZPlVmXzlzEFDRmp+ 704w== X-Gm-Message-State: AGi0PuZTySMr49r6BLsR6CuG5T8Vchcl9k9xnbZyYTq0CO/9oD9UMqkW 69TZbHgkRVnD4fx6rX0OsNzyAnprSobj2rWonh85v8mveDdYNuj1qRA6XLaKNAi3uJt+/U4HwLa 3cNrZpVI2BBVfdbWHs+Ht1Fl/ X-Received: by 2002:a1c:7301:: with SMTP id d1mr6033192wmb.26.1586963483567; Wed, 15 Apr 2020 08:11:23 -0700 (PDT) X-Received: by 2002:a1c:7301:: with SMTP id d1mr6033166wmb.26.1586963483345; Wed, 15 Apr 2020 08:11:23 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:9066:4f2:9fbd:f90e? ([2001:b07:6468:f312:9066:4f2:9fbd:f90e]) by smtp.gmail.com with ESMTPSA id h2sm23766953wmf.34.2020.04.15.08.11.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Apr 2020 08:11:22 -0700 (PDT) Subject: Re: [PATCH 01/10] KVM: selftests: Take vcpu pointer instead of id in vm_vcpu_rm() To: Sean Christopherson , Wainer dos Santos Moschetta Cc: Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Xu , Andrew Jones References: <20200410231707.7128-1-sean.j.christopherson@intel.com> <20200410231707.7128-2-sean.j.christopherson@intel.com> <20200413212659.GB21204@linux.intel.com> From: Paolo Bonzini Message-ID: Date: Wed, 15 Apr 2020 17:11:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200413212659.GB21204@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/04/20 23:26, Sean Christopherson wrote: > FWIW, I think the whole vcpuid thing is a bad interface, almost all the > tests end up defining an arbitrary number for the sole VCPU_ID, i.e. the > vcpuid interface just adds a pointless layer of obfuscation. I haven't > looked through all the tests, but returning the vcpu and making the struct > opaque, same as kvm_vm, seems like it would yield more readable code with > less overhead. Yes, I agree. This was in the original Google submission, I didn't like it either but I didn't feel like changing it and I wouldn't mind if someone does the work... Paolo