kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH 3/3] use upstream kvm_vcpu_ioctl
Date: Thu, 15 Oct 2009 12:57:41 -0300	[thread overview]
Message-ID: <20091015155741.GA9629@amt.cnet> (raw)
In-Reply-To: <1255537753-18694-4-git-send-email-glommer@redhat.com>

On Wed, Oct 14, 2009 at 01:29:13PM -0300, Glauber Costa wrote:
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
>  kvm-all.c      |    3 ---
>  qemu-kvm-x86.c |   20 ++++++++++----------
>  qemu-kvm.c     |   26 +++++++++++++-------------
>  qemu-kvm.h     |    1 +
>  4 files changed, 24 insertions(+), 26 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 1356aa8..5ea999e 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -861,7 +861,6 @@ int kvm_vm_ioctl(KVMState *s, int type, ...)
>      return ret;
>  }
>  
> -#ifdef KVM_UPSTREAM
>  int kvm_vcpu_ioctl(CPUState *env, int type, ...)
>  {
>      int ret;
> @@ -879,8 +878,6 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...)
>      return ret;
>  }
>  
> -#endif
> -
>  int kvm_has_sync_mmu(void)
>  {
>  #ifdef KVM_CAP_SYNC_MMU
> diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
> index 8c4140d..fd0e6a9 100644
> --- a/qemu-kvm-x86.c
> +++ b/qemu-kvm-x86.c
> @@ -179,7 +179,7 @@ int kvm_enable_vapic(CPUState *env, uint64_t vapic)
>  		.vapic_addr = vapic,
>  	};
>  
> -	r = ioctl(env->kvm_fd, KVM_SET_VAPIC_ADDR, &va);
> +	r = kvm_vcpu_ioctl(env, KVM_SET_VAPIC_ADDR, &va);
>  	if (r == -1) {
>  		r = -errno;

Please convert the callers to check for < 0, not -1.


      reply	other threads:[~2009-10-15 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14 16:29 [PATCH 0/3] get rid of kvm vcpu structure Glauber Costa
2009-10-14 16:29 ` [PATCH 1/3] change function signatures so that they don't take a vcpu argument Glauber Costa
2009-10-14 16:29   ` [PATCH 2/3] get rid of vcpu structure Glauber Costa
2009-10-14 16:29     ` [PATCH 3/3] use upstream kvm_vcpu_ioctl Glauber Costa
2009-10-15 15:57       ` Marcelo Tosatti [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=20091015155741.GA9629@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=glommer@redhat.com \
    --cc=kvm@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).