qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Help writing a trivial device


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] Help writing a trivial device
Date: Mon, 26 Sep 2011 08:51:59 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]