All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Gleb Natapov <gleb@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	QEMU Developers <qemu-devel@nongnu.org>,
	kvm-devel <kvm@vger.kernel.org>,
	Patch Tracking <patches@linaro.org>,
	Andreas Tobler <andreast@freebsd.org>,
	Anthony Liguori <aliguori@amazon.com>
Subject: Re: [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()
Date: Tue, 12 Nov 2013 16:21:10 +0100	[thread overview]
Message-ID: <52824766.2000507@redhat.com> (raw)
In-Reply-To: <CAFEAcA_itCrpH7sqe3HBhNK_7GoaAWO77zbttLbjucHt3YJF3Q@mail.gmail.com>

Il 12/11/2013 16:13, Peter Maydell ha scritto:
>>> >>
>>> >> -O1 then for clang.
>> >
>> > We can even test in configure for the exact optimizations we want, in
>> > fact.  But I think -O1 doesn't sacrifice debuggability that much:
> I'm afraid I still don't see why you'd want to sacrifice it
> at all,

Is this FUD or do you have examples of bad debuggability of -O1 code?

Personally, I've not even used -O0 for several years.  -O2 debuggability
is still awful but has improved a lot.  If it's not enough, 99% of the
time it means that tracing or printf are a better tool for the bug.

> when the alternative is "provide a three line stub
> function in a file we already have all the build machinery
> to compile in the config where it's needed". I just don't
> see why you'd worry about the fact that there's no longer
> a compile error if you try to call this obviously kvm
> specific function in a non-kvm-enabled code path, when
> we already have large numbers of kvm-specific functions
> that have stubs

Most of these stubs do _not_ abort(), they return a sensible error code
or should be no-ops in the non-KVM case.

> (and when in general, eg QOM APIs, we seem
> to be entirely happy to have things be runtime errors rather
> than compile time).

We're far from having consensus on that, indeed.

Paolo

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Gleb Natapov <gleb@redhat.com>, kvm-devel <kvm@vger.kernel.org>,
	Patch Tracking <patches@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Andreas Tobler <andreast@freebsd.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()
Date: Tue, 12 Nov 2013 16:21:10 +0100	[thread overview]
Message-ID: <52824766.2000507@redhat.com> (raw)
In-Reply-To: <CAFEAcA_itCrpH7sqe3HBhNK_7GoaAWO77zbttLbjucHt3YJF3Q@mail.gmail.com>

Il 12/11/2013 16:13, Peter Maydell ha scritto:
>>> >>
>>> >> -O1 then for clang.
>> >
>> > We can even test in configure for the exact optimizations we want, in
>> > fact.  But I think -O1 doesn't sacrifice debuggability that much:
> I'm afraid I still don't see why you'd want to sacrifice it
> at all,

Is this FUD or do you have examples of bad debuggability of -O1 code?

Personally, I've not even used -O0 for several years.  -O2 debuggability
is still awful but has improved a lot.  If it's not enough, 99% of the
time it means that tracing or printf are a better tool for the bug.

> when the alternative is "provide a three line stub
> function in a file we already have all the build machinery
> to compile in the config where it's needed". I just don't
> see why you'd worry about the fact that there's no longer
> a compile error if you try to call this obviously kvm
> specific function in a non-kvm-enabled code path, when
> we already have large numbers of kvm-specific functions
> that have stubs

Most of these stubs do _not_ abort(), they return a sensible error code
or should be no-ops in the non-KVM case.

> (and when in general, eg QOM APIs, we seem
> to be entirely happy to have things be runtime errors rather
> than compile time).

We're far from having consensus on that, indeed.

Paolo

  reply	other threads:[~2013-11-12 15:21 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 21:22 [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() Peter Maydell
2013-11-11 21:22 ` [Qemu-devel] " Peter Maydell
2013-11-11 21:28 ` Andreas Tobler
2013-11-11 21:28   ` [Qemu-devel] " Andreas Tobler
2013-11-11 22:19 ` Paolo Bonzini
2013-11-11 22:19   ` [Qemu-devel] " Paolo Bonzini
2013-11-11 22:38   ` Peter Maydell
2013-11-11 22:38     ` [Qemu-devel] " Peter Maydell
2013-11-11 23:11     ` Paolo Bonzini
2013-11-11 23:11       ` [Qemu-devel] " Paolo Bonzini
2013-11-11 23:21       ` Anthony Liguori
2013-11-11 23:21         ` [Qemu-devel] " Anthony Liguori
2013-11-12  7:09         ` Paolo Bonzini
2013-11-12  7:09           ` [Qemu-devel] " Paolo Bonzini
2013-11-12 11:07         ` Peter Maydell
2013-11-12 11:07           ` [Qemu-devel] " Peter Maydell
2013-11-12 12:09           ` Paolo Bonzini
2013-11-12 12:09             ` [Qemu-devel] " Paolo Bonzini
2013-11-12 12:16             ` Peter Maydell
2013-11-12 12:16               ` [Qemu-devel] " Peter Maydell
2013-11-12 13:12               ` Paolo Bonzini
2013-11-12 13:12                 ` [Qemu-devel] " Paolo Bonzini
2013-11-12 13:21                 ` Peter Maydell
2013-11-12 13:21                   ` [Qemu-devel] " Peter Maydell
2013-11-12 13:26                   ` Gleb Natapov
2013-11-12 13:26                     ` [Qemu-devel] " Gleb Natapov
2013-11-12 13:23                 ` Gleb Natapov
2013-11-12 13:23                   ` [Qemu-devel] " Gleb Natapov
2013-11-12 13:57                   ` Paolo Bonzini
2013-11-12 13:57                     ` [Qemu-devel] " Paolo Bonzini
2013-11-12 14:09                     ` Gleb Natapov
2013-11-12 14:09                       ` [Qemu-devel] " Gleb Natapov
2013-11-12 14:14                       ` Peter Maydell
2013-11-12 14:14                         ` [Qemu-devel] " Peter Maydell
2013-11-12 14:57                       ` Paolo Bonzini
2013-11-12 14:57                         ` [Qemu-devel] " Paolo Bonzini
2013-11-12 15:13                         ` Peter Maydell
2013-11-12 15:13                           ` [Qemu-devel] " Peter Maydell
2013-11-12 15:21                           ` Paolo Bonzini [this message]
2013-11-12 15:21                             ` Paolo Bonzini
2013-11-12 15:32                             ` Peter Maydell
2013-11-12 15:32                               ` [Qemu-devel] " Peter Maydell
2013-11-12 15:58                               ` Paolo Bonzini
2013-11-12 15:58                                 ` [Qemu-devel] " Paolo Bonzini
2013-11-12 16:08                                 ` Peter Maydell
2013-11-12 16:08                                   ` [Qemu-devel] " Peter Maydell
2013-11-12 17:04                                   ` Anthony Liguori
2013-11-12 17:04                                     ` [Qemu-devel] " Anthony Liguori
2013-11-12 17:20                                     ` Peter Maydell
2013-11-12 17:20                                       ` [Qemu-devel] " Peter Maydell
2013-11-12 18:54                                     ` Richard Henderson
2013-11-12 18:54                                       ` Richard Henderson
2013-11-12 18:57                                       ` Peter Maydell
2013-11-12 18:57                                         ` Peter Maydell
2013-11-12 19:15                                         ` Stefan Weil
2013-11-12 19:15                                           ` [Qemu-devel] " Stefan Weil
2013-11-12 22:53                                       ` Paolo Bonzini
2013-11-12 22:53                                         ` Paolo Bonzini
2013-11-13  2:27                                         ` Richard Henderson
2013-11-13  2:27                                           ` Richard Henderson
2013-11-13  7:25                                           ` Paolo Bonzini
2013-11-13  7:25                                             ` Paolo Bonzini
2013-11-13 22:23                                             ` Peter Maydell
2013-11-13 22:23                                               ` Peter Maydell
2013-11-13  7:26                                           ` Gleb Natapov
2013-11-13  7:26                                             ` Gleb Natapov
2013-11-12 14:01                 ` Peter Maydell
2013-11-12 14:01                   ` [Qemu-devel] " Peter Maydell
2013-11-11 23:23       ` Peter Maydell
2013-11-11 23:23         ` [Qemu-devel] " Peter Maydell

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=52824766.2000507@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=andreast@freebsd.org \
    --cc=anthony@codemonkey.ws \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --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.