Fix errornous negation for isstubdom, which breaks HVM pci-passthrough.
PATCH 1/1 Fix errornous negation for isstubdom, which breaks HVM pci-passthrough.
Commit 20b75251d9721d9c050a973c02baac396c794ade introduced an errornous negation which gave the isstubdom bool the opposite semantics, causing the subsequent code to take the wrong code path.
--- tools/libxl/libxl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_pci.c +1 -1
@@ -1001,7 +1001,7 @@ static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, iint irq, i, rc, hvm =0 ;uint32_t flag =XEN_DOMCTL_DEV_RDM_RELAXED ;uint32_t domainid = domid; -bool isstubdom = !libxl_is_stubdom (ctx, domid, &domainid); +bool isstubdom =libxl_is_stubdom (ctx, domid, &domainid);if (type ==LIBXL_DOMAIN_TYPE_INVALID )return ERROR_FAIL ;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Nice catch!
ACK from me, thought I don't know if it really counts ;)
--
Cedric
Quoted 19 lines · Sander Eikelenboom
Commit
20b75251d9721d9c050a973c02baac396c794adeintroduced an errornous negation which gave the isstubdom bool the opposite semantics, causing the subsequent code to take the wrong code path.Signed-off-by Sander Eikelenboom <[email protected]>---
tools/libxl/libxl_pci.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)tools/libxl/libxl_pci.c +1
-1@@ -1001,7 +1001,7 @@ static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, i int irq, i, rc, hvm = 0; uint32_t flag = XEN_DOMCTL_DEV_RDM_RELAXED; uint32_t domainid = domid; - bool isstubdom = !libxl_is_stubdom(ctx, domid, &domainid); + bool isstubdom = libxl_is_stubdom(ctx, domid, &domainid);
Quoted 3 lines
if (type ==LIBXL_DOMAIN_TYPE_INVALID)
returnERROR_FAIL;
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 3 lines · Cedric Bosdonnat
Nice catch!
ACK from me, thought I don't know if it really counts ;)
It does.
I will add your acked-by while committing.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 5 lines · Sander Eikelenboom
Commit
20b75251d9721d9c050a973c02baac396c794adeintroduced an errornous negation which gave the isstubdom bool the opposite semantics, causing the subsequent code to take the wrong code path.Signed-off-by Sander Eikelenboom <[email protected]>
Though I would like to shorten the title a bit. That is, I will move the clause "which ..." to the end of the commit log.
Commit 20b75251d9721d9c050a973c02baac396c794ade introduced an erroneous negation which gave the isstubdom bool the opposite semantics, causing the subsequent code to take the wrong code path, which breaks
...
Quoted 20 lines
--- tools/libxl/libxl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/libxl/libxl_pci.c +1
-1@@ -1001,7 +1001,7 @@ static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, iint irq, i, rc, hvm =0 ;uint32_t flag =XEN_DOMCTL_DEV_RDM_RELAXED ;uint32_t domainid = domid; -bool isstubdom = !libxl_is_stubdom (ctx, domid, &domainid); +bool isstubdom =libxl_is_stubdom (ctx, domid, &domainid);if (type ==LIBXL_DOMAIN_TYPE_INVALID )return ERROR_FAIL ;Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines · Wei Liu
Quoted 5 lines · Sander Eikelenboom
Commit
20b75251d9721d9c050a973c02baac396c794adeintroduced an errornous negation which gave the isstubdom bool the opposite semantics, causing the subsequent code to take the wrong code path.Signed-off-by Sander Eikelenboom <[email protected]>Acked-by Wei Liu <[email protected]>Though I would like to shorten the title a bit. That is, I will move the clause "which ..." to the end of the commit log.
Sure, thanks for taking care !
--
Sander
Quoted 20 lines
Commit
20b75251d9721d9c050a973c02baac396c794adeintroduced an erroneous negation which gave the isstubdom bool the opposite semantics, causing the subsequent code to take the wrong code path, which breaks
...Quoted 15 lines
--- tools/libxl/libxl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/libxl/libxl_pci.c +1
-1@@ -1001,7 +1001,7 @@ static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, iint irq, i, rc, hvm =0 ;uint32_t flag =XEN_DOMCTL_DEV_RDM_RELAXED ;uint32_t domainid = domid; -bool isstubdom = !libxl_is_stubdom (ctx, domid, &domainid); +bool isstubdom =libxl_is_stubdom (ctx, domid, &domainid);
Quoted 5 lines
Quoted 5 lines
tools/libxl/libxl_pci.c +0
-0if (type ==LIBXL_DOMAIN_TYPE_INVALID )return ERROR_FAIL ;Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel