All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] i386/monitor: Fix inverse PG_PRESENT_MASK checking in mem_info_la57()
@ 2021-10-08  6:31 Yuan Yao
  0 siblings, 0 replies; only message in thread
From: Yuan Yao @ 2021-10-08  6:31 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Kirill A . Shutemov, Yuan Yao

The inverse pdpe/pde PG_PRESENT_MASK checking causes no
mapping information was collected from "info mem" for guest
with LA57 enabled.

Fixes: 6c7c3c21f9 ("x86: implement la57 paging mode")
Signed-off-by: Yuan Yao <yuan.yao@intel.com>
---
 target/i386/monitor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 196c1c9e77..8c6b91a313 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -491,7 +491,7 @@ static void mem_info_la57(Monitor *mon, CPUArchState *env)
                 cpu_physical_memory_read(pdp_addr + l2 * 8, &pdpe, 8);
                 pdpe = le64_to_cpu(pdpe);
                 end = (l0 << 48) + (l1 << 39) + (l2 << 30);
-                if (pdpe & PG_PRESENT_MASK) {
+                if (!(pdpe & PG_PRESENT_MASK)) {
                     prot = 0;
                     mem_print(mon, env, &start, &last_prot, end, prot);
                     continue;
@@ -510,7 +510,7 @@ static void mem_info_la57(Monitor *mon, CPUArchState *env)
                     cpu_physical_memory_read(pd_addr + l3 * 8, &pde, 8);
                     pde = le64_to_cpu(pde);
                     end = (l0 << 48) + (l1 << 39) + (l2 << 30) + (l3 << 21);
-                    if (pde & PG_PRESENT_MASK) {
+                    if (!(pde & PG_PRESENT_MASK)) {
                         prot = 0;
                         mem_print(mon, env, &start, &last_prot, end, prot);
                         continue;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-08  6:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  6:31 [PATCH 1/1] i386/monitor: Fix inverse PG_PRESENT_MASK checking in mem_info_la57() Yuan Yao

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.