* [Qemu-arm] aarch64 ivshmem issues
@ 2016-01-10 5:35 Meng Xu
2016-01-11 8:07 ` Pavel Fedin
0 siblings, 1 reply; 3+ messages in thread
From: Meng Xu @ 2016-01-10 5:35 UTC (permalink / raw)
To: qemu-arm
Hi All,
I am using the ivshmem device to create shared memory between an x86_64 host and aarch64 guest.
The guest has ubuntu server 14.04 installed with kernel version 3.13.0. I wrote a kernel driver to
drive the ivshmem device (as a pci driver) however, the driver was never registered:
Can anyone help me point out what is wrong?
My qemu launch script looks like this:
qemu-system-aarch64 -machine virt,highmem=off -cpu cortex-a57 -m 1024M \
-drive file=<path-to-img>,id=hd0,if=none,format=qcow2 \
-device virtio-blk-device,drive=hd0 \
-device ivshmem,shm=vshmtest,size=16M \
-kernel <path-to-kernel> \
-initrd <path-to-initrd> \
The skeleton of the kernel driver is like this:
static struct pci_device_id vshmem_id_table[] = {
{ 0x1af4, 0x1110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0 },
};
static struct pci_driver vshmem_driver = {
.name = “vshmtest”,
.id_table = vshmem_id_table,
.probe = vshmem_probe_device,
.remove = vshmem_remove_device,
};
somewhere in module init:
pci_register_driver(&vshmem_driver);
The same driver code works well with x86_64 and ppc64.
Best Regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-arm] aarch64 ivshmem issues
2016-01-10 5:35 [Qemu-arm] aarch64 ivshmem issues Meng Xu
@ 2016-01-11 8:07 ` Pavel Fedin
2016-01-11 15:33 ` Meng Xu
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Fedin @ 2016-01-11 8:07 UTC (permalink / raw)
To: 'Meng Xu', qemu-arm
Hello!
> I am using the ivshmem device to create shared memory between an x86_64 host and aarch64
> guest. The guest has ubuntu server 14.04 installed with kernel version 3.13.0. I wrote a kernel
> driver to drive the ivshmem device (as a pci driver) however, the driver was never registered:
There should be no problem with ivshmem itself on ARM64. Last year we did some tests with it, and it worked fine out of the box.
Since you are saying that "the driver was never registered", then, perhaps, something is wrong with your guest kernel config. For the start, check whether PCI subsystem and PCI generic host is enabled. Mainline kernels older than 4.3 do not support generic PCI host controller on ARM64, therefore you have no PCI bus. If your distro has older kernel, it is likely to suffer from this problem. Check 'lspci' output on your guest.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-arm] aarch64 ivshmem issues
2016-01-11 8:07 ` Pavel Fedin
@ 2016-01-11 15:33 ` Meng Xu
0 siblings, 0 replies; 3+ messages in thread
From: Meng Xu @ 2016-01-11 15:33 UTC (permalink / raw)
To: Pavel Fedin, qemu-arm
Hi Pavel,
Thanks! That's right, ivshmem works just fine on ARM64 once I switch to
the latest kernel and I can see the PCI bridge and devices now.
Thank you for the help,
Meng
On 01/11/2016 03:07 AM, Pavel Fedin wrote:
> Hello!
>
>> I am using the ivshmem device to create shared memory between an x86_64 host and aarch64
>> guest. The guest has ubuntu server 14.04 installed with kernel version 3.13.0. I wrote a kernel
>> driver to drive the ivshmem device (as a pci driver) however, the driver was never registered:
> There should be no problem with ivshmem itself on ARM64. Last year we did some tests with it, and it worked fine out of the box.
> Since you are saying that "the driver was never registered", then, perhaps, something is wrong with your guest kernel config. For the start, check whether PCI subsystem and PCI generic host is enabled. Mainline kernels older than 4.3 do not support generic PCI host controller on ARM64, therefore you have no PCI bus. If your distro has older kernel, it is likely to suffer from this problem. Check 'lspci' output on your guest.
>
> Kind regards,
> Pavel Fedin
> Expert Engineer
> Samsung Electronics Research center Russia
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-11 15:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-10 5:35 [Qemu-arm] aarch64 ivshmem issues Meng Xu
2016-01-11 8:07 ` Pavel Fedin
2016-01-11 15:33 ` Meng Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).