It appears your magnolia tree has suffered a serious injury at some point. There isn’t really anything you can do at this point. A wound that severe is going to affect the trees life span substantially, but for now the tree is doing it’s normal thing to cope.
A tree will seal over a small cavity eventually, and the tree’s new wood is stronger than anything put into the hole. Large cavities may never close, but as long as the tree does not sustain further damage, a basal cavity may not be a problem.
Your only course of action is to be sure the tree receives its cultural needs met--moisture, sun, etc. and prevent any further damage. It's a wait-and-see approach. The link below will give you information on trunk wounds and inner decay.