KVM Archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	Shaoqin Huang <shahuang@redhat.com>,
	qemu-arm@nongnu.org
Cc: "Eric Auger" <eauger@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [PATCH v9] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER
Date: Tue, 16 Apr 2024 17:17:54 +0200	[thread overview]
Message-ID: <875xwhjpzx.fsf@redhat.com> (raw)
In-Reply-To: <227c96c8-4f17-4f79-9378-a15c9dce8d46@redhat.com>

On Wed, Apr 10 2024, Thomas Huth <thuth@redhat.com> wrote:

> On 09/04/2024 09.47, Shaoqin Huang wrote:
>> Hi Thmoas,
>> 
>> On 4/9/24 13:33, Thomas Huth wrote:
>>>> +        assert_has_feature(qts, "host", "kvm-pmu-filter");
>>>
>>> So you assert here that the feature is available ...
>>>
>>>>           assert_has_feature(qts, "host", "kvm-steal-time");
>>>>           assert_has_feature(qts, "host", "sve");
>>>>           resp = do_query_no_props(qts, "host");
>>>> +        kvm_supports_pmu_filter = resp_get_feature_str(resp, 
>>>> "kvm-pmu-filter");
>>>>           kvm_supports_steal_time = resp_get_feature(resp, 
>>>> "kvm-steal-time");
>>>>           kvm_supports_sve = resp_get_feature(resp, "sve");
>>>>           vls = resp_get_sve_vls(resp);
>>>>           qobject_unref(resp);
>>>> +        if (kvm_supports_pmu_filter) { >
>>> ... why do you then need to check for its availability here again?
>>> I either don't understand this part of the code, or you could drop the 
>>> kvm_supports_pmu_filter variable and simply always execute the code below.
>> 
>> Thanks for your reviewing. I did so because all other feature like 
>> "kvm-steal-time" check its availability again. I don't know the original 
>> reason why they did that. I just followed it.
>> 
>> Do you think we should delete all the checking?
>
> resp_get_feature() seems to return a boolean value, so though these feature 
> could be there, they still could be disabled, I assume? Thus we likely need 
> to keep the check for those.

This had confused me as well when I looked at it the last time -- one
thing is to check whether we have a certain prop in the cpu model, the
other one whether we actually support it. Maybe this needs some
comments?


  reply	other threads:[~2024-04-16 15:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  2:49 [PATCH v9] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER Shaoqin Huang
2024-04-09  5:33 ` Thomas Huth
2024-04-09  7:47   ` Shaoqin Huang
2024-04-10  6:07     ` Thomas Huth
2024-04-16 15:17       ` Cornelia Huck [this message]
2024-04-15 17:29 ` Daniel P. Berrangé
2024-05-07  9:33   ` Shaoqin Huang
2024-05-09  9:48   ` Zhao Liu
2024-05-09  9:39     ` Daniel P. Berrangé
2024-05-13  6:52       ` Zhao Liu
2024-05-15 16:47         ` Daniel P. Berrangé
2024-05-27  6:41         ` Shaoqin Huang
2024-05-27 10:24           ` Zhao Liu

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=875xwhjpzx.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eauger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shahuang@redhat.com \
    --cc=thuth@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).