[PULL 02/27] savevm: Fix memory leak of vmstate_configuration

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Jinhao Gao When VM migrate VMState of configuration, the fields(name and capabilities) of configuration having a flag of VMS_ALLOC need to allocate memory. If the src doesn't free memory of capabilities in SaveState after save VMState of configuration, or the dst doesn't free memory of

[PULL 07/27] migration: support UFFD write fault processing in ram_save_iterate()

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Andrey Gruzdev In this particular implementation the same single migration thread is responsible for both normal linear dirty page migration and procesing UFFD page fault events. Processing write faults includes reading UFFD file descriptor, finding respective RAM block and saving

[PULL 05/27] migration: introduce 'background-snapshot' migration capability

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Andrey Gruzdev Add new capability to 'qapi/migration.json' schema. Update migrate_caps_check() to validate enabled capability set against introduced one. Perform checks for required kernel features and compatibility with guest memory backends. Signed-off-by: Andrey Gruzdev Reviewed-by:

[PULL 23/27] migration: wire up support for snapshot device selection

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Modify load_snapshot/save_snapshot to accept the device list and vmstate node name parameters previously added to the block layer. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé Message-Id: <20210204124834.774401-9-berra...@redhat.com> Signed-off-by: Dr.

[PULL 00/27] migration queue

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 1ba089f2255bfdb071be3ce6ac6c3069e8012179: Merge remote-tracking branch 'remotes/armbru/tags/pull-qmp-2021-02-04' into staging (2021-02-04 14:15:35 +) are available in the Git repository at:

[PULL 17/27] migration: Make save_snapshot() return bool, not 0/-1

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Reviewed-by: Dr. David Alan Gilbert Acked-by: Pavel Dovgalyuk Signed-off-by:

[PULL 03/27] vmstate: Fix memory leak in vmstate_handle_alloc()

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Jinhao Gao Some memory allocated for fields having a flag of VMS_ALLOC in SaveState may not free before VM load vmsd in migration. So we pre-free memory before allocation in vmstate_handle_alloc() to avoid memleaks. Reported-by: Euler Robot Signed-off-by: Jinhao Gao Signed-off-by:

[PULL 15/27] migration: Display the migration blockers

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Update 'info migrate' to display migration blocking information. If the outbound migration is not blocked, there is no change, however if it is blocked a message is displayed with a list of reasons why, e.g. qemu-system-x86_64 -nographic -smp 4 -m 4G -M pc,usb=on

[PULL 09/27] migration: introduce 'userfaultfd-wrlat.py' script

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Andrey Gruzdev Add BCC/eBPF script to analyze userfaultfd write fault latency distribution. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu Message-Id: <20210129101407.103458-6-andrey.gruz...@virtuozzo.com> Signed-off-by: Dr. David Alan Gilbert --- scripts/userfaultfd-wrlat.py |

[PULL 04/27] migration/qemu-file: Fix maybe uninitialized on qemu_get_buffer_in_place()

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Wainer dos Santos Moschetta Fixed error when compiling migration/qemu-file.c with -Werror=maybe-uninitialized as shown here: ../migration/qemu-file.c: In function 'qemu_get_buffer_in_place': ../migration/qemu-file.c:604:18: error: 'src' may be used uninitialized in this function

[PULL 01/27] spapr_pci: Fix memory leak of vmstate_spapr_pci

2021-02-04 Thread Dr. David Alan Gilbert (git)
From: Jinhao Gao When VM migrate VMState of spapr_pci, the field(msi_devs) of spapr_pci having a flag of VMS_ALLOC need to allocate memory. If the src doesn't free memory of msi_devs in SaveStateEntry of spapr_pci after QEMUFile save VMState of spapr_pci, it may result in memory leak of

[PATCH 1/2] migration: Add blocker information

2021-02-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Modify query-migrate so that it has a flag indicating if outbound migration is blocked, and if it is a list of reasons. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 25 +++-- migration/savevm.c| 13 +

