From patchwork Mon Oct 31 23:48:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9406681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ADD8C60721 for ; Mon, 31 Oct 2016 23:49:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A026E28DEA for ; Mon, 31 Oct 2016 23:49:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94A7928E02; Mon, 31 Oct 2016 23:49:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F212D28D84 for ; Mon, 31 Oct 2016 23:49:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S947168AbcJaXtB (ORCPT ); Mon, 31 Oct 2016 19:49:01 -0400 Received: from mail.skyhub.de ([78.46.96.112]:54530 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933921AbcJaXtA (ORCPT ); Mon, 31 Oct 2016 19:49:00 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id s2r99YjU673b; Tue, 1 Nov 2016 00:48:57 +0100 (CET) Received: from pd.tnic (p5DDC4FE0.dip0.t-ipconnect.de [93.220.79.224]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 6886B1DA23E; Tue, 1 Nov 2016 00:48:57 +0100 (CET) Received: by pd.tnic (Postfix, from userid 1000) id 58AA1160C59; Tue, 1 Nov 2016 00:48:55 +0100 (CET) Date: Tue, 1 Nov 2016 00:48:55 +0100 From: Borislav Petkov To: Paul Bolle Cc: Andy Lutomirski , x86@kernel.org, linux-kernel@vger.kernel.org, Rusty Russell , Paolo Bonzini , Rik van Riel , kvm list Subject: Re: [PATCH 0/8] x86/fpu: Remove CR0.TS support Message-ID: <20161031234855.qu64eamohn35jdo4@pd.tnic> References: <1477953679.2230.7.camel@tiscali.nl> <20161031230431.ompl6s6k4fj3vcds@pd.tnic> <1477955448.2230.12.camel@tiscali.nl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1477955448.2230.12.camel@tiscali.nl> User-Agent: NeoMutt/20161014 (1.7.1) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Nov 01, 2016 at 12:10:48AM +0100, Paul Bolle wrote: > See https://lists.ozlabs.org/pipermail/lguest/2013-May/002001.html . > Nobody cared enough to fix it. I cared enough to figure it all out. But > I didn't understand much of the possible solutions that where suggested > three years ago. I'm guessing the simple fix would be this: --- --- but maybe the better fix is to hack in MSR emulation in lguest and intercept the *MSR accesses and do the writes/reads in the exception fixup and ... I haven't looked at the lguest code, of course and whether that's easily doable and whether it even makes sense and whether one should simply use qemu/kvm instead and, and, and... diff --git a/drivers/lguest/Kconfig b/drivers/lguest/Kconfig index 169172d2ba05..9c08b3050bb7 100644 --- a/drivers/lguest/Kconfig +++ b/drivers/lguest/Kconfig @@ -1,6 +1,6 @@ config LGUEST tristate "Linux hypervisor example code" - depends on X86_32 && EVENTFD && TTY && PCI_DIRECT + depends on X86_32 && EVENTFD && TTY && PCI_DIRECT && !MICROCODE select HVC_DRIVER ---help--- This is a very simple module which allows you to run