Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5100785imm; Tue, 26 Jun 2018 06:01:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLzdIIkyVeOVwR6v63wxdhf0OWRi4XsuZK3Jtajoub2fMcyajtwNCpVUl+qFK7DLfghCYoS X-Received: by 2002:a17:902:a9ca:: with SMTP id b10-v6mr1529927plr.275.1530018090567; Tue, 26 Jun 2018 06:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530018090; cv=none; d=google.com; s=arc-20160816; b=nOJLfXOO8pvjaDPywCaAx5o8NjsW/fNf8tTUpz7Mgzh7hloAq/7CjeOl/pvN9JyHQL M0Cao1H//vYTnbw5yLVG0GI0sZILE5E2G8GQzwbM597GLgRyRsWJwcIM27bsOsaBEVMd iczI4wNCnInTjESIq6zRf8c0z6Wm1vHDOaE+9ob5YDbJqe6BHay8KqxrMKK7Qpo4kwVq Xg8cgIMDcEawku1HoUiS9V9C7k1mshuTTlhqnsUba60tdDM0HtNbprYwmMfEAN1/Zmzu 9vcJ662NSMYHekUtUDOcQ+in9p+dUq+ODm5ssQgL56XfM26Q8aHBPFXKi3RWxw/wliq2 F/Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=CSrVdAsoWRS9WDnWpp4YvwqD5yWqFKwe2S5B8SRpWwU=; b=dmUmJ1E1YpuL5QA2OmJNN9MxfvpbuQQq7D6J1OeIzjdEZU5xVsJYxPOYFqFE6icvrk TlDlfEOFKdDnCiGGjiDrzOs3OmWcgGODawYYYh2mVAXv20o1KWcbEopWQdPAeKQWCkST gkRB+x7NFCpzSlzaSfn7VKUKFGtwtwVUWjcwa+4uMogf/nqA3R3MZqsaMuBj5o3/CctA v2MiOjHr0TexZYExQj+XsqT4gDS0rIAAbImvK3pZipuNws+nXvhpSRboNnD6rq2OIFki x34ilv4IcPXef/r9Gzi+4P5ZxoFD9rD4+DwI9Gaata9l1LqFKYUjaGtAacHbes7neiJH 3gvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=evOhmuTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12-v6si1642633pfd.52.2018.06.26.06.01.15; Tue, 26 Jun 2018 06:01:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=evOhmuTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965179AbeFZNAb (ORCPT + 99 others); Tue, 26 Jun 2018 09:00:31 -0400 Received: from m50-138.163.com ([123.125.50.138]:48354 "EHLO m50-138.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964940AbeFZNAa (ORCPT ); Tue, 26 Jun 2018 09:00:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=CSrVdAsoWRS9WDnWpp 4YvwqD5yWqFKwe2S5B8SRpWwU=; b=evOhmuTNI/XcVP6KYwQ9g3BDp1fIOjTkCn DbRXE7mXC0DZ3nNWU7q/R0uCzGBA9GIPg3Ga+vBBYiXjy9OzQ2wZNNnvuDKXlxLf 8fRJHsyUPQ74/hBiQ/gj21MzKrtlnR10sayvPh8Z6u4NzTUbHowN5IuABPq04a45 ypcnmUcHI= Received: from localhost.localdomain (unknown [61.167.60.250]) by smtp1 (Coremail) with SMTP id C9GowAB3v4_VODJbZyY8BQ--.479S2; Tue, 26 Jun 2018 21:00:05 +0800 (CST) From: LiuYang To: avi@redhat.com Cc: mtosatti@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, LiuYang Subject: [PATCH] KVM: VMX: modify macro definition 'R' to 'R ' because of gcc-5+ Date: Tue, 26 Jun 2018 20:59:48 +0800 Message-Id: <1530017988-8026-1-git-send-email-yiqiaoxihui@163.com> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: C9GowAB3v4_VODJbZyY8BQ--.479S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxZFyUtrW3JFy3ury3KF15urg_yoWrWr1fpr WfCF42kw4rtF15J3W7Xr13KFZrX3WfCr13Xr9IkF45Gr98Gr1xGr10kFnYk345XFW8Z3Z3 AF15ZFyq9r45Z37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UvApOUUUUU= X-Originating-IP: [61.167.60.250] X-CM-SenderInfo: 51ltxtxr0lx3rl6rljoofrz/1tbiTBVxSlSIZ5AhRAAAss Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GCC 5.4.0 enables raw strings by default and they have higher priority than macros, thus R is interpreted incorrectly. Fix it by putting a space between macro R and a string literal. Signed-off-by: LiuYang --- arch/x86/kvm/vmx.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d48ec60..3e4ffaa 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -4169,30 +4169,30 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) asm( /* Store host registers */ - "push %%"R"dx; push %%"R"bp;" - "push %%"R"cx \n\t" /* placeholder for guest rcx */ - "push %%"R"cx \n\t" - "cmp %%"R"sp, %c[host_rsp](%0) \n\t" + "push %%"R "dx; push %%"R "bp;" + "push %%"R "cx \n\t" /* placeholder for guest rcx */ + "push %%"R "cx \n\t" + "cmp %%"R "sp, %c[host_rsp](%0) \n\t" "je 1f \n\t" - "mov %%"R"sp, %c[host_rsp](%0) \n\t" + "mov %%"R "sp, %c[host_rsp](%0) \n\t" __ex(ASM_VMX_VMWRITE_RSP_RDX) "\n\t" "1: \n\t" /* Reload cr2 if changed */ - "mov %c[cr2](%0), %%"R"ax \n\t" - "mov %%cr2, %%"R"dx \n\t" - "cmp %%"R"ax, %%"R"dx \n\t" + "mov %c[cr2](%0), %%"R "ax \n\t" + "mov %%cr2, %%"R "dx \n\t" + "cmp %%"R "ax, %%"R "dx \n\t" "je 2f \n\t" - "mov %%"R"ax, %%cr2 \n\t" + "mov %%"R "ax, %%cr2 \n\t" "2: \n\t" /* Check if vmlaunch of vmresume is needed */ "cmpl $0, %c[launched](%0) \n\t" /* Load guest registers. Don't clobber flags. */ - "mov %c[rax](%0), %%"R"ax \n\t" - "mov %c[rbx](%0), %%"R"bx \n\t" - "mov %c[rdx](%0), %%"R"dx \n\t" - "mov %c[rsi](%0), %%"R"si \n\t" - "mov %c[rdi](%0), %%"R"di \n\t" - "mov %c[rbp](%0), %%"R"bp \n\t" + "mov %c[rax](%0), %%"R "ax \n\t" + "mov %c[rbx](%0), %%"R "bx \n\t" + "mov %c[rdx](%0), %%"R "dx \n\t" + "mov %c[rsi](%0), %%"R "si \n\t" + "mov %c[rdi](%0), %%"R "di \n\t" + "mov %c[rbp](%0), %%"R "bp \n\t" #ifdef CONFIG_X86_64 "mov %c[r8](%0), %%r8 \n\t" "mov %c[r9](%0), %%r9 \n\t" @@ -4203,7 +4203,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) "mov %c[r14](%0), %%r14 \n\t" "mov %c[r15](%0), %%r15 \n\t" #endif - "mov %c[rcx](%0), %%"R"cx \n\t" /* kills %0 (ecx) */ + "mov %c[rcx](%0), %%"R "cx \n\t" /* kills %0 (ecx) */ /* Enter guest mode */ "jne .Llaunched \n\t" @@ -4212,15 +4212,15 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) ".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t" ".Lkvm_vmx_return: " /* Save guest registers, load host registers, keep flags */ - "mov %0, %c[wordsize](%%"R"sp) \n\t" + "mov %0, %c[wordsize](%%"R "sp) \n\t" "pop %0 \n\t" - "mov %%"R"ax, %c[rax](%0) \n\t" - "mov %%"R"bx, %c[rbx](%0) \n\t" + "mov %%"R "ax, %c[rax](%0) \n\t" + "mov %%"R "bx, %c[rbx](%0) \n\t" "pop"Q" %c[rcx](%0) \n\t" - "mov %%"R"dx, %c[rdx](%0) \n\t" - "mov %%"R"si, %c[rsi](%0) \n\t" - "mov %%"R"di, %c[rdi](%0) \n\t" - "mov %%"R"bp, %c[rbp](%0) \n\t" + "mov %%"R "dx, %c[rdx](%0) \n\t" + "mov %%"R "si, %c[rsi](%0) \n\t" + "mov %%"R "di, %c[rdi](%0) \n\t" + "mov %%"R "bp, %c[rbp](%0) \n\t" #ifdef CONFIG_X86_64 "mov %%r8, %c[r8](%0) \n\t" "mov %%r9, %c[r9](%0) \n\t" @@ -4231,10 +4231,10 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) "mov %%r14, %c[r14](%0) \n\t" "mov %%r15, %c[r15](%0) \n\t" #endif - "mov %%cr2, %%"R"ax \n\t" - "mov %%"R"ax, %c[cr2](%0) \n\t" + "mov %%cr2, %%"R "ax \n\t" + "mov %%"R "ax, %c[cr2](%0) \n\t" - "pop %%"R"bp; pop %%"R"dx \n\t" + "pop %%"R "bp; pop %%"R "dx \n\t" "setbe %c[fail](%0) \n\t" : : "c"(vmx), "d"((unsigned long)HOST_RSP), [launched]"i"(offsetof(struct vcpu_vmx, launched)), @@ -4260,7 +4260,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)), [wordsize]"i"(sizeof(ulong)) : "cc", "memory" - , R"ax", R"bx", R"di", R"si" + , R "ax", R "bx", R "di", R "si" #ifdef CONFIG_X86_64 , "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" #endif -- 2.7.4