All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cao,Bing Bu" <mars@linux.vnet.ibm.com>
To: "Cao,Bing Bu" <mars@linux.vnet.ibm.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, jcmvbkbc@gmail.com
Subject: Re: [Qemu-devel] [PATCH] Give an error when using -icount option with kvm accelerator
Date: Mon, 14 Nov 2011 14:17:32 +0800	[thread overview]
Message-ID: <4EC0B27C.6020202@linux.vnet.ibm.com> (raw)
In-Reply-To: <1320995379-20861-1-git-send-email-mars@linux.vnet.ibm.com>

On 11/11/2011 03:09 PM, Cao,Bing Bu wrote:
> With -icount, the vm_clock is updated with help from TCG (it counts instructions at 2^ICOUNT ns/instructions).  With KVM, the instruction count is not available so KVM cannot provide this help.
>
> Signed-off-by: Cao,Bing Bu<mars@linux.vnet.ibm.com>
> ---
>   vl.c |    8 ++++++--
>   1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index f169aac..d2857a4 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3226,8 +3226,12 @@ int main(int argc, char **argv, char **envp)
>           fprintf(stderr, "could not initialize alarm timer\n");
>           exit(1);
>       }
> -    configure_icount(icount_option);
> -
> +    if (!kvm_enabled()) {
> +        configure_icount(icount_option);
> +    } else {
> +        fprintf(stderr, "-icount option only allowed without kvm accelerator\n");
> +        exit(1);
> +    }
>       if (net_init_clients()<  0) {
>           exit(1);
>       }
This patch has a obvious bug,so bad!

Sorry for that, and the new patch has been added by Max Filippov.

+    if (icount_option && (kvm_enabled() || xen_enabled())) {
+        fprintf(stderr, "-icount is not allowed with kvm or xen\n");
+        exit(1);
+    }

     configure_icount(icount_option);

-- 
Best Regards,
Cao,Bing Bu

  reply	other threads:[~2011-11-14  6:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 13:45 [Qemu-devel] x86_64 linux kernel doesn't boot with -icount enabled Max Filippov
2011-11-08 14:03 ` Max Filippov
2011-11-08 14:14 ` Paolo Bonzini
2011-11-08 14:21   ` Max Filippov
2011-11-08 15:52 ` Max Filippov
2011-11-09  9:41   ` Cao,Bing Bu
2011-11-09 10:42     ` Cao,Bing Bu
2011-11-09 10:50       ` Max Filippov
2011-11-10  2:54         ` Cao,Bing Bu
2011-11-10  9:05           ` Max Filippov
2011-11-10  9:15             ` Paolo Bonzini
2011-11-10 10:25               ` Max Filippov
2011-11-10 11:25                 ` Paolo Bonzini
2011-11-11  7:09                   ` [Qemu-devel] [PATCH] Give an error when using -icount option with kvm accelerator Cao,Bing Bu
2011-11-14  6:17                     ` Cao,Bing Bu [this message]
2011-11-13 21:57                   ` [Qemu-devel] x86_64 linux kernel doesn't boot with -icount enabled Benoît Canet

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=4EC0B27C.6020202@linux.vnet.ibm.com \
    --to=mars@linux.vnet.ibm.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.