* ia64: why is mmio bus access lockless?
@ 2009-06-24 15:00 Michael S. Tsirkin
2009-06-26 1:57 ` Zhang, Xiantao
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2009-06-24 15:00 UTC (permalink / raw)
To: kvm, kvm-ia64, xiantao.zhang; +Cc: avi
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?
--
MST
^ permalink raw reply [flat|nested] 2+ messages in thread* RE: ia64: why is mmio bus access lockless?
2009-06-24 15:00 ia64: why is mmio bus access lockless? Michael S. Tsirkin
@ 2009-06-26 1:57 ` Zhang, Xiantao
0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Xiantao @ 2009-06-26 1:57 UTC (permalink / raw)
To: Michael S. Tsirkin, kvm@vger.kernel.org, kvm-ia64@vger.kernel.org
Cc: avi@redhat.com
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
Michael S. Tsirkin wrote:
> 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?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-26 1:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24 15:00 ia64: why is mmio bus access lockless? Michael S. Tsirkin
2009-06-26 1:57 ` Zhang, Xiantao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox