Jiri Denemark
df13c0b477
qemu: Add support for guest CPU cache
...
This patch maps /domain/cpu/cache element into -cpu parameters:
- <cache mode='passthrough'/> is translated to host-cache-info=on
- <cache level='3' mode='emulate'/> is transformed into l3-cache=on
- <cache mode='disable'/> is turned in host-cache-info=off,l3-cache=off
Any other <cache> element is forbidden.
The tricky part is detecting whether QEMU supports the CPU properties.
The 'host-cache-info' property is introduced in v2.4.0-1389-ge265e3e480,
earlier QEMU releases enabled host-cache-info by default and had no way
to disable it. If the property is present, it defaults to 'off' for any
QEMU until at least 2.9.0.
The 'l3-cache' property was introduced later by v2.7.0-200-g14c985cffa.
Earlier versions worked as if l3-cache=off was passed. For any QEMU
until at least 2.9.0 l3-cache is 'off' by default.
QEMU 2.9.0 was the first release which supports probing both properties
by running device-list-properties with typename=host-x86_64-cpu. Older
QEMU releases did not support device-list-properties command for CPU
devices. Thus we can't really rely on probing them and we can just use
query-cpu-model-expansion QMP command as a witness.
Because the cache property probing is only reliable for QEMU >= 2.9.0
when both are already supported for quite a few releases, we let QEMU
report an error if a specific cache mode is explicitly requested. The
other mode (or both if a user requested CPU cache to be disabled) is
explicitly turned off for QEMU >= 2.9.0 to avoid any surprises in case
the QEMU defaults change. Any older QEMU already turns them off so not
doing so explicitly does not make any harm.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-04-27 22:41:10 +02:00
..
2017-02-11 06:51:28 +04:00
2017-03-26 19:22:30 +04:00
2017-03-26 19:22:30 +04:00
2017-04-11 14:06:47 +02:00
2017-03-27 16:29:27 +02:00
2017-04-18 13:27:11 +02:00
2017-04-11 14:06:47 +02:00
2017-04-11 14:06:47 +02:00
2017-01-18 06:31:54 -05:00
2017-04-27 22:07:14 +02:00
2017-04-11 14:06:47 +02:00
2016-05-24 15:21:05 -04:00
2016-07-01 21:13:30 -04:00
2017-03-21 11:25:59 -04:00
2017-03-21 11:25:59 -04:00
2017-03-21 11:25:59 -04:00
2017-02-17 15:47:58 +01:00
2016-12-06 13:34:00 +01:00
2017-04-11 14:06:47 +02:00
2017-04-11 14:06:47 +02:00
2017-04-27 22:41:10 +02:00
2016-05-16 10:30:38 -04:00
2016-09-23 10:30:54 +02:00
2017-04-11 14:06:47 +02:00
2016-11-02 17:36:50 +01:00
2017-04-11 14:06:47 +02:00
2017-03-28 10:54:50 +02:00
2017-03-27 10:35:19 +02:00
2017-04-27 22:41:10 +02:00
2017-04-21 13:34:41 +02:00
2016-09-09 08:20:05 -04:00
2016-05-17 10:41:45 +02:00
2017-03-29 10:36:55 +02:00
2017-03-29 10:36:55 +02:00
2017-03-08 13:22:33 -05:00
2017-03-08 13:22:33 -05:00
2017-03-08 13:22:33 -05:00
2017-03-07 10:44:26 +01:00
2017-03-27 13:13:29 +02:00
2016-04-21 18:14:07 -04:00
2017-03-27 13:13:29 +02:00
2016-12-06 13:33:18 +01:00
2016-05-05 10:01:55 +02:00
2017-04-04 16:36:15 +02:00
2016-05-17 10:41:45 +02:00
2017-01-24 16:18:13 -07:00
2016-09-02 12:46:03 -06:00
2016-06-26 19:33:08 -04:00
2016-05-26 11:17:06 +02:00
2017-02-14 10:54:29 +01:00
2016-07-10 15:40:11 -04:00
2017-04-04 17:30:03 +02:00
2017-04-21 13:35:04 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-05-14 09:46:44 +02:00
2017-04-11 13:23:01 +02:00
2017-04-19 16:36:38 +02:00
2016-07-01 12:20:54 +02:00
2017-04-18 13:27:11 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-27 14:13:19 +02:00
2017-04-11 13:23:01 +02:00
2017-04-04 17:30:03 +02:00
2016-05-14 09:46:44 +02:00
2017-04-27 22:07:14 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-04-23 15:41:40 -04:00
2016-04-23 15:41:40 -04:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-06 12:29:35 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-19 10:51:51 +01:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-12-06 13:33:18 +01:00
2016-12-06 13:34:00 +01:00
2017-04-04 17:30:03 +02:00
2017-04-19 10:51:51 +01:00
2017-04-19 10:51:51 +01:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-11 14:06:47 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-11-25 20:34:26 +01:00
2017-04-04 17:30:03 +02:00
2017-03-23 10:24:34 +01:00
2017-04-06 10:07:43 +02:00
2017-04-11 14:06:47 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 12:40:27 -04:00
2017-04-04 17:30:03 +02:00
2017-04-10 14:49:20 +02:00
2017-01-18 10:04:11 +01:00
2017-01-20 15:42:12 +01:00
2017-04-27 22:41:10 +02:00
2017-01-20 15:42:12 +01:00
2017-04-21 13:34:41 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-05-14 09:22:12 +02:00
2017-04-11 14:06:47 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-05-02 07:18:25 +02:00
2016-08-18 13:37:08 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-11 14:06:47 +02:00
2017-04-11 14:06:47 +02:00
2016-06-14 08:25:25 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-11 14:06:47 +02:00
2017-04-11 13:23:01 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-02-11 18:24:32 +01:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-19 10:51:51 +01:00
2017-04-04 17:30:03 +02:00
2017-04-27 14:13:19 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-25 21:14:18 +01:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-12-06 13:33:18 +01:00
2017-04-04 17:30:03 +02:00
2016-05-20 17:16:21 +02:00
2016-05-02 22:25:52 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-06-08 13:48:45 +01:00
2017-04-04 17:30:03 +02:00
2017-03-27 17:34:59 +02:00
2016-05-20 17:16:21 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2016-02-12 16:13:31 +01:00
2017-04-04 17:30:03 +02:00
2017-02-19 06:45:09 -05:00
2017-04-04 17:30:03 +02:00
2017-04-05 09:51:51 +02:00
2017-04-04 17:30:03 +02:00
2016-04-23 15:41:40 -04:00
2017-04-11 14:06:47 +02:00
2016-04-23 15:41:40 -04:00
2017-04-13 10:14:42 +02:00
2016-04-23 15:41:40 -04:00
2016-04-23 15:41:40 -04:00
2016-04-23 15:41:40 -04:00
2016-09-14 13:18:07 +02:00
2016-04-23 15:41:40 -04:00
2016-08-24 17:43:29 +02:00
2016-05-02 07:18:25 +02:00
2016-04-23 15:41:40 -04:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-11 14:06:47 +02:00
2016-09-14 13:18:07 +02:00
2016-05-20 17:16:21 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00
2017-04-04 17:30:03 +02:00