Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A771C43331 for ; Thu, 26 Mar 2020 09:20:56 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42E7E20719 for ; Thu, 26 Mar 2020 09:20:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42E7E20719 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jHOgs-0006il-J2; Thu, 26 Mar 2020 09:20:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jHOgr-0006iQ-Mm for xen-devel@lists.xenproject.org; Thu, 26 Mar 2020 09:20:41 +0000 X-Inumbo-ID: 0fd97e2c-6f43-11ea-bec1-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0fd97e2c-6f43-11ea-bec1-bc764e2007e4; Thu, 26 Mar 2020 09:20:41 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7E845AC0C; Thu, 26 Mar 2020 09:20:40 +0000 (UTC) To: Andrew Cooper References: <6fa81b4d-528d-5c33-50c5-a18396b4383a@suse.com> <01414205-1157-9d50-8d45-3e833b430c8e@suse.com> From: Jan Beulich Message-ID: <1bd9dd9e-7603-8332-6ad0-395e48e2cfe2@suse.com> Date: Thu, 26 Mar 2020 10:20:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Xen-devel] [PATCH v5 02/10] x86emul: support MOVDIRI insn X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "xen-devel@lists.xenproject.org" , Paul Durrant , Wei Liu , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 25.03.2020 21:58, Andrew Cooper wrote: > On 24/03/2020 12:29, Jan Beulich wrote: >> Note that SDM revision 070 doesn't specify exception behavior for >> ModRM.mod == 0b11; assuming #UD here. > > Didn't I confirm this behaviour for you last time around? Iirc you did, but the SDM still hasn't changed. Do you have a suggestion on alternative wording. >> @@ -10075,6 +10079,14 @@ x86_emulate( >> : "0" ((uint32_t)src.val), "rm" (_regs.edx) ); >> break; >> >> + case X86EMUL_OPC(0x0f38, 0xf9): /* movdiri mem,r */ >> + vcpu_must_have(movdiri); >> + generate_exception_if(dst.type != OP_MEM, EXC_UD); >> + /* Ignore the non-temporal behavior for now. */ >> + dst.val = src.val; >> + sfence = true; > > Looking again at the SDM, I'm not entirely sure this is good enough. > > Even on top of WB/WP mappings, it needs to have WC properties, knock > aliasing lines out of the cache, and ending up as a bus transaction. > > Also, I'm not convinced the current chunking algorithm for qemu which > repeatedly subdivides down to 1, is compatible with the misaligned > behaviour described, guaranteeing a split of two. Taking care of these two will be a significant amount of (re-)work of the HVM emulation layer. I'll see if I can come up with time and ideas on how to do this. Jan