[PATCH 2/2] migration: Display the migration blockers

2021-02-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Update 'info migrate' to display migration blocking information. If the outbound migration is not blocked, there is no change, however if it is blocked a message is displayed with a list of reasons why, e.g. qemu-system-x86_64 -nographic -smp 4 -m 4G -M pc,usb=on

[PATCH 0/2] migration blocker information

2021-02-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a rework of 'migration: Provide a test for migratability', based on Eric's feedback this is now an addition to the existing info/query migrate commands rather than a new command. One other importovement is that we now list all the reasons for the

[PATCH] migration: Provide a test for migratability

2021-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Provide a simple way to see if there's currently a migration blocker in operation: $ ./x86_64-softmmu/qemu-system-x86_64 -nographic -M pc,usb=on -chardev null,id=n -device usb-serial,chardev=n (qemu) info migratable Error: State blocked by non-migratable device

[PULL 14/15] savevm: Delete snapshots just created in case of error

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Tuguoyi bdrv_all_create_snapshot() can fails with some snapshots created, so it's better to delete those snapshots before returns to the caller Signed-off-by: Tuguoyi Message-Id: <1607410416-13563-3-git-send-email-tu.gu...@h3c.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr.

[PULL 15/15] migration: Don't allow migration if vm is in POSTMIGRATE

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Tuguoyi The following steps will cause qemu assertion failure: - pause vm by executing 'virsh suspend' - create external snapshot of memory and disk using 'virsh snapshot-create-as' - doing the above operation again will cause qemu crash The backtrace looks like: at

[PULL 12/15] docs/devel/migration: Improve debugging section a bit

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Markus Armbruster Fix typos, and make the example work out of the box. Signed-off-by: Markus Armbruster Message-Id: <20201217071450.701909-1-arm...@redhat.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- docs/devel/migration.rst | 11 ++- 1

[PULL 13/15] savevm: Remove dead code in save_snapshot()

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Tuguoyi The snapshot in each bs is deleted at the beginning, so there is no need to find the snapshot again. Signed-off-by: Tuguoyi Message-Id: <1607410416-13563-2-git-send-email-tu.gu...@h3c.com> Reviewed-by: Denis V. Lunev Signed-off-by: Dr. David Alan Gilbert --- migration/savevm.c

[PULL 08/15] virtiofsd: Disable posix_lock hash table if remote locks are not enabled

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If remote posix locks are not enabled (lo->posix_lock == false), then disable code paths taken to initialize inode->posix_lock hash table and corresponding destruction and search etc. lo_getlk() and lo_setlk() have been modified to return ENOSYS if daemon does not support

[PULL 10/15] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Laszlo Ersek Miklos confirms it's *only* the FUSE_FORGET request that the client can use for decrementing "lo_inode.nlookup". Cc: "Dr. David Alan Gilbert" Cc: Miklos Szeredi Cc: Stefan Hajnoczi Fixes: 1222f015558fc34cea02aa3a5a92de608c82cec8 Signed-off-by: Laszlo Ersek Message-Id:

[PULL 11/15] virtiofsd: Remove useless code about send_notify_iov

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Alex Chen The 'ch' will be NULL in the following stack: send_notify_iov()->fuse_send_msg()->virtio_send_msg(), and this may lead to NULL pointer dereferenced in virtio_send_msg(). But send_notify_iov() was never called, so remove the useless code about send_notify_iov() to fix this

[PULL 04/15] hmp-commands.hx: List abbreviation after command for cont, quit, print

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell We have four HMP commands which have a single-character abbreviated version: cont ('c'), quit ('q'), print ('p') and help ('h'). For cont, quit and print, we list the abbreviation first in the help documentation and the command name. This has the odd effect that in the full

