diff mbox series

[2/2] vPCI: fix test harness build

Message ID 838c09e5-97ce-2d23-9d42-645a8925217d@suse.com (mailing list archive)
State New, archived
Headers show
Series vPCI: test harness adjustments | expand

Commit Message

Jan Beulich May 31, 2023, 1:19 p.m. UTC
The earlier commit introduced two uses of is_hardware_domain().

Fixes: 465217b0f872 ("vPCI: account for hidden devices")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Roger Pau Monné May 31, 2023, 1:51 p.m. UTC | #1
On Wed, May 31, 2023 at 03:19:56PM +0200, Jan Beulich wrote:
> The earlier commit introduced two uses of is_hardware_domain().
> 
> Fixes: 465217b0f872 ("vPCI: account for hidden devices")
> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

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.
Jan Beulich May 31, 2023, 2:02 p.m. UTC | #2
On 31.05.2023 15:51, Roger Pau Monné wrote:
> On Wed, May 31, 2023 at 03:19:56PM +0200, Jan Beulich wrote:
>> The earlier commit introduced two uses of is_hardware_domain().
>>
>> Fixes: 465217b0f872 ("vPCI: account for hidden devices")
>> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks.

> 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
diff mbox series

Patch

--- a/tools/tests/vpci/emul.h
+++ b/tools/tests/vpci/emul.h
@@ -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)))