qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC v2 3/9] s390x: chsc nt2 events are pci-only


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH RFC v2 3/9] s390x: chsc nt2 events are pci-only
Date: Wed, 19 Jul 2017 10:05:02 +0200

On Wed, 19 Jul 2017 09:57:47 +0200
Thomas Huth <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]