mbox

[PULL,0/5] X86 patch queue, 2015-05-29

Message ID 1432922664-15129-1-git-send-email-ehabkost@redhat.com
State New
Headers show

Pull-request

git://github.com/ehabkost/qemu.git tags/x86-pull-request

Message

Eduardo Habkost May 29, 2015, 6:04 p.m. UTC
The following changes since commit 2cc3bdbe2d3908f7a813d1c2d774cc2bf07746cd:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2015-05-29' into staging (2015-05-29 15:32:15 +0100)

are available in the git repository at:

  git://github.com/ehabkost/qemu.git tags/x86-pull-request

for you to fetch changes up to d032544e08ed07c66afd45ca8a8420ca202fab75:

  arch_init: Drop target-x86_64.conf (2015-05-29 14:46:32 -0300)

----------------------------------------------------------------
X86 patch queue, 2015-05-29

----------------------------------------------------------------

Andreas Färber (1):
  pc: Ensure non-zero CPU ref count after attaching to ICC bus

Chen Fan (1):
  apic: map APIC's MMIO region at each CPU's address space

Eduardo Habkost (1):
  target-i386: Register QOM properties for feature flags

Ikey Doherty (1):
  arch_init: Drop target-x86_64.conf

Zhu Guihua (1):
  apic: convert ->busdev.qdev casts to C casts

 Makefile                             |   7 +-
 arch_init.c                          |   1 -
 exec.c                               |   5 ++
 hw/i386/pc.c                         |  18 ++---
 hw/intc/apic.c                       |   9 ++-
 hw/intc/apic_common.c                |  14 ++--
 include/exec/memory.h                |   5 ++
 sysconfigs/target/target-x86_64.conf |   0
 target-i386/cpu.c                    | 124 +++++++++++++++++++++++++++++++++++
 9 files changed, 158 insertions(+), 25 deletions(-)
 delete mode 100644 sysconfigs/target/target-x86_64.conf

Comments

Peter Maydell May 29, 2015, 6:57 p.m. UTC | #1
On 29 May 2015 at 19:04, Eduardo Habkost <ehabkost@redhat.com> wrote:
> The following changes since commit 2cc3bdbe2d3908f7a813d1c2d774cc2bf07746cd:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2015-05-29' into staging (2015-05-29 15:32:15 +0100)
>
> are available in the git repository at:
>
>   git://github.com/ehabkost/qemu.git tags/x86-pull-request
>
> for you to fetch changes up to d032544e08ed07c66afd45ca8a8420ca202fab75:
>
>   arch_init: Drop target-x86_64.conf (2015-05-29 14:46:32 -0300)
>
> ----------------------------------------------------------------
> X86 patch queue, 2015-05-29

Hi. I'm afraid this patchset provokes a lot of warnings from
clang's undefined-behaviour sanitizer when we run make check:

/home/petmay01/linaro/qemu-for-merges/hw/intc/apic_common.c:314:55:
runtime error: left shift of 1048575 by 12 places cannot be
represented in type 'int'

This is because this:
target-i386/cpu.h:#define MSR_IA32_APICBASE_BASE (0xfffff<<12)

is shifting a 1 into the sign bit of a signed integer. You need
to write 0xfffffU to force an unsigned shift here.

(The undef sanitizer is one of those things I don't really
expect submaintainers to run but which I have enabled for
my build process. At the moment we're almost clean for a
make check run, so I'm keen to avoid introducing new warnings.)

thanks
-- PMM
Eduardo Habkost May 29, 2015, 7:45 p.m. UTC | #2
On Fri, May 29, 2015 at 07:57:16PM +0100, Peter Maydell wrote:
> On 29 May 2015 at 19:04, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > The following changes since commit 2cc3bdbe2d3908f7a813d1c2d774cc2bf07746cd:
> >
> >   Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2015-05-29' into staging (2015-05-29 15:32:15 +0100)
> >
> > are available in the git repository at:
> >
> >   git://github.com/ehabkost/qemu.git tags/x86-pull-request
> >
> > for you to fetch changes up to d032544e08ed07c66afd45ca8a8420ca202fab75:
> >
> >   arch_init: Drop target-x86_64.conf (2015-05-29 14:46:32 -0300)
> >
> > ----------------------------------------------------------------
> > X86 patch queue, 2015-05-29
> 
> Hi. I'm afraid this patchset provokes a lot of warnings from
> clang's undefined-behaviour sanitizer when we run make check:
> 
> /home/petmay01/linaro/qemu-for-merges/hw/intc/apic_common.c:314:55:
> runtime error: left shift of 1048575 by 12 places cannot be
> represented in type 'int'
> 
> This is because this:
> target-i386/cpu.h:#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
> 
> is shifting a 1 into the sign bit of a signed integer. You need
> to write 0xfffffU to force an unsigned shift here.
> 
> (The undef sanitizer is one of those things I don't really
> expect submaintainers to run but which I have enabled for
> my build process. At the moment we're almost clean for a
> make check run, so I'm keen to avoid introducing new warnings.)

I will submit a fix and send a new pull request later. Thanks!

(I will also add a new build configuration to my setup using clang and
-fsanitize=undefined)