All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org,
	"Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH 2/5] vmbus: Switch bus reset to 3-phase-reset
Date: Wed, 31 Jan 2024 11:53:23 +0800	[thread overview]
Message-ID: <ZbnEM2Y1YBrBzKD/@intel.com> (raw)
In-Reply-To: <20240119163512.3810301-3-peter.maydell@linaro.org>

On Fri, Jan 19, 2024 at 04:35:09PM +0000, Peter Maydell wrote:
> Date: Fri, 19 Jan 2024 16:35:09 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 2/5] vmbus: Switch bus reset to 3-phase-reset
> X-Mailer: git-send-email 2.34.1
> 
> Switch vmbus from using BusClass::reset to the Resettable interface.
> 
> This has no behavioural change, because the BusClass code to support
> subclasses that use the legacy BusClass::reset will call that method
> in the hold phase of 3-phase reset.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/hyperv/vmbus.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
> index c86d1895bae..380239af2c7 100644
> --- a/hw/hyperv/vmbus.c
> +++ b/hw/hyperv/vmbus.c
> @@ -2453,9 +2453,9 @@ static void vmbus_unrealize(BusState *bus)
>      qemu_mutex_destroy(&vmbus->rx_queue_lock);
>  }
>  
> -static void vmbus_reset(BusState *bus)
> +static void vmbus_reset_hold(Object *obj)
>  {
> -    vmbus_deinit(VMBUS(bus));
> +    vmbus_deinit(VMBUS(obj));
>  }
>  
>  static char *vmbus_get_dev_path(DeviceState *dev)
> @@ -2476,12 +2476,13 @@ static char *vmbus_get_fw_dev_path(DeviceState *dev)
>  static void vmbus_class_init(ObjectClass *klass, void *data)
>  {
>      BusClass *k = BUS_CLASS(klass);
> +    ResettableClass *rc = RESETTABLE_CLASS(klass);
>  
>      k->get_dev_path = vmbus_get_dev_path;
>      k->get_fw_dev_path = vmbus_get_fw_dev_path;
>      k->realize = vmbus_realize;
>      k->unrealize = vmbus_unrealize;
> -    k->reset = vmbus_reset;
> +    rc->phases.hold = vmbus_reset_hold;
>  }
>  
>  static int vmbus_pre_load(void *opaque)
> -- 
> 2.34.1
> 
> 


  parent reply	other threads:[~2024-01-31  3:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 16:35 [PATCH 0/5] buses: switch to 3-phase-reset Peter Maydell
2024-01-19 16:35 ` [PATCH 1/5] pci: Switch bus reset " Peter Maydell
2024-01-31  3:52   ` Zhao Liu
2024-01-19 16:35 ` [PATCH 2/5] vmbus: " Peter Maydell
2024-01-22 14:30   ` Maciej S. Szmigiero
2024-01-31  3:53   ` Zhao Liu [this message]
2024-01-19 16:35 ` [PATCH 3/5] adb: " Peter Maydell
2024-01-29 21:42   ` Mark Cave-Ayland
2024-01-31  3:53   ` Zhao Liu
2024-01-19 16:35 ` [PATCH 4/5] hw/s390x/css-bridge: switch virtual-css bus " Peter Maydell
2024-01-22  9:18   ` Halil Pasic
2024-01-22 21:49   ` Eric Farman
2024-01-31  3:54   ` Zhao Liu
2024-01-19 16:35 ` [PATCH 5/5] hw/core: Remove transitional infrastructure from BusClass Peter Maydell
2024-01-31  3:58   ` Zhao Liu
2024-02-01 13:31     ` Peter Maydell
2024-01-21 11:37 ` [PATCH 0/5] buses: switch to 3-phase-reset Michael S. Tsirkin
2024-01-22  2:06 ` Peter Xu
2024-01-22 14:19   ` Cédric Le Goater
2024-01-31 17:36     ` Cédric Le Goater
2024-02-01 13:20 ` Peter Maydell

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=ZbnEM2Y1YBrBzKD/@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=farman@linux.ibm.com \
    --cc=maciej.szmigiero@oracle.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@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.