[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [Qemu-devel] [PATCH v7 38/42] memory: Single byte swap along the I/O path
- To: tony.nguyen@xxxxxx, qemu-devel@xxxxxxxxxx
- From: Richard Henderson <richard.henderson@xxxxxxxxxx>
- Date: Sun, 18 Aug 2019 13:46:16 +0100
- Cc: fam@xxxxxxxxxx, peter.maydell@xxxxxxxxxx, walling@xxxxxxxxxxxxx, cohuck@xxxxxxxxxx, sagark@xxxxxxxxxxxxxxxxx, david@xxxxxxxxxx, jasowang@xxxxxxxxxx, palmer@xxxxxxxxxx, mark.cave-ayland@xxxxxxxxxxxx, i.mitsyanko@xxxxxxxxx, keith.busch@xxxxxxxxx, jcmvbkbc@xxxxxxxxx, frederic.konrad@xxxxxxxxxxx, dmitry.fleytman@xxxxxxxxx, kraxel@xxxxxxxxxx, edgar.iglesias@xxxxxxxxx, gxt@xxxxxxxxxxxxxxx, pburton@xxxxxxxxxxxx, xiaoguangrong.eric@xxxxxxxxx, peter.chubb@xxxxxxxxxxxx, philmd@xxxxxxxxxx, robh@xxxxxxxxxx, hare@xxxxxxxx, sstabellini@xxxxxxxxxx, berto@xxxxxxxxxx, chouteau@xxxxxxxxxxx, qemu-block@xxxxxxxxxx, arikalo@xxxxxxxxxxxx, jslaby@xxxxxxx, deller@xxxxxx, mst@xxxxxxxxxx, magnus.damm@xxxxxxxxx, jcd@xxxxxxxxxxxxxxx, pasic@xxxxxxxxxxxxx, borntraeger@xxxxxxxxxx, mreitz@xxxxxxxxxx, hpoussin@xxxxxxxxxxx, joel@xxxxxxxxx, anthony.perard@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, david@xxxxxxxxxxxxxxxxxxxxx, lersek@xxxxxxxxxx, green@xxxxxxxxxxxxxx, atar4qemu@xxxxxxxxx, antonynpavlov@xxxxxxxxx, marex@xxxxxxx, jiri@xxxxxxxxxxx, ehabkost@xxxxxxxxxx, minyard@xxxxxxx, qemu-s390x@xxxxxxxxxx, sw@xxxxxxxxxxx, alistair@xxxxxxxxxxxxx, yuval.shaia@xxxxxxxxxx, b.galvani@xxxxxxxxx, eric.auger@xxxxxxxxxx, alex.williamson@xxxxxxxxxx, qemu-arm@xxxxxxxxxx, jan.kiszka@xxxxxx, clg@xxxxxxxx, stefanha@xxxxxxxxxx, marcandre.lureau@xxxxxxxxxx, shorne@xxxxxxxxx, jsnow@xxxxxxxxxx, rth@xxxxxxxxxxx, kwolf@xxxxxxxxxx, qemu-riscv@xxxxxxxxxx, proljc@xxxxxxxxx, pbonzini@xxxxxxxxxx, andrew@xxxxxxxx, claudio.fontana@xxxxxxxx, crwulff@xxxxxxxxx, laurent@xxxxxxxxx, Andrew.Baumann@xxxxxxxxxxxxx, sundeep.lkml@xxxxxxxxx, andrew.smirnov@xxxxxxxxx, michael@xxxxxxxx, paul.durrant@xxxxxxxxxx, qemu-ppc@xxxxxxxxxx, huth@xxxxxxxxxxxxx, amarkovic@xxxxxxxxxxxx, kbastian@xxxxxxxxxxxxxxxxxxxxx, imammedo@xxxxxxxxxx, aurelien@xxxxxxxxxxx, stefanb@xxxxxxxxxxxxx
- Delivery-date: Sun, 18 Aug 2019 12:46:50 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Openpgp: preference=signencrypt
On 8/16/19 8:38 AM, tony.nguyen@xxxxxx wrote:
> +static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op)
> {
> + if ((op & MO_BSWAP) != mr->ops->endianness) {
> + switch (op & MO_SIZE) {
You'll want to use devend_memop() here, as previously discussed.
> @@ -2331,7 +2322,7 @@ void memory_region_add_eventfd(MemoryRegion *mr,
> }
>
> if (size) {
> - adjust_endianness(mr, &mrfd.data, size);
> + adjust_endianness(mr, &mrfd.data, size_memop(size));
> }
> memory_region_transaction_begin();
> for (i = 0; i < mr->ioeventfd_nb; ++i) {
> @@ -2366,7 +2357,7 @@ void memory_region_del_eventfd(MemoryRegion *mr,
> unsigned i;
>
> if (size) {
> - adjust_endianness(mr, &mrfd.data, size);
> + adjust_endianness(mr, &mrfd.data, size_memop(size));
> }
> memory_region_transaction_begin();
> for (i = 0; i < mr->ioeventfd_nb; ++i) {
To preserve behaviour it would appear that these need MO_TE.
r~
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|