From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbcFWQEa (ORCPT ); Thu, 23 Jun 2016 12:04:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbcFWQDH (ORCPT ); Thu, 23 Jun 2016 12:03:07 -0400 Subject: Re: [PATCH] KVM: nVMX: VMX instructions: fix segment checks when L1 is in long mode. To: Quentin Casasnovas , x86 , kvm , lkml References: <1466240465-19318-1-git-send-email-quentin.casasnovas@oracle.com> Cc: Eugene Korenevsky , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , linux-stable From: Paolo Bonzini Message-ID: <24080992-801c-4606-c801-65ee68cf8779@redhat.com> Date: Thu, 23 Jun 2016 18:03:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1466240465-19318-1-git-send-email-quentin.casasnovas@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 23 Jun 2016 16:03:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/06/2016 11:01, Quentin Casasnovas wrote: > Cross-checking the KVM/VMX VMREAD emulation code with the Intel Software > Developper Manual Volume 3C - "VMREAD - Read Field from Virtual-Machine > Control Structure", I found that we're enforcing that the destination > operand is NOT located in a read-only data segment or any code segment when > the L1 is in long mode - BUT that check should only happen when it is in > protected mode. > > Shuffling the code a bit to make our emulation follow the specification > allows me to boot a Xen dom0 in a nested KVM and start HVM L2 guests > without problems. That's great, and I'm applying the patch, but it's also pretty weird. :) Do you have a pointer to Xen source code that does a VMREAD into a read-only data segment or a code segment? Thanks, Paolo