qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus fo


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wildcard mmio event
Date: Thu, 27 Aug 2015 13:28:13 +0300

On Wed, Aug 26, 2015 at 06:04:08PM +0800, Jason Wang wrote:
> Test fast mmio by using zero size eventfd.
> 
> Signed-off-by: Jason Wang <address@hidden>

wildcard is not the same as ignoring length.
I think I have a nicer patch, will post now.

> ---
>  hw/misc/pci-testdev.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c
> index 26b9b86..7bf67ed 100644
> --- a/hw/misc/pci-testdev.c
> +++ b/hw/misc/pci-testdev.c
> @@ -261,8 +261,12 @@ static void pci_testdev_realize(PCIDevice *pci_dev, 
> Error **errp)
>          memcpy(test->hdr->name, name, strlen(name) + 1);
>          g_free(name);
>          test->hdr->offset = cpu_to_le32(IOTEST_SIZE(i) + i * 
> IOTEST_ACCESS_WIDTH);
> -        test->size = IOTEST_ACCESS_WIDTH;
>          test->match_data = strcmp(IOTEST_TEST(i), "wildcard-eventfd");
> +        if (!test->match_data && !strcmp(IOTEST_TYPE(i), "mmio")) {
> +            test->size = 0;
> +        } else {
> +            test->size = IOTEST_ACCESS_WIDTH;
> +        }
>          test->hdr->test = i;
>          test->hdr->data = test->match_data ? IOTEST_DATAMATCH : 
> IOTEST_NOMATCH;
>          test->hdr->width = IOTEST_ACCESS_WIDTH;
> -- 
> 2.1.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]