- Oct 02, 2020
-
-
Kevin Wolf authored
Every block export needs a block node to export, so add a 'node-name' option to BlockExportOptions and remove the replaced option 'device' from BlockExportOptionsNbd. To maintain compatibility in nbd-server-add, BlockExportOptionsNbd needs to be wrapped by a new type NbdServerAddOptions that adds 'device' back because nbd-server-add doesn't use the BlockExportOptions base type at all (so even without changing it to a 'node-name' option in block-export-add, this compatibility code would be necessary). Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-16-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-15-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Having a refcount makes sense for all types of block exports. It is also a prerequisite for keeping a list of all exports at the BlockExport level. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-14-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Closing export is somewhat convoluted because nbd_export_close() and nbd_export_put() call each other and the ways they actually end up being nested is not necessarily obvious. However, it is not really necessary to call nbd_export_close() from nbd_export_put() when putting the last reference because it only does three things: 1. Close all clients. We're going to refcount 0 and all clients hold a reference, so we know there is no active client any more. 2. Close the user reference (represented by exp->name being non-NULL). The same argument applies: If the export were still named, we would still have a reference. 3. Freeing exp->description. This is really cleanup work to be done when the export is finally freed. There is no reason to already clear it while clients are still in the process of shutting down. So after moving the cleanup of exp->description, the code can be simplified so that only nbd_export_close() calls nbd_export_put(), but never the other way around. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-13-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
With this change, NBD exports are now only created through the BlockExport interface. This allows us finally to move things from the NBD layer to the BlockExport layer if they make sense for other export types, too. blk_exp_add() returns only a weak reference, so the explicit nbd_export_put() goes away. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-12-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
The export close callback is unused by the built-in NBD server. qemu-nbd uses it only during shutdown to wait for the unrefed export to actually go away. It can just use nbd_export_close_all() instead and do without the callback. This removes the close callback from nbd_export_new() and makes both callers of it more similar. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-11-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
qemu-nbd allows use of writethrough cache modes, which mean that write requests made through NBD will cause a flush before they complete. Expose the same functionality in block-export-add. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-10-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
This is a QMP equivalent of qemu-nbd's --shared option, limiting the maximum number of clients that can attach at the same time. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-9-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
nbd-server-add tries to be convenient and adds two questionable features that we don't want to share in block-export-add, even for NBD exports: 1. When requesting a writable export of a read-only device, the export is silently downgraded to read-only. This should be an error in the context of block-export-add. 2. When using a BlockBackend name, unplugging the device from the guest will automatically stop the NBD server, too. This may sometimes be what you want, but it could also be very surprising. Let's keep things explicit with block-export-add. If the user wants to stop the export, they should tell us so. Move these things into the nbd-server-add QMP command handler so that they apply only there. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-8-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Instead of implementing qemu-nbd --offset in the NBD code, just put a raw block node with the requested offset on top of the user image and rely on that doing the job. This does not only simplify the nbd_export_new() interface and bring it closer to the set of options that the nbd-server-add QMP command offers, but in fact it also eliminates a potential source for bugs in the NBD code which previously had to add the offset manually in all relevant places. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-7-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
No reason to duplicate the functionality locally, we can now just reuse the QMP command block-export-add for --export. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-6-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
We want to have a common set of commands for all types of block exports. Currently, this is only NBD, but we're going to add more types. This patch adds the basic BlockExport and BlockExportDriver structs and a QMP command block-export-add that creates a new export based on the given BlockExportOptions. qmp_nbd_server_add() becomes a wrapper around qmp_block_export_add(). Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-5-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
The name BlockExport will be used for the struct containing the runtime state of block exports, so change the name of export creation options. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-4-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Move all block export related types and commands from block-core to the new QAPI module block-export. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-3-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20200924152717.287415-2-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Dr. David Alan Gilbert authored
help_oneline is declared and starts as: static void help_oneline(const char *cmd, const cmdinfo_t *ct) { if (cmd) { printf("%s ", cmd); } else { printf("%s ", ct->name); if (ct->altname) { printf("(or %s) ", ct->altname); } } However, there are only two routes to help_oneline being called: help_f -> help_all -> help_oneline(ct->name, ct) help_f -> help_onecmd(argv[1], ct) In the first case, 'cmd' and 'ct->name' are the same thing, so it's impossible for the if (cmd) to be false and then validly print ct->name - this is upsetting gcc ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96739 ) In the second case, cmd is argv[1] and we know we've got argv[1] so again (cmd) is non-NULL. Simplify help_oneline by just printing cmd. (Also strengthen argc check just to be pedantic) Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200824102914.105619-1-dgilbert@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Alberto Garcia authored
This filter was added back in 2017 for QEMU 2.11 but it was never properly documented, so let's explain how it works and add a couple of examples. Signed-off-by:
Alberto Garcia <berto@igalia.com> Message-Id: <20200921173016.27935-1-berto@igalia.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Thomas Huth authored
macOS is shipped with a very old version of the bash (3.2), which is currently not suitable for running the iotests anymore (e.g. it is missing support for "readarray" which is used in the file tests/qemu-iotests/common.filter). Add a check to skip the iotests in this case - if someone still wants to run the iotests on macOS, they can install a newer version from homebrew, for example. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20200918153514.330705-1-thuth@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Philippe Mathieu-Daudé authored
Use self-explicit NANOSECONDS_PER_SECOND definition instead of magic value. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200921110145.520944-1-philmd@redhat.com> Reviewed-by:
Alberto Garcia <berto@igalia.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Peter Maydell authored
Python testing updates: - drop python 3.5 test from travis - replace Debian 9 containers with 10 - increase cross build timeout - bump minimum python version in configure - move user plugins tests to gitlab - split deprecated builds into build and test # gpg: Signature made Fri 02 Oct 2020 12:34:36 BST # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-and-python-021020-1: gitlab: split deprecated job into build/check stages gitlab: move linux-user plugins test across to gitlab configure: Bump the minimum required Python version to 3.6 gitlab-ci: Increase the timeout for the cross-compiler builds tests/docker: Remove old Debian 9 containers shippable.yml: Remove the Debian9-based MinGW cross-compiler tests tests/docker: Update the tricore container to debian 10 gitlab-ci: Remove the Debian9-based containers and containers-layer3 tests/docker: Use Fedora containers for MinGW cross-builds in the gitlab-CI travis.yml: Drop the Python 3.5 build travis.yml: Drop the superfluous Python 3.6 build travis.yml: Update Travis to use Bionic and Focal instead of Xenial travis.yml: Drop the default softmmu builds migration: Silence compiler warning in global_state_store_running() Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Alex Bennée authored
While the job is pretty fast for only a few targets we still want to catch breakage of the build. By splitting the test step we can allow_failures for that while still ensuring we don't miss the build breaking. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201002091538.3017-1-alex.bennee@linaro.org>
-
Alex Bennée authored
Even with the recent split moving beefier plugins into contrib and dropping them from the check-tcg tests we are still hitting time limits. This possibly points to a slow down of --debug-tcg but seeing as we are migrating stuff to gitlab we might as well move there and bump the timeout. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201002103223.24022-1-alex.bennee@linaro.org>
-
Thomas Huth authored
All our supported build platforms have Python 3.6 or newer nowadays, and there are some useful features in Python 3.6 which are not available in 3.5 yet (e.g. the type hint annotations which will allow us to statically type the QAPI parser), so let's bump the minimum Python version to 3.6 now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200923162908.95372-1-thuth@redhat.com> Message-Id: <20200925154027.12672-16-alex.bennee@linaro.org>
-
Thomas Huth authored
Some of the cross-compiler builds (the mips build and the win64 build for example) are quite slow and sometimes hit the 1h time limit. Increase the limit a little bit to make sure that we do not get failures in the CI runs just because of some few minutes. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200921174320.46062-7-thuth@redhat.com> Message-Id: <20200925154027.12672-15-alex.bennee@linaro.org>
-
Thomas Huth authored
We do not support Debian 9 in QEMU anymore, and the Debian 9 containers are now no longer used in the gitlab-CI. Time to remove them. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200921174320.46062-6-thuth@redhat.com> Message-Id: <20200925154027.12672-14-alex.bennee@linaro.org>
-
Thomas Huth authored
We're not supporting Debian 9 anymore, and we are now testing MinGW cross-compiler builds in the gitlab-CI, too, so we do not really need these jobs in the shippable.yml anymore. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200921174320.46062-5-thuth@redhat.com> Message-Id: <20200925154027.12672-13-alex.bennee@linaro.org>
-
Thomas Huth authored
We do not support Debian 9 anymore, thus update the Tricore container to Debian 10 now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200921174320.46062-4-thuth@redhat.com> Message-Id: <20200925154027.12672-12-alex.bennee@linaro.org>
-
Thomas Huth authored
According to our support policy, Debian 9 is not supported by the QEMU project anymore. Since we now switched the MinGW cross-compiler builds to Fedora, we do not need these Debian9-based containers in the gitlab-CI anymore, and can now also get rid of the "layer3" container build stage this way. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200921174320.46062-3-thuth@redhat.com> Message-Id: <20200925154027.12672-11-alex.bennee@linaro.org>
-
Thomas Huth authored
According to our support policy, we do not support Debian 9 in QEMU anymore, and we only support building the Windows binaries with a very recent version of the MinGW toolchain. So we should not test the MinGW cross-compilation with Debian 9 anymore, but switch to something newer like Fedora. To do this, we need a separate Fedora container for each build that provides the QEMU_CONFIGURE_OPTS environment variable. Unfortunately, the MinGW 64-bit compiler seems to be a little bit slow, so we also have to disable some features like "capstone" in the build here to make sure that the CI pipelines still finish within a reasonable amount of time. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200921174320.46062-2-thuth@redhat.com> Message-Id: <20200925154027.12672-10-alex.bennee@linaro.org>
-
Thomas Huth authored
We are soon going to remove the support for Python 3.5. So remove the CI job now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200922070441.48844-1-thuth@redhat.com> Message-Id: <20200925154027.12672-9-alex.bennee@linaro.org>
-
Thomas Huth authored
Python 3.6 is already the default Python in the jobs that are based on Ubuntu Bionic, so it does not make much sense to test this again separately. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200918103430.297167-7-thuth@redhat.com> Message-Id: <20200925154027.12672-8-alex.bennee@linaro.org>
-
Thomas Huth authored
According to our support policy, we do not support Xenial anymore. Time to switch the bigger parts of the builds to Focal instead. Some few jobs have to be updated to Bionic instead, since they are currently still failing on Focal otherwise. Also "--disable-pie" is causing linker problems with newer versions of Ubuntu ... so remove that switch from the jobs now (we still test it in a gitlab CI job, so we don't lose much test coverage here). Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Cleber Rosa <crosa@redhat.com> Reviewed-by:
Cleber Rosa <crosa@redhat.com> Message-Id: <20200918103430.297167-6-thuth@redhat.com> Message-Id: <20200925154027.12672-7-alex.bennee@linaro.org>
-
Thomas Huth authored
The total runtime of all Travis jobs is very long and we are testing all softmmu targets in the gitlab-CI already - so we can speed up the Travis testing a little bit by not testing the softmmu targets here anymore. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Cleber Rosa <crosa@redhat.com> Acked-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200918103430.297167-5-thuth@redhat.com> Message-Id: <20200925154027.12672-6-alex.bennee@linaro.org>
-
Thomas Huth authored
GCC 9.3.0 on Ubuntu complains: In file included from /usr/include/string.h:495, from /home/travis/build/huth/qemu/include/qemu/osdep.h:87, from ../migration/global_state.c:13: In function ‘strncpy’, inlined from ‘global_state_store_running’ at ../migration/global_state.c:47:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 100 equals destination size [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... but we apparently really want to do a strncpy here - the size is already checked with the assert() statement right in front of it. To silence the warning, simply replace it with our strpadcpy() function. Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com> (two years ago) Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200918103430.297167-4-thuth@redhat.com> Message-Id: <20200925154027.12672-5-alex.bennee@linaro.org>
-
- Oct 01, 2020
-
-
Peter Maydell authored
Pull request # gpg: Signature made Thu 01 Oct 2020 18:41:05 BST # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full] # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jsnow-gitlab/tags/ide-pull-request: ide: cancel pending callbacks on SRST ide: clear interrupt on command write ide: remove magic constants from the device register ide: reorder set/get sector functions ide: model HOB correctly ide: don't tamper with the device register ide: rename cmd_write to ctrl_write hw/ide/ahci: Do not dma_memory_unmap(NULL) MAINTAINERS: Update my git address Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
John Snow authored
The SRST implementation did not keep up with the rest of IDE; it is possible to perform a weak reset on an IDE device to remove the BSY/DRQ bits, and then issue writes to the control/device registers which can cause chaos with the state machine. Fix that by actually performing a real reset. Reported-by:
Alexander Bulekov <alxndr@bu.edu> Fixes: https://bugs.launchpad.net/qemu/+bug/1878253 Fixes: https://bugs.launchpad.net/qemu/+bug/1887303 Fixes: https://bugs.launchpad.net/qemu/+bug/1887309 Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Not known to fix any bug, but I couldn't help but notice that ATA specifies that writing to this register should clear an interrupt. ATA7: Section 5.3.3 (Command register - Effect) ATA6: Section 7.4.4 (Command register - Effect) ATA5: Section 7.4.4 (Command register - Effect) ATA4: Section 7.4.4 (Command register - Effect) ATA3: Section 5.2.2 (Command register) Other editions: try searching for the phrase "Writing this register". Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
(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>
-
John Snow authored
Reorder these just a pinch to make them more obvious at a glance what the addressing mode is. Signed-off-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
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:
John Snow <jsnow@redhat.com>
-