Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstrea…
Browse files Browse the repository at this point in the history
…m' 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 Thu 10 Dec 2020 17:21:50 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 unnecessary 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>
  • Loading branch information
pm215 committed Dec 11, 2020
2 parents 3374460 + 953d0c3 commit b785d25
Show file tree
Hide file tree
Showing 151 changed files with 2,923 additions and 1,812 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Expand Up @@ -452,6 +452,7 @@ WHPX CPUs
M: Sunil Muthuswamy <sunilmut@microsoft.com>
S: Supported
F: target/i386/whpx-all.c
F: target/i386/whpx-apic.c
F: target/i386/whpx-cpus.c
F: target/i386/whp-dispatch.h
F: accel/stubs/whpx-stub.c
Expand Down
2 changes: 2 additions & 0 deletions docs/devel/loads-stores.rst
Expand Up @@ -483,6 +483,8 @@ make sure our existing code is doing things correctly.

Regexes for git grep
- ``\<dma_memory_\(read\|write\|rw\)\>``
- ``\<ldu\?[bwlq]\(_[bl]e\)\?_dma\>``
- ``\<st[bwlq]\(_[bl]e\)\?_dma\>``

``pci_dma_*`` and ``{ld,st}*_pci_dma``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/specs/tpm.rst
Expand Up @@ -343,7 +343,7 @@ In case an Arm virt machine is emulated, use the following command line:
-device tpm-tis-device,tpmdev=tpm0 \
-device virtio-blk-pci,drive=drv0 \
-drive format=qcow2,file=hda.qcow2,if=none,id=drv0 \
-drive if=pflash,format=raw,file=flash0.img,readonly \
-drive if=pflash,format=raw,file=flash0.img,readonly=on \
-drive if=pflash,format=raw,file=flash1.img
In case SeaBIOS is used as firmware, it should show the TPM menu item
Expand Down
6 changes: 5 additions & 1 deletion docs/sphinx/kerneldoc.py
Expand Up @@ -69,6 +69,11 @@ def run(self):
env = self.state.document.settings.env
cmd = env.config.kerneldoc_bin + ['-rst', '-enable-lineno']

# Pass the version string to kernel-doc, as it needs to use a different
# dialect, depending what the C domain supports for each specific
# Sphinx versions
cmd += ['-sphinx-version', sphinx.__version__]

filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
export_file_patterns = []

Expand Down Expand Up @@ -99,7 +104,6 @@ def run(self):
env.note_dependency(os.path.abspath(f))
cmd += ['-export-file', f]

cmd += ['-sphinx-version', sphinx.__version__]
cmd += [filename]

try:
Expand Down
3 changes: 2 additions & 1 deletion hw/alpha/dp264.c
Expand Up @@ -21,6 +21,7 @@
#include "hw/dma/i8257.h"
#include "net/net.h"
#include "qemu/cutils.h"
#include "qemu/datadir.h"
#include "net/net.h"

