qemu-patch-raspberry4/include
Cédric Le Goater 13df93244e spapr/xive: fix EQ page addresses above 64GB
The high order bits of the address of the OS event queue is stored in
bits [4-31] of word2 of the XIVE END internal structures and the low
order bits in word3. This structure is using Big Endian ordering and
computing the value requires some simple arithmetic which happens to
be wrong. The mask removing bits [0-3] of word2 is applied to the
wrong value and the resulting address is bogus when above 64GB.

Guests with more than 64GB of RAM will allocate pages for the OS event
queues which will reside above the 64GB limit. In this case, the XIVE
device model will wake up the CPUs in case of a notification, such as
IPIs, but the update of the event queue will be written at the wrong
place in memory. The result is uncertain as the guest memory is
trashed and IPI are not delivered.

Introduce a helper xive_end_qaddr() to compute this value correctly in
all places where it is used.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190508171946.657-3-clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-05-29 11:39:44 +10:00
..
authz Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
block block: Propagate AioContext change to parents 2019-05-20 17:08:56 +02:00
chardev Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
crypto crypto: Change the qcrypto_random_bytes buffer type to void* 2019-05-22 12:38:54 -04:00
disas Normalize header guard symbol definition. 2019-05-13 08:58:55 +02:00
exec semihosting: move semihosting configuration into its own directory 2019-05-28 10:28:50 +01:00
fpu softfloat: Implement float128_to_uint32 2019-02-26 14:05:19 +00:00
hw spapr/xive: fix EQ page addresses above 64GB 2019-05-29 11:39:44 +10:00
io io: Make qio_channel_yield() interruptible 2019-02-25 15:03:19 +01:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration migration/colo.h: Remove obsolete codes 2019-05-14 17:33:35 +01:00
monitor monitor: Clean up how monitor_disas() funnels output to monitor 2019-04-18 22:18:59 +02:00
net net: Add a network device specific self-announcement ability 2019-03-05 11:27:41 +08:00
qapi qapi: remove qmp_unregister_command() 2019-02-18 14:44:05 +01:00
qemu util: Add qemu_guest_getrandom and associated routines 2019-05-22 12:38:54 -04:00
qom cpus: Initialize pseudo-random seeds for all guest cpus 2019-05-22 12:38:54 -04:00
scsi Normalize header guard symbol definition. 2019-05-13 08:58:55 +02:00
standard-headers linux headers: update against Linux 5.2-rc1 2019-05-21 16:58:56 +02:00
sysemu semihosting: move semihosting configuration into its own directory 2019-05-28 10:28:50 +01:00
ui Normalize header guard symbol definition. 2019-05-13 08:58:55 +02:00
elf.h elf: Add RISC-V PSABI ELF header defines 2019-03-19 05:14:39 -07:00
glib-compat.h slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/ 2019-02-07 15:49:08 +02:00
qemu-common.h include: Include fprintf-fn.h only where needed 2019-04-18 22:18:59 +02:00
qemu-io.h qemu-io: Let command functions return error code 2018-06-11 16:18:45 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00