Go to file
Fabiano Rosas 35ed01ba54 optionrom: Remove build-id section
Our linker script for optionroms specifies only the placement of the
.text section, leaving the linker free to place the remaining sections
at arbitrary places in the file.

Since at least binutils 2.39, the .note.gnu.build-id section is now
being placed at the start of the file, which causes label addresses to
be shifted. For linuxboot_dma.bin that means that the PnP header
(among others) will not be found when determining the type of ROM at
optionrom_setup():

(0x1c is the label _pnph, where the magic "PnP" is)

$ xxd /usr/share/qemu/linuxboot_dma.bin | grep "PnP"
00000010: 0000 0000 0000 0000 0000 1c00 2450 6e50  ............$PnP

$ xxd pc-bios/optionrom/linuxboot_dma.bin | grep "PnP"
00000010: 0000 0000 0000 0000 0000 4c00 2450 6e50  ............$PnP
                                   ^bad

Using a freshly built linuxboot_dma.bin ROM results in a broken boot:

  SeaBIOS (version rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org)
  Booting from Hard Disk...
  Boot failed: could not read the boot disk

  Booting from Floppy...
  Boot failed: could not read the boot disk

  No bootable device.

We're not using the build-id section, so pass the --build-id=none
option to the linker to remove it entirely.

Note: In theory, this same issue could happen with any other
section. The ideal solution would be to have all unused sections
discarded in the linker script. However that would be a larger change,
specially for the pvh rom which uses the .bss and COMMON sections so
I'm addressing only the immediate issue here.

