[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 06/10] hw/vfio: create common module
From: |
Eric Auger |
Subject: |
Re: [Qemu-devel] [PATCH v5 06/10] hw/vfio: create common module |
Date: |
Tue, 12 Aug 2014 08:09:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 08/11/2014 09:25 PM, Alex Williamson wrote:
> On Sat, 2014-08-09 at 15:25 +0100, Eric Auger wrote:
>> diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
>> new file mode 100644
>> index 0000000..4684ee5
>> --- /dev/null
>> +++ b/include/hw/vfio/vfio-common.h
>> @@ -0,0 +1,151 @@
>> +/*
>> + * common header for vfio based device assignment support
>> + *
>> + * Copyright Red Hat, Inc. 2012
>> + *
>> + * Authors:
>> + * Alex Williamson <address@hidden>
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2. See
>> + * the COPYING file in the top-level directory.
>> + *
>> + * Based on qemu-kvm device-assignment:
>> + * Adapted for KVM by Qumranet.
>> + * Copyright (c) 2007, Neocleus, Alex Novik (address@hidden)
>> + * Copyright (c) 2007, Neocleus, Guy Zana (address@hidden)
>> + * Copyright (C) 2008, Qumranet, Amit Shah (address@hidden)
>> + * Copyright (C) 2008, Red Hat, Amit Shah (address@hidden)
>> + * Copyright (C) 2008, IBM, Muli Ben-Yehuda (address@hidden)
>> + */
>> +#ifndef HW_VFIO_VFIO_COMMON_H
>> +#define HW_VFIO_VFIO_COMMON_H
>> +
>> +#include "qemu-common.h"
>> +#include "exec/address-spaces.h"
>> +#include "exec/memory.h"
>> +#include "qemu/queue.h"
>> +#include "qemu/notify.h"
>> +
>> +/*#define DEBUG_VFIO*/
>> +#ifdef DEBUG_VFIO
>> +#define DPRINTF(fmt, ...) \
>> + do { fprintf(stderr, "vfio: " fmt, ## __VA_ARGS__); } while (0)
>> +#else
>> +#define DPRINTF(fmt, ...) \
>> + do { } while (0)
>> +#endif
>
>
> DPRINTF also need to be renamed to avoid conflicting namespace issues.
Ji Alex,
OK.
As I am going to touch at traces,
- are you OK if I use the new .name field to simply format strings?
DPRINTF("%s(%04x:%02x:%02x.%x) Pin %c\n", __func__, vdev->host.domain,
vdev->host.bus, vdev->host.slot, vdev->host.function,
'A' + vdev->intx.pin);
- Also Alex was suggesting to use trace points. What is your position
about that? Also I am not 100% sure of what it consists in? is it trace
events as documented in docs/tracing.txt
Thanks
Eric
> Thanks,
>
> Alex
>
[Qemu-devel] [PATCH v5 07/10] hw/vfio/platform: add vfio-platform support, Eric Auger, 2014/08/09
Re: [Qemu-devel] [PATCH v5 07/10] hw/vfio/platform: add vfio-platform support, Alex Williamson, 2014/08/11