All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>, qemu-devel@nongnu.org
Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v1 5/6] qom/cpu: Add Memory Region Property
Date: Tue, 26 Aug 2014 15:18:12 +0200	[thread overview]
Message-ID: <53FC8914.9030109@redhat.com> (raw)
In-Reply-To: <bb976e0ff0f199cc669dbf61617087b64ba99be0.1409013758.git.peter.crosthwaite@xilinx.com>

Il 26/08/2014 02:59, Peter Crosthwaite ha scritto:
> Which is used to construct a per-CPU address space. The Address space
> will be created at realize time.
> 
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
> 
>  include/qom/cpu.h |  1 +
>  qom/cpu.c         | 11 +++++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
> index 1aafbf5..192d337 100644
> --- a/include/qom/cpu.h
> +++ b/include/qom/cpu.h
> @@ -242,6 +242,7 @@ struct CPUState {
>      int64_t icount_extra;
>      sigjmp_buf jmp_env;
>  
> +    MemoryRegion *mr;
>      AddressSpace *as;
>      MemoryListener *tcg_as_listener;
>  
> diff --git a/qom/cpu.c b/qom/cpu.c
> index b32dd0a..899071e 100644
> --- a/qom/cpu.c
> +++ b/qom/cpu.c
> @@ -25,6 +25,10 @@
>  #include "qemu/log.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/sysemu.h"
> +#include "exec/memory.h"
> +#include "qapi/visitor.h"
> +#include "exec/address-spaces.h"
> +#include "hw/qdev-properties.h"
>  
>  bool cpu_exists(int64_t id)
>  {
> @@ -314,6 +318,13 @@ static void cpu_common_initfn(Object *obj)
>      CPUClass *cc = CPU_GET_CLASS(obj);
>  
>      cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;
> +#ifndef CONFIG_USER_ONLY
> +    object_property_add_link(obj, "mr", TYPE_MEMORY_REGION,

Please use a clearer name such as "memory".

Paolo

> +                             (Object **)&cpu->mr,
> +                             qdev_prop_allow_set_link_before_realize,
> +                             OBJ_PROP_LINK_UNREF_ON_RELEASE,
> +                             &error_abort);
> +#endif
>  }
>  
>  static int64_t cpu_common_get_arch_id(CPUState *cpu)
> 

  reply	other threads:[~2014-08-26 13:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26  0:56 [Qemu-devel] [PATCH v1 0/6] PMA phase 2 - per CPU address spaces Peter Crosthwaite
2014-08-26  0:56 ` [Qemu-devel] [PATCH v1 1/6] memory: address_space_init: do nothing if no root region given Peter Crosthwaite
2014-08-26  0:57 ` [Qemu-devel] [PATCH v1 2/6] memory: AddressSpace: Implement ref counting Peter Crosthwaite
2014-08-26  0:58 ` [Qemu-devel] [PATCH v1 4/6] qom: Move cpu.o to obj-y Peter Crosthwaite
2014-09-01 17:43   ` Peter Maydell
2014-09-01 17:54     ` Paolo Bonzini
2014-09-01 22:28       ` Peter Crosthwaite
2014-09-01 22:56     ` Peter Crosthwaite
2014-09-02  6:48       ` Paolo Bonzini
2014-08-26  0:59 ` [Qemu-devel] [PATCH v1 5/6] qom/cpu: Add Memory Region Property Peter Crosthwaite
2014-08-26 13:18   ` Paolo Bonzini [this message]
2014-08-26  0:59 ` [Qemu-devel] [PATCH v1 6/6] cpu: Delay address space init until realize Peter Crosthwaite
2014-09-01 17:40 ` [Qemu-devel] [PATCH v1 0/6] PMA phase 2 - per CPU address spaces Peter Maydell
2014-09-02  8:44   ` Peter Crosthwaite
2014-09-02  8:42 ` [Qemu-devel] [PATCH v1 3/6] memory: Add address_space_init_shareable() Peter Crosthwaite
2015-10-20 14:59 ` [Qemu-devel] [PATCH v1 0/6] PMA phase 2 - per CPU address spaces Peter Maydell
2015-10-20 18:46   ` Peter Crosthwaite
2015-10-20 20:46     ` Peter Maydell
2015-10-21  1:45       ` Peter Crosthwaite

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=53FC8914.9030109@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.