qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gv


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gva2gpa()
Date: Tue, 14 May 2019 18:13:14 +0100
User-agent: Mutt/1.11.4 (2019-03-13)

* Eduardo Habkost (address@hidden) wrote:
> 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 <address@hidden>

I'm going to sneak this onto the end of a migration pull I'm just
cooking.

Queued.

> ---
>  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
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]