* [Qemu-devel] Adding a custom monitoring device to virt machine
@ 2016-08-23 7:31 Nassim Corteggiani
2016-09-15 9:06 ` Stefan Hajnoczi
0 siblings, 1 reply; 3+ messages in thread
From: Nassim Corteggiani @ 2016-08-23 7:31 UTC (permalink / raw)
To: qemu-devel
Hi all,
This is the first time I am playing with QEmu.
I made a custom qemu device in oder to monitor all memory accesses (sdram, flash, peripherals, gpio, ...).
The device is parent of TYPE_SYS_BUS_DEVICE and implements a MemoryRegionOps with read/write functions.
The device is part of virt machine, so I called my device contructor from virt.c (fct machvirt_init line 1256).
The constructor set the mmio device range from 0 to RAMLIMIT_BYTES.
The device is well initialized but read/write functions are never called...
Did I miss something ?
If I want to create a dynamically allocated device that can be used by all QEmu machine without adding the device constructor for each machine, how can I process ?
Thank you a lot for any help.
Best regards,
Nassim.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Adding a custom monitoring device to virt machine
2016-08-23 7:31 [Qemu-devel] Adding a custom monitoring device to virt machine Nassim Corteggiani
@ 2016-09-15 9:06 ` Stefan Hajnoczi
2016-09-15 9:45 ` Nassim Corteggiani
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2016-09-15 9:06 UTC (permalink / raw)
To: Nassim Corteggiani; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
On Tue, Aug 23, 2016 at 07:31:53AM +0000, Nassim Corteggiani wrote:
> Hi all,
>
>
> This is the first time I am playing with QEmu.
>
>
> I made a custom qemu device in oder to monitor all memory accesses (sdram, flash, peripherals, gpio, ...).
>
>
> The device is parent of TYPE_SYS_BUS_DEVICE and implements a MemoryRegionOps with read/write functions.
>
>
> The device is part of virt machine, so I called my device contructor from virt.c (fct machvirt_init line 1256).
>
> The constructor set the mmio device range from 0 to RAMLIMIT_BYTES.
>
>
> The device is well initialized but read/write functions are never called...
>
>
> Did I miss something ?
>
>
> If I want to create a dynamically allocated device that can be used by all QEmu machine without adding the device constructor for each machine, how can I process ?
That's probably not the way to go about monitoring memory accesses.
What are you trying to do?
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Adding a custom monitoring device to virt machine
2016-09-15 9:06 ` Stefan Hajnoczi
@ 2016-09-15 9:45 ` Nassim Corteggiani
0 siblings, 0 replies; 3+ messages in thread
From: Nassim Corteggiani @ 2016-09-15 9:45 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]
On Tue, Aug 23, 2016 at 07:31:53AM +0000, Nassim Corteggiani wrote:
> Hi all,
>
>
> This is the first time I am playing with QEmu.
>
>
> I made a custom qemu device in oder to monitor all memory accesses (sdram, flash, peripherals, gpio, ...).
>
>
> The device is parent of TYPE_SYS_BUS_DEVICE and implements a MemoryRegionOps with read/write functions.
>
>
> The device is part of virt machine, so I called my device contructor from virt.c (fct machvirt_init line 1256).
>
> The constructor set the mmio device range from 0 to RAMLIMIT_BYTES.
>
>
> The device is well initialized but read/write functions are never called...
>
>
> Did I miss something ?
>
>
> If I want to create a dynamically allocated device that can be used by all QEmu machine without adding the device constructor for each machine, how can I process ?
> That's probably not the way to go about monitoring memory accesses.
> What are you trying to do?
> Stefan
Thank you for your reply Stefan.
I tried to add my MMIO device on an existing machine thinking that memory area could be "handled" by different devices.
I thought that MMIO device was just notified when IO on a 'monitored' address space occurs.
I solved the problem by creating a QEmu machine. Then I added my Device as a MMIO memory space.
Nassim
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-15 11:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 7:31 [Qemu-devel] Adding a custom monitoring device to virt machine Nassim Corteggiani
2016-09-15 9:06 ` Stefan Hajnoczi
2016-09-15 9:45 ` Nassim Corteggiani
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.