1. 20 2月, 2014 7 次提交
    • F
      module: implement module loading · e26110cf
      Fam Zheng 提交于
      This patch adds loading, stamp checking and initialization of modules.
      
      The init function of dynamic module is no longer directly called as
      __attribute__((constructor)) in static linked version, it is called
      only after passed the checking of presense of stamp symbol:
      
          qemu_stamp_$RELEASEHASH
      
      where $RELEASEHASH is generated by hashing version strings and content
      of configure script.
      
      With this, modules built from a different tree/version/configure will
      not be loaded.
      
      The module loading code requires gmodule-2.0.
      
      Modules are searched under
       - CONFIG_MODDIR
       - executable folder (to allow running qemu-{img,io} in the build
         directory)
       - ../ of executable folder (to allow running system emulator in the
         build directory)
      
      Modules are linked under their subdir respectively, then copied to top
      level of build directory for above convinience, e.g.:
          $(BUILD_DIR)/block/curl.so -> $(BUILD_DIR)/block-curl.so
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e26110cf
    • F
      rules.mak: introduce DSO rules · 17969268
      Fam Zheng 提交于
      Add necessary rules and flags for shared object generation.
      The new rules introduced here are:
      
      1) %.o in $(common-obj-m) is compiled to %.o, then linked to %.so.
      
      2) %.mo in $(common-obj-m) is the placeholder for %.so for pattern
      matching in Makefile. It's linked to "-shared" with all its dependencies
      (multiple *.o) as input. Which means the list of depended objects must
      be specified in each sub-Makefile.objs:
      
          foo.mo-objs := bar.o baz.o qux.o
      
      in the same style with foo.o-cflags and foo.o-libs. The objects here
      will be prefixed with "$(obj)/" if it's a subdirectory Makefile.objs.
      
      3) For all files ending up in %.so, the following is added automatically:
      
          foo.o-cflags += -fPIC -DBUILD_DSO
      
      Also introduce --enable-modules in configure, the option will enable
      support of shared object build. Otherwise objects are static linked to
      executables.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      17969268
    • P
      darwin: do not use -mdynamic-no-pic · 13b6ce0e
      Paolo Bonzini 提交于
      While -mdynamic-no-pic can speed up the code somewhat, it is only used
      on the legacy PowerPC Mac OS X, and I am not sure if anyone is still
      testing that.  Disabling PIC can cause problems when enabling modules,
      so do not do that.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      13b6ce0e
    • F
      block: use per-object cflags and libs · 6ebc91e5
      Fam Zheng 提交于
      No longer adds flags and libs for them to global variables, instead
      create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is
      used as per object cflags and libs.
      
      This removes unwanted dependencies from libcacard.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      [Split from Fam's patch to enable modules. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6ebc91e5
    • F
      rules.mak: allow per object cflags and libs · 5c0d52bc
      Fam Zheng 提交于
      Adds extract-libs in LINK to expand any "per object libs", the syntax to define
      such a libs options is like:
      
              foo.o-libs := $(CURL_LIBS)
      
      in block/Makefile.objs.
      
      Similarly,
      
              foo.o-cflags := $(FOO_CFLAGS)
      
      is also supported.
      
      "foo.o" must be listed in a nested var (e.g. common-obj-y) to make the
      option variables effective.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5c0d52bc
    • F
      rules.mak: fix $(obj) to a real relative path · ba1183da
      Fam Zheng 提交于
      Makefile.target includes rule.mak and unnested common-obj-y, then prefix
      them with '../', this will ignore object specific QEMU_CFLAGS in subdir
      Makefile.objs:
      
          $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS)
      
      Because $(obj) here is './block', instead of '../block'. This doesn't
      hurt compiling because we basically build all .o from top Makefile,
      before entering Makefile.target, but it will affact arriving per-object
      libs support.
      
      The starting point of $(obj) is passed in as argument of unnest-vars, as
      well as nested variables, so that different Makefiles can pass in a
      right value.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ba1183da
    • F
      util: Split out exec_dir from os_find_datadir · 10f5bff6
      Fam Zheng 提交于
      With this change, main() calls qemu_init_exec_dir and uses argv[0] to
      init exec_dir. The saved value can be retrieved with
      qemu_get_exec_dir later. It will be reused by module loading.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      10f5bff6
  2. 17 2月, 2014 1 次提交
    • B
      Fix QEMU build on OpenBSD on x86 archs · 46eef33b
      Brad 提交于
      This resolves the build issue with building the ROMs on OpenBSD on x86 archs.
      As of OpenBSD 5.3 the compiler builds PIE binaries by default and thus the
      whole OS/packages and so forth. The ROMs need to have PIE disabled.
      Check in configure whether the compiler supports the flags for disabling
      PIE, and if it does then use them for building the ROMs. This fixes the
      following buildbot failure:
      
      >From the OpenBSD buildbots..
        Building optionrom/multiboot.img
      ld: multiboot.o: relocation R_X86_64_16 can not be used when making a shared object; recompile with -fPIC
      
      Signed-off by: Brad Smith <brad@comstyle.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      46eef33b
  3. 16 2月, 2014 3 次提交
    • M
      libvixl: fix 64bit constants usage · 0dbcf95a
      Michael Tokarev 提交于
      Since commit 999b53ec:
       Author: Claudio Fontana <claudio.fontana@linaro.org>
       Date:   Wed Feb 5 17:27:28 2014 +0000
      
          disas: Implement disassembly output for A64
      
          Use libvixl to implement disassembly output in debug
          logs for A64, for use with both AArch64 hosts and targets.
      
      disas/libvixl/ contains functions which uses 64bit constants
      without using appropriate suffixes, which fails on 32bits.
      
      Fix this by using ULL suffix.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0dbcf95a
    • P
      Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-15' into staging · 078a1c37
      Peter Maydell 提交于
      trivial patches for 2014-02-15
      
      # gpg: Signature made Sat 15 Feb 2014 12:10:46 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-02-15:
        char/serial: Fix emptyness check
        gitignore: anchor all ignored names
        vl: trim includes
        vl: remove old, long-unused defines
        net: declare struct iovec in checksum.h to fix compiler warning
        linux-user: refactor do_socketcall()
        configure: add hints to a remedy for feature_not_found errors
        configure: add hint of libfdt to DTC dependency not found message
        sparc/leon3: Initialize stack pointer
        misc: Fix case Qemu -> QEMU
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      078a1c37
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 44e3a39f
      Peter Maydell 提交于
      Block pull request
      
      # gpg: Signature made Fri 14 Feb 2014 17:26:30 GMT using RSA key ID 81AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # 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: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request:
        block: Open by reference will try device then node_name.
        block: Relax bdrv_lookup_bs constraints.
        blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.
        block: mirror - use local_err to avoid NULL errp
        qemu-iotests: Don't run 005 on vmdk split formats
        block: qemu-iotests - add vhdx log replay tests for qemu-img
        block: qemu-iotests - fix test 070 (vhdx)
        block: Don't throw away errno via error_setg
        block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare
        blockdev: Remove 'type' parameter from blockdev_init()
        sdhci: Drop unnecessary #include
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      44e3a39f
  4. 15 2月, 2014 20 次提交
  5. 14 2月, 2014 4 次提交
  6. 13 2月, 2014 4 次提交
    • P
      Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging · 0888a29c
      Peter Maydell 提交于
      acpi,pc,pci fixes and enhancements
      
      Most changes here are hotplug related:
      
      This merges hotplug infrastructure changes by Igor,
      some acpi related fixes, and PC fixes.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Mon 10 Feb 2014 09:13:26 GMT using RSA key ID D28D5469
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
      # 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: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * remotes/mst/tags/for_upstream:
        ACPI: Remove commented-out code from HPET._CRS
        hw/pci: switch to a generic hotplug handling for PCIDevice
        pci/pcie: convert PCIE hotplug to use hotplug-handler API
        pci/shpc: convert SHPC hotplug to use hotplug-handler API
        acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API
        qdev:pci: refactor PCIDevice to use generic "hotpluggable" property
        hw/acpi: move typeinfo to the file end
        qdev: add "hotpluggable" property to Device
        qdev: add to BusState "hotplug-handler" link
        define hotplug interface
        loader: document that errno is set
        pc.c: better error message on initrd sizing failure
        pc_piix: enable legacy hotplug for Xen
        qtest: don't report signals if qtest driver enabled
        hw:piix4:acpi: reuse pcihp code for legacy PCI hotplug
        pcihp: remove unused AcpiPciHpPciStatus.device_present field
        pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplug
        pcihp: make PCI hotplug mmio handlers indifferent to PCI_HOTPLUG_ADDR
        pcihp: replace enable|disable_device() with oneliners
        pcihp: reduce number of device check events
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0888a29c
    • P
      Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into staging · f673e70c
      Peter Maydell 提交于
      PReP machine and devices
      
      * Cleanups for Raven PCI host bridge
      * Removal of PReP machine and devices from qemu-system-ppcemb
      
      # gpg: Signature made Mon 10 Feb 2014 16:19:03 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/prep-for-upstream:
        prep: Drop from ppcemb-softmmu
        raven: Use constant PCI_NUM_PINS instead of 4
        prep: Kill get_system_io() usage
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f673e70c
    • P
      Merge remote-tracking branch 'remotes/alon/pull-libcacard.glusterfs' into staging · 9d74f6fe
      Peter Maydell 提交于
      * remotes/alon/pull-libcacard.glusterfs:
        libcacard: Don't link with all libraries QEMU links to
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9d74f6fe
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-anthony' into staging · 628a746c
      Peter Maydell 提交于
      Block patches
      
      # gpg: Signature made Sun 09 Feb 2014 08:12:51 GMT using RSA key ID C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      
      * remotes/kevin/tags/for-anthony:
        block: Fix 32 bit truncation in mark_request_serialising()
        blkdebug: Don't leak bs->file on failure
        block: Don't call ROUND_UP with negative values
        block: bdrv_aligned_pwritev: Assert overlap range
        block: Fix memory leaks in bdrv_co_do_pwritev()
        raw: Fix BlockLimits passthrough
        qemu-iotests: add test for qcow2 preallocation with different cluster sizes
        qcow2: check for NULL l2meta
        qcow2: fix offset overflow in qcow2_alloc_clusters_at()
        qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()
        block/iscsi: always fill bs->bl.opt_transfer_length
        block: Fail gracefully with missing filename
        qemu-iotests: enable support for NFS protocol
        qemu-iotests: enable test 016 and 025 to work with NFS protocol
        qemu-iotests: blacklist test 020 for NFS protocol
        qemu-iotests: change _supported_proto to file for various tests
        block: add native support for NFS
        qemu-iotest: Make 077 raw-only
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      628a746c
  7. 12 2月, 2014 1 次提交