From nobody Thu Apr 18 01:46:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1560156014; cv=none; d=zoho.com; s=zohoarc; b=UH466+6pEyBi/ZRgFNQS5FaKU9OSOezS0KM7BJf0bajAPWgFmxprU5DAy3Q4p09B3b1aoVha1WV9lIikm29mPSzxzf6irfc9Yk36Ok6pGZWXijftQHNVnxipMm7+U9RZtEO+QFZtWjeQxkXmAv1YL7zzO5PMNLvm/D7yf7i9QsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560156014; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=KINlOBghZJh4uNzuMSa47SaKSP8AHdMEOZWU9YZw4aA=; b=aB7PCuMVlk5sFOlKu6eHF5bN52haz+FF7jhkgvEol4KehYynMLzhp9ZKUfGYc1UqYJ/RSyMhAmloBu5oej8PmhegwVha0SlxVUP6AuOr8FgBllBZoZ1HqzA/Do7S+/GeKWA0mipEcT3ehKe6xg1cbjHwpkyecD60bFKrjYRO09E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1560156014362704.3686089442275; Mon, 10 Jun 2019 01:40:14 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1haFpN-00054G-I6; Mon, 10 Jun 2019 08:38:53 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1haFpM-00054B-Ax for xen-devel@lists.xenproject.org; Mon, 10 Jun 2019 08:38:52 +0000 Received: from mga17.intel.com (unknown [192.55.52.151]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2a6d3782-8b5b-11e9-b3aa-e3e9f2dd556e; Mon, 10 Jun 2019 08:38:48 +0000 (UTC) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 01:38:47 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by fmsmga006.fm.intel.com with ESMTP; 10 Jun 2019 01:38:46 -0700 X-Inumbo-ID: 2a6d3782-8b5b-11e9-b3aa-e3e9f2dd556e X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Zhang Chen To: Ian Jackson , Wei Liu , xen-devel@lists.xenproject.org Date: Mon, 10 Jun 2019 16:33:36 +0800 Message-Id: <20190610083336.18235-1-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT Subject: [Xen-devel] [PATCH] tools/libxl: Add iothread support for COLO X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Zhang Chen Xen COLO and KVM COLO shared lots of code in Qemu. KVM COLO has added the iothread support, so we add it on Xen. Detail: https://wiki.qemu.org/Features/COLO Signed-off-by: Zhang Chen --- tools/libxl/libxl_dm.c | 14 +++++++++++--- tools/libxl/libxl_types.idl | 2 ++ tools/xl/xl_parse.c | 4 ++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index f4fc96415d..6bb400efdf 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1629,17 +1629,25 @@ static int libxl__build_device_model_args_new(libxl= __gc *gc, nics[i].colo_filter_redirector1_queue, nics[i].colo_filter_redirector1_outde= v)); } + if (nics[i].colo_iothread) { + flexarray_append(dm_args, "-object"); + flexarray_append(dm_args, + GCSPRINTF("iothread,id=3D%s", + nics[i].colo_iothread)); + } if (nics[i].colo_compare_pri_in && nics[i].colo_compare_sec_in && nics[i].colo_compare_out && - nics[i].colo_compare_notify_dev) { + nics[i].colo_compare_notify_dev && + nics[i].colo_compare_iothread) { flexarray_append(dm_args, "-object"); flexarray_append(dm_args, - GCSPRINTF("colo-compare,id=3Dc1,primary_in=3D%s= ,secondary_in=3D%s,outdev=3D%s,notify_dev=3D%s", + GCSPRINTF("colo-compare,id=3Dc1,primary_in=3D%s= ,secondary_in=3D%s,outdev=3D%s,notify_dev=3D%s,iothread=3D%s", nics[i].colo_compare_pri_in, nics[i].colo_compare_sec_in, nics[i].colo_compare_out, - nics[i].colo_compare_notify_dev)); + nics[i].colo_compare_notify_dev, + nics[i].colo_compare_iothread)); } } ioemu_nics++; diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index b61399ce36..f0435a5177 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -727,10 +727,12 @@ libxl_device_nic =3D Struct("device_nic", [ ("colo_filter_redirector1_queue", string), ("colo_filter_redirector1_indev", string), ("colo_filter_redirector1_outdev", string), + ("colo_iothread", string), ("colo_compare_pri_in", string), ("colo_compare_sec_in", string), ("colo_compare_out", string), ("colo_compare_notify_dev", string), + ("colo_compare_iothread", string), ("colo_sock_sec_redirector0_id", string), ("colo_sock_sec_redirector0_ip", string), ("colo_sock_sec_redirector0_port", string), diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index e105bda2bb..cd16856910 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -521,6 +521,8 @@ int parse_nic_config(libxl_device_nic *nic, XLU_Config = **config, char *token) replace_string(&nic->colo_filter_redirector1_indev, oparg); } else if (MATCH_OPTION("colo_filter_redirector1_outdev", token, oparg= )) { replace_string(&nic->colo_filter_redirector1_outdev, oparg); + } else if (MATCH_OPTION("colo_iothread", token, oparg)) { + replace_string(&nic->colo_iothread, oparg); } else if (MATCH_OPTION("colo_compare_pri_in", token, oparg)) { replace_string(&nic->colo_compare_pri_in, oparg); } else if (MATCH_OPTION("colo_compare_sec_in", token, oparg)) { @@ -529,6 +531,8 @@ int parse_nic_config(libxl_device_nic *nic, XLU_Config = **config, char *token) replace_string(&nic->colo_compare_out, oparg); } else if (MATCH_OPTION("colo_compare_notify_dev", token, oparg)) { replace_string(&nic->colo_compare_notify_dev, oparg); + } else if (MATCH_OPTION("colo_compare_iothread", token, oparg)) { + replace_string(&nic->colo_compare_iothread, oparg); } else if (MATCH_OPTION("colo_sock_sec_redirector0_id", token, oparg))= { replace_string(&nic->colo_sock_sec_redirector0_id, oparg); } else if (MATCH_OPTION("colo_sock_sec_redirector0_ip", token, oparg))= { --=20 2.17.GIT _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel