From: Igor Mammedov <imammedo@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] q35: catch invalid cpu hotplug configuration
Date: Thu, 12 Aug 2021 16:46:08 +0200 [thread overview]
Message-ID: <20210812164608.72fa1e37@redhat.com> (raw)
In-Reply-To: <20210812102341.3316254-1-kraxel@redhat.com>
On Thu, 12 Aug 2021 12:23:41 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:
> Related: https://bugzilla.redhat.com//show_bug.cgi?id=1985924
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/isa/lpc_ich9.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index 5f9de0239cf9..5f143dca17aa 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -31,6 +31,7 @@
> #include "qemu/osdep.h"
> #include "qemu/log.h"
> #include "cpu.h"
> +#include "qapi/error.h"
> #include "qapi/visitor.h"
> #include "qemu/range.h"
> #include "hw/isa/isa.h"
> @@ -676,6 +677,18 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp)
> DeviceState *dev = DEVICE(d);
> ISABus *isa_bus;
>
> + if ((lpc->smi_host_features & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)) &&
> + !(lpc->smi_host_features & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) {
> + /*
> + * smi_features_ok_callback() throws an error on this.
> + *
> + * So bail out here instead of advertizing the invalid
> + * configuration and get obscure firmware failures from that.
> + */
> + error_setg(errp, "cpu hot-unplug requires cpu hot-plug");
> + return;
> + }
> +
> isa_bus = isa_bus_new(DEVICE(d), get_system_memory(), get_system_io(),
> errp);
> if (!isa_bus) {
prev parent reply other threads:[~2021-08-12 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 10:23 [PATCH] q35: catch invalid cpu hotplug configuration Gerd Hoffmann
2021-08-12 10:28 ` Daniel P. Berrangé
2021-08-12 11:07 ` Gerd Hoffmann
2021-08-12 14:46 ` Igor Mammedov [this message]
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=20210812164608.72fa1e37@redhat.com \
--to=imammedo@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--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.