On Tue, Mar 3, 2020 at 7:45 AM Priyamvad Acharya <priyamvad.agni...@gmail.com> wrote:
Please use Reply-All when replying to mailing list emails so that qemu-devel@nongnu.org is included in the CC list. That way the discussion stays on the mailing list. > Hi, > I have written code to emulate a custom PCI device. > Now I want to run custom device with Qemu, so that user application can > perform read/write operation with custom PCI device. > So what is the method to do it? 1. Add the source file somewhere below hw/. 2. Add a make rule to build the object file in Makefile.objs in the same directory as the source file. 3. Compile QEMU and run with -device testpci. > I am new to emulating a custom device model in Qemu, so request you to > explain me in that way. Reading the source code is necessary to understand how things work. You can find many examples of devices in the hw/ directory. Using git-log(1) can be helpful because it shows how new devices were introduced. Stefan