Richard Henderson
2271a6ac0a
tcg: Add tcg_get_insn_start_param
...
MicroBlaze will shortly need to update a parameter in place.
Add an interface to read to match that for write.
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com >
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-09-01 07:43:30 -07:00
Peter Maydell
071a6dba7d
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-request' into staging
...
Pull request trivial patches 20200901
# gpg: Signature made Tue 01 Sep 2020 15:08:59 BST
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu "
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com >" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu >" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com >" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/trivial-branch-for-5.2-pull-request: (44 commits)
docs/system: Fix grammar in documentation
main-loop: Fix comment
hw/display/vga:Remove redundant statement in vga_draw_graphic()
hw/intc: fix default registers value in exynos4210_combiner_read()
usb/bus: Remove dead assignment in usb_get_fw_dev_path()
vfio/platform: Remove dead assignment in vfio_intp_interrupt()
hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check()
hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()
target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16()
target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli()
hw/arm/omap1:Remove redundant statement in omap_clkdsp_read()
hw/arm/virt-acpi-build:Remove dead assignment in build_madt()
linux-user: Add strace support for printing OFD fcntl operations
util/vfio-helpers: Unify trace-events size format
hw/net/xilinx_axienet: Remove unused code
hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE
hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE
hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE
hw/ide/core: Trivial typo fix
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-09-01 15:19:33 +01:00
Igor Kononenko
d98c48a19f
arm: aspeed: add strap define 25HZ of AST2500
...
Provide a definition for the "25Hz reference clock input mode" strap
Signed-off-by: Igor Kononenko <i.kononenko@yadro.com >
Reviewed-by: Cédric Le Goater <clg@kaod.org >
Message-Id: <20200811203502.20382-1-i.kononenko@yadro.com >
Message-Id: <20200819100956.2216690-21-clg@kaod.org >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2020-09-01 14:21:51 +02:00
Joel Stanley
14c179541b
aspeed/sdmc: Perform memory training
...
This allows qemu to run the "normal" power on reset boot path through
u-boot, where the DDR is trained.
An enhancement would be to have the SCU bit stick across qemu reboots,
but be unset on initial boot.
Proper modelling would be to discard all writes to the phy setting regs
at offset 0x100 - 0x400 and to model the phy status regs at offset
0x400.
The status regs model would only need to account for offets 0x00,
0x50, 0x68 and 0x7c.
Signed-off-by: Joel Stanley <joel@jms.id.au >
[ clg: checkpatch fixes ]
Message-Id: <20200819100956.2216690-17-clg@kaod.org >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2020-09-01 14:21:51 +02:00
Stefan Weil
a275e9343e
main-loop: Fix comment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20200827175520.32355-1-sw@weilnetz.de >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2020-09-01 12:07:52 +02:00
Philippe Mathieu-Daudé
d4b235731e
hw/i2c: Fix typo in description
...
Remove the second 'and' introduced in commit 73d5f22ecb
("hw/i2c: Document the I2C qdev helpers").
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Corey Minyard <cminyard@mvista.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20200811151643.21293-2-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2020-09-01 11:08:57 +02:00
Peter Maydell
2f4c51c0f3
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200831-pull-request' into staging
...
usb: usb_packet_map fixes for ehci and xhci.
usb: setup_len fix (CVE-2020-14364).
usb: u2f key support (GSoC).
* v2: 32bit build fixed.
* v3: libu2f-emu dependency fixed.
# gpg: Signature made Mon 31 Aug 2020 09:32:49 BST
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com >" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org >" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com >" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/usb-20200831-pull-request:
usb: fix setup_len init (CVE-2020-14364)
usb-host: workaround libusb bug
hw/usb: Add U2F device autoscan to passthru mode
hw/usb: Add U2F device check to passthru mode
scripts: Add u2f-setup-gen script
docs/qdev-device-use.txt: Add USB U2F key to the QDEV devices examples
docs/system: Add U2F key to the USB devices examples
meson: Add U2F key to meson
hw/usb: Add U2F key emulated mode
hw/usb: Add U2F key passthru mode
hw/usb: Add U2F key base class implementation
hw/usb: Add U2F key base class
docs: Add USB U2F key device documentation
hw/usb: Regroup USB HID protocol values
ehci: drop pointless warn_report for guest bugs.
hw: ehci: check return value of 'usb_packet_map'
hw: ehci: destroy sglist in error path
hw: xhci: check return value of 'usb_packet_map'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-31 19:39:13 +01:00
Philippe Mathieu-Daudé
268f54974b
hw/register: Document register_init_block @memory_size
...
Document the 'memory_size' argument of register_init_block().
Fixes: a74229597e ("register: Add block initialise helper")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Laurent Vivier <laurent@vivier.eu >
Message-Id: <20200707062308.4531-1-f4bug@amsat.org >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2020-08-31 19:41:58 +02:00
César Belley
84b6c23629
hw/usb: Regroup USB HID protocol values
...
Group some HID values that are used pretty much everywhere when
dealing with HID devices.
Signed-off-by: César Belley <cesar.belley@lse.epita.fr >
Message-id: 20200812094135.20550-2-cesar.belley@lse.epita.fr
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-08-31 08:10:47 +02:00
Peter Maydell
4bc08c6141
Merge remote-tracking branch 'remotes/rth/tags/pull-sf-20200829' into staging
...
* float16 comparison wrappers
* float16 conversions to/from 8-bit integers
* bfloat16 support
# gpg: Signature made Sun 30 Aug 2020 03:29:54 BST
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org "
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org >" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* remotes/rth/tags/pull-sf-20200829:
softfloat: Define comparison operations for bfloat16
softfloat: Define misc operations for bfloat16
softfloat: Define convert operations for bfloat16
softfloat: Define operations for bfloat16
softfloat: Add float16_is_normal
softfloat: Add fp16 and uint8/int8 conversion functions
softfloat: Implement the full set of comparisons for float16
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-30 14:01:25 +01:00
Richard Henderson
c53b107933
softfloat: Define comparison operations for bfloat16
...
Reviewed-by: LIU Zhiwei <zhiwei_liu@c-sky.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-08-29 19:25:42 -07:00
Peter Maydell
39335fab59
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.2-pull-request' into staging
...
add utimensat_time64, semtimedop_time64, rt_sigtimedwait_time64,
sched_rr_get_interval_time64, clock_nanosleep_time64, clock_adjtime64,
mq_timedsend_time64, mq_timedreceive_time64
fix semop, semtimedop, clock_nanosleep, mq_timedsend, target_to_host_timespec64
fix tembits.h
add more strace function
Add upport DRM_IOCTL_I915_GETPARAM
detect mismatched ELF ABI in qemu-mips[n32][el]
# gpg: Signature made Fri 28 Aug 2020 14:37:33 BST
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu "
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com >" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu >" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com >" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/linux-user-for-5.2-pull-request:
linux-user: Add support for utimensat_time64() and semtimedop_time64()
linux-user: Add support for 'rt_sigtimedwait_time64()' and 'sched_rr_get_interval_time64()'
linux-user: Add support for 'clock_nanosleep_time64()' and 'clock_adjtime64()'
linux-user: Add support for 'mq_timedsend_time64()' and 'mq_timedreceive_time64()'
linux-user: fix target_to_host_timespec64()
linux-user: Fix 'mq_timedsend()' and 'mq_timedreceive()'
linux-user: detect mismatched ELF ABI in qemu-mips[n32][el]
linux-user: Add strace support for printing arguments for ioctls used for terminals and serial lines
linux-user: Add missing termbits types and values definitions
linux-user: Add generic 'termbits.h' for some archs
linux-user: Add strace support for printing arguments of some clock and time functions
linux-user: Add an api to print enumareted argument values with strace
linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory
linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid()
linux-user: Make cpu_env accessible in strace.c
linux-user: syscall: ioctls: support DRM_IOCTL_I915_GETPARAM
linux-user: Fix 'clock_nanosleep()' implementation
linux-user: Fix 'semop()' and 'semtimedop()' implementation
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 22:30:11 +01:00
LIU Zhiwei
5ebf5f4be6
softfloat: Define misc operations for bfloat16
...
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20200813071421.2509-4-zhiwei_liu@c-sky.com >
[rth: Fix merge conflict with NO_SIGNALING_NANS; use bool for predicates.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-08-28 10:48:07 -07:00
LIU Zhiwei
34f0c0a98a
softfloat: Define convert operations for bfloat16
...
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20200813071421.2509-3-zhiwei_liu@c-sky.com >
[rth: Use FloatRoundMode for conversion functions.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-08-28 10:48:07 -07:00
LIU Zhiwei
8282310d85
softfloat: Define operations for bfloat16
...
This patch implements operations for bfloat16 except conversion and some misc
operations. We also add FloatFmt and pack/unpack interfaces for bfloat16.
As they are both static fields, we can't make a sperate patch for them.
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20200813071421.2509-2-zhiwei_liu@c-sky.com >
[rth: Use FloatRelation for comparison operations.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-08-28 10:48:07 -07:00
Stephen Long
a03e924cf8
softfloat: Add float16_is_normal
...
This float16 predicate was missing from the normal set.
Signed-off-by: Stephen Long <steplong@quicinc.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-08-28 10:48:07 -07:00
Frank Chang
0d93d8ec63
softfloat: Add fp16 and uint8/int8 conversion functions
...
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Frank Chang <frank.chang@sifive.com >
Message-Id: <1596102747-20226-4-git-send-email-chihmin.chao@sifive.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-08-28 10:48:07 -07:00
Kito Cheng
dd205025a0
softfloat: Implement the full set of comparisons for float16
...
Implement them in softfloat and remove the local versions in riscv.
Signed-off-by: Kito Cheng <kito.cheng@sifive.com >
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com >
Acked-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-Id: <1596102747-20226-2-git-send-email-chihmin.chao@sifive.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-08-28 10:48:07 -07:00
Peter Maydell
ea1bb830cb
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200828' into staging
...
target-arm queue:
* target/arm: Cleanup and refactoring preparatory to SVE2
* armsse: Define ARMSSEClass correctly
* hw/misc/unimp: Improve information provided in log messages
* hw/qdev-clock: Avoid calling qdev_connect_clock_in after DeviceRealize
* hw/arm/xilinx_zynq: Call qdev_connect_clock_in() before DeviceRealize
* hw/net/allwinner-sun8i-emac: Use AddressSpace for DMA transfers
* hw/sd/allwinner-sdhost: Use AddressSpace for DMA transfers
* target/arm: Fill in the WnR syndrome bit in mte_check_fail
* target/arm: Clarify HCR_EL2 ARMCPRegInfo type
* hw/arm/musicpal: Use AddressSpace for DMA transfers
* hw/clock: Minor cleanups
* hw/arm/sbsa-ref: fix typo breaking PCIe IRQs
# gpg: Signature made Fri 28 Aug 2020 10:23:02 BST
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org "
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org >" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@gmail.com >" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk >" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-target-arm-20200828: (35 commits)
target/arm: Convert sq{, r}dmulh to gvec for aa64 advsimd
target/arm: Convert integer multiply-add (indexed) to gvec for aa64 advsimd
target/arm: Convert integer multiply (indexed) to gvec for aa64 advsimd
target/arm: Generalize inl_qrdmlah_* helper functions
target/arm: Tidy SVE tszimm shift formats
target/arm: Split out gen_gvec_ool_zz
target/arm: Split out gen_gvec_ool_zzz
target/arm: Split out gen_gvec_ool_zzp
target/arm: Merge helper_sve_clr_* and helper_sve_movz_*
target/arm: Split out gen_gvec_ool_zzzp
target/arm: Use tcg_gen_gvec_bitsel for trans_SEL_pppp
target/arm: Clean up 4-operand predicate expansion
target/arm: Merge do_vector2_p into do_mov_p
target/arm: Rearrange {sve,fp}_check_access assert
target/arm: Split out gen_gvec_fn_zzz, do_zzz_fn
target/arm: Split out gen_gvec_fn_zz
qemu/int128: Add int128_lshift
armsse: Define ARMSSEClass correctly
hw/misc/unimp: Display the offset with width of the region size
hw/misc/unimp: Display the value with width of the access size
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 15:14:40 +01:00
Peter Maydell
3e39dac035
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging
...
Machine queue + QOM fixes and cleanups
Bug fix:
* numa: hmat: fix cache size check (Igor Mammedov)
QOM fixes and cleanups:
* Move QOM macros and typedefs to header files
* Use TYPE_* constants on TypeInfo structs
* Rename QOM type checking macros for consistency
* Rename enum values and typedefs that conflict with QOM
type checking amcros
* Fix typos on QOM type checking macros
* Delete unused QOM type checking macros that use
non-existing typedefs
* hvf: Add missing include
* xen-legacy-backend: Add missing typedef XenLegacyDevice
# gpg: Signature made Thu 27 Aug 2020 20:20:05 BST
# gpg: using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg: issuer "ehabkost@redhat.com "
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com >" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost/tags/machine-next-pull-request: (53 commits)
dc390: Use TYPE_DC390_DEVICE constant
ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant
tosa: Use TYPE_TOSA_MISC_GPIO constant
xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant
sclpconsole: Use TYPE_* constants
amd_iommu: Use TYPE_AMD_IOMMU_PCI constant
nios2_iic: Use TYPE_ALTERA_IIC constant
etsec: Use TYPE_ETSEC_COMMON constant
migration: Rename class type checking macros
swim: Rename struct SWIM to Swim
s390-virtio-ccw: Rename S390_MACHINE_CLASS macro
nubus: Rename class type checking macros
vfio/pci: Move QOM macros to header
kvm: Move QOM macros to kvm.h
mptsas: Move QOM macros to header
pxa2xx: Move QOM macros to header
rocker: Move QOM macros to header
auxbus: Move QOM macros to header
piix: Move QOM macros to header
virtio-serial-bus: Move QOM macros to header
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 11:05:08 +01:00
Richard Henderson
5be4dd043f
qemu/int128: Add int128_lshift
...
Add left-shift to match the existing right-shift.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20200815013145.539409-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:47 +01:00
Eduardo Habkost
512c65e62e
armsse: Define ARMSSEClass correctly
...
TYPE_ARM_SSE is a TYPE_SYS_BUS_DEVICE subclass, but
ARMSSEClass::parent_class is declared as DeviceClass.
It never caused any problems by pure luck:
We were not setting class_size for TYPE_ARM_SSE, so class_size of
TYPE_SYS_BUS_DEVICE was being used (sizeof(SysBusDeviceClass)).
This made the system allocate enough memory for TYPE_ARM_SSE
devices even though ARMSSEClass was too small for a sysbus
device.
Additionally, the ARMSSEClass::info field ended up at the same
offset as SysBusDeviceClass::explicit_ofw_unit_address. This
would make sysbus_get_fw_dev_path() crash for the device.
Luckily, sysbus_get_fw_dev_path() never gets called for
TYPE_ARM_SSE devices, because qdev_get_fw_dev_path() is only used
by the boot device code, and TYPE_ARM_SSE devices don't appear at
the fw_boot_order list.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-id: 20200826181006.4097163-1-ehabkost@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:47 +01:00
Philippe Mathieu-Daudé
55d35c8819
hw/misc/unimp: Display the offset with width of the region size
...
To have a better idea of how big is the region where the offset
belongs, display the value with the width of the region size
(i.e. a region of 0x1000 bytes uses 0x000 format).
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-id: 20200812190206.31595-4-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:46 +01:00
Philippe Mathieu-Daudé
739fa32554
hw/qdev-clock: Avoid calling qdev_connect_clock_in after DeviceRealize
...
Clock canonical name is set in device_set_realized (see the block
added to hw/core/qdev.c in commit 0e6934f264 ).
If we connect a clock after the device is realized, this code is
not executed. This is currently not a problem as this name is only
used for trace events, however this disrupt tracing.
Add a comment to document qdev_connect_clock_in() must be called
before the device is realized, and assert this condition.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 20200803105647.22223-5-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:46 +01:00
Philippe Mathieu-Daudé
f129360ca1
hw/qdev-clock: Uninline qdev_connect_clock_in()
...
We want to assert the device is not realized. To avoid overloading
this header including "hw/qdev-core.h", uninline the function first.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 20200803105647.22223-4-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:46 +01:00
Philippe Mathieu-Daudé
31a171cc8b
hw/arm/xilinx_zynq: Uninline cadence_uart_create()
...
As we want to call qdev_connect_clock_in() before the device
is realized, we need to uninline cadence_uart_create() first.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 20200803105647.22223-2-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:45 +01:00
Philippe Mathieu-Daudé
4757cb8579
hw/net/allwinner-sun8i-emac: Use AddressSpace for DMA transfers
...
Allow the device to execute the DMA transfers in a different
AddressSpace.
The H3 SoC keeps using the system_memory address space,
but via the proper dma_memory_access() API.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Message-id: 20200814122907.27732-1-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:45 +01:00
Philippe Mathieu-Daudé
b3aec952bf
hw/sd/allwinner-sdhost: Use AddressSpace for DMA transfers
...
Allow the device to execute the DMA transfers in a different
AddressSpace.
The A10 and H3 SoC keep using the system_memory address space,
but via the proper dma_memory_access() API.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Message-id: 20200814110057.307-1-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:45 +01:00
Philippe Mathieu-Daudé
96250eab90
hw/clock: Only propagate clock changes if the clock is changed
...
Avoid propagating the clock change when the clock does not change.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20200806123858.30058-4-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:44 +01:00
Philippe Mathieu-Daudé
15aa2876d9
hw/clock: Let clock_set() return boolean value
...
Let clock_set() return a boolean value whether the clock
has been updated or not.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20200806123858.30058-3-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:44 +01:00
Philippe Mathieu-Daudé
bb80ae077e
hw/clock: Remove unused clock_init*() functions
...
clock_init*() inlined funtions are simple wrappers around
clock_set*() and are not used. Remove them in favor of clock_set*().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20200806123858.30058-2-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-28 10:02:43 +01:00
Eduardo Habkost
b694ed1f56
swim: Rename struct SWIM to Swim
...
Currently we have a SWIM typedef and a SWIM type checking macro,
but OBJECT_DECLARE* would transform the SWIM macro into a
function, and the function name would conflict with the SWIM
typedef name.
Rename the struct and typedef to "Swim". This will make future
conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Laurent Vivier <laurent@vivier.eu >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-50-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:55 -04:00
Eduardo Habkost
b1af5872ff
s390-virtio-ccw: Rename S390_MACHINE_CLASS macro
...
Rename it to be consistent with S390_CCW_MACHINE and
TYPE_S390_CCW_MACHINE.
This will make future conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Cornelia Huck <cohuck@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-49-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:55 -04:00
Eduardo Habkost
001040158d
nubus: Rename class type checking macros
...
Rename the existing class type checking macros to be consistent
with the type name and instance type checking macro. Use a
NUBUS_MACFB prefix instead of MACFB_NUBUS.
This will make future conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Laurent Vivier <laurent@vivier.eu >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-44-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:55 -04:00
Eduardo Habkost
97e622ded7
kvm: Move QOM macros to kvm.h
...
Move QOM macros close to the KVMState typedef.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-42-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:55 -04:00
Eduardo Habkost
2d8eb5f85f
pxa2xx: Move QOM macros to header
...
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-40-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:55 -04:00
Eduardo Habkost
cb8cf86b3e
auxbus: Move QOM macros to header
...
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-38-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:55 -04:00
Eduardo Habkost
fe47ad3aa9
piix: Move QOM macros to header
...
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-37-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:55 -04:00
Eduardo Habkost
b28b80376b
virtio-serial-bus: Move QOM macros to header
...
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-36-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
240b6cd717
vmbus: Move QOM macros to vmbus.h
...
Move all declarations related to TYPE_VMBUS to the same place in
vmbus.h.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-35-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
41ea82055c
pckbd: Move QOM macro to header
...
Move the I8042 macro close to the TYPE_I8042 define.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-34-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
dc15d9eb41
ahci: Move QOM macro to header
...
Move the ALLWINNER_AHCI macro close to the TYPE_ALLWINNER_AHCI
define.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-33-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
e6fcd78008
i8257: Move QOM macro to header
...
Move the I8257 macro to i8257.h, close to the TYPE_I8257 define.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-32-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
5e748ffbbf
ahci: Move QOM macros to header
...
The TYPE_* constants and the typedefs are defined in ahci.h, so
we can move the type checking macros there too.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-31-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
2504f868f3
vhost-user-gpu: Move QOM macro to header
...
Move the VHOST_USER_GPU type checking macro to virtio-gpu.h,
close to the TYPE_VHOST_USER_GPU #define.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-30-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
43f014407b
s390x: Move typedef SCLPEventFacility to event-facility.h
...
This will make future conversion to OBJECT_DECLARE* easier.
In sclp.h, use "struct SCLPEventFacility" to avoid introducing
unnecessary header dependencies.
Acked-by: Cornelia Huck <cohuck@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Thomas Huth <thuth@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-29-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
82d1e74f1b
spapr: Move typedef SpaprMachineState to spapr.h
...
Move the typedef from spapr_irq.h to spapr.h, and use "struct
SpaprMachineState" in the spapr_*.h headers (to avoid circular
header dependencies).
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-28-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
694b3d2897
xen-legacy-backend: Add missing typedef XenLegacyDevice
...
The typedef was used in the XENBACKEND_DEVICE macro, but it was
never defined. Define the typedef close to the type checking
macro.
Acked-by: Anthony PERARD <anthony.perard@citrix.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-27-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
8055340fa5
armsse: Rename QOM macros to avoid conflicts
...
Rename TYPE_ARMSSE to TYPE_ARM_SSE, and ARMSSE*() type checking
macros to ARM_SSE*().
This will avoid a future conflict between an ARM_SSE() type
checking macro and the ARMSSE typedef name.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-26-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
Eduardo Habkost
08e14bb7e0
platform-bus: Delete macros for non-existing typedef
...
PlatformBusDeviceClass doesn't exist. This will break when we
automatically convert the code to use OBJECT_DEFINE_TYPE().
Delete the macros that reference the non-existing typedef.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-25-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00