1. 13 1月, 2015 2 次提交
    • J
      ide: Implement VPD response for ATAPI · 9a502563
      John Snow 提交于
      SCSI devices have multiple kinds of queries they need to respond
      to, as defined in the "cmd inquiry" section in MMC-6 and SPC-3.
      
      Relevent sections:
      MMC-6 revision 2g:
            Non-VPD response data and pointer to SPC-3;
            Section 6.8 "Inquiry Command"
      SPC-3 revision 23:
            Inquiry command and error handling:
            Section 6.4 "INQUIRY command"
            VPD data pages format:
            Section 7.6 "Vital product data parameters"
      
      We implement these Vital Product Data queries for SCSI, but not for
      ATAPI through IDE. The result is that if you are looking for the WWN
      identifier via tools such as sg3_utils, you will be unable to query
      our CD/DVD rom device to obtain it.
      
      This patch adds the minimum number of mandatory responses as defined
      by SPC-3, which include the "supported pages" response (page 0x00)
      and the "Device Identification" response (page 0x83). It also correctly
      responds when it receives a request for an illegal page to improve
      error output from related tools.
      
      The Device ID page contains an arbitrary list of identification
      strings of various formats; the ID strings included in this patch
      were chosen to mimic those provided by the libata driver when
      emulating this SCSI query (model, serial, and wwn when present.)
      
      Example:
      
      # libata emulated response
      [root@localhost ~]# sg_inq --id /dev/sda
      VPD INQUIRY: Device Identification page
        Designation descriptor number 1, descriptor length: 24
          designator_type: vendor specific [0x0],  code_set: ASCII
          associated with the addressed logical unit
            vendor specific: QM00001
        Designation descriptor number 2, descriptor length: 72
          designator_type: T10 vendor identification,  code_set: ASCII
          associated with the addressed logical unit
            vendor id: ATA
            vendor specific: QEMU HARDDISK                           QM00001
      
      # QEMU generated ATAPI response, with WWN
      [root@localhost ~]# sg_inq --id /dev/sr0
      VPD INQUIRY: Device Identification page
        Designation descriptor number 1, descriptor length: 24
          designator_type: vendor specific [0x0],  code_set: ASCII
          associated with the addressed logical unit
            vendor specific: QM00005
        Designation descriptor number 2, descriptor length: 72
          designator_type: T10 vendor identification,  code_set: ASCII
          associated with the addressed logical unit
            vendor id: ATA
            vendor specific: QEMU DVD-ROM                            QM00005
        Designation descriptor number 3, descriptor length: 12
          designator_type: NAA,  code_set: Binary
          associated with the addressed logical unit
            NAA 5, IEEE Company_id: 0xc50
            Vendor Specific Identifier: 0x15ea71bb
            [0x5000c50015ea71bb]
      
      See also: hw/scsi/scsi-disk.c, scsi_disk_emulate_inquiry()
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9a502563
    • F
      block: Split BLOCK_OP_TYPE_COMMIT to BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET} · bb00021d
      Fam Zheng 提交于
      Like BLOCK_OP_TYPE_BACKUP_SOURCE and BLOCK_OP_TYPE_BACKUP_TARGET,
      block-commit involves two asymmetric devices.
      
      This change is not user-visible (yet), because commit only works with
      device names.
      
      But once we enable backing reference in blockdev-add, or specifying
      node-name in block-commit command, we don't want the user to start two
      commit jobs on the same backing chain, which will corrupt things because
      of the final bdrv_swap.
      
      Before we have per category blockers, splitting this type is still
      better.
      
      [Resolved virtio-blk dataplane conflict by replacing
      BLOCK_OP_TYPE_COMMIT with both BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}.
      They are safe since the block job runs in the same AioContext as the
      dataplane IOThread.
      --Stefan]
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      bb00021d
  2. 12 1月, 2015 7 次提交
  3. 09 1月, 2015 8 次提交
  4. 08 1月, 2015 1 次提交
  5. 07 1月, 2015 17 次提交
  6. 05 1月, 2015 3 次提交
  7. 03 1月, 2015 2 次提交
    • P
      pckbd: set bits 2-3-6-7 of the output port by default · d13c0404
      Paolo Bonzini 提交于
      OSes typically write 0xdd/0xdf to turn the A20 line off and on.  This
      has bits 2-3-6-7 on, so that the output port subsection is migrated.
      Change the reset value and migration default to include those four
      bits, thus avoiding that the subsection is migrated.
      
      This strictly speaking changes guest ABI, but the long time during which
      we have not migrated the value means that the guests really do not care
      much; so the change is for all machine types.
      Reported-by: NIgor Mammedov <imammedo@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d13c0404
    • P
      serial: refine serial_thr_ipending_needed · bfa73628
      Paolo Bonzini 提交于
      If the THR interrupt is disabled, there is no need to migrate thr_ipending
      because LSR.THRE will be sampled again when the interrupt is enabled.
      (This is the behavior that is not documented in the datasheet, but
      relied on by Windows!)
      
      Note that in this case IIR will never be 0x2 so, if thr_ipending were
      to be one, QEMU would produce the subsection.
      Reported-by: NIgor Mammedov <imammedo@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      bfa73628