Received: by 10.223.164.202 with SMTP id h10csp1561957wrb; Wed, 15 Nov 2017 23:49:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMbbNM7ZO4w7zCFAec76CGHvcpaskh7sSHeTIi7XmZ8LWkVtasoqLyA/UdZqBcVgMksITpJq X-Received: by 10.99.165.79 with SMTP id r15mr843936pgu.280.1510818571905; Wed, 15 Nov 2017 23:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510818571; cv=none; d=google.com; s=arc-20160816; b=sGwdgyOQOZeXvAchGfDJIw9VS5ngu4w9n+HTe0MesxS4gwWRhwDdkp3RcwhsIpZpKf FgaUoHPfmtZzoIHdHC6HpX1x3UWjGsfNW9SlexTqrMir96yBAPgPu51iTfv23mFgVDeR ABPB8fTpx/xpNFit8LlLTDAVgx5Nvk+7mwJbIEqaCkiLvzC6PBkoOszPce6M9jf9jcwg AUchcEmKwK24xChOiWyytHUqc4zGt/wgR61jqVv7lF8rJ5gYCojNrarlKF+KygxFSJi8 yKRYhffi296EgEYhIjI+qWYpkdsF5J/IpIHH2xFY99MVcj2sxpGNJ9o6UDhwAvTD9eeg tZiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/6ZcIe9DGJd1QIU0l+o2z3N8piwkJ6WKUM08jm3dzig=; b=f3wyHNiXudxu3P2znATnhLGNB18Ig1EopLkWkU0fSkaamka0FhGRqmw2HsGLxYCCUa JMrIJKWfYWMGJmXWaYTPVdUXkRbcImQ6kVOYFx6Mr+ML0bp6uzbiweE9af7t62DJFtNK UVd9XxMBN5j4N0g65M4NP1o8EVC0dIBJm5zN2uNmyXlrklpgMz78TL4cS0FZj9T7cGUN QNz2ezr9A3ziR9py8tfxBORwawtQ0Co001Szb54ZyZSQBTu+jXqBb+NNEC21x8RWbZQZ J9tKd4n07d48bIFiOX9yBvsFRpbOqo58B1jeZr4aeu2HCLoGEDDNYSt9ULhEdwA2Yg02 5F6Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si422077pgp.722.2017.11.15.23.49.19; Wed, 15 Nov 2017 23:49:31 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933366AbdKPHsP (ORCPT + 91 others); Thu, 16 Nov 2017 02:48:15 -0500 Received: from goliath.siemens.de ([192.35.17.28]:60479 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932638AbdKPHrq (ORCPT ); Thu, 16 Nov 2017 02:47:46 -0500 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id vAG7QseZ008143 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Nov 2017 08:26:54 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.32.158]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id vAG7QrlQ029336; Thu, 16 Nov 2017 08:26:53 +0100 From: Jan Kiszka To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, Linux Kernel Mailing List , jailhouse-dev@googlegroups.com Subject: [PATCH 01/10] x86/apic: Install an empty physflat_init_apic_ldr Date: Thu, 16 Nov 2017 08:26:43 +0100 Message-Id: <7476b80e275c27beb7d30d564c55966d66d1a825.1510817211.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Kiszka As the comment already stated, there is no need for setting up LDR in physflat mode as it remains unused. flat_init_apic_ldr only served as a placeholder for a nop operation so far, causing no harm. That will change when running over the Jailhouse hypervisor. Here we must not touch LDR in a way that destroys the mapping originally set up by the Linux root cell. Jailhouse enforces this setting in order to efficiently validate any IPI requests sent by a cell. Avoid a needless clash caused by flat_init_apic_ldr by installing a true nop handler. Signed-off-by: Jan Kiszka --- arch/x86/kernel/apic/apic_flat_64.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c index aa85690e9b64..34bfdfe29a04 100644 --- a/arch/x86/kernel/apic/apic_flat_64.c +++ b/arch/x86/kernel/apic/apic_flat_64.c @@ -218,6 +218,11 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) return 0; } +void physflat_init_apic_ldr(void) +{ + /* LDR is not used in physflat mode. */ +} + static void physflat_send_IPI_allbutself(int vector) { default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector); @@ -251,8 +256,7 @@ static struct apic apic_physflat __ro_after_init = { .dest_logical = 0, .check_apicid_used = NULL, - /* not needed, but shouldn't hurt: */ - .init_apic_ldr = flat_init_apic_ldr, + .init_apic_ldr = physflat_init_apic_ldr, .ioapic_phys_id_map = NULL, .setup_apic_routing = NULL, -- 2.12.3 From 1584415688649466806@xxx Sat Nov 18 14:49:08 +0000 2017 X-GM-THRID: 1584343153541789422 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread