Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3343115ybg; Fri, 25 Oct 2019 02:44:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+Z5pETeN/9q5Y34tFR7CkS1qTTkPhnmNGhuASlVeXXLJu8owwYEL+/sELFOl8bxJgYijm X-Received: by 2002:a17:907:105c:: with SMTP id oy28mr2456355ejb.299.1571996659937; Fri, 25 Oct 2019 02:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571996659; cv=none; d=google.com; s=arc-20160816; b=ZrhQfC9tZA9BXFIqm4V8I7A5m5uKjRpyONvSaQh3rw+E9kJ2JCMXUQFulj2r6QWR1v J5b8qN7sYA/6UgwKBidIctAtWrtlCRKU4TZ/pzQaJ6vkLgUNLVgdax9WXwk0JJGi2nEO J23XgAuljJACO5W7ig5goCns8aN2xsOLL4xSC4AtCg9blaZIBtDnn0rwFIy0Du9mlgLk Xgswo4nRbmsnifTy193LJam17rnUsYPMKbipc0XM+JICjm0YT66nGcZ8r0HsHs0tIg+3 kznsEaLLqSjIlCY5Tvqkd1IntXTO9Htf5RSZIFZl/zPzOc/xPRzxendhYP5jC4FrHy55 0hZg== 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=ayscOLWmguZsoULgCzPkYG+MD4hmR949sgTQwu1O65U=; b=ivuFtpeI3XI0M39u313BpnmITaAuZGGVnGUm7Bi9QAb6ImzZKsQd7kSomWRcZxM2Nl pDNeMEF/nbLAcMDsfC7PRD2By4ZFWof6RymfHNmpqKzmzFHbjarLUj18iv2+OI5wIPlx GyEAkSfYoaJxRIjjxaK2tvXeaPHAHt39QSb3nBcQHDZsqe6R6lPEbt6nCnGJ6dveP/uA r3z4QXlxLYMPOMvQSufzeKzJIRN6MKHpvwAIQ9ul/U0kL23ljcXAqj2Q0vQVd4GLBlu0 E6SNQvTz1TBnCw8nggd9WAEr6WGAp4jBKKHwHLMoHswo26EecfKCSWTZ4yjzTmoWDcmz FAXQ== 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 j52si807128eda.438.2019.10.25.02.43.56; Fri, 25 Oct 2019 02:44:19 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389941AbfJXK7Q (ORCPT + 99 others); Thu, 24 Oct 2019 06:59:16 -0400 Received: from foss.arm.com ([217.140.110.172]:47312 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbfJXK7Q (ORCPT ); Thu, 24 Oct 2019 06:59:16 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 050F6497; Thu, 24 Oct 2019 03:59:01 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8FA893F71A; Thu, 24 Oct 2019 03:58:55 -0700 (PDT) Subject: Re: [PATCH RFC 0/7] Support KVM being compiled as a kernel module on arm64 To: Shannon Zhao Cc: kvmarm@lists.cs.columbia.edu, maz@kernel.org, suzuki.poulose@arm.com, christoffer.dall@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1571912870-18471-1-git-send-email-shannon.zhao@linux.alibaba.com> From: James Morse Message-ID: <8cbd81d6-4ab8-9d2a-5162-8782201cd13d@arm.com> Date: Thu, 24 Oct 2019 11:58:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <1571912870-18471-1-git-send-email-shannon.zhao@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shannon, On 24/10/2019 11:27, Shannon Zhao wrote: > Curently KVM ARM64 doesn't support to compile as a kernel module. It's > useful to compile KVM as a module. > For example, it could reload kvm without rebooting host machine. What problem does this solve? KVM has some funny requirements that aren't normal for a module. On v8.0 hardware it must have an idmap. Modules don't usually expect their code to be physically contiguous, but KVM does. KVM influences they way some of the irqchip stuff is set up during early boot (EOI mode ... not that I understand it). (I think KVM-as-a-module on x86 is an artifact of how it was developed) > This patchset support this feature while there are some limitations > to be solved. But I just send it out as RFC to get more suggestion and > comments. > Curently it only supports for VHE system due to the hyp code section > address variables like __hyp_text_start. We still need to support !VHE systems, and we need to do it with a single image. > Also it can't call > kvm_update_va_mask when loading kvm module and kernel panic with below > errors. So I make kern_hyp_va into a nop funtion. Making this work for the single-Image on v8.0 is going to be a tremendous amount of work. What is the payoff? Thanks, James