Received: by 10.213.65.68 with SMTP id h4csp376493imn; Tue, 27 Mar 2018 00:26:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELvKYrIdwk1uYSmwEgbXT1CAHERH60UqY8EsY6C77lbdxMiXD7z0FC//lb+/X/H/6mKD3vuI X-Received: by 2002:a17:902:8308:: with SMTP id bd8-v6mr13361324plb.313.1522135584398; Tue, 27 Mar 2018 00:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522135584; cv=none; d=google.com; s=arc-20160816; b=zjSoJP173j4ev00FZ6ggnx0sAjq4dLJcpd9b7TzM4pt++elxZnEtjO+qhlmBDKufn6 UDQlyIbqWCOnOVFytSkLztVheF0BIkaAIZQla/oGH4izLrKKAmT2g2/FUTY/3NIEVJPk 2/NrHxzZ3lOSkX+oFl7weRQpbs75YZqpeutSBZSLskLAEMY16TNzu/Dd5YDsrxVzmZGU rygfMeYcYWkNO0790Ti0tMBPAZbO1Mq0XIWfHsiypyQunSAIudcSefA35+gveZxpsm0M 1M25n9t3dIwr1oHdDknZFBm47pp3r6zRfb4VPwh+i3Vb8ELhH7MSzhfoeWDALQDNizXo //Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=V6/2vHG9fa501XK1jdModcQW5eai0VPtONTcgMm+xcU=; b=LtWctN+eeio2jyKKIWIp90Jnn3dhfBMvz8sUf1sBA4YgvQiredrjnM6d5QUR8K2+dz mVK6U2/Kmn6GGGcyr/vjTaMnDdbB0j7UN4COmw7xXzJHXhzBo/Ng8pw5hnoIdxu/ciOF toiKmsNRmkCTGlXDmHs0XwRYaf7Qb6NMMDUkPyjb9FlTXGdPlR03K8IfKdFeK3X0iSYr GGe79C7el4EodZXAKdNVCyo0fW+TgDvBMnIWcokYLjRk8N+OtHkuKibPUb4x6oV8/4Kx UTSG4gYbn3clr9pJ6rmVQTLsmdyKR4JuyWvDDyTNvekQ+z/ZdNe0BFLypssYTJE0pmA6 nC7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17-v6si656909plz.303.2018.03.27.00.26.09; Tue, 27 Mar 2018 00:26:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751686AbeC0HZL (ORCPT + 99 others); Tue, 27 Mar 2018 03:25:11 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47650 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750913AbeC0HZJ (ORCPT ); Tue, 27 Mar 2018 03:25:09 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B3F8A200C; Tue, 27 Mar 2018 07:25:08 +0000 (UTC) Received: from [10.36.117.97] (ovpn-117-97.ams2.redhat.com [10.36.117.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5234011701C1; Tue, 27 Mar 2018 07:25:07 +0000 (UTC) Subject: Re: [PATCH 2/2] KVM: VMX: Add Force Emulation Prefix for "emulate the next instruction" To: Konrad Rzeszutek Wilk , Wanpeng Li Cc: LKML , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Andrew Cooper References: <1522116735-4861-1-git-send-email-wanpengli@tencent.com> <1522116735-4861-3-git-send-email-wanpengli@tencent.com> <20180327044020.GB16974@char.us.oracle.com> <20180327045558.GC16974@char.us.oracle.com> <20180327051840.GF16974@char.us.oracle.com> From: Paolo Bonzini Message-ID: <0ad9fff9-6ebb-2d63-5c9f-b9aba7d619ac@redhat.com> Date: Tue, 27 Mar 2018 09:25:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180327051840.GF16974@char.us.oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Mar 2018 07:25:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Mar 2018 07:25:08 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/03/2018 07:18, Konrad Rzeszutek Wilk wrote: >> I think a global module is enough for testing. > If so, perhaps have it wrapped with #ifdef DEBUG? > > No need to put code gadgets that won't be utilized 99% of time. It is going to be used a lot in testing, actually. There are quite a few emulate.c bugfixes that are hard to test (see for example the syscall eflags.tf bug that can currently be tested only on Intel) and having something like this can only improve our coverage. #ifdef DEBUG is almost always a bad idea, and though I agree that the commit messages can be improved, I think the module parameter is the way to go. Wanpeng, can you also add it to svm.c? Thanks, Paolo