QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Bug 1888971] [NEW] SMI trigger causes hang with multiple cores
@ 2020-07-26  3:57 Naresh GS
  2020-07-27 10:27 ` [Bug 1888971] " Laszlo Ersek (Red Hat)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Naresh GS @ 2020-07-26  3:57 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

When using qemu , SMI trigger causes hang/reboot under following
conditions:

1. No KVM but there are more than 1 threads (-smp > 1)
2. When using KVM.

Info:
qemu-system-x86_64 --version
QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.29)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

SMI trigger was done by writing 0x00 in IO port 0xB2.

Command:
No failure in SMI trigger when using the below command:
qemu-system-x86_64 -M pc-q35-bionic -smp 1 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

Hang/resets with below commands:
qemu-system-x86_64 -M pc-q35-bionic -smp 2 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

sudo qemu-system-x86_64 -M pc-q35-bionic,accel=kvm -smp 1 -bios
build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

** Affects: qemu
     Importance: Undecided
         Status: New

** Description changed:

- When using qemu , SMI trigger causes hand/reboot under following
+ When using qemu , SMI trigger causes hang/reboot under following
  conditions:
  
  1. No KVM but there are more than 1 threads (-smp > 1)
  2. When using KVM.
  
  Info:
  qemu-system-x86_64 --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.29)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
  
  SMI trigger was done by writing 0x00 in IO port 0xB2.

** Description changed:

  When using qemu , SMI trigger causes hang/reboot under following
  conditions:
  
  1. No KVM but there are more than 1 threads (-smp > 1)
  2. When using KVM.
  
  Info:
  qemu-system-x86_64 --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.29)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
  
  SMI trigger was done by writing 0x00 in IO port 0xB2.
+ 
+ Command:
+ No failure in SMI trigger when using the below command:
+ qemu-system-x86_64 -M pc-q35-bionic -smp 1 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt
+ 
+ Hang/resets with below commands:
+ qemu-system-x86_64 -M pc-q35-bionic -smp 2 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt
+ 
+ sudo qemu-system-x86_64 -M pc-q35-bionic,accel=kvm -smp 1 -bios
+ build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1888971

Title:
  SMI trigger causes hang with multiple cores

Status in QEMU:
  New

Bug description:
  When using qemu , SMI trigger causes hang/reboot under following
  conditions:

  1. No KVM but there are more than 1 threads (-smp > 1)
  2. When using KVM.

  Info:
  qemu-system-x86_64 --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.29)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

  SMI trigger was done by writing 0x00 in IO port 0xB2.

  Command:
  No failure in SMI trigger when using the below command:
  qemu-system-x86_64 -M pc-q35-bionic -smp 1 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  Hang/resets with below commands:
  qemu-system-x86_64 -M pc-q35-bionic -smp 2 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  sudo qemu-system-x86_64 -M pc-q35-bionic,accel=kvm -smp 1 -bios
  build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee
  1.txt

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1888971/+subscriptions


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

* [Bug 1888971] Re: SMI trigger causes hang with multiple cores
  2020-07-26  3:57 [Bug 1888971] [NEW] SMI trigger causes hang with multiple cores Naresh GS
@ 2020-07-27 10:27 ` Laszlo Ersek (Red Hat)
  2020-07-31  6:32 ` Naresh GS
  2020-07-31  9:44 ` Laszlo Ersek (Red Hat)
  2 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek (Red Hat) @ 2020-07-27 10:27 UTC (permalink / raw)
  To: qemu-devel

Does coreboot do anything to set up an SMI handler? Does it relocate
SMBASE for all processors?

Misbehavior upon raising an SMI is fully expected, unless the guest
(usually the guest firmware) sets up SMI handling properly.

The bug report currently includes only two bits of information about
guest actions, namely "coreboot.rom" and "writing 0x00 in IO port 0xB2".
Thus far a guest crash looks entirely reasonable to me.

Did you intend to attach "1.txt"?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1888971

Title:
  SMI trigger causes hang with multiple cores

Status in QEMU:
  New

