qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0.15 0/4] xen-stable patch queue 2011-07-22
@ 2011-07-22 13:36 Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 1/4] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...) Alexander Graf
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexander Graf @ 2011-07-22 13:36 UTC (permalink / raw)
  To: QEMU-devel Developers; +Cc: Anthony Liguori

Hi Anthony,

This is my current patch queue for xen on 0.15. Please pull.

Alex


The following changes since commit b8095f24f24e50a7d4be33d8a79474aff3324295:
  Anthony Liguori (1):
        Bump version to reflect v0.15.0-rc0

are available in the git repository at:

  git://repo.or.cz/qemu/agraf.git xen-stable-0.15

Alexander Graf (2):
      xen: remove CONFIG_XEN_MAPCACHE
      xen: make xen_enabled even more clever

Anthony PERARD (2):
      exec.c: Use ram_addr_t in cpu_physical_memory_rw(...).
      xen: Fix xen_enabled().

 configure |    8 +++++---
 exec.c    |    4 ++--
 hw/xen.h  |    2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

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

* [Qemu-devel] [PATCH 1/4] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...).
  2011-07-22 13:36 [Qemu-devel] [PULL 0.15 0/4] xen-stable patch queue 2011-07-22 Alexander Graf
@ 2011-07-22 13:36 ` Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 2/4] xen: Fix xen_enabled() Alexander Graf
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2011-07-22 13:36 UTC (permalink / raw)
  To: QEMU-devel Developers; +Cc: Anthony PERARD, Anthony Liguori

From: Anthony PERARD <anthony.perard@citrix.com>

As the variable pd and addr1 inside the function cpu_physical_memory_rw
are mean to handle a RAM address, they should be of the ram_addr_t type
instead of unsigned long.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 exec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec.c b/exec.c
index 2160ded..0393d39 100644
--- a/exec.c
+++ b/exec.c
@@ -3858,7 +3858,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
     uint8_t *ptr;
     uint32_t val;
     target_phys_addr_t page;
-    unsigned long pd;
+    ram_addr_t pd;
     PhysPageDesc *p;
 
     while (len > 0) {
@@ -3898,7 +3898,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
                     l = 1;
                 }
             } else {
-                unsigned long addr1;
+                ram_addr_t addr1;
                 addr1 = (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK);
                 /* RAM case */
                 ptr = qemu_get_ram_ptr(addr1);
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 2/4] xen: Fix xen_enabled().
  2011-07-22 13:36 [Qemu-devel] [PULL 0.15 0/4] xen-stable patch queue 2011-07-22 Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 1/4] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...) Alexander Graf
@ 2011-07-22 13:36 ` Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 3/4] xen: remove CONFIG_XEN_MAPCACHE Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 4/4] xen: make xen_enabled even more clever Alexander Graf
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2011-07-22 13:36 UTC (permalink / raw)
  To: QEMU-devel Developers; +Cc: Anthony PERARD, Anthony Liguori

From: Anthony PERARD <anthony.perard@citrix.com>

Use the "host" CONFIG_ define instead of the "target" one.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/xen.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xen.h b/hw/xen.h
index e432705..43b95d6 100644
--- a/hw/xen.h
+++ b/hw/xen.h
@@ -24,7 +24,7 @@ extern int xen_allowed;
 
 static inline int xen_enabled(void)
 {
-#ifdef CONFIG_XEN
+#ifdef CONFIG_XEN_BACKEND
     return xen_allowed;
 #else
     return 0;
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 3/4] xen: remove CONFIG_XEN_MAPCACHE
  2011-07-22 13:36 [Qemu-devel] [PULL 0.15 0/4] xen-stable patch queue 2011-07-22 Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 1/4] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...) Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 2/4] xen: Fix xen_enabled() Alexander Graf
@ 2011-07-22 13:36 ` Alexander Graf
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 4/4] xen: make xen_enabled even more clever Alexander Graf
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2011-07-22 13:36 UTC (permalink / raw)
  To: QEMU-devel Developers; +Cc: Anthony Liguori

We were still exporting CONFIG_XEN_MAPCACHE, even though it's completely
unused by now. Remove it.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 configure |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 6911c3b..90fe09f 100755
--- a/configure
+++ b/configure
@@ -3277,9 +3277,6 @@ case "$target_arch2" in
     if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
       target_phys_bits=64
       echo "CONFIG_XEN=y" >> $config_target_mak
-      if test "$cpu" = "i386" -o "$cpu" = "x86_64"; then
-          echo "CONFIG_XEN_MAPCACHE=y" >> $config_target_mak
-      fi
     fi
 esac
 case "$target_arch2" in
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 4/4] xen: make xen_enabled even more clever
  2011-07-22 13:36 [Qemu-devel] [PULL 0.15 0/4] xen-stable patch queue 2011-07-22 Alexander Graf
                   ` (2 preceding siblings ...)
  2011-07-22 13:36 ` [Qemu-devel] [PATCH 3/4] xen: remove CONFIG_XEN_MAPCACHE Alexander Graf
@ 2011-07-22 13:36 ` Alexander Graf
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2011-07-22 13:36 UTC (permalink / raw)
  To: QEMU-devel Developers; +Cc: Anthony Liguori

When using xen_enabled() we're currently only checking if xen is enabled
at all during the build. But what if you want to build multiple targets
out of which only one can potentially run xen code?

That means that for generic code we'll still have to fall back to the
variable and potentially slow the code down, but it's not as important as
that is mostly xen device emulation which is not touched for non-xen targets.

The target specific code however can with this patch see that it's unable to
ever execute xen code. We can thus always return 0 on xen_enabled(), giving
gcc enough hints to evict the mapcache code from the target memory management
code.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
---
 configure |    5 +++++
 hw/xen.h  |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 90fe09f..e5ecec9 100755
--- a/configure
+++ b/configure
@@ -3277,7 +3277,12 @@ case "$target_arch2" in
     if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
       target_phys_bits=64
       echo "CONFIG_XEN=y" >> $config_target_mak
+    else
+      echo "CONFIG_NO_XEN=y" >> $config_target_mak
     fi
+    ;;
+  *)
+    echo "CONFIG_NO_XEN=y" >> $config_target_mak
 esac
 case "$target_arch2" in
   i386|x86_64|ppcemb|ppc|ppc64|s390x)
diff --git a/hw/xen.h b/hw/xen.h
index 43b95d6..2162111 100644
--- a/hw/xen.h
+++ b/hw/xen.h
@@ -24,7 +24,7 @@ extern int xen_allowed;
 
 static inline int xen_enabled(void)
 {
-#ifdef CONFIG_XEN_BACKEND
+#if defined(CONFIG_XEN_BACKEND) && !defined(CONFIG_NO_XEN)
     return xen_allowed;
 #else
     return 0;
-- 
1.6.0.2

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

end of thread, other threads:[~2011-07-23 21:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 13:36 [Qemu-devel] [PULL 0.15 0/4] xen-stable patch queue 2011-07-22 Alexander Graf
2011-07-22 13:36 ` [Qemu-devel] [PATCH 1/4] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...) Alexander Graf
2011-07-22 13:36 ` [Qemu-devel] [PATCH 2/4] xen: Fix xen_enabled() Alexander Graf
2011-07-22 13:36 ` [Qemu-devel] [PATCH 3/4] xen: remove CONFIG_XEN_MAPCACHE Alexander Graf
2011-07-22 13:36 ` [Qemu-devel] [PATCH 4/4] xen: make xen_enabled even more clever Alexander Graf

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