Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752695AbbETIcH (ORCPT ); Wed, 20 May 2015 04:32:07 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:56464 "EHLO e06smtp16.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751488AbbETIcE (ORCPT ); Wed, 20 May 2015 04:32:04 -0400 Message-ID: <555C467E.5060106@de.ibm.com> Date: Wed, 20 May 2015 10:31:58 +0200 From: Christian Borntraeger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org CC: Xiao Guangrong , rkrcmar@redhat.com, bdas@redhat.com, linux-s390 Subject: Re: [RFC PATCH 00/11] KVM: multiple address spaces (for SMM) References: <1431956923-35602-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1431956923-35602-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15052008-0025-0000-0000-00000531D0E8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1995 Lines: 45 Am 18.05.2015 um 15:48 schrieb Paolo Bonzini: > This implements Avi's suggestion of having two separate kvm_memslots for > regular and SMM operation, corresponding to different address spaces. > > All in all, the surgery is limited even though there are a few preparatory > patches that touch all architectures. > > The amount of added code for the vcpu-specific versions of kvm_read_guest > and kvm_write_guest is smaller, and duplication is limited to a couple of > functions. Even the rmap parts, which scared me a lot when the first > version OOPSed on me, :) are actually very easy. > > Patches 1-6 are preparatory cleanups that can be applied separately, > while the others will be posted in v2 of the SMM patches. > > Patches 7-8 add the new functions (this time in virt/kvm/kvm_main.c). > Architectures can then define a function kvm_arch_vcpu_memslots_id that > returns the active address space id for a given VCPU. The address space > ID must be passed to KVM_SET_USER_MEMORY_REGION and KVM_GET_DIRTY_LOG, > using the high 16 bits of the slot id. > > Patch 9 then does VCPU-specific accesses in x86, and patch 10 loops > over the SMM slots as well on memslot iterations. > > Patch 11 then introduces the SMRAM address space, which is very simple > after all the legwork. > > Thanks for the reviews, So in essence this allows to have each vcpu in separate address space if necessary. These address space might overlap or be identical and allow permutations by having different memslots for each address space. And we can have several address spaces per vcpu. Correct? This might be useful for kvm on s390 (e.g. we did the ucontrol thing that also has one guest address space per vcpu). I need to have a look at that. Christian -- 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/