From 29df55e74d2d2ca91de28a7cf9032149128f7dbd Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Fri, 28 Jul 2023 14:39:31 +0200 Subject: [PATCH] conf: Compare memory device address in virDomainMemoryFindByDefInternal() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar to one of my previous commits. Simply speaking, users can specify address where a memory device is mapped to. And as such, we should include it when looking up corresponding device in domain definition (e.g. on device hot unplug). Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2e60927799..929584d2b5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15253,7 +15253,8 @@ virDomainMemoryFindByDefInternal(virDomainDef *def, tmp->targetNode != mem->targetNode || tmp->size != mem->size || tmp->blocksize != mem->blocksize || - tmp->requestedsize != mem->requestedsize) + tmp->requestedsize != mem->requestedsize || + tmp->address != mem->address) continue; switch (mem->model) {