qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gva2gpa()
@ 2019-05-10 18:56 Eduardo Habkost
  2019-05-10 19:15 ` Richard Henderson
  2019-05-14 17:13 ` Dr. David Alan Gilbert
  0 siblings, 2 replies; 4+ messages in thread
From: Eduardo Habkost @ 2019-05-10 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dr. David Alan Gilbert, Stefan Hajnoczi, Markus Armbruster

hmp_gva2gpa() calls mon_get_cpu() twice, which is unnecessary.
Not an actual bug, but this is reported as a defect by Coverity
Scan (CID 1401346).

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 monitor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/monitor.c b/monitor.c
index bb48997913..6428eb3b7e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1685,8 +1685,7 @@ static void hmp_gva2gpa(Monitor *mon, const QDict *qdict)
         return;
     }
 
-    gpa  = cpu_get_phys_page_attrs_debug(mon_get_cpu(),
-                                         addr & TARGET_PAGE_MASK, &attrs);
+    gpa  = cpu_get_phys_page_attrs_debug(cs, addr & TARGET_PAGE_MASK, &attrs);
     if (gpa == -1) {
         monitor_printf(mon, "Unmapped\n");
     } else {
-- 
2.18.0.rc1.1.g3f1ff2140



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

end of thread, other threads:[~2019-05-14 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-10 18:56 [Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gva2gpa() Eduardo Habkost
2019-05-10 19:15 ` Richard Henderson
2019-05-10 19:16   ` Dr. David Alan Gilbert
2019-05-14 17:13 ` Dr. David Alan Gilbert

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