Re: [Qemu-devel] [PATCH v4 2/8] ahci: MSI capability should be at 0x80, not 0x50.

2014-09-17 Thread John Snow
On 09/17/2014 12:42 PM, Michael S. Tsirkin wrote: On Wed, Sep 17, 2014 at 05:54:28PM +0200, Jan Kiszka wrote: On 2014-08-21 19:44, John Snow wrote: In the Intel ICH9 data sheet, the MSI capability offset in the PCI configuration space for ICH9 AHCI devices is specified to be 0x80. Further

[Qemu-devel] [RFC v2 0/3] Q35/AHCI -cdrom/-hda desugaring

2014-09-18 Thread John Snow
meaningful information. John Snow (3): blockdev: Add function to search for orphaned drives Add units-per-idebus property ahci: implement -cdrom and -hd[a-d] blockdev.c| 29 +++-- device-hotplug.c | 2 +- hw/i386/pc_q35.c | 6

[Qemu-devel] [RFC v2 2/3] Add units-per-idebus property

2014-09-18 Thread John Snow
Signed-off-by: John Snow --- blockdev.c| 10 -- device-hotplug.c | 2 +- hw/i386/pc_q35.c | 3 ++- include/hw/boards.h | 3 ++- include/sysemu/blockdev.h | 2 +- vl.c | 19 +++ 6 files changed, 25 insertions

[Qemu-devel] [RFC v2 3/3] ahci: implement -cdrom and -hd[a-d]

2014-09-18 Thread John Snow
Signed-off-by: John Snow --- hw/i386/pc_q35.c | 3 +++ hw/ide/ahci.c| 31 +++ hw/ide/ahci.h| 3 +++ 3 files changed, 37 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index fd26fe1..0f33696 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35

[Qemu-devel] [RFC v2 1/3] blockdev: Add function to search for orphaned drives

2014-09-18 Thread John Snow
Signed-off-by: John Snow --- blockdev.c| 19 +++ include/sysemu/blockdev.h | 1 + vl.c | 5 + 3 files changed, 25 insertions(+) diff --git a/blockdev.c b/blockdev.c index b361fbb..5e7c93a 100644 --- a/blockdev.c +++ b/blockdev.c

[Qemu-devel] [PATCH 02/15] qtest/ahci: Add port_select helper

2014-09-18 Thread John Snow
This helper identifies which port of the AHCI HBA has a device we may run tests on. Signed-off-by: John Snow --- tests/ahci-test.c | 46 +- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index

[Qemu-devel] [PATCH 05/15] qtest/ahci: Add build cmd table helper

2014-09-18 Thread John Snow
build_cmd_table is a helper routine to build the command table, which consists of the Command FIS and the Physical Region Descriptor Table. Signed-off-by: John Snow --- tests/ahci-test.c | 113 +++--- 1 file changed, 74 insertions(+), 39 deletions

[Qemu-devel] [PATCH 04/15] qtest/ahci: Add command header helpers

2014-09-18 Thread John Snow
command slot to allow us to cycle through the available command slots. command_destroy obliterates all information contained within a given slot's command header, and frees its associated command table, but not its DMA buffer! Signed-off-by: John Snow --- tests/ahci-test.c

[Qemu-devel] [PATCH 12/15] qtest/ahci: Enforce zero-leaks for guest mem usage

2014-09-18 Thread John Snow
The purpose of this patch is to aid in debugging the new malloc-pc interface for guest memory, by enabling the enforcing of no guest memory blocks in use at exit time. Signed-off-by: John Snow --- tests/ahci-test.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions

[Qemu-devel] [PATCH 03/15] qtest/ahci: Add port_clear helper

2014-09-18 Thread John Snow
Add a helper that assists in clearing out potentially old error and FIS information from an AHCI port's data structures. This ensures we always start with a blank slate for interrupt and FIS receipt information. Signed-off-by: John Snow --- tests/ahci-test.c | 26 ++--

[Qemu-devel] [PATCH 06/15] qtest/ahci: Add link_cmd_slot helper

2014-09-18 Thread John Snow
link_cmd_slot creates the command header, by setting a pointer to the command table as well as adjusting other metadata, like DMA direction and PRDT length. It effectively links a command, via its table, to the indicated command slot. Signed-off-by: John Snow --- tests/ahci-test.c | 72

[Qemu-devel] [PATCH 10/15] qtest/ahci: Add port_check_nonbusy helper

2014-09-18 Thread John Snow
A simple helper that asserts a given port is not busy processing any commands via the TFD, Command Issue and SACT registers. Signed-off-by: John Snow --- tests/ahci-test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index

[Qemu-devel] [PATCH 15/15] qtest/ahci: Don't use a magic constant for buffer size

