From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Stupid Xen vs KVM question Date: Thu, 4 Dec 2014 21:24:20 -0500 Message-ID: <20141205022420.GA27661@konrad-lan.dumpdata.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm list , Rusty Russell To: Andy Lutomirski Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:47944 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751838AbaLECYh (ORCPT ); Thu, 4 Dec 2014 21:24:37 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Dec 04, 2014 at 02:59:48PM -0800, Andy Lutomirski wrote: > This code in arch/x86/kernel/entry_32.S is wrong: > > #ifdef CONFIG_PARAVIRT > /* > * The kernel can't run on a non-flat stack if paravirt mode > * is active. Rather than try to fixup the high bits of > * ESP, bypass this code entirely. This may break DOSemu > * and/or Wine support in a paravirt VM, although the option > * is still available to implement the setting of the high > * 16-bits in the INTERRUPT_RETURN paravirt-op. > */ > cmpl $0, pv_info+PARAVIRT_enabled > jne restore_nocheck > #endif > > On KVM guests, it notices that paravirt is enabled and bails. It > should work fine on KVM -- the condition it should be checking is > whether we have native segmentation. > > Do you know the right way to ask that? We could do a simple thing - which is that the paravirt_enabled could have the value 1 for Xen and 2 for KVM. The assembler logic would be inverted and just check for 1. I am not going to attempt to write the assembler code :-) > > Thanks, > Andy > > -- > Andy Lutomirski > AMA Capital Management, LLC