From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] kvm: x86: emulate monitor and mwait instructions as nop Date: Wed, 07 May 2014 21:53:17 +0200 Message-ID: <536A8F2D.4020305@redhat.com> References: <20140507181056.GD1655@ERROL.INI.CMU.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mst@redhat.com, afaerber@suse.de, agraf@suse.de To: "Gabriel L. Somlo" , kvm@vger.kernel.org Return-path: Received: from mail-ee0-f50.google.com ([74.125.83.50]:56996 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752254AbaEGTxY (ORCPT ); Wed, 7 May 2014 15:53:24 -0400 Received: by mail-ee0-f50.google.com with SMTP id e51so1097432eek.9 for ; Wed, 07 May 2014 12:53:22 -0700 (PDT) In-Reply-To: <20140507181056.GD1655@ERROL.INI.CMU.EDU> Sender: kvm-owner@vger.kernel.org List-ID: Il 07/05/2014 20:10, Gabriel L. Somlo ha scritto: > 1. I can't test svm.c (on AMD). As such, I'm not sure the > skip_emulated_instruction() call in my own version of nop_interception() > is necessary. If not, I could probably just call the already existing > nop_on_interception() (line 1926 or thereabouts in svm.c), which > just returns returns 1 without skipping anything. Yes, it's necessary. > 2. I get "defined but not used" warnings on invalid_op_interception() (svm.c) > and handle_invalid_op() (vmx.c). Apparently monitor/mwait are currently > the only VM exit reasons which lead to an "invalid opcode" exception. > Should my patch just nuke those functions (so that if anyone needs them > in the future they'd have to re-add them), or comment them out, or > call them after the "return 1;" statement in the monitor/mwait functions > to shut up gcc, or ??? :) Nuke it. :) Thanks for working on OS X virtualization, weird guests are always the source of interesting quirks! Paolo