Bug description:
  When using qemu , SMI trigger causes hang/reboot under following
  conditions:

  1. No KVM but there are more than 1 threads (-smp > 1)
  2. When using KVM.

  Info:
  qemu-system-x86_64 --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.29)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

  SMI trigger was done by writing 0x00 in IO port 0xB2.

  Command:
  No failure in SMI trigger when using the below command:
  qemu-system-x86_64 -M pc-q35-bionic -smp 1 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  Hang/resets with below commands:
  qemu-system-x86_64 -M pc-q35-bionic -smp 2 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  sudo qemu-system-x86_64 -M pc-q35-bionic,accel=kvm -smp 1 -bios
  build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee
  1.txt

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1888971/+subscriptions


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

* [Bug 1888971] Re: SMI trigger causes hang with multiple cores
  2020-07-26  3:57 [Bug 1888971] [NEW] SMI trigger causes hang with multiple cores Naresh GS
  2020-07-27 10:27 ` [Bug 1888971] " Laszlo Ersek (Red Hat)
@ 2020-07-31  6:32 ` Naresh GS
  2020-07-31  9:44 ` Laszlo Ersek (Red Hat)
  2 siblings, 0 replies; 4+ messages in thread
From: Naresh GS @ 2020-07-31  6:32 UTC (permalink / raw)
  To: qemu-devel

I tried without specifying -bios parameter still hang is seen. But this
time it had low memory corruption.

And built seabios with more debug logs but seabios doesn't does SMM init
even when its selected in make menuconfig.

I guess fundamentally th issue is writing 0xXX in IO port 0xB2 should
trigger SMI handler in all possible core but instead it triggers SMI
only in Core#0.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1888971

Title:
  SMI trigger causes hang with multiple cores

Status in QEMU:
  New

Bug description:
  When using qemu , SMI trigger causes hang/reboot under following
  conditions:

  1. No KVM but there are more than 1 threads (-smp > 1)
  2. When using KVM.

  Info:
  qemu-system-x86_64 --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.29)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

  SMI trigger was done by writing 0x00 in IO port 0xB2.

  Command:
  No failure in SMI trigger when using the below command:
  qemu-system-x86_64 -M pc-q35-bionic -smp 1 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  Hang/resets with below commands:
  qemu-system-x86_64 -M pc-q35-bionic -smp 2 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  sudo qemu-system-x86_64 -M pc-q35-bionic,accel=kvm -smp 1 -bios
  build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee
  1.txt

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1888971/+subscriptions


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

* [Bug 1888971] Re: SMI trigger causes hang with multiple cores
  2020-07-26  3:57 [Bug 1888971] [NEW] SMI trigger causes hang with multiple cores Naresh GS
  2020-07-27 10:27 ` [Bug 1888971] " Laszlo Ersek (Red Hat)
  2020-07-31  6:32 ` Naresh GS
@ 2020-07-31  9:44 ` Laszlo Ersek (Red Hat)
  2 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek (Red Hat) @ 2020-07-31  9:44 UTC (permalink / raw)
  To: qemu-devel

> I guess fundamentally th issue is writing 0xXX in IO port 0xB2 should
> trigger SMI handler in all possible core but instead it triggers SMI
> only in Core#0.

For that, the guest needs to negotiate the "broadcast SMI" feature with
QEMU. See commit range 57bb40c9db40..b8bab8eb6934.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1888971

Title:
  SMI trigger causes hang with multiple cores

Status in QEMU:
  New

Bug description:
  When using qemu , SMI trigger causes hang/reboot under following
  conditions:

  1. No KVM but there are more than 1 threads (-smp > 1)
  2. When using KVM.

  Info:
  qemu-system-x86_64 --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.29)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

  SMI trigger was done by writing 0x00 in IO port 0xB2.

  Command:
  No failure in SMI trigger when using the below command:
  qemu-system-x86_64 -M pc-q35-bionic -smp 1 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  Hang/resets with below commands:
  qemu-system-x86_64 -M pc-q35-bionic -smp 2 -bios build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee 1.txt

  sudo qemu-system-x86_64 -M pc-q35-bionic,accel=kvm -smp 1 -bios
  build/coreboot.rom  -serial stdio -hda ../linux.img  -m 2048 | tee
  1.txt

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1888971/+subscriptions


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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26  3:57 [Bug 1888971] [NEW] SMI trigger causes hang with multiple cores Naresh GS
2020-07-27 10:27 ` [Bug 1888971] " Laszlo Ersek (Red Hat)
2020-07-31  6:32 ` Naresh GS
2020-07-31  9:44 ` Laszlo Ersek (Red Hat)

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git