Re: [Qemu-devel] [PATCH 5/7] libqos: Change free function called in malloc

2014-07-29 Thread John Snow
); } #endif Imagine my surprise when I noticed the allocator was summoning up millions of bytes. Oh good! Reviewed-by: John Snow js...@redhat.com

Re: [Qemu-devel] [PATCH 4/7] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-07-29 Thread John Snow
+ size), =, s-end); Reviewed-by: John Snow js...@redhat.com

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

2014-07-29 Thread John Snow
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 keep track of any leaks. John Snow (2): libqos: add a simple first-fit memory allocator qtest/ide-test

[Qemu-devel] [PATCH 2/4] libqos: Change free function called in malloc

2014-07-29 Thread John Snow
From: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: John Snow js...@redhat.com --- tests/libqos/malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h index 46f6000

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

2014-07-29 Thread John Snow
-by: John Snow js...@redhat.com --- tests/libqos/malloc-pc.c | 321 +-- tests/libqos/malloc-pc.h | 9 ++ 2 files changed, 321 insertions(+), 9 deletions(-) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index 2efd095..410181d 100644

[Qemu-devel] [PATCH 1/4] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-07-29 Thread John Snow
From: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: John Snow js...@redhat.com --- tests/libqos/malloc-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests

[Qemu-devel] [PATCH 4/4] qtest/ide-test: add pc-alloc-uninit call

2014-07-29 Thread John Snow
Uninitialize the allocator and cleanup residual memory. Signed-off-by: John Snow js...@redhat.com --- tests/ide-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index 4a0d97f..ad32328 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -123,6

[Qemu-devel] [PATCH 1/2] virtio-rng: Move error-checking forward to prevent memory leak

2014-07-29 Thread John Snow
This patch pushes the error-checking forward and the virtio initialization backward in the device realization function in order to prevent memory leaks for hot plug scenarios. Signed-off-by: John Snow js...@redhat.com --- hw/virtio/virtio-rng.c | 20 ++-- 1 file changed, 10

[Qemu-devel] [PATCH 0/2] virtio-rng: Fix memory leaks in virtio_rng_device_realize

2014-07-29 Thread John Snow
functions from error_set to error_setg. John Snow (2): virtio-rng: Move error-checking forward to prevent memory leak virtio-rng: replace error_set calls with error_setg hw/virtio/virtio-rng.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) -- 1.9.3

[Qemu-devel] [PATCH 2/2] virtio-rng: replace error_set calls with error_setg

2014-07-29 Thread John Snow
Under recommendation from Luiz Capitulino, we are changing the error_set calls to error_setg while we are fixing up the error handling pathways of virtio-rng. Signed-off-by: John Snow js...@redhat.com --- hw/virtio/virtio-rng.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

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

2014-07-30 Thread John Snow
-by: John Snow js...@redhat.com --- tests/libqos/malloc-pc.c | 296 +-- tests/libqos/malloc-pc.h | 9 ++ 2 files changed, 295 insertions(+), 10 deletions(-) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index 2efd095..641162d 100644

[Qemu-devel] [PATCH 1/4] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-07-30 Thread John Snow
From: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: John Snow js...@redhat.com --- tests/libqos/malloc-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests

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

2014-07-30 Thread John Snow
an error in the size of the initial node. John Snow (2): libqos: add a simple first-fit memory allocator qtest/ide: Uninitialize PC allocator Marc Marí (2): libqos: Correct mask to align size to PAGE_SIZE in malloc-pc libqos: Change free function called in malloc tests/ide-test.c

[Qemu-devel] [PATCH 4/4] qtest/ide: Uninitialize PC allocator

2014-07-30 Thread John Snow
Use the new call to pc_alloc_uninit as a test for the new pathways. The leak checking / assert pathways are not enabled in this patch, leaving this as an option to future test writers. Signed-off-by: John Snow js...@redhat.com --- tests/ide-test.c | 2 ++ 1 file changed, 2 insertions(+) diff

[Qemu-devel] [PATCH 2/4] libqos: Change free function called in malloc

2014-07-30 Thread John Snow
From: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: John Snow js...@redhat.com --- tests/libqos/malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h index 46f6000