[PULL 09/15] virtiofsd: Check file type in lo_flush()

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Currently lo_flush() is written in such a way that it expects to receive a FLUSH requests on a regular file (and not directories). For example, we call lo_fi_fd() which searches lo->fd_map. If we open directories using opendir(), we keep don't keep track of these in lo->fd_map

[PULL 06/15] virtiofsd: make the debug log timestamp on stderr more human-readable

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Laszlo Ersek The current timestamp format doesn't help me visually notice small jumps in time ("small" as defined on human scale, such as a few seconds or a few ten seconds). Replace it with a local time format where such differences stand out. Before: > [13316826770337] [ID: 0004]

[PULL 05/15] virtiofsd: Use --thread-pool-size=0 to mean no thread pool

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Right now we create a thread pool and main thread hands over the request to thread in thread pool to process. Number of threads in thread pool can be managed by option --thread-pool-size. In tests we have noted that many of the workloads are getting better performance if we

[PULL 03/15] monitor:Don't use '#' flag of printf format ('%#') in format strings

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Yutao Ai Delete '#' and use '0x' prefix instead Signed-off-by: Yutao Ai Message-Id: <20201125014514.55562-4-aiyu...@huawei.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Dr. David Alan Gilbert --- monitor/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PULL 01/15] monitor:open brace '{' following struct go on the same line

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Yutao Ai Move the open brace '{' following struct go on the same line Signed-off-by: Yutao Ai Message-Id: <20201125014514.55562-2-aiyu...@huawei.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Dr. David Alan Gilbert --- monitor/hmp-cmds.c | 3 +-- 1 file changed, 1

[PULL 00/15] migration queue

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 75ee62ac606bfc9eb59310b9446df3434bf6e8c2: Merge remote-tracking branch 'remotes/ehabkost-gl/tags/x86-next-pull-request' into staging (2020-12-17 18:53:36 +) are available in the Git repository at:

[PULL 07/15] virtiofsd: Set up posix_lock hash table for root inode

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal We setup per inode hash table ->posix_lock to support remote posix locks. But we forgot to initialize this table for root inode. Laszlo managed to trigger an issue where he sent a FUSE_FLUSH request for root inode and lo_flush() found inode with inode->posix_lock NULL and

[PULL 02/15] monitor:braces {} are necessary for all arms of this statement

2020-12-18 Thread Dr. David Alan Gilbert (git)
From: Yutao Ai Fix the errors by add {} Signed-off-by: Yutao Ai Message-Id: <20201125014514.55562-3-aiyu...@huawei.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Dr. David Alan Gilbert --- monitor/misc.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff

[PULL 2/3] hmp: Pass monitor to MonitorDef.get_value()

2020-11-13 Thread Dr. David Alan Gilbert (git)
From: Kevin Wolf All of these callbacks use mon_get_cpu_env(). Pass the Monitor pointer to them it in preparation for adding a monitor argument to mon_get_cpu_env(). Signed-off-by: Kevin Wolf Message-Id: <20201113114326.97663-3-kw...@redhat.com> Reviewed-by: Dr. David Alan Gilbert

[PULL 0/3] hmp queue

2020-11-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit be2df2ac6f6b921cc057de0a119ac30fbc60: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20201112' into staging (2020-11-13 11:36:30 +) are available in the Git repository at: git://github.com/dagrh/qemu.git

[PULL 3/3] hmp: Pass monitor to mon_get_cpu_env()

2020-11-13 Thread Dr. David Alan Gilbert (git)
From: Kevin Wolf mon_get_cpu_env() is indirectly called monitor_parse_arguments() where the current monitor isn't set yet. Instead of using monitor_cur_env(), explicitly pass the Monitor pointer to the function. Without this fix, an HMP command like "x $pc" crashes like this: #0

[PULL 1/3] hmp: Pass monitor to mon_get_cpu()

2020-11-13 Thread Dr. David Alan Gilbert (git)
From: Kevin Wolf mon_get_cpu() is indirectly called monitor_parse_arguments() where the current monitor isn't set yet. Instead of using monitor_cur(), explicitly pass the Monitor pointer to the function. Signed-off-by: Kevin Wolf Message-Id: <20201113114326.97663-2-kw...@redhat.com>

