Skip to contentSkip to conversation

Enabling KVM with recent QEMU builds from GIT hang at boot on Ubuntu Precise AMD64 kernel 3.8.0

Qemu-devel Julius Schwartzenberg 3 participants 4 messages Aug 14, 2013 – Nov 10, 2016

lore
Share & tools
lore

Julius Schwartzenberg

author Reviewed-by Xiao Guangrong Reviewed-by Paolo Bonzini
#0 lore raw

Public bug reported:

When I compile QEMU from GIT and run it with './x86_64-softmmu/qemu-system-x86_64 -enable-kvm' it just hangs, the QEMU screen stays black. (Everything else in the GTK UI is responsive though, I can use the QEMU console as well.) I'm running Ubuntu Precise with kernel 3.8.0-27-generic on an Intel Core2 Duo P9500.

With bisecting, I found this commit caused the problem:

235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit commit 235e8982ad393e5611cb892df54881c872eea9e1

Author: Jordan Justen <[email protected]>
Date:   Wed May 29 01:27:26 2013 -0700

kvm: support using KVM_MEM_READONLY flag for regions

For readonly memory regions and rom devices in romd_mode, we make use of the KVM_MEM_READONLY. A slot that uses KVM_MEM_READONLY can be read from and code can execute from the region, but writes will exit to qemu.

For rom devices with !romd_mode, we force the slot to be removed so reads or writes to the region will exit to qemu. (Note that a memory region in this state is not executable within kvm.)

v7:
* Update for readable => romd_mode rename (5f9a5ea1)

Message-id: [email protected]

:100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1
8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M kvm-all.c

** Affects: qemu
Importance: Undecided
Status: New

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

Title:
  Enabling KVM with recent QEMU builds from GIT hang at boot on Ubuntu
  Precise AMD64 kernel 3.8.0

Status in QEMU:
  New

Bug description:
  When I compile QEMU from GIT and run it with './x86_64-softmmu/qemu-system-x86_64 -enable-kvm' it just hangs, the QEMU screen stays black. (Everything else in the GTK UI is responsive though, I can use the QEMU console as well.)
  I'm running Ubuntu Precise with kernel 3.8.0-27-generic on an Intel Core2 Duo P9500.

  With bisecting, I found this commit caused the problem:

  235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit
  commit 235e8982ad393e5611cb892df54881c872eea9e1
  Author: Jordan Justen <[email protected]>
  Date:   Wed May 29 01:27:26 2013 -0700

      kvm: support using KVM_MEM_READONLY flag for regions

      For readonly memory regions and rom devices in romd_mode,
      we make use of the KVM_MEM_READONLY. A slot that uses
      KVM_MEM_READONLY can be read from and code can execute from the
      region, but writes will exit to qemu.

      For rom devices with !romd_mode, we force the slot to be
      removed so reads or writes to the region will exit to qemu.
      (Note that a memory region in this state is not executable
      within kvm.)

      v7:
       * Update for readable => romd_mode rename (5f9a5ea1)

      Signed-off-by: Jordan Justen <[email protected]>
      Reviewed-by: Xiao Guangrong <[email protected]> (v4)
      Reviewed-by: Paolo Bonzini <[email protected]> (v5)
      Message-id: [email protected]
      Signed-off-by: Anthony Liguori <[email protected]>

  :100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1
  8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M      kvm-all.c

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1212402/+subscriptions
#1 lore raw

We have discussed this issue in this mail:
http://www.mail-archive.com/[email protected]/msg174932.html (VM can not boot after commit 235e898)

You can upgrade your kernel to 3.9.x to work around.

Quoted 101 lines · Julius Schwartzenberg

Public bug reported:

When I compile QEMU from GIT and run it with './x86_64-softmmu/qemu-system-x86_64 -enable-kvm' it just hangs, the QEMU screen stays black. (Everything else in the GTK UI is responsive though, I can use the QEMU console as well.)
I'm running Ubuntu Precise with kernel 3.8.0-27-generic on an Intel Core2 Duo P9500.

With bisecting, I found this commit caused the problem:

235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit commit 235e8982ad393e5611cb892df54881c872eea9e1

Author: Jordan Justen <[email protected]>
Date:   Wed May 29 01:27:26 2013 -0700

kvm: support using KVM_MEM_READONLY flag for regions

For readonly memory regions and rom devices in romd_mode, we make use of the KVM_MEM_READONLY. A slot that uses KVM_MEM_READONLY can be read from and code can execute from the region, but writes will exit to qemu.

For rom devices with !romd_mode, we force the slot to be removed so reads or writes to the region will exit to qemu. (Note that a memory region in this state is not executable within kvm.)

v7:
* Update for readable => romd_mode rename (5f9a5ea1)

Message-id:
[email protected]

:100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1
8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M kvm-all.c

** Affects: qemu
Importance: Undecided
Status: New

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

Title:
Enabling KVM with recent QEMU builds from GIT hang at boot on Ubuntu Precise AMD64 kernel 3.8.0

Status in QEMU:
New

