qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 898280: target/i386: fix operand order for PD


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 898280: target/i386: fix operand order for PDEP and PEXT
Date: Wed, 09 Dec 2020 04:02:53 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 89828075b15e10a8dd4456372bd4cb5004a9a67b
      
https://github.com/qemu/qemu/commit/89828075b15e10a8dd4456372bd4cb5004a9a67b
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-11-30 (Mon, 30 Nov 2020)

  Changed paths:
    M target/i386/translate.c
    M tests/tcg/i386/Makefile.target
    A tests/tcg/i386/test-i386-bmi2.c

  Log Message:
  -----------
  target/i386: fix operand order for PDEP and PEXT

For PDEP and PEXT, the mask is provided in the memory (mod+r/m)
operand, and therefore is loaded in s->T0 by gen_ldst_modrm.
The source is provided in the second source operand (VEX.vvvv)
and therefore is loaded in s->T1.  Fix the order in which
they are passed to the helpers.

Reported-by: Lenard Szolnoki <blog@lenardszolnoki.com>
Analyzed-by: Lenard Szolnoki <blog@lenardszolnoki.com>
Fixes: https://bugs.launchpad.net/qemu/+bug/1605123
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 59e9ffa835a2bf22e892bb15c08e408cc968a908
      
https://github.com/qemu/qemu/commit/59e9ffa835a2bf22e892bb15c08e408cc968a908
  Author: David Woodhouse <dwmw2@infradead.org>
  Date:   2020-11-30 (Mon, 30 Nov 2020)

  Changed paths:
    M hw/i386/kvm/apic.c
    M hw/i386/pc.c
    M include/standard-headers/asm-x86/kvm_para.h
    M target/i386/cpu.c
    M target/i386/kvm.c
    M target/i386/kvm_i386.h

  Log Message:
  -----------
  target/i386: Support up to 32768 CPUs without IRQ remapping

The IOAPIC has an 'Extended Destination ID' field in its RTE, which maps
to bits 11-4 of the MSI address. Since those address bits fall within a
given 4KiB page they were historically non-trivial to use on real hardware.

The Intel IOMMU uses the lowest bit to indicate a remappable format MSI,
and then the remaining 7 bits are part of the index.

Where the remappable format bit isn't set, we can actually use the other
seven to allow external (IOAPIC and MSI) interrupts to reach up to 32768
CPUs instead of just the 255 permitted on bare metal.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Message-Id: <78097f9218300e63e751e077a0a5ca029b56ba46.camel@infradead.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 36c5c1918d49379984ae4cbc0e0c9bad4322b4e7
      
https://github.com/qemu/qemu/commit/36c5c1918d49379984ae4cbc0e0c9bad4322b4e7
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2020-11-30 (Mon, 30 Nov 2020)

  Changed paths:
    M target/i386/seg_helper.c

  Log Message:
  -----------
  target/i386: seg_helper: Correct segement selector nullification in the 
RET/IRET helper

Per the SDM, when returning to outer privilege level, for segment
registers (ES, FS, GS, and DS) if the check fails, the segment
selector becomes null, but QEMU clears the base/limit/flags as well
as nullifying the segment selector, which should be a spec violation.

Real hardware seems to be compliant with the spec, at least on one
Coffee Lake board I tested.

Signed-off-by: Bin Meng <bin.meng@windriver.com>

Message-Id: <1605261378-77971-1-git-send-email-bmeng.cn@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7c6f824fda329cacdf981e95375452c44436927f
      
https://github.com/qemu/qemu/commit/7c6f824fda329cacdf981e95375452c44436927f
  Author: Sunil Muthuswamy <sunilmut@microsoft.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M MAINTAINERS
    M hw/i386/x86.c
    M include/sysemu/whpx.h
    M softmmu/cpus.c
    M softmmu/vl.c
    M target/i386/cpu.c
    M target/i386/meson.build
    M target/i386/whp-dispatch.h
    M target/i386/whpx-all.c
    A target/i386/whpx-apic.c

  Log Message:
  -----------
  WHPX: support for the kernel-irqchip on/off

This patch adds support the kernel-irqchip option for
WHPX with on or off value. 'split' value is not supported
for the option. The option only works for the latest version
of Windows (ones that are coming out on Insiders). The
change maintains backward compatibility on older version of
Windows where this option is not supported.

Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Message-Id: 
<SN4PR2101MB0880B13258DA9251F8459F4DC0170@SN4PR2101MB0880.namprd21.prod.outlook.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 28989e15e102114bcc4ef3caf7832f5145c52cc2
      
https://github.com/qemu/qemu/commit/28989e15e102114bcc4ef3caf7832f5145c52cc2
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M docs/devel/loads-stores.rst

  Log Message:
  -----------
  docs/devel/loads-stores: Add regexp for DMA functions

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-3-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1f1e92d86cac79bba0310ce5cc2aba5b447ba0d7
      
https://github.com/qemu/qemu/commit/1f1e92d86cac79bba0310ce5cc2aba5b447ba0d7
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M qom/object.c

  Log Message:
  -----------
  qom: eliminate identical functions

Most property release functions in qom/object.c only free the opaque
value.  Combine all of them into a single function.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3004743c3067e6d089c20a8ed865d63afac8e7b9
      
https://github.com/qemu/qemu/commit/3004743c3067e6d089c20a8ed865d63afac8e7b9
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/sysemu/dma.h

  Log Message:
  -----------
  dma: Document address_space_map/address_space_unmap() prototypes

Add documentation based on address_space_map / address_space_unmap.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-4-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 32796093511539696a09d1df3a5a0c33bf7e1af8
      
https://github.com/qemu/qemu/commit/32796093511539696a09d1df3a5a0c33bf7e1af8
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/sysemu/dma.h
    M softmmu/dma-helpers.c

  Log Message:
  -----------
  dma: Let dma_memory_set() propagate MemTxResult

address_space_write() returns a MemTxResult type.
Do not discard it, return it to the caller.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-5-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6c9a8b5b2e39fe6f92fea81ad57343219c06e05f
      
https://github.com/qemu/qemu/commit/6c9a8b5b2e39fe6f92fea81ad57343219c06e05f
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/sysemu/dma.h

  Log Message:
  -----------
  dma: Let dma_memory_rw() propagate MemTxResult

address_space_rw() returns a MemTxResult type.
Do not discard it, return it to the caller.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-6-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 855876e41fab1e7a33f900a017498b496e90d7c4
      
https://github.com/qemu/qemu/commit/855876e41fab1e7a33f900a017498b496e90d7c4
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/sysemu/dma.h

  Log Message:
  -----------
  dma: Let dma_memory_read() propagate MemTxResult

dma_memory_rw_relaxed() returns a MemTxResult type.
Do not discard it, return it to the caller.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-7-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: cd32cd159c958f1e6309f0d3380298b90bf263fc
      
https://github.com/qemu/qemu/commit/cd32cd159c958f1e6309f0d3380298b90bf263fc
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/sysemu/dma.h

  Log Message:
  -----------
  dma: Let dma_memory_write() propagate MemTxResult

dma_memory_rw_relaxed() returns a MemTxResult type.
Do not discard it, return it to the caller.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-8-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: cee4d5d55020702152f028e3d9f52530e40401b4
      
https://github.com/qemu/qemu/commit/cee4d5d55020702152f028e3d9f52530e40401b4
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: Let pci_dma_rw() propagate MemTxResult

dma_memory_rw() returns a MemTxResult type.
Do not discard it, return it to the caller.

Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-9-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5791bda7bd5c96def199c2508bd213f884a99a09
      
https://github.com/qemu/qemu/commit/5791bda7bd5c96def199c2508bd213f884a99a09
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: Let pci_dma_read() propagate MemTxResult

pci_dma_rw() returns a MemTxResult type.
Do not discard it, return it to the caller.

Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-10-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a6fda68cb22adc3f0fe1ed92e389aecf3fd8d304
      
https://github.com/qemu/qemu/commit/a6fda68cb22adc3f0fe1ed92e389aecf3fd8d304
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: Let pci_dma_write() propagate MemTxResult

pci_dma_rw() returns a MemTxResult type.
Do not discard it, return it to the caller.

Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201023151923.3243652-11-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7c901863743772f814b311791c629cc0eba0d676
      
https://github.com/qemu/qemu/commit/7c901863743772f814b311791c629cc0eba0d676
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/ssi/aspeed_smc.c
    M include/hw/ssi/aspeed_smc.h

  Log Message:
  -----------
  hw/ssi/aspeed_smc: Rename 'max_slaves' variable as 'max_peripherals'

In order to use inclusive terminology, rename max_slaves
as max_peripherals.

Patch generated using:

  $ sed -i s/slave/peripheral/ \
        hw/ssi/aspeed_smc.c include/hw/ssi/aspeed_smc.h

