* [Qemu-devel] [PULL 0/2] target-i386: Finally enable "check" mode by default
@ 2015-10-28 14:15 Eduardo Habkost
2015-10-28 14:15 ` [Qemu-devel] [PULL 1/2] target-i386: Don't left shift negative constant Eduardo Habkost
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eduardo Habkost @ 2015-10-28 14:15 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Paolo Bonzini, Andreas Färber, Richard Henderson
We now have fixed the issues that caused unnecessary warnings in TCG mode and
on "make check", and I am applying the check-mode patch again.
The following changes since commit 7e038b94e74e1c2d1b3598e2e4b0b5c8b79a7278:
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2015-10-27 10:10:46 +0000)
are available in the git repository at:
git://github.com/ehabkost/qemu.git tags/x86-pull-request
for you to fetch changes up to 15e41345906d29a319cc9cdf566347bf79134d24:
target-i386: Enable "check" mode by default (2015-10-27 16:12:15 -0200)
----------------------------------------------------------------
target-i386: finally enable "check" mode by default
----------------------------------------------------------------
Eduardo Habkost (2):
target-i386: Don't left shift negative constant
target-i386: Enable "check" mode by default
target-i386/cpu.c | 2 +-
target-i386/translate.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] target-i386: Don't left shift negative constant
2015-10-28 14:15 [Qemu-devel] [PULL 0/2] target-i386: Finally enable "check" mode by default Eduardo Habkost
@ 2015-10-28 14:15 ` Eduardo Habkost
2015-10-28 14:15 ` [Qemu-devel] [PULL 2/2] target-i386: Enable "check" mode by default Eduardo Habkost
2015-10-28 15:52 ` [Qemu-devel] [PULL 0/2] target-i386: Finally enable " Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2015-10-28 14:15 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Paolo Bonzini, Andreas Färber, Richard Henderson
Left shift of negative values is undefined behavior. Detected by clang:
qemu/target-i386/translate.c:2423:26: runtime error:
left shift of negative value -8
This changes the code to reverse the sign after the left shift.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target-i386/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 764b1e4..862f8e0 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -2432,7 +2432,7 @@ static void gen_pusha(DisasContext *s)
{
int i;
gen_op_movl_A0_reg(R_ESP);
- gen_op_addl_A0_im(-8 << s->dflag);
+ gen_op_addl_A0_im(-(8 << s->dflag));
if (!s->ss32)
tcg_gen_ext16u_tl(cpu_A0, cpu_A0);
tcg_gen_mov_tl(cpu_T[1], cpu_A0);
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] target-i386: Enable "check" mode by default
2015-10-28 14:15 [Qemu-devel] [PULL 0/2] target-i386: Finally enable "check" mode by default Eduardo Habkost
2015-10-28 14:15 ` [Qemu-devel] [PULL 1/2] target-i386: Don't left shift negative constant Eduardo Habkost
@ 2015-10-28 14:15 ` Eduardo Habkost
2015-10-28 15:52 ` [Qemu-devel] [PULL 0/2] target-i386: Finally enable " Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2015-10-28 14:15 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Paolo Bonzini, Andreas Färber, Richard Henderson
Current default behavior of QEMU is to silently disable features that
are not supported by the host when a CPU model is requested in the
command-line. This means that in addition to risking breaking guest ABI
by default, we are silent about it.
I would like to enable "enforce" by default, but this can easily break
existing production systems because of the way libvirt makes assumptions
about CPU models today (this will change in the future, once QEMU
provide a proper interface for checking if a CPU model is runnable).
But there's no reason we should be silent about it. So, change
target-i386 to enable "check" mode by default so at least we have some
warning printed to stderr (and hopefully logged somewhere) when QEMU
disables a feature that is not supported by the host system.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target-i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index c1a9e09..9280bfc 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -3141,7 +3141,7 @@ static Property x86_cpu_properties[] = {
DEFINE_PROP_BOOL("hv-reset", X86CPU, hyperv_reset, false),
DEFINE_PROP_BOOL("hv-vpindex", X86CPU, hyperv_vpindex, false),
DEFINE_PROP_BOOL("hv-runtime", X86CPU, hyperv_runtime, false),
- DEFINE_PROP_BOOL("check", X86CPU, check_cpuid, false),
+ DEFINE_PROP_BOOL("check", X86CPU, check_cpuid, true),
DEFINE_PROP_BOOL("enforce", X86CPU, enforce_cpuid, false),
DEFINE_PROP_BOOL("kvm", X86CPU, expose_kvm, true),
DEFINE_PROP_UINT32("level", X86CPU, env.cpuid_level, 0),
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] target-i386: Finally enable "check" mode by default
2015-10-28 14:15 [Qemu-devel] [PULL 0/2] target-i386: Finally enable "check" mode by default Eduardo Habkost
2015-10-28 14:15 ` [Qemu-devel] [PULL 1/2] target-i386: Don't left shift negative constant Eduardo Habkost
2015-10-28 14:15 ` [Qemu-devel] [PULL 2/2] target-i386: Enable "check" mode by default Eduardo Habkost
@ 2015-10-28 15:52 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-10-28 15:52 UTC (permalink / raw)
To: Eduardo Habkost
Cc: QEMU Developers, Paolo Bonzini, Andreas Färber,
Richard Henderson
On 28 October 2015 at 14:15, Eduardo Habkost <ehabkost@redhat.com> wrote:
> We now have fixed the issues that caused unnecessary warnings in TCG mode and
> on "make check", and I am applying the check-mode patch again.
>
> The following changes since commit 7e038b94e74e1c2d1b3598e2e4b0b5c8b79a7278:
>
> Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2015-10-27 10:10:46 +0000)
>
> are available in the git repository at:
>
> git://github.com/ehabkost/qemu.git tags/x86-pull-request
>
> for you to fetch changes up to 15e41345906d29a319cc9cdf566347bf79134d24:
>
> target-i386: Enable "check" mode by default (2015-10-27 16:12:15 -0200)
>
> ----------------------------------------------------------------
> target-i386: finally enable "check" mode by default
>
> ----------------------------------------------------------------
>
> Eduardo Habkost (2):
> target-i386: Don't left shift negative constant
> target-i386: Enable "check" mode by default
>
> target-i386/cpu.c | 2 +-
> target-i386/translate.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.1.0
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-28 15:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-28 14:15 [Qemu-devel] [PULL 0/2] target-i386: Finally enable "check" mode by default Eduardo Habkost
2015-10-28 14:15 ` [Qemu-devel] [PULL 1/2] target-i386: Don't left shift negative constant Eduardo Habkost
2015-10-28 14:15 ` [Qemu-devel] [PULL 2/2] target-i386: Enable "check" mode by default Eduardo Habkost
2015-10-28 15:52 ` [Qemu-devel] [PULL 0/2] target-i386: Finally enable " Peter Maydell
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).