[CRIU] [PATCH 2/2] cpu: Add 'ins' mode to --cpu-cap option
Cyrill Gorcunov
gorcunov at gmail.com
Thu Dec 25 10:39:24 PST 2014
On Thu, Dec 25, 2014 at 09:32:37PM +0300, Pavel Emelyanov wrote:
> >>
> >> Is that correct?
> >> What's the difference between "all" and "cpu"?
> >
> > all stands for any possible combination (even if
> > we will need some new ones in future). At the moment
> > all and cpu are meaning the same.
>
> Really? AFAIU "all" == "cpu" + "fpu" + "ins" :)
fpu = fxsave/xsave instructions
cpu = fxsave/xsave + all instructions + a number of additional features
all = cpu (now)
> >> Does "ins" include "fpu"?
> >
> > yes, because fpu state might be saved with various instructions
> > (fxsave,xsave and etc). That said "ins" mode is like relaxed
> > cpu/all mode where only particular bits should be matched.
> >
> >> Can we request for "all caps should be equal or better"?
> >
> > Exactly what is happening in this series.
> > Look, we've a mask for all known instructions flags
>
> These two statements contradicts each other. Either we check for
> _all_ bits to be not less, or only _known_ ones. So what do we do?
Look, letme try to explain again, we've x86_ins_capability_mask
which has a set of bits which are related to instructions. But
it's just a mask which will allow us to extract needed bits from
runtime cpu and ones saved in image.
Then we apply this mask to caps of destination and source,
then via simple (source ^ ~destination) we check that source
at least no less capable than destination.
>
> > x86_ins_capability_mask, then we test if destination
> > supports all of source instructions
More information about the CRIU
mailing list