One line in aspeed_smc_read() has been manually tweaked
to pass checkpatch.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201012124955.3409127-2-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 62ec154238353997de93c910e4c489b38f1150df
      
https://github.com/qemu/qemu/commit/62ec154238353997de93c910e4c489b38f1150df
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/hw/ssi/ssi.h

  Log Message:
  -----------
  hw/ssi: Update coding style to make checkpatch.pl happy

To make the next commit easier to review, clean this code first.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201012124955.3409127-3-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 042923dc6a6a34d3f5513bb6de46e76f92eb38be
      
https://github.com/qemu/qemu/commit/042923dc6a6a34d3f5513bb6de46e76f92eb38be
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/arm/spitz.c
    M hw/arm/stellaris.c
    M hw/arm/tosa.c
    M hw/arm/z2.c
    M hw/block/m25p80.c
    M hw/display/ads7846.c
    M hw/display/ssd0323.c
    M hw/misc/max111x.c
    M hw/sd/ssi-sd.c
    M hw/ssi/pl022.c
    M hw/ssi/ssi.c
    M hw/ssi/xilinx_spips.c
    M include/hw/misc/max111x.h
    M include/hw/ssi/ssi.h

  Log Message:
  -----------
  hw/ssi: Rename SSI 'slave' as 'peripheral'

In order to use inclusive terminology, rename SSI 'slave' as
'peripheral', following the specification resolution:
https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/

Patch created mechanically using:

  $ sed -i s/SSISlave/SSIPeripheral/ $(git grep -l SSISlave)
  $ sed -i s/SSI_SLAVE/SSI_PERIPHERAL/ $(git grep -l SSI_SLAVE)
  $ sed -i s/ssi-slave/ssi-peripheral/ $(git grep -l ssi-slave)
  $ sed -i s/ssi_slave/ssi_peripheral/ $(git grep -l ssi_slave)
  $ sed -i s/ssi_create_slave/ssi_create_peripheral/ \
                                $(git grep -l ssi_create_slave)

Then in VMStateDescription vmstate_ssi_peripheral we restored
the "SSISlave" migration stream name (to avoid breaking migration).

Finally the following files have been manually tweaked:
 - hw/ssi/pl022.c
 - hw/ssi/xilinx_spips.c

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201012124955.3409127-4-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 314a00a10e00081c5d1d7042955a5c8017771c87
      
https://github.com/qemu/qemu/commit/314a00a10e00081c5d1d7042955a5c8017771c87
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/core/stream.c
    M hw/dma/xilinx_axidma.c
    M hw/net/xilinx_axienet.c
    M hw/ssi/xilinx_spips.c
    M include/hw/ssi/xilinx_spips.h
    M include/hw/stream.h

  Log Message:
  -----------
  hw/core/stream: Rename StreamSlave as StreamSink

In order to use inclusive terminology, rename 'slave stream'
as 'sink stream'.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-Id: <20200910070131.435543-3-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9ec73d638a9bb55ce030adc944c3064ea2333b23
      
https://github.com/qemu/qemu/commit/9ec73d638a9bb55ce030adc944c3064ea2333b23
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/dma/xilinx_axidma.c

  Log Message:
  -----------
  hw/dma/xilinx_axidma: Rename StreamSlave as StreamSink

In order to use inclusive terminology, rename 'slave stream'
as 'sink stream'.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-Id: <20200910070131.435543-4-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 4b7763407306f9e8c0488e6f86b2ee787a131132
      
https://github.com/qemu/qemu/commit/4b7763407306f9e8c0488e6f86b2ee787a131132
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/net/xilinx_axienet.c

  Log Message:
  -----------
  hw/net/xilinx_axienet: Rename StreamSlave as StreamSink

In order to use inclusive terminology, rename 'slave stream'
as 'sink stream'.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-Id: <20200910070131.435543-5-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f0a98bd8eab5abcea5aea426e332e581cc218e20
      
https://github.com/qemu/qemu/commit/f0a98bd8eab5abcea5aea426e332e581cc218e20
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/alpha/dp264.c

  Log Message:
  -----------
  alpha: remove bios_name

Cc: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201026143028.3034018-2-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5f12dc96396b4ba320cc03e6ecc577269ea9d01f
      
https://github.com/qemu/qemu/commit/5f12dc96396b4ba320cc03e6ecc577269ea9d01f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/arm/cubieboard.c
    M hw/arm/highbank.c
    M hw/arm/npcm7xx_boards.c
    M hw/arm/orangepi.c
    M hw/arm/sbsa-ref.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c

  Log Message:
  -----------
  arm: remove bios_name

Get the firmware name from the MachineState object.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201026143028.3034018-4-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7af73496efeb496e72fb7555f53a51754210d63d
      
https://github.com/qemu/qemu/commit/7af73496efeb496e72fb7555f53a51754210d63d
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/hppa/machine.c

  Log Message:
  -----------
  hppa: remove bios_name

Cc: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201026143028.3034018-5-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 0036daaa906a3048db5a133abb78b9af504559f4
      
https://github.com/qemu/qemu/commit/0036daaa906a3048db5a133abb78b9af504559f4
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/i386/microvm.c
    M hw/i386/pc_sysfw.c
    M hw/i386/x86.c
    M include/hw/i386/x86.h

  Log Message:
  -----------
  i386: remove bios_name

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201026143028.3034018-6-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: eccbd39b38d2935f5758b7e8286807bf1aac54fc
      
https://github.com/qemu/qemu/commit/eccbd39b38d2935f5758b7e8286807bf1aac54fc
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/lm32/milkymist.c

  Log Message:
  -----------
  lm32: remove bios_name

Cc: Michael Walle <michael@walle.cc>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201026143028.3034018-7-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3c649921320936c46131feae6ef667919e5be864
      
https://github.com/qemu/qemu/commit/3c649921320936c46131feae6ef667919e5be864
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/m68k/mcf5208.c
    M hw/m68k/next-cube.c
    M hw/m68k/q800.c

  Log Message:
  -----------
  m68k: remove bios_name

Cc: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201026143028.3034018-8-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 0992bb61de7c37eca25270383a7d1f7894b4a6c2
      
https://github.com/qemu/qemu/commit/0992bb61de7c37eca25270383a7d1f7894b4a6c2
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/mips/fuloong2e.c
    M hw/mips/jazz.c
    M hw/mips/malta.c
    M hw/mips/mipssim.c

  Log Message:
  -----------
  mips: remove bios_name

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201026143028.3034018-9-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 775f1b9aa9912c8c747bd60f51055f6c87356225
      
https://github.com/qemu/qemu/commit/775f1b9aa9912c8c747bd60f51055f6c87356225
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/moxie/moxiesim.c

  Log Message:
  -----------
  moxie: remove bios_name

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201026143028.3034018-10-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 76e10c6a9731c5541c3d0b9c2b567742fc48fe8f
      
https://github.com/qemu/qemu/commit/76e10c6a9731c5541c3d0b9c2b567742fc48fe8f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/ppc/e500.c
    M hw/ppc/mac_newworld.c
    M hw/ppc/mac_oldworld.c
    M hw/ppc/pnv.c
    M hw/ppc/ppc405_boards.c
    M hw/ppc/prep.c
    M hw/ppc/spapr.c

  Log Message:
  -----------
  ppc: remove bios_name

Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201026143028.3034018-11-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7b4d9612339d20a39138ea23af60ae8eae5916f5
      
https://github.com/qemu/qemu/commit/7b4d9612339d20a39138ea23af60ae8eae5916f5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/rx/rx-gdbsim.c
    M hw/rx/rx62n.c

  Log Message:
  -----------
  rx: move BIOS load from MCU to board

The ROM loader state is global and not part of the MCU, and the
BIOS is in machine->firmware.  So just like the kernel case,
load it in the board.

Due to the ordering between CPU reset and ROM reset, the ROM
has to be registered before the CPU is realized, otherwise
the reset vector is loaded before the ROM is there.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 14d88b06c1559dbc9fad3d52b4e10491051e7a79
      
https://github.com/qemu/qemu/commit/14d88b06c1559dbc9fad3d52b4e10491051e7a79
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/s390x/ipl.c
    M hw/s390x/s390-virtio-ccw.c

  Log Message:
  -----------
  s390: remove bios_name

Cc: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201026143028.3034018-13-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 73949c2cdc733d7f6610d494ee3d5e43019798c9
      
https://github.com/qemu/qemu/commit/73949c2cdc733d7f6610d494ee3d5e43019798c9
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/sh4/shix.c

  Log Message:
  -----------
  sh4: remove bios_name

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201026143028.3034018-14-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9393b5fffc1e4f1f778ede94408ba18b4c227726
      
