Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753208AbbFXULf (ORCPT ); Wed, 24 Jun 2015 16:11:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52259 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068AbbFXUL1 (ORCPT ); Wed, 24 Jun 2015 16:11:27 -0400 Message-ID: <558B0EEC.9040504@codeaurora.org> Date: Wed, 24 Jun 2015 15:11:24 -0500 From: Timur Tabi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Will Deacon CC: Catalin Marinas , "abhimany@codeaurora.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , sboyd@codeaurora.org Subject: Re: [PATCH] ARM64: TTY: hvc_dcc: Add support for ARM64 dcc References: <1434751734-2178-1-git-send-email-timur@codeaurora.org> <20150622131228.GE1583@arm.com> In-Reply-To: <20150622131228.GE1583@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 36 On 06/22/2015 08:12 AM, Will Deacon wrote: > I still think we should be disabling userspace access to the DCC if the > kernel is using it as its console. I still need help with this. I know you said a year ago that MDSCR_EL1.TDCC needs to be set to disable userspace access. Where and how should I do this? I can do this: static int __init hvc_dcc_console_init(void) { #ifdef CONFIG_ARM64 u32 val; asm("msr mdscr_el1, %0 " "orr %0, %0, #4096 " /* TDCC */ "msr %0, mdscr_el1 " : "=r" (val)); #endif But this seems clunky. I am concerned about KVM, though. There appears to be code in KVM in hyp.s and sys_regs.c that touches and/or emulates MDSCR_EL1. On a side note, it does not appear that ARM32 blocks userspace DCC. I don't see where DBGDSCR.UDCCdis is set. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/