From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Help writing a trivial device
Date: Mon, 26 Sep 2011 08:51:59 +0100 [thread overview]
Message-ID: <20110926075159.GA6455@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <87litcs1ly.fsf@ginnungagap.bsc.es>
On Mon, Sep 26, 2011 at 12:23:21AM +0200, Lluís Vilanova wrote:
> 1) Cannot start QEMU with KVM when the device is enabled:
> kvm_set_phys_mem: error registering slot: Invalid argument
>
> 2) The driver never gets called on a read/write to its memory
If I add #include "pci.h" at the top of the file, change
TARGET_PAGE_SIZE to 4096 (generic device code is not supposed to be
target-dependent), and throw foo.o into Makefile.objs it builds here.
It launches successfully with -enable-kvm and I can see the device
inside a VM. My qemu.git/HEAD is
1ce9ce6a6184f0192015ba9adf1123d89cd47a7b.
I only had a few minutes and couldn't test reading from BAR0, but you
might want to get 32-bit reads working first before trying 64-bit.
Stefan
next prev parent reply other threads:[~2011-09-26 8:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-25 22:23 [Qemu-devel] Help writing a trivial device Lluís Vilanova
2011-09-26 7:51 ` Stefan Hajnoczi [this message]
2011-09-26 12:54 ` Lluís Vilanova
2011-09-26 18:03 ` Lluís Vilanova
2011-09-27 7:08 ` Stefan Hajnoczi
2011-09-27 13:03 ` Lluís Vilanova
2011-09-27 6:15 ` Zhi Yong Wu
2011-09-27 6:38 ` Avi Kivity
2011-09-27 6:34 ` Zhi Yong Wu
2011-09-27 13:05 ` Lluís Vilanova
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=20110926075159.GA6455@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
/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 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).