https://github.com/qemu/qemu/commit/9393b5fffc1e4f1f778ede94408ba18b4c227726
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/sparc/leon3.c
    M hw/sparc/sun4m.c
    M hw/sparc64/sun4u.c

  Log Message:
  -----------
  sparc: remove bios_name

Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201026143028.3034018-15-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3078dc2fc19a25a09c4075b0595bbb961ffbd8af
      
https://github.com/qemu/qemu/commit/3078dc2fc19a25a09c4075b0595bbb961ffbd8af
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/arm/digic_boards.c

  Log Message:
  -----------
  digic: remove bios_name

Pull defaults to digic4_board_init so that a MachineState is available.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d26bf2067aa0ed786a3f8d9ec4283911f29d79bb
      
https://github.com/qemu/qemu/commit/d26bf2067aa0ed786a3f8d9ec4283911f29d79bb
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/sysemu/sysemu.h
    M softmmu/vl.c

  Log Message:
  -----------
  vl: remove bios_name

bios_name was a legacy variable used by machine code, but it is
no more.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201026143028.3034018-16-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3222fe38837628be937614751cab088f92b69713
      
https://github.com/qemu/qemu/commit/3222fe38837628be937614751cab088f92b69713
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/arm/aspeed.c
    M hw/display/pxa2xx_lcd.c
    M target/arm/arm-semi.c

  Log Message:
  -----------
  arm: do not use ram_size global

Use the machine properties instead.

Cc: qemu-ppc@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8844197e1dfe1e25526b5f9ceacd8d98d26a553d
      
https://github.com/qemu/qemu/commit/8844197e1dfe1e25526b5f9ceacd8d98d26a553d
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/cris/axis_dev88.c
    M hw/cris/boot.c
    M hw/cris/boot.h

  Log Message:
  -----------
  cris: do not use ram_size global

Use the machine properties instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7d9b0143088809764d83637870977fb936b42dd5
      
https://github.com/qemu/qemu/commit/7d9b0143088809764d83637870977fb936b42dd5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/hppa/machine.c

  Log Message:
  -----------
  hppa: do not use ram_size global

Use the machine properties instead.

Cc: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 04686bde19eb2ed0a095cd8561c9c9ac892a2267
      
https://github.com/qemu/qemu/commit/04686bde19eb2ed0a095cd8561c9c9ac892a2267
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/i386/fw_cfg.c
    M hw/i386/vmport.c
    M hw/i386/xen/xen-hvm.c
    M hw/intc/apic_common.c
    M hw/smbios/smbios.c

  Log Message:
  -----------
  i386: do not use ram_size global

Use the loader parameters instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c98b1664b6edd1efc297b073d1e0c78b46a7b0d6
      
https://github.com/qemu/qemu/commit/c98b1664b6edd1efc297b073d1e0c78b46a7b0d6
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/m68k/mcf5206.c
    M hw/m68k/mcf5208.c
    M target/m68k/m68k-semi.c

  Log Message:
  -----------
  m68k: do not use ram_size global

Use the machine properties instead.

Cc: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3d33ce3766dfb91e3a02275af8d7ececc18f7b8f
      
https://github.com/qemu/qemu/commit/3d33ce3766dfb91e3a02275af8d7ececc18f7b8f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/microblaze/boot.c

  Log Message:
  -----------
  microblaze: do not use ram_size global

Use the equivalent argument to the function instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3f7ff389aa3de743313c15c8a3e9c0ca5fa49c87
      
https://github.com/qemu/qemu/commit/3f7ff389aa3de743313c15c8a3e9c0ca5fa49c87
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/mips/fuloong2e.c
    M hw/mips/malta.c

  Log Message:
  -----------
  mips: do not use ram_size global

Use the machine properties or loader parameters instead.

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 19145c83a504bec1ebe44aeca9fee570742ea607
      
https://github.com/qemu/qemu/commit/19145c83a504bec1ebe44aeca9fee570742ea607
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/moxie/moxiesim.c

  Log Message:
  -----------
  moxie: do not use ram_size global

Use the loader parameters instead.

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e86afca7de45937281b28e8a5d15dde833cef1e0
      
https://github.com/qemu/qemu/commit/e86afca7de45937281b28e8a5d15dde833cef1e0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/nios2/boot.c

  Log Message:
  -----------
  nios2: do not use ram_size global

Use the equivalent argument to the function instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5e44a70d10595730612be851292ca7a69aec1ba1
      
https://github.com/qemu/qemu/commit/5e44a70d10595730612be851292ca7a69aec1ba1
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/ppc/prep.c
    M hw/ppc/spapr_vio.c

  Log Message:
  -----------
  ppc: do not use ram_size global

Use the machine properties instead.

Cc: qemu-ppc@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2530392f0ad3bf86b27b48e951cca088d1baba1b
      
https://github.com/qemu/qemu/commit/2530392f0ad3bf86b27b48e951cca088d1baba1b
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/riscv/boot.c

  Log Message:
  -----------
  riscv: do not use ram_size global

Use the machine properties instead.

Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7025aa5dc93c52538603601de19aa8ceaa773e7b
      
https://github.com/qemu/qemu/commit/7025aa5dc93c52538603601de19aa8ceaa773e7b
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/s390x/ipl.c
    M hw/s390x/s390-skeys.c
    M hw/s390x/s390-virtio-ccw.c
    M target/s390x/excp_helper.c
    M target/s390x/mem_helper.c
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x: do not use ram_size global

Use the machine properties instead.

Cc: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 77055fa2db84b1f9e7c70f8f156f031c16b9129f
      
https://github.com/qemu/qemu/commit/77055fa2db84b1f9e7c70f8f156f031c16b9129f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/sparc64/sparc64.c
    M hw/sparc64/sun4u.c

  Log Message:
  -----------
  sparc64: do not use ram_size global

Use the machine properties instead.

Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d2d510ccff47370e1e6c539f58c128d535c4983c
      
https://github.com/qemu/qemu/commit/d2d510ccff47370e1e6c539f58c128d535c4983c
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/core/generic-loader.c
    M hw/core/numa.c
    M hw/virtio/virtio-balloon.c
    M include/exec/cpu-common.h
    M monitor/qmp-cmds.c
    M softmmu/vl.c

  Log Message:
  -----------
  make ram_size local to vl.c

Use the machine properties for the leftovers too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 908d50352d32f1ebf30a8f7732a3f9befb48ee9c
      
https://github.com/qemu/qemu/commit/908d50352d32f1ebf30a8f7732a3f9befb48ee9c
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/char/serial.c

  Log Message:
  -----------
  hw/char/serial: Clean up unnecessary code

