Received: by 10.223.164.202 with SMTP id h10csp1297824wrb; Mon, 27 Nov 2017 00:16:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMb0NjVBF3WLhFIkpAi9dtc5VUE58ur3nH8bjcPfyybJOfZ3vlzYc/6Lw1kJqs5t7a86YacS X-Received: by 10.99.176.76 with SMTP id z12mr23621017pgo.358.1511770607922; Mon, 27 Nov 2017 00:16:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511770607; cv=none; d=google.com; s=arc-20160816; b=hmRT3pWQlDIwI52HcpOCj0ocn/ZN+Lb8WzOUT1dHSYxVkb+q0ibeA6l7CQo4C7zhxx +LozulxbTO+nTVIlk5rrkljLcs80xITnnX2m8xAudnAT7GgpcOt1PJ978Cz9dv5Es8hR ZGl5JUSylZWoKX3hoshhkUFYwZHHVmFXvTpIbo5uOLNaNtH9TuzXnuK2Cea1UTrDS0LA 0hlLci/vu/DXYTvCxYhkI5XT09DlBD+3wxS8qaZkrjDglmGLPcw3RCZGONLSsrcz42sO LMjihc6L5MHh5Qz6mY+fRWpyzXsytDQsyKe/nera0YCyPF/EI9jmnco1Io9qBAviniqA BnGw== 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=HQRIkl1N2GYKl7TWUpsKwQOuquj+hcwIvOYql4otdqQ=; b=avBAbskfZDPsWwWHQpCoKhw4e6lGbi25WkD5KhbICNFzMeJdMxlaIzWdXwZbjBqbRh c5XSBmfV4ZJuH5b0eh0QJa1XCPhZRU4I60yp6+3kshznNCLugq5PxUOmN1dL/V2wZUJM cym3Jks+LXy0MZI9W2Vlv0pZBoNJNHZX+9eYviJcGnDYnw2TB3MMPloWmEAmUCn3BeQT Q83OmgB9+RbGUKb/65ZTL2sTYpSL48tYtrMFqMJOsdJ17sVmU63SrGrtgzbv7Z6Law4r Gf2ATWfdLAZrzE7sSmQLLsL5S3F7jJHJTmZXY3VoGMWzxfprPS7mG6xr2r8WR3b3hh2F 67VQ== 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 o3si21423684plk.45.2017.11.27.00.16.36; Mon, 27 Nov 2017 00:16:47 -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 S1751571AbdK0IOi (ORCPT + 78 others); Mon, 27 Nov 2017 03:14:38 -0500 Received: from goliath.siemens.de ([192.35.17.28]:58549 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751393AbdK0IMI (ORCPT ); Mon, 27 Nov 2017 03:12:08 -0500 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id vAR8Bvs4013841 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 09:11:57 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.32.153]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id vAR8BtET021016; Mon, 27 Nov 2017 09:11:56 +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 v2 01/12] x86/apic: Install an empty physflat_init_apic_ldr Date: Mon, 27 Nov 2017 09:11:43 +0100 Message-Id: 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 (and DFR) in physflat mode as it remains unused (see SDM, 10.6.2.1). 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 | 12 ++++++++++-- 1 file changed, 10 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..226a6ab22b35 100644 --- a/arch/x86/kernel/apic/apic_flat_64.c +++ b/arch/x86/kernel/apic/apic_flat_64.c @@ -218,6 +218,15 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) return 0; } +static void physflat_init_apic_ldr(void) +{ + /* + * LDR and DFR are not involved in physflat mode, rather: + * "In physical destination mode, the destination processor is + * specified by its local APIC ID [...]." (Intel SDM, 10.6.2.1) + */ +} + static void physflat_send_IPI_allbutself(int vector) { default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector); @@ -251,8 +260,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 1585198618007457043@xxx Mon Nov 27 06:13:28 +0000 2017 X-GM-THRID: 1585198618007457043 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread