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