qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>,
	Dmitry Fleytman <dmitry@daynix.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>,
	idan.brown@ravellosystems.com, qemu-devel@nongnu.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 6/6] vmw_pvscsi: Introduce 'x-disable-pcie' backword compatability property
Date: Mon, 14 Dec 2015 18:07:31 +0100	[thread overview]
Message-ID: <566EF753.4070605@redhat.com> (raw)
In-Reply-To: <1449994112-7054-7-git-send-email-shmulik.ladkani@ravellosystems.com>



On 13/12/2015 09:08, Shmulik Ladkani wrote:
> Following the previous patch which changed pvscsi to be a pci express
> device, this patch introduces a boolean property 'x-disable-pcie'.
> 
> Its default value is false, exposing pvscsi as a pcie device.
> 
> 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/scsi/vmw_pvscsi.c | 2 ++
>  include/hw/compat.h  | 4 ++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
> index fb53b24..6b4b989 100644
> --- a/hw/scsi/vmw_pvscsi.c
> +++ b/hw/scsi/vmw_pvscsi.c
> @@ -1241,6 +1241,8 @@ static Property pvscsi_properties[] = {
>      DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1),
>      DEFINE_PROP_BIT("x-old-pci-configuration", PVSCSIState, compat_flags,
>                      PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT, false),
> +    DEFINE_PROP_BIT("x-disable-pcie", PVSCSIState, compat_flags,
> +                    PVSCSI_COMPAT_DISABLE_PCIE_BIT, false),
>      DEFINE_PROP_END_OF_LIST(),
>  };
>  
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index 66e4aff..bcb36ef 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -11,6 +11,10 @@
>              .property = "x-old-pci-configuration",\
>              .value    = "on",\
>          },{\
> +            .driver   = "pvscsi",\
> +            .property = "x-disable-pcie",\
> +            .value    = "on",\
> +        },{\
>              .driver   = "e1000",\
>              .property = "extra_mac_registers",\
>              .value    = "off",\
> 

This series is okay, but the use of "x-" in the compat properties struck
me as odd.

I see that the "x-" prefix was first introduced for compat properties in
commit 1811e64 ("hw/virtio: Add PCIe capability to virtio devices",
2015-11-10).  The rationale for "x-" was either 1) to provide fine
tuning for debugging-like options; 2) for places where the API is known
to be somewhat broken and will be fixed later.

Marcel, Michael, what was the justification for using "x-" in commit
1811e64?  That said, I wouldn't mind using the opportunity of "x-" to
remove the double negation and rename the property to just "pcie". :)

Paolo

  reply	other threads:[~2015-12-14 17:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  8:08 [Qemu-devel] [PATCH v2 0/6] pvscsi: Fine-tune device capabilities Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 1/6] vmw_pvscsi: Set device subsystem and revision Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 2/6] vmw_pvscsi: Change offset of msi pci capability Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 3/6] vmw_pvscsi: Introduce 'x-old-pci-configuration' backword compatability property Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 4/6] vmw_pvscsi: coding: Introduce PVSCSIClass Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint Shmulik Ladkani
2015-12-14 17:14   ` Paolo Bonzini
2015-12-14 17:31     ` Shmulik Ladkani
2015-12-14 17:37     ` Michael S. Tsirkin
2015-12-14 18:05       ` Paolo Bonzini
2015-12-14 21:01       ` Shmulik Ladkani
2015-12-14 21:10         ` Michael S. Tsirkin
2015-12-15  5:48           ` Shmulik Ladkani
2015-12-14 18:25     ` Marcel Apfelbaum
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 6/6] vmw_pvscsi: Introduce 'x-disable-pcie' backword compatability property Shmulik Ladkani
2015-12-14 17:07   ` Paolo Bonzini [this message]
2015-12-14 17:12     ` Michael S. Tsirkin
2015-12-14 17:28       ` Paolo Bonzini
2015-12-14 17:35         ` Michael S. Tsirkin
2015-12-14 18:04           ` Paolo Bonzini
2015-12-14 18:26             ` Michael S. Tsirkin
2015-12-15  8:13               ` Shmulik Ladkani
2015-12-13  8:24 ` [Qemu-devel] [PATCH v2 0/6] pvscsi: Fine-tune device capabilities Dmitry Fleytman

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=566EF753.4070605@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=idan.brown@ravellosystems.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.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).