Re: [Qemu-devel] [PATCH] target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data

2016-06-14 Thread Chao Peng
On Tue, Jun 14, 2016 at 10:21:41AM +0200, Paolo Bonzini wrote: > > > On 14/06/2016 07:01, Chao Peng wrote: > >> > > >> > Which are the CPUID leaves for which KVM_GET_SUPPORTED_CPUID is not > >> > stateless? I cannot find any. > > I have though leaf 0xd, sub leaf 1 is not stateless, as the size

Re: [Qemu-devel] [PATCH] target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data

2016-06-14 Thread Paolo Bonzini
On 14/06/2016 07:01, Chao Peng wrote: >> > >> > Which are the CPUID leaves for which KVM_GET_SUPPORTED_CPUID is not >> > stateless? I cannot find any. > I have though leaf 0xd, sub leaf 1 is not stateless, as the size of > xsave buffer(EBX) is based on XCR0 | IA32_XSS. But after looking KVM > c

Re: [Qemu-devel] [PATCH] target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data

2016-06-13 Thread Chao Peng
On Mon, Jun 13, 2016 at 12:02:41PM +0200, Paolo Bonzini wrote: > > > On 13/06/2016 04:21, Chao Peng wrote: > > KVM_GET_SUPPORTED_CPUID ioctl is called frequently when initializing > > CPU. Depends on CPU features and CPU count, the number of calls can be > > extremely high which slows down QEMU b

Re: [Qemu-devel] [PATCH] target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 04:21, Chao Peng wrote: > KVM_GET_SUPPORTED_CPUID ioctl is called frequently when initializing > CPU. Depends on CPU features and CPU count, the number of calls can be > extremely high which slows down QEMU booting significantly. In our > testing, we saw 5922 calls with switches: >