From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Shaoqin Huang <shahuang@redhat.com>,
qemu-arm@nongnu.org, Eric Auger <eauger@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org, armbru@redhat.com
Subject: Re: [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER
Date: Mon, 15 Apr 2024 18:31:38 +0100 [thread overview]
Message-ID: <Zh1ketp8cvLoYjok@redhat.com> (raw)
In-Reply-To: <ZgwBvuCrTwKmA0IK@redhat.com>
On Tue, Apr 02, 2024 at 03:01:50PM +0200, Kevin Wolf wrote:
> Am 29.03.2024 um 04:45 hat Shaoqin Huang geschrieben:
> > Hi Daniel,
> >
> > On 3/25/24 16:55, Daniel P. Berrangé wrote:
> > > On Mon, Mar 25, 2024 at 01:35:58PM +0800, Shaoqin Huang wrote:
> > > > Hi Daniel,
> > > >
> > > > Thanks for your reviewing. I see your comments in the v7.
> > > >
> > > > I have some doubts about what you said about the QAPI. Do you want me to
> > > > convert the current design into the QAPI parsing like the
> > > > IOThreadVirtQueueMapping? And we need to add new json definition in the
> > > > qapi/ directory?
> >
> > I have defined the QAPI for kvm-pmu-filter like below:
> > @@ -2439,6 +2441,7 @@ static Property arm_cpu_properties[] = {
> > mp_affinity, ARM64_AFFINITY_INVALID),
> > DEFINE_PROP_INT32("node-id", ARMCPU, node_id, CPU_UNSET_NUMA_NODE_ID),
> > DEFINE_PROP_INT32("core-count", ARMCPU, core_count, -1),
> > + DEFINE_PROP_KVM_PMU_FILTER("kvm-pmu-filter", ARMCPU, kvm_pmu_filter),
> > DEFINE_PROP_END_OF_LIST()
> > };
> >
> > And I guess I can use the new json format input like below:
> >
> > qemu-system-aarch64 \
> > -cpu host, '{"filter": [{"action": "a", "start": 0x10, "end": "0x11"}]}'
> >
> > But it doesn't work. It seems like because the -cpu option doesn't
> > support json format parameter.
> >
> > Maybe I'm wrong. So I want to double check with if the -cpu option
> > support json format nowadays?
>
> As far as I can see, -cpu doesn't support JSON yet. But even if it did,
> your command line would be invalid because the 'host,' part isn't JSON.
>
> > If the -cpu option doesn't support json format, how I can use the QAPI
> > for kvm-pmu-filter property?
>
> This would probably mean QAPIfying all CPUs first, which sounds like a
> major effort.
I wonder if we can do a half-way house where we parse the JSON and
turn it into regular QemuOpts internally, and then just use QAPI
parsing for the filter property. IOW, publically give the illusion
that -cpu has been QAPI-ified, but without actually doing the hard
part yet. The idea being to avoid inventing a new cli syntax that
has no analogue to QAPI.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2024-04-15 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 7:48 [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER Shaoqin Huang
2024-03-19 15:23 ` Eric Auger
2024-04-09 2:43 ` Shaoqin Huang
2024-03-22 14:53 ` Daniel P. Berrangé
2024-03-25 5:35 ` Shaoqin Huang
2024-03-25 8:55 ` Daniel P. Berrangé
2024-03-29 3:45 ` Shaoqin Huang
2024-04-02 13:01 ` Kevin Wolf
2024-04-09 1:57 ` Shaoqin Huang
2024-04-15 17:31 ` Daniel P. Berrangé [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=Zh1ketp8cvLoYjok@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=eauger@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--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 NNTP newsgroup(s).