qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Salil Mehta <salil.mehta@huawei.com>
To: Andrew Jones <drjones@redhat.com>, fangying <fangying1@huawei.com>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	Zhanghailiang <zhang.zhanghailiang@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	"Chenzhendong \(alex\)" <alex.chen@huawei.com>,
	"shannon.zhaosl@gmail.com" <shannon.zhaosl@gmail.com>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
	"alistair.francis@wdc.com" <alistair.francis@wdc.com>,
	"imammedo@redhat.com" <imammedo@redhat.com>
Subject: RE: [RFC PATCH 04/12] device_tree: add qemu_fdt_add_path
Date: Fri, 18 Sep 2020 00:25:19 +0000	[thread overview]
Message-ID: <a0ef33da132a411a8da14a8b05f78c1d@huawei.com> (raw)
In-Reply-To: <20200917081239.bdfhkofodqvhg3i6@kamzik.brq.redhat.com>


> From: Qemu-arm [mailto:qemu-arm-bounces+salil.mehta=huawei.com@nongnu.org]
> On Behalf Of Andrew Jones
> Sent: Thursday, September 17, 2020 9:13 AM
> To: fangying <fangying1@huawei.com>
> Cc: peter.maydell@linaro.org; Zhanghailiang <zhang.zhanghailiang@huawei.com>;
> Alexander Graf <agraf@suse.de>; qemu-devel@nongnu.org; Chenzhendong (alex)
> <alex.chen@huawei.com>; shannon.zhaosl@gmail.com; qemu-arm@nongnu.org;
> alistair.francis@wdc.com; imammedo@redhat.com
> Subject: Re: [RFC PATCH 04/12] device_tree: add qemu_fdt_add_path
> 
> On Thu, Sep 17, 2020 at 11:20:25AM +0800, Ying Fang wrote:
> > From: Andrew Jones <drjones@redhat.com>
> >
> > qemu_fdt_add_path works like qemu_fdt_add_subnode, except it
> > also recursively adds any missing parent nodes.
> >
> > Cc: Peter Crosthwaite <crosthwaite.peter@gmail.com>
> > Cc: Alexander Graf <agraf@suse.de>
> > Signed-off-by: Andrew Jones <drjones@redhat.com>
> > ---
> >  device_tree.c                | 24 ++++++++++++++++++++++++
> >  include/sysemu/device_tree.h |  1 +
> >  2 files changed, 25 insertions(+)
> >
> > diff --git a/device_tree.c b/device_tree.c
> > index b335dae707..1854be3a02 100644
> > --- a/device_tree.c
> > +++ b/device_tree.c
> > @@ -524,6 +524,30 @@ int qemu_fdt_add_subnode(void *fdt, const char *name)
> >      return retval;
> >  }
> >
> > +int qemu_fdt_add_path(void *fdt, const char *path)
> > +{
> > +    char *parent;
> > +    int offset;
> > +
> > +    offset = fdt_path_offset(fdt, path);
> > +    if (offset < 0 && offset != -FDT_ERR_NOTFOUND) {
> > +        error_report("%s Couldn't find node %s: %s", __func__, path,
> > +                     fdt_strerror(offset));
> > +        exit(1);
> > +    }
> > +
> > +    if (offset != -FDT_ERR_NOTFOUND) {
> > +        return offset;
> > +    }
> > +
> > +    parent = g_strdup(path);
> > +    strrchr(parent, '/')[0] = '\0';
> > +    qemu_fdt_add_path(fdt, parent);
> > +    g_free(parent);
> > +
> > +    return qemu_fdt_add_subnode(fdt, path);
> > +}
> 
> Igor didn't like the recursion when I posted this before so I changed
> it when doing the refresh[*] that I gave to Salil Mehta. Salil also
> works for Huawei, are you guys not working together?
> 
> [*] https://github.com/rhdrjones/qemu/commits/virt-cpu-topology-refresh
> 


I was not aware of this work going on. I am based at Cambridge and Fangying
in Hangzhou and work for different teams.

Yes, I have it and have integrated it with the Virtual CPU hotplug branch
and I am testing them.

I have also rebased virtual cpu hotplug patches and integrated the PMU
related changes recently been discussed in other mail-chain. Plus, I am
also dealing with the MPIDR/affinity part from the Kernel which has been
discussed earlier with the Marc Zyngier. 

