public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: npiggin-l3A5Bk7waGM@public.gmane.org
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch 05/18] kvm: nopage
Date: Wed, 05 Dec 2007 12:40:17 +0200	[thread overview]
Message-ID: <47568011.1080409@qumranet.com> (raw)
In-Reply-To: <20071205071627.251516000-wDNK3PsPySm71z1jCTBXHQ@public.gmane.org>

npiggin-l3A5Bk7waGM@public.gmane.org wrote:
> Convert KVM from nopage to fault.
>
>   

> @@ -3111,27 +3105,21 @@ out:
>  	return r;
>  }
>  
> -static struct page *kvm_vm_nopage(struct vm_area_struct *vma,
> -				  unsigned long address,
> -				  int *type)
> +static int kvm_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
>  {
>  	struct kvm *kvm = vma->vm_file->private_data;
> -	unsigned long pgoff;
>  	struct page *page;
>  
> -	pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
> -	page = gfn_to_page(kvm, pgoff);
> +	page = gfn_to_page(kvm, vmf->pgoff);
>  	if (!page)
> -		return NOPAGE_SIGBUS;
> +		return VM_FAULT_SIGBUS;
>  	get_page(page);
> -	if (type != NULL)
> -		*type = VM_FAULT_MINOR;
> -
> -	return page;
> +	vmf->page = page;
> +	return 0;
>  }
>  
>   

This part has changed in kvm.git, so this won't apply to -mm.  I ported 
it and applied to my tree, so it should arrive in -mm when Andrew 
re-fetches.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

      parent reply	other threads:[~2007-12-05 10:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071205071547.701344000@nick.local0.net>
2007-12-05  7:15 ` [patch 05/18] kvm: nopage npiggin-l3A5Bk7waGM
     [not found]   ` <20071205071627.251516000-wDNK3PsPySm71z1jCTBXHQ@public.gmane.org>
2007-12-05 10:40     ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47568011.1080409@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=npiggin-l3A5Bk7waGM@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox