Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757581AbcKCN66 (ORCPT ); Thu, 3 Nov 2016 09:58:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40146 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752152AbcKCN6y (ORCPT ); Thu, 3 Nov 2016 09:58:54 -0400 Date: Thu, 3 Nov 2016 14:58:50 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: kbuild test robot Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Bandan Das , Nadav Amit Subject: Re: [PATCH v2 4/4] KVM: x86: emulate FXSAVE and FXRSTOR Message-ID: <20161103135850.GD7771@potion> References: <20161102184537.29039-5-rkrcmar@redhat.com> <201611030741.7Je7TG1V%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201611030741.7Je7TG1V%fengguang.wu@intel.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 03 Nov 2016 13:58:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2696 Lines: 59 2016-11-03 07:58+0800, kbuild test robot: > Hi Radim, > > [auto build test ERROR on kvm/linux-next] > [also build test ERROR on v4.9-rc3 next-20161028] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] > [Check https://git-scm.com/docs/git-format-patch for more information] > > url: https://github.com/0day-ci/linux/commits/Radim-Kr-m/KVM-x86-emulate-FXSAVE-and-FXRSTOR/20161103-025333 > base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next > config: x86_64-randconfig-s2-11030650 (attached as .config) > compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 Oh well ... I dug out a RHEL6.9 machine with "gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)" and it doesn't compile either, but for a different reason: > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 CC [M] arch/x86/kvm/emulate.o arch/x86/kvm/emulate.c: Assembler messages: arch/x86/kvm/emulate.c:3931: Error: no such instruction: `fxsave64 -544(%rbp)' arch/x86/kvm/emulate.c:3990: Error: no such instruction: `fxrstor64 -528(%rbp)' make[1]: *** [arch/x86/kvm/emulate.o] Error 1 make: *** [_module_arch/x86/kvm] Error 2 so I wrote the REX.W manually, ".byte 48; fxsave %[fx]", and then the compilation succeeded: CC [M] arch/x86/kvm/emulate.o arch/x86/kvm/emulate.o: warning: objtool: read_sse_reg()+0xb6: function has unreachable instruction (The output was riddled with warnings about unreachable instructions.) > All errors (new ones prefixed by >>): > > arch/x86/kvm/emulate.c: In function 'em_fxsave': > >> arch/x86/kvm/emulate.c:3931: error: expected string literal before ')' token > arch/x86/kvm/emulate.c:3934: error: expected string literal before ')' token > arch/x86/kvm/emulate.c: In function 'fx_load_64bit_xmm': > arch/x86/kvm/emulate.c:3953: error: expected string literal before ')' token > arch/x86/kvm/emulate.c: In function 'em_fxrstor': > arch/x86/kvm/emulate.c:3990: error: expected string literal before ')' token > arch/x86/kvm/emulate.c:3994: error: expected string literal before ')' token > > vim +3931 arch/x86/kvm/emulate.c > > 3931 rc = asm_safe("fxsave64 %[fx]", , [fx] "+m"(fx_state) ::); Seems like it expects something in the clobber list ... maybe it would work with rc = asm_safe("fxsave %[fx]", , [fx] "+m"(fx_state)); I'll install old Debian and send a fix for both issues. The fix will drop emulation of protected modes, so we won't need the fxsave64 instruction.