Cydia

First of all, the good news is that according to CPICH - an iPhone DevTeam member - DevTeam has successfully upgraded an iPhone 3GS on OS 3.0, pwned previously, to OS 3.1 without loosing the jailbreak! That's a great news for those who have been desperately waiting to upgrade their 3GS but don't want to sacrifice the jailbreak for it.

However, the solution works ONLY for previously Pwned iPhone 3GS and NOT for the OOTB (out of the box) 3.1 or non-downgradeable ones (in case you didn't capture the iBSS and iBEC files)... This means that if you just bought the device, you're completely out of luck for some more weeks!

This new exploit will definitely be merged into the PwnageTool, which means no luck for Windows peeps as well.

P.S. There is no solution for unlocking the new baseband found in OS 3.1 but you can preserve the unlock while updating the iPhone to OS 3.1, once the jailbreak tools are available publicly.