The embodiment of the invention provides a method and device for controlling an operating
virtual machine. The method includes the steps that in the operating process of a first
virtual machine at this time, when the first
virtual machine needs to have access to a first register in a
control register, a status bit of a
host machine is read, and a status value of the
host machine is obtained; when it is determined that the
host machine is in the non-kernel status according to the status value of the host
machine, a status bit of the first virtual
machine is read, and a status value of the first virtual
machine is obtained; when it is determined that the first virtual machine is in the kernel status according to the status value of the virtual machine, the first virtual machine is controlled to have access to the first register. By the adoption of the method and device for controlling the operating virtual machine, the
control register access process of the virtual machine is optimized, the number of shutdown and restart, caused by access to the
control register, of the virtual machine is reduced, and performance expenditure of the host machine is lowered.