From: Emanuele <e.emanuelegiuseppe@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/7] tests/qgraph: sdhci driver and interface nodes
Date: Wed, 11 Jul 2018 22:44:00 +0200 [thread overview]
Message-ID: <e9572e89-a8c0-abb1-99bb-f55b92e39e3d@gmail.com> (raw)
In-Reply-To: <b87b908a-9b47-abce-1e4e-a58a7f0dbad9@amsat.org>
Hi Philippe,
On 07/11/2018 10:13 PM, Philippe Mathieu-Daudé wrote:
> Hi Emanuele,
>
> On 07/09/2018 06:11 AM, Emanuele Giuseppe Esposito wrote:
>> Add qgraph nodes for sdhci-pci and generic-sdhci (memory mapped) drivers.
>> Both drivers implement (produce) the same interface sdhci, that provides the
>> readw - readq - writeq functions.
>>
>> Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
>> ---
>> tests/Makefile.include | 1 +
>> tests/libqos/sdhci.c | 142 +++++++++++++++++++++++++++++++++++++++++
>> tests/libqos/sdhci.h | 68 ++++++++++++++++++++
>> 3 files changed, 211 insertions(+)
>> create mode 100644 tests/libqos/sdhci.c
>> create mode 100644 tests/libqos/sdhci.h
>>
>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>> index b16bbd55df..acbf704a8a 100644
>> --- a/tests/Makefile.include
>> +++ b/tests/Makefile.include
>> @@ -770,6 +770,7 @@ libqos-usb-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/libqos/usb.o
>> libqos-virtio-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/libqos/virtio.o tests/libqos/virtio-pci.o tests/libqos/virtio-mmio.o tests/libqos/malloc-generic.o
>>
>> libqgraph-obj-y = tests/libqos/qgraph.o
>> +libqgraph-pc-obj-y = $(libqos-pc-obj-y) tests/libqos/sdhci.o
> Shouldn't this be:
>
> libqgraph-obj-y = tests/libqos/qgraph.o tests/libqos/sdhci.o
>
> (not PC related)
I need to add $(libqos-pc-obj-y) because it will include pc-pci.c and
all the pci targerts, loading their libqos_init() functions and building
the graph.
Doing as you suggested won't work for these reasons:
- pci-bus-pc and pci-bus nodes won't be created, so graph would be
incomplete
- sdhci needs libqos to use global_qtest, qpci_device_init, etc. that
won't be provided by check-unit-y even by adding $(libqos-pc-obj-y).
So since test-qgraph do not need libqos, I (suggested by Paolo) added
the test to the check-unit-y target, adding to it just libqgraph-obj.
For other devices like sdhci that need libqos, I created
libqgraph-pc-obj-y (to be renamed to libqgraph-pci-obj-y, since it will
also contain libqos-spapr ?) that will be added to target
check-qtest-pci-y (that provides libqos).
>> + QSDHCIProperties props;
>> +};
>> +
>> +/* Memory Mapped implementation of QSDHCI */
>> +struct QSDHCI_MemoryMapped {
>> + QOSGraphObject obj;
>> + QSDHCI sdhci;
>> + uint64_t addr;
>> +};
>> +
>> +/* PCI implementation of QSDHCI */
>> +struct QSDHCI_PCI {
>> + QOSGraphObject obj;
>> + QPCIDevice dev;
>> + QSDHCI sdhci;
>> + QPCIBar mem_bar;
>> +};
>> +
>> +/**
>> + * qos_create_sdhci_mm(): external constructor used by all drivers/machines
>> + * that "contain" a #QSDHCI_MemoryMapped driver
>> + */
>> +void qos_create_sdhci_mm(QSDHCI_MemoryMapped *sdhci, uint32_t addr,
>> + QSDHCIProperties *common);
> Your IDE uses a weird indentation.
I actually did by hand, not sure how the indentation to split >80 lines
should be.
Maybe I should remove a tab? Like this:
+void qos_create_sdhci_mm(QSDHCI_MemoryMapped *sdhci, uint32_t addr,
+ QSDHCIProperties *common);
next prev parent reply other threads:[~2018-07-11 20:44 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 9:11 [Qemu-devel] [PATCH 0/7] Qtest driver framework Emanuele Giuseppe Esposito
2018-07-09 9:11 ` [Qemu-devel] [PATCH 1/7] tests: qgraph API for the qtest " Emanuele Giuseppe Esposito
2018-07-11 14:28 ` Stefan Hajnoczi
2018-07-11 14:58 ` Paolo Bonzini
2018-07-18 14:23 ` Stefan Hajnoczi
2018-07-18 18:05 ` Emanuele
2018-07-18 19:28 ` Paolo Bonzini
2018-07-18 21:13 ` Emanuele
2018-07-27 12:54 ` Stefan Hajnoczi
2018-07-09 9:11 ` [Qemu-devel] [PATCH 2/7] tests/qgraph: pci-pc driver and interface nodes Emanuele Giuseppe Esposito
2018-07-11 14:49 ` Stefan Hajnoczi
2018-07-11 15:18 ` Paolo Bonzini
2018-07-18 14:29 ` Stefan Hajnoczi
2018-07-18 18:29 ` Emanuele
2018-07-18 19:33 ` Paolo Bonzini
2018-07-18 20:49 ` Emanuele
2018-07-11 17:46 ` Emanuele
2018-07-18 15:02 ` Stefan Hajnoczi
2018-07-18 19:38 ` Paolo Bonzini
2018-07-11 20:05 ` Philippe Mathieu-Daudé
2018-07-09 9:11 ` [Qemu-devel] [PATCH 3/7] tests/qgraph: sdhci " Emanuele Giuseppe Esposito
2018-07-11 20:13 ` Philippe Mathieu-Daudé
2018-07-11 20:44 ` Emanuele [this message]
2018-07-09 9:11 ` [Qemu-devel] [PATCH 4/7] tests/qgraph: arm/raspi2 machine node Emanuele Giuseppe Esposito
2018-07-11 14:59 ` Stefan Hajnoczi
2018-07-11 15:30 ` Paolo Bonzini
2018-07-11 20:19 ` Philippe Mathieu-Daudé
2018-07-09 9:11 ` [Qemu-devel] [PATCH 5/7] tests/qgraph: x86_64/pc " Emanuele Giuseppe Esposito
2018-07-09 9:11 ` [Qemu-devel] [PATCH 6/7] tests/qgraph: gtest integration Emanuele Giuseppe Esposito
2018-07-11 15:02 ` Stefan Hajnoczi
2018-07-09 9:11 ` [Qemu-devel] [PATCH 7/7] tests/qgraph: sdhci test node Emanuele Giuseppe Esposito
2018-07-11 15:15 ` Stefan Hajnoczi
2018-07-11 17:52 ` Emanuele
2018-07-12 12:07 ` Paolo Bonzini
2018-07-11 14:00 ` [Qemu-devel] [PATCH 0/7] Qtest driver framework Stefan Hajnoczi
2018-07-11 14:17 ` Emanuele
2018-07-11 15:27 ` Stefan Hajnoczi
2018-07-18 17:14 ` Markus Armbruster
2018-07-18 19:35 ` Paolo Bonzini
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=e9572e89-a8c0-abb1-99bb-f55b92e39e3d@gmail.com \
--to=e.emanuelegiuseppe@gmail.com \
--cc=f4bug@amsat.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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 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).