- Aug 15, 2014
-
-
Maria Kustova authored
Signed-off-by:
Maria Kustova <maria.k@catit.be> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Maria Kustova authored
__init__.py provides the public API required by the test runner Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Maria Kustova <maria.k@catit.be> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Maria Kustova authored
The layout submodule of the qcow2 package creates a random valid image, randomly selects some amount of its fields, fuzzes them and write the fuzzed image to the file. Fuzzing process can be controlled by an external configuration. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Maria Kustova <maria.k@catit.be> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Maria Kustova authored
The fuzz submodule of the qcow2 image generator contains fuzzing functions for image fields. Each fuzzing function contains a list of constraints and a call of a helper function that randomly selects a fuzzed value satisfied to one of constraints. For now constraints include only known as invalid or potentially dangerous values. But after investigation of code coverage by fuzz tests they will be expanded by heuristic values based on inner checks and flows of a program under test. Now fuzzing of a header, header extensions and a backing file name is supported. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Maria Kustova <maria.k@catit.be> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Maria Kustova authored
The purpose of the test runner is to prepare the test environment (e.g. create a work directory, a test image, etc), execute a program under test with parameters, indicate a test failure if the program was killed during the test execution and collect core dumps, logs and other test artifacts. The test runner doesn't depend on an image format, so it can be used with any external image generator. [Fixed path to qcow2 format module "qcow2" instead of "../qcow2" since runner.py is no longer in a sub-directory. --Stefan] Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Maria Kustova <maria.k@catit.be> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Maria Kustova authored
'Overall fuzzer requirements' chapter contains the current product vision and features done and to be done. This chapter is still in progress. Signed-off-by:
Maria Kustova <maria.k@catit.be> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Michael Tokarev authored
Commit 58ac3211 introduced a check to ide dma processing which constrains all requests to drive size. However, apparently, some valid requests (like TRIM) does not fit in this constraint, and fails in 2.1. So check the range only for reads and writes. Cc: qemu-stable@nongnu.org Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Marc Marí authored
Without this correction, only a three descriptor layout is accepted, and requests with just two descriptors are not completed and no error message is displayed. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Marc Marí <marc.mari.barcelo@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Marc Marí authored
Reviewed-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Marc Marí <marc.mari.barcelo@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Marc Marí authored
Reviewed-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Marc Marí <marc.mari.barcelo@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Marc Marí authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Marc Marí <marc.mari.barcelo@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Kevin Wolf authored
Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Peter Lieven authored
Signed-off-by:
Peter Lieven <pl@kamp.de> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Denis V. Lunev authored
Parallels has released in the recent updates of Parallels Server 5/6 new addition to his image format. Images with signature WithouFreSpacExt have offsets in the catalog coded not as offsets in sectors (multiple of 512 bytes) but offsets coded in blocks (i.e. header->tracks * 512) In this case all 64 bits of header->nb_sectors are used for image size. This patch implements support of this for qemu-img and also adds specific check for an incorrect image. Images with block size greater than INT_MAX/513 are not supported. The biggest available Parallels image cluster size in the field is 1 Mb. Thus this limit will not hurt anyone. Signed-off-by:
Denis V. Lunev <den@openvz.org> CC: Jeff Cody <jcody@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Denis V. Lunev authored
and rework error path a bit. There is no difference at the moment, but the code will be definitely shorter when additional processing will be required for WithouFreSpacExt Signed-off-by:
Denis V. Lunev <den@openvz.org> CC: Jeff Cody <jcody@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Denis V. Lunev authored
Signed-off-by:
Denis V. Lunev <den@openvz.org> Reviewed-by:
Jeff Cody <jcody@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Denis V. Lunev authored
Parallels image format has several additional fields inside: - nb_sectors is actually 64 bit wide. Upper 32bits are not used for images with signature "WithoutFreeSpace" and must be explicitly zeroed according to Parallels. They will be used for images with signature "WithouFreSpacExt" - inuse is magic which means that the image is currently opened for read/write or was not closed correctly, the magic is 0x746f6e59 - data_off is the location of the first data block. It can be zero and in this case data starts just beyond the header aligned to 512 bytes. Though this field does not matter for read-only driver This patch adds these values to struct parallels_header and adds proper handling of nb_sectors for currently supported WithoutFreeSpace images. WithouFreSpacExt will be covered in next patches. Signed-off-by:
Denis V. Lunev <den@openvz.org> CC: Kevin Wolf <kwolf@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Jeff Cody <jcody@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Cornelia Huck authored
If we fail to set up guest or host notifiers, there's no use trying again every time the guest kicks, so disable dataplane in that case. Acked-by:
Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by:
Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Cornelia Huck authored
The dataplane code is currently doing a hard exit if it fails to set up either guest or host notifiers. In practice, this may mean that a guest suddenly dies after a dataplane device failed to come up (e.g., when a file descriptor limit is hit for tne nth device). Let's just try to unwind the setup instead and return. Acked-by:
Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by:
Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Cornelia Huck authored
Setting up guest or host notifiers may fail, but the user will have no idea why: Let's print the error returned by the callback. Acked-by:
Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by:
Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Gonglei (Arei) authored
Technically, fcntl(soc, F_SETFL, O_NONBLOCK) is incorrect since it clobbers all other file flags. We can use F_GETFL to get the current flags, set or clear the O_NONBLOCK flag, then use F_SETFL to set the flags. Using the qemu_set_nonblock() wrapper. Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Signed-off-by:
Wangxin <wangxinxin.wang@huawei.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Gonglei (Arei) authored
Technically, fcntl(soc, F_SETFL, O_NONBLOCK) is incorrect since it clobbers all other file flags. We can use F_GETFL to get the current flags, set or clear the O_NONBLOCK flag, then use F_SETFL to set the flags. Using the qemu_set_nonblock() wrapper. Signed-off-by:
Wangxin <wangxinxin.wang@huawei.com> Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Mark Cave-Ayland authored
Make sure that both registers are synchronised when being accessed through PCI configuration space. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Mark Cave-Ayland authored
Make sure that we also update the normal DMA interrupt status bits at the same time, and alter the IRQ if being cleared accordingly. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Mark Cave-Ayland authored
This is in preparation for adding configuration space accessors which accept PCIDevice as a parameter. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Mark Cave-Ayland authored
Make sure that the standard DMA interrupt status bits reflect any changes made to the UDMA interrupt status bits. The CMD646U2 datasheet claims that these bits are equivalent, and they must be synchronised for guests that manipulate both registers. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Mark Cave-Ayland authored
Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
John Snow authored
For libqos debugging purposes, it's nice to be able to assert that tests and associated libraries have no memory leaks. To that end, free up the trivial cmdline leak. The remaining leaks caused by pc_alloc_init are fixed instead by my first-fit pc_alloc implementation already on the qemu-devel mailing list. Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
John Snow authored
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 <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
John Snow authored
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 <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
John Snow authored
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 <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
John Snow authored
Fix a small memory leak inside of libqos, in the pc_alloc_init routine. Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
John Snow authored
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 <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
John Snow authored
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 <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
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 <pbonzini@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
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 <pbonzini@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
This will provide a hook for sending the result of the command via the FIS receive area. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
These are defined twice, just use one set consistently. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
They are not used by AHCI, and should not be even available there. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-