mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl: fix wrong mask of function number
Function number is 3 bits. So the mask should be 0x7 instead 0x3. Signed-off-by: Yang Zhang <yang.z.zhang@intel.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
83cd67d589
commit
c6386a7eec
1 file changed
+1
-1
@@ -48,7 +48,7 @@ static unsigned int pcidev_encode_bdf(libxl_device_pci *pcidev)
|
||||
value = 0;
|
||||
value |= (pcidev->bus & 0xff) << 16;
|
||||
value |= (pcidev->dev & 0x1f) << (8+3);
|
||||
value |= (pcidev->func & 0x3) << (8+0);
|
||||
value |= (pcidev->func & 0x7) << (8+0);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||