On Mon, Dec 19, 2016 at 5:58 PM, Michal Suchanek <hramr...@gmail.com> wrote: > Hello, > > On 19 December 2016 at 10:09, Liu ping fan <kernelf...@gmail.com> wrote: >> Hi guys, >> >> I am using a pSeries. It runs on powerVM. >> My question is whether the cpuX under /sys/devices/system/cpu >> corresponds to a real cpu or not. >> I think it is not the same as the cpu on kvm-guest, which is emulated >> by a linux process. > > In general the hypervisor (powerVM or KVM) needs to disable access of > the guest to some CPU features in order to manage multiple guests. So > some CPU features are either disabled or emulated by the hypervisor to > prevent the guest from interfering with isolation of the guests from > each other and the host. On the other hand, emulating the whole CPU is > ineffective so to achieve reasonable guest speed it must run on a real > CPU most of the time. That means that in most cases the CPU you see in > the guest will have a subset of the features of the CPU the host sees. > Thank you for the explanation. And sorry not to explain my question clearly. I wonders about the mapping between guest-CPU and physical cpu. On powerVM, except the feature exposed by host, it is 1:1 map right?
> Some virtualization solutions allow to overcommit CPU time so you can > allocate more CPUs to guests than you physically have. Then when > running the guest will use an actual physical CPU but when it is > sleeping other guest may use the CPU. > Yes, agree. Thanks!