* Paolo Bonzini (pbonz...@redhat.com) wrote:
> On 19/07/19 19:54, Dr. David Alan Gilbert wrote:
> >> -        if ((uintptr_t)host_endaddr & (rb->page_size - 1)) {
> >> -            error_report("ram_block_discard_range: Unaligned end address: 
> >> %p",
> >> -                         host_endaddr);
> >> +        if (length & (rb->page_size - 1)) {
> >> +            error_report("ram_block_discard_range: Unaligned length: %lx",
> >> +                         length);
> > Yes, I *think* this is safe, we'll need to watch out for any warnings;
> 
> Do you mean compiler or QEMU warning?

No, I mean lots of these error reports being printed out in some common
case.

Dave

  The patch is safe since there's an
> 
>     if ((uintptr_t)host_startaddr & (rb->page_size - 1)) {
>         error_report("ram_block_discard_range: Unaligned start address: %p",
>                      host_startaddr);
>         goto err;
>     }
> 
> just before this context.
> 
> Paolo
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Reply via email to