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

Re: [Xen-devel] [PATCH v2 07/15] x86: implement set value flow for MBA



On 17-08-31 10:30:37, Roger Pau Monn� wrote:
> On Thu, Aug 31, 2017 at 05:13:08PM +0800, Yi Sun wrote:
> > On 17-08-31 09:30:47, Roger Pau Monn� wrote:
> > > On Thu, Aug 31, 2017 at 10:20:10AM +0800, Yi Sun wrote:
> > > > On 17-08-30 09:31:04, Roger Pau Monn� wrote:
> > > > > On Thu, Aug 24, 2017 at 09:14:41AM +0800, Yi Sun wrote:
> > > > Even user inputs a value that does not fulfill HW requirement, HW can 
> > > > handle it.
> > > > So, we do not need return error to user. Otherwise, user needs to know 
> > > > details
> > > > of MBA.
> > > > 
> > > > But the issue here is how we get the actual value and show it to user. 
> > > > There are
> > > > two ways to do that:
> > > > 1. When setting value, check and change it to valid one and save it to 
> > > > our cache.
> > > 
> > > Instead of performing those checks manually, why not simply write the
> > > value and read it back to see the one the hardware has actually
> > > chosen (and cache it)?
> > > 
> > So, I guess you prefer optioin 2, right? If so, do we need check if input 
> > value
> > is valid? I see above comment that you prefer to return an error and leave 
> > the
> > decision to user.
> 
> Yes, I think so. Is reading the MSR in any performance critical path?
> Or it's just used by the user-space tools?
> 
Just used by user-space tools.

> > > Is there any risk in writing an invalid value?
> > 
> > If input value is no more than the thrtl_max got through CPUID, it is fine 
> > that
> > HW can handle it.
> 
> OK, so I would just check for that then.
> 
Ok, will check this only in 'check_val' function.

> Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.