Since commit 5ec3a23e6c8 ("serial: convert PIO to new memory
api read/write") we don't need to worry about accesses bigger
than 8-bit. Use the extract()/deposit() functions to access
the correct part of the 16-bit 'divider' register.

Reported-by: Jonathan D. Belanger <jbelanger1@rochester.rr.com>
Buglink: https://bugs.launchpad.net/qemu/+bug/1904331
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201120161933.2514089-1-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 68e6ad25c0723c4d1b992301f634b614d54445bf
      
https://github.com/qemu/qemu/commit/68e6ad25c0723c4d1b992301f634b614d54445bf
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M docs/specs/tpm.rst
    M python/qemu/machine.py
    M qemu-options.hx
    M tests/qtest/bios-tables-test.c
    M tests/qtest/pflash-cfi02-test.c
    M tests/qtest/test-filter-redirector.c
    M tests/qtest/vhost-user-test.c
    M tests/test-char.c

  Log Message:
  -----------
  treewide: do not use short-form boolean options

They are going to be deprecated, avoid warnings on stdout while the
tests run.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ab3f7cc22c296d4542800161b7fe56e090b2d9a4
      
https://github.com/qemu/qemu/commit/ab3f7cc22c296d4542800161b7fe56e090b2d9a4
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/core/machine.c
    M include/hw/boards.h
    M softmmu/vl.c

  Log Message:
  -----------
  vl: extract validation of -smp to machine.c

Once smp_parse is done, the validation operates on the MachineState.
There is no reason for that code to be in vl.c.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d77aa89d6f107e5d1bf375b7f71145ead8500686
      
https://github.com/qemu/qemu/commit/d77aa89d6f107e5d1bf375b7f71145ead8500686
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: remove bogus check

There is no reason to prevent -preconfig -daemonize.  Of course if
no monitor is defined there will be no way to start the VM,
but that is a user error.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f7dd4a749fa7962fc07bc8f4876f77a2ce37d98f
      
https://github.com/qemu/qemu/commit/f7dd4a749fa7962fc07bc8f4876f77a2ce37d98f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: split various early command line options to a separate function

Various options affect the global state of QEMU including the rest of
qemu_init, and they need to be called very early.  Group them together
in a function that is called at the beginning.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 22f378b94693f41d436b517effe1fce869d09e62
      
https://github.com/qemu/qemu/commit/22f378b94693f41d436b517effe1fce869d09e62
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/core/machine.c
    M include/hw/qdev-core.h
    M migration/migration.c
    M softmmu/qdev-monitor.c
    M softmmu/vl.c

  Log Message:
  -----------
  vl: move various initialization routines out of qemu_init

Some very simple initialization routines can be nested in existing
subsystem-level functions, do that to simplify qemu_init.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 4afc8353b0ce1acbc880a683ac74e4a060e46453
      
https://github.com/qemu/qemu/commit/4afc8353b0ce1acbc880a683ac74e4a060e46453
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: extract qemu_init_subsystems

Group a bunch of subsystem initializations that can be done right
after command line parsing.  Remove initializations that can be done
simply as global variable initializers.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b4d7a3c09c3f1929f0a5567b8552137c27a26a8e
      
https://github.com/qemu/qemu/commit/b4d7a3c09c3f1929f0a5567b8552137c27a26a8e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: move prelaunch part of qemu_init to new functions

The final part of qemu_init, starting with the completion of
board init, is already relatively clean.  Split it out of
qemu_init so that qemu_init keeps only the messy parts.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e60d2988efe118a90496a12216f7560efb69a63e
      
https://github.com/qemu/qemu/commit/e60d2988efe118a90496a12216f7560efb69a63e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/core/machine.c
    M softmmu/vl.c

  Log Message:
  -----------
  vl: extract various command line validation snippets to a new function

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5c5261f866212b8b3e5bd4188aa0c4041ac7a08f
      
https://github.com/qemu/qemu/commit/5c5261f866212b8b3e5bd4188aa0c4041ac7a08f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: preconfig and loadvm are mutually exclusive

Just like -incoming.  Later we will add support for "-incoming defer
-preconfig", because there are cases (Xen, block layer) that want
to look at RUNSTATE_INMIGRATE.  -loadvm will remain mutually exclusive
with preconfig; the plan is to just do loadvm in the monitor, since
the user is already going to interact with it for preconfiguration.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c1762dea8a52246e15643aae160bb879a4e26015
      
https://github.com/qemu/qemu/commit/c1762dea8a52246e15643aae160bb879a4e26015
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: extract various command line desugaring snippets to a new function

Keep the machine initialization sequence free of miscellaneous command
line parsing actions.

The only difference is that preallocation will always be done with one
thread if -smp is not provided; previously it was using mc->default_cpus,
which is almost always 1 anyway.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5ee41c300d7abfd22559499d790289c8e3bd2b56
      
https://github.com/qemu/qemu/commit/5ee41c300d7abfd22559499d790289c8e3bd2b56
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/qemu/option.h
    M softmmu/vl.c
    M tests/test-qemu-opts.c
    M util/qemu-option.c

  Log Message:
  -----------
  qemu-option: restrict qemu_opts_set to merge-lists QemuOpts

qemu_opts_set is used to create default network backends and to
parse sugar options -kernel, -initrd, -append, -bios and -dtb.
These are very different uses:

I would *expect* a function named qemu_opts_set to set an option in a
merge-lists QemuOptsList, such as -kernel, and possibly to set an option
in a non-merge-lists QemuOptsList with non-NULL id, similar to -set.

However, it wouldn't *work* to use qemu_opts_set for the latter
because qemu_opts_set uses fail_if_exists==1. So, for non-merge-lists
QemuOptsList and non-NULL id, the semantics of qemu_opts_set (fail if the
(QemuOptsList, id) pair already exists) are debatable.

On the other hand, I would not expect qemu_opts_set to create a
non-merge-lists QemuOpts with a single option; which it does, though.
For this case of non-merge-lists QemuOptsList and NULL id, qemu_opts_set
hardly adds value over qemu_opts_parse.  It does skip some parsing and
unescaping, but that's not needed when creating default network
backends.

So qemu_opts_set has warty behavior for non-merge-lists QemuOptsList
if id is non-NULL, and it's mostly pointless if id is NULL.  My
solution to keeping the API as simple as possible is to limit
qemu_opts_set to merge-lists QemuOptsList.  For them, it's useful (we
don't want comma-unescaping for -kernel) *and* has sane semantics.
Network backend creation is switched to qemu_opts_parse.

qemu_opts_set is now only used on merge-lists QemuOptsList... except
in the testcase, which is changed to use a merge-list QemuOptsList.

With this change we can also remove the id parameter.  With the
parameter always NULL, we know that qemu_opts_create cannot fail
and can pass &error_abort to it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7e7687ad12ef92f0667c614f8960faf46c57e5c0
      
https://github.com/qemu/qemu/commit/7e7687ad12ef92f0667c614f8960faf46c57e5c0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: create "-net nic -net user" default earlier

Create it together with other default backends, even though the processing is
done later.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: db62875ddbcf47fb6e02ec6747d112578530a97e
      
https://github.com/qemu/qemu/commit/db62875ddbcf47fb6e02ec6747d112578530a97e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: load plugins as late as possible

There is no need to load plugins in the middle of default device processing,
move -plugin handling just before preconfig is entered.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f70717092d2e2044ce61797a6f3053a01d78061a
      
https://github.com/qemu/qemu/commit/f70717092d2e2044ce61797a6f3053a01d78061a
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: extract default devices to separate functions

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a52199a41254a52c1345583ed7ff771160f6eaae
      
https://github.com/qemu/qemu/commit/a52199a41254a52c1345583ed7ff771160f6eaae
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/core/machine.c
    M softmmu/vl.c

  Log Message:
  -----------
  vl: move CHECKPOINT_INIT after preconfig

Move CHECKPOINT_INIT right before the machine initialization is
completed.  Everything before is essentially an extension of
command line parsing.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 91a9241756c58e62e952d3316fec6205b7cb8fa5
      
https://github.com/qemu/qemu/commit/91a9241756c58e62e952d3316fec6205b7cb8fa5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: separate qemu_create_early_backends

"Early" backends are created before the machine and can be used as
machine options.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ede84424732ab5e8d2f39b16a4828e11aede01ff
      
https://github.com/qemu/qemu/commit/ede84424732ab5e8d2f39b16a4828e11aede01ff
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: separate qemu_create_late_backends

"Late" backends are created after the machine.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b5c20dcf3408b81a84f1d1463ad75647c017195c
      
https://github.com/qemu/qemu/commit/b5c20dcf3408b81a84f1d1463ad75647c017195c
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: separate qemu_create_machine

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 272f29798f40464560aec10e5b0a3bfef3e6a842
      
https://github.com/qemu/qemu/commit/272f29798f40464560aec10e5b0a3bfef3e6a842
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: separate qemu_apply_machine_options

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2706177a25cc2f6db3cdaa5436af3986f49f8ab4
      
https://github.com/qemu/qemu/commit/2706177a25cc2f6db3cdaa5436af3986f49f8ab4
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: separate qemu_resolve_machine_memdev

This is a bit nasty: the machine is storing a string and later
resolving it.  We probably want to remove the memdev property
and instead make this a memory-set command.  "-M memdev" can be
handled a legacy option that is special cased by
machine_set_property.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 740f3998fd949f5c398a262373c8efc653918ffe
      
https://github.com/qemu/qemu/commit/740f3998fd949f5c398a262373c8efc653918ffe
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: initialize displays before preconfig loop

Displays should be available before the monitor starts, so that
it is possible to use the graphical console to interact with
the monitor itself.

This patch is quite ugly, but all this is temporary.  The double
call to qemu_init_displays will go away as soon we can unify machine
initialization between the preconfig and "normal" flows, and so will
the preconfig_exit_requested variable (that is only preconfig_requested
remains).

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9519549653d468d439f3bc4b4d5b4565af0c3374
      
https://github.com/qemu/qemu/commit/9519549653d468d439f3bc4b4d5b4565af0c3374
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: move -global check earlier

The check has the same effect here, it only matters that it is performed
once all devices, both builtin and user-specified, have been created.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e8d0a466e77df01437cbb7fc80c9351693e34066
      
https://github.com/qemu/qemu/commit/e8d0a466e77df01437cbb7fc80c9351693e34066
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/migration/misc.h
    M migration/migration.c
    M softmmu/vl.c

  Log Message:
  -----------
  migration, vl: start migration via qmp_migrate_incoming

Make qemu_start_incoming_migration local to migration/migration.c.
By using the runstate instead of a separate flag, vl need not do
anything to setup deferred incoming migration.

qmp_migrate_incoming also does not need the deferred_incoming flag
anymore, because "-incoming PROTOCOL" will clear the "once" flag
before the main loop starts.  Therefore, later invocations of
the migrate-incoming command will fail with the existing
"The incoming migration has already been started" error message.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 0255f20e53cc93dde6f422ed00473c9ec2a94866
      
https://github.com/qemu/qemu/commit/0255f20e53cc93dde6f422ed00473c9ec2a94866
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: start VM via qmp_cont

Complement the previous patch by starting the VM with a QMP command.
The plan is that the user will be able to do the same, invoking two
commands "finish-machine-init" and "cont" instead of
"x-exit-preconfig".

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f6b6bcca8345fa94ed464302d715b755b892c4c0
      
https://github.com/qemu/qemu/commit/f6b6bcca8345fa94ed464302d715b755b892c4c0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M monitor/hmp.c

  Log Message:
  -----------
  hmp: introduce cmd_available

Combine the RUN_STATE_PRECONFIG and cmd_can_preconfig checks
into a single function, to avoid repeating the same expression
(or its negation after applying DeMorgan's rule) over and
over again.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1da6b72e2511581fa2e0c7e92e1e8015f709dfc5
      
https://github.com/qemu/qemu/commit/1da6b72e2511581fa2e0c7e92e1e8015f709dfc5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/alpha/dp264.c
    M hw/arm/boot.c
    M hw/arm/digic_boards.c
    M hw/arm/highbank.c
    M hw/arm/npcm7xx_boards.c
    M hw/arm/sbsa-ref.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/avr/boot.c
    M hw/core/loader.c
    M hw/display/cg3.c
    M hw/display/tcx.c
    M hw/hppa/machine.c
    M hw/i386/x86.c
    M hw/lm32/milkymist.c
    M hw/m68k/mcf5208.c
    M hw/m68k/q800.c
    M hw/microblaze/boot.c
    M hw/mips/fuloong2e.c
    M hw/mips/jazz.c
    M hw/mips/malta.c
    M hw/mips/mipssim.c
    M hw/nios2/boot.c
    M hw/nvram/fw_cfg.c
    M hw/pci-host/prep.c
    M hw/pci/pci.c
    M hw/ppc/e500.c
    M hw/ppc/mac_newworld.c
    M hw/ppc/mac_oldworld.c
    M hw/ppc/pnv.c
    M hw/ppc/ppc405_boards.c
    M hw/ppc/ppc440_bamboo.c
    M hw/ppc/sam460ex.c
    M hw/ppc/spapr.c
    M hw/ppc/virtex_ml507.c
    M hw/riscv/boot.c
    M hw/s390x/ipl.c
    M hw/sparc/leon3.c
    M hw/sparc/sun4m.c
    M hw/sparc64/sun4u.c
    M include/qemu-common.h
    A include/qemu/datadir.h
    M include/sysemu/sysemu.h
    A softmmu/datadir.c
    M softmmu/meson.build
    M softmmu/vl.c
    M tests/qtest/fuzz/fuzz.c
    M ui/keymaps.c

  Log Message:
  -----------
  vl: extract softmmu/datadir.c

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d840c0737ebf0212b7525a501e56a4a2b6cc7575
      
https://github.com/qemu/qemu/commit/d840c0737ebf0212b7525a501e56a4a2b6cc7575
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/core/machine.c
    M include/sysemu/sysemu.h
    M softmmu/vl.c

  Log Message:
  -----------
  vl: extract machine done notifiers

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 49aaa1a47046c42bc77624b4e17e297c7366d9d8
      
https://github.com/qemu/qemu/commit/49aaa1a47046c42bc77624b4e17e297c7366d9d8
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/sysemu/sysemu.h
    M softmmu/meson.build
    A softmmu/rtc.c
    M softmmu/vl.c

  Log Message:
  -----------
  vl: extract softmmu/rtc.c

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b6ab17ecdebecf54b13a17cf250cb68eca6b4a99
      
https://github.com/qemu/qemu/commit/b6ab17ecdebecf54b13a17cf250cb68eca6b4a99
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M hw/ppc/spapr.c
    M include/sysemu/sysemu.h
    M softmmu/vl.c

  Log Message:
  -----------
  vl: remove serial_max_hds

serial_hd(i) is NULL if and only if i >= serial_max_hds().  Test
serial_hd(i) instead of bounding the loop at serial_max_hds(),
thus removing one more function that vl.c is expected to export.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f02a5ffe65b93120c552b164b7899d8cdb8246bb
      
https://github.com/qemu/qemu/commit/f02a5ffe65b93120c552b164b7899d8cdb8246bb
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/hw/boards.h
    M softmmu/vl.c

  Log Message:
  -----------
  vl: clean up -boot variables

Move more of them into MachineState, in preparation for moving initialization
of the machine out of vl.c.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: dd65f125816100429aac48bdaec73dc38abb4361
      
https://github.com/qemu/qemu/commit/dd65f125816100429aac48bdaec73dc38abb4361
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M include/qemu/config-file.h
    M softmmu/vl.c
    M util/qemu-config.c

  Log Message:
  -----------
  config-file: move -set implementation to vl.c

We want to make it independent of QemuOpts.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 467aa614ea098504b9a54581926ce1abe147954d
      
https://github.com/qemu/qemu/commit/467aa614ea098504b9a54581926ce1abe147954d
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M docs/sphinx/kerneldoc.py

  Log Message:
  -----------
  docs: temporarily disable the kernel-doc extension

Preserve bisectability while we update scripts/kernel-doc from Linux.
Without this patch, building with Sphinx 3 would break while we
revert our own Sphinx 3 support and replace it with Linux's.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 40d4e886cc090210658dccf5b5366faae07eeeb8
      
https://github.com/qemu/qemu/commit/40d4e886cc090210658dccf5b5366faae07eeeb8
  Author: André Almeida <andrealmeid@collabora.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  kernel-doc: fix processing nested structs with attributes

The current regular expression for strip attributes of structs (and
for nested ones as well) also removes all whitespaces that may
surround the attribute. After that, the code will split structs and
iterate for each symbol separated by comma at the end of struct
definition (e.g. "} alias1, alias2;"). However, if the nested struct
does not have any alias and has an attribute, it will result in a
empty string at the closing bracket (e.g "};"). This will make the
split return nothing and $newmember will keep uninitialized. Fix
that, by ensuring that the attribute substitution will leave at least
one whitespace.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-2-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b86c31753efa639dea6e8cf5c1d73ecca3f98d47
      
https://github.com/qemu/qemu/commit/b86c31753efa639dea6e8cf5c1d73ecca3f98d47
  Author: André Almeida <andrealmeid@collabora.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  kernel-doc: add support for ____cacheline_aligned_in_smp attribute

Subroutine dump_struct uses type attributes to check if the struct
syntax is valid. Then, it removes all attributes before using it for
output. `____cacheline_aligned_in_smp` is an attribute that is
not included in both steps. Add it, since it is used by kernel structs.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-3-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 178049b53258412a0978014941654e8817651d6b
      
https://github.com/qemu/qemu/commit/178049b53258412a0978014941654e8817651d6b
  Author: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts/kernel-doc: Add support for named variable macro arguments

Currently, when kernel-doc encounters a macro with a named variable
argument[1], such as this:

   #define hlist_for_each_entry_rcu(pos, head, member, cond...)

... it expects the variable argument to be documented as `cond...`,
rather than `cond`. This is semantically wrong, because the name (as
used in the macro body) is actually `cond`.

With this patch, kernel-doc will accept the name without dots (`cond`
in the example above) in doc comments, and warn if the name with dots
(`cond...`) is used and verbose mode[2] is enabled.

The support for the `cond...` syntax can be removed later, when the
documentation of all such macros has been switched to the new syntax.

Testing this patch on top of v5.4-rc6, `make htmldocs` shows a few
changes in log output and HTML output:

 1) The following warnings[3] are eliminated:

   ./include/linux/rculist.h:374: warning:
        Excess function parameter 'cond' description in 
'list_for_each_entry_rcu'
   ./include/linux/rculist.h:651: warning:
        Excess function parameter 'cond' description in 
'hlist_for_each_entry_rcu'

 2) For list_for_each_entry_rcu and hlist_for_each_entry_rcu, the
    correct description is shown

 3) Named variable arguments are shown without dots

[1]: https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
[2]: scripts/kernel-doc -v
[3]: See also 
https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?h=dev&id=5bc4bc0d6153617eabde275285b7b5a8137fdf3c

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-4-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5b738ef26974f5283ab13622e3c95328dca751da
      
https://github.com/qemu/qemu/commit/5b738ef26974f5283ab13622e3c95328dca751da
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: proper handle @foo->bar()

The pattern @foo->bar() is valid, as it can be used by a
function pointer inside a struct passed as a parameter.

Right now, it causes a warning:

        ./drivers/firewire/core-transaction.c:606: WARNING: Inline strong 
start-string without end-string.

In this specific case, the kernel-doc markup is:

        /**
         * fw_core_remove_address_handler() - unregister an address handler
         * @handler: callback
         *
         * To be called in process context.
         *
         * When fw_core_remove_address_handler() returns, @handler->callback() 
is
         * guaranteed to not run on any CPU anymore.
         */

With seems valid on my eyes. So, instead of trying to hack
the kernel-doc markup, let's teach it about how to handle
such things. This should likely remove lots of other similar
warnings as well.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/48b46426d7bf6ff7529f20e5718fbf4e9758e62c.1586881715.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-5-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8624508029b0015d3bf739a326ff88d6a34589db
      
https://github.com/qemu/qemu/commit/8624508029b0015d3bf739a326ff88d6a34589db
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: accept negation like !@var

