Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753613AbdCOUZr (ORCPT ); Wed, 15 Mar 2017 16:25:47 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:34602 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbdCOUZo (ORCPT ); Wed, 15 Mar 2017 16:25:44 -0400 Date: Wed, 15 Mar 2017 16:25:40 -0400 From: "Gabriel L. Somlo" To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Joerg Roedel , kvm@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v4] kvm: better MWAIT emulation for guests Message-ID: <20170315202539.GE2239@HEDWIG.INI.CMU.EDU> References: <1489605443-21045-1-git-send-email-mst@redhat.com> <20170315201348.GA14076@potion> <20170315202140.GD2239@HEDWIG.INI.CMU.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170315202140.GD2239@HEDWIG.INI.CMU.EDU> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2297 Lines: 72 On Wed, Mar 15, 2017 at 04:21:41PM -0400, Gabriel L. Somlo wrote: > > > > - do you see VM exits on the "hung" VCPU? > > how would I go about looking ? > > > - what is your CPU model? > > $ cat /proc/cpuinfo > ... > processor : 3 > vendor_id : GenuineIntel > cpu family : 6 > model : 15 > model name : Intel(R) Xeon(R) CPU 5150 @ 2.66GHz > stepping : 6 > microcode : 0xd2 > cpu MHz : 2659.966 > cache size : 4096 KB > physical id : 3 > siblings : 2 > core id : 0 > cpu cores : 2 > apicid : 6 > initial apicid : 6 > fpu : yes > fpu_exception : yes > cpuid level : 10 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm tpr_shadow dtherm > bugs : > bogomips : 5320.04 > clflush size : 64 > cache_alignment : 64 > address sizes : 36 bits physical, 48 bits virtual > power management: > > (this is 2x dual-core Xeon on a Mac Pro 1,1 -- all I had to spare for > testing, to avoid having to reboot my primary desktop :) Oh, in case you meant what I use on the qemu command line: qemu-system-x86_64 -enable-kvm -m 2048 -cpu core2duo \ -machine q35 -smp 4,cores=2 \ -device isa-applesmc,osk="...osk.value.from.smc.goes.here..." \ -usb -device usb-kbd -device usb-mouse \ -smbios type=2 -kernel ./chameleon_boot \ -device ide-drive,bus=ide.2,drive=MacHDD \ -drive id=MacHDD,if=none,snapshot=on,file=./mac_10.7.img \ -monitor stdio so, core2duo -- it's the only thing OS X 10.7 will find acceptable. > > > - what do you get after running this C program on host and guest? > > > > #include > > #include > > > > int main(void) { > > uint32_t eax = 5, ebx, ecx = 0, edx; > > asm ("cpuid" : "+a"(eax), "=b"(ebx), "+c"(ecx), "=d"(edx)); > > > > printf("eax=%#08x ebx=%#08x ecx=%#08x edx=%#08x\n", eax, ebx, ecx, edx); > > > > return 0; > > } > > eax=0x000040 ebx=0x000040 ecx=0x000003 edx=0x000020 > > HTH, > --G