Principles of homeostasis in governing virus activation and latency