On a few places, it sometimes need to indicate a negation of a
parameter, like:

        !@fshared

This pattern happens, for example, at:

        kernel/futex.c

and it is perfectly valid. However, kernel-doc currently
transforms it into:

        !**fshared**

This won't do what it would be expected.

Fortunately, fixing the script is a simple matter of storing
the "!" before "@" and adding it after the bold markup, like:

        **!fshared**

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/0314b47f8c3e1f9db00d5375a73dc3cddd8a21f2.1586881715.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-6-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ca4524ec61929cdafd9aae761c7d6d31129cc89e
      
https://github.com/qemu/qemu/commit/ca4524ec61929cdafd9aae761c7d6d31129cc89e
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: accept blank lines on parameter description

Sphinx is very pedantic with respect to blank lines. Sometimes,
in order to make it to properly handle something, we need to
add a blank line. However, currently, any blank line inside a
kernel-doc comment like:

        /*
         * @foo: bar
         *
         *       foobar
         *
         * some description

will be considered as if "foobar" was part of the description.

This patch changes kernel-doc behavior. After it, foobar will
be considered as part of the parameter text. The description
will only be considered as such if it starts with:

zero spaces after asterisk:

        *foo

one space after asterisk:
        * foo

or have a explicit Description section:

        *   Description:

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/c07d2862792d75a2691d69c9eceb7b89a0164cc0.1586881715.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-7-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3e458416ff3a31665ff6072684f964027697ad00
      
https://github.com/qemu/qemu/commit/3e458416ff3a31665ff6072684f964027697ad00
  Author: Alexander A. Klimov <grandmaster@al2klimov.de>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  Replace HTTP links with HTTPS ones: documentation

Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  For each line:
    If doesn't contain `\bxmlns\b`:
      For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
        If both the HTTP and HTTPS versions
        return 200 OK and serve the same content:
          Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200526060544.25127-1-grandmaster@al2klimov.de
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-8-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 12a98760f8ddc43b8a45f5442ec841fac506a25f
      
https://github.com/qemu/qemu/commit/12a98760f8ddc43b8a45f5442ec841fac506a25f
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts/kernel-doc: parse __ETHTOOL_DECLARE_LINK_MODE_MASK

The __ETHTOOL_DECLARE_LINK_MODE_MASK macro is a variant of
DECLARE_BITMAP(), used by phylink.h. As we have already a
parser for DECLARE_BITMAP(), let's add one for this macro,
in order to avoid such warnings:

        ./include/linux/phylink.h:54: warning: Function parameter or member 
'__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 
'phylink_link_state'
        ./include/linux/phylink.h:54: warning: Function parameter or member 
'__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 
'phylink_link_state'

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/d1d1dea67a28117c0b0c33271b139c4455fef287.1592895969.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-9-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 29a1b88f4ce17f7691c6f9c85b38a54d2abb6cf6
      
https://github.com/qemu/qemu/commit/29a1b88f4ce17f7691c6f9c85b38a54d2abb6cf6
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts/kernel-doc: handle function pointer prototypes

There are some function pointer prototypes inside the net
includes, like this one:

        int (*pcs_config)(struct phylink_config *config, unsigned int mode,
                          phy_interface_t interface, const unsigned long 
*advertising);

There's nothing wrong using it with kernel-doc, but we need to
add a rule for it to parse such kind of prototype.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/fec520dd731a273013ae06b7653a19c7d15b9562.1592895969.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-10-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1b51d7b3cf835ba7af0e1e221fcda62d6c30f57a
      
https://github.com/qemu/qemu/commit/1b51d7b3cf835ba7af0e1e221fcda62d6c30f57a
  Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts/kernel-doc: optionally treat warnings as errors

The kbuild bot recently added the W=1 option, which triggered
documentation cleanups to squelch hundreds of kernel-doc warnings.

To make sure new kernel contributions don't add regressions to
kernel-doc descriptors, this patch suggests an option to treat
warnings as errors in CI/automated tests.

A -Werror command-line option is added to the kernel-doc script. When
this option is set, the script will return the number of warnings
found. The caller can then treat this positive return value as an
error and stop the build.

Using this command line option is however not straightforward when the
kernel-doc script is called from other scripts. To align with typical
kernel compilation or documentation generation, the Werror option is
also set by checking the KCFLAGS environment variable, or if
KDOC_WERROR is defined, as in the following examples:

KCFLAGS="-Wall -Werror" make W=1 sound/
KCFLAGS="-Wall -Werror" make W=1 drivers/soundwire/
KDOC_WERROR=1 make htmldocs

Note that in the last example the documentation build does not stop,
only an additional log is provided.

Credits to Randy Dunlap for suggesting the use of environment variables.

Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: 
https://lore.kernel.org/r/20200728162040.92467-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-11-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 66b888ad29f6c645f857f3de8822698cc896841d
      
https://github.com/qemu/qemu/commit/66b888ad29f6c645f857f3de8822698cc896841d
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  kernel-doc: include line numbers for function prototypes

This should solve bad error reports like this one:

        ./include/linux/iio/iio.h:0: WARNING: Unknown target name: "devm".

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/56eed0ba50cd726236acd12b11b55ce54854c5ea.1599660067.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-12-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c8e35c16a96edfab0d235347728328fe2a8b7c30
      
https://github.com/qemu/qemu/commit/c8e35c16a96edfab0d235347728328fe2a8b7c30
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  kernel-doc: add support for ____cacheline_aligned attribute

Subroutine dump_struct uses type attributes to check if the struct
syntax is valid. Then, it removes all attributes before using it for
output. `____cacheline_aligned` is an attribute that is
not included in both steps. Add it, since it is used by kernel structs.

Based on previous patch to add ____cacheline_aligned_in_smp.
Motivated by patches to reorder this attribute to before the
variable name.   Whilst we could do that in all cases, that would
be a massive change and it is more common in the kernel to place
this particular attribute after the variable name. A quick grep
suggests approximately 400 instances of which 341 have this
attribute just before a semicolon and hence after the variable name.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200910185415.653139-1-jic23@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-13-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 185dc3b6541355a4de857712f5045a6db441d36d
      
https://github.com/qemu/qemu/commit/185dc3b6541355a4de857712f5045a6db441d36d
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: add support for typedef enum

The PHY kernel-doc markup has gained support for documenting
a typedef enum.

However, right now the parser was not prepared for it.

So, add support for parsing it.

Fixes: 4069a572d423 ("net: phy: Document core PHY structures")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-14-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 900f8a83adc3f56efd9be3ec80ae6ae454b15aeb
      
https://github.com/qemu/qemu/commit/900f8a83adc3f56efd9be3ec80ae6ae454b15aeb
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments"

This reverts commit 92bb29f9b2c3d4a98eef5f0db935d4be291eec72.
We will replace the commit with the fix from Linux.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-15-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 00d13a8c6ebd392334c9c18d3d11af860d2f7173
      
https://github.com/qemu/qemu/commit/00d13a8c6ebd392334c9c18d3d11af860d2f7173
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M docs/sphinx/kerneldoc.py
    M scripts/kernel-doc

  Log Message:
  -----------
  Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later"

This reverts commit 152d1967f650f67b7ece3a5dda77d48069d72647.
We will replace the commit with the fix from Linux.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-16-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b6361270f30d205ccc7cf5d297ce062bf8248146
      
https://github.com/qemu/qemu/commit/b6361270f30d205ccc7cf5d297ce062bf8248146
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: make it more compatible with Sphinx 3.x

With Sphinx 3.x, the ".. c:type:" tag was changed to accept either:

        .. c:type:: typedef-like declaration
        .. c:type:: name

Using it for other types (including functions) don't work anymore.

So, there are newer tags for macro, enum, struct, union, and others,
which doesn't exist on older versions.

Add a check for the Sphinx version and change the produced tags
accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-17-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 01ec86ff9c27d00f697685271f91b82a099a7656
      
https://github.com/qemu/qemu/commit/01ec86ff9c27d00f697685271f91b82a099a7656
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x

Unfortunately, Sphinx 3.x parser for c functions is too pedantic:

        https://github.com/sphinx-doc/sphinx/issues/8241

While it could be relaxed with some configurations, there are
several corner cases that it would make it hard to maintain,
and will require teaching conf.py about several macros.

So, let's instead use the :c:macro notation. This will
produce an output that it is not as nice as currently, but it
should still be acceptable, and will provide cross-references,
removing thousands of warnings when building with newer
versions of Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-18-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6c5fb86bb10103d4a3cd1f81a67b377fe9bdea32
      
https://github.com/qemu/qemu/commit/6c5fb86bb10103d4a3cd1f81a67b377fe9bdea32
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: fix troubles with line counts

There's currently a bug with the way kernel-doc script
counts line numbers that can be seen with:

        $ ./scripts/kernel-doc -rst  -enable-lineno include/linux/math64.h >all 
&& ./scripts/kernel-doc -rst -internal -enable-lineno include/linux/math64.h 
>int && diff -U0 int all

        --- int 2020-09-28 12:58:08.927486808 +0200
        +++ all 2020-09-28 12:58:08.905486845 +0200
        @@ -1 +1 @@
        -#define LINENO 27
        +#define LINENO 26
        @@ -3 +3 @@
        -#define LINENO 16
        +#define LINENO 15
        @@ -9 +9 @@
        -#define LINENO 17
        +#define LINENO 16
        ...

This is happening with perl version 5.30.3, but I'm not
so sure if this is a perl bug, or if this is due to something
else.

In any case, fixing it is easy. Basically, when "-internal"
parameter is used, the process_export_file() function opens the
handle "IN". This makes the line number to be incremented, as the
handler for the main open is also "IN".

Fix the problem by using a different handler for the
main open().

While here, add a missing close for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-19-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e84b3bfaf411dffc3857e78726e1954b42c77bae
      
https://github.com/qemu/qemu/commit/e84b3bfaf411dffc3857e78726e1954b42c77bae
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: reimplement -nofunction argument

Right now, the build system doesn't use -nofunction, as
it is pretty much useless, because it doesn't consider
the other output modes (extern, internal), working only
with all.

Also, it is limited to exclude functions.

Re-implement it in order to allow excluding any symbols from
the document output, no matter what mode is used.

The parameter was also renamed to "-nosymbol", as it express
better its meaning.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-20-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 171a0f3b190c7842a38ee2a4f4b7a93f2312752d
      
https://github.com/qemu/qemu/commit/171a0f3b190c7842a38ee2a4f4b7a93f2312752d
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: fix typedef identification

Some typedef expressions are output as normal functions.

As we need to be clearer about the type with Sphinx 3.x,
detect such cases.

While here, fix a wrongly-indented block.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-21-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d0b0b4aa5a1ba5c363945724e1f7ae835fb8867d
      
https://github.com/qemu/qemu/commit/d0b0b4aa5a1ba5c363945724e1f7ae835fb8867d
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: don't mangle with parameter list

While kernel-doc needs to parse parameters in order to
identify its name, it shouldn't be touching the type,
as parsing it is very difficult, and errors happen.

One current error is when parsing this parameter:

        const u32 (*tab)[256]

Found at ./lib/crc32.c, on this function:

        u32 __pure crc32_be_generic (u32 crc, unsigned char const *p, size_t 
len, const u32 (*tab)[256], u32 polynomial);

The current logic mangles it, producing this output:

        const u32 ( *tab

That's something that it is not recognizeable.

So, instead, let's push the argument as-is, and use it
when printing the function prototype and when describing
each argument.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-22-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a01923b411a1f20cc11d99b26b09fe7c990b53a6
      
https://github.com/qemu/qemu/commit/a01923b411a1f20cc11d99b26b09fe7c990b53a6
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M docs/sphinx/kerneldoc.py
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: allow passing desired Sphinx C domain dialect

When kernel-doc is called via kerneldoc.py, there's no need to
auto-detect the Sphinx version, as the Sphinx module already
knows it. So, add an optional parameter to allow changing the
Sphinx dialect.

As kernel-doc can also be manually called, keep the auto-detection
logic if the parameter was not specified. On such case, emit
a warning if sphinx-build can't be found at PATH.

I ended using a suggestion from Joe for using a more readable
regex, instead of using a complex one with a hidden group like:

        m/^(\d+)\.(\d+)(?:\.?(\d+)?)/

in order to get the optional <patch> argument.

Thanks-to: Joe Perches <joe@perches.com>
Suggested-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-23-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 26ae0dea1602f32576b590ab1628dbb0654fbb26
      
https://github.com/qemu/qemu/commit/26ae0dea1602f32576b590ab1628dbb0654fbb26
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: fix line number handling

Address several issues related to pointing to the wrong line
number:

1) ensure that line numbers will always be initialized

   When section is the default (Description), the line number
   is not initializing, producing this:

        $ ./scripts/kernel-doc --enable-lineno 
./drivers/media/v4l2-core/v4l2-mem2mem.c|less

        **Description**

        #define LINENO 0
        In case of streamoff or release called on any context,
        1] If the context is currently running, then abort job will be called
        2] If the context is queued, then the context will be removed from
           the job_queue

  Which is not right. Ensure that the line number will always
  be there. After applied, the result now points to the right location:

        **Description**

        #define LINENO 410
        In case of streamoff or release called on any context,
        1] If the context is currently running, then abort job will be called
        2] If the context is queued, then the context will be removed from
           the job_queue

2) The line numbers for function prototypes are always + 1,
   because it is taken at the line after handling the prototype.
   Change the logic to point to the next line after the /** */
   block;

