In order to improve cache isolation performance and system performance in virtualization environment,this paper designs and implements a dynamic cache partitioning algorithm. It uses page coloring strategy to imple-ment cache partitioning,in which private color pages are allocated to virtual machine(VM) and cache capacity can be adjusted on demand. The paper implements the method in Xen virtualization environment. Experimental results show that the method can boost system performance for applications running concurrently on different VMs with low overhead.