From: Thomas Huth <thuth@redhat.com>
To: Wei Yang <richardw.yang@linux.intel.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's
Date: Thu, 11 Apr 2019 10:32:39 +0200 [thread overview]
Message-ID: <fc11042f-023f-3396-e68a-22dfd4ab0be7@redhat.com> (raw)
In-Reply-To: <20190411071739.22889-1-richardw.yang@linux.intel.com>
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 <richardw.yang@linux.intel.com>
> ---
> 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 <thuth@redhat.com>
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Huth <thuth@redhat.com>
To: Wei Yang <richardw.yang@linux.intel.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, ehabkost@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's
Date: Thu, 11 Apr 2019 10:32:39 +0200 [thread overview]
Message-ID: <fc11042f-023f-3396-e68a-22dfd4ab0be7@redhat.com> (raw)
Message-ID: <20190411083239.qvSo6bZ9mQIq3w-NE_hhffxyAnLd0lw6FiC47m3uilE@z> (raw)
In-Reply-To: <20190411071739.22889-1-richardw.yang@linux.intel.com>
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 <richardw.yang@linux.intel.com>
> ---
> 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 <thuth@redhat.com>
next prev parent reply other threads:[~2019-04-11 8:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 7:17 [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's Wei Yang
2019-04-11 7:17 ` Wei Yang
2019-04-11 8:32 ` Thomas Huth [this message]
2019-04-11 8:32 ` Thomas Huth
2019-04-11 8:38 ` Wei Yang
2019-04-11 8:38 ` Wei Yang
2019-05-27 2:29 ` Wei Yang
2019-05-27 12:21 ` Igor Mammedov
2019-05-28 1:35 ` Wei Yang
2019-05-28 12:26 ` Igor Mammedov
2019-05-29 0:32 ` Wei Yang
2019-05-29 8:57 ` Igor Mammedov
2019-05-30 0:27 ` Wei Yang
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=fc11042f-023f-3396-e68a-22dfd4ab0be7@redhat.com \
--to=thuth@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richardw.yang@linux.intel.com \
--cc=rth@twiddle.net \
/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).