History log of /kvmtool/pci.c (Results 26 – 50 of 60)
Revision Date Author Comments
# 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>


# 49a8afd1 17-Sep-2012 Sasha Levin <levinsasha928@gmail.com>

kvm tools: use init/exit where possible

Switch to using init/exit calls instead of the repeating call blocks in builtin-run.

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

kvm tools: use init/exit where possible

Switch to using init/exit calls instead of the repeating call blocks in builtin-run.

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

show more ...


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

kvm tools: Fixes for PCI module

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

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


# a2857479 19-Dec-2011 Cyrill Gorcunov <gorcunov@gmail.com>

kvm tools: Add BUG_ON() helper to make a run-time critical tests

Also drop useless assert.h inclusions.

Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Sig

kvm tools: Add BUG_ON() helper to make a run-time critical tests

Also drop useless assert.h inclusions.

Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 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>


# 40f2fd06 09-Dec-2011 Matt Evans <matt@ozlabs.org>

kvm tools: Arch-specific define for PCI MMIO allocation area

pci_get_io_space_block() used to grab addresses from
KVM_32BIT_GAP_START + 0x1000000, which is x86-specific. Create a new define,
KVM_PC

kvm tools: Arch-specific define for PCI MMIO allocation area

pci_get_io_space_block() used to grab addresses from
KVM_32BIT_GAP_START + 0x1000000, which is x86-specific. Create a new define,
KVM_PCI_MMIO_AREA, to specify a bus address these allocations can come from.

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

show more ...


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

kvm tools: Add pci__config_{rd,wr}(), pci__find_dev()

This allows config space access in a more natural manner than clunky x86 IO ports,
and is useful for other architectures. Internally, the x86 I

kvm tools: Add pci__config_{rd,wr}(), pci__find_dev()

This allows config space access in a more natural manner than clunky x86 IO ports,
and is useful for other architectures. Internally, the x86 IO port access uses
these new config space interfaces.

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

show more ...


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

kvm tools: Endian-sanitise pci.h and PCI device setup

vesa, pci-shmem and virtio-pci devices need to set up config space with
little-endian conversions (as config space is LE). The pci_config_addre

kvm tools: Endian-sanitise pci.h and PCI device setup

vesa, pci-shmem and virtio-pci devices need to set up config space with
little-endian conversions (as config space is LE). The pci_config_address
bitfield also needs to be reversed when building on BE systems.

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

show more ...


# 9d755a36 09-Dec-2011 Matt Evans <matt@ozlabs.org>

kvm tools: Move PCI_MAX_DEVICES to pci.h

Other pieces of kvmtool may be interested in PCI_MAX_DEVICES.

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


# 95d13a52 29-Aug-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add ivshmem device

The patch adds an ivshmem device which can be used to share memory between
guests on the same host.

This implementation is lacking inter-guest communication which shou

kvm tools: Add ivshmem device

The patch adds an ivshmem device which can be used to share memory between
guests on the same host.

