[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 11/15] qtest: add a QOM object for qtest
From: |
Igor Mammedov |
Subject: |
Re: [PATCH 11/15] qtest: add a QOM object for qtest |
Date: |
Tue, 8 Dec 2020 12:11:02 +0100 |
On Mon, 7 Dec 2020 18:22:55 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il lun 7 dic 2020, 17:57 Igor Mammedov <imammedo@redhat.com> ha scritto:
>
> > On Mon, 7 Dec 2020 17:43:16 +0100
> > Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > > On 07/12/20 17:24, Igor Mammedov wrote:
> > > >> +void qtest_server_init(const char *qtest_chrdev, const char
> > *qtest_log, Error **errp)
> > > >> +{
> > > >> + Chardev *chr;
> > > >> +
> > > >> + chr = qemu_chr_new("qtest", qtest_chrdev, NULL);
> > > >> +
> > > >> + if (chr == NULL) {
> > > >> + error_setg(errp, "Failed to initialize device for qtest:
> > \"%s\"",
> > > >> + qtest_chrdev);
> > > >> + return;
> > > >> + }
> > > >> +
> > > >> + qtest_server_start(chr, qtest_log, errp);
> > > > why not create qtest object here instead of trying to preserve old way,
> > > > or create it directly at the place that calls qtest_server_init()?
> > >
> > > Because I wasn't sure of where to put it in the QOM object tree. So I
> > > punted and left it for later.
> >
> > but you implicitly decided where it should be (with -object qtest),
> > it goes to /objects.
> > So I'd wouldn't put anywhere else to be consistent.
> >
>
> No, /objects is for stuff created with -object exclusively. I suppose I
> could have the "well-known path" be /machine/qtest, and it would be either
> a child (for -qtest) or a link to /objects/some-id (for -object qtest).
> Should I implement that (as a separate patch on top of this one)?
yes
>
> Paolo
>
>
>
> > >
> > > Paolo
> > >
> >
> >
- Re: [PATCH 07/15] chardev: do not use machine_init_done, (continued)
[PATCH 06/15] vl: move all generic initialization out of vl.c, Paolo Bonzini, 2020/12/02
[PATCH 10/15] vl: make qemu_get_machine_opts static, Paolo Bonzini, 2020/12/02
- Re: [PATCH 10/15] vl: make qemu_get_machine_opts static, Igor Mammedov, 2020/12/07
- Re: [PATCH 10/15] vl: make qemu_get_machine_opts static, Paolo Bonzini, 2020/12/07
- Re: [PATCH 10/15] vl: make qemu_get_machine_opts static, Daniel Henrique Barboza, 2020/12/07
- Re: [PATCH 10/15] vl: make qemu_get_machine_opts static, Igor Mammedov, 2020/12/08
- [PATCH] ppc/spapr: cleanup -machine pseries,nvdimm=X handling, Igor Mammedov, 2020/12/08
- [PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling, Igor Mammedov, 2020/12/08
- Re: [PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling, Daniel Henrique Barboza, 2020/12/08