qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>,
	Dmitry Fleytman <dmitry@daynix.com>
Cc: idan.brown@ravellosystems.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 6/7] vmxnet3: Introduce 'x-disable-pcie' backword compatability property
Date: Mon, 14 Dec 2015 14:26:41 +0800	[thread overview]
Message-ID: <566E6121.2050900@redhat.com> (raw)
In-Reply-To: <1449921644-31673-7-git-send-email-shmulik.ladkani@ravellosystems.com>



On 12/12/2015 08:00 PM, Shmulik Ladkani wrote:
> Following the previous patch which changed vmxnet3 to be a pci express
> device, this patch introduces a boolean property 'x-disable-pcie' whose
> default is false.
>
> Setting 'x-disable-pcie' to 'on' preserves the old 'pci device' (non
> express) behavior. This allows migration to older versions.
>
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
> ---
>  hw/net/vmxnet3.c    | 2 ++
>  include/hw/compat.h | 4 ++++
>  2 files changed, 6 insertions(+)
>
> diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
> index 7ded287..f9cd02b 100644
> --- a/hw/net/vmxnet3.c
> +++ b/hw/net/vmxnet3.c
> @@ -2610,6 +2610,8 @@ static Property vmxnet3_properties[] = {
>      DEFINE_NIC_PROPERTIES(VMXNET3State, conf),
>      DEFINE_PROP_BIT("x-old-msi-offsets", VMXNET3State, compat_flags,
>                      VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false),
> +    DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags,
> +                    VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false),
>      DEFINE_PROP_END_OF_LIST(),
>  };
>  
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index 01e326d..642b082 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -22,6 +22,10 @@
>              .driver   = "vmxnet3",\
>              .property = "x-old-msi-offsets",\
>              .value    = "on",\
> +        },{\
> +            .driver   = "vmxnet3",\
> +            .property = "x-disable-pcie",\
> +            .value    = "on",\
>          },
>  
>  #define HW_COMPAT_2_3 \

Same as patch 3. Too late for 2.5, need do this for HW_COMPAT_2_5.

Just for pcie, another choice is a new type with "is_express = true".
But both method looks good to me.

  reply	other threads:[~2015-12-14  6:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12 12:00 [Qemu-devel] [PATCH v3 0/7] vmxnet3: Fine-tune device capabilities Shmulik Ladkani
2015-12-12 12:00 ` [Qemu-devel] [PATCH v3 1/7] vmxnet3: Change offsets of msi/msix pci capabilities Shmulik Ladkani
2015-12-12 12:00 ` [Qemu-devel] [PATCH v3 2/7] vmxnet3: Change the offset of the MSIX PBA table Shmulik Ladkani
2015-12-12 12:00 ` [Qemu-devel] [PATCH v3 3/7] vmxnet3: Introduce 'x-old-msi-offsets' backword compatability property Shmulik Ladkani
2015-12-14  6:21   ` Jason Wang
2015-12-12 12:00 ` [Qemu-devel] [PATCH v3 4/7] vmxnet3: coding: Introduce VMXNET3Class Shmulik Ladkani
2015-12-12 12:00 ` [Qemu-devel] [PATCH v3 5/7] vmxnet3: The vmxnet3 device is a PCIE endpoint Shmulik Ladkani
2015-12-14  6:24   ` Jason Wang
2015-12-14  7:32     ` Shmulik Ladkani
2015-12-15  2:35       ` Jason Wang
2015-12-15  6:09         ` Shmulik Ladkani
2015-12-15  8:12           ` Jason Wang
2015-12-12 12:00 ` [Qemu-devel] [PATCH v3 6/7] vmxnet3: Introduce 'x-disable-pcie' backword compatability property Shmulik Ladkani
2015-12-14  6:26   ` Jason Wang [this message]
2015-12-12 12:00 ` [Qemu-devel] [PATCH v3 7/7] vmxnet3: Report the Device Serial Number capability Shmulik Ladkani

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=566E6121.2050900@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=idan.brown@ravellosystems.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shmulik.ladkani@ravellosystems.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).