2018-06-01 09:24+0800, Wanpeng Li: > On Fri, 1 Jun 2018 at 00:55, Jim Mattson <jmattson@xxxxxxxxxx> wrote: > > > > From: Eric Northup <digitaleric@xxxxxxxxxx> > > > > Return L2 cache and TLB information to guests. > > They could have been set before, but the defaults that KVM returns will be > > necessary for usermode that doesn't supply their own CPUID tables. > > > > Signed-off-by: Eric Northup <digitaleric@xxxxxxxxxx> > > Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx> > > --- > > I boot a guest w/ -smp 8, sockets=1, cores=4, threads=2 -cpu host on a > haswell client w/ and w/o the patch, what can be observed in the guest > is the same. That is because QEMU uses "host-cache-info" option for direct CPUID read if it wants to fill in the host values. Not sure why the host cpu model doesn't imply it. Other userspaces might rely on KVM as we already pass through other cache information, Reviewed-by: Radim Krčmář <rkrcmar@xxxxxxxxxx>