qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Glauber Costa <glommer@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] test for lm capable kernel.
Date: Thu, 22 Oct 2009 11:20:07 -0500	[thread overview]
Message-ID: <4AE08637.5050209@codemonkey.ws> (raw)
In-Reply-To: <1255540160-19869-1-git-send-email-glommer@redhat.com>

Glauber Costa wrote:
> Don't save x86_64-specific msrs if our kernel does not support them.
> Code is already in qemu-kvm.git, but the test function is slightly different.
> It follows what the test for msr_start does.
>   

Repeat after me: "I will not use --target-list when submitting qemu 
patches.  I will not use --target-list when submitting qemu patches."

Fedora enables ccache by default.  After one build, all future builds 
are extremely fast in most cases.  It's really not that bad :-)

> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
>  target-i386/kvm.c |   37 +++++++++++++++++++++++++++----------
>  1 files changed, 27 insertions(+), 10 deletions(-)
>
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index 7010999..0e69b57 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -15,6 +15,7 @@
>  #include <sys/types.h>
>  #include <sys/ioctl.h>
>  #include <sys/mman.h>
> +#include <sys/utsname.h>
>  
>  #include <linux/kvm.h>
>  
> @@ -266,6 +267,20 @@ static int kvm_has_msr_star(CPUState *env)
>      return 0;
>  }
>  
> +static int lm_capable_kernel(void)
> +{
> +    static int lm_capable = -1;
> +    struct utsname utsname;
> +
> +    if (lm_capable != -1) {
> +        return lm_capable;
> +    }
> +
> +    uname(&utsname);
> +    lm_capable = (strcmp(utsname.machine, "x86_64") == 0);
> +    return lm_capable;
> +}
> +
>   

This function is unused for qemu-system-i386.

Regards,

Anthony Liguori

  reply	other threads:[~2009-10-22 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14 17:09 [Qemu-devel] [PATCH] test for lm capable kernel Glauber Costa
2009-10-22 16:20 ` Anthony Liguori [this message]
2009-10-22 16:51 ` Avi Kivity
2009-10-22 16:56   ` Glauber Costa

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=4AE08637.5050209@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=glommer@redhat.com \
    --cc=qemu-devel@nongnu.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).