Re: [Qemu-devel] [PATCH 24/28] ahci: Add test_pci_spec to ahci-test.

2014-07-31 Thread John Snow
On 07/31/2014 09:19 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:18:05PM -0400, John Snow wrote: +#ifdef AHCI_13_STRICT Please drop the #ifdef. #ifdefs mean dead code that is not being compiled or tested. Just decide which case we should take and keep that one. OK. It might be nice

Re: [Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-07-31 Thread John Snow
On 07/31/2014 10:01 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:18:07PM -0400, John Snow wrote: +if (bitset(cap, AHCI_CAP_SAM)) { +g_test_message(Supports AHCI-Only Mode: GHC_AE is Read-Only.); +assert_bit_set(reg, AHCI_GHC_AE); +} else

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

2014-07-31 Thread John Snow
On 07/31/2014 06:13 AM, Stefan Hajnoczi wrote: On Wed, Jul 30, 2014 at 06:28:28PM -0400, John Snow wrote: +#define bitany(X, MASK) ((X) (MASK)) +#define bitset(X, MASK) (bitany((X), (MASK)) == (MASK)) This is subjective but macros like this should be avoided. This macro does not encapsulate

Re: [Qemu-devel] [PATCH 03/28] ide-test: add test for werror=stop

2014-07-31 Thread John Snow
On 07/31/2014 06:58 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:17:44PM -0400, John Snow wrote: +static void test_retry_flush(void) +{ +uint8_t data; +const char *s; + +prepare_blkdebug_script(debug_path, flush_to_disk); + +ide_test_start( +-vnc none

Re: [Qemu-devel] [PATCH 15/28] ide: stop PIO transfer on errors

2014-07-31 Thread John Snow
On 07/31/2014 08:23 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:17:56PM -0400, John Snow wrote: From: Paolo Bonzini pbonz...@redhat.com This will provide a hook for sending the result of the command via the FIS receive area. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed

[Qemu-devel] [PATCH v3 1/4] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-08-01 Thread John Snow
From: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: John Snow js...@redhat.com --- tests/libqos/malloc-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests

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

2014-08-01 Thread John Snow
as a basis for the linked list implementation instead. Correct an error in the size of the initial node. v3: remove mlist wrappers around QTAILQ interface for clarity. adjust the options controlling when to do allocation list debugging. John Snow (2): libqos: add a simple first-fit memory

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

2014-08-01 Thread John Snow
-by: John Snow js...@redhat.com --- tests/libqos/malloc-pc.c | 280 +-- tests/libqos/malloc-pc.h | 9 ++ 2 files changed, 279 insertions(+), 10 deletions(-) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index 2efd095..ba316d3 100644

[Qemu-devel] [PATCH v3 4/4] qtest/ide: Uninitialize PC allocator

2014-08-01 Thread John Snow
Use the new call to pc_alloc_uninit as a test for the new pathways. The leak checking / assert pathways are not enabled in this patch, leaving this as an option to future test writers. Signed-off-by: John Snow js...@redhat.com --- tests/ide-test.c | 2 ++ 1 file changed, 2 insertions(+) diff

[Qemu-devel] [PATCH v3 2/4] libqos: Change free function called in malloc

2014-08-01 Thread John Snow
From: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: Marc Marí marc.mari.barc...@gmail.com Signed-off-by: John Snow js...@redhat.com --- tests/libqos/malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h index 46f6000

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

2014-08-01 Thread John Snow
On 06/12/2014 05:03 AM, Markus Armbruster wrote: Michael Tokarev m...@tls.msk.ru writes: 10.06.2014 10:34, Paolo Bonzini wrote: Il 10/06/2014 08:30, Michael Tokarev ha scritto: Hello. The question is: are the drive shortcuts - -cdrom, -hda, -hdb etc - supposed to work in -machine q35 too?

Re: [Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-08-01 Thread John Snow
On 07/31/2014 10:01 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:18:07PM -0400, John Snow wrote: +/*** IO macros for the AHCI memory registers. ***/ +#define void_incr(vptr, OFST) ((void *)((char *)(vptr) + (OFST))) I'm pretty sure QEMU takes advantage of GCC's void pointer

[Qemu-devel] [PATCH v2 11/30] ide: fold add_status callback into set_inactive

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com It is now called only after the set_inactive callback. Put the two together. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 9 - hw/ide/atapi.c| 2 +- hw/ide/core.c

[Qemu-devel] [PATCH v2 01/30] blkdebug: report errors on flush too

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block/blkdebug.c | 20 1 file changed, 20 insertions(+) diff --git a/block/blkdebug.c b/block/blkdebug.c index f51407d..1586ed9 100644

[Qemu-devel] [PATCH v2 02/30] libqtest: add QTEST_LOG for debugging qtest testcases

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- tests/libqtest.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 98e8f4b..4a75cd3 100644

[Qemu-devel] [PATCH v2 00/30] AHCI test suite framework

2014-08-04 Thread John Snow
ahci: Add test_identify case to ahci-test. - Corrected raw usage of free() For convenience; https://github.com/jnsnow/qemu/tree/ahci-test-v2 John Snow (13): q35: Enable the ioapic device to be seen by qtest. qtest: Adding qtest_memset and qmemset. libqos: Correct memory leak libqtest

[Qemu-devel] [PATCH v2 05/30] ide: simplify reset callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 6 -- hw/ide/core.c | 5 +++-- hw/ide/internal.h | 3 ++- hw/ide

[Qemu-devel] [PATCH v2 06/30] ide: simplify set_inactive callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 6 -- hw/ide/core.c | 5 +++-- hw/ide/internal.h | 2 +- hw/ide/macio.c

[Qemu-devel] [PATCH v2 07/30] ide: simplify async_cmd_done callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Drop the unused return value. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 +--- hw/ide/internal.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ide/ahci.c

[Qemu-devel] [PATCH v2 04/30] ide: stash aiocb for flushes

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com This ensures that operations are completed after a reset Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw

[Qemu-devel] [PATCH v2 03/30] ide-test: add test for werror=stop

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- tests/ide-test.c | 81 1 file changed, 81 insertions(+) diff --git a/tests/ide-test.c b/tests/ide

[Qemu-devel] [PATCH v2 08/30] ide: simplify start_transfer callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 +--- hw/ide/core.c | 10 +++--- hw/ide/internal.h | 3 +-- hw/ide

[Qemu-devel] [PATCH v2 10/30] ide: remove wrong setting of BM_STATUS_INT

2014-08-04 Thread John Snow
Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 hw/ide/atapi.c | 1 - 2 files changed, 5 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index adbac3d..14677ec 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1107,10 +1107,6 @@ static int

[Qemu-devel] [PATCH v2 18/30] q35: Enable the ioapic device to be seen by qtest.

2014-08-04 Thread John Snow
Currently, the ioapic device can not be found in a qtest environment when requesting irq_interrupt_in ioapic via the qtest socket. By mirroring how the ioapic is added in i44ofx (hw/i440/pc_piix.c), as a child of q35, the device is able to be seen by qtest. Signed-off-by: John Snow js

[Qemu-devel] [PATCH v2 09/30] ide: wrap start_dma callback

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Make it optional and prepare for the next patches. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/atapi.c| 6 ++ hw/ide/core.c | 15 --- hw/ide/internal.h | 1 + 3 files

[Qemu-devel] [PATCH v2 15/30] ide: stop PIO transfer on errors

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com This will provide a hook for sending the result of the command via the FIS receive area. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[Qemu-devel] [PATCH v2 13/30] ide: move retry constants out of BM_STATUS_* namespace

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/core.c | 20 ++-- hw/ide/internal.h | 12 ++-- hw/ide/pci.c | 14 +++--- 3 files changed, 23 insertions(+), 23

[Qemu-devel] [PATCH v2 19/30] qtest: Adding qtest_memset and qmemset.

2014-08-04 Thread John Snow
Currently, libqtest allows for memread and memwrite, but does not offer a simple way to zero out regions of memory. This patch adds a simple function to do so. Signed-off-by: John Snow js...@redhat.com --- tests/libqtest.c | 12 tests/libqtest.h | 24 2

[Qemu-devel] [PATCH v2 16/30] ide: make all commands go through cmd_done

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com AHCI has code to fill in the D2H FIS trigger the IRQ all over the place. Centralize this in a single cmd_done callback by generalizing the existing async_cmd_done callback. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js

[Qemu-devel] [PATCH v2 17/30] ahci: construct PIO Setup FIS for PIO commands

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com PIO commands should put a PIO Setup FIS in the receive area when data transfer ends. Currently QEMU does not do this and only places the D2H FIS at the end of the operation. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js

[Qemu-devel] [PATCH v2 12/30] ide: move BM_STATUS bits to pci.[ch]

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com They are not used by AHCI, and should not be even available there. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/internal.h | 11 --- hw/ide/pci.c | 4 hw/ide/pci.h | 7

[Qemu-devel] [PATCH v2 24/30] qtest/ide: Fix small memory leak

2014-08-04 Thread John Snow
mailing list. Signed-off-by: John Snow js...@redhat.com --- tests/ide-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index e2b4efc..a77a037 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -120,6 +120,8 @@ static void ide_test_start(const char

[Qemu-devel] [PATCH v2 14/30] ahci: remove duplicate PORT_IRQ_* constants

2014-08-04 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com These are defined twice, just use one set consistently. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 6 +++--- hw/ide/ahci.h | 21 - 2 files changed, 3 insertions

[Qemu-devel] [PATCH v2 20/30] libqos: Correct memory leak

2014-08-04 Thread John Snow
Fix a small memory leak inside of libqos, in the pc_alloc_init routine. Signed-off-by: John Snow js...@redhat.com --- tests/libqos/malloc-pc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index db1496c..63af60a 100644 --- a/tests

[Qemu-devel] [PATCH v2 30/30] ahci: Add test_identify case to ahci-test.

2014-08-04 Thread John Snow
Utilizing all of the bring-up code in pci_enable and hba_enable, this test issues a simple IDENTIFY command via the HBA and retrieves the response via the PIO receive mechanisms of the HBA. Signed-off-by: John Snow js...@redhat.com --- tests/ahci-test.c | 296

[Qemu-devel] [PATCH v2 27/30] ahci: add test_pci_enable to ahci-test.

2014-08-04 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 js

[Qemu-devel] [PATCH v2 21/30] libqtest: Correct small memory leak.

2014-08-04 Thread John Snow
Fixes a small memory leak inside of libqtest. After we produce a test path and glib copies the string for itself, we should clean up our temporary copy. Signed-off-by: John Snow js...@redhat.com --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests

[Qemu-devel] [PATCH v2 22/30] libqos: Fixes a small memory leak.

2014-08-04 Thread John Snow
Allow users the chance to clean up the QPCIBusPC structure by adding a small cleanup routine. Helps clear up small memory leaks during setup/teardown, to allow for cleaner debug output messages. Signed-off-by: John Snow js...@redhat.com --- tests/libqos/pci-pc.c | 7 +++ tests/libqos/pci

[Qemu-devel] [PATCH v2 29/30] ahci: Add test_hba_enable to ahci-test.

2014-08-04 Thread John Snow
adherence. Signed-off-by: John Snow js...@redhat.com --- tests/ahci-test.c | 156 ++ 1 file changed, 156 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 1c19c9c..f157047 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c

[Qemu-devel] [PATCH v2 26/30] ahci: Add test_pci_spec to ahci-test.

2014-08-04 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 js...@redhat.com --- tests/ahci-test.c | 305

[Qemu-devel] [PATCH v2 25/30] ahci: Adding basic functionality qtest.

2014-08-04 Thread John Snow
. Signed-off-by: John Snow js...@redhat.com --- 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

[Qemu-devel] [PATCH v2 28/30] ahci: Add test_hba_spec to ahci-test.

2014-08-04 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 js...@redhat.com

[Qemu-devel] [PATCH v2 23/30] libqos: allow qpci_iomap to return BAR mapping size

2014-08-04 Thread John Snow
This patch allows qpci_iomap to return the size of the BAR mapping that it created, to allow driver applications (e.g, ahci-test) to make determinations about the suitability or the mapping size, or in the specific case of AHCI, how many ports are supported by the HBA. Signed-off-by: John Snow js

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

2014-08-05 Thread John Snow
On 08/05/2014 04:30 AM, Kevin Wolf wrote: Am 01.08.2014 um 22:10 hat John Snow geschrieben: On 06/12/2014 05:03 AM, Markus Armbruster wrote: -drive mixes up configuration of backend and frontend (a.k.a. device model), as follows: 1. It always defines a backend. info block shows them. 2

Re: [Qemu-devel] [PATCH v2 00/30] AHCI test suite framework

2014-08-06 Thread John Snow
On 08/06/2014 07:30 AM, Markus Armbruster wrote: Stefan Hajnoczi stefa...@redhat.com writes: On Mon, Aug 04, 2014 at 05:11:01PM -0400, John Snow wrote: This patch series introduces a number of small fixes and tweaks to help support an AHCI test suite that in the future I hope to expand

[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 js...@redhat.com --- hw/ide/core.c | 29 + 1 file

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

2014-08-13 Thread John Snow
the QEMU process. Signed-off-by: John Snow js...@redhat.com --- 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

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

2014-08-13 Thread John Snow
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/qemu/tree/ahci-test-v3 John Snow (15): q35: Enable the ioapic device to be seen by qtest. qtest

[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 js...@redhat.com --- 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

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

2014-08-13 Thread John Snow
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 js...@redhat.com --- hw/ide/ahci.c | 42 -- 1

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

2014-08-13 Thread John Snow
. Signed-off-by: John Snow js...@redhat.com --- 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

[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 js...@redhat.com --- 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

[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 js

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

2014-08-13 Thread John Snow
to be 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 js...@redhat.com --- tests/ahci-test.c | 297 ++ 1 file changed, 297 insertions(+) diff

[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 js...@redhat.com

[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 js...@redhat.com --- 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

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 possible to avoid

[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

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

2014-08-14 Thread John Snow
the QEMU process. Signed-off-by: John Snow js...@redhat.com --- 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

Re: [Qemu-devel] [PATCH] ahci.c: mask the interrupt on complete flag to allow ahci.c to read the correct size for the PRDT

2014-06-27 Thread John Snow
On 06/26/2014 07:28 PM, Reza Jelveh wrote: +#define AHCI_PRDT_SIZE_MASK0x3f out of rampant curiosity, is there ever a case where the lower bits might be set and the mask 0x3fffc is not desirable, or can we always trust those bits to simply be off anyway?

[Qemu-devel] AHCI / Sata port initial error status

2014-06-30 Thread John Snow
I am in the process of writing a series of AHCI tests (for q35) that compare the written specifications against what the current device emulation actually does, and I was curious about this bit instead of ahci.c, in ahci_reset_port: ide_state-error = 1; What does this error signify, exactly,

Re: [Qemu-devel] [PATCH_v2] ahci.c: mask unused flags when reading size PRDT DBC

2014-07-01 Thread John Snow
don't seem to check. Do we want to add this? (In a separate patch, of course.) We could just remove the lowest bit in the mask, no? ;) Alex Reviewed-by: John Snow js...@redhat.com Taking a look at the spec, AHCI 1.3 sec 4.2.3.3 p. 40; a value of 0x00 implies one byte, and 0x01 implies two

[Qemu-devel] [PATCH 11/28] ide: fold add_status callback into set_inactive

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com It is now called only after the set_inactive callback. Put the two together. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 9 - hw/ide/atapi.c| 2 +- hw/ide/core.c

[Qemu-devel] [PATCH 02/28] libqtest: add QTEST_LOG for debugging qtest testcases

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- tests/libqtest.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 98e8f4b..4a75cd3 100644

[Qemu-devel] [PATCH 24/28] ahci: Add test_pci_spec to ahci-test.

2014-07-07 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 js...@redhat.com --- tests/ahci-test.c | 271

[Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-07-07 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 js...@redhat.com

[Qemu-devel] [PATCH 27/28] ahci: Add test_hba_enable to ahci-test.

2014-07-07 Thread John Snow
adherence. Signed-off-by: John Snow js...@redhat.com --- tests/ahci-test.c | 150 ++ 1 file changed, 150 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 727c939..f342e2c 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c

[Qemu-devel] [PATCH 21/28] libqtest: Correct small memory leak.

2014-07-07 Thread John Snow
Fixes a small memory leak inside of libqtest. After we produce a test path and glib copies the string for itself, we should clean up our temporary copy. Signed-off-by: John Snow js...@redhat.com --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests

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

2014-07-07 Thread John Snow
Utilizing all of the bring-up code in pci_enable and hba_enable, this test issues a simple IDENTIFY command via the HBA and retrieves the response via the PIO receive mechanisms of the HBA. Signed-off-by: John Snow js...@redhat.com --- tests/ahci-test.c | 296

[Qemu-devel] [PATCH 09/28] ide: wrap start_dma callback

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Make it optional and prepare for the next patches. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/atapi.c| 6 ++ hw/ide/core.c | 15 --- hw/ide/internal.h | 1 + 3 files

[Qemu-devel] [PATCH 04/28] ide: stash aiocb for flushes

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com This ensures that operations are completed after a reset Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw

[Qemu-devel] [PATCH 12/28] ide: move BM_STATUS bits to pci.[ch]

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com They are not used by AHCI, and should not be even available there. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/internal.h | 11 --- hw/ide/pci.c | 4 hw/ide/pci.h | 7

[Qemu-devel] [PATCH 08/28] ide: simplify start_transfer callbacks

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 +--- hw/ide/core.c | 10 +++--- hw/ide/internal.h | 3 +-- hw/ide

[Qemu-devel] [PATCH 23/28] ahci: Adding basic functionality qtest.

2014-07-07 Thread John Snow
. Signed-off-by: John Snow js...@redhat.com --- tests/Makefile| 2 + tests/ahci-test.c | 207 ++ 2 files changed, 209 insertions(+) create mode 100644 tests/ahci-test.c diff --git a/tests/Makefile b/tests/Makefile index 7e53d0d..71caa26

[Qemu-devel] [PATCH 16/28] ide: make all commands go through cmd_done

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com AHCI has code to fill in the D2H FIS trigger the IRQ all over the place. Centralize this in a single cmd_done callback by generalizing the existing async_cmd_done callback. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js

[Qemu-devel] [PATCH 13/28] ide: move retry constants out of BM_STATUS_* namespace

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/core.c | 20 ++-- hw/ide/internal.h | 12 ++-- hw/ide/pci.c | 14 +++--- 3 files changed, 23 insertions(+), 23

[Qemu-devel] [PATCH 17/28] ahci: construct PIO Setup FIS for PIO commands

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com PIO commands should put a PIO Setup FIS in the receive area when data transfer ends. Currently QEMU does not do this and only places the D2H FIS at the end of the operation. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js

[Qemu-devel] [PATCH 06/28] ide: simplify set_inactive callbacks

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 6 -- hw/ide/core.c | 5 +++-- hw/ide/internal.h | 2 +- hw/ide/macio.c

[Qemu-devel] [PATCH 07/28] ide: simplify async_cmd_done callbacks

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Drop the unused return value. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 +--- hw/ide/internal.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ide/ahci.c

[Qemu-devel] [PATCH 19/28] qtest: Adding qtest_memset and qmemset.

2014-07-07 Thread John Snow
Currently, libqtest allows for memread and memwrite, but does not offer a simple way to zero out regions of memory. This patch adds a simple function to do so. Signed-off-by: John Snow js...@redhat.com --- tests/libqtest.c | 12 tests/libqtest.h | 24 2

[Qemu-devel] [PATCH 00/28] ahci refactoring to support ahci-test suite

2014-07-07 Thread John Snow
in represents a minimum of functionality needed in order to issue and receive commands from the AHCI HBA. John Snow (11): q35: Enable the ioapic device to be seen by qtest. qtest: Adding qtest_memset and qmemset. libqos: Correct memory leak libqtest: Correct small memory leak. libqos: Fixes a small

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

2014-07-07 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 js

[Qemu-devel] [PATCH 10/28] ide: remove wrong setting of BM_STATUS_INT

2014-07-07 Thread John Snow
Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 hw/ide/atapi.c | 1 - 2 files changed, 5 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index adbac3d..14677ec 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1107,10 +1107,6 @@ static int

[Qemu-devel] [PATCH 01/28] blkdebug: report errors on flush too

2014-07-07 Thread John Snow
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block/blkdebug.c | 20 1 file changed, 20 insertions(+) diff --git a/block/blkdebug.c b/block/blkdebug.c index f51407d..1586ed9 100644

  1   2   3   4   5   6   7   8   9   10   >