qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Artyom Tarasenko <atar4qemu@gmail.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Blue Swirl" <blauwirbel@gmail.com>,
	aliguori@amazon.com, pcrost@xilinx.com,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v3 00/22] Steps towards per CPU address-spaces
Date: Mon, 13 Jan 2014 23:34:21 +0000	[thread overview]
Message-ID: <20140113233421.GA20473@amz.ap-southeast-2.compute.internal> (raw)
In-Reply-To: <CACXAS8B4Kup0f5a5X=8hSuTehPd1kNpTSvazrmj4bVgfe5UxvA@mail.gmail.com>

On Mon, Jan 13, 2014 at 09:37:23PM +0100, Artyom Tarasenko wrote:
> Hi Edgar,

Hi Artyom,

> 
> On Mon, Jan 13, 2014 at 8:39 AM,  <edgar.iglesias@gmail.com> wrote:
> > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> >
> > Hi,
> >
> > I'm looking at modeling systems where multiple CPUs co-exist with
> > different views of their attached buses/devs.
> >
> > With this series I'm trying to take some steps towards having
> > an address-space per CPU.
> 
> This is a very interesting approach. Would it be also possible to have
> multiple address-spaces per CPU?
> At least SPARC emulation would profit from that, the CPUs have
> separate MMUs for data and code.

In general (dma, cpus, etc) it's just a matter of adding more AS props
and have logic within the device to route things to specific ASs depending
on internal state and kind of access.

For DMA capable devs it would be fairly easy with the AS props in place.

To do multiple AS per CPU we would need more refactoring. We could make
the AS passing more top-down or maybe add a target specific callback
with info about the access and let arch specific code return an AS
based on cpu state and kind of access. The latter is probably doable
without too much effort but I can imagine its a bit slower...

This series doesn't reach that far wrt to CPUs but I think it's a step on
the way. We can do more refactoring incrementally. The reason I'm not
aiming at doing it all at once is that I'm afraid the series will get
unmanageable do to the intrusiveness.

I'll try to keep this use-case in mind as we continue.

Thanks,
Edgar



> 
> Artyom
> 
> > It's not complete but good enough for
> > making it possible to model (to some extent) CPU local memories
> > for MicroBlaze systems in emulation mode (TCG). I'm updating the
> > petalogix-ml605 here and will follow-up later with the petalogix-s3adsp.
> >
> > The per-cpu address space is added into the CPUState. I tried to
> > measure performance diff with having it in the CPUState->env.
> > For "normal" and even for IO heavy workloads on linux kernels,
> > the diff is not measurable. I also tested with a tight guest loop
> > that continuously does I/O accesses and there I can see a 2.5% drop in perf.
> > I dont think the runtime type check involved when casting from env to CS
> > will be much of a problem.
> >
> > I've reordered the series and moved the AS props to the end, hoping
> > we can get through the bulk of the series with less controversy and
> > get it commited soon.
> > I've kept the interface with properties to set AddressSpace pointers
> > which I think is the more flexible approach but we can explore other
> > ideas if there are.
> >
> > There is lots of future work needed, for example to transform more of
> > the cpu_* bus accessing functions. To add more usage of AddressSpace
> > properties to pass on address spaces to DMA models. Qtest mechanisms
> > to target specific address spaces, etc...
> >
> > Cheers,
> > Edgar
> >
> > v2 -> v3:
> > Move CPU address-space prop into CPUState level.
> >
> > v1 -> v2:
> > Add braces in cpu_memory_rw_debug.
> > Avoid mixing var/code declarations in tcg_commit.
> > Move per-cpu address space into CPUState.
> > Reorder patch series to add the AS properties last.
> 
> 
> 
> -- 
> Regards,
> Artyom Tarasenko
> 
> linux/sparc and solaris/sparc under qemu blog:
> http://tyom.blogspot.com/search/label/qemu

      reply	other threads:[~2014-01-13 23:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13  7:39 [Qemu-devel] [PATCH v3 00/22] Steps towards per CPU address-spaces edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 01/22] exec: Make tb_invalidate_phys_addr input an AS edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 02/22] exec: Make iotlb_to_region " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 03/22] exec: Always initialize MemorySection address spaces edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 04/22] exec: Make memory_region_section_get_iotlb use section AS edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 05/22] memory: Add MemoryListener to typedefs.h edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 06/22] cpu: Add per-cpu address space edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 07/22] exec: On AS changes, only flush affected CPU TLBs edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 08/22] exec: Make ldl_*_phys input an AddressSpace edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 09/22] exec: Make ldq/ldub_*_phys " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 10/22] exec: Make lduw_*_phys " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 11/22] exec: Make stq_*_phys " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 12/22] exec: Make stl_*_phys " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 13/22] exec: Make stl_phys_notdirty " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 14/22] exec: Make stw_*_phys " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 15/22] exec: Make stb_phys " edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 16/22] exec: Make cpu_physical_memory_write_rom input an AS edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 17/22] exec: Make cpu_memory_rw_debug use the CPUs AS edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 18/22] memory: Add address_space_find_by_name() edgar.iglesias
2014-01-13  7:39 ` [Qemu-devel] [PATCH v3 19/22] qdev: Add qdev property type for AddressSpaces edgar.iglesias
2014-01-13  7:40 ` [Qemu-devel] [PATCH v3 20/22] cpu: Add address-space property edgar.iglesias
2014-01-13  7:40 ` [Qemu-devel] [PATCH v3 21/22] petalogix-ml605: Create the CPU with object_new() edgar.iglesias
2014-01-13  7:40 ` [Qemu-devel] [PATCH v3 22/22] petalogix-ml605: Make the LMB visible only to the CPU edgar.iglesias
2014-01-13 20:37 ` [Qemu-devel] [PATCH v3 00/22] Steps towards per CPU address-spaces Artyom Tarasenko
2014-01-13 23:34   ` Edgar E. Iglesias [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=20140113233421.GA20473@amz.ap-southeast-2.compute.internal \
    --to=edgar.iglesias@gmail.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=pcrost@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).