#define MAX_IDE_BUS 2
Expand Down Expand Up @@ -107,7 +108,7 @@ static void clipper_init(MachineState *machine)
but one explicitly written for the emulation, we might as
well load it directly from and ELF image. */
palcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,
bios_name ? bios_name : "palcode-clipper");
machine->firmware ?: "palcode-clipper");
if (palcode_filename == NULL) {
error_report("no palcode provided");
exit(1);
Expand Down
8 changes: 4 additions & 4 deletions hw/arm/aspeed.c
Expand Up @@ -309,7 +309,7 @@ static void aspeed_machine_init(MachineState *machine)
/*
* This will error out if isize is not supported by memory controller.
*/
object_property_set_uint(OBJECT(&bmc->soc), "ram-size", ram_size,
object_property_set_uint(OBJECT(&bmc->soc), "ram-size", machine->ram_size,
&error_fatal);

for (i = 0; i < sc->macs_num; i++) {
Expand Down Expand Up @@ -346,8 +346,8 @@ static void aspeed_machine_init(MachineState *machine)
max_ram_size = object_property_get_uint(OBJECT(&bmc->soc), "max-ram-size",
&error_abort);
memory_region_init_io(&bmc->max_ram, NULL, &max_ram_ops, NULL,
"max_ram", max_ram_size - ram_size);
memory_region_add_subregion(&bmc->ram_container, ram_size, &bmc->max_ram);
"max_ram", max_ram_size - machine->ram_size);
memory_region_add_subregion(&bmc->ram_container, machine->ram_size, &bmc->max_ram);

aspeed_board_init_flashes(&bmc->soc.fmc, bmc->fmc_model ?
bmc->fmc_model : amc->fmc_model);
Expand Down Expand Up @@ -392,7 +392,7 @@ static void aspeed_machine_init(MachineState *machine)
aspeed_board_binfo.smp_loader_start = AST_SMP_MBOX_CODE;
}

aspeed_board_binfo.ram_size = ram_size;
aspeed_board_binfo.ram_size = machine->ram_size;
aspeed_board_binfo.loader_start = sc->memmap[ASPEED_DEV_SDRAM];
aspeed_board_binfo.nb_cpus = sc->num_cpus;

Expand Down
1 change: 1 addition & 0 deletions hw/arm/boot.c
Expand Up @@ -9,6 +9,7 @@

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/datadir.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include <libfdt.h>
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/cubieboard.c
Expand Up @@ -40,7 +40,7 @@ static void cubieboard_init(MachineState *machine)
DeviceState *carddev;

/* BIOS is not supported by this board */
if (bios_name) {
if (machine->firmware) {
error_report("BIOS not supported for this machine");
exit(1);
}
Expand Down
20 changes: 8 additions & 12 deletions hw/arm/digic_boards.c
Expand Up @@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/datadir.h"
#include "cpu.h"
#include "hw/boards.h"
#include "exec/address-spaces.h"
Expand Down Expand Up @@ -70,19 +71,20 @@ static void digic4_board_init(MachineState *machine, DigicBoard *board)
memory_region_add_subregion(get_system_memory(), 0, machine->ram);

if (board->add_rom0) {
board->add_rom0(s, DIGIC4_ROM0_BASE, board->rom0_def_filename);
board->add_rom0(s, DIGIC4_ROM0_BASE,
machine->firmware ?: board->rom0_def_filename);
}

if (board->add_rom1) {
board->add_rom1(s, DIGIC4_ROM1_BASE, board->rom1_def_filename);
board->add_rom1(s, DIGIC4_ROM1_BASE,
machine->firmware ?: board->rom1_def_filename);
}
}

static void digic_load_rom(DigicState *s, hwaddr addr,
hwaddr max_size, const char *def_filename)
hwaddr max_size, const char *filename)
{
target_long rom_size;
const char *filename;

if (qtest_enabled()) {
/* qtest runs no code so don't attempt a ROM load which
Expand All @@ -91,12 +93,6 @@ static void digic_load_rom(DigicState *s, hwaddr addr,
return;
}

if (bios_name) {
filename = bios_name;
} else {
filename = def_filename;
}

if (filename) {
char *fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, filename);

Expand All @@ -119,7 +115,7 @@ static void digic_load_rom(DigicState *s, hwaddr addr,
* 64M Bit (4Mx16) Page Mode / Multi-Bank NOR Flash Memory
*/
static void digic4_add_k8p3215uqb_rom(DigicState *s, hwaddr addr,
const char *def_filename)
const char *filename)
{
#define FLASH_K8P3215UQB_SIZE (4 * 1024 * 1024)
#define FLASH_K8P3215UQB_SECTOR_SIZE (64 * 1024)
Expand All @@ -131,7 +127,7 @@ static void digic4_add_k8p3215uqb_rom(DigicState *s, hwaddr addr,
0x00EC, 0x007E, 0x0003, 0x0001,
0x0555, 0x2aa, 0);

digic_load_rom(s, addr, FLASH_K8P3215UQB_SIZE, def_filename);
digic_load_rom(s, addr, FLASH_K8P3215UQB_SIZE, filename);
}

static DigicBoard digic4_board_canon_a1100 = {
Expand Down
9 changes: 5 additions & 4 deletions hw/arm/highbank.c
Expand Up @@ -19,6 +19,7 @@

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/datadir.h"
#include "qapi/error.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
Expand Down Expand Up @@ -297,16 +298,16 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
memory_region_init_ram(sysram, NULL, "highbank.sysram", 0x8000,
&error_fatal);
memory_region_add_subregion(sysmem, 0xfff88000, sysram);
if (bios_name != NULL) {
sysboot_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
if (machine->firmware != NULL) {
sysboot_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware);
if (sysboot_filename != NULL) {
if (load_image_targphys(sysboot_filename, 0xfff88000, 0x8000) < 0) {
error_report("Unable to load %s", bios_name);
error_report("Unable to load %s", machine->firmware);
exit(1);
}
g_free(sysboot_filename);
} else {
error_report("Unable to find %s", bios_name);
error_report("Unable to find %s", machine->firmware);
exit(1);
}
}
Expand Down
6 changes: 2 additions & 4 deletions hw/arm/npcm7xx_boards.c
Expand Up @@ -23,6 +23,7 @@
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/datadir.h"
#include "qemu/units.h"
#include "sysemu/sysemu.h"

Expand All @@ -33,13 +34,10 @@ static const char npcm7xx_default_bootrom[] = "npcm7xx_bootrom.bin";

static void npcm7xx_load_bootrom(MachineState *machine, NPCM7xxState *soc)
{
const char *bios_name = machine->firmware ?: npcm7xx_default_bootrom;
g_autofree char *filename = NULL;
int ret;

if (!bios_name) {
bios_name = npcm7xx_default_bootrom;
}

filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
if (!filename) {
error_report("Could not find ROM image '%s'", bios_name);
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/orangepi.c
Expand Up @@ -41,7 +41,7 @@ static void orangepi_init(MachineState *machine)
DeviceState *carddev;

/* BIOS is not supported by this board */
if (bios_name) {
if (machine->firmware) {
error_report("BIOS not supported for this machine");
exit(1);
}
Expand Down
3 changes: 3 additions & 0 deletions hw/arm/sbsa-ref.c
Expand Up @@ -19,6 +19,7 @@

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/datadir.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/units.h"
Expand Down Expand Up @@ -319,6 +320,7 @@ static bool sbsa_firmware_init(SBSAMachineState *sms,
MemoryRegion *sysmem,
MemoryRegion *secure_sysmem)
{
const char *bios_name;
int i;
BlockBackend *pflash_blk0;

Expand All @@ -332,6 +334,7 @@ static bool sbsa_firmware_init(SBSAMachineState *sms,

pflash_blk0 = pflash_cfi01_get_blk(sms->flash[0]);

bios_name = MACHINE(sms)->firmware;
if (bios_name) {
char *fname;
MemoryRegion *mr;
Expand Down
32 changes: 16 additions & 16 deletions hw/arm/spitz.c
Expand Up @@ -578,7 +578,7 @@ static void spitz_keyboard_realize(DeviceState *dev, Error **errp)
OBJECT_DECLARE_SIMPLE_TYPE(SpitzLCDTG, SPITZ_LCDTG)

struct SpitzLCDTG {
SSISlave ssidev;
SSIPeripheral ssidev;
uint32_t bl_intensity;
uint32_t bl_power;
};
Expand Down Expand Up @@ -612,7 +612,7 @@ static inline void spitz_bl_power(void *opaque, int line, int level)
spitz_bl_update(s);
}

static uint32_t spitz_lcdtg_transfer(SSISlave *dev, uint32_t value)
static uint32_t spitz_lcdtg_transfer(SSIPeripheral *dev, uint32_t value)
{
SpitzLCDTG *s = SPITZ_LCDTG(dev);
int addr;
Expand Down Expand Up @@ -641,7 +641,7 @@ static uint32_t spitz_lcdtg_transfer(SSISlave *dev, uint32_t value)
return 0;
}

static void spitz_lcdtg_realize(SSISlave *ssi, Error **errp)
static void spitz_lcdtg_realize(SSIPeripheral *ssi, Error **errp)
{
SpitzLCDTG *s = SPITZ_LCDTG(ssi);
DeviceState *dev = DEVICE(s);
Expand All @@ -667,12 +667,12 @@ OBJECT_DECLARE_SIMPLE_TYPE(CorgiSSPState, CORGI_SSP)

/* "Demux" the signal based on current chipselect */
struct CorgiSSPState {
SSISlave ssidev;
SSIPeripheral ssidev;
SSIBus *bus[3];
uint32_t enable[3];
};

static uint32_t corgi_ssp_transfer(SSISlave *dev, uint32_t value)
static uint32_t corgi_ssp_transfer(SSIPeripheral *dev, uint32_t value)
{
CorgiSSPState *s = CORGI_SSP(dev);
int i;
Expand Down Expand Up @@ -700,7 +700,7 @@ static void corgi_ssp_gpio_cs(void *opaque, int line, int level)
#define SPITZ_BATTERY_VOLT 0xd0 /* About 4.0V */
#define SPITZ_CHARGEON_ACIN 0x80 /* About 5.0V */

static void corgi_ssp_realize(SSISlave *d, Error **errp)
static void corgi_ssp_realize(SSIPeripheral *d, Error **errp)
{
DeviceState *dev = DEVICE(d);
CorgiSSPState *s = CORGI_SSP(d);
Expand All @@ -715,14 +715,14 @@ static void spitz_ssp_attach(SpitzMachineState *sms)
{
void *bus;

sms->mux = ssi_create_slave(sms->mpu->ssp[CORGI_SSP_PORT - 1],
TYPE_CORGI_SSP);
sms->mux = ssi_create_peripheral(sms->mpu->ssp[CORGI_SSP_PORT - 1],
TYPE_CORGI_SSP);

bus = qdev_get_child_bus(sms->mux, "ssi0");
sms->lcdtg = ssi_create_slave(bus, TYPE_SPITZ_LCDTG);
sms->lcdtg = ssi_create_peripheral(bus, TYPE_SPITZ_LCDTG);

bus = qdev_get_child_bus(sms->mux, "ssi1");
sms->ads7846 = ssi_create_slave(bus, "ads7846");
sms->ads7846 = ssi_create_peripheral(bus, "ads7846");
qdev_connect_gpio_out(sms->ads7846, 0,
qdev_get_gpio_in(sms->mpu->gpio, SPITZ_GPIO_TP_INT));

Expand Down Expand Up @@ -1204,7 +1204,7 @@ static const VMStateDescription vmstate_corgi_ssp_regs = {
.version_id = 2,
.minimum_version_id = 2,
.fields = (VMStateField[]) {
VMSTATE_SSI_SLAVE(ssidev, CorgiSSPState),
VMSTATE_SSI_PERIPHERAL(ssidev, CorgiSSPState),
VMSTATE_UINT32_ARRAY(enable, CorgiSSPState, 3),
VMSTATE_END_OF_LIST(),
}
Expand All @@ -1213,7 +1213,7 @@ static const VMStateDescription vmstate_corgi_ssp_regs = {
static void corgi_ssp_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
SSIPeripheralClass *k = SSI_PERIPHERAL_CLASS(klass);

k->realize = corgi_ssp_realize;
k->transfer = corgi_ssp_transfer;
Expand All @@ -1222,7 +1222,7 @@ static void corgi_ssp_class_init(ObjectClass *klass, void *data)

static const TypeInfo corgi_ssp_info = {
.name = TYPE_CORGI_SSP,
.parent = TYPE_SSI_SLAVE,
.parent = TYPE_SSI_PERIPHERAL,
.instance_size = sizeof(CorgiSSPState),
.class_init = corgi_ssp_class_init,
};
Expand All @@ -1232,7 +1232,7 @@ static const VMStateDescription vmstate_spitz_lcdtg_regs = {
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
VMSTATE_SSI_SLAVE(ssidev, SpitzLCDTG),
VMSTATE_SSI_PERIPHERAL(ssidev, SpitzLCDTG),
VMSTATE_UINT32(bl_intensity, SpitzLCDTG),
VMSTATE_UINT32(bl_power, SpitzLCDTG),
VMSTATE_END_OF_LIST(),
Expand All @@ -1242,7 +1242,7 @@ static const VMStateDescription vmstate_spitz_lcdtg_regs = {
static void spitz_lcdtg_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
SSIPeripheralClass *k = SSI_PERIPHERAL_CLASS(klass);

k->realize = spitz_lcdtg_realize;
k->transfer = spitz_lcdtg_transfer;
Expand All @@ -1251,7 +1251,7 @@ static void spitz_lcdtg_class_init(ObjectClass *klass, void *data)

static const TypeInfo spitz_lcdtg_info = {
.name = TYPE_SPITZ_LCDTG,
.parent = TYPE_SSI_SLAVE,
.parent = TYPE_SSI_PERIPHERAL,
.instance_size = sizeof(SpitzLCDTG),
.class_init = spitz_lcdtg_class_init,
};
Expand Down
4 changes: 2 additions & 2 deletions hw/arm/stellaris.c
Expand Up @@ -1397,8 +1397,8 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board)
*/
bus = qdev_get_child_bus(dev, "ssi");

sddev = ssi_create_slave(bus, "ssi-sd");
ssddev = ssi_create_slave(bus, "ssd0323");
sddev = ssi_create_peripheral(bus, "ssi-sd");
ssddev = ssi_create_peripheral(bus, "ssd0323");
gpio_out[GPIO_D][0] = qemu_irq_split(
qdev_get_gpio_in_named(sddev, SSI_GPIO_CS, 0),
qdev_get_gpio_in_named(ssddev, SSI_GPIO_CS, 0));
Expand Down

0 comments on commit b785d25

Please sign in to comment.