1. 20 9月, 2017 28 次提交
  2. 19 9月, 2017 12 次提交
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 7ec6a364
      Peter Maydell 提交于
      * warning improvements (Alistair)
      * KVM code cleanup (David)
      * scsi-block support for rerror/werror (Fam)
      * support for >64 vCPUs in Windows (Gonglei)
      * SCSI fix (Hannes)
      * SSE bugfixes (Joseph)
      * SmartOS compilation fixes (Kamil)
      * Hyper-V frequency MSR support (Ladi)
      * move more files to accel/tcg (Philippe, Thomas)
      * multiboot validation (PJP)
      * virtqueue size configuration for virtio-scsi (Richard)
      * Hyper-V header cleanup (Roman)
      * Maintainer email update (Guangrong)
      * checkpatch.pl --branch (Daniel), fixes (Greg)
      * introducing scsi/ (me)
      
      # gpg: Signature made Tue 19 Sep 2017 15:21:26 BST
      # gpg:                using RSA key 0xBFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream: (51 commits)
        docker: fix creation of archives
        default-configs: Replace $(and ...) with $(call land, ...)
        osdep.h: Prohibit disabling assert() in supported builds
        checkpatch: add hwaddr to @typeList
        accel/hax: move hax-stub.c to accel/stubs/
        target/i386: fix "info mem" for LA57 mode
        scripts: let checkpatch.pl process an entire GIT branch
        update-linux-headers: prepare for hyperv.h removal
        hyperv: add header with protocol definitions
        i386/cpu/hyperv: support over 64 vcpus for windows guests
        Convert remaining single line fprintf() to warn_report()
        Makefile: Remove libqemustub.a
        ptimer-test: do not link to libqemustub.a/libqemuutil.a
        target/mips: Convert VM clock update prints to warn_report
        General warn report fixups
        Convert multi-line fprintf() to warn_report()
        Convert single line fprintf(.../n) to warn_report()
        Convert remaining error_report() to warn_report()
        hw/i386: Improve some of the warning messages
        test-qga: add missing qemu-ga tool dependency
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7ec6a364
    • P
      docker: fix creation of archives · 7437866b
      Paolo Bonzini 提交于
      The pixman submodule does not exist anymore, and its removal broke
      docker-based tests.  Fix it.
      
      Cc: Fam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7437866b
    • T
      default-configs: Replace $(and ...) with $(call land, ...) · d321e6d5
      Thomas Huth 提交于
      Using $(and ...) is dangerous here: It only works as long as the first
      argument is set to 'y' or completely unset. It does not work if the
      first argument is set to 'n' for example. Let's use the "land" make
      function instead which has been written explicitely for this purpose.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1505759538-15365-1-git-send-email-thuth@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d321e6d5
    • E
      osdep.h: Prohibit disabling assert() in supported builds · 262a69f4
      Eric Blake 提交于
      We already have several files that knowingly require assert()
      to work, sometimes because refactoring the code for proper
      error handling has not been tackled yet; there are probably
      other files that have a similar situation but with no comments
      documenting the same.  In fact, we have places in migration
      that handle untrusted input with assertions, where disabling
      the assertions risks a worse security hole than the current
      behavior of losing the guest to SIGABRT when migration fails
      because of the assertion.  Promote our current per-file
      safety-valve to instead be project-wide, and expand it to also
      cover glib's g_assert().
      
      Note that we do NOT want to encourage 'assert(side-effects);'
      (that is a bad practice that prevents copy-and-paste of code to
      other projects that CAN disable assertions; plus it costs
      unnecessary reviewer mental cycles to remember whether a project
      special-cases the crippling of asserts); and we would LIKE to
      fix migration to not rely on asserts (but that takes a big code
      audit).  But in the meantime, we DO want to send a message
      that anyone that disables assertions has to tweak code in order
      to compile, making it obvious that they are taking on additional
      risk that we are not going to support.  At the same time, leave
      comments mentioning NDEBUG in files that we know still need to
      be scrubbed, so there is at least something to grep for.
      
      It would be possible to come up with some other mechanism for
      doing runtime checking by default, but which does not abort
      the program on failure, while leaving side effects in place
      (unlike how crippling assert() avoids even the side effects),
      perhaps under the name q_verify(); but it was not deemed worth
      the effort (developers should not have to learn a replacement
      when the standard C macro works just fine, and it would be a lot
      of churn for little gain).  The patch specifically uses #error
      rather than #warn so that a user is forced to tweak the header
      to acknowledge the issue, even when not using a -Werror
      compilation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      
      Message-Id: <20170911211320.25385-1-eblake@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      262a69f4
    • G
      checkpatch: add hwaddr to @typeList · 825bfa00
      Greg Kurz 提交于
      The script doesn't know about all possible types and learn them as
      it parses the code. If it reaches a line with a type cast but the
      type isn't known yet, it is misinterpreted as an identifier.
      
      For example the following line:
      
          foo = (hwaddr) -1;
      
      results in the following false-positive to be reported:
      
      ERROR: spaces required around that '-' (ctx:VxV)
      
      Let's add this standard QEMU type to the list of pre-known types.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <150538015789.8149.10902725348939486674.stgit@bahia.lan>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      825bfa00
    • P
      accel/hax: move hax-stub.c to accel/stubs/ · 4c44a007
      Philippe Mathieu-Daudé 提交于
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20170913221149.30382-1-f4bug@amsat.org>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      4c44a007
    • P
      target/i386: fix "info mem" for LA57 mode · 128b52e8
      Paolo Bonzini 提交于
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      128b52e8
    • D
      scripts: let checkpatch.pl process an entire GIT branch · 8e1fe175
      Daniel P. Berrange 提交于
      Currently before submitting a series, devs should run checkpatch.pl
      across each patch to be submitted. This can be automated using a
      command such as:
      
        git rebase -i master -x 'git show | ./scripts/checkpatch.pl -'
      
      This is rather long winded to type, so this patch introduces a way
      to tell checkpatch.pl to validate a series of GIT revisions.
      
      There are now three modes it can operate in 1) check a patch 2) check a source
      file, or 3) check a git branch.
      
      If no flags are given, the mode is determined by checking the args passed to
      the command. If the args contain a literal ".." it is treated as a GIT revision
      list. If the args end in ".patch" or equal "-" it is treated as a patch file.
      Otherwise it is treated as a source file.
      
      This automatic guessing can be overridden using --[no-]patch --[no-]file or
      --[no-]branch
      
      For example to check a GIT revision list:
      
          $ ./scripts/checkpatch.pl master..
          total: 0 errors, 0 warnings, 297 lines checked
      
          b886d352a2bf58f0996471fb3991a138373a2957 has no obvious style problems and is ready for submission.
          total: 0 errors, 0 warnings, 182 lines checked
      
          2a731f9a9ce145e0e0df6d42dd2a3ce4dfc543fa has no obvious style problems and is ready for submission.
          total: 0 errors, 0 warnings, 102 lines checked
      
          11844169bcc0c8ed4449eb3744a69877ed329dd7 has no obvious style problems and is ready for submission.
      
      If a genuine patch filename contains the characters '..' it is
      possible to force interpretation of the arg as a patch
      
        $ ./scripts/checkpatch.pl --patch master..
      
      will force it to load a patch file called "master..", or equivalently
      
        $ ./scripts/checkpatch.pl --no-branch master..
      
      will simply turn off guessing of GIT revision lists.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <20170913091000.9005-1-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8e1fe175
    • R
      update-linux-headers: prepare for hyperv.h removal · 40bf8e9a
      Roman Kagan 提交于
      All definitions related to Hyper-V emulation are now taken from the QEMU
      own header, so the one imported from the kernel is no longer needed.
      
      Unfortunately it's included by kvm_para.h.
      
      So, until this is fixed in the kernel, teach the header harvesting
      script to substitute kernel's hyperv.h with a dummy.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Message-Id: <20170713201522.13765-3-rkagan@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      40bf8e9a
    • R
      hyperv: add header with protocol definitions · 5e953812
      Roman Kagan 提交于
      The definitions for Hyper-V emulation are currently taken from a header
      imported from the Linux kernel.
      
      However, as these describe a third-party protocol rather than a kernel
      API, it probably wasn't a good idea to publish it in the kernel uapi.
      
      This patch introduces a header that provides all the necessary
      definitions, superseding the one coming from the kernel.
      
      The new header supports (temporary) coexistence with the kernel one.
      The constants explicitly named in the Hyper-V specification (e.g. msr
      numbers) are defined in a non-conflicting way.  Other constants and
      types have got new names.
      
      While at this, the protocol data structures are defined in a more
      conventional way, without bitfields, enums, and excessive unions.
      
      The code using this stuff is adjusted, too; it can now be built both
      with and without the kernel header in the tree.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Message-Id: <20170713201522.13765-2-rkagan@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5e953812
    • G
      i386/cpu/hyperv: support over 64 vcpus for windows guests · 6c69dfb6
      Gonglei 提交于
      Starting with Windows Server 2012 and Windows 8, if
      CPUID.40000005.EAX contains a value of -1, Windows assumes specific
      limit to the number of VPs. In this case, Windows Server 2012
      guest VMs may use more than 64 VPs, up to the maximum supported
      number of processors applicable to the specific Windows
      version being used.
      
      https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
      
      For compatibility, Let's introduce a new property for X86CPU,
      named "x-hv-max-vps" as Eduardo's suggestion, and set it
      to 0x40 before machine 2.10.
      
      (The "x-" prefix indicates that the property is not supposed to
      be a stable user interface.)
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Message-Id: <1505143227-14324-1-git-send-email-arei.gonglei@huawei.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6c69dfb6
    • A
      Convert remaining single line fprintf() to warn_report() · 05cb8ed5
      Alistair Francis 提交于
      Convert any remaining uses of fprintf(stderr, "warning:"...
      to use warn_report() instead. This helps standardise on a single
      method of printing warnings to the user.
      
      All of the warnings were changed using this command:
        find ./* -type f -exec sed -i 's|fprintf(.*".*warning[,:] |warn_report("|Ig' {} +
      
      The #include lines and chagnes to the test Makefile were manually
      updated to allow the code to compile.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-Id: <2c94ac3bb116cc6b8ebbcd66a254920a69665515.1503077821.git.alistair.francis@xilinx.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      05cb8ed5