3) The "DOC:" line number should point to the same line as this
   markup is found, and not to the next one.

Probably part of the issues were due to a but that was causing
the line number offset to be incremented by one, if --export
were used.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-24-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d561a6c72850f79ad5a196162a9f80984e3d3f1d
      
https://github.com/qemu/qemu/commit/d561a6c72850f79ad5a196162a9f80984e3d3f1d
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: try to use c:function if possible

There are a few namespace clashes by using c:macro everywhere:

basically, when using it, we can't have something like:

        .. c:struct:: pwm_capture

        .. c:macro:: pwm_capture

So, we need to use, instead:

        .. c:function:: int pwm_capture (struct pwm_device * pwm, struct 
pwm_capture * result, unsigned long timeout)

for the function declaration.

The kernel-doc change was proposed by Jakob Lykke Andersen here:

        
https://github.com/jakobandersen/linux_docs/commit/6fd2076ec001cca7466857493cd678df4dfe4a65

Although I did a different implementation.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-25-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9deaa5a3d57f1bafb3497098ef700cedce719d95
      
https://github.com/qemu/qemu/commit/9deaa5a3d57f1bafb3497098ef700cedce719d95
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  Revert "kernel-doc: Handle function typedefs without asterisks"

This reverts commit 3cd3c5193cde5242e243c25759f85802e267994f.
We will replace the commit with the fix from Linux.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-26-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b7b4922c370df84e11dc890538cbec0e0e0a3f94
      
https://github.com/qemu/qemu/commit/b7b4922c370df84e11dc890538cbec0e0e0a3f94
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  Revert "kernel-doc: Handle function typedefs that return pointers"

This reverts commit 19ab6044be0c55d529e875e3ee16fdd5c3b54d33.
We will replace the commit with the fix from Linux.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-27-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7c39a8efbd950372fd6403749b5cac413ac783e9
      
https://github.com/qemu/qemu/commit/7c39a8efbd950372fd6403749b5cac413ac783e9
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: fix typedef parsing

The include/linux/genalloc.h file defined this typedef:

        typedef unsigned long (*genpool_algo_t)(unsigned long *map,unsigned 
long size,unsigned long start,unsigned int nr,void *data, struct gen_pool 
*pool, unsigned long start_addr);

Because it has a type composite of two words (unsigned long),
the parser gets the typedef name wrong:

.. c:macro:: long

   **Typedef**: Allocation callback function type definition

Fix the regex in order to accept composite types when
defining a typedef for a function pointer.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/328e8018041cc44f7a1684e57f8d111230761c4f.1603792384.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-28-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 0216489bf4dc6ca1129816f0a6448fac69ec94a1
      
https://github.com/qemu/qemu/commit/0216489bf4dc6ca1129816f0a6448fac69ec94a1
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: split typedef complex regex

The typedef regex for function prototypes are very complex.
Split them into 3 separate regex and then join them using
qr.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/3a4af999a0d62d4ab9dfae1cdefdfcad93383356.1603792384.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-29-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 50e472410536150c6e9a31b8472ec586c15abfbb
      
https://github.com/qemu/qemu/commit/50e472410536150c6e9a31b8472ec586c15abfbb
  Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: use :c:union when needed

Sphinx C domain code after 3.2.1 will start complaning if :c:struct
would be used for an union type:

        .../Documentation/gpu/drm-kms-helpers:352: ../drivers/video/hdmi.c:851: 
WARNING: C 'identifier' cross-reference uses wrong tag: reference name is 
'union hdmi_infoframe' but found name is 'struct hdmi_infoframe'. Full 
reference name is 'union hdmi_infoframe'. Full found name is 'struct 
hdmi_infoframe'.

