Skip to contentSkip to conversation

vPCI: test harness adjustments

PATCH In review Jan Beulich 2 participants 6 messages May 31, 2023

lore
Share & tools
lore
#0 lore raw

cover vPCI: test harness adjustments

1: add test harness entry to ./MAINTAINERS
2: fix test harness build

Jan

#3 lore raw

PATCH 2/2 vPCI: fix test harness build

In reply to Jan Beulich

The earlier commit introduced two uses of is_hardware_domain().

Fixes 465217b0f872 ("vPCI: account for hidden devices")
tools/tests/vpci/emul.h +2 -0
@@ -82,6 +82,8 @@ typedef union {
 
 #define __hwdom_init
 
+#define is_hardware_domain(d) ((void)(d), false)
+
 #define has_vpci(d) true
 
 #define xzalloc(type) ((type *)calloc(1, sizeof(type)))
Acked-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] vPCI: fix test harness build

Quoted 5 lines · Jan Beulich

The earlier commit introduced two uses of is_hardware_domain().

Fixes 465217b0f872 ("vPCI: account for hidden devices")

We do rely on the compiler always removing the call to pci_get_pdev(dom_xen, ...) or AFAICT that would also trigger an error as there's no definition of dom_xen in this scope.

Thanks, Roger.

#5 lore raw

Re: [PATCH 2/2] vPCI: fix test harness build

Quoted 8 lines · Roger Pau Monné
Quoted 5 lines · Jan Beulich

The earlier commit introduced two uses of is_hardware_domain().

Fixes 465217b0f872 ("vPCI: account for hidden devices")

Thanks.

Quoted 3 lines

We do rely on the compiler always removing the call to pci_get_pdev(dom_xen, ...) or AFAICT that would also trigger an error as there's no definition of dom_xen in this scope.

Not really, no. The stub macro itself discards all its arguments:

#define pci_get_pdev(...) (&test_pdev)

Jan