qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2014-11-11' into staging

trivial patches for 2014-11-11

# gpg: Signature made Tue 11 Nov 2014 14:38:39 GMT using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg: aka "Michael Tokarev <mjt@corpit.ru>"
# gpg: aka "Michael Tokarev <mjt@debian.org>"

* remotes/mjt/tags/pull-trivial-patches-2014-11-11:
block: Fix comment for bdrv_co_get_block_status
sysbus: Correct SYSTEM_BUS(obj) defines
target-i386: cpu: keeping function parameters alignment on new line
xen-hvm: Remove redundant variable 'xstate'
coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
pc-bios: petalogix-s3adsp1800.dtb: Use 'xlnx, xps-ethernetlite-2.00.a' instead of 'xlnx, xps-ethernetlite-2.00.b'
gdbstub: Add a missing case of signal number translation in gdbstub
numa: make 'info numa' take into account hotplugged memory
slirp/smbd: modify/set several parameters in generated smbd.conf
qemu-doc.texi: fix typos in x509 examples
icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

+72 -18
+3 -3
block.c
··· 3903 3903 } BdrvCoGetBlockStatusData; 3904 3904 3905 3905 /* 3906 - * Returns true iff the specified sector is present in the disk image. Drivers 3907 - * not implementing the functionality are assumed to not support backing files, 3908 - * hence all their sectors are reported as allocated. 3906 + * Returns the allocation status of the specified sectors. 3907 + * Drivers not implementing the functionality are assumed to not support 3908 + * backing files, hence all their sectors are reported as allocated. 3909 3909 * 3910 3910 * If 'sector_num' is beyond the end of the disk image the return value is 0 3911 3911 * and 'pnum' is set to 0.
+1 -1
coroutine-sigaltstack.c
··· 155 155 stack_t oss; 156 156 sigset_t sigs; 157 157 sigset_t osigs; 158 - jmp_buf old_env; 158 + sigjmp_buf old_env; 159 159 160 160 /* The way to manipulate stack is with the sigaltstack function. We 161 161 * prepare a stack, with it delivering a signal to ourselves and then
+4 -1
gdbstub.c
··· 823 823 action = *p++; 824 824 signal = 0; 825 825 if (action == 'C' || action == 'S') { 826 - signal = strtoul(p, (char **)&p, 16); 826 + signal = gdb_signal_to_target(strtoul(p, (char **)&p, 16)); 827 + if (signal == -1) { 828 + signal = 0; 829 + } 827 830 } else if (action != 'c' && action != 's') { 828 831 res = 0; 829 832 break;
+2 -2
hw/cpu/icc_bus.c
··· 73 73 MemoryRegion apic_container; 74 74 } ICCBridgeState; 75 75 76 - #define ICC_BRIGDE(obj) OBJECT_CHECK(ICCBridgeState, (obj), TYPE_ICC_BRIDGE) 76 + #define ICC_BRIDGE(obj) OBJECT_CHECK(ICCBridgeState, (obj), TYPE_ICC_BRIDGE) 77 77 78 78 static void icc_bridge_init(Object *obj) 79 79 { 80 - ICCBridgeState *s = ICC_BRIGDE(obj); 80 + ICCBridgeState *s = ICC_BRIDGE(obj); 81 81 SysBusDevice *sb = SYS_BUS_DEVICE(obj); 82 82 83 83 qbus_create_inplace(&s->icc_bus, sizeof(s->icc_bus), TYPE_ICC_BUS,
+3 -1
include/block/block.h
··· 83 83 #define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS) 84 84 #define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1) 85 85 86 - /* BDRV_BLOCK_DATA: data is read from bs->file or another file 86 + /* 87 + * Allocation status flags 88 + * BDRV_BLOCK_DATA: data is read from bs->file or another file 87 89 * BDRV_BLOCK_ZERO: sectors read as zero 88 90 * BDRV_BLOCK_OFFSET_VALID: sector stored in bs->file as raw data 89 91 * BDRV_BLOCK_ALLOCATED: the content of the block is determined by this
+1 -1
include/hw/sysbus.h
··· 10 10 #define QDEV_MAX_PIO 32 11 11 12 12 #define TYPE_SYSTEM_BUS "System" 13 - #define SYSTEM_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) 13 + #define SYSTEM_BUS(obj) OBJECT_CHECK(BusState, (obj), TYPE_SYSTEM_BUS) 14 14 15 15 typedef struct SysBusDevice SysBusDevice; 16 16
+1
include/sysemu/sysemu.h
··· 161 161 extern NodeInfo numa_info[MAX_NODES]; 162 162 void set_numa_nodes(void); 163 163 void set_numa_modes(void); 164 + void query_numa_node_mem(uint64_t node_mem[]); 164 165 extern QemuOptsList qemu_numa_opts; 165 166 int numa_init_func(QemuOpts *opts, void *opaque); 166 167
+5 -1
monitor.c
··· 1948 1948 { 1949 1949 int i; 1950 1950 CPUState *cpu; 1951 + uint64_t *node_mem; 1951 1952 1953 + node_mem = g_new0(uint64_t, nb_numa_nodes); 1954 + query_numa_node_mem(node_mem); 1952 1955 monitor_printf(mon, "%d nodes\n", nb_numa_nodes); 1953 1956 for (i = 0; i < nb_numa_nodes; i++) { 1954 1957 monitor_printf(mon, "node %d cpus:", i); ··· 1959 1962 } 1960 1963 monitor_printf(mon, "\n"); 1961 1964 monitor_printf(mon, "node %d size: %" PRId64 " MB\n", i, 1962 - numa_info[i].node_mem >> 20); 1965 + node_mem[i] >> 20); 1963 1966 } 1967 + g_free(node_mem); 1964 1968 } 1965 1969 1966 1970 #ifdef CONFIG_PROFILER
+8 -1
net/slirp.c
··· 523 523 fprintf(f, 524 524 "[global]\n" 525 525 "private dir=%s\n" 526 - "socket address=127.0.0.1\n" 526 + "interfaces=127.0.0.1\n" 527 + "bind interfaces only=yes\n" 527 528 "pid directory=%s\n" 528 529 "lock directory=%s\n" 529 530 "state directory=%s\n" 531 + "cache directory=%s\n" 530 532 "ncalrpc dir=%s/ncalrpc\n" 531 533 "log file=%s/log.smbd\n" 532 534 "smb passwd file=%s/smbpasswd\n" 533 535 "security = user\n" 534 536 "map to guest = Bad User\n" 537 + "load printers = no\n" 538 + "printing = bsd\n" 539 + "disable spoolss = yes\n" 540 + "usershare max shares = 0\n" 535 541 "[qemu]\n" 536 542 "path=%s\n" 537 543 "read only=no\n" 538 544 "guest ok=yes\n" 539 545 "force user=%s\n", 546 + s->smb_dir, 540 547 s->smb_dir, 541 548 s->smb_dir, 542 549 s->smb_dir,
+38
numa.c
··· 35 35 #include "hw/boards.h" 36 36 #include "sysemu/hostmem.h" 37 37 #include "qmp-commands.h" 38 + #include "hw/mem/pc-dimm.h" 38 39 39 40 QemuOptsList qemu_numa_opts = { 40 41 .name = "numa", ··· 312 313 memory_region_add_subregion(mr, addr, seg); 313 314 vmstate_register_ram_global(seg); 314 315 addr += size; 316 + } 317 + } 318 + 319 + static void numa_stat_memory_devices(uint64_t node_mem[]) 320 + { 321 + MemoryDeviceInfoList *info_list = NULL; 322 + MemoryDeviceInfoList **prev = &info_list; 323 + MemoryDeviceInfoList *info; 324 + 325 + qmp_pc_dimm_device_list(qdev_get_machine(), &prev); 326 + for (info = info_list; info; info = info->next) { 327 + MemoryDeviceInfo *value = info->value; 328 + 329 + if (value) { 330 + switch (value->kind) { 331 + case MEMORY_DEVICE_INFO_KIND_DIMM: 332 + node_mem[value->dimm->node] += value->dimm->size; 333 + break; 334 + default: 335 + break; 336 + } 337 + } 338 + } 339 + qapi_free_MemoryDeviceInfoList(info_list); 340 + } 341 + 342 + void query_numa_node_mem(uint64_t node_mem[]) 343 + { 344 + int i; 345 + 346 + if (nb_numa_nodes <= 0) { 347 + return; 348 + } 349 + 350 + numa_stat_memory_devices(node_mem); 351 + for (i = 0; i < nb_numa_nodes; i++) { 352 + node_mem[i] += numa_info[i].node_mem; 315 353 } 316 354 } 317 355
pc-bios/petalogix-s3adsp1800.dtb

This is a binary file and will not be displayed.

+2 -2
qemu-doc.texi
··· 1631 1631 # certtool --generate-certificate \ 1632 1632 --load-ca-certificate ca-cert.pem \ 1633 1633 --load-ca-privkey ca-key.pem \ 1634 - --load-privkey server server-key.pem \ 1634 + --load-privkey server-key.pem \ 1635 1635 --template server.info \ 1636 1636 --outfile server-cert.pem 1637 1637 @end example ··· 1654 1654 country = GB 1655 1655 state = London 1656 1656 locality = London 1657 - organiazation = Name of your organization 1657 + organization = Name of your organization 1658 1658 cn = client.foo.example.com 1659 1659 tls_www_client 1660 1660 encryption_key
+3 -3
target-i386/cpu.c
··· 540 540 * otherwise the string is assumed to sized by a terminating nul. 541 541 * Return lexical ordering of *s1:*s2. 542 542 */ 543 - static int sstrcmp(const char *s1, const char *e1, const char *s2, 544 - const char *e2) 543 + static int sstrcmp(const char *s1, const char *e1, 544 + const char *s2, const char *e2) 545 545 { 546 546 for (;;) { 547 547 if (!*s1 || !*s2 || *s1 != *s2) ··· 1859 1859 * if flags, suppress names undefined in featureset. 1860 1860 */ 1861 1861 static void listflags(char *buf, int bufsize, uint32_t fbits, 1862 - const char **featureset, uint32_t flags) 1862 + const char **featureset, uint32_t flags) 1863 1863 { 1864 1864 const char **p = &featureset[31]; 1865 1865 char *q, *b, bit;
+1 -2
xen-hvm.c
··· 993 993 static void xen_hvm_change_state_handler(void *opaque, int running, 994 994 RunState rstate) 995 995 { 996 - XenIOState *xstate = opaque; 997 996 if (running) { 998 - xen_main_loop_prepare(xstate); 997 + xen_main_loop_prepare((XenIOState *)opaque); 999 998 } 1000 999 } 1001 1000