From: Jason Wang <jasowang@redhat.com>
To: Marcel Apfelbaum <marcel@redhat.com>, qemu-devel@nongnu.org
Cc: lvivier@redhat.com, qemu-stable@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH V2 2/2] hw/virtio: group virtio flags into an enum
Date: Tue, 23 Feb 2016 11:42:47 +0800 [thread overview]
Message-ID: <56CBD537.6050401@redhat.com> (raw)
In-Reply-To: <1455111073-5600-3-git-send-email-marcel@redhat.com>
On 02/10/2016 09:31 PM, Marcel Apfelbaum wrote:
> Minimizes the possibility to assign
> the same bit to different features.
>
> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
> ---
> hw/virtio/virtio-pci.h | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
> index 6686b10..e4548c2 100644
> --- a/hw/virtio/virtio-pci.h
> +++ b/hw/virtio/virtio-pci.h
> @@ -58,30 +58,33 @@ typedef struct VirtioBusClass VirtioPCIBusClass;
> #define VIRTIO_PCI_BUS_CLASS(klass) \
> OBJECT_CLASS_CHECK(VirtioPCIBusClass, klass, TYPE_VIRTIO_PCI_BUS)
>
> +enum {
> + VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT,
> + VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT,
> + VIRTIO_PCI_FLAG_DISABLE_LEGACY_BIT,
> + VIRTIO_PCI_FLAG_DISABLE_MODERN_BIT,
> + VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT,
> + VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT,
> + VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT,
> +};
> +
> /* Need to activate work-arounds for buggy guests at vmstate load. */
> -#define VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT 0
> #define VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION \
> (1 << VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT)
>
> /* Performance improves when virtqueue kick processing is decoupled from the
> * vcpu thread using ioeventfd for some devices. */
> -#define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1
> #define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT)
>
> /* virtio version flags */
> -#define VIRTIO_PCI_FLAG_DISABLE_LEGACY_BIT 2
> -#define VIRTIO_PCI_FLAG_DISABLE_MODERN_BIT 3
> -#define VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT 6
> #define VIRTIO_PCI_FLAG_DISABLE_LEGACY (1 << VIRTIO_PCI_FLAG_DISABLE_LEGACY_BIT)
> #define VIRTIO_PCI_FLAG_DISABLE_MODERN (1 << VIRTIO_PCI_FLAG_DISABLE_MODERN_BIT)
> #define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT)
>
> /* migrate extra state */
> -#define VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT 4
> #define VIRTIO_PCI_FLAG_MIGRATE_EXTRA (1 << VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT)
>
> /* have pio notification for modern device ? */
> -#define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT 5
> #define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY \
> (1 << VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT)
>
Acked-by: Jason Wang <jasowang@redhat.com>
next prev parent reply other threads:[~2016-02-23 3:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 13:31 [Qemu-devel] [PATCH V2 0/2] hw/virtio: fix double use of a virtio flag Marcel Apfelbaum
2016-02-10 13:31 ` [Qemu-devel] [PATCH V2 1/2] " Marcel Apfelbaum
2016-02-23 3:42 ` Jason Wang
2016-02-10 13:31 ` [Qemu-devel] [PATCH V2 2/2] hw/virtio: group virtio flags into an enum Marcel Apfelbaum
2016-02-10 13:37 ` Laurent Vivier
2016-02-23 3:42 ` Jason Wang [this message]
2016-03-01 17:00 ` [Qemu-devel] [PATCH V2 0/2] hw/virtio: fix double use of a virtio flag Marcel Apfelbaum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56CBD537.6050401@redhat.com \
--to=jasowang@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.