From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbbIQP1Y (ORCPT ); Thu, 17 Sep 2015 11:27:24 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:34561 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752297AbbIQP1U (ORCPT ); Thu, 17 Sep 2015 11:27:20 -0400 MIME-Version: 1.0 In-Reply-To: <20150917151757.GM3816@twins.programming.kicks-ass.net> References: <20150917085807.GH3816@twins.programming.kicks-ass.net> <55FAA6AE.9050503@redhat.com> <20150917122750.GH3604@twins.programming.kicks-ass.net> <20150917151757.GM3816@twins.programming.kicks-ass.net> From: Andy Lutomirski Date: Thu, 17 Sep 2015 08:26:59 -0700 Message-ID: Subject: Re: [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops To: Peter Zijlstra Cc: Paolo Bonzini , xen-devel , Arjan van de Ven , "linux-kernel@vger.kernel.org" , X86 ML , KVM list Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2015 at 8:17 AM, Peter Zijlstra wrote: > On Thu, Sep 17, 2015 at 08:17:18AM -0700, Andy Lutomirski wrote: > >> > Ah, that would be good news. Andy earlier argued I could not rely on >> > rdmsr_safe() faulting on unknown MSRs. If practically we can there's >> > some code I can simplify :-) >> >> I was taking about QEMU TCG, not KVM. > > Just for my education, TCG is the thing without _any_ hardware assist? Yes. > The thing you fear to use because it cannot boot a kernel this side of > tomorrow etc.. ? I actually use it on a semi-regular basis. It appears to boot a normal kernel correctly and surprisingly quickly. It's important for a silly reason. Asking KVM on an Intel host to emulate an AMD CPU or vice versa results in a chimera: I get an Opteron that's "GenuineIntel", which causes Linux to treat it as Intel, which means it gets the Intel quirks (SYSENTER in long mode, no X86_BUG_SYSRET_SS_ATTRS, etc) instead of the AMD quirks (SYSCALL in compat mode, etc). So, if I want to test compat SYSCALL, I have to use TCG, which will actually do a decent job of emulating an AMD CPU for me. Maybe Paolo can fix QEMU to fail bad MSR accesses for real... --Andy -- Andy Lutomirski AMA Capital Management, LLC