This implementation is lacking inter-guest communication which should be
implemented later once information regarding the client-server protocol is
gathered, though infrastructure used to add and remove clients already exists
in the patch (but isn't used anywhere).

Patch is based on David Evansky's shmem device.

Original-patch-by: David Evensky <evensky@sandia.gov>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# c9f6a037 18-Aug-2011 Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>

kvm tools: remove count in io emulation callbacks

'count' parameter in io emulation callbacks is useless, just remove it

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by:

kvm tools: remove count in io emulation callbacks

'count' parameter in io emulation callbacks is useless, just remove it

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 7e012d3c 12-Aug-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Missing braces in BAR index calculation

This patch adds missing braces which were forgotten in 42dfae5
("kvm tools: Use correct size for VESA memory bar").

Reported-by: David Evensky <ev

kvm tools: Missing braces in BAR index calculation

This patch adds missing braces which were forgotten in 42dfae5
("kvm tools: Use correct size for VESA memory bar").

Reported-by: David Evensky <evensky@dancer.ca.sandia.gov>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 4f045c57 11-Aug-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Use correct size for VESA memory bar

This patch makes BAR 1 16k, instead of BAR0 - which is the PIO bar.

This fixes wrong output on lspci command and ioremap warnings during boot.

Signe

kvm tools: Use correct size for VESA memory bar

This patch makes BAR 1 16k, instead of BAR0 - which is the PIO bar.

This fixes wrong output on lspci command and ioremap warnings during boot.

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

show more ...


# c64f7ff0 06-Aug-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fix PCI masking on probes

This patch adds a missing check of mask during probing of PCI BARs.

The missing check manifested in wrong address values for the BARs after the
initial probe.

kvm tools: Fix PCI masking on probes

This patch adds a missing check of mask during probing of PCI BARs.

The missing check manifested in wrong address values for the BARs after the
initial probe.

Reported-by: David Evensky <evensky@dancer.ca.sandia.gov>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 9575e724 28-Jul-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fix PCI probing

PCI BAR probing is done in four steps:

1. Read address (and flags).
2. Mask BAR.
3. Read BAR again - Now the expected result is the size of the BAR.
4. Mask BAR with

kvm tools: Fix PCI probing

PCI BAR probing is done in four steps:

1. Read address (and flags).
2. Mask BAR.
3. Read BAR again - Now the expected result is the size of the BAR.
4. Mask BAR with address.

So far, we have only took care of the first step. This means that the kernel
was using address as the size, causing a PCI allocation blunder.

This patch fixes the issue by passing a proper size after masking.

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

show more ...


# 3d62dea6 26-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add optional parameter used in ioport callbacks

Allow specifying an optional parameter when registering an
ioport range. The callback functions provided by the registering
module will be

kvm tools: Add optional parameter used in ioport callbacks

Allow specifying an optional parameter when registering an
ioport range. The callback functions provided by the registering
module will be called with the same parameter.

This may be used to keep context during callbacks on IO operations.

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

show more ...


# 43835ac9 11-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Rename 'self' variables

Give proper names to vars named 'self'.

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


# 3fdf659d 05-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Abolishment of uint*_t types

Clean uint*_t type from the code.

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


# 3e553514 15-Aug-2010 Pekka Enberg <penberg@kernel.org>

kvm: Add port range to ioport__register()

This patch adds a 'count' argument to ioport__register() to allow callers to
register a range of ioports.

Signed-off-by: Pekka Enberg <penberg@kernel.org>


# b30d05ad 15-Aug-2010 Pekka Enberg <penberg@kernel.org>

kvm: Extract virtio-blk driver to separate file

This patch extracts virtio-blk driver to a separate file.

Signed-off-by: Pekka Enberg <penberg@kernel.org>


# ba824677 15-Aug-2010 Pekka Enberg <penberg@kernel.org>

kvm: Fix unaligned PCI_CONFIG_ADDRESS accesses

This patch fixes unaligned PCI_CONFIG_ADDRESS accesses to use the same
mechanism as with PCI_CONFIG_DATA.

Signed-off-by: Pekka Enberg <penberg@kernel.

kvm: Fix unaligned PCI_CONFIG_ADDRESS accesses

This patch fixes unaligned PCI_CONFIG_ADDRESS accesses to use the same
mechanism as with PCI_CONFIG_DATA.

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 6d1a6f68 08-Aug-2010 Pekka Enberg <penberg@cs.helsinki.fi>

kvm: Kill virtio debugging code

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>


# 78732ce2 07-Aug-2010 Asias He <asias.hejun@gmail.com>

kvm, pci: fill up virtio device configuration header

IO base address register must be aligned at 4 bytes.
Memory base address register must be aligned at 16 bytes.
We should not shift io port o

kvm, pci: fill up virtio device configuration header

IO base address register must be aligned at 4 bytes.
Memory base address register must be aligned at 16 bytes.
We should not shift io port or memory address in base address register.
See PCI_System_Architecture_FourthEdition Page 427.

We need more io space for virtio device, qemu-kvm uses 64 byes,
so io space reserved for bios is not enough.

See drivers/virtio/virtio_pci.c
static struct virtio_config_ops virtio_pci_config_ops = {
.get = vp_get,
.set = vp_set,
.get_status = vp_get_status,
.set_status = vp_set_status,
.reset = vp_reset,
.find_vqs = vp_find_vqs,
.del_vqs = vp_del_vqs,
.get_features = vp_get_features,
.finalize_features = vp_finalize_features,
};

---------------------------------------------------------------------
guest_using_virtio_blk $ lspci -xxx
00:04.0 SCSI storage controller: Qumranet, Inc. Virtio block device
00: f4 1a 01 10 03 00 10 00 00 00 00 01 00 00 00 00
10: 01 c2 00 00 00 00 03 f2 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 f4 1a 02 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 0b 01 00 00
40: 11 00 01 80 01 00 00 00 01 08 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
---------------------------------------------------------------------
guest_using_virtio_blk $ cat /proc/iomem
f2030000-f2030fff : 0000:00:04.0
f2030000-f2030fff : virtio-pci
---------------------------------------------------------------------
guest_using_virtio_blk $ cat /proc/ioports
c200-c23f : 0000:00:04.0
c200-c23f : virtio-pci
---------------------------------------------------------------------

$ ./kvm bzImage #virtio enabled guest kernel
Logs:
[ 0.548000] virtio-pci 0000:00:01.0: enabling device (0000 -> 0001)
[ 0.549000] asias:drivers/virtio/virtio.c:virtio_dev_probe
[ 0.549000] asias:drivers/virtio/virtio_pci.c:vp_get_features
Info: virtio_io
[ 0.549000] asias:drivers/block/virtio_blk.c:virtblk_probe
[ 0.549000] virtio_blk: probe of virtio0 failed with error -16

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>

show more ...


# beb095eb 01-Aug-2010 Cyrill Gorcunov <gorcunov@gmail.com>

kvm, pci: Claim virtio device ioport in pci header

It still doesn't work because we need to fill .class
properly. But at least virtio probe function passes fine now.

Signed-off-by: Cyrill Gorcunov

kvm, pci: Claim virtio device ioport in pci header

It still doesn't work because we need to fill .class
properly. But at least virtio probe function passes fine now.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

show more ...


# 70d08766 01-Aug-2010 Cyrill Gorcunov <gorcunov@gmail.com>

kvm, pci: Fix offset for pci CONFIG_DATA ioport

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>


123