[PULL 07/11] migration: handle CANCELLING state in migration_completion()

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: "Longpeng(Mike)" The following sequence may cause the VM abort during migration: 1. RUN_STATE_RUNNING,MIGRATION_STATUS_ACTIVE 2. before call migration_completion(), we send migrate_cancel QMP command, the state machine is changed to: RUN_STATE_RUNNING,MIGRATION_STATUS_CANCELLING

[PULL 06/11] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Chuan Zheng When creating new tls client, the tioc->master will be referenced which results in socket leaking after multifd_save_cleanup if we cancel migration. Fix it by do object_unref() after tls client creation. Suggested-by: Daniel P. Berrangé Signed-off-by: Chuan Zheng

[PULL 05/11] migration/dirtyrate: simplify includes in dirtyrate.c

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Chuan Zheng Remove redundant blank line which is left by Commit 662770af7c6e8c, also take this opportunity to remove redundant includes in dirtyrate.c. Signed-off-by: Chuan Zheng Message-Id: <1604030281-112946-1-git-send-email-zhengch...@huawei.com> Reviewed-by: Dr. David Alan Gilbert

[PULL 09/11] tools/virtiofsd/buffer.c: check whether buf is NULL in fuse_bufvec_advance func

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Haotian Li In fuse_bufvec_advance func, calling fuse_bufvec_current func may return NULL, so we should check whether buf is NULL before using it. Signed-off-by: Haotian Li Signed-off-by: Zhiqiang Liu Message-Id: <29fc87c2-b87c-4c34-40d4-75381f228...@huawei.com> Reviewed-by: Dr. David

[PULL 11/11] virtiofsd: check whether strdup lo.source return NULL in main func

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Haotian Li In main func, strdup lo.source may fail. So check whether strdup lo.source return NULL before using it. Signed-off-by: Haotian Li Signed-off-by: Zhiqiang Liu Message-Id: Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert ---

[PULL 08/11] virtiofsd: Announce submounts even without statx()

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Contrary to what the check (and warning) in lo_init() claims, we can announce submounts just fine even without statx() -- the check is based on comparing both the mount ID and st_dev of parent and child. Without statx(), we will not have the mount ID; but we always have st_dev.

[PULL 04/11] migration: fix uninitialized variable warning in migrate_send_rp_req_pages()

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Chen Qun After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify that the statements in the macro must be executed. As a result, some variables assignment statements in the macro may be considered as unexecuted by the compiler. When the -Wmaybe-uninitialized

[PULL 10/11] virtiofsd: check whether lo_map_reserve returns NULL in, main func

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Haotian Li In main func, func lo_map_reserve is called without NULL check. If reallocing new_elems fails in func lo_map_grow, the func lo_map_reserve may return NULL. We should check whether lo_map_reserve returns NULL before using it. Signed-off-by: Haotian Li Signed-off-by: Zhiqiang

[PULL 03/11] migration/multifd: fix hangup with TLS-Multifd due to blocking handshake

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Chuan Zheng The qemu main loop could hang up forever when we enable TLS+Multifd. The Src multifd_send_0 invokes tls handshake, it sends hello to sever and wait response. However, the Dst main qemu loop has been waiting recvmsg() for multifd_recv_1. Both of Src and Dst main qemu loop are

[PULL 01/11] migration/ram: Fix hexadecimal format string specifier

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x'). Inspired-by: Dov Murik Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Message-Id:

[PULL 00/11] migration queue

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit cb5d19e8294486551c422759260883ed290226d9: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-macppc-20201112' into staging (2020-11-12 11:33:26 +) are available in the Git repository at:

[PULL 02/11] ACPI: Avoid infinite recursion when dump-vmstate

