From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: remove vcpu's CPL check in host invoked vcpu's xcr set process Date: Mon, 17 Jun 2013 17:38:50 +0200 Message-ID: <51BF2D8A.10005@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: KVM , "mst@redhat.com" , Luonengjun , Zanghongyong , "Huangweidong (C)" , "Wangrui (K)" To: "Zhanghaoyu (A)" Return-path: Received: from mail-we0-f170.google.com ([74.125.82.170]:57042 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751452Ab3FQPi4 (ORCPT ); Mon, 17 Jun 2013 11:38:56 -0400 Received: by mail-we0-f170.google.com with SMTP id w57so2527804wes.29 for ; Mon, 17 Jun 2013 08:38:55 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 14/06/2013 09:36, Zhanghaoyu (A) ha scritto: > __kvm_set_xcr function does the CPL check when set xcr. __kvm_set_xcr is called in two flows, > one is invoked by guest, call stack shown as below, > handle_xsetbv(or xsetbv_interception) > kvm_set_xcr > __kvm_set_xcr > the other one is invoked by host(QEMU), call stack shown as below, > kvm_arch_vcpu_ioctl > kvm_vcpu_ioctl_x86_set_xcrs > __kvm_set_xcr > > The former does need the CPL check, but the latter does not. > > Signed-off-by: Zhang Haoyu What does this patch fix? I suppose it is some kind of migration problem since you mentioned QEMU, but I'd rather be sure. I can fix the commit message myself when applying. Thanks, Paolo