On Wed, 19 Jul 2017 09:57:47 +0200
Thomas Huth <th...@redhat.com> wrote:

> Hmm, since you're having wrapper functions for these now anyway, I
> wonder whether it would be more elegant to make
> pci_chsc_sei_nt2_get_event() and pci_chsc_sei_nt2_have_event() function
> pointers in the S390pciState object instead. Then you could do something
> like:
> 
> static int chsc_sei_nt2_have_event(void)
> {
>     S390pciState *ps = s390_get_phb();
> 
>     if (s390_has_feat(S390_FEAT_ZPCI) && ps != NULL) {
>         return ps->pci_chsc_sei_nt2_have_event();
>     }
>     return 0;
> }
> 
> and you would not need the stubs in pci-stubs.c anymore?

Not really a fan. We would need to deal with a pci state in ioinst.c,
where IMO it doesn't really belong.

Reply via email to