Received: by 10.223.185.116 with SMTP id b49csp7716491wrg; Thu, 1 Mar 2018 09:53:10 -0800 (PST) X-Google-Smtp-Source: AG47ELtXRpCR329a4z8BGpTlEh637tUQcxgxbnuk4uMwwRr8LTJiwoU2tY7KFhSzEapNA9M3MIpB X-Received: by 2002:a17:902:6e0f:: with SMTP id u15-v6mr2615724plk.78.1519926790339; Thu, 01 Mar 2018 09:53:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519926790; cv=none; d=google.com; s=arc-20160816; b=XxEuLiB2c9EX5IZjmVKgB+YEfP6Pw5mz7+NpV+xFjApWKGNsQD4AIf0s/Po8v/mK55 /kJFMqPk9XnNf5VaAi6BL1WC0mwQDymK+XIkLJlb6K0CdEoRK+Pw/9uH1po/bv/Dkb5B 7RWpUURQUEDF1G21PaBKzq3jWDbAhWKyJswRlPq6EKb3BUeCVJVD3UrRbqb6ykadb/2W 08WUMGuuYGIds3xvSOgEhLZdamNCu8zR0UtWb9ulhO5lqiMoDU/ktFnBAmO4hIqRhC0h psRxPyGbdZZru62X3E7BGar5BWlnF8OW0+j15nhawUXBTej9WKAX/zrevG9kYbBNY5Tf IaDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=PcUx+cvbRufB08NYWS9xiQmjnb5QVhd+R8SozGPsi8g=; b=avDLCO6lwGEgjzqCmyYePLdnYi6G7DYGRKFksGUsY2YwKVoD8tCIccRja9rVRhYtoc 2tYvWwtm0fdsFIbGtgGYgL+Uzwj7oEhk/tq3OEa90ZtQQG/zJ8XS+cXW+KbKekD9oV6z D2E4IxAeMHKeQWZxZg6f64JMTZbMdKt0CI4iww4UNcWOwjsCL5NCvCuMgN0vu84IsMVw JqwfVbqyDdH08bWFDkzuF3lwzUaDtSFwHCkwrE0nfldqZudSSQ7JwCTt809Eryh7ZHj6 jbwVJwrDrEBEOBfQLCNg0JYY8878OQliYel6vPVSiLvSGVWlFFkLZU2mpSY+6t/veGuc Fjwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dhizlRxC; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si3348351pld.591.2018.03.01.09.52.55; Thu, 01 Mar 2018 09:53:10 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=dhizlRxC; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033702AbeCARvv (ORCPT + 99 others); Thu, 1 Mar 2018 12:51:51 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:35092 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033559AbeCARvt (ORCPT ); Thu, 1 Mar 2018 12:51:49 -0500 Received: by mail-it0-f65.google.com with SMTP id v194so8852415itb.0 for ; Thu, 01 Mar 2018 09:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PcUx+cvbRufB08NYWS9xiQmjnb5QVhd+R8SozGPsi8g=; b=dhizlRxCjjyEYGwZE2jJ2IOPK5uQZQosUvL7Ndn4TxuOuBe4yS3d3IFskyfoo4neZp VOYTgbbG2x9GgGJeznqqC6y92S6EROPFelssGbYoBSjVzWVAkZ8pppYvV1oGBVXcsNpC s1ManRQwFGW1iEo/UHXEcT8jo4FHlJDxj6iaxjEekQKpJI1SjuxSUJQANbUFGSZAtQJJ R/Ii935vYK1h8UNXi6cAKBTQoBsgefhT1abtjg7dV8NCZ8qMVMghpzzKXMxZcC0vkb1M L3fLrXDQVRjkvqqVbVUBshZCkSd3g8j7SlLps1hgZHWeEYfedT/l9U1AEAltEowUQXRI buNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PcUx+cvbRufB08NYWS9xiQmjnb5QVhd+R8SozGPsi8g=; b=LAlX2CRA+cGIuB9i/BSsL0Ib9EZeb4DseRWjexJYgbPhF57lMg61yfdej7nx5Vi58A qFT3oiIactvdR6GObms769fW8PXA2+5WPF+yVKkamhWWk0t8zmuJcbAODAjwYDgzl6zJ 8ulYioDZvvVnudEuq02+yV1IK2BOV+CwGv4YiYhNZrg+SvzMLrbcnc8oPZ/5rqqJ1ZPE VqfHEbXu5/QgiXOpZMx8mdLKLzmfseYdu7p+RBe/JI/aILMcp9lma1ZCztRxcfpDSPf/ KXHv3VdyuAopz47wTkfv4X/WM/iixYZUXrowfF/Www0j+CUb03hbw9dVePgn+nnKXRuI /3mQ== X-Gm-Message-State: AElRT7FdUsf4sSWfjrcEyx6Ns45Wqs7dPbYo+nNONq0asSOrciX4k0vn 6FrOkLv5anCRnUU1yzot/XTjeidsd/HQ74/jDFm4tUCQ X-Received: by 10.36.53.67 with SMTP id k64mr3036004ita.90.1519926707892; Thu, 01 Mar 2018 09:51:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.128.36 with HTTP; Thu, 1 Mar 2018 09:51:47 -0800 (PST) In-Reply-To: <1519917874.15908.41.camel@amazon.de> References: <1519235241-6500-1-git-send-email-karahmed@amazon.de> <1519917874.15908.41.camel@amazon.de> From: Jim Mattson Date: Thu, 1 Mar 2018 09:51:47 -0800 Message-ID: Subject: Re: [PATCH 00/10] KVM/X86: Handle guest memory that does not have a struct page To: "Raslan, KarimAllah" Cc: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "x86@kernel.org" , "hpa@zytor.com" , "rkrcmar@redhat.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "pbonzini@redhat.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No complaints here! On Thu, Mar 1, 2018 at 7:24 AM, Raslan, KarimAllah wrote: > Jim/Paolo/Radim, > > Any complains about the current API? (introduced in 4/10) > > I have more patches on top and I would like to ensure that this is > agreed upon at least before sending more revisions/patches. > > Also 1, 2, and 3 should be a bit straight forward and does not use > this API. > > Thanks. > > On Wed, 2018-02-21 at 18:47 +0100, KarimAllah Ahmed wrote: >> For the most part, KVM can handle guest memory that does not have a struct >> page (i.e. not directly managed by the kernel). However, There are a few places >> in the code, specially in the nested code, that does not support that. >> >> Patch 1, 2, and 3 avoid the mapping and unmapping all together and just >> directly use kvm_guest_read and kvm_guest_write. >> >> Patch 4 introduces a new guest mapping interface that encapsulate all the >> bioler plate code that is needed to map and unmap guest memory. It also >> supports guest memory without "struct page". >> >> Patch 5, 6, 7, 8, 9, and 10 switch most of the offending code in VMX and hyperv >> to use the new guest mapping API. >> >> This patch series is the first set of fixes. Handling SVM and APIC-access page >> will be handled in a different patch series. >> >> KarimAllah Ahmed (10): >> X86/nVMX: handle_vmon: Read 4 bytes from guest memory instead of >> map->read->unmap sequence >> X86/nVMX: handle_vmptrld: Copy the VMCS12 directly from guest memory >> instead of map->copy->unmap sequence. >> X86/nVMX: Update the PML table without mapping and unmapping the page >> KVM: Introduce a new guest mapping API >> KVM/nVMX: Use kvm_vcpu_map when mapping the L1 MSR bitmap >> KVM/nVMX: Use kvm_vcpu_map when mapping the virtual APIC page >> KVM/nVMX: Use kvm_vcpu_map when mapping the posted interrupt >> descriptor table >> KVM/X86: Use kvm_vcpu_map in emulator_cmpxchg_emulated >> KVM/X86: hyperv: Use kvm_vcpu_map in synic_clear_sint_msg_pending >> KVM/X86: hyperv: Use kvm_vcpu_map in synic_deliver_msg >> >> arch/x86/kvm/hyperv.c | 28 ++++----- >> arch/x86/kvm/vmx.c | 144 +++++++++++++++-------------------------------- >> arch/x86/kvm/x86.c | 13 ++--- >> include/linux/kvm_host.h | 15 +++++ >> virt/kvm/kvm_main.c | 50 ++++++++++++++++ >> 5 files changed, 129 insertions(+), 121 deletions(-) >> > Amazon Development Center Germany GmbH > Berlin - Dresden - Aachen > main office: Krausenstr. 38, 10117 Berlin > Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger > Ust-ID: DE289237879 > Eingetragen am Amtsgericht Charlottenburg HRB 149173 B