Re: Re: [PATCH] domain_validate: Check for domain address conflicts fully

2024-01-23 Thread Andrea Bolognani
On Tue, Jan 23, 2024 at 04:47:44PM +0100, Michal Prívozník wrote: > On 1/23/24 10:45, Andrea Bolognani wrote: > > On Fri, Jan 19, 2024 at 04:25:11PM +0100, Michal Privoznik wrote: > >> +++ b/src/conf/domain_validate.c > >> @@ -2315,7 +2316,10 @@ virDomainMemoryDefCheckConflict(const > >> virDomain

Re: [PATCH] domain_validate: Check for domain address conflicts fully

2024-01-23 Thread Michal Prívozník
On 1/23/24 10:45, Andrea Bolognani wrote: > On Fri, Jan 19, 2024 at 04:25:11PM +0100, Michal Privoznik wrote: >> +++ b/src/conf/domain_validate.c >> @@ -2315,7 +2316,10 @@ virDomainMemoryDefCheckConflict(const >> virDomainMemoryDef *mem, >> if (thisStart == 0 || otherStart == 0) >>

Re: [PATCH] domain_validate: Check for domain address conflicts fully

2024-01-23 Thread Andrea Bolognani
On Fri, Jan 19, 2024 at 04:25:11PM +0100, Michal Privoznik wrote: > +++ b/src/conf/domain_validate.c > @@ -2315,7 +2316,10 @@ virDomainMemoryDefCheckConflict(const > virDomainMemoryDef *mem, > if (thisStart == 0 || otherStart == 0) > continue; > > -if (thisStart <= ot

[PATCH] domain_validate: Check for domain address conflicts fully

2024-01-19 Thread Michal Privoznik
Current implementation of virDomainMemoryDefCheckConflict() does only a one way comparison, i.e. if there's a memory device within def->mems[] which address falls in [mem->address, mem->address + mem->size] range (mem is basically an iterator within def->mems[]). And for static XML this works just