Bug description:
When I compile QEMU from GIT and run it with
'./x86_64-softmmu/qemu-system-x86_64 -enable-kvm' it just hangs, the QEMU screen stays black. (Everything else in the GTK UI is responsive though, I can use the QEMU console as well.)
I'm running Ubuntu Precise with kernel 3.8.0-27-generic on an Intel
Core2 Duo P9500.

With bisecting, I found this commit caused the problem:

235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit commit 235e8982ad393e5611cb892df54881c872eea9e1
Author: Jordan Justen <[email protected]>
Date: Wed May 29 01:27:26 2013 -0700

kvm: support using KVM_MEM_READONLY flag for regions

For readonly memory regions and rom devices in romd_mode, we make use of the KVM_MEM_READONLY. A slot that uses KVM_MEM_READONLY can be read from and code can execute from the region, but writes will exit to qemu.

For rom devices with !romd_mode, we force the slot to be removed so reads or writes to the region will exit to qemu. (Note that a memory region in this state is not executable within kvm.)

v7:
* Update for readable => romd_mode rename (5f9a5ea1)

Message-id:
[email protected]

:100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1
8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M kvm-all.c

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

Signature · 5 lines
Best Regards,

Dunrong Huang

Homepage: http://mathslinux.org
#2 lore raw
In reply to Julius Schwartzenberg

It seems reverting this exact commit also works around the problem. I have attached a patch against current head.

** Patch added: "Patch to revert problematic commit"
https://bugs.launchpad.net/qemu/+bug/1212402/+attachment/3790513/+files/0001-Revert-235e8982ad393e5611cb892df54881c872eea9e1.patch

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

Title:
  Enabling KVM with recent QEMU builds from GIT hang at boot on Ubuntu
  Precise AMD64 kernel 3.8.0

Status in QEMU:
  New

Bug description:
  When I compile QEMU from GIT and run it with './x86_64-softmmu/qemu-system-x86_64 -enable-kvm' it just hangs, the QEMU screen stays black. (Everything else in the GTK UI is responsive though, I can use the QEMU console as well.)
  I'm running Ubuntu Precise with kernel 3.8.0-27-generic on an Intel Core2 Duo P9500.

  With bisecting, I found this commit caused the problem:

  235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit
  commit 235e8982ad393e5611cb892df54881c872eea9e1
  Author: Jordan Justen <[email protected]>
  Date:   Wed May 29 01:27:26 2013 -0700

      kvm: support using KVM_MEM_READONLY flag for regions

      For readonly memory regions and rom devices in romd_mode,
      we make use of the KVM_MEM_READONLY. A slot that uses
      KVM_MEM_READONLY can be read from and code can execute from the
      region, but writes will exit to qemu.

      For rom devices with !romd_mode, we force the slot to be
      removed so reads or writes to the region will exit to qemu.
      (Note that a memory region in this state is not executable
      within kvm.)

      v7:
       * Update for readable => romd_mode rename (5f9a5ea1)

      Signed-off-by: Jordan Justen <[email protected]>
      Reviewed-by: Xiao Guangrong <[email protected]> (v4)
      Reviewed-by: Paolo Bonzini <[email protected]> (v5)
      Message-id: [email protected]
      Signed-off-by: Anthony Liguori <[email protected]>

  :100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1
  8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M      kvm-all.c

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1212402/+subscriptions
#3 lore raw
In reply to Julius Schwartzenberg

According to comment #1, this has been fixed with kernel 3.9, so setting the status to "Fix released" now.

** Changed in: qemu
Status: New => Fix Released

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

Title:
  Enabling KVM with recent QEMU builds from GIT hang at boot on Ubuntu
  Precise AMD64 kernel 3.8.0

Status in QEMU:
  Fix Released

Bug description:
  When I compile QEMU from GIT and run it with './x86_64-softmmu/qemu-system-x86_64 -enable-kvm' it just hangs, the QEMU screen stays black. (Everything else in the GTK UI is responsive though, I can use the QEMU console as well.)
  I'm running Ubuntu Precise with kernel 3.8.0-27-generic on an Intel Core2 Duo P9500.

  With bisecting, I found this commit caused the problem:

  235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit
  commit 235e8982ad393e5611cb892df54881c872eea9e1
  Author: Jordan Justen <[email protected]>
  Date:   Wed May 29 01:27:26 2013 -0700

      kvm: support using KVM_MEM_READONLY flag for regions

      For readonly memory regions and rom devices in romd_mode,
      we make use of the KVM_MEM_READONLY. A slot that uses
      KVM_MEM_READONLY can be read from and code can execute from the
      region, but writes will exit to qemu.

      For rom devices with !romd_mode, we force the slot to be
      removed so reads or writes to the region will exit to qemu.
      (Note that a memory region in this state is not executable
      within kvm.)

      v7:
       * Update for readable => romd_mode rename (5f9a5ea1)

      Signed-off-by: Jordan Justen <[email protected]>
      Reviewed-by: Xiao Guangrong <[email protected]> (v4)
      Reviewed-by: Paolo Bonzini <[email protected]> (v5)
      Message-id: [email protected]
      Signed-off-by: Anthony Liguori <[email protected]>

  :100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1
  8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M      kvm-all.c

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