2020-11-12 Thread Dr. David Alan Gilbert (git)
From: Peng Liang There is a field with vmstate_ghes_state as vmsd in vmstate_ghes_state, which will lead to infinite recursion in dump_vmstate_vmsd. Fixes: a08a64627b ("ACPI: Record the Generic Error Status Block address") Reported-by: Euler Robot Signed-off-by: Peng Liang Acked-by: Igor

[PULL 09/12] virtiofsd: Add mount ID to the lo_inode key

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Using st_dev is not sufficient to uniquely identify a mount: You can mount the same device twice, but those are still separate trees, and e.g. by mounting something else inside one of them, they may differ. Using statx(), we can get a mount ID that uniquely identifies a mount.

[PULL 11/12] tests/acceptance/boot_linux: Accept SSH pubkey

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Let download_cloudinit() take an optional pubkey, which subclasses of BootLinux can pass through setUp(). Signed-off-by: Max Reitz Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Reviewed-by: Stefan Hajnoczi Message-Id:

[PULL 08/12] meson.build: Check for statx()

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Check whether the glibc provides statx() and if so, define CONFIG_STATX. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Message-Id: <20201102161859.156603-4-mre...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- meson.build | 16 1 file changed,

[PULL 06/12] virtiofsd: Check FUSE_SUBMOUNTS

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz FUSE_SUBMOUNTS is a pure indicator by the kernel to signal that it supports submounts. It does not check its state in the init reply, so there is nothing for fuse_lowlevel.c to do but to check its existence and copy it into fuse_conn_info.capable. Signed-off-by: Max Reitz

[PULL 01/12] migration: Unify reset of last_rb on destination node when recover

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu When postcopy recover happens, we need to reset last_rb after each return of postcopy_pause_fault_thread() because that means we just got the postcopy migration continued. Unify this reset to the place right before we want to kick the fault thread again, when we get the command

[PULL 07/12] virtiofsd: Add attr_flags to fuse_entry_param

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz fuse_entry_param is converted to fuse_attr on the line (by fill_entry()), so it should have a member that mirrors fuse_attr.flags. fill_entry() should then copy this fuse_entry_param.attr_flags to fuse_attr.flags. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi

[PULL 02/12] migration: Postpone the kick of the fault thread after recover

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu The new migrate_send_rp_req_pages_pending() call should greatly improve destination responsiveness because it will resync faulted address after postcopy recovery. However it is also the 1st place to initiate the page request from the main thread. One thing is overlooked on that

