1. 01 4月, 2014 6 次提交
    • P
    • S
      configure: add option to disable -fstack-protector flags · 63678e17
      Steven Noonan 提交于
      The -fstack-protector flag family is useful for ensuring safety and for
      debugging, but has a performance impact. Here are some boot time comparisons of
      the various versions of -fstack-protector using qemu-system-arm on an x86_64
      host:
      
          # -fstack-protector-all
          Startup finished in 1.810s (kernel) + 12.331s (initrd) + 49.016s (userspace) = 1min 3.159s
          Startup finished in 1.801s (kernel) + 12.287s (initrd) + 47.925s (userspace) = 1min 2.013s
          Startup finished in 1.812s (kernel) + 12.302s (initrd) + 47.995s (userspace) = 1min 2.111s
      
          # -fstack-protector-strong
          Startup finished in 1.744s (kernel) + 11.223s (initrd) + 44.688s (userspace) = 57.657s
          Startup finished in 1.721s (kernel) + 11.222s (initrd) + 44.194s (userspace) = 57.138s
          Startup finished in 1.693s (kernel) + 11.250s (initrd) + 44.426s (userspace) = 57.370s
      
          # -fstack-protector
          Startup finished in 1.705s (kernel) + 11.409s (initrd) + 43.563s (userspace) = 56.677s
          Startup finished in 1.877s (kernel) + 11.137s (initrd) + 43.719s (userspace) = 56.734s
          Startup finished in 1.708s (kernel) + 11.141s (initrd) + 43.628s (userspace) = 56.478s
      
          # no stack protector
          Startup finished in 1.743s (kernel) + 11.190s (initrd) + 43.709s (userspace) = 56.643s
          Startup finished in 1.763s (kernel) + 11.216s (initrd) + 43.767s (userspace) = 56.747s
          Startup finished in 1.711s (kernel) + 11.283s (initrd) + 43.878s (userspace) = 56.873s
      
      This patch introduces a configure option to disable the stack protector
      entirely, and conditional stack protector flag selection (in order,
      based on availability): -fstack-protector-strong, -fstack-protector-all,
      no stack protector.
      Signed-off-by: NSteven Noonan <snoonan@amazon.com>
      Cc: Anthony Liguori <aliguori@amazon.com>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      [Prefer -fstack-protector-all to -fstack-protector, suggested by
       Laurent Desnogues. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      63678e17
    • C
      pci: Fix clearing IRQs on reset · 58b59014
      Cole Robinson 提交于
      irq_state is cleared before calling pci_device_deassert_intx, but the
      latter misbehaves if the former isn't accurate. In this case, any raised
      IRQs are not cleared, which hits an assertion in pcibus_reset:
      
      qemu-system-x86_64: hw/pci/pci.c:250: pcibus_reset: Assertion
      `bus->irq_count[i] == 0' failed.
      
      pci_device_deassert_intx should clear irq_state anyways, so add
      an assert.
      
      This fixes migration with usb2 + usb-tablet.
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      Message-id: 7da1ad94ce027183b4049c2de370cb191b0073c1.1396290569.git.crobinso@redhat.com
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      58b59014
    • P
      Merge remote-tracking branch 'remotes/afaerber/tags/qom-cpu-for-2.0' into staging · 7d4d7975
      Peter Maydell 提交于
      QOM CPUState refactorings / X86CPU
      
      * X86CPU IA32e 1GB paging support
      * Performance quickfix for CPU() cast macro
      
      # gpg: Signature made Mon 31 Mar 2014 18:33:27 BST using RSA key ID 3E7E013F
      # gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
      # gpg:                 aka "Andreas Färber <afaerber@suse.com>"
      
      * remotes/afaerber/tags/qom-cpu-for-2.0:
        cpu: Avoid QOM casts for CPU()
        target-i386: x86_cpu_get_phys_page_debug(): support 1GB page translation
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7d4d7975
    • A
      cpu: Avoid QOM casts for CPU() · 0d6d1ab4
      Andreas Färber 提交于
      CPU address spaces touching load and store helpers as well as the
      movement of (almost) all fields from CPU_COMMON to CPUState have led to
      a noticeable increase of CPU() usage in "hot" paths for both TCG and KVM.
      
      While CPU()'s OBJECT_CHECK() might help detect development errors, i.e.
      in form of crashes due to QOM vs. non-QOM mismatches rather than QOM
      type mismatches, it is not really needed at runtime since mostly used in
      CPU-specific paths, coming from a target-specific CPU subtype. If that
      pointer is damaged, other errors are highly likely to occur elsewhere
      anyway.
      
      Keep the CPU() macro for a consistent developer experience and for
      flexibility to exchange its implementation, but turn it into a pure,
      unchecked C cast for now.
      
      Compare commit 6e42be7c.
      Reported-by: NLaurent Desnogues <laurent.desnogues@gmail.com>
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      0d6d1ab4
    • L
      target-i386: x86_cpu_get_phys_page_debug(): support 1GB page translation · c8c14bcb
      Luiz Capitulino 提交于
      Linux guests, when using more than 4GB of RAM, may end up using 1GB pages
      to store (kernel) data. When this happens, we're unable to debug a running
      Linux kernel with GDB:
      
      (gdb) p node_data[0]->node_id
      Cannot access memory at address 0xffff88013fffd3a0
      (gdb)
      
      GDB returns this error because x86_cpu_get_phys_page_debug() doesn't support
      translating 1GB pages in IA-32e paging mode and returns an error to GDB.
      
      This commit adds support for 1GB page translation for IA32e paging.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      c8c14bcb
  2. 31 3月, 2014 1 次提交
  3. 28 3月, 2014 6 次提交
    • P
      Merge remote-tracking branch 'remotes/rth/tcg-arm-unaligned' into staging · b3706faf
      Peter Maydell 提交于
      * remotes/rth/tcg-arm-unaligned:
        tcg-arm: Avoid ldrd/strd for user-only emulation
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b3706faf
    • P
      Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging · 3b6144bd
      Peter Maydell 提交于
      acpi,pc,build bug fixes
      
      Here are some bugfixes for 2.0.
      
      A bugfix for acpi for pci bridges, and a build fix for
      old systems without pthread_setname_np: both fix regressions
      so we definitely want to include them.
      HPET fix is not for a regression but looks very safe,
      fixes a nasty bug and has been on list for a while.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Fri 28 Mar 2014 12:00:12 GMT using RSA key ID D28D5469
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
      
      * remotes/mst/tags/for_upstream:
        acpi: fix ACPI generation for pci bridges
        Don't enable a HPET timer if HPET is disabled
        Detect pthread_setname_np at configure time
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3b6144bd
    • M
      acpi: fix ACPI generation for pci bridges · b89834f4
      Marcel Apfelbaum 提交于
      Commit 8dcf525a
          acpi-build: append description for non-hotplug
      appended description for all occupied non hotpluggable PCI slots.
      However the bridge devices are already added to SSDT,
      adding them again will create an incorrect SSDT table.
      
      Fixed by skipping the pci bridge devices, marking them as 'system'.
      Signed-off-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      b89834f4
    • R
      tcg-arm: Avoid ldrd/strd for user-only emulation · 1a8e80d7
      Richard Henderson 提交于
      The arm ldrd/strd insns must cause alignment traps, whereas
      at least for armv7 ldr/str must handle unaligned operations.
      
      While this is hardly the only problem facing user-only emu,
      this solves one problem for i386 on armv7 emulation.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Reported-by: NHuw Davies <huw@codeweavers.com>
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      1a8e80d7
    • P
      Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0' into staging · 9c5793c5
      Peter Maydell 提交于
      PowerPC queue for 2.0
      
      * OpenPIC fix
      * MSR fixes for POWER7 upwards
      * TCG instruction set support fix for POWER8
      
      # gpg: Signature made Thu 27 Mar 2014 16:12:12 GMT using RSA key ID 3E7E013F
      # gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
      # gpg:                 aka "Andreas Färber <afaerber@suse.com>"
      
      * remotes/afaerber/tags/ppc-for-2.0:
        target-ppc: MSR_POW not supported on POWER7/7+/8
        target-ppc: POWER7+ supports the MSR_VSX bit
        target-ppc: POWER8 supports isel
        target-ppc: POWER8 supports the MSR_LE bit
        intc/openpic_kvm: Fix MemListener delete region callback function
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9c5793c5
    • P
      Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-27' into staging · c6c09ba9
      Peter Maydell 提交于
      trivial patches for 2014-03-27
      
      # gpg: Signature made Thu 27 Mar 2014 15:23:53 GMT using RSA key ID 74F0C838
      # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@debian.org>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
      #      Subkey fingerprint: E190 8639 3B10 B51B AC2C  8B73 5253 C5AD 74F0 C838
      
      * remotes/mjt/tags/trivial-patches-2014-03-27: (23 commits)
        linux-user: remove duplicate statement
        hw/timer/grlib_gptimer: remove unnecessary assignment
        hw/pci-host/apb.c: Avoid shifting left into sign bit
        hw/intc/xilinx_intc: Avoid shifting left into sign bit
        hw/intc/slavio_intctl: Avoid shifting left into sign bit
        tests/libqos/pci-pc: Avoid shifting left into sign bit
        hw/ppc: Avoid shifting left into sign bit
        hw/intc/openpic: Avoid shifting left into sign bit
        hw/usb/hcd-ohci.c: Avoid shifting left into sign bit
        target-mips: Avoid shifting left into sign bit
        hw/i386/acpi_build.c: Avoid shifting left into sign bit
        hw/pci/pci_host.c: Avoid shifting left into sign bit
        hw/intc/apic.c: Use uint32_t for mask word in foreach_apic
        target-i386: Avoid shifting left into sign bit
        CODING_STYLE: Section about mixed declarations
        doc: update default PowerPC framebuffer settings
        doc: update sun4m documentation
        fix return check for KVM_GET_DIRTY_LOG ioctl
        target-i386: Add missing 'static' and 'const' attributes
        util: Add 'static' attribute to function implementation
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c6c09ba9
  4. 27 3月, 2014 27 次提交