From the motogp site:
If Lorenzo wins the race then Rossi needs to finish second to become world champion.
If Lorenzo finishes second then Rossi needs to finish on the podium to become world champion.
If Lorenzo finishes third then Rossi needs to finish sixth or better to become world champion.
If Lorenzo finishes fourth then Rossi needs to finish ninth or better to become world champion.
If Lorenzo finishes fifth to ninth then Rossi needs to finish no more than six places further back to become world champion.
If Lorenzo finishes lower than ninth then Rossi will be world champion.
It’s going to be interesting.