Skip to content
Snippets Groups Projects
  1. Oct 01, 2020
    • John Snow's avatar
      ide: reorder set/get sector functions · 14ee9b53
      John Snow authored
      
      Reorder these just a pinch to make them more obvious at a glance what
      the addressing mode is.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      14ee9b53
    • John Snow's avatar
      ide: model HOB correctly · be8c9423
      John Snow authored
      
      I have been staring at this FIXME for years and I never knew what it
      meant. I finally stumbled across it!
      
      When writing to the command registers, the old value is shifted into a
      HOB copy of the register and the new value is written into the primary
      register. When reading registers, the value retrieved is dependent on
      the HOB bit in the CONTROL register.
      
      By setting bit 7 (0x80) in CONTROL, any register read will, if it has
      one, yield the HOB value for that register instead.
      
      Our code has a problem: We were using bit 7 of the DEVICE register to
      model this. We use bus->cmd roughly as the control register already, as
      it stores the value from ide_ctrl_write.
      
      Lastly, all command register writes reset the HOB, so fix that, too.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      be8c9423
    • John Snow's avatar
      ide: don't tamper with the device register · f14bc040
      John Snow authored
      
      In real ISA operation, register writes go out to an entire bus channel
      and all listening devices receive the write. The devices do not toggle
      the DEV bit based on their own configuration, nor does the HBA
      intermediate or tamper with that value.
      
      The reality of the matter is that DEV0/DEV1 accordingly will react to
      command register writes based on whether or not the device was selected.
      
      This does not fix a known bug, but it makes the code slightly simpler
      and more obvious.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      f14bc040
    • John Snow's avatar
      ide: rename cmd_write to ctrl_write · 98d98912
      John Snow authored
      
      It's the Control register, part of the Control block -- Command is
      misleading here. Rename all related functions and constants.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      98d98912
    • Philippe Mathieu-Daudé's avatar
      hw/ide/ahci: Do not dma_memory_unmap(NULL) · 1d1c4bdb
      Philippe Mathieu-Daudé authored
      
      libFuzzer triggered the following assertion:
      
        cat << EOF | qemu-system-i386 -M pc-q35-5.0 \
          -nographic -monitor none -serial none -qtest stdio
        outl 0xcf8 0x8000fa24
        outl 0xcfc 0xe1068000
        outl 0xcf8 0x8000fa04
        outw 0xcfc 0x7
        outl 0xcf8 0x8000fb20
        write 0xe1068304 0x1 0x21
        write 0xe1068318 0x1 0x21
        write 0xe1068384 0x1 0x21
        write 0xe1068398 0x2 0x21
        EOF
        qemu-system-i386: exec.c:3621: address_space_unmap: Assertion `mr != NULL' failed.
        Aborted (core dumped)
      
      This is because we don't check the return value from dma_memory_map()
      which can return NULL, then we call dma_memory_unmap(NULL) which is
      illegal. Fix by only unmap if the value is not NULL (and the size is
      not the expected one).
      
      Cc: qemu-stable@nongnu.org
      Reported-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20200718072854.7001-1-f4bug@amsat.org
      Fixes: f6ad2e32 ("ahci: add ahci emulation")
      BugLink: https://bugs.launchpad.net/qemu/+bug/1884693
      
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      1d1c4bdb
    • John Snow's avatar
      MAINTAINERS: Update my git address · 77582e2c
      John Snow authored
      
      I am switching from github to gitlab.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      77582e2c
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging · 37a712a0
      Peter Maydell authored
      
      * SCSI fix (Dmitry, Li Feng, Li Qiang)
      * memory API fixes (Eduardo)
      * removal of deprecated '-numa node', 'cpu-add', '-smp' (Igor)
      * ACPI fix for VMBus (Jon)
      * relocatable install (myself)
      * always remove docker containers (myself)
      * serial cleanups (Philippe)
      * vmware cpuid leaf for tsc and apic frequency (Sunil)
      * KVM_FEATURE_ASYNC_PF_INT support (Vitaly)
      * i386 XSAVE bugfix (Xiaoyao)
      * QOM developer documentation in docs/devel (Eduardo)
      * new checkpatch tests (Dov)
      * x86_64 syscall fix (Douglas)
      * interrupt-based APF fix (Vitaly)
      * always create kvmclock (Vitaly)
      * fix bios-tables-test (Eduardo)
      * KVM PV features cleanup (myself)
      * CAN FD (Pavel)
      
      meson:
      * fixes (Marc-André, Max, Stefan, Alexander, myself)
      * moved libmpathpersist, cocoa, malloc tests (myself)
      * support for 0.56 introspected test dependencies (myself)
      
      # gpg: Signature made Wed 30 Sep 2020 18:11:45 BST
      # gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
      # gpg:                issuer "pbonzini@redhat.com"
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini-gitlab/tags/for-upstream: (86 commits)
        hw/net/can: Correct Kconfig dependencies
        hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation.
        hw/net/can: CTU CAN FD IP open hardware core emulation.
        hw/net/can/ctucafd: Add CTU CAN FD core register definitions.
        net/can: Add can_dlc2len and can_len2dlc for CAN FD.
        hw/net/can: sja1000 ignore CAN FD frames
        net/can: Initial host SocketCan support for CAN FD.
        target/i386: kvm: do not use kvm_check_extension to find paravirtual capabilities
        bios-tables-test: Remove kernel-irqchip=off option
        target/i386: always create kvmclock device
        target/i386: Fix VM migration when interrupt based APF is enabled
        helper_syscall x86_64: clear exception_is_int
        checkpatch: Detect '%#' or '%0#' in printf-style format strings
        typedefs: Restrict PCMachineState to 'hw/i386/pc.h'
        hw/xen: Split x86-specific declaration from generic hardware ones
        stubs: Split accelerator / hardware related stubs
        sysemu/xen: Add missing 'exec/cpu-common.h' header for ram_addr_t type
        hw/i386/xen: Rename X86/PC specific function as xen_hvm_init_pc()
        docs: Move object.h overview doc comment to qom.rst
        docs: Create docs/devel/qom.rst
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      37a712a0
  2. Sep 30, 2020
Loading