From patchwork Mon Oct 12 08:54:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 53081 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9C956hZ021321 for ; Mon, 12 Oct 2009 09:05:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755112AbZJLI6R (ORCPT ); Mon, 12 Oct 2009 04:58:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755061AbZJLI6R (ORCPT ); Mon, 12 Oct 2009 04:58:17 -0400 Received: from david.siemens.de ([192.35.17.14]:20229 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754560AbZJLI6P (ORCPT ); Mon, 12 Oct 2009 04:58:15 -0400 Received: from mail2.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n9C8vQvh013593; Mon, 12 Oct 2009 10:57:26 +0200 Received: from [139.25.109.167] (mchn012c.ww002.siemens.net [139.25.109.167] (may be forged)) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n9C8vNXh032378; Mon, 12 Oct 2009 10:57:23 +0200 From: Jan Kiszka Subject: [PATCH 3/4] Avoid kmap_atomic_to_page in svm To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org Date: Mon, 12 Oct 2009 10:54:54 +0200 Message-ID: <20091012085454.20775.70384.stgit@mchn012c.ww002.siemens.net> In-Reply-To: <20091012085454.20775.12700.stgit@mchn012c.ww002.siemens.net> References: <20091012085454.20775.12700.stgit@mchn012c.ww002.siemens.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/sync b/sync index 4821b84..8868e6d 100755 --- a/sync +++ b/sync @@ -121,6 +121,18 @@ def __hack(data): line = sub(r'boot_cpu_data.x86_phys_bits', 'kvm_x86_phys_bits', line) if match(r'^static const struct vm_operations_struct kvm_'): line = sub(r' const ', ' ', line) + if line == 'static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, enum km_type idx)': + line = sub(r'\)', ', struct page **mapped_page)', line) + if line == '\treturn kmap_atomic(page, idx);': + line = '\t*mapped_page = page;\n' + line + if line == 'static void nested_svm_unmap(void *addr, enum km_type idx)': + line = sub(r'\)', ', struct page *mapped_page)', line) + if line == '\tpage = kmap_atomic_to_page(addr);': + line = '\tpage = mapped_page;' + if match(r'= nested_svm_map(.*);'): + line = '\t{ struct page *mapped_page;\n' + sub(r'\);', ', &mapped_page);', line) + if match('nested_svm_unmap(.*);'): + line = sub(r'\);', ', mapped_page); }', line) w(line) if match(r'\tkvm_init_debug'): w('\thrtimer_kallsyms_resolve();')