I'm running two separate instances of SQL Server 2012 in a VM that has 8 cores. How do I tell each instance to use only 2 cores (or any number) to be compliant with the per core licensing model?

Is the Affinity Mask setting used for this purpose?

I'm guessing this is not possible and that I would have to license the entire 8 cores whether or not they're used but need a confirmation. 

Thanks,
Ali