From: Sergio Lopez <slp@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: philmd@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH 5/5] kvm: check before accessing PCMachineState fields
Date: Thu, 12 Dec 2019 17:11:30 +0100 [thread overview]
Message-ID: <87v9qlbk25.fsf@redhat.com> (raw)
In-Reply-To: <1576161021-5359-6-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]
Paolo Bonzini <pbonzini@redhat.com> writes:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> roms/SLOF | 2 +-
> target/i386/kvm.c | 11 +++++++++--
> 2 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/roms/SLOF b/roms/SLOF
> index 8ebf2f5..bcc3c4e 160000
> --- a/roms/SLOF
> +++ b/roms/SLOF
> @@ -1 +1 @@
> -Subproject commit 8ebf2f55e1ba1492b942ba4b682160e644fc0f98
> +Subproject commit bcc3c4e5c21a015f4680894c4ec978a90d4a2d69
I guess this was included by mistake.
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index ef63f3a..2ad5a94 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -49,6 +49,7 @@
> #include "migration/blocker.h"
> #include "exec/memattrs.h"
> #include "trace.h"
> +#include "config-devices.h"
>
> //#define DEBUG_KVM
>
> @@ -2172,9 +2173,15 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
> }
> }
>
> - if (kvm_check_extension(s, KVM_CAP_X86_SMM) &&
> + if (
> +#ifdef CONFIG_PC
> + kvm_check_extension(s, KVM_CAP_X86_SMM) &&
> object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE) &&
> - pc_machine_is_smm_enabled(PC_MACHINE(ms))) {
> + pc_machine_is_smm_enabled(PC_MACHINE(ms))
> +#else
> + 0
> +#endif
> + ) {
> smram_machine_done.notify = register_smram_listener;
> qemu_add_machine_init_done_notifier(&smram_machine_done);
> }
I'm not familiar with SMM, can we consider it a PC specific thing? If it
isn't, perhaps we should move smm to X86MachineState.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2019-12-12 16:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 14:30 [PATCH 0/5] x86: allow building without PC machine types Paolo Bonzini
2019-12-12 14:30 ` [PATCH 1/5] i386: conditionally compile more files Paolo Bonzini
2019-12-12 15:45 ` Sergio Lopez
2019-12-12 14:30 ` [PATCH 2/5] fw_cfg: allow building without other devices Paolo Bonzini
2019-12-12 15:49 ` Sergio Lopez
2019-12-12 14:30 ` [PATCH 3/5] x86: move more functions to X86MachineState and x86.c Paolo Bonzini
2019-12-12 15:59 ` Sergio Lopez
2019-12-12 16:05 ` Paolo Bonzini
2019-12-12 14:30 ` [PATCH 4/5] pci-stub: add more MSI functions Paolo Bonzini
2019-12-12 16:00 ` Sergio Lopez
2019-12-12 14:30 ` [PATCH 5/5] kvm: check before accessing PCMachineState fields Paolo Bonzini
2019-12-12 16:11 ` Sergio Lopez [this message]
2019-12-12 16:18 ` Paolo Bonzini
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=87v9qlbk25.fsf@redhat.com \
--to=slp@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@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 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).