1. 30 1月, 2019 1 次提交
  2. 25 1月, 2019 1 次提交
  3. 24 1月, 2019 5 次提交
    • D
      trace: add ability to do simple printf logging via systemtap · 62dd1048
      Daniel P. Berrangé 提交于
      The dtrace systemtap trace backend for QEMU is very powerful but it is
      also somewhat unfriendly to users who aren't familiar with systemtap,
      or who don't need its power right now.
      
        stap -e "....some strange script...."
      
      The 'log' backend for QEMU by comparison is very crude but incredibly
      easy to use:
      
       $ qemu -d trace:qio* ...some args...
       23266@1547735759.137292:qio_channel_socket_new Socket new ioc=0x563a8a39d400
       23266@1547735759.137305:qio_task_new Task new task=0x563a891d0570 source=0x563a8a39d400 func=0x563a86f1e6c0 opaque=0x563a89078000
       23266@1547735759.137326:qio_task_thread_start Task thread start task=0x563a891d0570 worker=0x563a86f1ce50 opaque=0x563a891d9d90
       23273@1547735759.137491:qio_task_thread_run Task thread run task=0x563a891d0570
       23273@1547735759.137503:qio_channel_socket_connect_sync Socket connect sync ioc=0x563a8a39d400 addr=0x563a891d9d90
       23273@1547735759.138108:qio_channel_socket_connect_fail Socket connect fail ioc=0x563a8a39d400
      
      This commit introduces a way to do simple printf style logging of probe
      points using systemtap. In particular it creates another set of tapsets,
      one per emulator:
      
        /usr/share/systemtap/tapset/qemu-*-log.stp
      
      These pre-define probe functions which simply call printf() on their
      arguments. The printf() format string is taken from the normal
      trace-events files, with a little munging to the format specifiers
      to cope with systemtap's more restrictive syntax.
      
      With this you can now do
      
       $ stap -e 'probe qemu.system.x86_64.log.qio*{}'
       22806@1547735341399856820 qio_channel_socket_new Socket new ioc=0x56135d1d7c00
       22806@1547735341399862570 qio_task_new Task new task=0x56135cd66eb0 source=0x56135d1d7c00 func=0x56135af746c0 opaque=0x56135bf06400
       22806@1547735341399865943 qio_task_thread_start Task thread start task=0x56135cd66eb0 worker=0x56135af72e50 opaque=0x56135c071d70
       22806@1547735341399976816 qio_task_thread_run Task thread run task=0x56135cd66eb0
      
      We go one step further though and introduce a 'qemu-trace-stap' tool to
      make this even easier
      
       $ qemu-trace-stap run qemu-system-x86_64 'qio*'
       22806@1547735341399856820 qio_channel_socket_new Socket new ioc=0x56135d1d7c00
       22806@1547735341399862570 qio_task_new Task new task=0x56135cd66eb0 source=0x56135d1d7c00 func=0x56135af746c0 opaque=0x56135bf06400
       22806@1547735341399865943 qio_task_thread_start Task thread start task=0x56135cd66eb0 worker=0x56135af72e50 opaque=0x56135c071d70
       22806@1547735341399976816 qio_task_thread_run Task thread run task=0x56135cd66eb0
      
      This tool is clever in that it will automatically change the
      SYSTEMTAP_TAPSET env variable to point to the directory containing the
      right set of probes for the QEMU binary path you give it. This is useful
      if you have QEMU installed in /usr but are trying to test and trace a
      binary in /home/berrange/usr/qemu-git. In that case you'd do
      
       $ qemu-trace-stap run /home/berrange/usr/qemu-git/bin/qemu-system-x86_64 'qio*'
      
      And it'll make sure /home/berrange/usr/qemu-git/share/systemtap/tapset
      is used for the trace session
      
      The 'qemu-trace-stap' script takes a verbose arg so you can understand
      what it is running
      
       $ qemu-trace-stap run /home/berrange/usr/qemu-git/bin/qemu-system-x86_64 'qio*'
       Using tapset dir '/home/berrange/usr/qemu-git/share/systemtap/tapset' for binary '/home/berrange/usr/qemu-git/bin/qemu-system-x86_64'
       Compiling script 'probe qemu.system.x86_64.log.qio* {}'
       Running script, <Ctrl>-c to quit
       ...trace output...
      
      It can enable multiple probes at once
      
       $ qemu-trace-stap run qemu-system-x86_64 'qio*' 'qcrypto*' 'buffer*'
      
      By default it monitors all existing running processes and all future
      launched proceses. This can be restricted to a specific PID using the
      --pid arg
      
       $ qemu-trace-stap run --pid 2532 qemu-system-x86_64 'qio*'
      
      Finally if you can't remember what probes are valid it can tell you
      
       $ qemu-trace-stap list qemu-system-x86_64
       ahci_check_irq
       ahci_cmd_done
       ahci_dma_prepare_buf
       ahci_dma_prepare_buf_fail
       ahci_dma_rw_buf
       ahci_irq_lower
       ...snip...
      
      Or list just those matching a prefix pattern
      
       $ qemu-trace-stap list -v qemu-system-x86_64 'qio*'
       Using tapset dir '/home/berrange/usr/qemu-git/share/systemtap/tapset' for binary '/home/berrange/usr/qemu-git/bin/qemu-system-x86_64'
       Listing probes with name 'qemu.system.x86_64.log.qio*'
       qio_channel_command_abort
       qio_channel_command_new_pid
       qio_channel_command_new_spawn
       qio_channel_command_wait
       qio_channel_file_new_fd
       ...snip...
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Message-id: 20190123120016.4538-5-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      62dd1048
    • D
      trace: forbid use of %m in trace event format strings · 772f1b37
      Daniel P. Berrangé 提交于
      The '%m' format instructs glibc's printf()/syslog() implementation to
      insert the contents of strerror(errno). Since this is a glibc extension
      it should generally be avoided in QEMU due to need for portability to a
      variety of platforms.
      
      Even though vfio is Linux-only code that could otherwise use "%m", it
      must still be avoided in trace-events files because several of the
      backends do not use the format string and so this error information is
      invisible to them.
      
      The errno string value should be given as an explicit trace argument
      instead, making it accessible to all backends. This also allows it to
      work correctly with future patches that use the format string with
      systemtap's simple printf code.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Message-id: 20190123120016.4538-4-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      772f1b37
    • D
      trace: enforce that every trace-events file has a final newline · 77606363
      Daniel P. Berrangé 提交于
      When generating the trace-events-all file, the build system simply
      concatenates all the individual trace-events files. If any one of those
      files does not have a final newline, the printf format string will have
      the contents of the first line of the next file appended to it, which is
      usually a '#' comment.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Message-id: 20190123120016.4538-3-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      77606363
    • D
      display: ensure qxl log_buf is a nul terminated string · 00f42697
      Daniel P. Berrangé 提交于
      The QXL_IO_LOG command allows the guest to send log messages to the host
      via a buffer in the QXLRam struct. QEMU prints these to the console if
      the qxl 'guestdebug' option is set to non-zero. It will also feed them
      to the trace subsystem if any backends are built-in.
      
      In both cases the log_buf data will get treated as being as a nul
      terminated string, by the printf '%s' format specifier and / or other
      code reading the buffer.
      
      QEMU does nothing to guarantee that the log_buf really is nul terminated,
      so there is potential for out of bounds array access.
      
      This would affect any QEMU which has the log, syslog or ftrace trace
      backends built into QEMU. It can only be triggered if the 'qxl_io_log'
      trace event is enabled, however, so they are not vulnerable without
      specific administrative action to enable this.
      
      It would also affect QEMU if the 'guestdebug' parameter is set to a
      non-zero value, which again is not the default and requires explicit
      admin opt-in.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Message-id: 20190123120016.4538-2-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      00f42697
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190121-pull-request' into staging · f6b06fcc
      Peter Maydell 提交于
      ui: highres logo for sdl and gtk, bugfixes for vnc and egl.
      
      # gpg: Signature made Mon 21 Jan 2019 14:11:39 GMT
      # gpg:                using RSA key 4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/ui-20190121-pull-request:
        egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType
        vnc: detect and optimize pageflips
        sdl: add support for high resolution window icon
        ui: fix icon display for GTK frontend under GNOME Shell with Wayland
        ui: install logo icons to $prefix/share/icons
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f6b06fcc
  4. 23 1月, 2019 3 次提交
    • P
      Merge remote-tracking branch... · fcb700b7
      Peter Maydell 提交于
      Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2019-01-22.for-upstream' into staging
      
      Pullreq 2019-01-22
      
      # gpg: Signature made Tue 22 Jan 2019 11:42:41 GMT
      # gpg:                using RSA key 29C596780F6BCA83
      # gpg: Good signature from "Edgar E. Iglesias (Xilinx key) <edgar.iglesias@xilinx.com>"
      # gpg:                 aka "Edgar E. Iglesias <edgar.iglesias@gmail.com>"
      # Primary key fingerprint: AC44 FEDC 14F7 F1EB EDBF  4151 29C5 9678 0F6B CA83
      
      * remotes/edgar/tags/edgar/xilinx-next-2019-01-22.for-upstream:
        target/microblaze: Add props enabling exceptions on failed bus accesses
        hw/microblaze: s3adsp1800: Create an unimplemented GPIO area
        target/microblaze: Switch to transaction_failed hook
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fcb700b7
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/ipxe-20190122-pull-request' into staging · 9f33051a
      Peter Maydell 提交于
      ipxe: update to latest git master
      
      # gpg: Signature made Tue 22 Jan 2019 06:33:53 GMT
      # gpg:                using RSA key 4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/ipxe-20190122-pull-request:
        ipxe: update to latest git master
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9f33051a
    • P
      Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-01-21' into staging · 952bc8b3
      Peter Maydell 提交于
      nbd patches for 2019-01-21
      
      Add 'qemu-nbd --list' for probing a remote NBD server's advertisements.
      
      - Eric Blake: 0/21 nbd: add qemu-nbd --list
      
      # gpg: Signature made Mon 21 Jan 2019 22:44:27 GMT
      # gpg:                using RSA key A7A16B4A2527436A
      # gpg: Good signature from "Eric Blake <eblake@redhat.com>"
      # gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>"
      # gpg:                 aka "[jpeg image of size 6874]"
      # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A
      
      * remotes/ericb/tags/pull-nbd-2019-01-21: (21 commits)
        iotests: Enhance 223, 233 to cover 'qemu-nbd --list'
        nbd/client: Work around 3.0 bug for listing meta contexts
        qemu-nbd: Add --list option
        nbd/client: Add meta contexts to nbd_receive_export_list()
        nbd/client: Add nbd_receive_export_list()
        nbd/client: Refactor nbd_opt_go() to support NBD_OPT_INFO
        nbd/client: Pull out oldstyle size determination
        nbd/client: Split handshake into two functions
        nbd/client: Refactor return of nbd_receive_negotiate()
        nbd/client: Split out nbd_receive_one_meta_context()
        nbd/client: Split out nbd_send_meta_query()
        nbd/client: Change signature of nbd_negotiate_simple_meta_context()
        nbd/client: Move export name into NBDExportInfo
        nbd/client: Refactor nbd_receive_list()
        qemu-nbd: Avoid strtol open-coding
        nbd/server: Favor [u]int64_t over off_t
        nbd/server: Hoist length check to qmp_nbd_server_add
        qemu-nbd: Sanity check partition bounds
        qemu-nbd: Enhance man page
        maint: Allow for EXAMPLES in texi2pod
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      952bc8b3
  5. 22 1月, 2019 30 次提交
    • E
      target/microblaze: Add props enabling exceptions on failed bus accesses · 2867a96f
      Edgar E. Iglesias 提交于
      Add MicroBlaze CPU properties to enable exceptions on failed
      bus accesses.
      Reviewed-by: NLuc Michel <luc.michel@greensocs.com>
      Reviewed-by: NAlistair Francis <alistair.francis@wdc.com>
      Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      2867a96f
    • E
      hw/microblaze: s3adsp1800: Create an unimplemented GPIO area · 619ddf5b
      Edgar E. Iglesias 提交于
      Create an unimplemented GPIO area instead of leaving it unassigned.
      Reviewed-by: NLuc Michel <luc.michel@greensocs.com>
      Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      619ddf5b
    • P
      target/microblaze: Switch to transaction_failed hook · bdff8123
      Peter Maydell 提交于
      Switch the microblaze target from the old unassigned_access hook
      to the transaction_failed hook.
      
      The notable difference is that rather than it being called
      for all physical memory accesses which fail (including
      those made by DMA devices or by the gdbstub), it is only
      called for those made by the CPU via its MMU. For
      microblaze this makes no difference because none of the
      target CPU code needs to make loads or stores by physical
      address.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      [EI: Add space in qemu_log()]
      Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      bdff8123
    • P
      Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-01-22' into staging · 851aa0a5
      Peter Maydell 提交于
      - Use more CONFIG Makefile switches for qtests
      - Get rid of global_qtests in some more qtests
      - typedef cleanups
      - Fixes for compiling with Clang
      - Force C standard to gnu99
      - Don't use -nographic in qtests
      
      # gpg: Signature made Tue 22 Jan 2019 06:18:41 GMT
      # gpg:                using RSA key 2ED9D774FE702DB5
      # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>"
      # gpg:                 aka "Thomas Huth <thuth@redhat.com>"
      # gpg:                 aka "Thomas Huth <huth@tuxfamily.org>"
      # gpg:                 aka "Thomas Huth <th.huth@posteo.de>"
      # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5
      
      * remotes/huth-gitlab/tags/pull-request-2019-01-22: (26 commits)
        tests: remove rule for nonexisting qdev-monitor-test
        tests/hexloader-test: Don't pass -nographic to the QEMU under test
        configure: Force the C standard to gnu99
        seccomp: Work-around GCC 4.x bug in gnu99 mode
        block: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode
        linux-user: Fix compilation with clang 3.4
        virtio-net: Fix VirtIONet typedef redefinition
        ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode
        ppc: Move spapr-related prototypes from xics.h into a seperate header file
        ui/console: Remove PixelFormat from qemu/typedefs.h
        ui/console: Remove MouseTransformInfo from qemu/typedefs.h
        ui/console: Remove DisplayState/DisplaySurface from "qemu/typedefs.h"
        ui/console: Remove QemuDmaBuf from "qemu/typedefs.h"
        audio: Remove AudioState from "qemu/typedefs.h"
        hw/i386: Remove PCMachineClass from "qemu/typedefs.h"
        hw/char/serial: Remove SerialState from "qemu/typedefs.h"
        hw/bt: Remove HCIInfo from "qemu/typedefs.h"
        hw/i2c/smbus: Remove SMBusDevice from "qemu/typedefs.h"
        hw/ide/ahci: Remove AllwinnerAHCIState from "qemu/typedefs.h"
        hw/pcmcia: Remove PCMCIACardState from "qemu/typedefs.h"
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      851aa0a5
    • G
      ipxe: update to latest git master · fd813c72
      Gerd Hoffmann 提交于
      git shortlog ipxe-qemu-20170717-0600d3ae94-0..ipxe-qemu-20190122-de4565cbe7-0
      -----------------------------------------------------------------------------
      
      Aaron Young (1):
            [libc] Fix strcmp()/strncmp() to return proper values
      
      Ameer Mahagneh (1):
            [golan] Set log_max_qp to 1
      
      Bruce Rogers (1):
            [build] Disable gcc stringop-truncation warnings
      
      Christian Hesse (1):
            [build] Handle R_X86_64_PLT32 from binutils 2.31
      
      Hannes Reinecke (1):
            [iscsi] Parse IPv6 address in root path
      
      Heinrich Schuchardt (2):
            [efi] Accept (and ignore) R_ARM_V4BX relocations
            [efi] Add support for R_ARM_REL32 relocations
      
      Ignat Korchagin (1):
            [efi] Fix error handling path in efi_snp_probe
      
      Janos Mattyasovszky (1):
            [intel] Add PCI device ID for X550-T2
      
      Joseph Wong (1):
            [tg3] Add support for SerDes PHY initialization
      
      Ladi Prosek (1):
            [crypto] Fail fast if cross-certificate source is empty
      
      Laurent Gourvénec (1):
            [acpi] Compute and check checksum for ACPI tables
      
      Martin Habets (2):
            [netdevice] Make netdev_irq_enabled() independent of netdev_irq_supported()
            [sfc] Add support for X25xx adapters
      
      Michael Brown (88):
            [efi] Enumerate PCI BARs in same order as SnpDxe
            [build] Conditionalise use of -mabi=lp64 for ARM64 builds
            [build] Fix use of inline assembly on GCC 4.8 ARM64 builds
            [build] Fix ARM32 EFI builds with current EDK2 headers
            [acpi] Fix spurious uninitialised-variable warning on some gcc versions
            [hyperv] Do not steal ownership from the Gen 2 UEFI firmware
            [shell] Enable "shell" command even when BANNER_TIMEOUT is zero
            [romprefix] Avoid unaligned accesses within ROM headers
            [malloc] Avoid false positive warnings from valgrind
            [linux] Impose receive quota on tap driver
            [efi] Raise TPL when calling UNDI entry point
            [netdevice] Cancel all pending transmissions on any transmit error
            [monojob] Check for job progress only once per timer tick
            [job] Allow jobs to report an arbitrary status message
            [downloader] Allow underlying downloads to provide detailed job progress
            [monojob] Display job status message, if present
            [peerdist] Gather and report peer statistics during download
            [netdevice] Add "hwaddr" setting
            [resolv] Use pass-through interfaces for name resolution multiplexer
            [dns] Report current DNS query as job progress status message
            [efi] Check buffer length for packets retrieved via our SNP protocol
            [efi] Match behaviour of SnpDxe for truncated received packets
            [dns] Ensure DNS names are NUL-terminated when used as diagnostic strings
            [efi] Continue to connect remaining handles after connection errors
            [build] Exclude selected directories from Secure Boot builds
            [efi] Inhibit our driver Start() method during disconnection attempts
            [efi] Allow for building with older versions of elf.h system header
            [crypto] Fix endianness typo in comment
            [crypto] Eliminate repetitions in MD5 round constant table
            [crypto] Add MD4 message digest algorithm
            [ntlm] Add support for NTLM authentication mechanism
            [http] Gracefully handle offers of multiple authentication schemes
            [http] Handle parsing of WWW-Authenticate header within authentication scheme
            [http] Add support for NTLM authentication
            [xen] Skip probing of any unsupported device types
            [http] Include error messages for 4xx and 5xx response codes
            [http] Report unsuccessful response status lines at DBGVL_LOG
            [image] Omit URI query string and fragment from download progress messages
            [legal] Add missing FILE_LICENCE declarations
            [legal] Add missing FILE_LICENCE declarations
            [build] Avoid use of "ld --oformat binary"
            [ena] Add driver for Amazon ENA virtual function NIC
            [skel] Remove MII interface
            [ena] Fix spurious uninitialised variable warning on older versions of gcc
            [xhci] Assume an invalid PSI table if any invalid PSI value is observed
            [intel] Work around broken reset mechanism in i219 devices
            [http] Allow for domain names within NTLM user names
            [xhci] Consume event TRB before reporting completion to USB core
            [efi] Run at TPL_CALLBACK to protect against UEFI timers
            [efi] Raise TPL within EFI_SIMPLE_NETWORK_PROTOCOL entry points
            [efi] Raise TPL within EFI_USB_IO_PROTOCOL entry points
            [process] Include process name in debug messages
            [efi] Drop to TPL_APPLICATION when gathering entropy
            [efi] Raise TPL within EFI_DRIVER_BINDING_PROTOCOL entry points
            [librm] Add facility to provide register and stack dump for CPU exceptions
            [golan] Do not assume all devices are identical
            [lacp] Mark link as blocked if partner is not yet up and running
            [lacp] Fix debug message to match documentation
            [tftp] Prevent potential division by zero
            [profile] Prevent potential division by zero
            [ocsp] Centralise test for whether or not an OCSP check is required
            [ocsp] Allow OCSP checks to be disabled
            [lacp] Check the partner's own state when checking for blocked links
            [efi] Provide Map_Mem() and associated UNDI callbacks
            [time] Add support for the ACPI power management timer
            [rng] Use fixed-point calculations for min-entropy quantities
            [build] Prevent use of MMX and SSE registers
            [undi] Treat invalid IRQ numbers as non-fatal errors
            [librm] Provide symbols for inline code placed into other sections
            [librm] Ensure that inline code symbols are unique
            [tls] Ensure received data list is initialised before calling tls_free()
            [list] Add list_is_first_entry() and list_is_last_entry()
            [tls] Rename tls_session to tls_connection
            [tls] Ensure that window change is propagated to plainstream interface
            [efi] Release SNP devices before starting SAN boot image
            [efi] Do not raise TPL within EFI_DRIVER_BINDING_PROTOCOL.Supported()
            [undi] Include subsystem IDs in broken interrupt device check
            [rhine] Fix usage of mii_read()
            [velocity] Fix usage of mii_read() and mii_write()
            [mii] Separate concepts of MII interface and MII device
            [tcp] Add missing packed attribute on struct tcp_header
            [mii] Fix typo in parameter name
            [http] Work around stateful authentication schemes
            [build] Use positive-form tests when checking for supported warnings
            [rndis] Clean up error handling path in register_rndis()
            [ethernet] Use standard 1500 byte MTU unless explicitly overridden
            [intelxl] Add driver for Intel 40 Gigabit Ethernet NICs
            [zbin] Fix compiler warning with GCC 9
      
      Peter von Konigsmark (2):
            [exanic] Power up optical PHYs (if present)
            [exanic] Add PCI device ID for another X40 variant
      
      Petr Borsodi (3):
            [pci] Correct invalid base-class/sub-class/prog-if order in PCIR
            [util] Improve processing of ROM images in Option::ROM
            [util] Add support for EFI ROM images
      
      Richard Moore (1):
            [intel] Add various PCI device IDs
      
      Rob Taglang (3):
            [intel] Add PCI_ROM entry for Intel i354 NIC
            [intelx] Add PCI_ROM entry for Intel X553 NIC
            [efi] Exclude link-layer header length from MaxPacketSize
      
      Robin Smidsrød (1):
            [util] Support reversed sort ordering when generating NIC list
      
      Roman Kagan (2):
            [rndis] Register netdev with MAC filled
            [vmbus] Do not expect version in version_response
      
      Steven Haber (1):
            [intelx] Add support for Intel X552 NIC
      
      Sylvie Barlow (3):
            [mii] Add mii_find()
            [mii] Add bit-bashing interface
            [icplus] Add driver for IC+ network card
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      fd813c72
    • P
      tests: remove rule for nonexisting qdev-monitor-test · f48a79da
      Paolo Bonzini 提交于
      This test was merged into drive_del-test in 2014.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
      Fixes: e2f3f221 ("Merge of qdev-monitor-test, blockdev-test")
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      f48a79da
    • P
      tests/hexloader-test: Don't pass -nographic to the QEMU under test · 739fc387
      Peter Maydell 提交于
      The hexloader test invokes QEMU with the -nographic argument. This
      is unnecessary, because the qtest_initf() function will pass it
      -display none, which suffices to disable the graphical window.
      It also means that the QEMU process will make the stdin/stdout
      O_NONBLOCK. Since O_NONBLOCK is not per-file descriptor but per
      "file description", this non-blocking behaviour is then shared
      with any other process that's using the stdin/stdout of the
      'make check' run, including make itself. This can result in make
      falling over with "make: write error: stdout" because it got
      an unexpected EINTR trying to write output messages to the terminal.
      This is particularly noticable if running 'make check' in a loop with
        while make check; do true; done
      (It does not affect single make check runs so much because the
      shell will remove the O_NONBLOCK status before it reads the
      terminal for interactive input.)
      
      Remove the unwanted -nographic argument.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      739fc387
    • T
      configure: Force the C standard to gnu99 · 7be41675
      Thomas Huth 提交于
      Different versions of GCC and Clang use different versions of the C standard.
      This repeatedly caused problems already, e.g. with duplicated typedefs:
      
       https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05829.html
      
      or with for-loop variable initializers:
      
       https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00237.html
      
      To avoid these problems, we should enforce the C language version to the
      same level for all compilers. Since our minimum compiler versions is
      GCC v4.8, our best option is "gnu99" for C code right now ("gnu17" is not
      available there yet, and "gnu11" is marked as "experimental"), and "gnu++98"
      for the few C++ code that we have in the repository.
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      7be41675
    • T
      seccomp: Work-around GCC 4.x bug in gnu99 mode · e81e7b52
      Thomas Huth 提交于
      We'd like to compile QEMU with -std=gnu99, but GCC 4.8 currently
      fails to compile qemu-seccomp.c in this mode:
      
      qemu-seccomp.c:45:1: error: initializer element is not constant
       };
       ^
      qemu-seccomp.c:45:1: error: (near initialization for ‘sched_setscheduler_arg[0]’)
      
      This is due to a compiler bug which has just been fixed in GCC 5.0:
      
       https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567
      
      Since we still want to support GCC 4.8 for a while and also want to use
      gnu99 mode, work-around the issue by expanding the macro manually.
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Acked-by: NEduardo Otubo <otubo@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      e81e7b52
    • T
      block: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode · df71ca84
      Thomas Huth 提交于
      The header "scsi-lowlevel.h" of libiscsi 1.9.0 contains some bad
      "inline" prototype definitions which GCC refuses to compile in its
      gnu99 mode:
      
      In file included from block/iscsi.c:52:0:
      /usr/include/iscsi/scsi-lowlevel.h:810:13: error: inline function
      ‘scsi_set_uint16’ declared but never defined [-Werror]
       inline void scsi_set_uint16(unsigned char *c, uint16_t val);
                   ^
      /usr/include/iscsi/scsi-lowlevel.h:809:13: error: inline function
      ‘scsi_set_uint32’ declared but never defined [-Werror]
       inline void scsi_set_uint32(unsigned char *c, uint32_t val);
                   ^
      [...]
      
      This has been fixed by upstream libiscsi in version 1.10.0 (see
      https://github.com/sahlberg/libiscsi/commit/7692027d6c11 ), but
      since we still want to support 1.9.0 for CentOS 7 / RHEL7, we
      have to work-around the issue by redefining the "inline" keyword
      to use the old "gnu89" mode behavior via "gnu_inline" instead.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      df71ca84
    • T
      linux-user: Fix compilation with clang 3.4 · 798b8581
      Thomas Huth 提交于
      Clang version 3.4.2 does not know the -Wpragmas option yet and bails
      out with an error when we try to disable it in linux-user/qemu.h.
      Fortunately, clang has a __has_warning() macro which allows us to add
      an explicit check for the option that we want to ignore. With that we
      can check for the availability of "-Waddress-of-packed-member" properly
      and do not need the "-Wpragmas" at all here.
      
      Fixes: 850d5e33Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      798b8581
    • P
      virtio-net: Fix VirtIONet typedef redefinition · b0b36c02
      Philippe Mathieu-Daudé 提交于
      Commit 2974e916 introduced the VirtioNetRscChain structure which
      refer to a VirtIONet, declared later, thus required VirtIONet typedef
      to use a forward declaration.
      However, when compiling with Clang in -std=gnu99 mode, this triggers
      the following warning/error:
      
          CC      hw/net/virtio-net.o
        In file included from qemu/hw/net/virtio-net.c:22:
        include/hw/virtio/virtio-net.h:189:3: error: redefinition of typedef 'VirtIONet' is a C11 feature [-Werror,-Wtypedef-redefinition]
        } VirtIONet;
          ^
        include/hw/virtio/virtio-net.h:110:26: note: previous definition is here
        typedef struct VirtIONet VirtIONet;
                                 ^
        1 error generated.
        make: *** [rules.mak:69: hw/net/virtio-net.o] Error 1
      
      Fix it by removing the duplicate typedef definition.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      b0b36c02
    • T
      ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode · 0d8d6a24
      Thomas Huth 提交于
      When compiling the ppc code with clang and -std=gnu99, there are a
      couple of warnings/errors like this one:
      
        CC      ppc64-softmmu/hw/intc/xics.o
      In file included from hw/intc/xics.c:35:
      include/hw/ppc/xics.h:43:25: error: redefinition of typedef 'ICPState' is a C11 feature
            [-Werror,-Wtypedef-redefinition]
      typedef struct ICPState ICPState;
                              ^
      target/ppc/cpu.h:1181:25: note: previous definition is here
      typedef struct ICPState ICPState;
                              ^
      Work around the problems by including the proper headers in spapr.h
      and by using struct forward declarations in cpu.h.
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      0d8d6a24
    • T
      ppc: Move spapr-related prototypes from xics.h into a seperate header file · a51d5afc
      Thomas Huth 提交于
      When compiling with Clang in -std=gnu99 mode, there is a warning/error:
      
        CC      ppc64-softmmu/hw/intc/xics_spapr.o
      In file included from /home/thuth/devel/qemu/hw/intc/xics_spapr.c:34:
      /home/thuth/devel/qemu/include/hw/ppc/xics.h:203:34: error: redefinition of typedef 'sPAPRMachineState' is a C11 feature
            [-Werror,-Wtypedef-redefinition]
      typedef struct sPAPRMachineState sPAPRMachineState;
                                       ^
      /home/thuth/devel/qemu/include/hw/ppc/spapr_irq.h:25:34: note: previous definition is here
      typedef struct sPAPRMachineState sPAPRMachineState;
                                       ^
      
      We have to remove the duplicated typedef here and include "spapr.h" instead.
      But "spapr.h" should not be included for the pnv machine files. So move
      the spapr-related prototypes into a new file called "xics_spapr.h" instead.
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NCédric Le Goater <clg@kaod.org>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      a51d5afc
    • P
      ui/console: Remove PixelFormat from qemu/typedefs.h · 0a323e66
      Philippe Mathieu-Daudé 提交于
      Header files requiring PixelFormat already include "ui/qemu-pixman.h".
      
      To clean "qemu/typedefs.h", move the declaration to "ui/qemu-pixman.h"
      (removing the forward declaration).
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Acked-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      0a323e66
    • P
      ui/console: Remove MouseTransformInfo from qemu/typedefs.h · 5a4c2e59
      Philippe Mathieu-Daudé 提交于
      Header files requiring MouseTransformInfo already include "ui/console.h".
      
      To clean "qemu/typedefs.h", move the declaration to "ui/console.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Acked-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      5a4c2e59
    • P
      ui/console: Remove DisplayState/DisplaySurface from "qemu/typedefs.h" · 7536587c
      Philippe Mathieu-Daudé 提交于
      Files requiring DisplayState/DisplaySurface already include "ui/console.h".
      
      To clean "qemu/typedefs.h", move the declarations to "ui/console.h"
      (removing DisplaySurface forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      7536587c
    • P
      ui/console: Remove QemuDmaBuf from "qemu/typedefs.h" · dfbb251e
      Philippe Mathieu-Daudé 提交于
      Files requiring QemuDmaBuf already include "ui/console.h".
      
      To clean "qemu/typedefs.h", move the declaration to "ui/console.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      dfbb251e
    • P
      audio: Remove AudioState from "qemu/typedefs.h" · fd5283fb
      Philippe Mathieu-Daudé 提交于
      Files requiring AudioState already include "audio_int.h".
      
      To clean "qemu/typedefs.h", move the declaration to "audio_int.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fd5283fb
    • P
      hw/i386: Remove PCMachineClass from "qemu/typedefs.h" · 639f642c
      Philippe Mathieu-Daudé 提交于
      Files requiring PCMachineClass already include "hw/i386/pc.h".
      
      To clean "qemu/typedefs.h", move the declaration to "hw/i386/pc.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      639f642c
    • P
      hw/char/serial: Remove SerialState from "qemu/typedefs.h" · 1451b404
      Philippe Mathieu-Daudé 提交于
      Files requiring SerialState already include "hw/char/serial.h".
      
      To clean "qemu/typedefs.h", move the declaration to "hw/char/serial.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      1451b404
    • P
      hw/bt: Remove HCIInfo from "qemu/typedefs.h" · bc8c49d3
      Philippe Mathieu-Daudé 提交于
      Files requiring HCIInfo already include "sysemu/bt.h".
      
      To clean "qemu/typedefs.h", move the declaration to "sysemu/bt.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      bc8c49d3
    • P
      hw/i2c/smbus: Remove SMBusDevice from "qemu/typedefs.h" · d183b00e
      Philippe Mathieu-Daudé 提交于
      Files requiring SMBusDevice already include "hw/i2c/smbus.h".
      
      To clean "qemu/typedefs.h", move the forward declaration
      to "hw/i2c/smbus.h".
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      d183b00e
    • P
      hw/ide/ahci: Remove AllwinnerAHCIState from "qemu/typedefs.h" · a8b56ec8
      Philippe Mathieu-Daudé 提交于
      Files requiring AllwinnerAHCIState already include "hw/ide/ahci.h".
      
      To clean "qemu/typedefs.h", move the declaration to "hw/ide/ahci.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      a8b56ec8
    • P
      hw/pcmcia: Remove PCMCIACardState from "qemu/typedefs.h" · 2274e7dd
      Philippe Mathieu-Daudé 提交于
      There is only one header file requiring this typedef (hw/arm/pxa.h),
      let it include "hw/pcmcia.h" directly to simplify "qemu/typedefs.h".
      
      To clean "qemu/typedefs.h", move the declaration to "hw/pcmcia.h"
      (removing the forward declaration).
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      [thuth: slightly tweaked commit message]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      2274e7dd
    • P
      hw/input/ps2: Remove PS2State from "qemu/typedefs.h" · fa9414e9
      Philippe Mathieu-Daudé 提交于
      PS2State is only used in "hw/input/ps2.h", there is no
      need to expose it via "qemu/typedefs.h".
      
      To clean "qemu/typedefs.h", move the forward declaration
      to "hw/input/ps2.h".
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fa9414e9
    • T
      tests/pnv-xscom: Make test independent of global_qtest · 8a547c8d
      Thomas Huth 提交于
      Pass around the QTestState, so that we can finally get rid of the
      out-of-favor global_qtest variable in this file, too.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      8a547c8d
    • T
      tests/boot-order: Make test independent of global_qtest · 8173668c
      Thomas Huth 提交于
      Pass around the QTestState from function to function, so that we can finally
      get rid of the out-of-favor global_qtest variable in this file, too.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      8173668c
    • T
      tests/endianesss: Make test independent of global_qtest · fdba0d09
      Thomas Huth 提交于
      Pass around the test state explicitly, to be able to use the qtest_in*()
      and qtest_out*() function in this test.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fdba0d09
    • T
      tests/Makefile: Use some more CONFIG switches for ppc tests · e1535780
      Thomas Huth 提交于
      To be able to build and test QEMU binaries where certain devices or machines
      are disabled, we have to use the right CONFIG_* switches to run certain tests
      only if the corresponding device or machine really has been compiled into
      the binary.
      Reviewed-by: NWainer dos Santos Moschetta <wainersm@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      e1535780