All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups
@ 2015-07-24 18:15 Laszlo Ersek
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset Laszlo Ersek
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Laszlo Ersek @ 2015-07-24 18:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Michael S. Tsirkin, qemu-trivial, Gerd Hoffmann,
	Igor Mammedov, Paolo Bonzini, Andreas Faerber, Richard Henderson

So, I just happened to resume my SMM-for-OVMF work today, with
v2.4.0-rc2-2-g12e21eb, and I suddenly realized that these patches never
made upstream. The first two are trivial and I kinda "insist" on them
:), the last one (from Paolo) doesn't seem that trivial (to me at
least), and I don't strictly need it for my work just yet. I'll let you
guys decide.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andreas Faerber <afaerber@suse.de>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-trivial@nongnu.org

Thanks
Laszlo

Laszlo Ersek (2):
  hw/acpi/ich9: clear smi_en on reset
  hw/acpi/ich9: clean up stale comment about KVM not supporting SMM

Paolo Bonzini (1):
  target-i386: wake up processors that receive an SMI

 hw/acpi/ich9.c    | 4 ++--
 target-i386/cpu.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset
  2015-07-24 18:15 [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Laszlo Ersek
@ 2015-07-24 18:16 ` Laszlo Ersek
  2015-07-27  9:34   ` Igor Mammedov
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM Laszlo Ersek
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Laszlo Ersek @ 2015-07-24 18:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Igor Mammedov, Paolo Bonzini, Gerd Hoffmann,
	Michael S. Tsirkin

Otherwise on reboot firmware might think (due to APMC_EN remaining set
from the previous boot) that SMI support is absent.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-trivial@nongnu.org
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 hw/acpi/ich9.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index f04f6dc..8da5a2d 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -221,6 +221,7 @@ static void pm_reset(void *opaque)
     acpi_pm_tmr_reset(&pm->acpi_regs);
     acpi_gpe_reset(&pm->acpi_regs);
 
+    pm->smi_en = 0;
     if (!pm->smm_enabled) {
         /* Mark SMM as already inited to prevent SMM from running. KVM does not
          * support SMM mode. */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM
  2015-07-24 18:15 [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Laszlo Ersek
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset Laszlo Ersek
@ 2015-07-24 18:16 ` Laszlo Ersek
  2015-07-27  9:43   ` Igor Mammedov
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI Laszlo Ersek
  2015-07-27 19:11 ` [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Michael Tokarev
  3 siblings, 1 reply; 8+ messages in thread
From: Laszlo Ersek @ 2015-07-24 18:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Igor Mammedov, Paolo Bonzini, Gerd Hoffmann,
	Michael S. Tsirkin

Commit fba72476c6 ("ich9: add smm_enabled field and arguments") detached
SMM availability from kvm_enabled(). However, the comment in pm_reset()
was not updated; let's do it now.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-trivial@nongnu.org
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 hw/acpi/ich9.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 8da5a2d..1c7fcfa 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -223,8 +223,7 @@ static void pm_reset(void *opaque)
 
     pm->smi_en = 0;
     if (!pm->smm_enabled) {
-        /* Mark SMM as already inited to prevent SMM from running. KVM does not
-         * support SMM mode. */
+        /* Mark SMM as already inited to prevent SMM from running. */
         pm->smi_en |= ICH9_PMIO_SMI_EN_APMC_EN;
     }
     pm->smi_en_wmask = ~0;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI
  2015-07-24 18:15 [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Laszlo Ersek
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset Laszlo Ersek
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM Laszlo Ersek
@ 2015-07-24 18:16 ` Laszlo Ersek
  2015-07-24 18:22   ` Laszlo Ersek
  2015-07-27 19:11 ` [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Michael Tokarev
  3 siblings, 1 reply; 8+ messages in thread
From: Laszlo Ersek @ 2015-07-24 18:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Andreas Faerber, Eduardo Habkost, Richard Henderson

From: Paolo Bonzini <pbonzini@redhat.com>

An SMI should definitely wake up a processor in halted state!
This lets OVMF boot with SMM on multiprocessor systems, although
it halts very soon after that with a "CpuIndex != BspIndex"
assertion failure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andreas Faerber <afaerber@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 target-i386/cpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 7a779b1..ee7b4ac 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -3134,6 +3134,7 @@ static bool x86_cpu_has_work(CPUState *cs)
     return ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
             (env->eflags & IF_MASK)) ||
            (cs->interrupt_request & (CPU_INTERRUPT_NMI |
+                                     CPU_INTERRUPT_SMI |
                                      CPU_INTERRUPT_INIT |
                                      CPU_INTERRUPT_SIPI |
                                      CPU_INTERRUPT_MCE)) ||
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI Laszlo Ersek
@ 2015-07-24 18:22   ` Laszlo Ersek
  0 siblings, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2015-07-24 18:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Andreas Faerber, Eduardo Habkost

On 07/24/15 20:16, Laszlo Ersek wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
> 
> An SMI should definitely wake up a processor in halted state!
> This lets OVMF boot with SMM on multiprocessor systems, although
> it halts very soon after that with a "CpuIndex != BspIndex"
> assertion failure.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Andreas Faerber <afaerber@suse.de>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  target-i386/cpu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 7a779b1..ee7b4ac 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -3134,6 +3134,7 @@ static bool x86_cpu_has_work(CPUState *cs)
>      return ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
>              (env->eflags & IF_MASK)) ||
>             (cs->interrupt_request & (CPU_INTERRUPT_NMI |
> +                                     CPU_INTERRUPT_SMI |
>                                       CPU_INTERRUPT_INIT |
>                                       CPU_INTERRUPT_SIPI |
>                                       CPU_INTERRUPT_MCE)) ||
> 

My bad, please disregard this one patch in the series -- an improved
version has already been committed as
a9bad65d2c1f61af74ce2ff43238d4b20bf81c3a.

Sorry about the noise (but please do pick up the first two patches).

Thanks!
Laszlo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset Laszlo Ersek
@ 2015-07-27  9:34   ` Igor Mammedov
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Mammedov @ 2015-07-27  9:34 UTC (permalink / raw)
  To: Laszlo Ersek
  Cc: qemu-trivial, Paolo Bonzini, Michael S. Tsirkin, qemu-devel,
	Gerd Hoffmann

On Fri, 24 Jul 2015 20:16:00 +0200
Laszlo Ersek <lersek@redhat.com> wrote:

> Otherwise on reboot firmware might think (due to APMC_EN remaining set
> from the previous boot) that SMI support is absent.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> 
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: qemu-trivial@nongnu.org
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  hw/acpi/ich9.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index f04f6dc..8da5a2d 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -221,6 +221,7 @@ static void pm_reset(void *opaque)
>      acpi_pm_tmr_reset(&pm->acpi_regs);
>      acpi_gpe_reset(&pm->acpi_regs);
>  
> +    pm->smi_en = 0;
>      if (!pm->smm_enabled) {
>          /* Mark SMM as already inited to prevent SMM from running. KVM does not
>           * support SMM mode. */

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM Laszlo Ersek
@ 2015-07-27  9:43   ` Igor Mammedov
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Mammedov @ 2015-07-27  9:43 UTC (permalink / raw)
  To: Laszlo Ersek
  Cc: qemu-trivial, Paolo Bonzini, Michael S. Tsirkin, qemu-devel,
	Gerd Hoffmann

On Fri, 24 Jul 2015 20:16:01 +0200
Laszlo Ersek <lersek@redhat.com> wrote:

> Commit fba72476c6 ("ich9: add smm_enabled field and arguments") detached
> SMM availability from kvm_enabled(). However, the comment in pm_reset()
> was not updated; let's do it now.
> 
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: qemu-trivial@nongnu.org
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  hw/acpi/ich9.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index 8da5a2d..1c7fcfa 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -223,8 +223,7 @@ static void pm_reset(void *opaque)
>  
>      pm->smi_en = 0;
>      if (!pm->smm_enabled) {
> -        /* Mark SMM as already inited to prevent SMM from running. KVM does not
> -         * support SMM mode. */
> +        /* Mark SMM as already inited to prevent SMM from running. */
>          pm->smi_en |= ICH9_PMIO_SMI_EN_APMC_EN;
>      }
>      pm->smi_en_wmask = ~0;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups
  2015-07-24 18:15 [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Laszlo Ersek
                   ` (2 preceding siblings ...)
  2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI Laszlo Ersek
@ 2015-07-27 19:11 ` Michael Tokarev
  3 siblings, 0 replies; 8+ messages in thread
From: Michael Tokarev @ 2015-07-27 19:11 UTC (permalink / raw)
  To: Laszlo Ersek, qemu-devel
  Cc: Eduardo Habkost, Michael S. Tsirkin, qemu-trivial, Gerd Hoffmann,
	Paolo Bonzini, Igor Mammedov, Andreas Faerber, Richard Henderson

24.07.2015 21:15, Laszlo Ersek wrote:
> So, I just happened to resume my SMM-for-OVMF work today, with
> v2.4.0-rc2-2-g12e21eb, and I suddenly realized that these patches never
> made upstream. The first two are trivial and I kinda "insist" on them
> :), the last one (from Paolo) doesn't seem that trivial (to me at
> least), and I don't strictly need it for my work just yet. I'll let you
> guys decide.

Applied to -trivial, thanks!

/mjt

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-27 19:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 18:15 [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Laszlo Ersek
2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset Laszlo Ersek
2015-07-27  9:34   ` Igor Mammedov
2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM Laszlo Ersek
2015-07-27  9:43   ` Igor Mammedov
2015-07-24 18:16 ` [Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI Laszlo Ersek
2015-07-24 18:22   ` Laszlo Ersek
2015-07-27 19:11 ` [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups Michael Tokarev

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.