Received: by 10.213.65.68 with SMTP id h4csp291801imn; Mon, 26 Mar 2018 22:04:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/k59dEahgSRMull6+RdzfRU4/fko8yrbI0Q4V9I57YcdQb9NDyYY9/zw3HGH5WTmFh3rwu X-Received: by 10.98.253.22 with SMTP id p22mr7835058pfh.217.1522127066273; Mon, 26 Mar 2018 22:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522127066; cv=none; d=google.com; s=arc-20160816; b=hU5o5U+UVEsjO3cCMKCicGWAYYLmucVGxkLxj88s7R5GlekC1JLd6HWQdqNMSBvOEi 7sZ1y2100yXdCacm0ux7wWMFImqjU1rvHZmwQrvopo4vKRFZNxO5YxD89ofkOQyLsCIc Y6mA0RnhzO2bUYFk7fWgTE/+2EOeZ8eZCZkf3zY/uFLGzIwWs07bsV1IbhIqxmcNfcsL zeDc9YDkCiADWpvOtaeT+ymAIHR1LgjIDaKVVZ1CuD6Zt9E2nkfMtd3R7yj/x6WzIBii K7yx3/mPw6Sa7pvXPZk47b6HQDZZJ3boklOAfSqHRj/j5U8+dnTtxsVUnXRgh9suY40w Dj0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=iVQ5HcOkPdONXJJSgAqSsb2tFSHKzZXt/60+Emb4y4s=; b=q80F9q9PUlVT8OxHCg78DbYEcmSsQnVD4xtpoYitJUzQeySY/zApJJGgEK0KU6lR1w 2T/iOnKzC27uGobDVdNbF271pE8cOqmJWoMSWBsB5qXLZ+EehRjARD1Owy7TrGQSc6BF AIDh/wIPBZqFBzb+gIjNkL89m6jJ1NaFM8+hEdZTh27TwYdglMO3Elhueigce/oel3vE aAk8zYAArooKb5f0QB9ECTdq+qtzY+O32m9oL+izK8+ps7n/Wj3p5iXufMGe+oOAGLBc cI9CXg5mcw9iZKYvecK4CI+yvKzyW51N7K7WpHqkBnS3pLcUPqUyVxl90yrqwlhpfT9M 6LoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pc5wlo4w; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a61-v6si464434pla.271.2018.03.26.22.04.11; Mon, 26 Mar 2018 22:04:26 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pc5wlo4w; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750954AbeC0FDS (ORCPT + 99 others); Tue, 27 Mar 2018 01:03:18 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:36577 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbeC0FDR (ORCPT ); Tue, 27 Mar 2018 01:03:17 -0400 Received: by mail-oi0-f68.google.com with SMTP id t16-v6so18121794oih.3; Mon, 26 Mar 2018 22:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iVQ5HcOkPdONXJJSgAqSsb2tFSHKzZXt/60+Emb4y4s=; b=pc5wlo4w02XUd4UYzTg2XZz4NMhwtLQVn83D7NjVeHS4yhEywqpTHWpuJuvxp7YcbQ WwGpZJ2RdurdSgusbqVh+8s7sVQlkGOcBSP2mc6g6vujUAV4fpgEekiDKzLNpA0hiQqv XhiiMqEeHEJQ+IIQ3/uxuq1NdE91EwY1Y3eH3KMG8Km9OG4kYJjBU/FrF/HNb0n6JvFD W3y54y8lK4FBGgq8ecd64q6E9WbOc+LTZUj1o4sGbnrE12/YeCYIq+hnrVO4vZlaeyC3 QptJ8OnUBodPOERbU3dvxuay4Za2MJZV8lCWZYSsCIc+A/M6enUuLj141/D7wAt0Jf8O ddXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=iVQ5HcOkPdONXJJSgAqSsb2tFSHKzZXt/60+Emb4y4s=; b=BxCufS4LLSMuATSTL/RRKQkkHicDgG2JPp05+QI0mt/MDlnwGyUvV1T1gchPUoMtyE H2Ok/Y/82OC3JvGPpBozEl3Itzs4Ye53E92RK4wlyJNiGR9xqFplnDsjNUJOFiQFME0S qnxYz8o1lhNjIG9X7tEUIZEUzAr7K+1ICDQKkG5gpuJu6FzVrugNDP65PLX6Xx14I7Le 6mbv6CXwrgy8kK1uhxy5yLauRgtCG4c92aoLxH5QhPGIN+O2S1uA36ZYfAZ2y8GYXncx i+9bqtlKWzXiO0qCl9936mLtnrljoqaTfk2Sowdoaf7fVceMDt8z46DeV82aLle1OrdE VYMQ== X-Gm-Message-State: AElRT7FGHTcTG8r4jDfRVP6kJRQgpjuVa1q4ymjUavAs9nLB1DF+FBYS Zv09D+zsgIMZqkGaz6xHcGEvDPB1uRD0Idz3USs= X-Received: by 10.202.76.5 with SMTP id z5mr138809oia.58.1522126996494; Mon, 26 Mar 2018 22:03:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.165.65 with HTTP; Mon, 26 Mar 2018 22:03:15 -0700 (PDT) In-Reply-To: <20180327045558.GC16974@char.us.oracle.com> 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> From: Wanpeng Li Date: Tue, 27 Mar 2018 13:03:15 +0800 Message-ID: Subject: Re: [PATCH 2/2] KVM: VMX: Add Force Emulation Prefix for "emulate the next instruction" To: Konrad Rzeszutek Wilk Cc: LKML , kvm , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Andrew Cooper Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-03-27 12:55 GMT+08:00 Konrad Rzeszutek Wilk : > On Tue, Mar 27, 2018 at 12:40:20AM -0400, Konrad Rzeszutek Wilk wrote: >> On Mon, Mar 26, 2018 at 07:12:15PM -0700, Wanpeng Li wrote: >> > From: Wanpeng Li >> > >> > This patch introduces a Force Emulation Prefix (ud2a; .ascii "kvm") for >> > "emulate the next instruction", the codes will be executed by emulator >> > instead of processor, for testing purposes. >> >> Can you expand a bit ? Why do you want this in KVM in the first place? Please refer to the original discussion(Force Emulation Prefix part). https://lkml.org/lkml/2018/3/22/220 >> Should this be controlled by a boolean parameter? > > .. per guest. That is instead of a global one, have a per guest one? As Paolo pointed out offline: > Testing without the hacks being done by emulator.flat (TLB mismatch between instructions and data). I think a global module is enough for testing. Regards, Wanpeng Li