* Loss of lock drop in qemu/net.c
@ 2008-12-16 19:38 Avi Kivity
2008-12-16 20:25 ` Anthony Liguori
2008-12-17 9:19 ` Mark McLoughlin
0 siblings, 2 replies; 5+ messages in thread
From: Avi Kivity @ 2008-12-16 19:38 UTC (permalink / raw)
To: Mark McLoughlin, Anthony Liguori; +Cc: kvm-devel
hThe recent qemu merged does not allow net.h to include kvm code (due to
a dependency on cpu.h). This means I had to drop the
kvm_sleep_begin()/kvm_sleep_end() around the packet send (which, btw,
makes the whole thing vulnerable to hotunplug; we need refcounting or
locking here).
We'll need to find some way to put this back in.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Loss of lock drop in qemu/net.c
2008-12-16 19:38 Loss of lock drop in qemu/net.c Avi Kivity
@ 2008-12-16 20:25 ` Anthony Liguori
2008-12-17 9:38 ` Avi Kivity
2008-12-17 9:19 ` Mark McLoughlin
1 sibling, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2008-12-16 20:25 UTC (permalink / raw)
To: Avi Kivity; +Cc: Mark McLoughlin, kvm-devel
Avi Kivity wrote:
> hThe recent qemu merged does not allow net.h to include kvm code (due
> to a dependency on cpu.h). This means I had to drop the
> kvm_sleep_begin()/kvm_sleep_end() around the packet send (which, btw,
> makes the whole thing vulnerable to hotunplug; we need refcounting or
> locking here).
Why does net.h include cpu.h and why would net.h need kvm code?
Regards,
Anthony Liguori
> We'll need to find some way to put this back in.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Loss of lock drop in qemu/net.c
2008-12-16 19:38 Loss of lock drop in qemu/net.c Avi Kivity
2008-12-16 20:25 ` Anthony Liguori
@ 2008-12-17 9:19 ` Mark McLoughlin
2008-12-17 9:39 ` Avi Kivity
1 sibling, 1 reply; 5+ messages in thread
From: Mark McLoughlin @ 2008-12-17 9:19 UTC (permalink / raw)
To: Avi Kivity; +Cc: Anthony Liguori, kvm-devel
On Tue, 2008-12-16 at 21:38 +0200, Avi Kivity wrote:
> The recent qemu merged does not allow net.h to include kvm code (due to
> a dependency on cpu.h). This means I had to drop the
> kvm_sleep_begin()/kvm_sleep_end() around the packet send (which, btw,
> makes the whole thing vulnerable to hotunplug; we need refcounting or
> locking here).
How can the tap vlan client be affected by hotunplug?
(Dropping the lock from a hotunpluggable PCI device like virtio_net
would be dangerous - even though the removal is done by the monitor in
the I/O thread and so can't happen while the thread is sleeping, the
device isn't actually removed until the guest has acked it with EJ0 and
this would be handled by a vcpu thread)
Cheers,
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Loss of lock drop in qemu/net.c
2008-12-16 20:25 ` Anthony Liguori
@ 2008-12-17 9:38 ` Avi Kivity
0 siblings, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2008-12-17 9:38 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Mark McLoughlin, kvm-devel
Anthony Liguori wrote:
> Avi Kivity wrote:
>> hThe recent qemu merged does not allow net.h to include kvm code (due
>> to a dependency on cpu.h). This means I had to drop the
>> kvm_sleep_begin()/kvm_sleep_end() around the packet send (which, btw,
>> makes the whole thing vulnerable to hotunplug; we need refcounting or
>> locking here).
>
> Why does net.h include cpu.h and why would net.h need kvm code?
>
I meant net.c -> qemu->kvm.h -> cpu.h.
The code in question is in net.c (in tap_send).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Loss of lock drop in qemu/net.c
2008-12-17 9:19 ` Mark McLoughlin
@ 2008-12-17 9:39 ` Avi Kivity
0 siblings, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2008-12-17 9:39 UTC (permalink / raw)
To: Mark McLoughlin; +Cc: Anthony Liguori, kvm-devel
Mark McLoughlin wrote:
> On Tue, 2008-12-16 at 21:38 +0200, Avi Kivity wrote:
>
>> The recent qemu merged does not allow net.h to include kvm code (due to
>> a dependency on cpu.h). This means I had to drop the
>> kvm_sleep_begin()/kvm_sleep_end() around the packet send (which, btw,
>> makes the whole thing vulnerable to hotunplug; we need refcounting or
>> locking here).
>>
>
> How can the tap vlan client be affected by hotunplug?
>
It cannot; my mistake.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-17 9:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 19:38 Loss of lock drop in qemu/net.c Avi Kivity
2008-12-16 20:25 ` Anthony Liguori
2008-12-17 9:38 ` Avi Kivity
2008-12-17 9:19 ` Mark McLoughlin
2008-12-17 9:39 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox