qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v7 2/6] pcie/aer: helper functions for pcie aer


From: Isaku Yamahata
Subject: [Qemu-devel] Re: [PATCH v7 2/6] pcie/aer: helper functions for pcie aer capability
Date: Mon, 15 Nov 2010 16:35:12 +0900
User-agent: Mutt/1.5.19 (2009-01-05)

On Tue, Nov 02, 2010 at 02:57:12PM +0200, Michael S. Tsirkin wrote:
> > +    pcie_add_capability(dev, PCI_EXT_CAP_ID_ERR, PCI_ERR_VER,
> > +                        offset, PCI_ERR_SIZEOF);
> > +    exp = &dev->exp;
> > +    exp->aer_cap = offset;
> > +    if (dev->exp.aer_log.log_max == PCIE_AER_LOG_MAX_UNSET) {
> > +        dev->exp.aer_log.log_max = PCIE_AER_LOG_MAX_DEFAULT;
> > +    }
> > +    if (dev->exp.aer_log.log_max > PCIE_AER_LOG_MAX_MAX) {
> > +        dev->exp.aer_log.log_max = PCIE_AER_LOG_MAX_MAX;
> > +    }
> 
> So someone should set log_max beforehand? And an illegal value is
> rounded down?  How is this API supposed to be used?

It's qdev property. If log_max is too big, should it return error
instead of silently rounding down?

-- 
yamahata



reply via email to

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