Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753343AbdCPT2B (ORCPT ); Thu, 16 Mar 2017 15:28:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33632 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103AbdCPT17 (ORCPT ); Thu, 16 Mar 2017 15:27:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5BA0C7302C Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mst@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5BA0C7302C Date: Thu, 16 Mar 2017 21:27:56 +0200 From: "Michael S. Tsirkin" To: "Gabriel L. Somlo" Cc: Radim =?utf-8?B?S3LEjW3DocWZ?= , 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 v5 untested] kvm: better MWAIT emulation for guests Message-ID: <20170316212635-mutt-send-email-mst@kernel.org> References: <20170316132426.GB4085@HEDWIG.INI.CMU.EDU> <20170316155550-mutt-send-email-mst@kernel.org> <20170316145819.GC4085@HEDWIG.INI.CMU.EDU> <20170316153517.GL14081@potion> <20170316160157.GN14081@potion> <20170316164749.GG4085@HEDWIG.INI.CMU.EDU> <20170316192622-mutt-send-email-mst@kernel.org> <20170316174149.GK4085@HEDWIG.INI.CMU.EDU> <20170316202024-mutt-send-email-mst@kernel.org> <20170316192440.GL4085@HEDWIG.INI.CMU.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170316192440.GL4085@HEDWIG.INI.CMU.EDU> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 16 Mar 2017 19:27:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1023 Lines: 35 On Thu, Mar 16, 2017 at 03:24:41PM -0400, Gabriel L. Somlo wrote: > On Thu, Mar 16, 2017 at 08:29:32PM +0200, Michael S. Tsirkin wrote: > > Let's take a step back and try to figure out how is > > mwait called. How about dumping code of VCPUs > > around mwait? gdb disa command will do this. > > Started guest with '-s', tried to attach from gdb with > "target remote localhost:1234", got > "remote 'g' packet reply is too long: " Try set arch x86-64:x86-64 > Tried typing 'cont' in the qemu monitor, got os x to crash: > > panic (cpu 1 caller 0xffffff7f813ff488): pmLock: waited too long, held > by 0xffffff7f813eff65 > > Hmm, maybe that's where it keeps its monitor/mwait idle loop. > Restarted the guest, tried this from monitor: > > dump-guest-memory foobar 0xffffff7f813e0000 0x20000 > > Got "'dump-guest-memory' has failed: integer is for 32-bit values" > > Hmmm... I have no idea what I'm doing anymore at this point... :) > > --G I think 0xffffff7f813ff488 is a PC. -- MST