[PATCH go v2] domain.go: wrong calculation of bitmask in PinVcpuFlags()

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

 



---
 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 []bool, flags DomainModification
 	ccpumap := make([]C.uchar, maplen)
 	for i := 0; i < len(cpuMap); i++ {
 		if cpuMap[i] {
-			byte := (i + 7) / 8
+			byte := i / 8
 			bit := i % 8
 			ccpumap[byte] |= (1 << uint(bit))
 		}
-- 
2.11.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux