From patchwork Tue Oct 30 08:32:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 195382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6E9B22C0097 for ; Tue, 30 Oct 2012 21:05:24 +1100 (EST) Received: from localhost ([::1]:48187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7Hc-0006LS-Lh for incoming@patchwork.ozlabs.org; Tue, 30 Oct 2012 04:34:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7GJ-0004j5-RN for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:33:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TT7GD-0000aG-9T for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:33:27 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:44743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7GC-0000YI-OF for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:33:21 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 8FCCE181C5; Tue, 30 Oct 2012 17:33:13 +0900 (JST) Received: (nullmailer pid 29450 invoked by uid 1000); Tue, 30 Oct 2012 08:33:13 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org, kvm@vger.kernel.org Date: Tue, 30 Oct 2012 17:32:55 +0900 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 210.128.90.3 Cc: benoit.hudzia@gmail.com, aarcange@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, t.hirofuchi@aist.go.jp, dlaor@redhat.com, satoshi.itoh@aist.go.jp, mdroth@linux.vnet.ibm.com, yoshikawa.takuya@oss.ntt.co.jp, owasserm@redhat.com, avi@redhat.com, pbonzini@redhat.com, chegu_vinod@hp.com Subject: [Qemu-devel] [PATCH v3 19/35] uvmem.h: import Linux uvmem.h and teach update-linux-headers.sh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Isaku Yamahata --- linux-headers/linux/uvmem.h | 41 +++++++++++++++++++++++++++++++++++++++ scripts/update-linux-headers.sh | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 linux-headers/linux/uvmem.h diff --git a/linux-headers/linux/uvmem.h b/linux-headers/linux/uvmem.h new file mode 100644 index 0000000..ea88980 --- /dev/null +++ b/linux-headers/linux/uvmem.h @@ -0,0 +1,41 @@ +/* + * User process backed memory. + * This is mainly for KVM post copy. + * + * Copyright (c) 2011, + * National Institute of Advanced Industrial Science and Technology + * + * https://sites.google.com/site/grivonhome/quick-kvm-migration + * Author: Isaku Yamahata + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, see . + */ + +#ifndef __LINUX_UVMEM_H +#define __LINUX_UVMEM_H + +#include +#include + +struct uvmem_init { + __u64 size; /* in bytes */ + __s32 shmem_fd; + __s32 padding; +}; + +#define UVMEMIO 0x1E + +/* ioctl for uvmem fd */ +#define UVMEM_INIT _IOWR(UVMEMIO, 0x0, struct uvmem_init) + +#endif /* __LINUX_UVMEM_H */ diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 67be2ef..0fa25ce 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -57,7 +57,7 @@ done rm -rf "$output/linux-headers/linux" mkdir -p "$output/linux-headers/linux" -for header in kvm.h kvm_para.h vfio.h vhost.h virtio_config.h virtio_ring.h; do +for header in kvm.h kvm_para.h vfio.h vhost.h virtio_config.h virtio_ring.h umem.h; do cp "$tmpdir/include/linux/$header" "$output/linux-headers/linux" done rm -rf "$output/linux-headers/asm-generic"