History log of /kvmtool/virtio/pci.c (Results 51 – 75 of 90)
Revision Date Author Comments
# 2d6c72df 04-Feb-2014 Will Deacon <will.deacon@arm.com>

kvm tools: irq: remove pin parameter from irq__register_device

In preparation for moving the irq allocation into generic code, remove
the pin parameter from irq__register_device and temporarily plac

kvm tools: irq: remove pin parameter from irq__register_device

In preparation for moving the irq allocation into generic code, remove
the pin parameter from irq__register_device and temporarily place the
onus on the emulation driver to allocate the pin (which is always 1 and
only used on PCI anyway).

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# a463650c 04-Feb-2014 Will Deacon <will.deacon@arm.com>

kvm tools: pci: add MMIO interface to virtio-pci devices

This patch adds an MMIO interface for each virtio-pci device, so that
they can be accessed without having to use an ioport. For each device,

kvm tools: pci: add MMIO interface to virtio-pci devices

This patch adds an MMIO interface for each virtio-pci device, so that
they can be accessed without having to use an ioport. For each device, a
new memory BAR is added which corresponds to an area of MMIO space with
a shim trap handler. This handler simply translates the access into an
ioport access via kvm__emulate_io. Since guests can generate accesses
via either the ioport or MMIO regions, an ioeventfd is registered for
both.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 385ebc4f 04-Feb-2014 Will Deacon <will.deacon@arm.com>

kvm tools: pci: remove BAR 3 hangover from virtio pci msix code

Despite not being used anymore, there are still traces of BAR 3 in both
the code and comments for the virtio pci msix implementation.

kvm tools: pci: remove BAR 3 hangover from virtio pci msix code

Despite not being used anymore, there are still traces of BAR 3 in both
the code and comments for the virtio pci msix implementation.

This patch removes the redundant code and fixes up the comments to match
what we're actually doing.

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 111b3109 04-Feb-2014 Will Deacon <will.deacon@arm.com>

kvm tools: pci: register virtio pba structure as mmio region with kvm

Despite allocating and providing code to handle accesses to the pba
structure, virtio msix blocks in fact only register the msix

kvm tools: pci: register virtio pba structure as mmio region with kvm

Despite allocating and providing code to handle accesses to the pba
structure, virtio msix blocks in fact only register the msix table with
kvm.

This patch fixes the MMIO region so that it includes the pba structure
for msix io blocks of virtio pci devices. The corresponding BAR is also
updated to advertise the full size of the io block.

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 27347f76 04-Sep-2013 Will Deacon <will.deacon@arm.com>

kvm tools: ioeventfd: replace bool parameters to __add_event with flags

