From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] mask out clflush Date: Thu, 10 Jul 2008 16:34:18 +0300 Message-ID: <48760FDA.80401@qumranet.com> References: <1215541784-26539-1-git-send-email-gcosta@redhat.com> <200807101843.57902.sheng.yang@intel.com> <48760EE6.1070303@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Yang, Sheng" , kvm@vger.kernel.org, Glauber Costa , glommer@gmail.com To: Anthony Liguori Return-path: Received: from il.qumranet.com ([212.179.150.194]:13558 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753544AbYGJNeU (ORCPT ); Thu, 10 Jul 2008 09:34:20 -0400 In-Reply-To: <48760EE6.1070303@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > Yang, Sheng wrote: >> On Wednesday 09 July 2008 02:29:44 Glauber Costa wrote: >> >>> clflush is a non-privileged instruction that flushes the cacheline >>> given by its parameter, in terms of linear address. As it is >>> non-privileged, it is quite tricky, because a guest doing clflush >>> will actually be trying to flush a host kernel address. >>> >> >> The linear address was convert to host physical address, then cache >> line was flushed. Of course the host physical address was used by >> guest at the time. I don't understand why we need to prevent guest >> from flushing cache line related to itself... >> > > The problem turned out to be that we aren't emulating clflush in > x86_emulate. > Why would clflush trap? Is it called from real mode? -- error compiling committee.c: too many arguments to function