qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] QMP queue
@ 2013-01-10 17:47 Luiz Capitulino
  2013-01-10 17:47 ` [Qemu-devel] [PULL 1/2] target-i386: fix bits 39:32 of the final physical address when using 4M page Luiz Capitulino
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Capitulino @ 2013-01-10 17:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

The changes (since 7cd5da7eef152a533c5774effd2e7bbfa5976c86) are available
in the following repository:

    git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

Markus Armbruster (1):
  monitor: assert monitor_puts()'s loop invariant

Wen Congyang (1):
  target-i386: fix bits 39:32 of the final physical address when using
    4M page

 monitor.c                         |  1 +
 target-i386/arch_memory_mapping.c | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
1.8.0

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

* [Qemu-devel] [PULL 1/2] target-i386: fix bits 39:32 of the final physical address when using 4M page
  2013-01-10 17:47 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
@ 2013-01-10 17:47 ` Luiz Capitulino
  2013-01-10 17:47 ` [Qemu-devel] [PULL 2/2] monitor: assert monitor_puts()'s loop invariant Luiz Capitulino
  2013-01-14 18:04 ` [Qemu-devel] [PULL 0/2] QMP queue Anthony Liguori
  2 siblings, 0 replies; 4+ messages in thread
From: Luiz Capitulino @ 2013-01-10 17:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

From: Wen Congyang <wency@cn.fujitsu.com>

((pde & 0x1fe000) << 19) is the bits 39:32 of the final physical address, and
we shouldn't use unit32_t to calculate it. Convert the type to hwaddr to fix
this problem.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 target-i386/arch_memory_mapping.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c
index c6c7874..844893f 100644
--- a/target-i386/arch_memory_mapping.c
+++ b/target-i386/arch_memory_mapping.c
@@ -115,7 +115,7 @@ static void walk_pde2(MemoryMappingList *list,
                       hwaddr pde_start_addr, int32_t a20_mask,
                       bool pse)
 {
-    hwaddr pde_addr, pte_start_addr, start_paddr;
+    hwaddr pde_addr, pte_start_addr, start_paddr, high_paddr;
     uint32_t pde;
     target_ulong line_addr, start_vaddr;
     int i;
@@ -130,8 +130,13 @@ static void walk_pde2(MemoryMappingList *list,
 
         line_addr = (((unsigned int)i & 0x3ff) << 22);
         if ((pde & PG_PSE_MASK) && pse) {
-            /* 4 MB page */
-            start_paddr = (pde & ~0x3fffff) | ((pde & 0x1fe000) << 19);
+            /*
+             * 4 MB page:
+             * bits 39:32 are bits 20:13 of the PDE
+             * bit3 31:22 are bits 31:22 of the PDE
+             */
+            high_paddr = ((hwaddr)(pde & 0x1fe000) << 19);
+            start_paddr = (pde & ~0x3fffff) | high_paddr;
             if (cpu_physical_memory_is_io(start_paddr)) {
                 /* I/O region */
                 continue;
-- 
1.8.0

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

* [Qemu-devel] [PULL 2/2] monitor: assert monitor_puts()'s loop invariant
  2013-01-10 17:47 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
  2013-01-10 17:47 ` [Qemu-devel] [PULL 1/2] target-i386: fix bits 39:32 of the final physical address when using 4M page Luiz Capitulino
@ 2013-01-10 17:47 ` Luiz Capitulino
  2013-01-14 18:04 ` [Qemu-devel] [PULL 0/2] QMP queue Anthony Liguori
  2 siblings, 0 replies; 4+ messages in thread
From: Luiz Capitulino @ 2013-01-10 17:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

From: Markus Armbruster <armbru@redhat.com>

Chiefly to hush up Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/monitor.c b/monitor.c
index 9cf419b..c6eac60 100644
--- a/monitor.c
+++ b/monitor.c
@@ -270,6 +270,7 @@ static void monitor_puts(Monitor *mon, const char *str)
     char c;
 
     for(;;) {
+        assert(mon->outbuf_index < sizeof(mon->outbuf) - 1);
         c = *str++;
         if (c == '\0')
             break;
-- 
1.8.0

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

* Re: [Qemu-devel] [PULL 0/2] QMP queue
  2013-01-10 17:47 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
  2013-01-10 17:47 ` [Qemu-devel] [PULL 1/2] target-i386: fix bits 39:32 of the final physical address when using 4M page Luiz Capitulino
  2013-01-10 17:47 ` [Qemu-devel] [PULL 2/2] monitor: assert monitor_puts()'s loop invariant Luiz Capitulino
@ 2013-01-14 18:04 ` Anthony Liguori
  2 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2013-01-14 18:04 UTC (permalink / raw)
  To: Luiz Capitulino, qemu-devel; +Cc: aliguori

Pulled, thanks.

N.B.  This note may be extraneous because the pull request was sent by a
version of git older than 1.7.9 making the pull request ambigious.  Please
consider upgrading to a newer version of git.

Regards,

Anthony Liguori

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

end of thread, other threads:[~2013-01-14 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 17:47 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
2013-01-10 17:47 ` [Qemu-devel] [PULL 1/2] target-i386: fix bits 39:32 of the final physical address when using 4M page Luiz Capitulino
2013-01-10 17:47 ` [Qemu-devel] [PULL 2/2] monitor: assert monitor_puts()'s loop invariant Luiz Capitulino
2013-01-14 18:04 ` [Qemu-devel] [PULL 0/2] QMP queue Anthony Liguori

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