ia64: why is mmio bus access lockless?
Hi,arch/ia64/kvm/kvm-ia64.c does this:
mmio_dev = vcpu_find_mmio_dev(vcpu, p->addr, p->size, !p->dir);
if (mmio_dev) {
if (!p->dir)
kvm_iodevice_write(mmio_dev, p->addr, p->size,
&p->data);
else
kvm_iodevice_read(mmio_dev, p->addr, p->size,
&p->data);without holding kvm lock.
I know that find/read/write on the bus require locking on x86 - are they safe to do without locking on ia64?
Signature · 1 line
MST
Hi, Michael
Since only virtual ioapic uses the lock-less logic, so it shouldn't introduce the issues. Anyway, it should be safer to add the lock considering its semantic and future usage models. Would you like to prepare a patch to enhance it ? Thanks!
Xiantao
Quoted 15 lines · Michael S. Tsirkin
Hi,
arch/ia64/kvm/kvm-ia64.cdoes this:mmio_dev = vcpu_find_mmio_dev(vcpu, p->addr, p->size, !p->dir); if (mmio_dev) { if (!p->dir) kvm_iodevice_write(mmio_dev, p->addr, p->size, &p->data); else kvm_iodevice_read(mmio_dev, p->addr, p->size, &p->data);without holding kvm lock.
I know that find/read/write on the bus require locking on x86 - are they safe to do without locking on ia64?