Reported-by: Vasiliy Ulyanov <vulyanov@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20230926192502.15986-1-farosas@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-09-29 09:33:09 +02:00
.github/workflows
.gitlab/issue_templates
.gitlab-ci.d gitlab: make Cirrus CI jobs gating 2023-09-20 15:06:33 +01:00
accel user-exec-stub: remove unused variable 2023-09-25 18:25:03 +02:00
audio audio: remove shadowed locals 2023-09-26 18:09:08 +02:00
authz
backends Block patches 2023-09-21 09:05:10 -04:00
block * new round of audio cleanups 2023-09-27 13:55:18 -04:00
bsd-user bsd-user: spelling fixes 2023-09-20 07:54:34 +03:00
chardev
common-user
configs
contrib elf2dmp: rework PDB_STREAM_INDEXES::segments obtaining 2023-09-21 16:13:54 +01:00
crypto crypto: Add generic 64-bit carry-less multiply routine 2023-09-15 13:57:00 +00:00
disas
docs pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7 2023-09-25 18:25:02 +02:00
dump
ebpf
fpu fpu: Handle m68k extended precision denormals properly 2023-09-16 14:57:16 +00:00
fsdev
gdb-xml
gdbstub
host/include i386: spelling fixes 2023-09-20 07:54:34 +03:00
hw pm_smbus: rename variable to avoid shadowing 2023-09-26 16:39:20 +02:00
include * new round of audio cleanups 2023-09-27 13:55:18 -04:00
io
libdecnumber
linux-headers linux-headers: Update to Linux v6.6-rc1 2023-09-12 11:34:56 +02:00
linux-user target/arm: Enable FEAT_MOPS for CPU 'max' 2023-09-21 16:07:14 +01:00
migration migration: Move return path cleanup to main migration thread 2023-09-27 13:58:02 -04:00
monitor
nbd nbd/server: Refactor handling of command sanity checks 2023-09-25 08:43:22 -05:00
net net/tap: Avoid variable-length array 2023-09-18 14:36:13 +08:00
pc-bios optionrom: Remove build-id section 2023-09-29 09:33:09 +02:00
plugins plugin: Simplify struct qemu_plugin_hwaddr 2023-09-16 14:57:15 +00:00
po
python tests/avocado: Fix console data loss 2023-09-20 15:06:33 +01:00
qapi qemu-img: map: report compressed data blocks 2023-09-20 17:46:01 +02:00
qga
qobject
qom
replay
roms seabios: remove PCI drivers from bios.bin 2023-09-25 18:25:03 +02:00
scripts * Make keyutils independent from keyring in meson.build 2023-09-25 10:10:30 -04:00
scsi
semihosting
softmmu vl: remove shadowed local variables 2023-09-25 18:25:03 +02:00
stats
storage-daemon
stubs
subprojects subprojects: Use the correct .git suffix in the repository URLs 2023-09-21 11:31:18 +03:00
target target/i386/svm_helper: eliminate duplicate local variable 2023-09-26 16:41:49 +02:00
tcg tcg: Map code_gen_buffer with PROT_BTI 2023-09-16 14:57:16 +00:00
tests * new round of audio cleanups 2023-09-27 13:55:18 -04:00
tools
trace
ui ui/vnc: fix handling of VNC_FEATURE_XVP 2023-09-25 18:25:03 +02:00
util Block layer patches 2023-09-21 09:31:28 -04:00
.dir-locals.el
.editorconfig
.exrc
.gdbinit
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitlab-ci.yml
.gitmodules
.gitpublish
.mailmap
.patchew.yml
.readthedocs.yml
.travis.yml
block.c block: Mark bdrv_unref_child() GRAPH_WRLOCK 2023-09-20 17:46:01 +02:00
blockdev-nbd.c
blockdev.c block: Mark bdrv_add/del_child() and caller GRAPH_WRLOCK 2023-09-20 17:46:01 +02:00
blockjob.c block: Mark bdrv_root_unref_child() GRAPH_WRLOCK 2023-09-20 17:46:01 +02:00
configure
COPYING
COPYING.LIB
cpu.c
cpus-common.c
event-loop-base.c
gitdm.config
hmp-commands-info.hx
hmp-commands.hx net: add initial support for AF_XDP network backend 2023-09-18 14:36:13 +08:00
iothread.c
job-qmp.c
job.c
Kconfig
Kconfig.host
LICENSE
MAINTAINERS Hi, 2023-09-19 13:22:19 -04:00
Makefile
memory_ldst.c.inc
meson_options.txt meson.build: Make keyutils independent from keyring 2023-09-25 07:53:40 +02:00
meson.build meson.build: Make keyutils independent from keyring 2023-09-25 07:53:40 +02:00
module-common.c
os-posix.c
os-win32.c
page-vary-common.c
page-vary.c
pythondeps.toml
qemu-bridge-helper.c
qemu-edid.c
qemu-img-cmds.hx
qemu-img.c qemu-img: map: report compressed data blocks 2023-09-20 17:46:01 +02:00
qemu-io-cmds.c
qemu-io.c
qemu-keymap.c
qemu-nbd.c nbd: Replace bool structured_reply with mode enum 2023-09-22 17:19:27 -05:00
qemu-options.hx Hi, 2023-09-19 13:22:19 -04:00
qemu.nsi
qemu.sasl
README.rst
replication.c
trace-events
VERSION
version.rc

===========
QEMU README
===========

QEMU is a generic and open source machine & userspace emulator and
virtualizer.

QEMU is capable of emulating a complete machine in software without any
need for hardware virtualization support. By using dynamic translation,
it achieves very good performance. QEMU can also integrate with the Xen
and KVM hypervisors to provide emulated hardware while allowing the
hypervisor to manage the CPU. With hypervisor support, QEMU can achieve
near native performance for CPUs. When QEMU emulates CPUs directly it is
capable of running operating systems made for one machine (e.g. an ARMv7
board) on a different machine (e.g. an x86_64 PC board).

QEMU is also capable of providing userspace API virtualization for Linux
and BSD kernel interfaces. This allows binaries compiled against one
architecture ABI (e.g. the Linux PPC64 ABI) to be run on a host using a
different architecture ABI (e.g. the Linux x86_64 ABI). This does not
involve any hardware emulation, simply CPU and syscall emulation.

QEMU aims to fit into a variety of use cases. It can be invoked directly
by users wishing to have full control over its behaviour and settings.
It also aims to facilitate integration into higher level management
layers, by providing a stable command line interface and monitor API.
It is commonly invoked indirectly via the libvirt library when using
open source applications such as oVirt, OpenStack and virt-manager.

