From nobody Wed May 8 17:11:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1563881908; cv=none; d=zoho.com; s=zohoarc; b=FcuQeam3OExWWBErxYU7Mt1RwVfBHYUm33PrjQDTqzzv2TYNrxU2EBnV9jaeF7rctw69TURyiUpC4mKbX+qSp0sqbnmc3Jld6tAu5eBGAF1srB6ktB9PLHHtBxI52M8RR3QMfoUm2LAmFfUry3/0qcUxqDq3UHlTQ+MMF0zjuyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563881908; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=1fzktvpoyZNENBAgM0ZDtcSMY9rNWrUU6whPYcf1v2w=; b=VcDYg+ychr8w/TnFX88W1mk7MVfUdaK6Zz6c1S0+dD+Izf8bavxmgabqLcfl1AjJ4BPNDBClDT5b/d2kjiCXCxf+NsXK2x90FTwVydW5Nt6RBGkwHhAC9RLeIbaaC341AO0gvoWJBCReYggPD2zoUfDsZYZl2yvUSwHNqmz7DHw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563881908390716.3544003688752; Tue, 23 Jul 2019 04:38:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AEF5685360; Tue, 23 Jul 2019 11:38:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8836E60497; Tue, 23 Jul 2019 11:38:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1416E1800203; Tue, 23 Jul 2019 11:38:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6NBcOMO003769 for ; Tue, 23 Jul 2019 07:38:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id C5FDC60BF3; Tue, 23 Jul 2019 11:38:24 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C0BC560BEC for ; Tue, 23 Jul 2019 11:38:22 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B947D300B916 for ; Tue, 23 Jul 2019 11:38:21 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id v19so38209118wmj.5 for ; Tue, 23 Jul 2019 04:38:21 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id e3sm38569999wrt.93.2019.07.23.04.38.19 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 04:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dj+B1YO7kbgGW/AFHBFdo0Q3wViUEQRFM2QE1nYVJqI=; b=iLjdpWDJupL+INUgQEnHM6QgJsIamKsM3Xbl9Tb+Bi0LvpH8zifgHseymlKpQoY6g/ gWC3fL77SBGO42b4R0BTqtw9jfMhBQdtyy2wDx3VdcEjXi1nH8jg3fqMccP0umeMvO7T DCcX5S831tbG6Ixxjiw6s0bfsBqkBUmgUxxrg5dtURkLRJheHAVuAv+lhDqTbtqSHUx+ 3+ExkLHVvKZgTVosU3yaRTMhwzeUyk83XL719ChTxBFxDgB0WBZ4izs345HKOy7auVS8 fqVH/sOgqnJ5i3paLCL1qo9C1u/x37IFmwPPr4FdtkdZ0LHUaGsyQDYt5NbFotC5Kj12 qhmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dj+B1YO7kbgGW/AFHBFdo0Q3wViUEQRFM2QE1nYVJqI=; b=pFmGAOtpZJLVOURDNPWRM5Gt980VMM8pSZUMROfmUtt5NWpd37+a6wOZvPS8m8Is8O GIPD2DSGGwWa8zKuuJvxACDYgYPFE1a+h4cqrq6u/TJ28bPlX7kSjODDi+KeswinEWn/ XPhHCL7x2E0mKzgxcQKQb+SA8Af0jL6YVCI9PR4MOfPeBSOrpNaCA6WV7UAdlK1IYWLM HzeZYDs+DzaEQF9ej1bsh5exJJfgoJM8VU3jbH02l4rBatVuy2iHIdj1vcjSFIUcdSa8 FIR48bJwJTYdOnyhCJ/uCZFjf5AJzdBBIe9cygyZB/zzpHDi79YPmDPjwiH0qXaKWp85 lHWA== X-Gm-Message-State: APjAAAUTrxCZf9JhKZkLgwvLSsTo0EcpoLBu6/u1hAsuNE/wtJQEvH1I VADpJm3rxRoQwleqkaJy9pk8sRG4wyvYDQ== X-Google-Smtp-Source: APXvYqw7lNHcxxg00SeNBMEgCUhBDYFtBsDEUe8KzjNRCAtHJSZasC5M2w7gHnArE/vpeg48VLo5wA== X-Received: by 2002:a7b:c954:: with SMTP id i20mr70025361wml.169.1563881899969; Tue, 23 Jul 2019 04:38:19 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 23 Jul 2019 13:37:43 +0200 Message-Id: <20190723113744.30009-2-stamatis.iliass@gmail.com> In-Reply-To: <20190723113744.30009-1-stamatis.iliass@gmail.com> References: <20190723113744.30009-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 23 Jul 2019 11:38:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 23 Jul 2019 11:38:22 +0000 (UTC) for IP:'209.85.128.68' DOMAIN:'mail-wm1-f68.google.com' HELO:'mail-wm1-f68.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.128.68 mail-wm1-f68.google.com 209.85.128.68 mail-wm1-f68.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] test_driver: implement virDomainGetEmulatorPinInfo X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 23 Jul 2019 11:38:27 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- src/test/test_driver.c | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2e33a9dd55..235d70f793 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2500,6 +2500,53 @@ static int testDomainSetMemory(virDomainPtr domain, return testDomainSetMemoryFlags(domain, memory, 0); } + +static int +testDomainGetEmulatorPinInfo(virDomainPtr dom, + unsigned char *cpumaps, + int maplen, + unsigned int flags) +{ + virDomainObjPtr vm =3D NULL; + virDomainDefPtr def =3D NULL; + virBitmapPtr cpumask =3D NULL; + virBitmapPtr bitmap =3D NULL; + int hostcpus; + int ret =3D -1; + + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + goto cleanup; + + if (!(def =3D virDomainObjGetOneDef(vm, flags))) + goto cleanup; + + if ((hostcpus =3D virHostCPUGetCount()) < 0) + goto cleanup; + + if (def->cputune.emulatorpin) { + cpumask =3D def->cputune.emulatorpin; + } else if (def->cpumask) { + cpumask =3D def->cpumask; + } else { + if (!(bitmap =3D virBitmapNew(hostcpus))) + goto cleanup; + virBitmapSetAll(bitmap); + cpumask =3D bitmap; + } + + virBitmapToDataBuf(cpumask, cpumaps, maplen); + + ret =3D 1; + cleanup: + virDomainObjEndAPI(&vm); + virBitmapFree(bitmap); + return ret; +} + + static int testDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) { @@ -7743,6 +7790,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainCoreDump =3D testDomainCoreDump, /* 0.3.2 */ .domainCoreDumpWithFormat =3D testDomainCoreDumpWithFormat, /* 1.2.3 */ .domainSetUserPassword =3D testDomainSetUserPassword, /* 5.6.0 */ + .domainGetEmulatorPinInfo =3D testDomainGetEmulatorPinInfo, /* 5.6.0 */ .domainSetVcpus =3D testDomainSetVcpus, /* 0.1.4 */ .domainSetVcpusFlags =3D testDomainSetVcpusFlags, /* 0.8.5 */ .domainGetVcpusFlags =3D testDomainGetVcpusFlags, /* 0.8.5 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 17:11:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1563881918; cv=none; d=zoho.com; s=zohoarc; b=DLWpXxgEXPrMfo0QlDdmipL7i5OHqlRZH8Ao7YBbZEZ2GwI2SiqNjExCnmy5tTXEZiAQsy7ml1116K77H6aET6mDq+p271pnSJOl8HCLrCx62K1KBzuDsVd+Y06upev9vkMEAK+M/TVnVkYOW6wpGYWuVQ8C8bg2WBRj3izITTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563881918; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ieAnBmpvFheGgAbsL9ZmBtsqRKWtW9NfkDtVuPlLczQ=; b=EObtxcmK9uZIguKZa0jZFZpaf6UzV11yaxlOJOuwT9waK3UHskgEHyacOspg08Ed+GQIeSMJkr8LHB2r8c72dVl1ZoHGPdZzQv/2DTh2NdCWyASrQO0+u5oB/k83JNBVinqhPIXIKT/7c+0RNv3cORFTzO6ilGx72wOBGRHO6AM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563881918762673.1547894114401; Tue, 23 Jul 2019 04:38:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A09B60CC; Tue, 23 Jul 2019 11:38:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FBF660BEC; Tue, 23 Jul 2019 11:38:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 12E401800208; Tue, 23 Jul 2019 11:38:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6NBcZMW003785 for ; Tue, 23 Jul 2019 07:38:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id E930F5C234; Tue, 23 Jul 2019 11:38:35 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E31D65C22E for ; Tue, 23 Jul 2019 11:38:33 +0000 (UTC) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6545F83F51 for ; Tue, 23 Jul 2019 11:38:32 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id v19so38209635wmj.5 for ; Tue, 23 Jul 2019 04:38:32 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id e3sm38569999wrt.93.2019.07.23.04.38.29 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 04:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=RIOhP/plEKcHCOfig1ZVQ8S0r9mcnrr4MfMMmEiuZN8=; b=nQB9VzBCF/Fity814bU6qv6b9vX/nAsovxxS/WvyF19IMQNAL0StzN+2PgrTVM5DT1 2AR9MbLtHDDdh/h4WQiWQR30qOYST8L90YP127TVxlK6bmtjzoyOB4zT327SBFvW/mch yO6we9yuU+IftX9tyaU8X9pFjMNqzULtMEw15ICuvEVkyJzqaIWM4Uklw0iZUEjCS1Pi Ynxs75OOImycdPWX4SFVD6aGCrciQkAZpKzIQB4QQPVUq5k2ot8GlOOvDZPQ4ElxcMCF VGqTNnujN1VtVWwlx7/F+iar9RWR77KNavfPRgTppanKOAQoZdl6OLr+73f3zmPbWFIm CoyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RIOhP/plEKcHCOfig1ZVQ8S0r9mcnrr4MfMMmEiuZN8=; b=bGwu3LKTdzoe6HFc17V5MAHlEyqufQAwnkLTUOFox8/prRS6Lg09K7KeIgO6yoiqrs LsvlqG8cMkwr3dHM7XTIs3XzOWIFvvceGuutyr/SfewNZfATgUBF5zEHO7hyOhcCqzLH ytldJA9X2wWSBydo6wK8NZxs5LDUqBJlMyXc8c/ZWjb+4QyX8ndTdU9obAzdHstdL1Vw jiES5ZYS3IKfHzjK39xprTj5gFlecxWHI8fufq8nct4iIAz4d+Vk6N8T4sroqfslpKSN 989jOpETA7hNBM45tfauVcxUiwvOxij3hT+syzbcyqSaOu0wGF+fE+H4huKrsgfPQJvZ jGxQ== X-Gm-Message-State: APjAAAXWpUDEGoEvTver9y+09emVmqOEtPD/g2lqLqShO01O9mkWJzg5 d6fGt/Twb+Zi2nffOnNo5Oys25UU+hvCsA== X-Google-Smtp-Source: APXvYqyPxI5YQgC39C8OnALWXLa+0UNP6SAi5lMH/fvk7lF+wXhDpWY/CbXQvdLvKZfLMnAk0p+DiA== X-Received: by 2002:a7b:cae2:: with SMTP id t2mr67965088wml.157.1563881910735; Tue, 23 Jul 2019 04:38:30 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 23 Jul 2019 13:37:44 +0200 Message-Id: <20190723113744.30009-3-stamatis.iliass@gmail.com> In-Reply-To: <20190723113744.30009-1-stamatis.iliass@gmail.com> References: <20190723113744.30009-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 23 Jul 2019 11:38:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 23 Jul 2019 11:38:32 +0000 (UTC) for IP:'209.85.128.67' DOMAIN:'mail-wm1-f67.google.com' HELO:'mail-wm1-f67.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.128.67 mail-wm1-f67.google.com 209.85.128.67 mail-wm1-f67.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] test_driver: implement virDomainPinEmulator X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 23 Jul 2019 11:38:38 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- src/test/test_driver.c | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 235d70f793..5411a97a5b 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2501,6 +2501,49 @@ static int testDomainSetMemory(virDomainPtr domain, } +static int +testDomainPinEmulator(virDomainPtr dom, + unsigned char *cpumap, + int maplen, + unsigned int flags) +{ + virDomainObjPtr vm =3D NULL; + virDomainDefPtr def =3D NULL; + virBitmapPtr pcpumap =3D NULL; + int ret =3D -1; + + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + goto cleanup; + + if (!(def =3D virDomainObjGetOneDef(vm, flags))) + goto cleanup; + + if (!(pcpumap =3D virBitmapNewData(cpumap, maplen))) + goto cleanup; + + if (virBitmapIsAllClear(pcpumap)) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("Empty cpu list for pinning")); + goto cleanup; + } + + virBitmapFree(def->cputune.emulatorpin); + def->cputune.emulatorpin =3D NULL; + + if (!(def->cputune.emulatorpin =3D virBitmapNewCopy(pcpumap))) + goto cleanup; + + ret =3D 0; + cleanup: + virBitmapFree(pcpumap); + virDomainObjEndAPI(&vm); + return ret; +} + + static int testDomainGetEmulatorPinInfo(virDomainPtr dom, unsigned char *cpumaps, @@ -7790,6 +7833,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainCoreDump =3D testDomainCoreDump, /* 0.3.2 */ .domainCoreDumpWithFormat =3D testDomainCoreDumpWithFormat, /* 1.2.3 */ .domainSetUserPassword =3D testDomainSetUserPassword, /* 5.6.0 */ + .domainPinEmulator =3D testDomainPinEmulator, /* 5.6.0 */ .domainGetEmulatorPinInfo =3D testDomainGetEmulatorPinInfo, /* 5.6.0 */ .domainSetVcpus =3D testDomainSetVcpus, /* 0.1.4 */ .domainSetVcpusFlags =3D testDomainSetVcpusFlags, /* 0.8.5 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list