Statistics
| Branch: | Revision:

root / hw / misc @ 1d5bf692

# Date Author Comment
1d5bf692 10/03/2013 06:10 pm Alexey Kardashevskiy

vfio: Fix debug output for int128 values

Memory regions can easily be 2^64 byte long and therefore overflow
for just a bit but that is enough for int128_get64() to assert.

This takes care of debug printing of huge section sizes.

Signed-off-by: Alexey Kardashevskiy <>...

f16f39c3 10/02/2013 10:51 pm Alex Williamson

vfio-pci: Implement PCI hot reset

Now that VFIO has a PCI hot reset interface, take advantage of it.
There are two modes that we need to consider. The first is when only
one device within the set of devices affected is actually assigned to
the guest. In this case the other devices are are just held by VFIO...

c7679d45 10/02/2013 09:52 pm Alex Williamson

vfio-pci: Add support for MSI affinity

When MSI is accelerated through KVM the vectors are only programmed
when the guest first enables MSI support.  Subsequent writes to the
vector address or data fields are ignored.  Unfortunately that means
we're ignore updates done to adjust SMP affinity of the vectors....

befe5176 10/02/2013 09:52 pm Alex Williamson

vfio-pci: Test device reset capabilities

Not all resets are created equal. PM reset is not very reliable,
especially for GPUs, so we might want to opt for a bus reset if a
standard reset will only do a D3hot->D0 transition. We can also
use this to tell if the standard reset will do a bus reset (if...

6f864e6e 10/02/2013 09:52 pm Alex Williamson

vfio-pci: Lazy PCI option ROM loading

During vfio-pci initfn, the device is not always in a state where the
option ROM can be read. In the case of graphics cards, there's often
no per function reset, which means we have host driver state affecting
whether the option ROM is usable. Ideally we want to move reading the...

8fbf47c3 10/02/2013 09:52 pm Alex Williamson

vfio-pci: Cleanup error_reports

Remove carriage returns and tweak formatting for error_reports.

Signed-off-by: Alex Williamson <>

213f0c4f 08/30/2013 10:15 pm Andreas Färber

qom: Pass available size to object_initialize()

To be passed on to object_initialize_with_type().

Acked-by: Cornelia Huck <> (virtio-ccw)
Signed-off-by: Andreas Färber <>

fb17dfe0 08/30/2013 10:15 pm Andreas Färber

qdev: Pass size to qbus_create_inplace()

To be passed to object_initialize().

Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument is
void*, so drop some superfluous (BusState *) casts or direct parent
field usages.

Signed-off-by: Andreas Färber <>

b5d54bd4 08/30/2013 01:21 am Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5

  • qemu-kvm/uq/master:
    kvm-stub: fix compilation
    kvm: shorten the parameter list for get_real_device()
    kvm: i386: fix LAPIC TSC deadline timer save/restore
    kvm-all.c: max_cpus should not exceed KVM vcpu limit...
bc72ad67 08/22/2013 08:14 pm Alex Bligh

aio / timers: Switch entire codebase to the new timer API

This is an autogenerated patch using scripts/switch-timer-api.

Switch the entire code base to using the new timer API.

Note this patch may introduce some line length issues.

Signed-off-by: Alex Bligh <>...

a5d3f640 08/12/2013 07:20 pm Marcel Apfelbaum

hw/misc: make pvpanic known to user

This patch is based on Hu Tao's:
http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00125.html

The pvpanic device may be enabled now with "-device pvpanic"
from command line.

Signed-off-by: Marcel Apfelbaum <>...

ca916d37 08/09/2013 10:19 pm Vincenzo Maffione

kvm: add KVM_IRQFD_FLAG_RESAMPLE support

Added an EventNotifier* parameter to
kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM
another eventfd to be used as "resamplefd". See the documentation
in the linux kernel sources in Documentation/virtual/kvm/api.txt...

5c0e12f5 07/29/2013 10:06 pm Andreas Färber

mst_fpga: QOM cast cleanup

Signed-off-by: Andreas Färber <>

af89a444 07/29/2013 10:06 pm Andreas Färber

puv3_pm: QOM cast cleanup

Signed-off-by: Andreas Färber <>

95eb2084 07/29/2013 10:06 pm Andreas Färber

slavio_misc: QOM cast cleanup for MiscState

Signed-off-by: Andreas Färber <>

f1a0a79f 07/29/2013 10:06 pm Andreas Färber

slavio_misc: QOM cast cleanup for APCState

Signed-off-by: Andreas Färber <>

a054e2c2 07/29/2013 10:06 pm Andreas Färber

zynq_slcr: QOM cast cleanup

Signed-off-by: Andreas Färber <>

ae1953d0 07/29/2013 10:06 pm Andreas Färber

arm_l2x0: Rename l2x0_state to L2x0State

Signed-off-by: Andreas Färber <>

0e8982e9 07/29/2013 10:06 pm Andreas Färber

arm_l2x0: QOM cast cleanup

Signed-off-by: Andreas Färber <>

ba4ea5bd 07/29/2013 10:06 pm Andreas Färber

arm_sysctl: QOM cast cleanup

Signed-off-by: Andreas Färber <>

100bb15c 07/29/2013 10:06 pm Andreas Färber

eccmemctl: QOM cast cleanup

Signed-off-by: Andreas Färber <>

b6e1df2e 07/29/2013 10:06 pm Andreas Färber

exynos4210_pmu: QOM cast cleanup

Signed-off-by: Andreas Färber <>

816d323b 07/29/2013 10:06 pm Andreas Färber

lm32_sys: QOM cast cleanup

Signed-off-by: Andreas Färber <>

829617a9 07/29/2013 10:06 pm Andreas Färber

milkymist-hpdmc: QOM cast cleanup

Signed-off-by: Andreas Färber <>

aee31f7b 07/29/2013 10:06 pm Andreas Färber

milkymist-pfpu: QOM cast cleanup

Signed-off-by: Andreas Färber <>

bcb34c7a 07/29/2013 10:06 pm Andreas Färber

imx_ccm: QOM cast cleanup

Introduce type constant and use QOM casts.

Acked-by: Peter Chubb <>
Signed-off-by: Andreas Färber <>

125ee0ed 07/29/2013 06:37 pm Marcel Apfelbaum

devices: Associate devices to their logical category

The category will be used to sort the devices displayed in
the command line help.

Signed-off-by: Marcel Apfelbaum <>
Message-id: ...

d2f5ea97 07/25/2013 04:12 pm Paolo Bonzini

pc-testdev: add I/O port to test memory.c auto split/combine

The ports at 0xe8..0xeb have impl.min/max_access_size == 1, so
that memory accesses are split and combined by the memory core.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>...

b7faba71 07/25/2013 04:12 pm Paolo Bonzini

pc-testdev: support 8 and 16-bit accesses to 0xe0

This will let us use the testdev to test endianness.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>
Message-id: ...

50405435 07/25/2013 04:12 pm Paolo Bonzini

pc-testdev: remove useless cpu_to_le64/le64_to_cpu

So far the device was only used on little-endian machines.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>
Message-id: ...

6d27a409 07/23/2013 01:37 am Andreas Färber

misc/pci-testdev: QOM parent field cleanup

Replace direct uses of PCITestDevState::dev with QOM casts and rename it
to parent_obj.

Acked-by: Peter Crosthwaite <>
Signed-off-by: Andreas Färber <>

eb3fedf3 07/23/2013 01:37 am Peter Crosthwaite

misc/ivshmem: QOM Upcast Sweep

Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <>
[AF: Simplified casts and converted two more DO_UPCAST()s]...

b7578eaa 07/23/2013 01:37 am Andreas Färber

misc/ivshmem: QOM parent field cleanup

Replace direct uses of IVShmemState::dev with QOM casts and rename it to
parent_obj.

Acked-by: Peter Crosthwaite <>
Signed-off-by: Andreas Färber <>

40108d0a 07/23/2013 01:37 am Peter Crosthwaite

misc/pci-testdev: QOM Upcast Sweep

Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <>
[AF: Replaced another DO_UPCAST()]
Signed-off-by: Andreas Färber <>

90c66f58 07/22/2013 06:13 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/tracing' into staging

  1. By Markus Armbruster
  2. Via Stefan Hajnoczi
    • stefanha/tracing:
      trace-events: Fix up source file comments
      trace-events: Drop unused events
      milkymist-minimac2: Fix minimac2_read/_write tracepoints...
f3a64b8c 07/18/2013 06:44 am Markus Armbruster

slavio_misc: Fix slavio_led_mem_readw/_writew tracepoints

Broken since they got added in commit 97bf485.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Stefan Hajnoczi <>

7b4b0e9e 07/16/2013 12:49 am Vijay Mohan Pandarathil

vfio: QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

Add support for error containment when a VFIO device assigned to a KVM
guest encounters an error. This is for PCIe devices/drivers that support AER
functionality. When the host OS is notified of an error in a device either...

39360f0b 07/16/2013 12:48 am Alex Williamson

vfio-pci: VGA quirk update

Turns out all the suspicions for AMD devices were correct, everywhere
we read a BAR address that the address matches the config space offset,
there's full access to PCI config space. Attempt to generalize some
helpers to allow quirks to easily be added for mirrors and windows....

03ee3b1e 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Move processing to io

Soon we will introduce intermediate processing pauses which will
allow the bottom half to restart a DMA request that couldn't be
fulfilled yet.

For that to work, move the processing variable into the io struct
which is what DMA providers work with....

a0f9fdfd 07/11/2013 07:51 pm Alexander Graf

PPC: Add timer handler for newworld mac-io

Mac OS X accesses fancy timer registers inside of the mac-io on bootup.

These really should be ticking at the mac-io bus frequency, but I don't
see anyone upset when we just make them as fast as we want to.

With this patch on top of my previous patch queue and latest OpenBIOS...

14eefd0e 07/11/2013 07:51 pm Alexander Graf

PPC: g3beige: Move secondary IDE bus to mac-io

On a real G3 Beige the secondary IDE bus lives on the mac-io chip, not
on some random PCI device. Move it there to become more compatible.

While at it, also clean up the IDE channel connection logic.

Signed-off-by: Alexander Graf <>

9e232428 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Replace tabs with spaces

s/^I/ /g on the file with a few manual tweaks to align things.

Signed-off-by: Alexander Graf <>

33ce36bb 07/11/2013 07:51 pm Alexander Graf

PPC: Mac: Add debug prints in macio and dbdma code

The macio code is basically undebuggable as it stands today, with no
debug prints anywhere whatsoever. DBDMA was better, but I needed a
few more to create reasonable logs that tell me where breakage is.
...

58c0c311 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Fix debug print

There was a debug print that didn't compile for me because the format
and the arguments weren't in sync. Fix it up.

Signed-off-by: Alexander Graf <>

7eaba824 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Allow new commands in RUN state

The DBDMA controller can not change its command stream while it's
actively streaming data, true. But the fact that it's in RUN state
doesn't actually indicate anything. It could just as well be in
WAIT while in RUN. And then it's legal to change commands....

f2f963fd 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Move defines into header file

We usually keep struct and constant definitions in header files. Move
them there to stay consistent and to make access to fields easier.

Signed-off-by: Alexander Graf <>

d1e562de 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Introduce kick function

The DBDMA engine really is running all the time, waiting for input. However
we don't want to waste cycles constantly polling.

So introduce a kick function that data providers can call to notify the
DBDMA controller of new input....

d2f0ce21 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Move static bh variable to device struct

The DBDMA controller has a bottom half to asynchronously process DMA
request queues.

This bh was stored as a gross static variable. Move it into the device
struct instead.

While at it, move all users of it to the new generic kick function....

4917cf44 07/09/2013 10:20 pm Andreas Färber

cpu: Replace cpu_single_env with CPUState current_cpu

Move it to qom/cpu.h.

Signed-off-by: Andreas Färber <>

dc11549e 07/08/2013 04:00 pm Anthony Liguori

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci,misc enhancements

This includes some pci enhancements:

Better support for systems with multiple PCI root buses
FW cfg interface for more robust pci programming in BIOS
Minor fixes/cleanups for fw cfg and cross-version migration -...

3c161542 07/04/2013 06:42 pm Paolo Bonzini

hw/m*: pass owner to memory_region_init* functions

Signed-off-by: Paolo Bonzini <>

5cb022a1 07/04/2013 06:42 pm Paolo Bonzini

vfio: pass device to vfio_mmap_bar and use it to set owner

Cc: Alex Williamson <>
Signed-off-by: Paolo Bonzini <>

dfde4e6e 07/04/2013 06:42 pm Paolo Bonzini

memory: add ref/unref calls

Add ref/unref calls at the following places:

- places where memory regions are stashed by a listener and
used outside the BQL (including in Xen or KVM).

- memory_region_find callsites

- creation of aliases and containers (only the aliased/contained...

d67f679d 07/04/2013 06:42 pm Jan Kiszka

vmport: Disentangle read handler type from portio

In case the latter may vanish one day, make sure the vmport read handler
type will remain unaffected. This is also conceptually cleaner.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

2c9b15ca 07/04/2013 06:42 pm Paolo Bonzini

memory: add owner argument to initialization functions

Signed-off-by: Paolo Bonzini <>

e3914e3a 07/04/2013 06:42 pm Jan Kiszka

applesmc: replace register_ioport*

Convert over to memory regions to obsolete register_ioport*.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

bc3e6a0d 07/04/2013 10:42 am Michael S. Tsirkin

pvpanic: initialization cleanup

Avoid use of static variables: PC systems
initialize pvpanic device through pvpanic_init,
so we can simply create the fw_cfg file at that point.
This also makes it possible to skip device
creation completely if fw_cfg is not there, e.g. for xen -...

fea7d596 07/04/2013 10:42 am Michael S. Tsirkin

pvpanic: fix fwcfg for big endian hosts

Convert port number to little endian when
exposing it in fw cfg.

Signed-off-by: Michael S. Tsirkin <>

0d54a502 07/01/2013 02:11 am Alexander Graf

mac-io: Add escc-legacy memory alias region

Mac OS X's debugging serial driver accesses the ESCC through a different
register layout, called "escc-legacy". This layout differs from the normal
escc register layout purely by the location of the respective registers....

cb446eca 06/28/2013 02:25 pm Andreas Färber

kvm: Change cpu_synchronize_state() argument to CPUState

Change Monitor::mon_cpu to CPUState as well.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

f3c8fac2 06/25/2013 08:42 pm Stefan Weil

i.MX31: Fix PRCS bit test

cppcheck detected a condition which was always false.

According to the MCIMX31 Reference Manual, the PRCS bits have to be 01
to select the Frequency Pre-Multiplier (FPM). PRCS uses bits 1 and 2,
so we have to test for 2.

Signed-off-by: Stefan Weil <>...

052e87b0 06/20/2013 05:32 pm Paolo Bonzini

memory: make section size a 128-bit integer

So far, the size of all regions passed to listeners could fit in 64 bits,
because artificial regions (containers and aliases) are eliminated by
the memory core, leaving only device regions which have reasonable sizes...

06d985f5 06/20/2013 05:32 pm Avi Kivity

vfio: abort if an emulated iommu is used

vfio doesn't support guest iommus yet, indicate it to the user
by gently depositing a core on their disk.

Reviewed-by: Peter Maydell <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Paolo Bonzini <>

371a775d 06/15/2013 01:53 pm Blue Swirl

Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu

  • 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu:
    qdev: Drop FROM_QBUS() macro
    isa: QOM'ify ISADevice
    isa: QOM'ify ISABus
    i8259: Convert PICCommonState to use QOM realizefn...
baefb8bf 06/12/2013 12:17 pm Stefan Hajnoczi

ivshmem: add missing error exit(2)

If the user fails to specify 'chardev' or 'shm' then we cannot continue.
Exit right away so that we don't invoke shm_open(3) with a NULL pointer.

It would be nice to replace exit(1) with error returns in the PCI device...

db895a1e 06/07/2013 01:14 pm Andreas Färber

isa: Use realizefn for ISADevice

Drop ISADeviceClass::init and the resulting no-op initfn and let
children implement their own realizefn. Adapt error handling.
Split off an instance_init where sensible.

Signed-off-by: Andreas Färber <>

c3c4fe35 06/02/2013 06:14 pm Michael S. Tsirkin

pvpanic: use FWCfgState explicitly

Use the type-safe FWCfgState structure instead
of the unsafe void *.

Signed-off-by: Michael S. Tsirkin <>

600c60b7 06/02/2013 06:14 pm Michael S. Tsirkin

fw_cfg: add API to find FW cfg object

Remove some code duplication by adding a
function to look up the fw cfg file.
This way, we don't need to duplicate same strings everywhere.
Use by both fw cfg and pvpanic device.

Signed-off-by: Michael S. Tsirkin <>

997aba8e 05/18/2013 03:35 pm Michael Tokarev

remove some double-includes

Some source files #include the same header more than
once for no good reason. Remove second #includes in
such cases.

Signed-off-by: Michael Tokarev <>

eec3d2ad 04/30/2013 06:30 pm Hu Tao

introduce a new qom device to deal with panicked event

pvpanic device is used to send guest panic event from guest to qemu.

When guest panic happens, pvpanic device driver will write a event
number to IO port 0x505(which is the IO port occupied by pvpanic device,...

10a584b2 04/30/2013 06:30 pm Hu Tao

pvpanic: pass configurable ioport to seabios

This lets seabios patch the corresponding SSDT entry.

Also add fw_cfg object to /machine/fw_cfg so we can reference
it elsewhere.

Signed-off-by: Hu Tao <>
Reviewed-by: Markus Armbruster <>...

3ab135f3 04/30/2013 06:30 pm Hu Tao

pvpanic: create pvpanic by default for machine 1.5

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Hu Tao <>
Reviewed-by: Markus Armbruster <>
Message-id: ...

f02317ad 04/29/2013 04:27 pm Andreas Färber

vmport: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.

Drop reserved underscore from struct name while at it.

Signed-off-by: Andreas Färber <>
Signed-off-by: Andreas Färber <>...

b582b5a3 04/29/2013 04:27 pm Andreas Färber

sga: QOM'ify

Introduce type constant and cast macro.

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <>
Signed-off-by: Andreas Färber <>
Message-id:
Signed-off-by: Anthony Liguori <>

82407b6c 04/29/2013 04:27 pm Andreas Färber

applesmc: QOM'ify

Add a typedef for the state struct and rename from Status to State.
Add type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <>
Signed-off-by: Andreas Färber <>...

f691df52 04/19/2013 04:38 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  1. By Stefan Weil (3) and others
  2. Via Stefan Hajnoczi
    • stefanha/trivial-patches:
      m25p80: Remove bogus include of devices.h
      ssh: Remove unnecessary use of strlen function.
      block/ssh: Add missing gcc format attributes...
5dff24be 04/19/2013 04:38 pm Anthony Liguori

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci: add pci test device

This adds a new device that we can use for testing PCI PIO and MMIO, with and
without ioeventfd in different configurations. FAST_MMIO will be added if/when
kvm supports it. Also included are minor cleanups in kvm APIs that it needs....

e1fe50dc 04/19/2013 12:36 pm Stefan Weil

Remove unneeded type casts

cpu_physical_memory_read, cpu_physical_memory_write take any pointer
as 2nd argument without needing a type cast.

Signed-off-by: Stefan Weil <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Stefan Hajnoczi <>

22773d60 04/16/2013 01:41 am Michael S. Tsirkin

pci: add pci test device

This device is used for kvm unit tests,
currently it supports testing performance of ioeventfd.
Using updated kvm unittest, here's an example output:
mmio-no-eventfd:pci-mem 8796
mmio-wildcard-eventfd:pci-mem 3609...

dccfcd0e 04/15/2013 07:19 pm Paolo Bonzini

sysemu: avoid proliferation of include/ subdirectories

Signed-off-by: Paolo Bonzini <>

bd2be150 04/15/2013 04:16 pm Peter Maydell

arm: fix location of some include files

The recent rearrangement of include files had some minor errors:
devices.h is not ARM specific and should not be in arm/
arm.h should be in arm/

Move these two headers to correct this.

Signed-off-by: Peter Maydell <>...

e28bee8e 04/08/2013 07:13 pm Paolo Bonzini

hw: move other devices to hw/misc/, configure with default-configs/

Signed-off-by: Paolo Bonzini <>

47b43a1f 04/08/2013 07:13 pm Paolo Bonzini

hw: move private headers to hw/ subdirectories.

Many headers are used only in a single directory. These can be
kept in hw/.

Signed-off-by: Paolo Bonzini <>

ba25df88 04/08/2013 07:13 pm Paolo Bonzini

hw: move VFIO and ivshmem to hw/misc/

Signed-off-by: Paolo Bonzini <>

49ab747f 04/08/2013 07:13 pm Paolo Bonzini

hw: move target-independent files to subdirectories

This patch tackles all files that are compiled once, moving
them to subdirectories of hw/.

Signed-off-by: Paolo Bonzini <>

1fd6bb44 04/08/2013 07:13 pm Paolo Bonzini

hw: make subdirectories for devices

Prepare the new directory structure.

Signed-off-by: Paolo Bonzini <>