qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24
@ 2016-02-25 15:14 Paolo Bonzini
  2016-02-25 15:14 ` [Qemu-devel] [PULL 15/19] exec: store RAMBlock pointer into memory region Paolo Bonzini
  2016-02-25 16:40 ` [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24 Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-02-25 15:14 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit dd5e38b19d7cb07d317e1285941d8245c01da540:

  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160218-1' into staging (2016-02-18 15:20:35 +0000)

are available in the git repository at:

  git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to cfc3b074de4b4ccee2540edbf8cfdb026dc19943:

  target-i386: fix confusion in xcr0 bit position vs. mask (2016-02-25 16:11:29 +0100)

----------------------------------------------------------------
* Asynchronous dump-guest-memory from Peter
* improved logging with -D -daemonize from Dimitris
* more address_space_* optimization from Gonglei
* TCG xsave/xrstor thinko fix
* chardev bugfix and documentation patch

----------------------------------------------------------------
Dimitris Aragiorgis (1):
      log: Redirect stderr to logfile if deamonized

Eric Blake (1):
      chardev: Properly initialize ChardevCommon components

Fam Zheng (1):
      scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"

Gonglei (3):
      exec: store RAMBlock pointer into memory region
      memory: optimize qemu_get_ram_ptr and qemu_ram_ptr_length
      memory: Remove unreachable return statement

Paolo Bonzini (1):
      target-i386: fix confusion in xcr0 bit position vs. mask

Peter Maydell (1):
      qemu-options.hx: Improve documentation of chardev multiplexing mode

Peter Xu (11):
      dump-guest-memory: cleanup: removing dump_{error|cleanup}().
      dump-guest-memory: add "detach" flag for QMP/HMP interfaces.
      dump-guest-memory: using static DumpState, add DumpStatus
      dump-guest-memory: add dump_in_progress() helper function
      dump-guest-memory: introduce dump_process() helper function.
      dump-guest-memory: disable dump when in INMIGRATE state
      dump-guest-memory: add "detach" support
      DumpState: adding total_size and written_size fields
      Dump: add qmp command "query-dump"
      Dump: add hmp command "info dump"
      dump-guest-memory: add qmp event DUMP_COMPLETED

 docs/qmp-events.txt             |  18 ++++
 dump.c                          | 215 ++++++++++++++++++++++++++++++----------
 exec.c                          |  48 +++++----
 hmp-commands-info.hx            |  14 +++
 hmp-commands.hx                 |   5 +-
 hmp.c                           |  26 ++++-
 hmp.h                           |   1 +
 include/exec/memory.h           |   8 +-
 include/qemu-common.h           |   4 +
 include/qemu/log.h              |   6 --
 include/sysemu/char.h           |  10 ++
 include/sysemu/dump.h           |  15 +++
 include/sysemu/memory_mapping.h |   4 +
 memory.c                        |   3 +-
 memory_mapping.c                |   3 +
 os-posix.c                      |   6 +-
 qapi-schema.json                |  56 ++++++++++-
 qapi/event.json                 |  16 +++
 qemu-char.c                     |   2 +-
 qemu-doc.texi                   |  30 ++++--
 qemu-options.hx                 |  45 ++++++++-
 qmp-commands.hx                 |  31 +++++-
 qmp.c                           |  14 +++
 scripts/kvm/kvm_stat            |   5 +-
 spice-qemu-char.c               |  12 ++-
 target-i386/cpu.c               |  29 ++++--
 target-i386/cpu.h               |  29 ++++--
 target-i386/fpu_helper.c        |  41 ++++----
 target-i386/mpx_helper.c        |   2 +-
 ui/console.c                    |  20 ++--
 util/log.c                      |  11 +-
 31 files changed, 564 insertions(+), 165 deletions(-)
-- 
2.5.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 15/19] exec: store RAMBlock pointer into memory region
  2016-02-25 15:14 [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24 Paolo Bonzini
@ 2016-02-25 15:14 ` Paolo Bonzini
  2016-02-25 16:40 ` [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24 Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-02-25 15:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gonglei

From: Gonglei <arei.gonglei@huawei.com>

Each RAM memory region has a unique corresponding RAMBlock.
In the current realization, the memory region only stored
the ram_addr which means the offset of RAM address space,
We need to qurey the global ram.list to find the ram block
by ram_addr if we want to get the ram block, which is very
expensive.

Now, we store the RAMBlock pointer into memory region
structure. So, if we know the mr, we can easily get the
RAMBlock.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Message-Id: <1456130097-4208-2-git-send-email-arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 exec.c                | 2 ++
 include/exec/memory.h | 2 ++
 memory.c              | 1 +
 3 files changed, 5 insertions(+)

diff --git a/exec.c b/exec.c
index 1f24500..4c0114a 100644
--- a/exec.c
+++ b/exec.c
@@ -1717,6 +1717,8 @@ ram_addr_t qemu_ram_alloc_internal(ram_addr_t size, ram_addr_t max_size,
         error_propagate(errp, local_err);
         return -1;
     }
+
+    mr->ram_block = new_block;
     return addr;
 }
 
diff --git a/include/exec/memory.h b/include/exec/memory.h
index c92734a..683be46 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -34,6 +34,7 @@
 #include "qapi/error.h"
 #include "qom/object.h"
 #include "qemu/rcu.h"
+#include "qemu/typedefs.h"
 
 #define MAX_PHYS_ADDR_SPACE_BITS 62
 #define MAX_PHYS_ADDR            (((hwaddr)1 << MAX_PHYS_ADDR_SPACE_BITS) - 1)
@@ -172,6 +173,7 @@ struct MemoryRegion {
     bool global_locking;
     uint8_t dirty_log_mask;
     ram_addr_t ram_addr;
+    RAMBlock *ram_block;
     Object *owner;
     const MemoryRegionIOMMUOps *iommu_ops;
 
diff --git a/memory.c b/memory.c
index 09041ed..b4451dd 100644
--- a/memory.c
+++ b/memory.c
@@ -912,6 +912,7 @@ void memory_region_init(MemoryRegion *mr,
     }
     mr->name = g_strdup(name);
     mr->owner = owner;
+    mr->ram_block = NULL;
 
     if (name) {
         char *escaped_name = memory_region_escape_name(name);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24
  2016-02-25 15:14 [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24 Paolo Bonzini
  2016-02-25 15:14 ` [Qemu-devel] [PULL 15/19] exec: store RAMBlock pointer into memory region Paolo Bonzini
@ 2016-02-25 16:40 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2016-02-25 16:40 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On 25 February 2016 at 15:14, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The following changes since commit dd5e38b19d7cb07d317e1285941d8245c01da540:
>
>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160218-1' into staging (2016-02-18 15:20:35 +0000)
>
> are available in the git repository at:
>
>   git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to cfc3b074de4b4ccee2540edbf8cfdb026dc19943:
>
>   target-i386: fix confusion in xcr0 bit position vs. mask (2016-02-25 16:11:29 +0100)
>
> ----------------------------------------------------------------
> * Asynchronous dump-guest-memory from Peter
> * improved logging with -D -daemonize from Dimitris
> * more address_space_* optimization from Gonglei
> * TCG xsave/xrstor thinko fix
> * chardev bugfix and documentation patch
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-25 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25 15:14 [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24 Paolo Bonzini
2016-02-25 15:14 ` [Qemu-devel] [PULL 15/19] exec: store RAMBlock pointer into memory region Paolo Bonzini
2016-02-25 16:40 ` [Qemu-devel] [PULL v2 00/19] Misc changes for 2016-02-24 Peter Maydell

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).