qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability befor


From: Wei Yang
Subject: Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's
Date: Mon, 27 May 2019 10:29:43 +0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Apr 11, 2019 at 10:32:39AM +0200, Thomas Huth wrote:
>On 11/04/2019 09.17, Wei Yang wrote:
>> pc_memory_pre_plug() is called during hotplug for both pc-dimm and
>> nvdimm. This is more proper to check apci hotplug capability before
>> check nvdimm specific capability.
>> 
>> Signed-off-by: Wei Yang <address@hidden>
>> ---
>>  hw/i386/pc.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>> 
>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>> index f2c15bf1f2..d48b6f9582 100644
>> --- a/hw/i386/pc.c
>> +++ b/hw/i386/pc.c
>> @@ -2091,17 +2091,17 @@ static void pc_memory_pre_plug(HotplugHandler 
>> *hotplug_dev, DeviceState *dev,
>>          return;
>>      }
>>  
>> -    if (is_nvdimm && !ms->nvdimms_state->is_enabled) {
>> -        error_setg(errp, "nvdimm is not enabled: missing 'nvdimm' in '-M'");
>> -        return;
>> -    }
>> -
>>      hotplug_handler_pre_plug(pcms->acpi_dev, dev, &local_err);
>>      if (local_err) {
>>          error_propagate(errp, local_err);
>>          return;
>>      }
>>  
>> +    if (is_nvdimm && !ms->nvdimms_state->is_enabled) {
>> +        error_setg(errp, "nvdimm is not enabled: missing 'nvdimm' in '-M'");
>> +        return;
>> +    }
>> +
>>      pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev),
>>                       pcmc->enforce_aligned_dimm ? NULL : &legacy_align, 
>> errp);
>>  }
>
>Works fine for me, too (i.e. no crash with older machine types).
>
>Tested-by: Thomas Huth <address@hidden>
>

Would someone pick up this one :-)

Thanks

-- 
Wei Yang
Help you, Help me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]