From nobody Sat Apr 27 17:26:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 1488241694587857.180063048272; Mon, 27 Feb 2017 16:28:14 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1S0NQ06011711; Mon, 27 Feb 2017 19:23:27 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1S0NPYJ015371 for ; Mon, 27 Feb 2017 19:23:25 -0500 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1S0NPbe025545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 27 Feb 2017 19:23:25 -0500 Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) (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 99D894E4FC for ; Tue, 28 Feb 2017 00:23:24 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id r90so21071114qki.3 for ; Mon, 27 Feb 2017 16:23:23 -0800 (PST) Received: from localhost.localdomain (cpe-74-66-249-236.nyc.res.rr.com. [74.66.249.236]) by smtp.gmail.com with ESMTPSA id r186sm2284qke.26.2017.02.27.16.23.21 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 27 Feb 2017 16:23:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=podolny-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=kuiJwI8gxfzjH77gtmLesowYLIm6EDWgwvQuThNS8Fc=; b=WgLlmV/CSRXpeufjn9+vCLTDA0Dk8fhFkVTtoXvYW73iFGGjAvqqUwqfcWhDrSkWNf LQ/rqLvrVaH3j+O3/NvW0ScnFJE9vzruGEHAp4LqK4Oyect0I1AY/wsKTCR4vtkiCX8Z CLG3/xskM83c4D3lrd/+kyYPasZMBtiiF7r9B/a3+gZ9yrspk0E/PkXOg2+tpeOPesRi 0y2hZSeCwNvnpM/jW+7rc13DWP2I37JptEdsJhAmfeQsbi85hkIbfbPHqkhTS1zH75yr vj2sanUE9HR1X1iVRhDMwIhC/kzk+RWbj5++Gu4T1FA+r9BqoNGczFYfYAnQVXY3/wIt VKag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kuiJwI8gxfzjH77gtmLesowYLIm6EDWgwvQuThNS8Fc=; b=C0HX96h48kMRxLGgAgz0pW5sH9FklriJxLFiKqnsY313uhrChP/1DG9zmIXzuMyX46 eURxNxirFqkCP4NNs5dSbrviCG2fgB6NBTv7J/kRoPOYjWFWkPmRJ/r3Hk5MYeS/1Mjl Sbjn4aidSdNA2mL07mxzxuT61LpbgAsgLfw8G801VVQg0WxuSkbNLmgy9xnsUW0QjXEY kvAAJiSgV/2+PdbzNvq0iGCnRdxaxGStmYvhVStRIu1mJ/aRTmNcw8vv6MIOycUjdKO+ Xi4FocVcHwzp1yKeZFXQ9Z5YttyA8Zw2dGDQcn/fjD5KapGD6pDmKahvYss7eOyo/xKP f3HQ== X-Gm-Message-State: AMke39nfTl/F7dOwO4CluBkrlQ7dz6Jco+T6VBpZaFmI+igiYzgry6/Th5FRYsHCmumpog== X-Received: by 10.55.135.1 with SMTP id j1mr19990218qkd.107.1488241402550; Mon, 27 Feb 2017 16:23:22 -0800 (PST) From: Leonid Podolny To: libvir-list@redhat.com, berrange@redhat.com Date: Mon, 27 Feb 2017 19:23:12 -0500 Message-Id: <20170228002312.3798-1-leonid@podolny.net> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 28 Feb 2017 00:23:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 28 Feb 2017 00:23:24 +0000 (UTC) for IP:'209.85.220.195' DOMAIN:'mail-qk0-f195.google.com' HELO:'mail-qk0-f195.google.com' FROM:'leonid@podolny.net' RCPT:'' X-RedHat-Spam-Score: 1.27 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM) 209.85.220.195 mail-qk0-f195.google.com 209.85.220.195 mail-qk0-f195.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-loop: libvir-list@redhat.com Cc: Leonid Podolny Subject: [libvirt] [PATCH go v2] domain.go: wrong calculation of bitmask in PinVcpuFlags() 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- domain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain.go b/domain.go index 2bd9852..7276ef8 100644 --- a/domain.go +++ b/domain.go @@ -1768,7 +1768,7 @@ func (d *Domain) PinVcpuFlags(vcpu uint, cpuMap []boo= l, flags DomainModification ccpumap :=3D make([]C.uchar, maplen) for i :=3D 0; i < len(cpuMap); i++ { if cpuMap[i] { - byte :=3D (i + 7) / 8 + byte :=3D i / 8 bit :=3D i % 8 ccpumap[byte] |=3D (1 << uint(bit)) } --=20 2.11.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list