#
dcaff461 |
| 20-Feb-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
ide: collapse parameters to ide_init_drive
All calls to ide_init_drive comes from ide_dev_initfn. Just pass down the IDEDevice (IDEState is kinda obsolete and should be merged into IDEDevice).
Rev
ide: collapse parameters to ide_init_drive
All calls to ide_init_drive comes from ide_dev_initfn. Just pass down the IDEDevice (IDEState is kinda obsolete and should be merged into IDEDevice).
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
0316482e |
| 25-Feb-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Include 'ide-internal.h' from current path
Rename "internal.h" as "ide-internal.h", and include it via its relative local path, instead of absolute to the project root path.
Signed-off-by:
hw/ide: Include 'ide-internal.h' from current path
Rename "internal.h" as "ide-internal.h", and include it via its relative local path, instead of absolute to the project root path.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240226080632.9596-4-philmd@linaro.org>
show more ...
|
#
c6ff8bde |
| 23-Feb-2024 |
BALATON Zoltan <balaton@eik.bme.hu> |
hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/
Remove last two includes of hw/ide/intarnal.h outside of hw/ide and replace them with newly added public header to allow moving inte
hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/
Remove last two includes of hw/ide/intarnal.h outside of hw/ide and replace them with newly added public header to allow moving internal.h into hw/ide to really stop exposing it.
Fixes: a11f439a0e (hw/ide: Stop exposing internal.h to non-IDE files) Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240223142633.933694E6004@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
40e074a5 |
| 20-Feb-2024 |
Thomas Huth <thuth@redhat.com> |
hw/ide: Remove the include/hw/ide.h legacy file
There was only one prototype left in this legacy file. Move it to ide-dev.h to finally get rid of it.
Reviewed-by: Philippe Mathieu-Daudé <philmd@lin
hw/ide: Remove the include/hw/ide.h legacy file
There was only one prototype left in this legacy file. Move it to ide-dev.h to finally get rid of it.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-ID: <20240220085505.30255-7-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
f74c6177 |
| 20-Feb-2024 |
Thomas Huth <thuth@redhat.com> |
hw/ide: Move IDE bus related definitions to a new header ide-bus.h
Let's consolidate the public IDE bus related functions in a separate header.
Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-b
hw/ide: Move IDE bus related definitions to a new header ide-bus.h
Let's consolidate the public IDE bus related functions in a separate header.
Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240220085505.30255-6-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
5fc5934a |
| 20-Feb-2024 |
Thomas Huth <thuth@redhat.com> |
hw/ide: Move IDE device related definitions to ide-dev.h
Untangle internal.h by moving public IDE device related definitions to ide-dev.h.
Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Ma
hw/ide: Move IDE device related definitions to ide-dev.h
Untangle internal.h by moving public IDE device related definitions to ide-dev.h.
Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240220085505.30255-5-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
1b986676 |
| 20-Feb-2024 |
Thomas Huth <thuth@redhat.com> |
hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h
These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called id
hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h
These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called ide-dma.h.
Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240220085505.30255-4-thuth@redhat.com> [PMD: Use IDEDMAOps typedef in struct IDEDMA] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
75524884 |
| 16-Nov-2023 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
ide/ioport: move ide_portio_list[] and ide_portio_list2[] definitions to IDE core
These definitions are present in ioport.c which is currently only available when CONFIG_IDE_ISA is enabled. Move the
ide/ioport: move ide_portio_list[] and ide_portio_list2[] definitions to IDE core
These definitions are present in ioport.c which is currently only available when CONFIG_IDE_ISA is enabled. Move them to the IDE core so that they can be made available to PCI IDE controllers that support switching to legacy mode.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-ID: <20231116103355.588580-2-mark.cave-ayland@ilande.co.uk> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
#
0030b244 |
| 15-Mar-2023 |
Yeqi Fu <fufuyqqqqqq@gmail.com> |
hw/ide: replace TABs with space
Bring the block files in line with the QEMU coding style, with spaces for indentation. This patch partially resolves the issue 371.
Resolves: https://gitlab.com/qemu
hw/ide: replace TABs with space
Bring the block files in line with the QEMU coding style, with spaces for indentation. This patch partially resolves the issue 371.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Yeqi Fu <fufuyqqqqqq@gmail.com> Message-Id: <20230315043229.62100-1-fufuyqqqqqq@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
06628267 |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h'
ide_get_geometry() and ide_get_bios_chs_trans() are only used by the TYPE_PC_MACHINE. "hw/ide.h" is a mixed bag of lost IDE d
hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h'
ide_get_geometry() and ide_get_bios_chs_trans() are only used by the TYPE_PC_MACHINE. "hw/ide.h" is a mixed bag of lost IDE declarations. In order to remove this (almost) pointless header soon, move these declarations to "hw/ide/internal.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230220091358.17038-18-philmd@linaro.org>
show more ...
|
#
2c50207f |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Rename idebus_active_if() -> ide_bus_active_if()
idebus_active_if() operates on a IDEBus; rename it as ide_bus_active_if() to emphasize its first argument is a IDEBus.
Mechanical change usi
hw/ide: Rename idebus_active_if() -> ide_bus_active_if()
idebus_active_if() operates on a IDEBus; rename it as ide_bus_active_if() to emphasize its first argument is a IDEBus.
Mechanical change using:
$ sed -i -e 's/idebus_active_if/ide_bus_active_if/g' \ $(git grep -l idebus_active_if)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-16-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
c9519630 |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Rename ide_init2() -> ide_bus_init_output_irq()
ide_init2() initializes a IDEBus, and set its output IRQ. To emphasize this, rename it as ide_bus_init_output_irq().
Mechanical change using:
hw/ide: Rename ide_init2() -> ide_bus_init_output_irq()
ide_init2() initializes a IDEBus, and set its output IRQ. To emphasize this, rename it as ide_bus_init_output_irq().
Mechanical change using:
$ sed -i -e 's/ide_init2/ide_bus_init_output_irq/g' \ $(git grep -l ide_init2)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-15-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
783f4474 |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd()
ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus.
Mechanical change using:
$ s
hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd()
ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus.
Mechanical change using:
$ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-14-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
e29b1246 |
| 14-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb
ide_register_restart_cb() operates on a IDEBus; rename it as ide_bus_register_restart_cb() to emphasize its first argument is a
hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb
ide_register_restart_cb() operates on a IDEBus; rename it as ide_bus_register_restart_cb() to emphasize its first argument is a IDEBus.
Mechanical change using:
$ sed -i -e 's/ide_register_restart_cb/ide_bus_register_restart_cb/g' \ $(git grep -l ide_register_restart_cb)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-13-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
b6a5ab27 |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Rename ide_create_drive() -> ide_bus_create_drive()
ide_create_drive() operates on a IDEBus; rename it as ide_bus_create_drive() to emphasize its first argument is a IDEBus.
Mechanical chan
hw/ide: Rename ide_create_drive() -> ide_bus_create_drive()
ide_create_drive() operates on a IDEBus; rename it as ide_bus_create_drive() to emphasize its first argument is a IDEBus.
Mechanical change using:
$ sed -i -e 's/ide_create_drive/ide_bus_create_drive/g' \ $(git grep -wl ide_create_drive)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-12-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
0cfe719d |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Rename ide_set_irq() -> ide_bus_set_irq()
ide_set_irq() operates on a IDEBus; rename it as ide_bus_set_irq() to emphasize its first argument is a IDEBus.
Mechanical change using:
$ sed -
hw/ide: Rename ide_set_irq() -> ide_bus_set_irq()
ide_set_irq() operates on a IDEBus; rename it as ide_bus_set_irq() to emphasize its first argument is a IDEBus.
Mechanical change using:
$ sed -i -e 's/ide_set_irq/ide_bus_set_irq/g' \ $(git grep -l ide_set_irq)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-11-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
da9f1172 |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Un-inline ide_set_irq()
Only include "hw/irq.h" where appropriate.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-10-philmd@linaro.org> Reviewed
hw/ide: Un-inline ide_set_irq()
Only include "hw/irq.h" where appropriate.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-10-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
1f7a0d03 |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h'
The IDEBus structure has PortioList fields, so we need its declarations from "exec/ioport.h". "hw/isa/isa.h" is not required.
Signed-off-by
hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h'
The IDEBus structure has PortioList fields, so we need its declarations from "exec/ioport.h". "hw/isa/isa.h" is not required.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-9-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
show more ...
|
#
989bc90b |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide: Remove unused 'qapi/qapi-types-run-state.h'
Missed in commit d7458e7754 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState.
Signed-off-by: Ph
hw/ide: Remove unused 'qapi/qapi-types-run-state.h'
Missed in commit d7458e7754 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-8-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
show more ...
|
#
cc135b10 |
| 09-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/ide/atapi: Restrict 'scsi/constants.h' inclusion
Only atapi.c requires the SCSI constants. No need to include it in all files including "hw/ide/internal.h".
Signed-off-by: Philippe Mathieu-Daudé
hw/ide/atapi: Restrict 'scsi/constants.h' inclusion
Only atapi.c requires the SCSI constants. No need to include it in all files including "hw/ide/internal.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-7-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
show more ...
|
#
1ea17d22 |
| 30-Nov-2022 |
Lubomir Rintel <lkundrak@v3.sk> |
ide: Add 8-bit data mode
CompactFlash uses features 0x01 and 0x81 to enable/disable 8-bit data path. Implement them.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Message-Id: <20221130120238.70671
ide: Add 8-bit data mode
CompactFlash uses features 0x01 and 0x81 to enable/disable 8-bit data path. Implement them.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Message-Id: <20221130120238.706717-1-lkundrak@v3.sk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
176e4961 |
| 07-Jul-2022 |
Lev Kujawski <lkujaw@member.fsf.org> |
hw/ide/core.c: Implement ATA INITIALIZE_DEVICE_PARAMETERS command
CHS-based disk utilities and operating systems may adjust the logical geometry of a hard drive to cope with the expectations or limi
hw/ide/core.c: Implement ATA INITIALIZE_DEVICE_PARAMETERS command
CHS-based disk utilities and operating systems may adjust the logical geometry of a hard drive to cope with the expectations or limitations of software using the ATA INITIALIZE_DEVICE_PARAMETERS command.
Prior to this patch, INITIALIZE_DEVICE_PARAMETERS was a nop that always returned success, raising the possibility of data loss or corruption if the CHS<->LBA translation redirected a write to the wrong sector.
* hw/ide/core.c ide_reset(): Reset the logical CHS geometry of the hard disk when the power-on defaults feature is enabled. cmd_specify(): a) New function implementing INITIALIZE_DEVICE_PARAMETERS. b) Ignore calls for empty or ATAPI devices. cmd_set_features(): Implement the power-on defaults enable and disable features. struct ide_cmd_table: Switch WIN_SPECIFY from cmd_nop() to cmd_specify(). ide_init_drive(): Set new fields 'drive_heads' and 'drive_sectors' based upon the actual disk geometry.
* include/hw/ide/internal.h struct IDEState: a) Store the actual drive CHS values within the new fields 'drive_heads' and 'drive_sectors.' b) Track whether a soft IDE reset should also reset the logical CHS geometry of the hard disk within the new field 'reset_reverts'.
Signed-off-by: Lev Kujawski <lkujaw@member.fsf.org> Message-Id: <20220707031140.158958-7-lkujaw@member.fsf.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
#
82c74ac4 |
| 23-Sep-2021 |
Peter Maydell <peter.maydell@linaro.org> |
ide: Rename ide_bus_new() to ide_bus_init()
The function ide_bus_new() does an in-place initialization. Rename it to ide_bus_init() to follow our _init vs _new convention.
Signed-off-by: Peter May
ide: Rename ide_bus_new() to ide_bus_init()
The function ide_bus_new() does an in-place initialization. Rename it to ide_bus_init() to follow our _init vs _new convention.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Corey Minyard <cminyard@mvista.com> Reviewed-by: John Snow <jsnow@redhat.com> Acked-by: John Snow <jsnow@redhat.com> (Feel free to merge.) Message-id: 20210923121153.23754-7-peter.maydell@linaro.org
show more ...
|
#
9405d87b |
| 16-Apr-2021 |
Thomas Huth <thuth@redhat.com> |
hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine
QEMU currently crashes when the user tries to do something like:
qemu-system-x86_64 -M x-remote -device piix3-ide
This
hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine
QEMU currently crashes when the user tries to do something like:
qemu-system-x86_64 -M x-remote -device piix3-ide
This happens because the "isabus" variable is not initialized with the x-remote machine yet. Add a proper check for this condition and propagate the error to the caller, so we can fail there gracefully.
Message-Id: <20210416125256.2039734-1-thuth@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
0c7515e1 |
| 24-Jul-2020 |
John Snow <jsnow@redhat.com> |
ide: remove magic constants from the device register
(In QEMU, we call this the "select" register.)
My memory isn't good enough to memorize what these magic runes do. Label them to prevent mixups f
ide: remove magic constants from the device register
(In QEMU, we call this the "select" register.)
My memory isn't good enough to memorize what these magic runes do. Label them to prevent mixups from happening in the future.
Side note: I assume it's safe to always set 0xA0 even though ATA2 claims these bits are reserved, because ATA3 immediately reinstated that these bits should be always on. ATA4 and subsequent specs only claim that the fields are obsolete, so I assume it's safe to leave these set and that it should work with the widest array of guests.
Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|