[PULL 12/12] tests/acceptance: Add virtiofs_submounts.py

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz This test invokes several shell scripts to create a random directory tree full of submounts, and then check in the VM whether every submount has its own ID and the structure looks as expected. (Note that the test scripts must be non-executable, so Avocado will not try to execute

[PULL 05/12] virtiofsd: Fix the help message of posix lock

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Jiachen Zhang The commit 88fc107956a5812649e5918e0c092d3f78bb28ad disabled remote posix locks by default. But the --help message still says it is enabled by default. So fix it to output no_posix_lock. Signed-off-by: Jiachen Zhang Message-Id:

[PULL 10/12] virtiofsd: Announce sub-mount points

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Whenever we encounter a directory with an st_dev or mount ID that differs from that of its parent, we set the FUSE_ATTR_SUBMOUNT flag so the guest can create a submount for it. We only need to do so in lo_do_lookup(). The following functions return a fuse_attr object: -

[PULL 03/12] virtiofsd: Seccomp: Add 'send' for syslog

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On ppc, and some other archs, it looks like syslog ends up using 'send' rather than 'sendto'. Reference: https://github.com/kata-containers/kata-containers/issues/1050 Reported-by: amulm...@in.ibm.com Signed-off-by: Dr. David Alan Gilbert Message-Id:

[PULL 00/12] migration queue

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit b139d11ae198aba0e009daddf7a3370ce84b2d09: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201102' into staging (2020-11-02 16:05:47 +) are available in the Git repository at:

[PULL 04/12] tools/virtiofsd: Check vu_init() return value (CID 1435958)

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé Since commit 6f5fd837889, vu_init() can fail if malloc() returns NULL. This fixes the following Coverity warning: CID 1435958 (#1 of 1): Unchecked return value (CHECKED_RETURN) Fixes: 6f5fd837889 ("libvhost-user: support many virtqueues") Reviewed-by: Dr. David

[PATCH] virtiofsd: Seccomp: Add 'send' for syslog

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On ppc it looks like syslog ends up using 'send' rather than 'sendto'. Reference: https://github.com/kata-containers/kata-containers/issues/1050 Reported-by: amulm...@in.ibm.com Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_seccomp.c | 1

[PULL 15/16] tests/acceptance/boot_linux: Accept SSH pubkey

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Let download_cloudinit() take an optional pubkey, which subclasses of BootLinux can pass through setUp(). Signed-off-by: Max Reitz Message-Id: <20200909184028.262297-8-mre...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: WIllian Rampazzo Reviewed-by: Stefan

[PULL 12/16] virtiofsd: Add fuse_reply_attr_with_flags()

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz The plain fuse_reply_attr() function does not allow setting fuse_attr.flags, so add this new function that does. Make fuse_reply_attr() a wrapper around it. Signed-off-by: Max Reitz Message-Id: <20200909184028.262297-5-mre...@redhat.com> Reviewed-by: Stefan Hajnoczi

[PULL 10/16] virtiofsd: Announce FUSE_ATTR_FLAGS

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz The fuse_attr.flags field is currently just initialized to 0, which is valid. Thus, there is no reason not to always announce FUSE_ATTR_FLAGS (when the kernel supports it). Signed-off-by: Max Reitz Message-Id: <20200909184028.262297-3-mre...@redhat.com> Reviewed-by: Stefan

[PULL 06/16] tools/virtiofsd: xattr name mappings: Map server xattr names

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Map xattr names coming from the server, i.e. the host filesystem; currently this is only from listxattr. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20201023165812.36028-4-dgilb...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan

[PULL 13/16] virtiofsd: Store every lo_inode's parent_dev

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz We want to detect mount points in the shared tree. We report them to the guest by setting the FUSE_ATTR_SUBMOUNT flag in fuse_attr.flags, but because the FUSE client will create a submount for every directory that has this flag set, we must do this only for the actual mount

[PULL 14/16] virtiofsd: Announce sub-mount points

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Whenever we encounter a directory with an st_dev that differs from that of its parent, we set the FUSE_ATTR_SUBMOUNT flag so the guest can create a submount for it. Make this behavior optional, so submounts are only announced to the guest with the announce_submounts option.

[PULL 08/16] tools/virtiofsd: xattr name mappings: Simple 'map'

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The mapping rule system implemented in the last few patches is extremely flexible, but not easy to use. Add a simple 'map' type as a sprinkling of sugar to make it easy. e.g. -o xattrmap=":map::user.virtiofs.:" would be sufficient to prefix all xattr's or

[PULL 16/16] tests/acceptance: Add virtiofs_submounts.py

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz This test invokes several shell scripts to create a random directory tree full of submounts, and then check in the VM whether every submount has its own ID and the structure looks as expected. (Note that the test scripts must be non-executable, so Avocado will not try to execute

[PULL 03/16] virtiofsd: add container-friendly -o sandbox=chroot option

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi virtiofsd cannot run in a container because CAP_SYS_ADMIN is required to create namespaces. Introduce a weaker sandbox mode that is sufficient in container environments because the container runtime already sets up namespaces. Use chroot to restrict path traversal to the

[PULL 00/16] virtiofs queue

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit a95e0396c805735c491a049b01de6f5a713fb91b: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2020-10-26 15:49:11 +) are available in the Git repository at:

[PULL 04/16] tools/virtiofsd: xattr name mappings: Add option

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add an option to define mappings of xattr names so that the client and server filesystems see different views. This can be used to have different SELinux mappings as seen by the guest, to run the virtiofsd with less privileges (e.g. in a case where it can't set

[PULL 11/16] virtiofsd: Add attr_flags to fuse_entry_param

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz fuse_entry_param is converted to fuse_attr on the line (by fill_entry()), so it should have a member that mirrors fuse_attr.flags. fill_entry() should then copy this fuse_entry_param.attr_flags to fuse_attr.flags. Signed-off-by: Max Reitz Message-Id:

[PULL 09/16] linux/fuse.h: Pull in from Linux

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Update the linux/fuse.h standard header from the kernel development tree that implements FUSE submounts. This adds the fuse_attr.flags field, the FUSE_ATTR_FLAGS INIT flag, and the FUSE_ATTR_SUBMOUNT flag for fuse_attr.flags. Signed-off-by: Max Reitz Message-Id:

[PULL 05/16] tools/virtiofsd: xattr name mappings: Map client xattr names

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Map xattr names originating at the client; from get/set/remove xattr. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20201023165812.36028-3-dgilb...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert ---

[PULL 01/16] configure: add option for virtiofsd

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Misono Tomohiro Currently it is unknown whether virtiofsd will be built at configuration time. It will be automatically built when dependency is met. Also, required libraries are not clear. To make this clear, add configure option --{enable,disable}-virtiofsd. The default is the same as

[PULL 07/16] tools/virtiofsd: xattr name mapping examples

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a few examples of xattrmaps to the documentation. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi Message-Id: <20201023165812.36028-5-dgilb...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert ---

[PULL 02/16] virtiofsd: passthrough_ll: set FUSE_LOG_INFO as default log_level

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Misono Tomohiro Just noticed that although help message says default log level is INFO, it is actually 0 (EMRGE) and no mesage will be shown when error occurs. It's better to follow help message. Signed-off-by: Misono Tomohiro Message-Id:

[PULL 15/16] migration/postcopy: Release fd before going into 'postcopy-pause'

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Logically below race could trigger with the old code: test programmigration thread wait_until('postcopy-pause') postcopy_pause()

[PULL 12/16] migration: Introduce migrate_send_rp_message_req_pages()

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu This is another layer wrapper for sending a page request to the source VM. The new migrate_send_rp_message_req_pages() will be used elsewhere in coming patches. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20201021212721.440373-3-pet...@redhat.com>

[PULL 16/16] migration-test: Only hide error if !QTEST_LOG

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu The errors are very useful when debugging qtest failures, especially when QTEST_LOG=1 is set. Let's allow override MigrateStart.hide_stderr when QTEST_LOG=1 is specified, because that means the user wants to be verbose. Not very nice to introduce the first QTEST_LOG env access

[PULL 07/16] migration: Do not initialise statics and globals to 0 or NULL

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Message-Id: <1603163448-27122-7-git-send-email-yubih...@huawei.com> Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c| 2 +- migration/savevm.c | 2

[PULL 10/16] migration: using trace_ to replace DPRINTF

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Message-Id: <1603179176-5360-1-git-send-email-yubih...@huawei.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Dr. David Alan Gilbert --- migration/block.c | 36 ++-- migration/page_cache.c | 13

[PULL 13/16] migration: Maintain postcopy faulted addresses

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Maintain a list of faulted addresses on the destination host for which we're waiting on. This is implemented using a GTree rather than a real list to make sure even there're plenty of vCPUs/threads that are faulting, the lookup will still be fast with O(log(N)) (because we'll do

[PULL 14/16] migration: Sync requested pages after postcopy recovery

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu We synchronize the requested pages right after a postcopy recovery happens. This helps to synchronize the prioritized pages on source so that the faulted threads can be served faster. Reported-by: Xiaohui Li Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu

[PULL 09/16] migration: Delete redundant spaces

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Message-Id: <1603163448-27122-9-git-send-email-yubih...@huawei.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- migration/rdma.c | 2 +- 1 file changed, 1

[PULL 11/16] migration: Pass incoming state into qemu_ufd_copy_ioctl()

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It'll be used in follow up patches to access more fields out of it. Meanwhile fetch the userfaultfd inside the function. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20201021212721.440373-2-pet...@redhat.com> Signed-off-by: Dr. David Alan Gilbert

[PULL 08/16] migration: Open brace '{' following function declarations go on the next line

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Message-Id: <1603163448-27122-8-git-send-email-yubih...@huawei.com> Signed-off-by: Dr. David Alan Gilbert --- migration/rdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PULL 00/16] migration queue

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit a46e72710566eea0f90f9c673a0f02da0064acce: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20201026' into staging (2020-10-26 14:50:03 +) are available in the Git repository at: git://github.com/dagrh/qemu.git

[PULL 06/16] migration: Add braces {} for if statement

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Message-Id: <1603163448-27122-6-git-send-email-yubih...@huawei.com> Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 6 -- 1 file changed, 4

[PULL 04/16] migration: Add spaces around operator

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Message-Id: <1603163448-27122-4-git-send-email-yubih...@huawei.com> Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c| 4 ++--

[PULL 05/16] migration: Open brace '{' following struct go on the same line

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Message-Id: <1603163448-27122-5-git-send-email-yubih...@huawei.com> Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert --- migration/migration.h | 3 +-- 1 file changed, 1

[PULL 02/16] migration: Do not use C99 // comments

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <1603163448-27122-2-git-send-email-yubih...@huawei.com> Signed-off-by: Dr. David Alan Gilbert --- migration/block.c | 2 +- migration/rdma.c | 2 +-

[PULL 03/16] migration: Don't use '#' flag of printf format

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Bihong Yu Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <1603163448-27122-3-git-send-email-yubih...@huawei.com> Signed-off-by: Dr. David Alan Gilbert --- migration/block.c | 2 +- migration/ram.c | 4

[PULL 01/16] migration: Drop unused VMSTATE_FLOAT64 support

2020-10-26 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell Commit ef96e3ae9698d6 in January 2019 removed the last user of the VMSTATE_FLOAT64* macros. These were used by targets which defined their floating point register file as an array of 'float64'. We used to try to maintain a stricter distinction between 'float64' (a type for

[PATCH v4 4/5] tools/virtiofsd: xattr name mapping examples

2020-10-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a few examples of xattrmaps to the documentation. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- docs/tools/virtiofsd.rst | 50 1 file changed, 50 insertions(+) diff --git

[PATCH v4 5/5] tools/virtiofsd: xattr name mappings: Simple 'map'

2020-10-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The mapping rule system implemented in the last few patches is extremely flexible, but not easy to use. Add a simple 'map' type as a sprinkling of sugar to make it easy. e.g. -o xattrmap=":map::user.virtiofs.:" would be sufficient to prefix all xattr's or

[PATCH v4 3/5] tools/virtiofsd: xattr name mappings: Map server xattr names

2020-10-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Map xattr names coming from the server, i.e. the host filesystem; currently this is only from listxattr. Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_ll.c | 90 1 file changed, 90 insertions(+) diff

[PATCH v4 1/5] tools/virtiofsd: xattr name mappings: Add option

2020-10-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add an option to define mappings of xattr names so that the client and server filesystems see different views. This can be used to have different SELinux mappings as seen by the guest, to run the virtiofsd with less privileges (e.g. in a case where it can't set

[PATCH v4 2/5] tools/virtiofsd: xattr name mappings: Map client xattr names

2020-10-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Map xattr names originating at the client; from get/set/remove xattr. Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_ll.c | 101 ++- 1 file changed, 98 insertions(+), 3 deletions(-) diff --git

<    3   4   5   6   7   8   9   10   11   12   >