Skip to content
Snippets Groups Projects
  1. Jun 02, 2021
    • Vladimir Sementsov-Ogievskiy's avatar
      block: drop BlockBackendRootState::read_only · 260242a8
      Vladimir Sementsov-Ogievskiy authored
      
      Instead of keeping additional boolean field, let's store the
      information in BDRV_O_RDWR bit of BlockBackendRootState::open_flags.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210527154056.70294-4-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      260242a8
    • Vladimir Sementsov-Ogievskiy's avatar
      block: drop BlockDriverState::read_only · 975da073
      Vladimir Sementsov-Ogievskiy authored
      
      This variable is just a cache for !(bs->open_flags & BDRV_O_RDWR),
      which we have to synchronize everywhere. Let's just drop it and
      consistently use bdrv_is_read_only().
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210527154056.70294-3-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      975da073
    • Vladimir Sementsov-Ogievskiy's avatar
      block: consistently use bdrv_is_read_only() · 307261b2
      Vladimir Sementsov-Ogievskiy authored
      
      It's better to use accessor function instead of bs->read_only directly.
      In some places use bdrv_is_writable() instead of
      checking both BDRV_O_RDWR set and BDRV_O_INACTIVE not set.
      
      In bdrv_open_common() it's a bit strange to add one more variable, but
      we are going to drop bs->read_only in the next patch, so new ro local
      variable substitutes it here.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210527154056.70294-2-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      307261b2
    • Vladimir Sementsov-Ogievskiy's avatar
      block/vvfat: fix vvfat_child_perm crash · 39df2c6d
      Vladimir Sementsov-Ogievskiy authored
      
      It's wrong to rely on s->qcow in vvfat_child_perm, as on permission
      update during bdrv_open_child() call this field is not set yet.
      
      Still prior to aa5a04c7, it didn't
      crash, as bdrv_open_child passed NULL as child to bdrv_child_perm(),
      and NULL was equal to NULL in assertion (still, it was bad guarantee
      for child being s->qcow, not backing :).
      
      Since aa5a04c7
      "add bdrv_attach_child_noperm" bdrv_refresh_perms called on parent node
      when attaching child, and new correct child pointer is passed to
      .bdrv_child_perm. Still, s->qcow is NULL at the moment. Let's rely only
      on role instead.
      
      Without that fix,
      ./build/qemu-system-x86_64 -usb -device usb-storage,drive=fat16 \
          -drive \
          file=fat:rw:fat-type=16:"<path of a host folder>",id=fat16,format=raw,if=none
      
      crashes:
      (gdb) bt
      0  raise () at /lib64/libc.so.6
      1  abort () at /lib64/libc.so.6
      2  _nl_load_domain.cold () at /lib64/libc.so.6
      3  annobin_assert.c_end () at /lib64/libc.so.6
      4  vvfat_child_perm (bs=0x559186f3d690, c=0x559186f1ed20, role=3,
                           reopen_queue=0x0, perm=0, shared=31,
                           nperm=0x7ffe56f28298, nshared=0x7ffe56f282a0) at
          ../block/vvfat.c:3214
      5  bdrv_child_perm (bs=0x559186f3d690, child_bs=0x559186f60190,
                          c=0x559186f1ed20, role=3, reopen_queue=0x0,
                          parent_perm=0, parent_shared=31,
                          nperm=0x7ffe56f28298, nshared=0x7ffe56f282a0)
          at ../block.c:2094
      6  bdrv_node_refresh_perm (bs=0x559186f3d690, q=0x0,
                                 tran=0x559186f65850, errp=0x7ffe56f28530) at
          ../block.c:2336
      7  bdrv_list_refresh_perms (list=0x559186db5b90 = {...}, q=0x0,
                                  tran=0x559186f65850, errp=0x7ffe56f28530)
          at ../block.c:2358
      8  bdrv_refresh_perms (bs=0x559186f3d690, errp=0x7ffe56f28530) at
          ../block.c:2419
      9  bdrv_attach_child
          (parent_bs=0x559186f3d690, child_bs=0x559186f60190,
           child_name=0x559184d83e3d "write-target",
           child_class=0x5591852f3b00 <child_vvfat_qcow>, child_role=3,
           errp=0x7ffe56f28530) at ../block.c:2959
      10 bdrv_open_child
          (filename=0x559186f5cb80 "/var/tmp/vl.7WYmFU",
           options=0x559186f66c20, bdref_key=0x559184d83e3d "write-target",
           parent=0x559186f3d690, child_class=0x5591852f3b00
           <child_vvfat_qcow>, child_role=3, allow_none=false,
           errp=0x7ffe56f28530) at ../block.c:3351
      11 enable_write_target (bs=0x559186f3d690, errp=0x7ffe56f28530) at
          ../block/vvfat.c:3177
      12 vvfat_open (bs=0x559186f3d690, options=0x559186f42db0, flags=155650,
                     errp=0x7ffe56f28530) at ../block/vvfat.c:1236
      13 bdrv_open_driver (bs=0x559186f3d690, drv=0x5591853d97e0
                           <bdrv_vvfat>, node_name=0x0,
                           options=0x559186f42db0, open_flags=155650,
                           errp=0x7ffe56f28640) at ../block.c:1557
      14 bdrv_open_common (bs=0x559186f3d690, file=0x0,
                           options=0x559186f42db0, errp=0x7ffe56f28640) at
          ../block.c:1833
      ...
      
      (gdb) fr 4
       #4  vvfat_child_perm (bs=0x559186f3d690, c=0x559186f1ed20, role=3,
                            reopen_queue=0x0, perm=0, shared=31,
                            nperm=0x7ffe56f28298, nshared=0x7ffe56f282a0) at
          ../block/vvfat.c:3214
      3214        assert(c == s->qcow || (role & BDRV_CHILD_COW));
      (gdb) p role
       $1 = 3   # BDRV_CHILD_DATA | BDRV_CHILD_METADATA
      (gdb) p *c
       $2 = {bs = 0x559186f60190, name = 0x559186f669d0 "write-target", klass
           = 0x5591852f3b00 <child_vvfat_qcow>, role = 3, opaque =
               0x559186f3d690, perm = 3, shared_perm = 4, frozen = false,
               parent_quiesce_counter = 0, next = {le_next = 0x0, le_prev =
                   0x559186f41818}, next_parent = {le_next = 0x0, le_prev =
                       0x559186f64320}}
      (gdb) p s->qcow
       $3 = (BdrvChild *) 0x0
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210524101257.119377-3-vsementsov@virtuozzo.com>
      Tested-by: default avatarJohn Arbuckle <programmingkidx@gmail.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      39df2c6d
    • Vladimir Sementsov-Ogievskiy's avatar
      block/vvfat: child_vvfat_qcow: add .get_parent_aio_context, fix crash · fb62b588
      Vladimir Sementsov-Ogievskiy authored
      
      Commit 3ca1f322
      "block: BdrvChildClass: add .get_parent_aio_context handler" introduced
      new handler and commit 228ca37e
      "block: drop ctx argument from bdrv_root_attach_child" made a generic
      use of it. But 3ca1f322 didn't update
      child_vvfat_qcow. Fix that.
      
      Before that fix the command
      
      ./build/qemu-system-x86_64 -usb -device usb-storage,drive=fat16 \
        -drive file=fat:rw:fat-type=16:"<path of a host folder>",id=fat16,format=raw,if=none
      
      crashes:
      
      1  bdrv_child_get_parent_aio_context (c=0x559d62426d20)
          at ../block.c:1440
      2  bdrv_attach_child_common
          (child_bs=0x559d62468190, child_name=0x559d606f9e3d "write-target",
           child_class=0x559d60c58d20 <child_vvfat_qcow>, child_role=3,
           perm=3, shared_perm=4, opaque=0x559d62445690,
           child=0x7ffc74c2acc8, tran=0x559d6246ddd0, errp=0x7ffc74c2ae60)
          at ../block.c:2795
      3  bdrv_attach_child_noperm
          (parent_bs=0x559d62445690, child_bs=0x559d62468190,
           child_name=0x559d606f9e3d "write-target",
           child_class=0x559d60c58d20 <child_vvfat_qcow>, child_role=3,
           child=0x7ffc74c2acc8, tran=0x559d6246ddd0, errp=0x7ffc74c2ae60) at
          ../block.c:2855
      4  bdrv_attach_child
          (parent_bs=0x559d62445690, child_bs=0x559d62468190,
           child_name=0x559d606f9e3d "write-target",
           child_class=0x559d60c58d20 <child_vvfat_qcow>, child_role=3,
           errp=0x7ffc74c2ae60) at ../block.c:2953
      5  bdrv_open_child
          (filename=0x559d62464b80 "/var/tmp/vl.h3TIS4",
           options=0x559d6246ec20, bdref_key=0x559d606f9e3d "write-target",
           parent=0x559d62445690, child_class=0x559d60c58d20
           <child_vvfat_qcow>, child_role=3, allow_none=false,
           errp=0x7ffc74c2ae60) at ../block.c:3351
      6  enable_write_target (bs=0x559d62445690, errp=0x7ffc74c2ae60) at
         ../block/vvfat.c:3176
      7  vvfat_open (bs=0x559d62445690, options=0x559d6244adb0, flags=155650,
                     errp=0x7ffc74c2ae60) at ../block/vvfat.c:1236
      8  bdrv_open_driver (bs=0x559d62445690, drv=0x559d60d4f7e0
                           <bdrv_vvfat>, node_name=0x0,
                           options=0x559d6244adb0, open_flags=155650,
                           errp=0x7ffc74c2af70) at ../block.c:1557
      9  bdrv_open_common (bs=0x559d62445690, file=0x0,
                           options=0x559d6244adb0, errp=0x7ffc74c2af70) at
      ...
      
      (gdb) fr 1
       #1  0x0000559d603ea3bf in bdrv_child_get_parent_aio_context
           (c=0x559d62426d20) at ../block.c:1440
      1440        return c->klass->get_parent_aio_context(c);
       (gdb) p c->klass
      $1 = (const BdrvChildClass *) 0x559d60c58d20 <child_vvfat_qcow>
       (gdb) p c->klass->get_parent_aio_context
      $2 = (AioContext *(*)(BdrvChild *)) 0x0
      
      Fixes: 3ca1f322
      Fixes: 228ca37e
      Reported-by: default avatarJohn Arbuckle <programmingkidx@gmail.com>
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210524101257.119377-2-vsementsov@virtuozzo.com>
      Tested-by: default avatarJohn Arbuckle <programmingkidx@gmail.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      fb62b588
    • Vladimir Sementsov-Ogievskiy's avatar
      qemu-io-cmds: assert that we don't have .perm requested in no-blk case · 8eaf1018
      Vladimir Sementsov-Ogievskiy authored
      
      Coverity thinks blk may be NULL. It's a false-positive, as described in
      a new comment.
      
      Fixes: Coverity CID 1453194
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210519090532.3753-1-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8eaf1018
    • Lukas Straub's avatar
      block/quorum: Provide .bdrv_co_flush instead of .bdrv_co_flush_to_disk · 5529b02d
      Lukas Straub authored
      
      The quorum block driver uses a custom flush callback to handle the
      case when some children return io errors. In that case it still
      returns success if enough children are healthy.
      However, it provides it as the .bdrv_co_flush_to_disk callback, not
      as .bdrv_co_flush. This causes the block layer to do it's own
      generic flushing for the children instead, which doesn't handle
      errors properly.
      
      Fix this by providing .bdrv_co_flush instead of
      .bdrv_co_flush_to_disk so the block layer uses the custom flush
      callback.
      
      Signed-off-by: default avatarLukas Straub <lukasstraub2@web.de>
      Reported-by: default avatarMinghao Yuan <meeho@qq.com>
      Message-Id: <20210518134214.11ccf05f@gecko.fritz.box>
      Tested-by: default avatarZhang Chen <chen.zhang@intel.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      5529b02d
  2. Jun 01, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/ehabkost-gl/tags/x86-next-pull-request' into staging · dd2db39d
      Peter Maydell authored
      
      x86 queue, 2021-06-01
      
      Features:
      * Add CPU model versions supporting 'xsaves' (Vitaly Kuznetsov)
      * Support AVX512 ZMM regs dump (Robert Hoo)
      
      Bug fixes:
      * Use better matching family/model/stepping for generic CPUs
        (Daniel P. Berrangé)
      
      Cleanups:
      * Hyper-V feature initialization cleanup (Vitaly Kuznetsov)
      * SEV firmware error list touchups (Connor Kuehl)
      * Constify CPUCaches and X86CPUDefinition (Philippe Mathieu-Daudé)
      * Document when features can be added to kvm_default_props
        (Eduardo Habkost)
      
      # gpg: Signature made Tue 01 Jun 2021 19:08:33 BST
      # gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
      # gpg:                issuer "ehabkost@redhat.com"
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * remotes/ehabkost-gl/tags/x86-next-pull-request: (24 commits)
        sev: add missing firmware error conditions
        sev: use explicit indices for mapping firmware error codes to strings
        target/i386/sev: add support to query the attestation report
        i386: use global kvm_state in hyperv_enabled() check
        i386: prefer system KVM_GET_SUPPORTED_HV_CPUID ioctl over vCPU's one
        i386: adjust the expected KVM_GET_SUPPORTED_HV_CPUID array size
        i386: switch hyperv_expand_features() to using error_setg()
        i386: move eVMCS enablement to hyperv_init_vcpu()
        i386: split hyperv_handle_properties() into hyperv_expand_features()/hyperv_fill_cpuids()
        i386: introduce hv_cpuid_cache
        i386: drop FEAT_HYPERV feature leaves
        i386: introduce hv_cpuid_get_host()
        i386: introduce hyperv_feature_supported()
        i386: stop using env->features[] for filling Hyper-V CPUIDs
        i386: always fill Hyper-V CPUID feature leaves from X86CPU data
        i386: invert hyperv_spinlock_attempts setting logic with hv_passthrough
        i386: keep hyperv_vendor string up-to-date
        i386: use better matching family/model/stepping for 'max' CPU
        i386: use better matching family/model/stepping for 'qemu64' CPU
        i386/cpu_dump: support AVX512 ZMM regs dump
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      dd2db39d
    • Connor Kuehl's avatar
      sev: add missing firmware error conditions · d47b8550
      Connor Kuehl authored
      
      The SEV userspace header[1] exports a couple of other error conditions that
      aren't listed in QEMU's SEV implementation, so let's just round out the
      list.
      
      [1] linux-headers/linux/psp-sev.h
      
      Signed-off-by: default avatarConnor Kuehl <ckuehl@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20210430134830.254741-3-ckuehl@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      d47b8550
    • Connor Kuehl's avatar
      sev: use explicit indices for mapping firmware error codes to strings · 5811b936
      Connor Kuehl authored
      
      This can help lower any margin for error when making future additions to
      the list, especially if they're made out of order.
      
      While doing so, make capitalization of ASID consistent with its usage in
      the SEV firmware spec (Asid -> ASID).
      
      Signed-off-by: default avatarConnor Kuehl <ckuehl@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20210430134830.254741-2-ckuehl@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      5811b936
    • Brijesh Singh's avatar
      target/i386/sev: add support to query the attestation report · 3ea1a802
      Brijesh Singh authored
      
      The SEV FW >= 0.23 added a new command that can be used to query the
      attestation report containing the SHA-256 digest of the guest memory
      and VMSA encrypted with the LAUNCH_UPDATE and sign it with the PEK.
      
      Note, we already have a command (LAUNCH_MEASURE) that can be used to
      query the SHA-256 digest of the guest memory encrypted through the
      LAUNCH_UPDATE. The main difference between previous and this command
      is that the report is signed with the PEK and unlike the LAUNCH_MEASURE
      command the ATTESATION_REPORT command can be called while the guest
      is running.
      
      Add a QMP interface "query-sev-attestation-report" that can be used
      to get the report encoded in base64.
      
      Cc: James Bottomley <jejb@linux.ibm.com>
      Cc: Tom Lendacky <Thomas.Lendacky@amd.com>
      Cc: Eric Blake <eblake@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: kvm@vger.kernel.org
      Reviewed-by: default avatarJames Bottomley <jejb@linux.ibm.com>
      Tested-by: default avatarJames Bottomley <jejb@linux.ibm.com>
      Signed-off-by: default avatarBrijesh Singh <brijesh.singh@amd.com>
      Reviewed-by: default avatarConnor Kuehl <ckuehl@redhat.com>
      Message-Id: <20210429170728.24322-1-brijesh.singh@amd.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      3ea1a802
  3. May 31, 2021
  4. May 30, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210528-pull-request' into staging · 52848929
      Peter Maydell authored
      
      usb: bugfixes for hid and xhci.
      
      # gpg: Signature made Fri 28 May 2021 15:21:51 BST
      # gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/usb-20210528-pull-request:
        hw/usb: hcd-xhci-pci: Fix spec violation of IP flag for MSI/MSI-X
        hw/usb: hcd-xhci-pci: Raise MSI/MSI-X interrupts only when told to
        hw/input/hid: Add support for keys of jp106 keyboard.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      52848929
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kraxel/tags/vga-20210527-pull-request' into staging · f9dc72de
      Peter Maydell authored
      
      virtio-gpu: add blob resource support.
      vhost-user-gpu: security fixes.
      
      # gpg: Signature made Thu 27 May 2021 15:23:25 BST
      # gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/vga-20210527-pull-request: (23 commits)
        virtio-gpu: Update cursor data using blob
        virtio-gpu: Add virtio_gpu_set_scanout_blob
        virtio-gpu: Factor out update scanout
        virtio-gpu: Add helpers to create and destroy dmabuf objects
        ui/pixman: Add qemu_pixman_to_drm_format()
        virtio-gpu: Add virtio_gpu_resource_create_blob
        virtio-gpu: Add initial definitions for blob resources
        virtio-gpu: Refactor virtio_gpu_create_mapping_iov
        virtio-gpu: Refactor virtio_gpu_set_scanout
        virtio-gpu: Add virtio_gpu_find_check_resource
        stubs: Add stubs for udmabuf helpers
        virtio-gpu: Add udmabuf helpers
        headers: Add udmabuf.h
        ui: Get the fd associated with udmabuf driver
        hw/display/qxl: Set pci rom address aligned with page size
        vhost-user-gpu: abstract vg_cleanup_mapping_iov
        vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset' (CVE-2021-3546)
        vhost-user-gpu: fix memory leak in 'virgl_resource_attach_backing' (CVE-2021-3544)
        vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref' (CVE-2021-3544)
        vhost-user-gpu: fix memory leak while calling 'vg_resource_unref' (CVE-2021-3544)
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      f9dc72de
  5. May 28, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging · a648df38
      Peter Maydell authored
      
      # gpg: Signature made Thu 27 May 2021 04:06:17 BST
      # gpg:                using RSA key EF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
      
      * remotes/jasowang/tags/net-pull-request:
        tap-bsd: Remove special casing for older OpenBSD releases
        virtio-net: failover: add missing remove_migration_state_change_notifier()
        hw/net/imx_fec: return 0xffff when accessing non-existing PHY
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      a648df38
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210526' into staging · 62c0ac50
      Peter Maydell authored
      
      Adjust types for some memory access functions.
      Reduce inclusion of tcg headers.
      Fix watchpoints vs replay.
      Fix tcg/aarch64 roli expansion.
      Introduce SysemuCPUOps structure.
      
      # gpg: Signature made Thu 27 May 2021 00:43:54 BST
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * remotes/rth-gitlab/tags/pull-tcg-20210526: (31 commits)
        hw/core: Constify TCGCPUOps
        target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed
        cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps
        cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps
        cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps
        cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps
        cpu: Move CPUClass::write_elf* to SysemuCPUOps
        cpu: Move CPUClass::get_crash_info to SysemuCPUOps
        cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOps
        cpu: Move CPUClass::vmsd to SysemuCPUOps
        cpu: Introduce SysemuCPUOps structure
        cpu: Move AVR target vmsd field from CPUClass to DeviceClass
        cpu: Rename CPUClass vmsd -> legacy_vmsd
        cpu: Assert DeviceClass::vmsd is NULL on user emulation
        cpu: Directly use get_memory_mapping() fallback handlers in place
        cpu: Directly use get_paging_enabled() fallback handlers in place
        cpu: Directly use cpu_write_elf*() fallback handlers in place
        cpu: Introduce cpu_virtio_is_big_endian()
        cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs
        cpu: Split as cpu-common / cpu-sysemu
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      62c0ac50
    • Ruimei Yan's avatar
      hw/usb: hcd-xhci-pci: Fix spec violation of IP flag for MSI/MSI-X · fc967aad
      Ruimei Yan authored
      
      Per xHCI spec v1.2 chapter 4.17.5 page 296:
      
        If MSI or MSI-X interrupts are enabled, Interrupt Pending (IP)
        shall be cleared automatically when the PCI dword write generated
        by the interrupt assertion is complete.
      
      Currently QEMU does not clear the IP flag in the MSI / MSI-X mode.
      This causes subsequent spurious interrupt to be delivered to guests.
      To solve this, we change the xhci intr_raise() hook routine to have
      a bool return value that is passed to its caller (the xhci core),
      with true indicating that IP should be self-cleared.
      
      Fixes: 62c6ae04 ("xhci: Initial xHCI implementation")
      Fixes: 4c47f800 ("xhci: add msix support")
      Signed-off-by: default avatarRuimei Yan <ruimei.yan@windriver.com>
      [bmeng: move IP clear codes from xhci pci to xhci core]
      Signed-off-by: default avatarBin Meng <bin.meng@windriver.com>
      Message-Id: <20210521024224.2277634-2-bmeng.cn@gmail.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      fc967aad
    • Ruimei Yan's avatar
      hw/usb: hcd-xhci-pci: Raise MSI/MSI-X interrupts only when told to · 3c6151cd
      Ruimei Yan authored
      
      At present MSI / MSI-X interrupts are triggered regardless of the
      irq level. We should have checked the level to determine whether
      the interrupt needs to be delivered.
      
      The level check logic was present in early versions of the xhci
      model, but got dropped later by a rework of interrupt handling
      under commit 4c4abe7c ("xhci: rework interrupt handling").
      
      Fixes: 4c4abe7c ("xhci: rework interrupt handling")
      Signed-off-by: default avatarRuimei Yan <ruimei.yan@windriver.com>
      Signed-off-by: default avatarBin Meng <bin.meng@windriver.com>
      Message-Id: <20210521024224.2277634-1-bmeng.cn@gmail.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      3c6151cd
    • Katsuhiro Ueno's avatar
      hw/input/hid: Add support for keys of jp106 keyboard. · f9c48124
      Katsuhiro Ueno authored
      
      Add support for the following keys: KATAKANAHIRAGANA, HENKAN, MUHENKAN,
      RO, and YEN.  Before this commit, these keys did not work as expected
      when a jp106 keyboard was connected to the guest as a usb-kbd device.
      
      Signed-off-by: default avatarKatsuhiro Ueno <uenobk@gmail.com>
      Message-Id: <CA+pCdY3iG+pKKQqEVknnWF-W0wK36S4U1jxPvxmGAPp6FFvz1Q@mail.gmail.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      f9c48124
  6. May 27, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-6.1-pull-request' into staging · 7258034a
      Peter Maydell authored
      
      m68k pull request 20210526
      
      implement m68k "any instruction" trace mode
      
      # gpg: Signature made Wed 26 May 2021 20:56:58 BST
      # gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
      # gpg:                issuer "laurent@vivier.eu"
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier/tags/m68k-for-6.1-pull-request:
        target/m68k: implement m68k "any instruction" trace mode
        target/m68k: introduce gen_singlestep_exception() function
        target/m68k: call gen_raise_exception() directly if single-stepping in gen_jmp_tb()
        target/m68k: introduce is_singlestepping() function
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      7258034a
Loading