Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-11-11 Thread Paolo Bonzini
On 29/10/19 09:21, Wei Yang wrote: > Thanks Dave > > Paolo > > Do you feel comfortable with this? > Queued now, thanks. Paolo

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-10-29 Thread Wei Yang
On Tue, Oct 29, 2019 at 07:04:19AM +, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> On Fri, Jul 19, 2019 at 07:06:51PM +0100, Dr. David Alan Gilbert wrote: >> >* Paolo Bonzini (pbonz...@redhat.com) wrote: >> >> On 19/07/19 19:54, Dr. David Alan Gilbert wrot

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-10-29 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > On Fri, Jul 19, 2019 at 07:06:51PM +0100, Dr. David Alan Gilbert wrote: > >* 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)) { > >

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-10-27 Thread Wei Yang
On Fri, Jul 19, 2019 at 07:06:51PM +0100, Dr. David Alan Gilbert wrote: >* 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: Una

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-10-01 Thread Wei Yang
On Fri, Jul 19, 2019 at 07:06:51PM +0100, Dr. David Alan Gilbert wrote: >* 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: Una

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-09-13 Thread Wei Yang
On Fri, Jul 19, 2019 at 06:54:00PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> Since the start addr is already checked, to make sure the range is >> aligned, checking the length is enough. >> >> Signed-off-by: Wei Yang >> --- >> exec.c | 7 +++ >

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-08-18 Thread Wei Yang
On Fri, Jul 19, 2019 at 06:54:00PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> Since the start addr is already checked, to make sure the range is >> aligned, checking the length is enough. >> >> Signed-off-by: Wei Yang >> --- >> exec.c | 7 +++ >

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-07-19 Thread Dr. David Alan Gilbert
* 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);

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-07-19 Thread Paolo Bonzini
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)) { >> +

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-07-19 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > Since the start addr is already checked, to make sure the range is > aligned, checking the length is enough. > > Signed-off-by: Wei Yang > --- > exec.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/exec.c b/ex

[Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned

2019-07-11 Thread Wei Yang
Since the start addr is already checked, to make sure the range is aligned, checking the length is enough. Signed-off-by: Wei Yang --- exec.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/exec.c b/exec.c index 50ea9c5aaa..8fa980baae 100644 --- a/exec.c +++ b/exec.c @