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

Re: [PATCH v8 8/9] tools/xenstored: use unique_id to identify new domain with same domid


  • To: Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 12 Mar 2025 13:40:27 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=23F8W1myyJryhzgepBxpSVHRgrA0RwTaHK3k3wt/1Xs=; b=wVzR2/oeDHB0l01bCh9W+yWj3uwuCkYSHQnsDnT1644MoW7txCFVmDcVAaUm0ssCT/DMKkQMT0sQw9ZMXQurZTiqUJTZs+jXS+X9GR8JTrNpHE6OBnoHRTnp8m/BQIMWqimMOWOZBYAqtAsmn/TWfXi3yQqJ6O+KVz3/xa3tJCxPPUUk21fxyNYQwt021Qt9Rf22N/dMqTQutS4+AOP5fsQ2drJSDFWfOftrAwKbsbkYremgUj69392hqWPuRYtHayXDEw+el9nnNeinjfo0+f9H1ujE2dm8ipdNssv9J14X272WmHla2CZsCTAS5fAbiajVb5w8ap8qHmuFwzEGQg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mvfzO+2z1iF3CjDDpDCmK1PQeeDiP0kTfj2mEDcLEYri9jun7waPT/lI3FwUMcUyp/alswtYtM/5qNxh7NNeJl2eh2OHIKzEgpBTRVOeoPWvjKP3rgS6WnxY1Jxm8NBJEcKFsHaDSGwme1mNsAxEHfp247pBG7vqIBaN9uTcNdM2+g8Sy8Akmn9SoxTKvgxRyvuQxuRPmPOVPtLHGDIsK3VD9Z9USX0Ww9WHS3p182UUSB7xz9Cra1P5Up+4BrpKnvHULMmJLKD2GUB3sc11FAHxU2gXBwLfPQ4l7//JGVuSqSWNjT8u0BdBCGFsZCjVVdnHtZ1GIXe9HfIV8uNP8Q==
  • Cc: Julien Grall <julien@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 12 Mar 2025 17:41:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-02-04 06:34, Juergen Gross wrote:
Use the new unique_id of a domain in order to detect that a domain
has been replaced with another one reusing the doamin-id of the old

s/doamin/domain/

domain.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---

diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c
index a6506a5bb2..63df24030e 100644
--- a/tools/xenstored/domain.c
+++ b/tools/xenstored/domain.c

@@ -627,9 +628,17 @@ static int check_domain(const void *k, void *v, void *arg)
        int dom_invalid;
        struct domain *domain = v;
        bool *notify = arg;
+       uint64_t unique_id;
dom_invalid = xenmanage_get_domain_info(xm_handle, domain->domid,
-                                               &state, NULL);
+                                               &state, &unique_id);
+       if (!dom_invalid) {

What do you think about  `if (dom_valid)` to avoid the double negative?

If you don't want to change it, the code here and elsewhere looks fine to me as-is.

You'll re-spin with updated dump code, correct?

Regards,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.