qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu vs. kvm: When to flush the coalesced mmio buffer?
@ 2011-01-03 12:11 Jan Kiszka
  2011-01-03 12:25 ` Gleb Natapov
  2011-01-03 12:32 ` [Qemu-devel] " Avi Kivity
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2011-01-03 12:11 UTC (permalink / raw)
  To: kvm, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

Hi again,

another subtle difference between qemu-kvm and upstream:

When we leave the guest for an IO window (KVM_RUN returns EINTR or
EAGAIN), we call kvm_flush_coalesced_mmio_buffer in qemu-kvm but not in
upstream. When version is better? I can't find any rationales in both
git logs.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu vs. kvm: When to flush the coalesced mmio buffer?
  2011-01-03 12:11 [Qemu-devel] qemu vs. kvm: When to flush the coalesced mmio buffer? Jan Kiszka
@ 2011-01-03 12:25 ` Gleb Natapov
  2011-01-03 12:32 ` [Qemu-devel] " Avi Kivity
  1 sibling, 0 replies; 4+ messages in thread
From: Gleb Natapov @ 2011-01-03 12:25 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm

On Mon, Jan 03, 2011 at 01:11:32PM +0100, Jan Kiszka wrote:
> Hi again,
> 
> another subtle difference between qemu-kvm and upstream:
> 
> When we leave the guest for an IO window (KVM_RUN returns EINTR or
> EAGAIN), we call kvm_flush_coalesced_mmio_buffer in qemu-kvm but not in
> upstream. When version is better? I can't find any rationales in both
> git logs.
> 
Since coalesced mmio is used to prevent unnecessary exits to userspace
if vcpu thread is already in userspace why not flush coalesced mmio
buffer?

--
			Gleb.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: qemu vs. kvm: When to flush the coalesced mmio buffer?
  2011-01-03 12:11 [Qemu-devel] qemu vs. kvm: When to flush the coalesced mmio buffer? Jan Kiszka
  2011-01-03 12:25 ` Gleb Natapov
@ 2011-01-03 12:32 ` Avi Kivity
  2011-01-03 12:34   ` Jan Kiszka
  1 sibling, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2011-01-03 12:32 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm

On 01/03/2011 02:11 PM, Jan Kiszka wrote:
> Hi again,
>
> another subtle difference between qemu-kvm and upstream:
>
> When we leave the guest for an IO window (KVM_RUN returns EINTR or
> EAGAIN), we call kvm_flush_coalesced_mmio_buffer in qemu-kvm but not in
> upstream. When version is better? I can't find any rationales in both
> git logs.

We must flush on EINTR, otherwise a live migration can leave some mmios 
in the source host and not replay them on the destination host.

(plus, as Gleb says, if you're in userspace you might as well flush)

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: qemu vs. kvm: When to flush the coalesced mmio buffer?
  2011-01-03 12:32 ` [Qemu-devel] " Avi Kivity
@ 2011-01-03 12:34   ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2011-01-03 12:34 UTC (permalink / raw)
  To: Avi Kivity; +Cc: qemu-devel, kvm

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

Am 03.01.2011 13:32, Avi Kivity wrote:
> On 01/03/2011 02:11 PM, Jan Kiszka wrote:
>> Hi again,
>>
>> another subtle difference between qemu-kvm and upstream:
>>
>> When we leave the guest for an IO window (KVM_RUN returns EINTR or
>> EAGAIN), we call kvm_flush_coalesced_mmio_buffer in qemu-kvm but not in
>> upstream. When version is better? I can't find any rationales in both
>> git logs.
> 
> We must flush on EINTR, otherwise a live migration can leave some mmios
> in the source host and not replay them on the destination host.
> 
> (plus, as Gleb says, if you're in userspace you might as well flush)
> 

OK, will append a fix to my series.

Thanks,
Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-03 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 12:11 [Qemu-devel] qemu vs. kvm: When to flush the coalesced mmio buffer? Jan Kiszka
2011-01-03 12:25 ` Gleb Natapov
2011-01-03 12:32 ` [Qemu-devel] " Avi Kivity
2011-01-03 12:34   ` Jan Kiszka

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).