qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richardw.yang@linux.intel.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Wei Yang <richardw.yang@linux.intel.com>,
	qemu-devel@nongnu.org, mst@redhat.com, imammedo@redhat.com,
	xiaoguangrong.eric@gmail.com
Subject: Re: [Qemu-devel] [PATCH v2 3/3] pc-dimm: revert "introduce realize callback"
Date: Wed, 20 Feb 2019 09:39:25 +0800	[thread overview]
Message-ID: <20190220013924.GA24772@richard> (raw)
In-Reply-To: <d203d22a-0f29-cbd3-e073-868bf9a35233@redhat.com>

On Wed, Feb 20, 2019 at 02:26:16AM +0100, Philippe Mathieu-Daudé wrote:
>On 2/20/19 1:51 AM, Wei Yang wrote:
>> realize callback in introduced to check if the backend memory is large
>> enough to contain label data and init its memory region, while this task
>> is handled in pre_plug stage.
>> 
>> Now it's time to remove it.
>
>Good cleanup!
>

Glad you like it :-)

>Michael, can you add:
>
>"This reverts commit 9f318f8f7e689b9653b42bac73047f9719a1f34e."
>
>Thanks,
>
>Phil.
>
>> 
>> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
>
>Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
>> ---
>>  hw/mem/pc-dimm.c         | 5 -----
>>  include/hw/mem/pc-dimm.h | 3 ---
>>  2 files changed, 8 deletions(-)
>> 
>> diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
>> index 152400b1fc..5832c0ba92 100644
>> --- a/hw/mem/pc-dimm.c
>> +++ b/hw/mem/pc-dimm.c
>> @@ -159,7 +159,6 @@ static void pc_dimm_init(Object *obj)
>>  static void pc_dimm_realize(DeviceState *dev, Error **errp)
>>  {
>>      PCDIMMDevice *dimm = PC_DIMM(dev);
>> -    PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
>>  
>>      if (!dimm->hostmem) {
>>          error_setg(errp, "'" PC_DIMM_MEMDEV_PROP "' property is not set");
>> @@ -178,10 +177,6 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)
>>          return;
>>      }
>>  
>> -    if (ddc->realize) {
>> -        ddc->realize(dimm, errp);
>> -    }
>> -
>>      host_memory_backend_set_mapped(dimm->hostmem, true);
>>  }
>>  
>> diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
>> index 01436b9f50..d18f8246b7 100644
>> --- a/include/hw/mem/pc-dimm.h
>> +++ b/include/hw/mem/pc-dimm.h
>> @@ -59,8 +59,6 @@ typedef struct PCDIMMDevice {
>>  
>>  /**
>>   * PCDIMMDeviceClass:
>> - * @realize: called after common dimm is realized so that the dimm based
>> - * devices get the chance to do specified operations.
>>   * @get_vmstate_memory_region: returns #MemoryRegion which indicates the
>>   * memory of @dimm should be kept during live migration. Will not fail
>>   * after the device was realized.
>> @@ -70,7 +68,6 @@ typedef struct PCDIMMDeviceClass {
>>      DeviceClass parent_class;
>>  
>>      /* public */
>> -    void (*realize)(PCDIMMDevice *dimm, Error **errp);
>>      MemoryRegion *(*get_vmstate_memory_region)(PCDIMMDevice *dimm,
>>                                                 Error **errp);
>>  } PCDIMMDeviceClass;
>> 

-- 
Wei Yang
Help you, Help me

  reply	other threads:[~2019-02-20  1:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20  0:51 [Qemu-devel] [PATCH v2 0/3] PCDIMM cleanup Wei Yang
2019-02-20  0:51 ` [Qemu-devel] [PATCH v2 1/3] pc-dimm: remove check on pc-dimm hotpluggable Wei Yang
2019-02-20  1:13   ` Philippe Mathieu-Daudé
2019-02-20  0:51 ` [Qemu-devel] [PATCH v2 2/3] mem/nvdimm: remove nvdimm_realize Wei Yang
2019-02-20  1:21   ` Philippe Mathieu-Daudé
2019-02-20  0:51 ` [Qemu-devel] [PATCH v2 3/3] pc-dimm: revert "introduce realize callback" Wei Yang
2019-02-20  1:26   ` Philippe Mathieu-Daudé
2019-02-20  1:39     ` Wei Yang [this message]
2019-02-21  6:03 ` [Qemu-devel] [PATCH v2 0/3] PCDIMM cleanup Xiao Guangrong
2019-02-21  6:13   ` Wei Yang
2019-02-21 14:50 ` Igor Mammedov
2019-02-23  0:02   ` Wei Yang
2019-02-25  8:05     ` Igor Mammedov
2019-02-25 12:47       ` Wei Yang
2019-02-27 13:12         ` Igor Mammedov
2019-02-27 13:59           ` Wei Yang
2019-02-27 17:27             ` Igor Mammedov
2019-02-27 21:25               ` Wei Yang
2019-02-28  0:46               ` Wei Yang
2019-02-28 13:57                 ` Igor Mammedov
2019-03-01  1:23                   ` Wei Yang
2019-02-21 16:58 ` Michael S. Tsirkin

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=20190220013924.GA24772@richard \
    --to=richardw.yang@linux.intel.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiaoguangrong.eric@gmail.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).