Eduardo Habkost
b19a3e2cd9
machine: Move gpio code to hw/core/gpio.c
...
Only softmmu code uses gpio, so move gpio code from qdev.c to
gpio.c and compile it only on softmmu mode.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20190425200051.19906-2-ehabkost@redhat.com >
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2021-11-01 19:44:00 +01:00
BALATON Zoltan
46e44759fc
hw/timer/sh_timer: Remove use of hw_error
...
The hw_error function calls abort and is not meant to be used by
devices. Use qemu_log_mask instead to log and ignore invalid accesses.
Also fix format strings to allow dropping type casts of hwaddr and use
__func__ instead of hard coding function name in the message which
were wrong in two cases.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <f818dc3dd2ac8c3b3d53067f316a716d7f9683d8.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
65307c7792
hw/timer/sh_timer: Fix timer memory region size
...
The timer unit only has registers that fit in a region 0x30 bytes
long. No need to have the timer region larger than that.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <b1cd196cf1395a602c7a08a4f858e69e50c446a1.1635550060.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
f64ccec414
hw/timer/sh_timer: Do not wrap lines that are not too long
...
It's more readable to keep things on one line if it fits the length limit.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <97bc2a38991f33fd0c8cc2e4d0a3a29b20c47d1f.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
5d9b737e51
hw/timer/sh_timer: Rename sh_timer_state to SHTimerState
...
According to coding style types should be camel case, also remove
unneded casts from void *.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <d9a9d160c1153a583397e366ab06477f5a31c507.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
3233178789
hw/intc/sh_intc: Remove unneeded local variable initialisers
...
The sh_intc_locate function will either init these or not return so no
need to initialise them.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <15e04aa665c68ab5df47bbf505346d413be2fc1c.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
36cf5ee885
hw/intc/sh_intc: Simplify allocating sources array
...
Use g_new0 instead of g_malloc0 and avoid some unneeded temporary
variable assignments.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <72efc4f2c4ff8b96848d03dca08e4541ee4076f6.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
418a221c2b
hw/intc/sh_intc: Avoid using continue in loops
...
Instead of if !expr continue else do something it is more straight
forward to say if expr then do something, especially if the action is
just a few lines. Remove such uses of continue to make the code easier
to follow.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <0efaa5e7a1a3ee11f82b3bb1942c287576c67f8b.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
85208f7a97
hw/intc/sh_intc: Replace abort() with g_assert_not_reached()
...
All the places that call abort should not happen which is better
marked by g_assert_not_reached.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <039e6a784532f2af27f8adeafdb8e0391722f567.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
9b12fb10b7
hw/intc/sh_intc: Inline and drop sh_intc_source() function
...
This function is very simple and provides no advantage. Call sites
become simpler without it so just write it in line and drop the
separate function.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <a98d1f7f94e91a42796b7d91e9153a7eaa3d1c44.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
12201fe38a
hw/intc/sh_intc: Use array index instead of pointer arithmetics
...
Address of element i is one word thus clearer than array + i.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <f49c9b1dee1fcaf374b092d862a6821907d5fcdc.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
46ea1f8236
hw/intc/sh_intc: Remove excessive parenthesis
...
Drop unneded parenthesis and split up one complex expression to write
it with less brackets so it's easier to follow.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <a48e849e5b803a952ed15a2502cfece2bde68934.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
51cb902bac
hw/intc/sh_intc: Move sh_intc_register() closer to its only user
...
The sh_intc_register() function is only used at one place. Move them
together so it's easier to see what's going on.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <49f2742bc67cba7164385fafad204ab1e1bd3a0b.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
92d1d3ada1
hw/intc/sh_intc: Drop another useless macro
...
The INT_REG_PARAMS macro was only used a few times within one function
on adjacent lines and is actually more complex than writing out the
parameters so simplify it by expanding the macro at call sites and
dropping the #define.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <d3bdfdc5ab5ae1c51a6c6c38bde3829a99f85ce5.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
81d18cd48a
hw/intc/sh_intc: Rename iomem region
...
Rename the iomem region to "intc" from "interrupt-controller" which
makes the info mtree output less wide as it is already too wide
because of all the aliases. Also drop the format macro which was only
used twice in close proximity so we can just use the literal string
instead without a macro definition.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <cb6402dab6b44c804142b5cf9af68e6398cb613f.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
dc6f1734b7
hw/intc/sh_intc: Turn some defines into an enum
...
Turn the INTC_MODE defines into an enum and clean up the function
returning these to make it clearer by removing nested ifs and
superfluous parenthesis. The one remaining #define is a flag which is
moved further apart by changing its value from 8 to 0x80 to leave some
spare bits as this is or-ed with the enum value at some places.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Message-Id: <4adf4e1ac9d2e728e5a536c69e310d77f0c4455a.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
cfaf2806e8
hw/intc/sh_intc: Use existing macro instead of local one
...
The INTC_A7 local macro does the same as the A7ADDR from
include/sh/sh.h so use the latter and drop the local macro definition.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <53f033477c73b7c9b021d36033c590416d6199c7.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
44ae04f032
hw/char/sh_serial: Add device id to trace output
...
Normally there are at least two sh_serial instances. Add device id to
trace messages to make it clear which instance they belong to
otherwise its not possible to tell which serial device is accessed.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <cc1f9ff9f4259ae799750e452f8871849c7a104c.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
beeb520925
hw/char/sh_serial: QOM-ify
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <92902ba34fdf2c8c62232365fbb6531b1036d557.1635541329.git.balaton@eik.bme.hu >
[PMD: Use g_strdup() to initialize DeviceState::id]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
017f77bbf7
hw/char/sh_serial: Split off sh_serial_reset() from sh_serial_init()
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <ffb46f2814794c8dfc2c5a0cf83086a7bd754e10.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
5b344b02e1
hw/char/sh_serial: Embed QEMUTimer in state struct
...
Instead of allocating timer with timer_new store it directly in the
state struct. This makes it simpler to free it together with the device.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <fd01eb3720ec32dab06e03019f72f3e177033679.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
2f6df13748
hw/char/sh_serial: Rename type sh_serial_state to SHSerialState
...
Coding style says types should be camel case.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <0f185653528c99eeeb2b4e4afb8b818d93298c20.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
3cf7ce4337
hw/char/sh_serial: Do not abort on invalid access
...
Replace fprintf with qemu_log_mask LOG_GUEST_ERROR as the intention is
to handle valid accesses in these functions so if we get to these
errors then it's an invalid access. Do not abort as that would allow
the guest to crash QEMU and the practice in other devices is to not do
that just log and ignore the invalid access. While at it also simplify
the complex bit ops to check if a return value was set which can be
done much simpler and clearer.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <6b46045141d6d9cc32e17c223896fa1116384796.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
6e5dd76f21
hw/sh4/r2d: Use error_report instead of fprintf to stderr
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <7f320ab72f3d4d43cd62925230a9f83583413f67.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
ad52cfc137
hw/sh4: Change debug printfs to traces
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <b776043e811ab3caf200515e1350bdcccd1cc47b.1635541329.git.balaton@eik.bme.hu >
[PMD: Fixed format strings for 32-bit hosts]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 18:39:37 +02:00
BALATON Zoltan
3b885dabd0
hw/sh4: Fix typos in a comment
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <a84405db64ef81bff1a16526da290cc68f1444db.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 11:46:40 +02:00
BALATON Zoltan
373b96b9c6
hw/sh4: Coding style: Remove unnecessary casts
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Message-Id: <6cb1bcf24572ad8465c20b64fec81157f34bcbe9.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 11:46:40 +02:00
BALATON Zoltan
ac3c9e74c1
hw/sh4: Coding style: Add missing braces
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Message-Id: <b53a8cbcf57207fbd6408db1007b3e82008d60f7.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 11:46:40 +02:00
BALATON Zoltan
f94bff1337
hw/sh4: Coding style: White space fixes
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Message-Id: <91698c54fa493a4cfe93546211206439787d4b78.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 11:46:40 +02:00
BALATON Zoltan
221389657a
hw/sh4: Coding style: Fix multi-line comments
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Message-Id: <3f192c699f4e5949ec0fcc436e5610f50afe2dbf.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 11:46:39 +02:00
BALATON Zoltan
b3793b8a91
hw/sh4: Coding style: Remove tabs
...
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Message-Id: <2d9b2c470ec022cc85a25b3e5de337b5e794f7f6.1635541329.git.balaton@eik.bme.hu >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2021-10-30 11:46:39 +02:00
Alistair Francis
9b144ed444
hw/riscv: opentitan: Fixup the PLIC context addresses
...
Fixup the PLIC context address to correctly support the threshold and
claim register.
Fixes: ef63100648 ("hw/riscv: opentitan: Update to the latest build")
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Bin Meng <bmeng.cn@gmail.com >
Message-id: 20211025040657.262696-1-alistair.francis@opensource.wdc.com
2021-10-28 14:39:23 +10:00
Alistair Francis
7d10ff8a4d
hw/riscv: virt: Use the PLIC config helper function
...
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Bin Meng <bmeng.cn@gmail.com >
Tested-by: Bin Meng <bmeng.cn@gmail.com >
Message-id: 20211022060133.3045020-5-alistair.francis@opensource.wdc.com
2021-10-28 14:39:23 +10:00
Alistair Francis
8486eb8cdc
hw/riscv: microchip_pfsoc: Use the PLIC config helper function
...
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Bin Meng <bmeng.cn@gmail.com >
Tested-by: Bin Meng <bmeng.cn@gmail.com >
Message-id: 20211022060133.3045020-4-alistair.francis@opensource.wdc.com
2021-10-28 14:39:23 +10:00
Alistair Francis
4e8fb53c0b
hw/riscv: sifive_u: Use the PLIC config helper function
...
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Bin Meng <bmeng.cn@gmail.com >
Tested-by: Bin Meng <bmeng.cn@gmail.com >
Message-id: 20211022060133.3045020-3-alistair.francis@opensource.wdc.com
2021-10-28 14:39:23 +10:00
Alistair Francis
bf357e1d72
hw/riscv: boot: Add a PLIC config string function
...
Add a generic function that can create the PLIC strings.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Bin Meng <bmeng.cn@gmail.com >
Message-id: 20211022060133.3045020-2-alistair.francis@opensource.wdc.com
2021-10-28 14:39:23 +10:00
Alistair Francis
9925c8bb81
hw/riscv: virt: Don't use a macro for the PLIC configuration
...
Using a macro for the PLIC configuration doesn't make the code any
easier to read. Instead it makes it harder to figure out what is going
on, so let's remove it.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Bin Meng <bmeng.cn@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-id: 20211022060133.3045020-1-alistair.francis@opensource.wdc.com
2021-10-28 14:39:23 +10:00
Christian Schoenebeck
7e985780aa
9pfs: use P9Array in v9fs_walk()
...
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com >
Message-Id: <90c65d1c1ca11c1b434bb981b1fc7966f7711c8f.1633097129.git.qemu_oss@crudebyte.com >
2021-10-27 14:45:22 +02:00
Christian Schoenebeck
cc82fde9c7
9pfs: make V9fsPath usable via P9Array API
...
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com >
Message-Id: <79a0ddf8375f6c95f0565ef155a1bf1e9387664f.1633097129.git.qemu_oss@crudebyte.com >
2021-10-27 14:45:22 +02:00
Christian Schoenebeck
04a7f9e55e
9pfs: simplify blksize_to_iounit()
...
Use QEMU_ALIGN_DOWN() macro to reduce code and to make it
more human readable.
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com >
Reviewed-by: Greg Kurz <groug@kaod.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <b84eb324d2ebdcc6f9c442c97b5b4d01eecb4f43.1632758315.git.qemu_oss@crudebyte.com >
2021-10-27 14:45:22 +02:00
Christian Schoenebeck
b565bccb00
9pfs: deduplicate iounit code
...
Remove redundant code that translates host fileystem's block
size into 9p client (guest side) block size.
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com >
Reviewed-by: Greg Kurz <groug@kaod.org >
Message-Id: <129bb71d5119e61d335f1e3107e472e4beea223a.1632758315.git.qemu_oss@crudebyte.com >
2021-10-27 14:45:22 +02:00
Christian Schoenebeck
669ced09b3
9pfs: fix wrong I/O block size in Rgetattr
...
When client sent a 9p Tgetattr request then the wrong I/O block
size value was returned by 9p server; instead of host file
system's I/O block size it should rather return an I/O block
size according to 9p session's 'msize' value, because the value
returned to client should be an "optimum" block size for I/O
(i.e. to maximize performance), it should not reflect the actual
physical block size of the underlying storage media.
The I/O block size of a host filesystem is typically 4k, so the
value returned was far too low for good 9p I/O performance.
This patch adds stat_to_iounit() with a similar approach as the
existing get_iounit() function.
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com >
Reviewed-by: Greg Kurz <groug@kaod.org >
Message-Id: <E1mT2Js-0000DW-OH@lizzy.crudebyte.com >
2021-10-27 14:45:22 +02:00
Richard Henderson
c5b2f55981
Merge remote-tracking branch 'remotes/vivier/tags/trivial-branch-for-6.2-pull-request' into staging
...
Trivial patches pull request 20211023
# gpg: Signature made Sat 23 Oct 2021 11:30:42 AM PDT
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu "
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com >" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu >" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com >" [full]
* remotes/vivier/tags/trivial-branch-for-6.2-pull-request:
analyze-migration.py: fix extract contents ('-x') errors
analyze-migration.py: fix a long standing typo
README: Fix some documentation URLs
hw/nvram: Fix Memory Leak in Xilinx ZynqMP eFuse device
hw/nvram: Fix Memory Leak in Xilinx Versal eFuse device
hw/nvram: Fix Memory Leak in Xilinx eFuse QOM
softmmu/physmem.c: Fix typo in comment
MAINTAINERS: Add myself as reviewer of 'Machine core' API
disas/nios2: Simplify endianess conversion
disas/nios2: Fix style in print_insn_nios2()
po: update turkish translation
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-10-23 14:30:10 -07:00
Tong Ho
e3f368e0b2
hw/nvram: Fix Memory Leak in Xilinx ZynqMP eFuse device
...
Signed-off-by: Tong Ho <tong.ho@xilinx.com >
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com >
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20211015203532.2463705-4-tong.ho@xilinx.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2021-10-23 18:50:33 +02:00
Tong Ho
512a63b2b0
hw/nvram: Fix Memory Leak in Xilinx Versal eFuse device
...
Signed-off-by: Tong Ho <tong.ho@xilinx.com >
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com >
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20211015203532.2463705-3-tong.ho@xilinx.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2021-10-23 18:50:33 +02:00
Tong Ho
c4e4d0d92b
hw/nvram: Fix Memory Leak in Xilinx eFuse QOM
...
Signed-off-by: Tong Ho <tong.ho@xilinx.com >
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com >
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20211015203532.2463705-2-tong.ho@xilinx.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2021-10-23 18:50:33 +02:00
Richard Henderson
660efed8b3
Merge remote-tracking branch 'remotes/alistair23/tags/pull-riscv-to-apply-20211022-2' into staging
...
Fourth RISC-V PR for QEMU 6.2
- Vector extension bug fixes
- Bit manipulation extension bug fix
- Support vhost-user and numa mem options on all boards
- Rationalise XLEN and operand lengths
- Bump the OpenTitan FPGA support
- Remove the Ibex PLIC
- General code cleanup
# gpg: Signature made Fri 22 Oct 2021 06:36:10 AM PDT
# gpg: using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
# gpg: Good signature from "Alistair Francis <alistair@alistair23.me >" [full]
* remotes/alistair23/tags/pull-riscv-to-apply-20211022-2: (33 commits)
hw/riscv: spike: Use MachineState::ram and MachineClass::default_ram_id
hw/riscv: sifive_u: Use MachineState::ram and MachineClass::default_ram_id
hw/riscv: sifive_e: Use MachineState::ram and MachineClass::default_ram_id
hw/riscv: shakti_c: Use MachineState::ram and MachineClass::default_ram_id
hw/riscv: opentitan: Use MachineState::ram and MachineClass::default_ram_id
hw/riscv: microchip_pfsoc: Use MachineState::ram and MachineClass::default_ram_id
hw/intc: sifive_plic: Cleanup the irq_request function
hw/intc: sifive_plic: Cleanup the realize function
hw/intc: sifive_plic: Move the properties
hw/intc: Remove the Ibex PLIC
hw/riscv: opentitan: Update to the latest build
target/riscv: Compute mstatus.sd on demand
target/riscv: Use riscv_csrrw_debug for cpu_dump
target/riscv: Use gen_shift*_per_ol for RVB, RVI
target/riscv: Use gen_unary_per_ol for RVB
target/riscv: Adjust trans_rev8_32 for riscv64
target/riscv: Use gen_arith_per_ol for RVM
target/riscv: Replace DisasContext.w with DisasContext.ol
target/riscv: Replace is_32bit with get_xl/get_xlen
target/riscv: Properly check SEW in amo_op
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-10-22 12:09:17 -07:00
Richard Henderson
eb8f1d57bd
Merge remote-tracking branch 'remotes/clg/tags/pull-aspeed-20211022' into staging
...
Aspeed patches :
* New fp5280g2-bmc board (John)
* Small cleanup in Aspeed SMC model (Cedric)
# gpg: Signature made Fri 22 Oct 2021 12:55:18 AM PDT
# gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@kaod.org >" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1
* remotes/clg/tags/pull-aspeed-20211022:
speed/sdhci: Add trace events
aspeed/smc: Use a container for the flash mmio address space
aspeed: Add support for the fp5280g2-bmc board
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-10-22 09:02:12 -07:00
Richard Henderson
1dafe7656a
Merge remote-tracking branch 'remotes/vivier-m68k/tags/q800-pull-request' into staging
...
Pull request Q800 20211022
GLUE updates for A/UX mode
# gpg: Signature made Fri 22 Oct 2021 12:16:29 AM PDT
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu "
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com >" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu >" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com >" [full]
* remotes/vivier-m68k/tags/q800-pull-request:
q800: drop 8-bit graphic_depth check for Apple 21 inch display
q800: add NMI handler
q800: wire up remaining IRQs in classic mode
q800: route SONIC on-board Ethernet IRQ via nubus IRQ 9 in classic mode
q800: wire up auxmode GPIO to GLUE
mac_via: add GPIO for A/UX mode
q800: use GLUE IRQ numbers instead of IRQ level for GLUE IRQs
q800: move VIA1 IRQ from level 1 to level 6
mac_via: update comment for VIA1B_vMystery bit
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-10-22 07:47:13 -07:00
Bin Meng
11ec06f9ea
hw/riscv: spike: Use MachineState::ram and MachineClass::default_ram_id
...
Using memory_region_init_ram(), which can't possibly handle vhost-user,
and can't work as expected with '-numa node,memdev' options.
Use MachineState::ram instead of manually initializing RAM memory
region, as well as by providing MachineClass::default_ram_id to
opt in to memdev scheme.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 20211020014112.7336-7-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2021-10-22 23:35:47 +10:00