PPC: e500: Use new MPIC dt format
Due to popular demand, we're updating the way we generate the MPICnode and interrupt lines based on what the current state of art is.
Requested-by: Scott Wood <scottwood@freescale.com>Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: e500: Use new SOC dt format
Due to popular demand, let's clean up the soc node a bit and usemore recent dt notions.
PPC: e500: Define addresses as always 64bit
Every time we use an address constant, it needs to potentially fit intoa 64bit physical address space. So let's define things accordingly.
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: e500: Extend address/size of / to 64bit
We want to be able to support >= 4GB of RAM. To do so, we need to be ableto tell the guest OS how much RAM it has.
However, that information today is capped to 32bit. So let's extend theoffset and size fields to 64bit, so we can fit in big addresses and even...
PPC: e500: dt: use 64bit cell helper
We have a nice 64bit helper to ease the device tree generation andmake the code more readable when creating 64bit 2-cell parameters.Use it when generating the device tree.
PPC: e500: dt: use target_phys_addr_t for ramsize
We're passing the ram size as uint32_t, capping it to 32 bits atm.Change to target_phys_addr_t (uint64_t) to make sure we have allthe bits.
PPC: e500: enable manual loading of dtb blob
We want to be able to override the automatically created device treeby using the -dtb option. Implement this for the mpc8544ds machine.
PPC: e500: dt: create /soc8544 node dynamically
PPC: e500: dt: create serial nodes dynamically
PPC: e500: dt: create mpic node dynamically
PPC: e500: dt: create global-utils node dynamically
PPC: e500: dt: create pci node dynamically
PPC: e500: dt: start with empty device tree
Now that all of the device tree bits are generated during runtime, wecan get rid of the device tree blob and instead start from scratch withan empty device tree.
dt: Add -machine dumpdtb option to dump the current dtb
Now that we are dynamically creating the dtb, it's really useful tobe able to dump the created blob for debugging.
This patch implements a -machine dumpdtb=<file> option for e500 thatdumps the dtb exactly in the form the guest would get it to disk. It...
PPC: e500: require libfdt
Now that we're moving all of the device tree generation from an externalpre-execution generated blob to runtime generation using libfdt, we absolutelymust have libfdt around.
This requirement was there before already, as the only way to not require libfdt...
PPC: e500: dt: create memory node dynamically
PPC: e500: dt: create /cpus node dynamically
PPC: e500: dt: create /hypervisor node dynamically
PPC: e500: dt: create / node dynamically
PPC: e500: dt: create /chosen node dynamically
pseries: Correctly create ibm,segment-page-sizes property
The core tcg/kvm code for ppc64 now has at least the outlinecapability to support pagesizes beyond the standard 4k and 16MB. TheCPUState is initialized with information advertising the available...
spapr_vscsi: Error handling fixes
We were incorrectly g_free'ing an object that isn't allocatedin one error path and failed to release it completely in another
This fixes qemu crashes with some cases of IO errors.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>...
spapr: Add "memop" hypercall
This adds a qemu-specific hypervisor call to the pseries machinewhich allows to do what amounts to memmove, memcpy and xor overregions of physical memory such as the framebuffer.
This is the simplest way to get usable framebuffer speed from...
PPC: mpc8544ds: Span initial TLB entry over as much RAM as we need
The initial TLB entry is supposed to help us run the guest -kernel payload.This means the guest needs to be able to access its own memory, the initrdmemory and the device tree.
So far we only statically reserved a TLB entry from [0;256M[. This patch...
fdc: use LOG_UNIMP logging
Convert uses of FLOPPY_ERROR to either FLOPPY_DPRINTF(for implemented cases) or to use LOG_UNIMP (unimplemented).
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
xilinx_timer: Removed include of qemu-timer
The Xilinx timer does not interact with the qemu_timer API, so dont include it.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
xilinx_timer: Fixed deadlock issue
The timer was deadlocking when the interval was set too low. It would cause aflood of timer events and the CPU would halt indefinately. This is a known issueand theres a generic workaround in place in ptimer on ptimer_set_limit(),...
Add PIIX4 properties to control PM system states.
This patch adds two things. First it allows QEMU to distinguish betweenregular powerdown and S4 powerdown. Later separate QMP notification willbe added for S4 powerdown. Second it allows S3/S4 states to be disabled...
Allow machines to configure the QEMU_VERSION that's exposed via hardware
QEMU exposes its version to the guest's hardware and in some cases that is wrong(e.g. Windows prints messages about driver updates when you switchthe QEMU version).There is a new field now on the struct QEmuMachine, hw_version, which may...
make: automatically include dependencies in recursive subdir rules (v2)
I think I understand enough of what's going on in these rules to ensure this isright. But I could certainly use a second or third opinion...
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'afaerber-or/qom-next-2' into staging
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
qdev: Remove qdev_prop_set_defaults
Instead, qdev_property_add_static can set the default.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev: Use wrapper for qdev_get_path
This makes it easier to remove it from BusInfo.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>[AF: Drop now unnecessary NULL initialization in scsibus_get_dev_path()]...
qdev: Move SysBus initialization to sysbus.c
TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing referencesto main_system_bus and system_bus_info there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev: Convert busses to QEMU Object Model
This is far less interesting than it sounds. We simply add an Object to eachBusState and then register the types appropriately. Most of the interestingrefactoring will follow in the next patches.
Since we're changing fundamental type names (BusInfo -> BusClass), it all needs...
qdev: Connect busses with their parent devices
This makes SysBus part of the root hierarchy and all busses children oftheir respective parent DeviceState.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qbus: Make child devices links
Make qbus children show up as link<> properties. There is no stableaddressing for qbus children so we use an unstable naming convention.
This is okay in QOM though because the composition name is expected tobe what's stable....
qbus: Initialize in standard way
Move code to an initfn and finalizer.Replace do_qbus_create_inplace() with qbus_realize().
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev: Remove qdev_prop_exists()
Can be replaced everywhere with object_property_find().
qom: Push error reporting to object_property_find()
Avoids duplicated error_set().
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>[AF: Also drop error_set() in object_property_del().]Signed-off-by: Andreas Färber <afaerber@suse.de>
m48t59: Rename "type" property to "model"
This resolves a name conflict with the qdev "type" property that isabout to move into Object.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>[AF: Add braces missing in original code.]Signed-off-by: Andreas Färber <afaerber@suse.de>
arm_l2x0: Rename "type" property to "cache-type"
Resolves a name conflict with the qdev "type" property that is about tobe moved to Object.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
qdev: Push "type" property up to Object
Now that Object is a type, add an instance_init function and pushthe "type" property from qdev to there.
qdev: Move bus properties to a separate global
Simple code movement in order to simplify future refactoring.
qdev: Move bus properties to abstract superclasses
In qdev, each bus in practice identified an abstract superclass, butthis was mostly hidden. In QOM, instead, these abstract classes areexplicit so we can move bus properties there.
All bus property walks are removed, and all device property walks...
qdev: Clean up global properties
Now that global properties do not depend on buses anymore, setthem directly in the device instance_init function.
Add event notification for guest balloon changes
After setting a balloon target value, applications have tocontinually poll 'query-balloon' to determine whether theguest has reacted to this request. The virtio-balloon backendknows exactly when the guest has reacted though, and thus it...
scsi-disk: Don't peek behind the BlockDriverState abstraction
Use the appropriate interface instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: support enable/disable write cache
Enabling or disabling the write cache is done with the SET FEATUREScommand. The command can be issued with sg_sat_set_features fromsg3-utils.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
xen: Don't change -drive if=xen device name during machine init
A "top" BlockDriverState has a non-empty device_name. If the userdoesn't specify one with -drive parameter id, the system supplies adefault name.
xen_config_dev_blk() changes this name, during machine initialization....
xen: Don't peek behind the BlockDriverState abstraction
First offender is xen_config_dev_blk()'s use of disk->bdrv->filename.Get the filename from disk->opts instead. Same result, except forsnapshots: there, we now get the filename specified by the user...
fdc: fix implied seek while there is no media in drive
The Windows uses 'READ' command at the start of an instalationwithout checking the 'dir' register. We have to abort the transferwith an abnormal termination if there is no media in the drive.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>...
xtensa_lx60: add missing #include "blockdev.h"
This should fix the following build failure:
/home/buildbot/slave-public/block_mingw32/build/hw/xtensa_lx60.c: In function 'lx_init':/home/buildbot/slave-public/block_mingw32/build/hw/xtensa_lx60.c:212: warning: implicit declaration of function 'drive_get'...
Un-inline fdctrl_init_isa()
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
xilinx_axidma: (un)reversed irq initialisation
The axidma irq orders are reversed in both the device model and the instantion.Undid both reversal (for no net change). Also needs to be reversed forconsistency with Xilinx tools IRQ listing.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>...
xilinx_uartlite: changed device name
Changed device name to xlnx,xps-uartlite. This is the exact name of the devicein the xilinx EDK development tools.
xilinx_timer: added default frequency
Added a reasonable default frequency for the xilinx timer (the 62MHz froms3adsp machine model).
xilinx_timer: changed nr_timers to one_timer_only
The configurable property for this IP in the Xilinx tools is a boolean switch"one-timer-only" that flicks this timer from being dual channel to single.Updated QEMU to work the same way for better match with the IP core and its TRM....
xilinx_timer: changed device name
Changed device name to xlnx,xps-timer. This is the exact name of the devicein the xilinx EDK development tools.
xilinx_intc: changed device name
Changed device name to xlnx,xps-intc. This is the exact name of the devicein the xilinx EDK development tools.
xilinx_ethlite: tweaked naming of ping-pong props
Changed "txpingpong" prop to "tx-ping-pong". Same for rx. This is done tomake the property name exactly match what is output by the xilinx tools forthis IP.
xilinx_ethlite: changed device name
Changed device name to xlnx,xps-ethernetlite. This is the exact name of thedevice in the xilinx EDK development tools.
xilinx_axienet: droped the c_ on parameters
Even though the xilinx tools do have C_ on all params by default, drop thisfor consistency with all the other xilinx IP (I.E. param names are the xilinxnames without the C_ prefix)
xilinx_axienet: changed device name
Changed device name to xlnx,axi-ethernet. This is the exact name of thedevice in the xilinx EDK development tools.
xilinx_axidma: changed device name
Changed device name to xlnx,axi-dma. This is the exact name of the device in theXilinx EDK development tools.
xilinx_axi*: Share devices between microblaze and microblazeel
Speeds up the build.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/xilinx_*: Share Xilinx devices between ppc and microblaze
xilinx_ethlite uses tswap32() and is thus target-dependent.
qdev: release parent properties on dc->init failure
While looking into hot-plugging bridges, I can create a qemu segfault via:
$ device_add pci-bridge
Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0. **ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)...
pci_bridge_dev: fix error path in pci_bridge_dev_initfn()
Currently, we do not properly cleanup, if pci_bridge_dev_initfnfails to initialize properly. Make sure to call pci_bridge_exitfn()in the error path.
Signed-off-by: Jason Baron <jbaron@redhat.com>...
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'afaerber-or/qom-next-1' into staging
Merge remote-tracking branch 'afaerber-or/qom-cpu-3a' into staging
Merge remote-tracking branch 'sstabellini/for_1.1.1' into staging
Merge remote-tracking branch 'kraxel/usb.52' into staging
kvm: i8254: Fix conversion of in-kernel to userspace state
Due to a offset between the clock used to generate the in-kernelcount_load_time (CLOCK_MONOTONIC) and the clock used for processing thisin userspace (vm_clock), reading back the output of PIT channel 2 via...
qemu/xendisk: set maximum number of grants to be used
Legacy (non-pvops) gntdev drivers may require this to be done when thenumber of grants intended to be used simultaneously exceeds a certaindriver specific default limit.
Signed-off-by: Jan Beulich <jbeulich@suse.com>...
kvm/apic: correct short memset
kvm_put_apic_state's attempt to clear kapic before setting itsbits cleared sizeof(void) bytes (no more than 8) rather than theintended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity.
Signed-off-by: Jim Meyering <meyering@redhat.com>...
integratorcp: Use cpu_arm_init() to obtain ARMCPU
Needed for arm_load_kernel().
Add missing braces.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Peter Maydell <peter.maydell@linaro.org>
musicpal: Use cpu_arm_init() to obtain ARMCPU
versatilepb: Use cpu_arm_init() to obtain ARMCPU
arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot()
Adapt exynos4210 and highbank accordingly.The parameter itself is unused.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos)
arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook()
Adapt highbank accordingly.
realview: Use cpu_arm_init() to obtain ARMCPU
Needed for arm_pic_init_cpu().
vexpress: Use cpu_arm_init() to obtain ARMCPU
exynos4210: Use cpu_arm_init() to store ARMCPU
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
pxa2xx: Pass ARMCPU to pxa2xx_pic_init()
Cleans up after storing ARMCPU in PXA2xxState.Prepares for storing ARMCPU in PXA2xxPICState.
pxa2xx_pic: Store ARMCPU in PXA2xxPICState
Prepares for moving halted field to CPUState.
pxa2xx_gpio: Store ARMCPU in PXA2xxGPIOInfo
Prepares for moving halted field into CPUState.
xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Peter A.G. Crosthwaite <peter.crosthwaite@petalogix.com>
arm_boot: Pass ARMCPU to arm_load_kernel()
In particular this simplifies the &s->mpu->cpu->env expression again.
first_cpu and ->next_cpu are expected to be QOM'ified later.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos)...
arm_pic: Pass ARMCPU to arm_pic_init_cpu()
Pass it through to arm_pic_cpu_handler().
xen_machine_pv: Use cpu_x86_init() to obtain X86CPU
Needed for moving halted field to CPUState.
Signed-off-by: Andreas Färber <afaerber@suse.de>Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
s390-virtio: Use cpu_s390x_init() to obtain S390CPU
Needed to store S390CPU in ipi_states[].
Signed-off-by: Andreas Färber <afaerber@suse.de>
s390-virtio: Let s390_cpu_addr2state() return S390CPU
Convert ipi_states to S390CPU**.
Needed for s390_cpu_restart() in handle_sigp().
tosa: Rename PXA2xxState variable
Avoid cpu->cpu by using "mpu" as variable name.
z2: Rename PXA2xxState variable
strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMState
Adapt collie accordingly.