QEMU as a whole is released under the GNU General Public License,
version 2. For full licensing details, consult the LICENSE file.


Documentation
=============

Documentation can be found hosted online at
`<https://www.qemu.org/documentation/>`_. The documentation for the
current development version that is available at
`<https://www.qemu.org/docs/master/>`_ is generated from the ``docs/``
folder in the source tree, and is built by `Sphinx
<https://www.sphinx-doc.org/en/master/>`_.


Building
========

QEMU is multi-platform software intended to be buildable on all modern
Linux platforms, OS-X, Win32 (via the Mingw64 toolchain) and a variety
of other UNIX targets. The simple steps to build QEMU are:


.. code-block:: shell

  mkdir build
  cd build
  ../configure
  make

Additional information can also be found online via the QEMU website:

* `<https://wiki.qemu.org/Hosts/Linux>`_
* `<https://wiki.qemu.org/Hosts/Mac>`_
* `<https://wiki.qemu.org/Hosts/W32>`_


Submitting patches
==================

The QEMU source code is maintained under the GIT version control system.

.. code-block:: shell

   git clone https://gitlab.com/qemu-project/qemu.git

When submitting patches, one common approach is to use 'git
format-patch' and/or 'git send-email' to format & send the mail to the
qemu-devel@nongnu.org mailing list. All patches submitted must contain
a 'Signed-off-by' line from the author. Patches should follow the
guidelines set out in the `style section
<https://www.qemu.org/docs/master/devel/style.html>`_ of
the Developers Guide.

Additional information on submitting patches can be found online via
the QEMU website

* `<https://wiki.qemu.org/Contribute/SubmitAPatch>`_
* `<https://wiki.qemu.org/Contribute/TrivialPatches>`_

The QEMU website is also maintained under source control.

.. code-block:: shell

  git clone https://gitlab.com/qemu-project/qemu-web.git

* `<https://www.qemu.org/2017/02/04/the-new-qemu-website-is-up/>`_

A 'git-publish' utility was created to make above process less
cumbersome, and is highly recommended for making regular contributions,
or even just for sending consecutive patch series revisions. It also
requires a working 'git send-email' setup, and by default doesn't
automate everything, so you may want to go through the above steps
manually for once.

For installation instructions, please go to

*  `<https://github.com/stefanha/git-publish>`_

The workflow with 'git-publish' is:

.. code-block:: shell

  $ git checkout master -b my-feature
  $ # work on new commits, add your 'Signed-off-by' lines to each
  $ git publish

Your patch series will be sent and tagged as my-feature-v1 if you need to refer
back to it in the future.

Sending v2:

.. code-block:: shell

  $ git checkout my-feature # same topic branch
  $ # making changes to the commits (using 'git rebase', for example)
  $ git publish

Your patch series will be sent with 'v2' tag in the subject and the git tip
will be tagged as my-feature-v2.

Bug reporting
=============

The QEMU project uses GitLab issues to track bugs. Bugs
found when running code built from QEMU git or upstream released sources
should be reported via:

* `<https://gitlab.com/qemu-project/qemu/-/issues>`_

If using QEMU via an operating system vendor pre-built binary package, it
is preferable to report bugs to the vendor's own bug tracker first. If
the bug is also known to affect latest upstream code, it can also be
reported via GitLab.

For additional information on bug reporting consult:

* `<https://wiki.qemu.org/Contribute/ReportABug>`_


ChangeLog
=========

For version history and release notes, please visit
`<https://wiki.qemu.org/ChangeLog/>`_ or look at the git history for
more detailed information.


Contact
=======

The QEMU community can be contacted in a number of ways, with the two
main methods being email and IRC

* `<mailto:qemu-devel@nongnu.org>`_
* `<https://lists.nongnu.org/mailman/listinfo/qemu-devel>`_
* #qemu on irc.oftc.net

Information on additional methods of contacting the community can be
found online via the QEMU website:

* `<https://wiki.qemu.org/Contribute/StartHere>`_