target-xtensa: add Avnet LX60/LX110/LX200 boards
These boards carry similar hardware: SDRAM (48M for LX110, 64M for LX60,96M for LX200), 16 Mbyte FLASH, FPGA, 10/100 Mbps Ethernet PHY and 16550UART. FPGA may be loaded with almost any Tensilica processor. It is also...
hw: add OpenCores 10/100 Mbps Ethernet controller
This is OpenCores Ethernet MAC + subset of National SemiconductorsDP83838C PHY.OpenCores Ethernet MAC project: http://opencores.org/project,ethmac
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-xtensa: rename dc232b board to sim
This is to get aligned with the linux name for this machine.
target-xtensa: implement external interrupt mapping
Xtensa cores may have different mapping of external interrupt pins tointernal IRQ numers. Implement API to acquire core IRQ by its externalinterrupt number.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>...
target-xtensa: remove hand-written xtensa cores implementations
target-xtensa: fix guest hang on masked CCOMPARE interrupt
QEMU timer is used to post CCOMPARE interrupt when the core is halted.If that CCOMPARE interrupt is masked off then the timer must be rearmedin the callback, otherwise it will be rearmed next time the core goes to...
Move graphic-related coalesced MMIO flushes to affected device models
This is conceptually cleaner and will allow us to drop the nographictimer. Moreover, it will be mandatory to fully exploit future per-devicecoalesced MMIO rings.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'kraxel/usb.28' into staging
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
arm_pic: Fix typo
interrput -> interrupt
Cc: Paul Brook <paul@codesourcery.com>Signed-off-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
usb-hub: don't trigger assert on packet completion.
Calling usb_packet_complete() recursively when passing up the completionevent up the chain for devices connected via usb hub will trigger anassert. So don't do that, make the usb hub emulation call the upstream...
usb-storage: fix NULL pointer dereference.
When a usb packet is canceled we need to check whenever we actually havea scsi request in flight before we try to cancel it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-hub: need to check dev->attached
commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a did that for all hostcontrollers, the usb hub was left out by accident.
usb: fix port reset
commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicitdetach before (re-)attaching in usb_attach(). Some usb host controllersused that behavior though to do a port reset by a detach+attachsequence.
This patch establishes old behavior by adding a new usb_reset() function...
hw/usb-ohci: Fix OHCI_TD_T1 bit position definition
The OHCI Transfer Descriptor T (DataToggle) bits are 24 and 25;fix an error which accidentally overlaid them both on the same bit.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-ohci: Honour endpoint maximum packet size
Honour the maximum packet size for endpoints; this applies whensending non-isochronous data and means we transfer only asmuch as the endpoint allows, leaving the transfer descriptoron the list for another go next time around. This allows...
usb-hid: activate usb tablet / mouse after migration.
qemu uses the ps/2 mouse by default. The usb tablet (or mouse) isactivated as soon as qemu sees some guest activity on the device,i.e. polling for HID events. That used to work fine for both fresh...
pc: Convert port92 to isa_register_ioport
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
vmport: Convert to isa_register_ioport
ide: Convert to isa_register_portio_list
isa: Remove isa_init_ioport_range and isa_init_ioport
All users have been converted to either isa_register_ioportor isa_register_old_portio_list.
fdc: Convert to isa_register_portio_list
gus: Convert to isa_register_portio_list
m48t59: Convert to isa_register_ioport
The sysbus interface is as yet unconverted.
rtc: Convert to isa_register_ioport
ne2000: Convert to isa_register_ioport
parallel: Convert to isa_register_portio_list
sb16: Convert to isa_register_portio_list
vga: Convert to isa_register_portio_list
[jan: fix cut'n'paste errors][avi: adjust pci variants not to use isa functions]
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Avi Kivity <avi@redhat.com>
isa: Add isa_register_portio_list()
scsi: Support I/O status
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: Support I/O status
virtio: Support I/O status
hw/lan9118.c: Convert to MemoryRegion
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Avi Kivity <avi@redhat.com>
palm: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
petalogix_ml605: convert to memory API
petalogix_s2adsp1800: convert to memory API
ppc405_boards: convert to memory API
hw/arm11mpcore: Clean up to avoid using sysbus_mmio_init_cb2
Clean up the initialisation of the realview_mpcore device to avoidusing sysbus_init_mmio_cb2(): we can pass through the MemoryRegionof the private arm11mpcore_priv device directly now.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
hw/versatile_pci: Expose multiple sysbus mmio regions
Clean up versatile_pci to expose the various PCI mmio regionsproperly as separate mmio regions rather than as a single mmiowhich uses callbacks to map and unmap everything.
ppc_newworld: convert to memory API
isa: Tidy support code for isabus_get_fw_dev_path
The only user of ISADevice.ioports is isabus_get_fw_dev_path, and itonly looks at the first entry of the array. Which suggests that thisentire array+sort operation can be replaced by a simple minimum....
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Restore consistent formattingSigned-off-by: malc <av1474@comtv.ru>
Merge remote-tracking branch 'upstream' into memory/batch
target-alpha: Fix compilation errors for 32 bit hosts
On i386, these errors were reported:
qemu/hw/alpha_dp264.c: In function ‘clipper_init’:qemu/hw/alpha_dp264.c:158: error: integer constant is too large for ‘unsigned long’ type
qemu/hw/alpha_typhoon.c: In function ‘typhoon_init’:...
Merge branch 'axp-system-7' of git://repo.or.cz/qemu/rth
target-alpha: Add CLIPPER emulation.
This is a DP264 variant, SMP capable, no unusual hardware present.
The emulation does not currently include any PCI IOMMU code.Hopefully the generic support for that can be merged to HEAD soon.
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-alpha: Add high-resolution access to wall clock and an alarm.
The alarm is a fully general one-shot time comparator, which will beusable under Linux as a hrtimer source. It's much more flexible thanthe RTC source available on real hardware.
The wall clock allows the guest access to the host timekeeping. Much...
Merge branch 'for-upstream' of git://git.serverraum.org/git/mw/qemu-lm32
PPC: booke timers
While working on the emulation of the freescale p2010 (e500v2) I realized thatthere's no implementation of booke's timers features. Currently mpc8544 usesppc_emb (ppc_emb_timers_init) which is close but not exactly like booke (forexample booke uses different SPR)....
PPC: Clean up BookE timer code
The BookE timer code had some written-but-not-read variables. Get ridof them.
Signed-off-by: Alexander Graf <agraf@suse.de>
pseries: Refactor spapr irq allocation
Paulo Bonzini changed the original spapr code, which manually assigned irqnumbers for each virtual device, to allocate them automatically from thedevice initialization. That allowed spapr virtual devices to be constructed...
pseries: Implement set-time-of-day RTAS function
Currently there is no implementation for set-time-of-day rtas function,which causes the following warning "setting the clock failed (-1)" onthe guest.
This patch just creates this function, get the timedate diff and store in...
openpic: Unfold write_IRQreg
The helper function write_IRQreg was always called with a specific argument onthe type of register to access. Inside the function we were simply doing aswitch on that constant argument again. It's a lot easier to just unfold this...
ppc: move ADB stuff from ppc_mac.h to adb.h
Allow to use ADB in non-ppc macintosh
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: Fix via-cuda memory registration
Commit 23c5e4ca (convert to memory API) broke the VIA Cuda emulation layerby not registering the IO structs.
This patch registers them properly and thus makes -M g3beige and -M mac99work again.
Tested-by: Andreas Färber <andreas.faerber@web.de>...
PPC: Fix heathrow PIC to use little endian MMIO
During the memory API conversion, the indication on little endianness ofMMIO for the heathrow PIC got dropped. This patch adds it back again.
ppc405: use RAM_ADDR_FMT instead of %08lx
The RAM_ADDR_FMT macro hides the type of ram_addr_t so that formatstrings can be safely used. Make sure to use RAM_ADDR_FMT so that thebuild works on 32-bit hosts with Xen enabled. Whether Xen should affectppc TCG targets is questionable but a separate issue....
openpic: Unfold read_IRQreg
The helper function read_IRQreg was always called with a specific argument onthe type of register to access. Inside the function we were simply doing aswitch on that constant argument again. It's a lot easier to just unfold this...
vscsi: send the CHECK_CONDITION status down together with autosense data
I introduced this bug in commit 05751d3 (vscsi: always use get_sense,2011-08-03) because at the time there was no way to expose a sensecondition to SLOF and Linux manages to work around the bug. However,...
pseries: Add real mode debugging hcalls
PAPR systems support several hypercalls intended for use in real modedebugging tools. These implement reads and writes to arbitrary guestphysical addresses. This is useful for real mode software because itallows access to IO addresses and memory outside the RMA without going...
pseries: use macro for firmware filename
For some time we've had a nicely defined macro with the filename for ourfirmware image. However we didn't actually use it in the place we'resupposed to. This patch fixes it.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>...
kvm: ppc: booke206: use MMU API
Share the TLB array with KVM. This allows us to set the initial TLBboth on initial boot and reset, is useful for debugging, and couldeventually be used to support migration.
Signed-off-by: Scott Wood <scottwood@freescale.com>...
ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages
This definition is backward compatible with MAV=1.0 as long asthe guest does not set reserved bits in MAS1/MAS4.
Also, fix the shift in booke206_tlb_to_page_size -- it's the basethat should be able to hold a 4G page size, not the shift count....
pseries: Implement hcall-bulk hypervisor interface
This patch adds support for the H_REMOVE_BULK hypercall on the pseriesmachine. Strictly speaking this isn't necessarym since the kernel willonly attempt to use this if hcall-bulk is advertised in the device tree,...
pseries: interrupt controller should not have a 'reg' property
The interrupt controller presented in the device tree for the pseriesmachine is manipulated by the guest only through hypervisor calls. Ithas no real or emulated registers for the guest to access....
pseries: More complete WIMG validation in H_ENTER code
Currently our implementation of the H_ENTER hypercall, which inserts amapping in the hash page table assumes that only ordinary memory is evermapped, and only permits mapping attribute bits accordingly (WIMG==0010)....
MPC8544DS: Generate CPU nodes on init
With this patch, we generate CPU nodes in the machine initialization, givingus the freedom to generate as many nodes as we want and as the machine supports,but only those.
This is a first step towards a much cleaner device tree generation...
PPC: E500: Bump CPU count to 15
Now that we have everything in place, make the machine descriptionaware of the fact that we can now handle 15 virtual CPUs!
v1 -> v2:
- Max cpus is 15 because of MPIC
PPC: Enable to use PAPR with PR style KVM
When running PR style KVM, we need to tell the kernel that we wantto run in PAPR mode now. This means that we need to pass some moreregister information down and enable papr mode. We also need to alignthe HTAB to htab_size boundary....
PPC: SPAPR: Use KVM function for time info
One of the things we can't fake on PPC is the timer speed. Sowe need to extract the frequency information from the host andput it back into the guest device tree.
Luckily, we already have functions for that from the non-pseries...
pseries: Bugfixes for interrupt numbering in XICS code
The implementation of the XICS interrupt controller contains several(difficult to trigger) bugs due to the fact that we were not 100%consistent with which irq numbering we used. In most places, global...
pseries: Add a phandle to the xicp interrupt controller device tree node
Future devices we will be adding to the pseries machine (e.g. PCI) willneed nodes in the device tree which explicitly reference the top-levelinterrupt controller via interrupt-parent or interrupt-map properties....
PPC: E500: Update cpu-release-addr property in cpu nodes
The guest OS wants to know where the guest spins, so let's tell him whileupdating the CPU nodes with the frequencies anyways.
- use new spin table address
PPC: E500: Add PV spinning code
CPUs that are not the boot CPU need to run in spinning code to check if theyshould run off to execute and if so where to jump to. This usually happensby leaving secondary CPUs looping and checking if some variable in memory...
PPC: E500: Update freqs for all CPUs
Now that we can so nicely find out the host's frequencies, we should alsomake sure that we get them into all virtual CPUs' device tree nodes.
PPC: E500: Remove unneeded CPU nodes
We should only keep CPU nodes in the device tree around that we really havevirtual CPUs for. So remove all superfluous entries that we just keep therein case someone wants to create a lot of vCPUs.
PPC: bamboo: Move host fdt copy to target
We have some code in generic kvm_ppc.c that is only used by 440. Move tothe 440 specific device code.
PPC: E500: Use generic kvm function for freq
Now that we have generic KVM functions to read out the host tb and clockfrequencies, let's use them in the e500 code!
PPC: E500: Remove mpc8544_copy_soc_cell
We don't need mpc8544_copy_soc_cell anymore, since we're explicitly readinghost values and writing guest values respectively.
PPC: bamboo: Use kvm api for freq and clock frequencies
Now that we have nice and shiny APIs to read out the host's clock and timebasefrequencies, let's use them in the bamboo code as well!
PPC: Add CPU local MMIO regions to MPIC
The MPIC exports a register set for each CPU connected to it. They can allbe accessed through specific registers or using a shadow page that is mappeddifferently depending on which CPU accesses it.
This patch implements the shadow map, making it possible for guests to access...
PPC: Extend MPIC MMIO range
The MPIC exports a page for each CPU that it controls. To support more thanone CPU, we need to also reserve the MMIO space according to the amount ofCPUs we want to support.
PPC: Fix IPI support in MPIC
The current IPI support in the MPIC code is incomplete and doesn't work. Thiscode adds proper support for IPIs in MPIC by using the IDE register to rememberwhich CPUs IPIs are still outstanding to. New triggers through the IPI trigger...
PPC: Set MPIC IDE for IPI to 0
We use the IDE register with IPIs as a mask to keep track which processorshave already acknowledged the respective interrupt. So we need to initializeit to 0 to make sure that it doesn't accidently fire an IPI on CPU0 when the...
PPC: MPIC: Remove read functionality for WO registers
The IPI dispatch registers are write only according to every MPICspec I have found. So instead of pretending you could read back somethingfrom them, better not handle them at all.
Reported-by: Elie Richa <richa@adacore.com>...
PPC: MPIC: Fix CI bit definitions
The bit definitions for critical interrupt routing are in PowerPC order(most significant bit is 0), while we end up shifting it with normal bitorder. Turn the numbers around so we actually end up fetching theright ones....
PPC: Bump MPIC up to 32 supported CPUs
The MPIC emulation is now capable of handling up to 32 CPUs. Reflect that inthe code exporting the numbers out and fix an integer overflow while at it.
v1 -> v2:...
PPC: E500: create multiple envs
When creating a VM, we should go through smp_cpus and create a virtual CPU forevery CPU the user requested. This patch adds support for that and moves somecode around to make that more convenient.
PPC: E500: Generate IRQ lines for many CPUs
Now that we can generate multiple envs for all our virtual CPUs, wealso need to tell the MPIC that we have multiple CPUs connected andconnect them all to the respective virtual interrupt lines.
spapr: proper qdevification
Right now the spapr devices cannot be instantiated with -device,because the IRQs need to be passed to the spapr_*_create functions.Do this instead in the bus's init wrapper.
This is particularly important with the conversion from scsi-disk...
spapr: prepare for qdevification of irq
Restructure common properties for sPAPR devices so that IRQ definitionscan be added in one place.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Alexander Graf <agraf@suse.de>Cc: David Gibson <david@gibson.dropbear.id.au>...
spapr: make irq customizable via qdev
This also lets the user see the irq in "info qtree".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Alexander Graf <agraf@suse.de>Cc: David Gibson <david@gibson.dropbear.id.au>Signed-off-by: Alexander Graf <agraf@suse.de>
gt64xxx.c: fix length modifier in DPRINTF format string
The commit fc2bf44972349b078d8310466c3866615500e67fchanged the type of val argument of the function gt64120_writel()from uint32_t to uint64_t, so we need to change the correspondinglength modifier from "%x" to "%" PRIx64....
gt64xxx.c: remove reference to non-existing ISD_handle field
The commit fc2bf44972349b078d8310466c3866615500e67fremoved ISD_handle field from struct GT64120State,so remove the field from DPRINTF too.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>...
lsi: Fix tag reference in debug print
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>