Optimizing Software-Hardware Interplay In Efficient Virtual Machines