Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3280150ybi; Sun, 26 May 2019 19:26:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzx6Ih4e0sqr4XRV3YcqmPXh2is39v7qYtfGzDGtPmtc0LXs7d9rsTESZaBoy02gzWPPznr X-Received: by 2002:a17:902:24e:: with SMTP id 72mr79419086plc.168.1558924011300; Sun, 26 May 2019 19:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558924011; cv=none; d=google.com; s=arc-20160816; b=DMpePsjQ2Z+sNCBpnf0PwDJELR48Jp+hbYQGwrVkX4wDtofKNT2OpBoIPkpgDEMaQd +kK/rnOxxlC4B4BMoo72yaRewkKTD6XSvCL+OMGYtIAy7Lv2jzjKH5m+gF4EcyyyUisE mfFTsMQ/bJ4PVVqbvcQRejms0ZljSV+N03MLslB82UtrNOcD8qtcvHUugriVufk3Ehfo s4ge82nC994WITuJmZZHZnzqttqQ9t8NxuggsAFP5Ggnbb/kc+QTkyqbJmAPoBJqSuae 2iMN8jVQADOY/rNnwCyhoVoWN5XOGKrB/N9B604IPkZ0c/EYt7lTZVEVG+RaMiwWgW1V WTtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=d37v/e4WFdxGvTFfh7ZfHmj9DlZQBQWXvDnb7EcL5/w=; b=P+HYwstju6B1XvaOOgp1xvPmgl36Ec1oXJ8BUkGI6yXM02fE2HuxLfymT5lgIQT95r Uf58r7rcuS8ouLpLtkIvB3qsnjoOS3GlSCCfdTVz0LAGD2HZT/nXuLEt0nc7XL/gvw7Y aCtmJ7McOzoe8KnWZ0qQESIu04X1AorxJAOLZVay7YFP7BOJcaAXRySFopWbw0kA9S2O ZWdyNzDT8tz0jAEqZB9nyqCQZGVcWqb3JLibC6SvM4ZXZm/kHUjZFefcasG3uNhh8UCR ZYjM/A9wsatSWGZKmU9/eoTeP0fejMlYiS+3CG+seZaZFvf3ILYl3nJ0x58QrHfL++Ty Q6Fg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b36si15421297pla.353.2019.05.26.19.26.35; Sun, 26 May 2019 19:26:51 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726068AbfE0CZE (ORCPT + 99 others); Sun, 26 May 2019 22:25:04 -0400 Received: from mga02.intel.com ([134.134.136.20]:3428 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbfE0CZE (ORCPT ); Sun, 26 May 2019 22:25:04 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 May 2019 19:25:03 -0700 X-ExtLoop1: 1 Received: from genxtest-ykzhao.sh.intel.com (HELO [10.239.143.71]) ([10.239.143.71]) by fmsmga001.fm.intel.com with ESMTP; 26 May 2019 19:25:02 -0700 Subject: Re: [PATCH v6 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, Jason Chen CJ References: <1556595926-17910-1-git-send-email-yakui.zhao@intel.com> <1556595926-17910-4-git-send-email-yakui.zhao@intel.com> <20190515172356.GL24212@zn.tnic> From: "Zhao, Yakui" Message-ID: <27c20325-61b7-994f-2781-f4bc41badc6f@intel.com> Date: Mon, 27 May 2019 10:21:20 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20190515172356.GL24212@zn.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019年05月16日 01:23, Borislav Petkov wrote: > On Tue, Apr 30, 2019 at 11:45:25AM +0800, Zhao Yakui wrote: >> @@ -30,6 +36,29 @@ static bool acrn_x2apic_available(void) >> return false; >> } >> >> +static void (*acrn_intr_handler)(void); >> + >> +__visible void __irq_entry acrn_hv_vector_handler(struct pt_regs *regs) >> +{ >> + struct pt_regs *old_regs = set_irq_regs(regs); >> + >> + /* >> + * The hypervisor requires that the APIC EOI should be acked. >> + * If the APIC EOI is not acked, the APIC ISR bit for the >> + * HYPERVISOR_CALLBACK_VECTOR will not be cleared and then it >> + * will block the interrupt whose vector is lower than >> + * HYPERVISOR_CALLBACK_VECTOR. >> + */ >> + entering_ack_irq(); Sorry for the late response. You are right. The "asm/apic.h" is missing. It will be added. Very sorry that this issue is not triggered as the used .config in my test doesn't enable the check of "-Werror=implict-function-declaration". > > arch/x86/kernel/cpu/acrn.c: In function ‘acrn_hv_vector_handler’: > arch/x86/kernel/cpu/acrn.c:52:2: error: implicit declaration of function ‘entering_ack_irq’; did you mean ‘spin_lock_irq’? [-Werror=implicit-function-declaration] > entering_ack_irq(); > ^~~~~~~~~~~~~~~~ > spin_lock_irq > arch/x86/kernel/cpu/acrn.c:58:2: error: implicit declaration of function ‘exiting_irq’; did you mean ‘in_irq’? [-Werror=implicit-function-declaration] > exiting_irq(); > ^~~~~~~~~~~ > in_irq > cc1: some warnings being treated as errors > make[3]: *** [scripts/Makefile.build:278: arch/x86/kernel/cpu/acrn.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... > make[2]: *** [scripts/Makefile.build:489: arch/x86/kernel/cpu] Error 2 > make[1]: *** [scripts/Makefile.build:489: arch/x86/kernel] Error 2 > make: *** [Makefile:1073: arch/x86] Error 2 > make: *** Waiting for unfinished jobs.... > > Looks like it needs > > +#include > > config attached. >