From patchwork Tue Aug 27 13:41:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 2850194 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ABDBABF546 for ; Tue, 27 Aug 2013 13:42:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3E212037D for ; Tue, 27 Aug 2013 13:42:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D35B20375 for ; Tue, 27 Aug 2013 13:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753154Ab3H0Nm0 (ORCPT ); Tue, 27 Aug 2013 09:42:26 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:62420 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957Ab3H0Nl4 (ORCPT ); Tue, 27 Aug 2013 09:41:56 -0400 Received: by mail-wg0-f45.google.com with SMTP id n12so4153965wgh.24 for ; Tue, 27 Aug 2013 06:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=oeZdKkK6D/GKugPBYiD+frHFhDrahZhQT+KGtFgKD9Y=; b=dd3idnbcsVIeUwh7OuDwD1CX8hJn+CbZn28wDysg+Qd3v07kJ+BfiO958Mmkm/BrsY Ai5Ij1c19I3XlJbf5orzHriMsivO0wgGsjiP9e4nOBskoFArIByHbMdEfEM4FbzjR/tZ ug/+kduwihyb4BkRDPc8q1sqnQpl/IxuQUPbmYJXJ/dht1ELwOL13uCQ2T+23pW4ADdD aERPUEZt6jA4GdzpLGKJ8zcv3KKfEoSZwaWSiqH5NAMTKGzVPpIdeCH/W2YQqbGow8/v DaqwjXFWvfh39OQ6cj7C1egfGR9OS5O7ulT9GBxpxGsuqyxh3GtQJHLKNtfzA8iNd4JE YVqw== X-Received: by 10.180.75.15 with SMTP id y15mr11615118wiv.12.1377610914759; Tue, 27 Aug 2013 06:41:54 -0700 (PDT) Received: from playground.lan (net-37-117-144-28.cust.dsl.vodafone.it. [37.117.144.28]) by mx.google.com with ESMTPSA id mw9sm15150062wic.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 27 Aug 2013 06:41:53 -0700 (PDT) From: Paolo Bonzini To: linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, gnatapov@redhat.com Subject: [PATCH 2/3] KVM: vmx: count exits to userspace during invalid guest emulation Date: Tue, 27 Aug 2013 15:41:42 +0200 Message-Id: <1377610903-12356-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1377610903-12356-1-git-send-email-pbonzini@redhat.com> References: <1377610903-12356-1-git-send-email-pbonzini@redhat.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These will happen due to MMIO. Suggested-by: Gleb Natapov @gleb@redhat.com> Signed-off-by: Paolo Bonzini --- arch/x86/kvm/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 57b4e12..1f1da43 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -5485,6 +5485,7 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu) err = emulate_instruction(vcpu, EMULTYPE_NO_REEXECUTE); if (err == EMULATE_USER_EXIT) { + ++vcpu->stat.mmio_exits; ret = 0; goto out; }