A recent fix to virtio MMIO (72a7541ce305 ["kvm tools: virtio-mmio:
init_ioeventfd should use MMIO for ioeventfd__add_event()"

kvm tools: ioeventfd: replace bool parameters to __add_event with flags

A recent fix to virtio MMIO (72a7541ce305 ["kvm tools: virtio-mmio:
init_ioeventfd should use MMIO for ioeventfd__add_event()"]) highlighted
the confusing parameters expected by ioeventfd__add_event.

As per Pekka's suggestion, replace the bool parameters to this function
with a single `flags' argument instead.

Cc: Ying-Shiuan Pan <yingshiuan.pan@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 04b53c16 03-May-2013 Sasha Levin <sasha.levin@oracle.com>

kvm tools: add status notification hook for virtio

Some devices want to know their status, use this hook to allow them to
get that notification.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>

kvm tools: add status notification hook for virtio

Some devices want to know their status, use this hook to allow them to
get that notification.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# c59ba304 07-Jan-2013 Will Deacon <will.deacon@arm.com>

kvm tools: virtio: remove hardcoded assumptions about guest page size

virtio-based PCI devices deal only with 4k memory granules, making
direct use of the VIRTIO_PCI_VRING_ALIGN and VIRTIO_PCI_QUEUE

kvm tools: virtio: remove hardcoded assumptions about guest page size

virtio-based PCI devices deal only with 4k memory granules, making
direct use of the VIRTIO_PCI_VRING_ALIGN and VIRTIO_PCI_QUEUE_ADDR_SHIFT
constants when initialising the virtqueues for a device.

For MMIO-based devices, the guest page size is arbitrary and may differ
from that of the host (this is the case on AArch64, where both 4k and
64k pages are supported).

This patch fixes the virtio drivers to honour the guest page size passed
when configuring the virtio device and align the virtqueues accordingly.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 21ff329d 22-Nov-2012 Will Deacon <will.deacon@arm.com>

kvm tools: add generic device registration mechanism

PCI devices are currently registered into the pci_devices array via the
pci__register function, which can then be indexed later by architecture
c

kvm tools: add generic device registration mechanism

PCI devices are currently registered into the pci_devices array via the
pci__register function, which can then be indexed later by architecture
code to construct device tree nodes. For MMIO devices, there is no such
utility.

Rather than invent a similar mechanism for MMIO, this patch creates a
global device registration mechanism, which allows the device type to be
specified when registered or indexing a device. Current users of the pci
registration code are migrated to the new infrastructure and virtio MMIO
devices are registered at init time.

As part of the device registration, allocation of the device number is
moved out of irq__register_device and performed when adding the device
header to the relevant bus tree, allowing us to maintain separate device
numberspaces for each bus.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# f8327b05 29-Oct-2012 Sasha Levin <sasha.levin@oracle.com>

kvm tools: don't crash on virtio MSI-X reset

Handle VIRTIO_MSI_NO_VECTOR by not trying to use it as a valid vector.

We still need to remove the GSI and everything, but this is enough
to prevent cra

kvm tools: don't crash on virtio MSI-X reset

Handle VIRTIO_MSI_NO_VECTOR by not trying to use it as a valid vector.

We still need to remove the GSI and everything, but this is enough
to prevent crashes and keep everything working properly for now.

Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# f8048418 24-Oct-2012 William Dauchy <william@gandi.net>

kvm tools: use the correct config vector interrupt

when registering the config interrupt, the later is registered in
vcpi->config_vector and not in vpci->vq_vector

introduced in:
a841f15 kvm tools:

kvm tools: use the correct config vector interrupt

when registering the config interrupt, the later is registered in
vcpi->config_vector and not in vpci->vq_vector

introduced in:
a841f15 kvm tools: Use the new KVM_SIGNAL_MSI ioctl to inject
interrupts directly.

Acked-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: William Dauchy <william@gandi.net>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 4346fd8f 17-Sep-2012 Sasha Levin <levinsasha928@gmail.com>

kvm tools: remove global kvm object

This was ugly, and now we get rid of it.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# c5ae742b 30-Aug-2012 Sasha Levin <levinsasha928@gmail.com>

kvm tools: simplify virtio config handling

Instead of a get/set for config values, just request the address of the
config region, and handle that by simply reading directly from that region.

Signed

kvm tools: simplify virtio config handling

Instead of a get/set for config values, just request the address of the
config region, and handle that by simply reading directly from that region.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 43c81c74 30-Aug-2012 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Use the new KVM_SIGNAL_MSI ioctl to inject interrupts directly.

We still create GSIs and keep them for two reasons:

- They're required by virtio-* devices.
- There's not much overhead

kvm tools: Use the new KVM_SIGNAL_MSI ioctl to inject interrupts directly.

We still create GSIs and keep them for two reasons:

- They're required by virtio-* devices.
- There's not much overhead since we just create them when starting the
guest, they don't use anything when the guest is running.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 627d6874 11-Jul-2012 Asias He <asias.hejun@gmail.com>

kvm tools: Do not poll ioeventfd if vhost is enabled

If vhost is enabled for a virtio device, vhost will poll the ioeventfd
in kernel side and there is no need to poll it in userspace. Otherwise,
bo

kvm tools: Do not poll ioeventfd if vhost is enabled

If vhost is enabled for a virtio device, vhost will poll the ioeventfd
in kernel side and there is no need to poll it in userspace. Otherwise,
both vhost kernel and userspace will race to poll.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 9594e883 07-Apr-2012 Asias He <asias.hejun@gmail.com>

kvm tools: Rename callback_mmio_table

Reanme callback_mmio_table to virtio_pci__mmio_callback

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 02eca50c 07-Apr-2012 Asias He <asias.hejun@gmail.com>

kvm tools: Rework on virtio transport abstraction.

This patch reworks on virtio transport abstraction.

* Move virtio transport operations to virtio operations and drop
virtio/trans.c This makes t

kvm tools: Rework on virtio transport abstraction.

This patch reworks on virtio transport abstraction.

* Move virtio transport operations to virtio operations and drop
virtio/trans.c This makes the abstraction much cleaner.

* Rename struct virtio_trans to struct virtio_device

struct virtio_trans {
void *virtio;
enum virtio_trans_type type;
struct virtio_trans_ops *trans_ops;
struct virtio_ops *virtio_ops;
};

struct virtio_device {
void *virtio;
struct virtio_ops *ops;
};

The virtio_trans struct is bit confusing since it also includes virtio
operations.

* Introduce virtio_init()
To init device, e.g.
Before:
virtio_trans_init()
ndev->vtrans.trans_ops->init()
ndev->vtrans.virtio_ops = &net_dev_virtio_ops
After:
virtio_init()

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 9ff91339 07-Apr-2012 Asias He <asias.hejun@gmail.com>

kvm tools: Add is_pio flag to ioeventfd__add_event

Add is_pio flag to set KVM_IOEVENTFD_FLAG_PIO. This is useful for
attaching an ioeventfd to MMIO address as well as PIO address.
virtio-mmio needs

kvm tools: Add is_pio flag to ioeventfd__add_event

Add is_pio flag to set KVM_IOEVENTFD_FLAG_PIO. This is useful for
attaching an ioeventfd to MMIO address as well as PIO address.
virtio-mmio needs an ioeventfd to MMIO address.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 495fbd4e 19-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fixes for virtio module

Fixes include:
- Error handling
- Cleanup
- Standard init/uninit

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>


# ea6eeb1c 18-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fixes for ioeventfd module

Fixes include:
- Error handling
- Cleanup
- Standard init/uninit

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>


# 7af40b91 18-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fixes for ioport module

Fixes include:
- Error handling
- Cleanup
- Standard init/uninit

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>


# 3a60be06 16-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Trivial cleanup

Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 9aa9d62a 14-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Don't always coalesce MMIOs

Coalescing MMIOs is only required when we really want avoid having to exit
to userspace for every MMIO write, usually it's not the case so no reason
to coalesc

kvm tools: Don't always coalesce MMIOs

Coalescing MMIOs is only required when we really want avoid having to exit
to userspace for every MMIO write, usually it's not the case so no reason
to coalesce every MMIO zone (I was also pretty sure it didn't always coalesce
zones)..

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 9c26dab4 10-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Free up the MSI-X PBA BAR

Free up the BAR to make space for the new virtio BARs. It isn't required
to have the PBA and the table in the separate BARs, and uniting them will
just give us e

kvm tools: Free up the MSI-X PBA BAR

Free up the BAR to make space for the new virtio BARs. It isn't required
to have the PBA and the table in the separate BARs, and uniting them will
just give us extra BARs to play with.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# b4dab816 10-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Don't use 64bit BARs

We don't really support that, so no point in using 64bit BARs.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 6b868987 09-Dec-2011 Matt Evans <matt@ozlabs.org>

kvm tools: Correctly set virtio-pci bar_size and remove hardwired address

The BAR addresses are set up fine, but missed the bar_size[] array which is now
updated correspondingly.

Use PCI_IO_SIZE in

kvm tools: Correctly set virtio-pci bar_size and remove hardwired address

The BAR addresses are set up fine, but missed the bar_size[] array which is now
updated correspondingly.

Use PCI_IO_SIZE instead of '0x100'.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


1234