So, let's address this issue too in advance, in order to
avoid future issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: 
https://lore.kernel.org/r/6e4ec3eec914df62389a299797a3880ae4490f35.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-30-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 51c30992c8d8ae257c4f2b5321871dfa66f285a0
      
https://github.com/qemu/qemu/commit/51c30992c8d8ae257c4f2b5321871dfa66f285a0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M docs/sphinx/kerneldoc.py

  Log Message:
  -----------
  Revert "docs: temporarily disable the kernel-doc extension"

This reverts commit fd68a72875cf318f4310726f842139119c5f45d5.  We're
done with the update of kernel-doc and we can restore kernel-doc's
functionality.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3e2a7a449bd4ebf90550ca51d57bc17227f19013
      
https://github.com/qemu/qemu/commit/3e2a7a449bd4ebf90550ca51d57bc17227f19013
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  scripts: kernel-doc: remove unnecesssary change wrt Linux

A comment in kernel-doc mentions QEMU's qatomic_set macro, but since
this code originated in Linux we should just revert it and stay as close
to the kernel's copy of the script as possible.

The change was introduced (more or less unintentionally) in QEMU commit
commit d73415a31547, which did a global search-and-replace of QEMU's
atomic access macros.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 13978db7690b3f184e27573fae7ee79ce23e8d36
      
https://github.com/qemu/qemu/commit/13978db7690b3f184e27573fae7ee79ce23e8d36
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-12-09 (Wed, 09 Dec 2020)

  Changed paths:
    M MAINTAINERS
    M docs/devel/loads-stores.rst
    M docs/specs/tpm.rst
    M docs/sphinx/kerneldoc.py
    M hw/alpha/dp264.c
    M hw/arm/aspeed.c
    M hw/arm/boot.c
    M hw/arm/cubieboard.c
    M hw/arm/digic_boards.c
    M hw/arm/highbank.c
    M hw/arm/npcm7xx_boards.c
    M hw/arm/orangepi.c
    M hw/arm/sbsa-ref.c
    M hw/arm/spitz.c
    M hw/arm/stellaris.c
    M hw/arm/tosa.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/arm/z2.c
    M hw/avr/boot.c
    M hw/block/m25p80.c
    M hw/char/serial.c
    M hw/core/generic-loader.c
    M hw/core/loader.c
    M hw/core/machine.c
    M hw/core/numa.c
    M hw/core/stream.c
    M hw/cris/axis_dev88.c
    M hw/cris/boot.c
    M hw/cris/boot.h
    M hw/display/ads7846.c
    M hw/display/cg3.c
    M hw/display/pxa2xx_lcd.c
    M hw/display/ssd0323.c
    M hw/display/tcx.c
    M hw/dma/xilinx_axidma.c
    M hw/hppa/machine.c
    M hw/i386/fw_cfg.c
    M hw/i386/kvm/apic.c
    M hw/i386/microvm.c
    M hw/i386/pc.c
    M hw/i386/pc_sysfw.c
    M hw/i386/vmport.c
    M hw/i386/x86.c
    M hw/i386/xen/xen-hvm.c
    M hw/intc/apic_common.c
    M hw/lm32/milkymist.c
    M hw/m68k/mcf5206.c
    M hw/m68k/mcf5208.c
    M hw/m68k/next-cube.c
    M hw/m68k/q800.c
    M hw/microblaze/boot.c
    M hw/mips/fuloong2e.c
    M hw/mips/jazz.c
    M hw/mips/malta.c
    M hw/mips/mipssim.c
    M hw/misc/max111x.c
    M hw/moxie/moxiesim.c
    M hw/net/xilinx_axienet.c
    M hw/nios2/boot.c
    M hw/nvram/fw_cfg.c
    M hw/pci-host/prep.c
    M hw/pci/pci.c
    M hw/ppc/e500.c
    M hw/ppc/mac_newworld.c
    M hw/ppc/mac_oldworld.c
    M hw/ppc/pnv.c
    M hw/ppc/ppc405_boards.c
    M hw/ppc/ppc440_bamboo.c
    M hw/ppc/prep.c
    M hw/ppc/sam460ex.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_vio.c
    M hw/ppc/virtex_ml507.c
    M hw/riscv/boot.c
    M hw/rx/rx-gdbsim.c
    M hw/rx/rx62n.c
    M hw/s390x/ipl.c
    M hw/s390x/s390-skeys.c
    M hw/s390x/s390-virtio-ccw.c
    M hw/sd/ssi-sd.c
    M hw/sh4/shix.c
    M hw/smbios/smbios.c
    M hw/sparc/leon3.c
    M hw/sparc/sun4m.c
    M hw/sparc64/sparc64.c
    M hw/sparc64/sun4u.c
    M hw/ssi/aspeed_smc.c
    M hw/ssi/pl022.c
    M hw/ssi/ssi.c
    M hw/ssi/xilinx_spips.c
    M hw/virtio/virtio-balloon.c
    M include/exec/cpu-common.h
    M include/hw/boards.h
    M include/hw/i386/x86.h
    M include/hw/misc/max111x.h
    M include/hw/pci/pci.h
    M include/hw/qdev-core.h
    M include/hw/ssi/aspeed_smc.h
    M include/hw/ssi/ssi.h
    M include/hw/ssi/xilinx_spips.h
    M include/hw/stream.h
    M include/migration/misc.h
    M include/qemu-common.h
    M include/qemu/config-file.h
    A include/qemu/datadir.h
    M include/qemu/option.h
    M include/standard-headers/asm-x86/kvm_para.h
    M include/sysemu/dma.h
    M include/sysemu/sysemu.h
    M include/sysemu/whpx.h
    M migration/migration.c
    M monitor/hmp.c
    M monitor/qmp-cmds.c
    M python/qemu/machine.py
    M qemu-options.hx
    M qom/object.c
    M scripts/kernel-doc
    M softmmu/cpus.c
    A softmmu/datadir.c
    M softmmu/dma-helpers.c
    M softmmu/meson.build
    M softmmu/qdev-monitor.c
    A softmmu/rtc.c
    M softmmu/vl.c
    M target/arm/arm-semi.c
    M target/i386/cpu.c
    M target/i386/kvm.c
    M target/i386/kvm_i386.h
    M target/i386/meson.build
    M target/i386/seg_helper.c
    M target/i386/translate.c
    M target/i386/whp-dispatch.h
    M target/i386/whpx-all.c
    A target/i386/whpx-apic.c
    M target/m68k/m68k-semi.c
    M target/s390x/excp_helper.c
    M target/s390x/mem_helper.c
    M target/s390x/mmu_helper.c
    M tests/qtest/bios-tables-test.c
    M tests/qtest/fuzz/fuzz.c
    M tests/qtest/pflash-cfi02-test.c
    M tests/qtest/test-filter-redirector.c
    M tests/qtest/vhost-user-test.c
    M tests/tcg/i386/Makefile.target
    A tests/tcg/i386/test-i386-bmi2.c
    M tests/test-char.c
    M tests/test-qemu-opts.c
    M ui/keymaps.c
    M util/qemu-config.c
    M util/qemu-option.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into 
staging

* Fix for NULL segments (Bin Meng)
* Support for 32768 CPUs on x86 without IOMMU (David)
* PDEP/PEXT fix and testcase (myself)
* Remove bios_name and ram_size globals (myself)
* qemu_init rationalization (myself)
* Update kernel-doc (myself + upstream patches)
* Propagate MemTxResult across DMA and PCI functions (Philippe)
* Remove master/slave when applicable (Philippe)
* WHPX support for in-kernel irqchip (Sunil)

# gpg: Signature made Tue 01 Dec 2020 09:56:26 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini-gitlab/tags/for-upstream: (113 commits)
  scripts: kernel-doc: remove unnecesssary change wrt Linux
  Revert "docs: temporarily disable the kernel-doc extension"
  scripts: kernel-doc: use :c:union when needed
  scripts: kernel-doc: split typedef complex regex
  scripts: kernel-doc: fix typedef parsing
  Revert "kernel-doc: Handle function typedefs that return pointers"
  Revert "kernel-doc: Handle function typedefs without asterisks"
  scripts: kernel-doc: try to use c:function if possible
  scripts: kernel-doc: fix line number handling
  scripts: kernel-doc: allow passing desired Sphinx C domain dialect
  scripts: kernel-doc: don't mangle with parameter list
  scripts: kernel-doc: fix typedef identification
  scripts: kernel-doc: reimplement -nofunction argument
  scripts: kernel-doc: fix troubles with line counts
  scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x
  scripts: kernel-doc: make it more compatible with Sphinx 3.x
  Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later"
  Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments"
  scripts: kernel-doc: add support for typedef enum
  kernel-doc: add support for ____cacheline_aligned attribute
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/fac080f5a75d...13978db7690b



reply via email to

[Prev in Thread] Current Thread [Next in Thread]