Re: [Qemu-devel] [PATCH v4 1/1] pci-host: add educational driver

2015-01-21 Thread Jiri Slaby
On 01/21/2015, 05:40 PM, Paolo Bonzini wrote: > > > On 21/01/2015 17:28, Jiri Slaby wrote: >> +if (atomic_fetch_or(&edu->status, EDU_STATUS_COMPUTING) & >> EDU_STATUS_COMPUTING) { > > Theoretically the other thread could see EDU_STATUS_COMPUTING here and > not enter the condvar wait. S

Re: [Qemu-devel] [PATCH v4 1/1] pci-host: add educational driver

2015-01-21 Thread Paolo Bonzini
On 21/01/2015 17:28, Jiri Slaby wrote: > +if (atomic_fetch_or(&edu->status, EDU_STATUS_COMPUTING) & > EDU_STATUS_COMPUTING) { Theoretically the other thread could see EDU_STATUS_COMPUTING here and not enter the condvar wait. So... > +break; > +} > +qemu_mut

[Qemu-devel] [PATCH v4 1/1] pci-host: add educational driver

2015-01-21 Thread Jiri Slaby
I am using qemu for teaching the Linux kernel at our university. I wrote a simple PCI device that can answer to writes/reads, generate interrupts and perform DMA. As I am dragging it locally over 2 years, I am sending it to you now. Signed-off-by: Jiri Slaby --- MAINTAINERS | 5 +