If you are talking about using Pay With Miles (PWM) to upgrade and not Skymiles awards, then you will earn the full miles plus class-of-service bonus for both redeemable and Medallion Qualification Miles (MQM). For F travel, this is one of the few good deals left in the program. Using PWM for coach fares does not accrue any miles at all.
For Medallion Qualification Dollars (MQD), however, you will earn only for the ticket price less taxes and less PWM value used. So your $900 would be less $500 and then less taxes netting about high $200s to low $300s in MQD.
I've done this a couple of times for the exact same reason you are doing it.
Edited to add: This is for the 2014 rules. They have not made any statement about using PWM for F in the 2015 program.