2014-09-18 Thread John Snow
Fix to correct the use of "512" as a magic constant and define it as the buffer size for the operation instead. Signed-off-by: John Snow --- tests/ahci-test.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c ind

[Qemu-devel] [PATCH 07/15] qtest/ahci: Add port_check_error helper

2014-09-18 Thread John Snow
port_check-error checks a given port's error registers and asserts that everything from the port-level view is still OK. Signed-off-by: John Snow --- tests/ahci-test.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/tests/ahci-test.c b/

[Qemu-devel] [PATCH 13/15] qtest/ahci: Add a macro bootup routine

2014-09-18 Thread John Snow
Add a routine that can be used to engage the AHCI device at a not-granular level so that bringing up the functionality of the HBA is easy in future tests that are not concerned with testing the bring-up process. Signed-off-by: John Snow --- tests/ahci-test.c | 19 --- 1 file

[Qemu-devel] [PATCH 09/15] qtest/ahci: Add port_check_interrupts helper

2014-09-18 Thread John Snow
ff-by: John Snow --- tests/ahci-test.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 4615681..315e6e9 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -1314,6 +1314,20 @@ static void port_check_

[Qemu-devel] [PATCH 08/15] qtest/ahci: Add issue_command helper

2014-09-18 Thread John Snow
issue_command is a small routine that informs the AHCI device that we have finalized our command and we'd wish for the device to begin processing it. issue_command polls the AHCI device waiting for the device to finish, in order to achieve a synchronous effect. Signed-off-by: John

[Qemu-devel] [PATCH 11/15] qtest/ahci: Add cmd response sanity check helpers

2014-09-18 Thread John Snow
Adds a few helpers to help sanity-check the response of the AHCI device after a command. d2h_check_sanity inspects the D2H Register FIS, pio_check_sanity inspects the PIO Setup FIS, and cmd_check_sanity inspects the command header. Signed-off-by: John Snow --- tests/ahci-test.c | 123

[Qemu-devel] [PATCH 14/15] qtest/ahci: Add human-readable command names

2014-09-18 Thread John Snow
Instead of using direct hex values, use SATA command mnemonics. Signed-off-by: John Snow --- tests/ahci-test.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 63fc309..e3091b9 100644 --- a/tests/ahci-test.c +++ b/tests

[Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-18 Thread John Snow
he operation of the existing test, or add new tests. It only offers refactorings for future patch submissions which depend on them, but are still under consideration. John Snow (15): qtest/ahci: Add AHCIState structure qtest/ahci: Add port_select helper qtest/ahci: Add port_clear helper

[Qemu-devel] [PATCH 01/15] qtest/ahci: Add AHCIState structure

2014-09-18 Thread John Snow
Introduce a state structure that can be used to conveniently bookmark key values of the AHCI Device instead of re-polling it all the time. This structure also helps ease of cleanup. Signed-off-by: John Snow --- tests/ahci-test.c | 283 ++ 1

Re: [Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-19 Thread John Snow
On 09/19/2014 06:53 AM, Markus Armbruster wrote: John Snow writes: The original version of the AHCI test base which is now staged for being merged, processes the ahci_identify test in a monolithic fashion. In authoring new tests, it became necessary and obvious as to how the operation of

Re: [Qemu-devel] [RFC v2 1/3] blockdev: Add function to search for orphaned drives

2014-09-19 Thread John Snow
On 09/19/2014 04:28 AM, Markus Armbruster wrote: John Snow writes: Signed-off-by: John Snow --- blockdev.c| 19 +++ include/sysemu/blockdev.h | 1 + vl.c | 5 + 3 files changed, 25 insertions(+) diff --git a/blockdev.c b

Re: [Qemu-devel] [RFC v2 0/3] Q35/AHCI -cdrom/-hda desugaring

2014-09-22 Thread John Snow
On 09/19/2014 05:53 AM, Markus Armbruster wrote: John Snow writes: This is an extremely rough/quick sketch of a -cdrom/-hda desugaring fix for Q35/AHCI. Before I spent any time on it, I wanted feedback from Markus or anyone else who had concerns about how this problem would get fixed

[Qemu-devel] [PATCH 2/6] blockdev: Allow overriding if_max_dev property

2014-09-23 Thread John Snow
his information at option parsing time (e.g, within drive_new), we consider the alternative of marking the if_max_devs table mutable so that later configuration and initialization can adjust the mapping at will, but only up until a drive is added, at which point the mapping is finalized. Signed-off-by: J

[Qemu-devel] [PATCH 1/6] blockdev: Orphaned drive search

2014-09-23 Thread John Snow
issue. A warning in these cases is considered appropriate. Signed-off-by: John Snow --- blockdev.c| 21 + include/sysemu/blockdev.h | 2 ++ vl.c | 12 +++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/blockdev.c

[Qemu-devel] [PATCH 0/6] Q35: Implement -cdrom/-hda sugar

2014-09-23 Thread John Snow
'units-per-default-bus' And allows override of any one IF type (block_default) John Snow (6): blockdev: Orphaned drive search blockdev: Allow overriding if_max_dev property pc/vl: Add units-per-default-bus property ide: Update ide_drive_get to be HBA agnostic qtest/bios-tables: Corr

[Qemu-devel] [PATCH 5/6] qtest/bios-tables: Correct Q35 command line

2014-09-23 Thread John Snow
-hd,drive=hd Which will create a drive and device due to the lack of specifying if=none. Then, it will attempt to create a second device and fail. This patch corrects this test to always use the full, non-sugared -device/-drive syntax for both PC and Q35. Signed-off-by: John Snow --- tests/bios

[Qemu-devel] [PATCH 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-09-23 Thread John Snow
Instead of duplicating the logic for the if_ide (bus,unit) mappings, rely on the blockdev layer for managing those mappings for us, and use the drive_get_by_index call instead. This allows ide_drive_get to work for AHCI HBAs as well, and can be used in the Q35 initialization. Signed-off-by: John

[Qemu-devel] [PATCH 3/6] pc/vl: Add units-per-default-bus property

2014-09-23 Thread John Snow
overrides the mapping for drives matching the block_default_type interface. Signed-off-by: John Snow --- hw/i386/pc.c| 1 + hw/i386/pc_q35.c| 3 ++- include/hw/boards.h | 2 ++ vl.c| 8 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/i386/p

[Qemu-devel] [PATCH 6/6] q35/ahci: Pick up -cdrom and -hda options

2014-09-23 Thread John Snow
: John Snow --- hw/i386/pc_q35.c | 3 +++ hw/ide/ahci.c| 15 +++ hw/ide/ahci.h| 2 ++ 3 files changed, 20 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index b28ddbb..1664a2d 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -86,6 +86,7 @@ static void

Re: [Qemu-devel] issue: linking 64bit glib when building for cpu=i386

2014-09-23 Thread John Snow
On 08/22/2014 05:05 AM, Stefan Hajnoczi wrote: On Fri, Aug 22, 2014 at 9:20 AM, Daniel P. Berrange wrote: On Thu, Aug 21, 2014 at 08:10:54PM -0400, John Snow wrote: I was running a series of tests on 32 and 64 bit hosts to test for endianness and variable width issues when I noticed that I

Re: [Qemu-devel] [PATCH v3] docs: add blkdebug block driver documentation

2014-09-24 Thread John Snow
On 09/24/2014 12:24 PM, Max Reitz wrote: On 24.09.2014 11:44, Stefan Hajnoczi wrote: The blkdebug block driver is undocumented. Documenting it is worthwhile since it offers powerful error injection features that are used by qemu-iotests test cases. This document will make it easier for peopl

Re: [Qemu-devel] [PATCH 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-09-24 Thread John Snow
On 09/24/2014 10:35 AM, Markus Armbruster wrote: John Snow writes: Instead of duplicating the logic for the if_ide (bus,unit) mappings, rely on the blockdev layer for managing those mappings for us, and use the drive_get_by_index call instead. This allows ide_drive_get to work for AHCI

Re: [Qemu-devel] [PATCH 1/6] blockdev: Orphaned drive search

2014-09-24 Thread John Snow
On 09/24/2014 10:06 AM, Markus Armbruster wrote: John Snow writes: When users use command line options like -hda, -cdrom, or even -drive if=ide, it is up to the board initialization routines to pick up these drives and create backing devices for them. Some boards, like Q35, have not been

Re: [Qemu-devel] [PATCH 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-09-26 Thread John Snow
On 09/25/2014 02:13 AM, Markus Armbruster wrote: John Snow writes: On 09/24/2014 10:35 AM, Markus Armbruster wrote: John Snow writes: Instead of duplicating the logic for the if_ide (bus,unit) mappings, rely on the blockdev layer for managing those mappings for us, and use the

[Qemu-devel] [PATCH v2 3/6] pc/vl: Add units-per-default-bus property

2014-09-29 Thread John Snow
cow2,index=5 --> bus=5,unit=0. The mapping is adjusted based on the fact that the default IF for the Q35 machine type is IF_IDE, and units-per-default-bus overrides the IDE mapping from its default of 2 units per bus to just 1 unit per bus. Signed-off-by: John Snow --- hw/i386/pc.c

[Qemu-devel] [PATCH v2 5/6] qtest/bios-tables: Correct Q35 command line

2014-09-29 Thread John Snow
-hd,drive=hd Which will create a drive and device due to the lack of specifying if=none. Then, it will attempt to create a second device and fail. This patch corrects this test to always use the full, non-sugared -device/-drive syntax for both PC and Q35. Signed-off-by: John Snow --- tests/bios

[Qemu-devel] [PATCH v2 1/6] blockdev: Orphaned drive search

2014-09-29 Thread John Snow
is an issue. A warning in these cases is considered appropriate. Signed-off-by: John Snow --- blockdev.c| 21 + include/sysemu/blockdev.h | 2 ++ vl.c | 10 +- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH v2 6/6] q35/ahci: Pick up -cdrom and -hda options

2014-09-29 Thread John Snow
This patch implements the backend for the Q35 board for us to be able to pick up and use drives defined by the -cdrom, -hda, or -drive if=ide shorthand options. Signed-off-by: John Snow --- hw/i386/pc_q35.c | 4 hw/ide/ahci.c| 15 +++ hw/ide/ahci.h| 2 ++ 3 files

[Qemu-devel] [PATCH v2 0/6] Q35: Implement -cdrom/-hda sugar

2014-09-29 Thread John Snow
nits-per-idebus' to 'units-per-default-bus' And allows override of any one IF type (block_default) RFC2: - Rewrote series to avoid the creation of IF_AHCI. John Snow (6): blockdev: Orphaned drive search blockdev: Allow overriding if_max_dev property pc/vl: Add units-per-default-b

[Qemu-devel] [PATCH v2 2/6] blockdev: Allow overriding if_max_dev property

2014-09-29 Thread John Snow
his information at option parsing time (e.g, within drive_new), we consider the alternative of marking the if_max_devs table mutable so that later configuration and initialization can adjust the mapping at will, but only up until a drive is added, at which point the mapping is finalized. Signed-off-by: J

[Qemu-devel] [PATCH v2 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-09-29 Thread John Snow
nature of the argument to ide_drive_get so that represents the number of total drives we can support, and not the total number of buses. This will prevent array overflows if the units-per-default-bus property ever needs to be adjusted for compatibility reasons. Signed-off-by: John Snow

Re: [Qemu-devel] [PATCH v2 6/6] q35/ahci: Pick up -cdrom and -hda options

2014-09-30 Thread John Snow
On 09/30/2014 03:54 AM, Markus Armbruster wrote: John Snow writes: This patch implements the backend for the Q35 board for us to be able to pick up and use drives defined by the -cdrom, -hda, or -drive if=ide shorthand options. Signed-off-by: John Snow --- hw/i386/pc_q35.c | 4

Re: [Qemu-devel] [PATCH v2 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-09-30 Thread John Snow
On 09/30/2014 03:38 AM, Markus Armbruster wrote: John Snow writes: Instead of duplicating the logic for the if_ide (bus,unit) mappings, rely on the blockdev layer for managing those mappings for us, and use the drive_get_by_index call instead. This allows ide_drive_get to work for AHCI

[Qemu-devel] [PATCH v3 0/6] Q35: Implement -cdrom/-hda sugar

2014-10-01 Thread John Snow
anning to exclude IF_NONE and automatically added drives - Renames 'units-per-idebus' to 'units-per-default-bus' And allows override of any one IF type (block_default) RFC2: - Rewrote series to avoid the creation of IF_AHCI. John Snow (6): blockdev: Orphaned drive search

[Qemu-devel] [PATCH v3 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-10-01 Thread John Snow
nature of the argument to ide_drive_get so that represents the number of total drives we can support, and not the total number of buses. This will prevent array overflows if the units-per-default-bus property ever needs to be adjusted for compatibility reasons. Signed-off-by: John Snow

[Qemu-devel] [PATCH v3 6/6] q35/ahci: Pick up -cdrom and -hda options

2014-10-01 Thread John Snow
This patch implements the backend for the Q35 board for us to be able to pick up and use drives defined by the -cdrom, -hda, or -drive if=ide shorthand options. Signed-off-by: John Snow --- hw/i386/pc_q35.c | 4 hw/ide/ahci.c| 15 +++ hw/ide/ahci.h| 2 ++ 3 files

[Qemu-devel] [PATCH v3 3/6] pc/vl: Add units-per-default-bus property

2014-10-01 Thread John Snow
cow2,index=5 --> bus=5,unit=0. The mapping is adjusted based on the fact that the default IF for the Q35 machine type is IF_IDE, and units-per-default-bus overrides the IDE mapping from its default of 2 units per bus to just 1 unit per bus. Signed-off-by: John Snow --- hw/i386/pc.c

[Qemu-devel] [PATCH v3 2/6] blockdev: Allow overriding if_max_dev property

2014-10-01 Thread John Snow
his information at option parsing time (e.g, within drive_new), we consider the alternative of marking the if_max_devs table mutable so that later configuration and initialization can adjust the mapping at will, but only up until a drive is added, at which point the mapping is finalized. Signed-off-by: J

[Qemu-devel] [PATCH v3 5/6] qtest/bios-tables: Correct Q35 command line

2014-10-01 Thread John Snow
-hd,drive=hd Which will create a drive and device due to the lack of specifying if=none. Then, it will attempt to create a second device and fail. This patch corrects this test to always use the full, non-sugared -device/-drive syntax for both PC and Q35. Signed-off-by: John Snow --- tests/bios

[Qemu-devel] [PATCH v3 1/6] blockdev: Orphaned drive search

2014-10-01 Thread John Snow
is an issue. A warning in these cases is considered appropriate. Signed-off-by: John Snow --- blockdev.c| 21 + include/sysemu/blockdev.h | 2 ++ vl.c | 10 +- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-01 Thread John Snow
backs. Taken together, these patches should allow non-ncq operation for Windows hosts, as well as enable hibernation for Windows 7. Hibernation for Windows 8 and AHCI remains non-functional. John Snow (6): ahci: Correct PIO/D2H FIS responses ahci: Update byte count after DMA completion ide: r

[Qemu-devel] [PATCH 3/6] ide: repair PIO transfers for cases where nsector > 1

2014-10-01 Thread John Snow
same sector eight times. This patch adds offset tracking into the PIO pathways so that we can fulfill these requests appropriately. Signed-off-by: John Snow --- hw/ide/ahci.c | 2 +- hw/ide/core.c | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/ide/ahci.c b/hw/ide/a

[Qemu-devel] [PATCH 2/6] ahci: Update byte count after DMA completion

2014-10-01 Thread John Snow
7. Signed-off-by: John Snow --- hw/ide/ahci.c | 41 +++-- hw/ide/core.c | 11 +++ hw/ide/internal.h | 2 ++ 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 0529d68..6966a94 100644 --- a/hw

[Qemu-devel] [PATCH 6/6] ahci: Fix SDB FIS Construction

2014-10-01 Thread John Snow
atch adds an SDB FIS structure with human-readable names, and ensures that we are filling the structure appropriately. Signed-off-by: John Snow --- hw/ide/ahci.c | 18 +- hw/ide/ahci.h | 8 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/ide/ahci.c b/hw

[Qemu-devel] [PATCH 1/6] ahci: Correct PIO/D2H FIS responses

2014-10-01 Thread John Snow
11 which is the Features(15:8) field for Register Host to Device FIS packets, is instead reserved for the PIO Setup FIS and should always be 0. Signed-off-by: John Snow --- hw/ide/ahci.c | 48 +--- 1 file changed, 25 insertions(+), 23 deletions

[Qemu-devel] [PATCH 5/6] ide: Correct handling of malformed/short PRDTs

2014-10-01 Thread John Snow
nish the DMA operation. This patch corrects both occurrences and adds an assertion to prevent future regression. This assertion is tested in the existing ide-test, and is covered in a forthcoming AHCI test. Signed-off-by: John Snow --- dma-helpers.c | 3 +++ hw/ide/ahci.c | 2 +- hw/ide/core.c | 1

[Qemu-devel] [PATCH 4/6] ahci: unify sglist preparation

2014-10-01 Thread John Snow
e sglist at the correct offset. It will also set io_buffer_size, but this is not used in the cmd_read_pio or cmd_write_pio pathways. Signed-off-by: John Snow --- hw/ide/ahci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index db1d226..16cd248

[Qemu-devel] [PATCH] ide: Add resize callback to ide/core

2014-08-12 Thread John Snow
see the expanded size as part of a bus rescan event. This patch also allows guests such as Linux to see the new drive size after a soft reboot event, without having to exit the QEMU process. Signed-off-by: John Snow --- hw/ide/core.c | 29 + 1 file changed, 29

[Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-13 Thread John Snow
QEMU process. Signed-off-by: John Snow --- V2: - Do not attempt to update geometry values, to avoid clobbering user-specified values, if they exist. - Do not regenerate the entire IDENTIFY buffer to avoid losing any settings that occurred during normal operation. hw/ide/core.c | 32

[Qemu-devel] [PATCH v3 00/32] AHCI test suite framework v3

2014-08-13 Thread John Snow
ths, as it was incomplete and unused. "ahci: Add test_hba_spec to ahci-test." - Removed unneeded macros - Added in an optional bar_size return parameter to qpci_iomap "ahci: Add test_identify case to ahci-test." - Corrected raw usage of free() For convenience; https://github.c

[Qemu-devel] [PATCH v3 31/32] ahci: Add test_hba_enable to ahci-test.

2014-08-13 Thread John Snow
adherence. Signed-off-by: John Snow --- tests/ahci-test.c | 156 ++ 1 file changed, 156 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 85f8661..31880ed 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -277,11 +277,17

[Qemu-devel] [PATCH v3 29/32] ahci: properly shadow the TFD register

2014-08-13 Thread John Snow
FD register prior to enabling the port, where incorrect values will be read. This patch also addresses the boot-time values for the PxTFD and PxSIG registers to bring them in line with the AHCI 1.3 specification. Signed-off-by: John Snow --- hw/ide/ahci.c | 42 --

[Qemu-devel] [PATCH v3 25/32] ahci: Adding basic functionality qtest.

2014-08-13 Thread John Snow
. Signed-off-by: John Snow --- tests/Makefile| 2 + tests/ahci-test.c | 196 ++ 2 files changed, 198 insertions(+) create mode 100644 tests/ahci-test.c diff --git a/tests/Makefile b/tests/Makefile index 4b2e1bb..0c61b22 100644 --- a/tests

[Qemu-devel] [PATCH v3 26/32] ahci: MSI capability should be at 0x80, not 0x50.

2014-08-13 Thread John Snow
(Which in this instance would be 0x70) to maintain adherence to the Intel data sheet specifications and real observed behavior. Signed-off-by: John Snow --- hw/ide/ich.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index a2f1639..d2a3ac2 100644

[Qemu-devel] [PATCH v3 28/32] ahci: add test_pci_enable to ahci-test.

2014-08-13 Thread John Snow
This adds a test wherein we engage the PCI AHCI device and ensure that the memory region for the HBA functionality is now accessible. Under Q35 environments, additional PCI configuration is performed to ensure that the HBA functionality will become usable. Signed-off-by: John Snow --- tests

[Qemu-devel] [PATCH v3 32/32] ahci: Add test_identify case to ahci-test.

2014-08-13 Thread John Snow
adjusted in a future patch series when the AHCI DMA pathways are reworked to allow the feature, which may be utilized by OSX guests. Signed-off-by: John Snow --- tests/ahci-test.c | 297 ++ 1 file changed, 297 insertions(+) diff --git a/tests/ahci

[Qemu-devel] [PATCH v3 30/32] ahci: Add test_hba_spec to ahci-test.

2014-08-13 Thread John Snow
Add a test routine that checks the boot-up values of the HBA configuration memory space against the AHCI 1.3 specification and Intel ICH9 data sheet (for Q35 machines) for adherence and sane values. The HBA is not yet engaged or put into the idle state. Signed-off-by: John Snow --- tests/ahci

[Qemu-devel] [PATCH v3 27/32] ahci: Add test_pci_spec to ahci-test.

2014-08-13 Thread John Snow
Adds a specification adherence test for AHCI where the boot-up values for the PCI configuration space are compared against the AHCI 1.3 specification. This test does not itself attempt to engage the device. Signed-off-by: John Snow --- tests/ahci-test.c | 305

Re: [Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-14 Thread John Snow
On 08/14/2014 03:12 AM, Markus Armbruster wrote: I'd prefer if (s->drive_kind == IDE_CFATA) ... else ..., because it avoids the double negative. OK. This is how cmd_identify delegates. For matters of style I usually try to defer to nearby code. Your code duplicates the parts of the func

Re: [Qemu-devel] [PATCH v3 29/32] ahci: properly shadow the TFD register

2014-08-14 Thread John Snow
On 08/14/2014 12:09 PM, Stefan Hajnoczi wrote: On Wed, Aug 13, 2014 at 05:56:12PM -0400, John Snow wrote: @@ -497,6 +495,8 @@ static void ahci_reset_port(AHCIState *s, int port) pr->scr_stat = 0; pr->scr_err = 0; pr->scr_act = 0; +pr->tfdata = 0x7F; Is it

[Qemu-devel] IF_AHCI RFC (Was Re: Are -cdrom/-hda (or -drive if=ide) supposed to work in q35?)

2014-08-14 Thread John Snow
On 06/12/2014 05:03 AM, Markus Armbruster wrote: I've always argued for SATA, because for me if=ide does *not* imply a specific kind of HBA any more than if=scsi does, and the "natural" HBA for Q35 is AHCI in SATA mode. Kevin (cc'ed) has argued for a way to make it connect in l

[Qemu-devel] [PATCH v3] ide: Add resize callback to ide/core

2014-08-14 Thread John Snow
QEMU process. Signed-off-by: John Snow --- V3: - Factored out the size update into new functions. - Fixed the size update for CFATA. - Added assertion to clarify that ide_resize_cb is non-atapi. V2: - Do not attempt to update geometry values, to avoid clobbering user-specified values, if

[Qemu-devel] [RFC 1/4] blockdev: add if_get_max_devs

2014-08-18 Thread John Snow
Signed-off-by: John Snow --- blockdev.c| 9 + include/sysemu/blockdev.h | 1 + 2 files changed, 10 insertions(+) diff --git a/blockdev.c b/blockdev.c index 48bd9a3..58da77f 100644 --- a/blockdev.c +++ b/blockdev.c @@ -110,6 +110,15 @@ void blockdev_auto_del

[Qemu-devel] [RFC 4/4] ahci: implement -cdrom and -hd[a-d]

2014-08-18 Thread John Snow
Signed-off-by: John Snow --- hw/i386/pc_q35.c | 4 hw/ide/ahci.c| 17 + hw/ide/ahci.h| 2 ++ 3 files changed, 23 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 4b5a274..4613565 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -86,6

[Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-18 Thread John Snow
to go yet. I am also not sure what a reasonable way to handle people specifying BOTH if=ide and if=ahci drives would be. John Snow (4): blockdev: add if_get_max_devs blockdev: add IF_AHCI to support -cdrom and -hd[a-d] ide: update ide_drive_get to work with both PCI-IDE and AHCI in

[Qemu-devel] [RFC 2/4] blockdev: add IF_AHCI to support -cdrom and -hd[a-d]

2014-08-18 Thread John Snow
Signed-off-by: John Snow --- blockdev.c| 9 ++--- include/sysemu/blockdev.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index 58da77f..a9efe1f 100644 --- a/blockdev.c +++ b/blockdev.c @@ -57,6 +57,7 @@ static const char

[Qemu-devel] [RFC 3/4] ide: update ide_drive_get to work with both PCI-IDE and AHCI interfaces

2014-08-18 Thread John Snow
Signed-off-by: John Snow --- hw/i386/pc_piix.c | 2 +- hw/ide/core.c | 11 +++ include/hw/ide.h | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 47ac1b5..9da6f0e 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread John Snow
On 08/19/2014 04:05 AM, Markus Armbruster wrote: John Snow writes: Currently, the drive definitions created by drive_new() when using the -drive file=...[,if=ide] or -cdrom or -hd[abcd] options are not picked up by the Q35 initialization routine. To fix this, we have to add hooks to search

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread John Snow
On 08/19/2014 12:12 PM, Dr. David Alan Gilbert wrote: * John Snow (js...@redhat.com) wrote: The changes appear to work well, but where I'd like some feedback is what should happen if people do something like: qemu -M q35 -drive if=ide,file=fedora.qcow2 The code as presented here i

Re: [Qemu-devel] [PATCH v3 0/4] libqos: add a simple first-fit memory allocator

2014-08-19 Thread John Snow
On 08/05/2014 05:46 AM, Stefan Hajnoczi wrote: On Fri, Aug 01, 2014 at 11:38:55AM -0400, John Snow wrote: This set collects two patches by Marc Marí already on the mailing list, but goes further by adding a simple memory allocator that allows us to track and debug freed memory, and optionally

[Qemu-devel] [PATCH] ide: Add wwn support to IDE-ATAPI drive

2014-08-19 Thread John Snow
Although it is possible to specify the wwn property for cdrom devices on the command line, the underlying driver fails to relay this information to the guest operating system via IDENTIFY. This is a simple patch to correct that. See ATA8-ACS, Table 22 parts 5, 6, and 9. Signed-off-by: John Snow

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread John Snow
On 08/19/2014 02:08 PM, Markus Armbruster wrote: John Snow writes: On 08/19/2014 04:05 AM, Markus Armbruster wrote: John Snow writes: Currently, the drive definitions created by drive_new() when using the -drive file=...[,if=ide] or -cdrom or -hd[abcd] options are not picked up by the

Re: [Qemu-devel] [PATCH v3] ide: Add resize callback to ide/core

2014-08-19 Thread John Snow
On 08/18/2014 09:12 AM, Stefan Hajnoczi wrote: On Thu, Aug 14, 2014 at 05:03:06PM -0400, John Snow wrote: @@ -162,10 +173,10 @@ static void ide_identify(IDEState *s) } put_le16(p + 88, 0x3f | (1 << 13)); /* udma5 set and supported */ put_le16(p + 93, 1 | (1 <<

[Qemu-devel] [PATCH v4 5/8] ahci: properly shadow the TFD register

2014-08-21 Thread John Snow
ny attempts to write to them should be ignored. Signed-off-by: John Snow --- hw/ide/ahci.c | 42 -- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 932b0d5..5ff1442 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/a

[Qemu-devel] [PATCH v4 3/8] ahci: Add test_pci_spec to ahci-test.

2014-08-21 Thread John Snow
Adds a specification adherence test for AHCI where the boot-up values for the PCI configuration space are compared against the AHCI 1.3 specification. This test does not itself attempt to engage the device. Signed-off-by: John Snow --- tests/ahci-test.c | 305

[Qemu-devel] [PATCH v4 1/8] ahci: Adding basic functionality qtest.

2014-08-21 Thread John Snow
. Signed-off-by: John Snow --- tests/Makefile| 2 + tests/ahci-test.c | 196 ++ 2 files changed, 198 insertions(+) create mode 100644 tests/ahci-test.c diff --git a/tests/Makefile b/tests/Makefile index 837e9c8..b65cec5 100644 --- a/tests

[Qemu-devel] [PATCH v4 6/8] ahci: Add test_hba_spec to ahci-test.

2014-08-21 Thread John Snow
Add a test routine that checks the boot-up values of the HBA configuration memory space against the AHCI 1.3 specification and Intel ICH9 data sheet (for Q35 machines) for adherence and sane values. The HBA is not yet engaged or put into the idle state. Signed-off-by: John Snow --- tests/ahci

[Qemu-devel] [PATCH v4 0/8] AHCI test suite framework

2014-08-21 Thread John Snow
unused. "ahci: Add test_hba_spec to ahci-test." - Removed unneeded macros - Added in an optional bar_size return parameter to qpci_iomap "ahci: Add test_identify case to ahci-test." - Corrected raw usage of free() For convenience; https://github.com/jnsnow/qe

[Qemu-devel] [PATCH v4 8/8] ahci: Add test_identify case to ahci-test.

2014-08-21 Thread John Snow
adjusted in a future patch series when the AHCI DMA pathways are reworked to allow the feature, which may be utilized by OSX guests. Signed-off-by: John Snow --- tests/ahci-test.c | 304 ++ 1 file changed, 304 insertions(+) diff --git a/tests/ahci

[Qemu-devel] [PATCH v4 2/8] ahci: MSI capability should be at 0x80, not 0x50.

2014-08-21 Thread John Snow
(Which in this instance would be 0x70) to maintain adherence to the Intel data sheet specifications and real observed behavior. Signed-off-by: John Snow --- hw/ide/ich.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index a2f1639..8eb77a1 100644

[Qemu-devel] [PATCH v4 4/8] ahci: add test_pci_enable to ahci-test.

2014-08-21 Thread John Snow
This adds a test wherein we engage the PCI AHCI device and ensure that the memory region for the HBA functionality is now accessible. Under Q35 environments, additional PCI configuration is performed to ensure that the HBA functionality will become usable. Signed-off-by: John Snow --- tests

[Qemu-devel] [PATCH v4 7/8] ahci: Add test_hba_enable to ahci-test.

2014-08-21 Thread John Snow
adherence. Signed-off-by: John Snow --- tests/ahci-test.c | 156 ++ 1 file changed, 156 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 11ef350..a1e7c8f 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -277,11 +277,17

[Qemu-devel] issue: linking 64bit glib when building for cpu=i386

2014-08-21 Thread John Snow
I was running a series of tests on 32 and 64 bit hosts to test for endianness and variable width issues when I noticed that I couldn't properly perform a build of "make check" against a 32bit target from a 64bit host: ../../configure --cpu=i386 && make -j4 && make check This produces some war

Re: [Qemu-devel] [PATCH 1/3] qemu-img: fix img_commit() error return value

2014-08-26 Thread John Snow
On 08/26/2014 03:31 PM, Eric Blake wrote: On 08/26/2014 12:17 PM, Stefan Hajnoczi wrote: The img_commit() return value is a process exit code. Use 1 for failure instead of -1. The other failure paths in this function already use 1. Signed-off-by: Stefan Hajnoczi --- qemu-img.c | 2 +- 1

Re: [Qemu-devel] [PATCH 0/3] qemu-img: error path fixes

2014-08-26 Thread John Snow
img_snapshot() error paths qemu-img.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) Reviewed-by: John Snow -- —js

Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-16 Thread John Snow
/2014 12:55 AM, John Snow wrote: Based off of feedback from the RFC of the same name, this series batches together a group of fixes that improve the AHCI device to fix a number of bugs. A number of fixes included in the RFC that provide more radical changes are omitted for now in favor of a smaller

Re: [Qemu-devel] Patch checking bot

2014-10-21 Thread John Snow
On 10/20/2014 10:08 AM, Peter Maydell wrote: On 20 October 2014 11:25, Stefan Hajnoczi wrote: Hi, At KVM Forum 2014 we discussed a patch checking bot that automates patch format checking and smoke testing: 1. Did the patch submitter include Signed-off-by? 2. Does checkpatch.pl pass? 3. Does

Re: [Qemu-devel] [PATCH] libqos: Convert malloc-pc allocator to a generic allocator

2014-10-22 Thread John Snow
, -PC_ALLOC_LEAK_ASSERT = 0x02, -PC_ALLOC_PARANOID= 0x04 -} PCAllocOpts; - QGuestAllocator *pc_alloc_init(void); -QGuestAllocator *pc_alloc_init_flags(PCAllocOpts flags); -void pc_alloc_uninit(QGuestAllocator *allocator); +QGuestAllocator *pc_alloc_init_flags(QAllocOpts f

  1   2   3   4   5   6   7   8   9   10   >