All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Cam Macdonell <cam@cs.ualberta.ca>
Cc: KVM General <kvm@vger.kernel.org>
Subject: Re: ioeventfd usage in KVM
Date: Fri, 12 Mar 2010 09:43:45 +0200	[thread overview]
Message-ID: <4B99F0B1.6050606@redhat.com> (raw)
In-Reply-To: <8286e4ee1003112108j4a3a477dq4abb1b8624319125@mail.gmail.com>

On 03/12/2010 07:08 AM, Cam Macdonell wrote:
>
> +    s->ivshmem_mmio_io_addr = cpu_register_io_memory(ivshmem_mmio_read,
> +                                    ivshmem_mmio_write, s);
> +    /* region for registers*/
> +    pci_register_bar(&d->dev, 0, 0x100,
> +                           PCI_BASE_ADDRESS_SPACE_MEMORY, ivshmem_mmio_map);
>    

You've selected the memory address space here.

> my basic attempt looks like this:
>
>      struct kvm_ioeventfd ked;
>
>      ked.addr = s->otheraddr + Doorbell;
>      ked.len = 4;
>      ked.flags = KVM_IOEVENTFD_FLAG_PIO;
>      ked.fd = an_eventfd;
>      ret = kvm_vm_ioctl(kvm_state, KVM_IOEVENTFD,&ked);
>    

But the PIO address space here.

> but when the guest writes to the offset of Doorbell, I cannot see any
> action (via a select on the fd).  Is there something obviously wrong
> that I'm doing?
>    

Yes - they must match.  Not PIO is faster on x86 but nonexistant elsewhere.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


  reply	other threads:[~2010-03-12  7:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12  5:08 ioeventfd usage in KVM Cam Macdonell
2010-03-12  7:43 ` Avi Kivity [this message]
2010-03-12 15:50   ` Cam Macdonell
2010-03-12 16:43     ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B99F0B1.6050606@redhat.com \
    --to=avi@redhat.com \
    --cc=cam@cs.ualberta.ca \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.