1. 22 2月, 2017 3 次提交
  2. 21 2月, 2017 3 次提交
    • M
      hw: Deprecate -drive if=scsi with non-onboard HBAs · a64aa578
      Markus Armbruster 提交于
      Block backends defined with "-drive if=T" with T other than "none" are
      meant to be picked up by machine initialization code: a suitable
      frontend gets created and wired up automatically.
      
      Drives defined with if=scsi are also picked up by SCSI HBAs added with
      -device, unlike other interface types.  Deprecate this usage, as follows.
      
      Create the frontends for onboard HBAs in machine initialization code,
      exactly like we do for if=ide and other interface types.  Change
      scsi_legacy_handle_cmdline() to create a frontend only when it's still
      missing, and warn that this usage is deprecated.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-3-git-send-email-armbru@redhat.com>
      a64aa578
    • M
      hw/scsi: Concentrate -drive if=scsi auto-create in one place · fb8b660e
      Markus Armbruster 提交于
      The logic to create frontends for -drive if=scsi is in SCSI HBAs.  For
      all other interface types, it's in machine initialization code.
      
      A few machine types create the SCSI HBAs necessary for that.  That's
      also not done for other interface types.
      
      I'm going to deprecate these SCSI eccentricities.  In preparation for
      that, create the frontends in main() instead of the SCSI HBAs, by
      calling new function scsi_legacy_handle_cmdline() there.
      
      Note that not all SCSI HBAs create frontends.  Take care not to change
      that.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-2-git-send-email-armbru@redhat.com>
      Acked-By: NPaolo Bonzini <pbonzini@redhat.com>
      fb8b660e
    • G
      xhci: add qemu xhci controller · 72a810f4
      Gerd Hoffmann 提交于
      Turn existing TYPE_XHCI into an abstract base class.
      Create two child classes, TYPE_NEC_XHCI (same name as old xhci
      controller) and TYPE_QEMU_XHCI (using an ID from our namespace).
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Message-id: 1486382139-30630-3-git-send-email-kraxel@redhat.com
      72a810f4
  3. 20 2月, 2017 1 次提交
  4. 18 2月, 2017 4 次提交
  5. 16 2月, 2017 1 次提交
  6. 14 2月, 2017 1 次提交
  7. 08 2月, 2017 3 次提交
  8. 06 2月, 2017 1 次提交
  9. 01 2月, 2017 6 次提交
  10. 31 1月, 2017 5 次提交
    • F
      ps2: add support for mice with extra/side buttons · 8b0caab0
      Fabian Lesniak 提交于
      This enables the ps2 controller to process mouse events for buttons 4 and 5.
      Additionally, distinct definitions for the ps2 mouse button state are
      introduced. The legacy definitions from console.h are not used anymore.
      Signed-off-by: NFabian Lesniak <fabian@lesniak-it.de>
      Message-id: 20161206190007.7539-3-fabian@lesniak-it.de
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8b0caab0
    • T
      hw/ppc/spapr: Fix boot path of usb-host storage devices · b99260eb
      Thomas Huth 提交于
      When passing through an USB storage device to a pseries guest, it
      is currently not possible to automatically boot from the device
      if the "bootindex" property has been specified, too (e.g. when using
      "-device nec-usb-xhci -device usb-host,hostbus=1,hostaddr=2,bootindex=0"
      at the command line). The problem is that QEMU builds a device tree path
      like "/pci@800000020000000/usb@0/usb-host@1" and passes it to SLOF
      in the /chosen/qemu,boot-list property. SLOF, however, probes the
      USB device, recognizes that it is a storage device and thus changes
      its name to "storage", and additionally adds a child node for the
      SCSI LUN, so the correct boot path in SLOF is something like
      "/pci@800000020000000/usb@0/storage@1/disk@101000000000000" instead.
      So when we detect an USB mass storage device with SCSI interface,
      we've got to adjust the firmware boot-device path properly that
      SLOF can automatically boot from the device.
      
      Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1354177Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b99260eb
    • N
      ppc/spapr: implement H_SIGNAL_SYS_RESET · 1c7ad77e
      Nicholas Piggin 提交于
      The H_SIGNAL_SYS_RESET hcall allows a guest CPU to raise a system reset
      exception on CPUs within the same guest -- all CPUs, all-but-self, or a
      specific CPU (including self).
      
      This has not made its way to a PAPR release yet, but we have an hcall
      number assigned.
      
        H_SIGNAL_SYS_RESET = 0x380
      
        Syntax:
          hcall(uint64 H_SIGNAL_SYS_RESET, int64 target);
      
        Generate a system reset NMI on the threads indicated by target.
      
        Values for target:
          -1 = target all online threads including the caller
          -2 = target all online threads except for the caller
          All other negative values: reserved
          Positive values: The thread to be targeted, obtained from the value
          of the "ibm,ppc-interrupt-server#s" property of the CPU in the OF
          device tree.
      
        Semantics:
          - Invalid target: return H_Parameter.
          - Otherwise: Generate a system reset NMI on target thread(s),
            return H_Success.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      1c7ad77e
    • D
      pseries: Make cpu_update during CAS unconditional · 5b120785
      David Gibson 提交于
      spapr_h_cas_compose_response() includes a cpu_update parameter which
      controls whether it includes updated information on the CPUs in the device
      tree fragment returned from the ibm,client-architecture-support (CAS) call.
      
      Providing the updated information is essential when CAS has negotiated
      compatibility options which require different cpu information to be
      presented to the guest.  However, it should be safe to provide in other
      cases (it will just override the existing data in the device tree with
      identical data).  This simplifies the code by removing the parameter and
      always providing the cpu update information.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      5b120785
    • D
      pseries: Always use core objects for CPU construction · 0c86d0fd
      David Gibson 提交于
      Currently the pseries machine has two paths for constructing CPUs.  On
      newer machine type versions, which support cpu hotplug, it constructs
      cpu core objects, which in turn construct CPU threads.  For older machine
      versions it individually constructs the CPU threads.
      
      This division is going to make some future changes to the cpu construction
      harder, so this patch unifies them.  Now cpu core objects are always
      created.  This requires some updates to allow core objects to be created
      without a full complement of threads (since older versions allowed a
      number of cpus not a multiple of the threads-per-core).  Likewise it needs
      some changes to the cpu core hot/cold plug path so as not to choke on the
      old machine types without hotplug support.
      
      For good measure, we move the cpu construction to its own subfunction,
      spapr_init_cpus().
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      0c86d0fd
  11. 28 1月, 2017 8 次提交
    • P
      xen-platform: add missing disk unplug option · ae4d2eb2
      Paul Durrant 提交于
      The Xen HVM unplug protocol [1] specifies a mechanism to allow guests to
      request unplug of 'aux' disks (which is stated to mean all IDE disks,
      except the primary master). This patch adds support for that unplug request.
      
      NOTE: The semantics of what happens if unplug of all disks and 'aux' disks
            is simultaneously requests is not clear. The patch makes that
            assumption that an 'all' request overrides an 'aux' request.
      
      [1] http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/hvm-emulated-unplug.markdownSigned-off-by: NPaul Durrant <paul.durrant@citrix.com>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      ----
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Anthony Perard <anthony.perard@citrix.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      ae4d2eb2
    • M
      char: rename CharDriverState Chardev · 0ec7b3e7
      Marc-André Lureau 提交于
      Pick a uniform chardev type name.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0ec7b3e7
    • P
      pc: Enable vmware-cpuid-freq CPU option for 2.9+ machine types · 0b564e6f
      Phil Dennis-Jordan 提交于
      Signed-off-by: NPhil Dennis-Jordan <phil@philjordan.eu>
      Message-Id: <1484921496-11257-4-git-send-email-phil@philjordan.eu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0b564e6f
    • T
      Introduce DEVICE_CATEGORY_CPU for CPU devices · ba31cc72
      Thomas Huth 提交于
      Now that CPUs show up in the help text of "-device ?",
      we should group them into an appropriate category.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1484917276-7107-1-git-send-email-thuth@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ba31cc72
    • L
      hw/isa/lpc_ich9: negotiate SMI broadcast on pc-q35-2.9+ machine types · b8bab8eb
      Laszlo Ersek 提交于
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20170126014416.11211-4-lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b8bab8eb
    • L
      hw/isa/lpc_ich9: add broadcast SMI feature · 5ce45c7a
      Laszlo Ersek 提交于
      The generic edk2 SMM infrastructure prefers
      EFI_SMM_CONTROL2_PROTOCOL.Trigger() to inject an SMI on each processor. If
      Trigger() only brings the current processor into SMM, then edk2 handles it
      in the following ways:
      
      (1) If Trigger() is executed by the BSP (which is guaranteed before
          ExitBootServices(), but is not necessarily true at runtime), then:
      
          (a) If edk2 has been configured for "traditional" SMM synchronization,
              then the BSP sends directed SMIs to the APs with APIC delivery,
              bringing them into SMM individually. Then the BSP runs the SMI
              handler / dispatcher.
      
          (b) If edk2 has been configured for "relaxed" SMM synchronization,
              then the APs that are not already in SMM are not brought in, and
              the BSP runs the SMI handler / dispatcher.
      
      (2) If Trigger() is executed by an AP (which is possible after
          ExitBootServices(), and can be forced e.g. by "taskset -c 1
          efibootmgr"), then the AP in question brings in the BSP with a
          directed SMI, and the BSP runs the SMI handler / dispatcher.
      
      The smaller problem with (1a) and (2) is that the BSP and AP
      synchronization is slow. For example, the "taskset -c 1 efibootmgr"
      command from (2) can take more than 3 seconds to complete, because
      efibootmgr accesses non-volatile UEFI variables intensively.
      
      The larger problem is that QEMU's current behavior diverges from the
      behavior usually seen on physical hardware, and that keeps exposing
      obscure corner cases, race conditions and other instabilities in edk2,
      which generally expects / prefers a software SMI to affect all CPUs at
      once.
      
      Therefore introduce the "broadcast SMI" feature that causes QEMU to inject
      the SMI on all VCPUs.
      
      While the original posting of this patch
      <http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg05658.html>
      only intended to speed up (2), based on our recent "stress testing" of SMM
      this patch actually provides functional improvements.
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20170126014416.11211-3-lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5ce45c7a
    • L
      hw/isa/lpc_ich9: add SMI feature negotiation via fw_cfg · 50de920b
      Laszlo Ersek 提交于
      Introduce the following fw_cfg files:
      
      - "etc/smi/supported-features": a little endian uint64_t feature bitmap,
        presenting the features known by the host to the guest. Read-only for
        the guest.
      
        The content of this file will be determined via bit-granularity ICH9-LPC
        device properties, to be introduced later. For now, the bitmask is left
        zeroed. The bits will be set from machine type compat properties and on
        the QEMU command line, hence this file is not migrated.
      
      - "etc/smi/requested-features": a little endian uint64_t feature bitmap,
        representing the features the guest would like to request. Read-write
        for the guest.
      
        The guest can freely (re)write this file, it has no direct consequence.
        Initial value is zero. A nonzero value causes the SMI-related fw_cfg
        files and fields that are under guest influence to be migrated.
      
      - "etc/smi/features-ok": contains a uint8_t value, and it is read-only for
        the guest. When the guest selects the associated fw_cfg key, the guest
        features are validated against the host features. In case of error, the
        negotiation doesn't proceed, and the "features-ok" file remains zero. In
        case of success, the "features-ok" file becomes (uint8_t)1, and the
        negotiated features are locked down internally (to which no further
        changes are possible until reset).
      
        The initial value is zero.  A nonzero value causes the SMI-related
        fw_cfg files and fields that are under guest influence to be migrated.
      
      The C-language fields backing the "supported-features" and
      "requested-features" files are uint8_t arrays. This is because they carry
      guest-side representation (our choice is little endian), while
      VMSTATE_UINT64() assumes / implies host-side endianness for any uint64_t
      fields. If we migrate a guest between hosts with different endiannesses
      (which is possible with TCG), then the host-side value is preserved, and
      the host-side representation is translated. This would be visible to the
      guest through fw_cfg, unless we used plain byte arrays. So we do.
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20170126014416.11211-2-lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      50de920b
    • P
      apic: save apic_delivered flag · 07bfa354
      Pavel Dovgalyuk 提交于
      This patch implements saving/restoring of static apic_delivered variable.
      
      v8: saving static variable only for one of the APICs
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170126123429.5412.94368.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      07bfa354
  12. 27 1月, 2017 2 次提交
    • P
      pflash_cfi01: fix per-device sector length in CFI table · feb0b1aa
      Peter Maydell 提交于
      For configurations of the pflash_cfi01 device which set it up with a
      device-width not equal to the width (ie where we are emulating
      multiple narrow flash devices wired up in parallel), we were giving
      incorrect values in the CFI data table:
      
      (1) the sector length entry should specify the sector length for a
          single device, not the length for the overall collection of
          devices
      (2) the number of blocks per device must not be divided by the
          number of devices because the resulting device size would not
          match the overall size
      (3) this then means that the overall write block size must be
          modified depending on the number of devices because the entry is
          per device and when the guest writes into the flash it
          calculates the write size by using the CFI entry (write size
          per device) multiplied by the number of chips.
          (It would alternatively be possible to modify the write
          block size in the CFI table (currently hardcoded at 2048) and
          leave the overall write block size alone.)
      
      This commit corrects these bugs, and adds a hw-compat property
      to retain the old behaviour on 2.8 and earlier versions. (The
      only board we have which uses this sort of flash config and
      has machine versioning is the "virt" board -- the PC uses a
      single flash device and so behaviour is unaffected whether
      using old-multiple-chip-handling or not.)
      
      Here is a configuration example from the vexpress board:
      
      VEXPRESS_FLASH_SIZE = 64M
      VEXPRESS_FLASH_SECT_SIZE 256K
      num-blocks = VEXPRESS_FLASH_SIZE / VEXPRESS_FLASH_SECT_SIZE = 256
      sector-length = 256K
      width = 4
      device-width = 2
      
      The code will fill the CFI entry with the following entries:
        num-blocks = 256
        sector-length = 128K
        writeblock_size = 2048
      
      This results in two chips, each with 256 * 128K = 32M device size and
      a write block size of 2048.
      
      A sector erase will be sent to both chips, thus 256K must be erased.
      When the guest sends a block write command, it will write 4096 bytes
      data at once (2048 per device).
      Signed-off-by: NDavid Engraf <david.engraf@sysgo.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      [PMM: cleaned up and expanded commit message]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      feb0b1aa
    • P
      hw/registerfields.h: Pull FIELD etc macros out of hw/register.h · afb3141c
      Peter Maydell 提交于
      hw/register.h provides macros like FIELD which make it easy to define
      shift, mask and length constants for the fields within a register.
      Unfortunately register.h also includes a lot of other things, some
      of which will only compile in the softmmu build.
      
      Pull the FIELD macro and friends out into a separate header file,
      so they can be used in places like target/arm files which also
      get built in the user-only configs.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1484937883-1068-5-git-send-email-peter.maydell@linaro.org
      afb3141c
  13. 25 1月, 2017 2 次提交