It looks some of the changes are common here like ability to set MPIDR
of the vcpus at the time of their creation inside KVM. And the PPTT
table changes which were present in your refresh branch as well. Changes
related to the possible and present vcpus might need a sync as well.

@Andrew, should I take out the part which is common and affects the
virtual cpu hotplug and push them separately. This way I can have part
of the changes related to the vcpu hotplug done which will also cover
this patch-set requirements as well? 

@Fangying, will this work for you?


Salil. 



  parent reply	other threads:[~2020-09-18  0:27 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  3:20 [RFC PATCH 00/12] hw/arm/virt: Introduce cpu and cache topology support Ying Fang
2020-09-17  3:20 ` [RFC PATCH 01/12] linux headers: Update linux header with KVM_ARM_SET_MP_AFFINITY Ying Fang
2020-09-17  3:20 ` [RFC PATCH 02/12] target/arm/kvm64: make MPIDR consistent with CPU Topology Ying Fang
2020-09-17  7:53   ` Andrew Jones
2020-09-17 10:59     ` Andrew Jones
2020-09-17 13:19       ` Ying Fang
2020-09-17 14:05         ` Andrew Jones
2020-09-17 12:17     ` Ying Fang
2020-09-17  3:20 ` [RFC PATCH 03/12] target/arm/kvm32: " Ying Fang
2020-09-17  8:07   ` Andrew Jones
2020-09-17 13:26     ` Ying Fang
2020-09-17  3:20 ` [RFC PATCH 04/12] device_tree: add qemu_fdt_add_path Ying Fang
2020-09-17  8:12   ` Andrew Jones
2020-09-17 13:55     ` Ying Fang
2020-09-18  0:25     ` Salil Mehta [this message]
2020-09-18  6:06       ` Andrew Jones
2020-09-18 16:58         ` Salil Mehta
2020-09-17  3:20 ` [RFC PATCH 05/12] hw/arm/virt: DT: add cpu-map Ying Fang
2020-09-17  8:14   ` Andrew Jones
2020-09-17  3:20 ` [RFC PATCH 06/12] hw/arm/virt-acpi-build: distinguish possible and present cpus Ying Fang
2020-09-17  8:20   ` Andrew Jones
2020-09-17 13:58     ` Ying Fang
2020-09-17  3:20 ` [RFC PATCH 07/12] hw/acpi/aml-build: add processor hierarchy node structure Ying Fang
2020-09-17  8:27   ` Andrew Jones
2020-09-17 14:03     ` Ying Fang
2020-09-17  3:20 ` [RFC PATCH 08/12] hw/arm/virt-acpi-build: add PPTT table Ying Fang
2020-09-17  8:28   ` Andrew Jones
2020-09-17  3:20 ` [RFC PATCH 09/12] target/arm/cpu: Add CPU cache description for arm Ying Fang
2020-09-17  8:39   ` Andrew Jones
2020-09-17 14:11     ` Ying Fang
2020-09-17  3:20 ` [RFC PATCH 10/12] hw/arm/virt: add fdt cache information Ying Fang
2020-09-17  3:20 ` [RFC PATCH 11/12] hw/acpi/aml-build: build ACPI CPU cache topology information Ying Fang
2020-09-17  3:20 ` [RFC PATCH 12/12] hw/arm/virt-acpi-build: Enable CPU cache topology Ying Fang
2020-10-13 12:11 ` [RFC PATCH 00/12] hw/arm/virt: Introduce cpu and cache topology support Zengtao (B)
2020-10-13 18:08   ` Andrew Jones
2020-10-15  2:07     ` Ying Fang
2020-10-15  7:59       ` Andrew Jones
2020-10-16  9:40         ` Ying Fang
2020-10-16 10:07           ` Andrew Jones
2020-10-20  2:52             ` Ying Fang
2020-10-20  8:20               ` Andrew Jones

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=a0ef33da132a411a8da14a8b05f78c1d@huawei.com \
    --to=salil.mehta@huawei.com \
    --cc=agraf@suse.de \
    --cc=alex.chen@huawei.com \
    --cc=alistair.francis@wdc.com \
    --cc=drjones@redhat.com \
    --cc=fangying1@huawei.com \
    --cc=imammedo@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=zhang.zhanghailiang@huawei.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).