Age | Commit message (Collapse) | Author |
|
Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* upstream-merge:
target-mips: Enable access to required RDHWR hardware registers
monitor: move json init from OPEN event to init
boards: add a 'none' machine type to all platforms
Update version for 1.2.0-rc1 release
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit '94159135cb59684853dcd45ff70d6dbc54a29209':
target-mips: Enable access to required RDHWR hardware registers
monitor: move json init from OPEN event to init
boards: add a 'none' machine type to all platforms
Update version for 1.2.0-rc1 release
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Inform the user properly when trying to register an IRQ-using device
without in-kernel irqchip enabled.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Remove remainders of previous refactorings.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
This is more appropriate and allows central handling.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
No functional changes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Move device-assignment.c into hw/kvm, calling it pci-assign.c now, just
like its device name.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
There are no other dependencies of device assignment except for
CONFIG_KVM and an x86 target. So there is also no point in controlling
this feature via configure.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Hurray!
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Avoid passing kvm_assigned_irq on MSI-X assignment. Drop kvm_assign_irq
as it's now no longer used.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Use kvm_irqchip_add_msi_route and introduce kvm_irqchip_update_msi_route
to set up the required IRQ routes for MSI-X injections. This removes the
last direct interaction with the IRQ routing API of the KVM kernel so
that we can remove/unexport related services.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
The refactored version cleanly hides the KVM IOCTL structure from the
users and also zeros out the padding field.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
The refactored version cleanly hides the KVM IOCTL structure from the
users and also zeros out the padding field.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Encapsulate the ugly check if MSI-X assignment is supported in a
separate helper function.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Introduce kvm_device_msi_assign and use upstream's
kvm_irqchip_add_msi_route/kvm_irqchip_release_virq to provide MSI
support for assigned devices.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Helps valgrind, doesn't cost much (compared to the associated PCI config
space write). Align variable naming to other helpers at this chance.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Move kvm_device_intx_set_mask prototype and implementation to their
upstream positions.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Avoid passing kvm_assigned_irq on INTx assignment and separate this
function from (to-be-refactored) MSI/MSI-X assignment.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Introduce three new KVM services, kvm_device_intx/msi/msix_deassign, to
release assigned interrupts. These no longer require to pass
pre-initialized kvm_assigned_irq structures but only request required
parameters.
To trace which type of interrupt is currently assigned, use a new enum
AssignedIRQType instead of KVM constants.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
The previous name may incorrectly suggest that this function assigns all
types of IRQs though it's only dealing with legacy interrupts.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
In contrast to the old wrappers, the new ones only take the required
parameters instead of a preinitialized kvm_assigned_pci_dev structure.
We also move the dev_id generation into kvm_device_pci_assign and store
the result in the AssignedDevice structure. It will serve as handle for
all upcoming kvm_device_* functions.
While refactoring these services, start moving KVM services where they
should finally end up in upstream QEMU: in the i386-specific KVM layer.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
If we fail before or inside assigned_dev_register_regions, we so far
unconditionally unregistered IO resources, triggering an assertion in
the memory layer. Non-null u.r_baseport tells us if the region has been
registered.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
While running in the usermode emulator all of the required*
MIPS32r2 RDHWR hardware registers should be accessible (the
Linux kernel enables access to these same registers). Note
that these registers are still enabled when the MIPS ISA is
not release 2. This is OK since the Linux kernel emulates
access to them when they are not available in hardware.
* There is also the ULR register which is only recommended
for full release 2 compliance. Incidentally, accessing
this register in the current implementation works fine
without flipping its access bit.
Signed-off-by: Meador Inge <meadori@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
At some point in the past, the OPEN event was changed to be issued from a
bottom half. This creates a small window whereas a data callback registered in
init may be invoked before the OPEN event has been issued.
This is reproducible with:
echo "{'execute': 'qmp_capabilities'}" | qemu-system-x86_64 -M none -qmp stdio
We can fix this for the monitor by moving the parser initialization to init.
The remaining state that is set in OPEN appears harmless.
Reported-by: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
* upstream-merge: (63 commits)
qapi: add 'query-target' command to return target arch
pci: Tidy up PCI host bridges
pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE
pci_host: Turn into SysBus-derived QOM type
unin_pci: QOM'ify UniNorth PCI host bridges
spapr_pci: QOM'ify sPAPR PCI host bridge
prep_pci: QOM'ify Raven PCI host bridge
ppce500_pci: QOM'ify e500 PCI host bridge
ppc4xx_pci: QOM'ify ppc4xx PCI host bridge
gt64xxx: QOM'ify GT64120 PCI host bridge
grackle_pci: QOM'ify Grackle PCI host bridge
dec_pci: QOM'ify DEC 21154 PCI-PCI bridge
bonito: QOM'ify Bonito PCI host bridge
alpha_typhoon: QOM'ify Typhoon PCI host bridge
pci: Make host bridge TypeInfos const
virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types
softmmu-semi: fix lock_user* functions not to deref NULL upon OOM
arm-semi: don't leak 1KB user string lock buffer upon TARGET_SYS_OPEN
sheepdog: don't leak socket file descriptor upon connection failure
linux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failure
...
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit '86759aa89d1307d0dda2435cc25943bcd7026686': (33 commits)
qapi: add 'query-target' command to return target arch
pci: Tidy up PCI host bridges
pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE
pci_host: Turn into SysBus-derived QOM type
unin_pci: QOM'ify UniNorth PCI host bridges
spapr_pci: QOM'ify sPAPR PCI host bridge
prep_pci: QOM'ify Raven PCI host bridge
ppce500_pci: QOM'ify e500 PCI host bridge
ppc4xx_pci: QOM'ify ppc4xx PCI host bridge
gt64xxx: QOM'ify GT64120 PCI host bridge
grackle_pci: QOM'ify Grackle PCI host bridge
dec_pci: QOM'ify DEC 21154 PCI-PCI bridge
bonito: QOM'ify Bonito PCI host bridge
alpha_typhoon: QOM'ify Typhoon PCI host bridge
pci: Make host bridge TypeInfos const
xen-all.c: fix multiply issue for int and uint types
Fix invalidate if memory requested was not bucket aligned
migration: move total_time from ram stats to migration info
monitor: avoid declaring unused variables
qapi: Fix memory leak
...
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit 'ea776abca628d855e03c4929da3864985afd8aae': (30 commits)
virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types
softmmu-semi: fix lock_user* functions not to deref NULL upon OOM
arm-semi: don't leak 1KB user string lock buffer upon TARGET_SYS_OPEN
sheepdog: don't leak socket file descriptor upon connection failure
linux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failure
qemu-ga: don't leak a file descriptor upon failed lockf
i82378: Remove bogus MMIO coalescing
eventfd: making it thread safe
Update OpenBIOS images
pc: Fix RTC CMOS info on RAM for ram_size < 1MiB
vl: Round argument of -m up to multiple of 8KiB
scsi: fix warning
Avoid asprintf() which is not available on mingw
Update version to 1.2.0-rc0
qemu-char: (Re-)connect for tcp_chr_write() unconnected writing
Allow QEMUMachine to override reset sequencing
pseries: Instantiate USB interface when required
osdep: Fix compilation failure on BSD systems
Command line support for seccomp with -sandbox (v8)
Adding seccomp calls to vl.c (v8)
...
Conflicts:
hw/pc_piix.c
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
This allows any QEMU binary to be executed with:
$QEMU_BINARY -M none -qmp stdio
Without errors from missing options that are required by various boards. This
also provides a mode that we can use in the future to construct machines
entirely through QMP commands.
Cc: Daniel Berrange <berrange@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
* qmp/queue/qmp:
migration: move total_time from ram stats to migration info
monitor: avoid declaring unused variables
qapi: Fix memory leak
|
|
* sstabellini/xen-fixes-20120822:
xen-all.c: fix multiply issue for int and uint types
Fix invalidate if memory requested was not bucket aligned
|
|
* bonzini/scsi-next:
virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machines
iscsi: fix races between task completion and abort
iscsi: simplify iscsi_schedule_bh
iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cb
Revert "iscsi: Fix NULL dereferences / races between task completion and abort"
|
|
* kwolf/for-anthony:
virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types
Documentation: Warn against qemu-img on active image
vmdk: Read footer for streamOptimized images
vmdk: Fix header structure
Conflicts:
hw/virtio-blk.c
|
|
* kraxel/usb.59:
ehci: Fix setting of halt bit from usbcmd register updates
ehci: fix Interrupt Threshold Control implementation
usb: update uas product id
usb: async control xfer fixup
|
|
Add a 'query-target' QAPI command to allow management applications
to determine what target architecture a QEMU binary is emulating
without having to parse the binary name or -help output
$ qmp-shell -p /tmp/qemu
(QEMU) query-target
{ u'return': { u'arch': u'x86_64' }}
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Adopt the QOM parent field name and enforce QOM-style access via casts.
Don't just typedef PCIHostState, either use it directly or embed it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Use PCIHostState and PCI_HOST_BRIDGE() where appropriate.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
The preceding commits fixed misuses of FROM_SYSBUS() that led people to
add a bogus busdev field. For qdev the field order was less relevant but
for QOM the PCIHostState field (including the SysBusDevice actually
initialized with a value) must be placed first within the state struct.
To facilitate accessing the PCIHostState fields, derive all PCI host
bridges from TYPE_PCI_HOST_BRIDGE rather than TYPE_SYS_BUS_DEVICE.
We can now access PCIHostState QOM-style, with PCI_HOST_BRIDGE() macro.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constants and cast macros.
Avoid accessing parent fields directly.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant. Introduce cast macro to drop bogus busdev field
that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields
directly.
Free the identifier phb as acronym for PCI_HOST_BRIDGE.
Updated against conflicting merge from branch 'agraf/ppc-for-upstream'
(0d16fdd732d1b211842fa96b7c90ddf9e6bde0e4), which removed busdev field
differently, moved some code around and added new occurrences of 'phb'.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant and cast macro. Avoid accessing parent fields
directly.
Also add missing space and braces.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant and cast macro. Avoid accessing parent fields
directly.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant and cast macro. Avoid accessing its parent field
directly.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant. Introduce cast macro to drop dummy busdev field
used with FROM_SYSBUS() macro that would've broken SYS_BUS_DEVICE().
Avoid accessing DeviceState indirectly through PCIHostState.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant. Introduce cast macro to drop dummy busdev field
used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE().
Avoid accessing parent fields directly.
Drop no-op reset function.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant. Introduce cast macro and drop dummy busdev
field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE().
Avoid accessing parent fields directly.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant. Avoid accessing DeviceState or SysBusDevice
indirectly through PCIHostState field.
Drop global state by passing BonitoState as opaque and adding the IRQs
and a pointer to PCIBonitoState to its state.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Introduce type constant and cast macro. Don't access DeviceState
or PCIHostState indirectly through parent fields.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
During the QOM migration they were amended with further info but this is
no longer the case. All static TypeInfos can be const these days.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|