[PULL 17/18] tests: Pass in MigrateStart** into test_migrate_start()

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu test_migrate_start() will release the MigrateStart structure that passed in, however that's not super clear to the caller because after the call returned the pointer can still be referenced by the callers. It can easily be a source of use-after-free. Let's pass in a double

[PULL 18/18] migration: Remove load_state_old and minimum_version_id_old

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell There are no longer any VMStateDescription structs in the tree which use the load_state_old support for custom handling of incoming migration from very old QEMU. Remove the mechanism entirely. This includes removing one stray useless setting of minimum_version_id_old in a

[PULL 04/18] qapi/monitor: refactor set/expire_password with enums

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Stefan Reiter 'protocol' and 'connected' are better suited as enums than as strings, make use of that. No functional change intended. Suggested-by: Markus Armbruster Reviewed-by: Markus Armbruster Signed-off-by: Stefan Reiter [FE: update "Since: " from 6.2 to 7.0 put 'keep' first

[PULL 15/18] migration: postcopy_pause_fault_thread() never fails

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Per the title, remove the return code and simplify the callers as the errors will never be triggered. No functional change intended. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20220301083925.33483-12-pet...@redhat.com> Signed-off-by: Dr. David

[PULL 12/18] migration: Add postcopy_thread_create()

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Postcopy create threads. A common manner is we init a sem and use it to sync with the thread. Namely, we have fault_thread_sem and listen_thread_sem and they're only used for this. Make it a shared infrastructure so it's easier to create yet another thread. Reviewed-by: Dr.

[PULL 03/18] monitor/hmp: add support for flag argument with value

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Stefan Reiter Adds support for the "-xs" parameter type, where "-x" denotes a flag name and the "s" suffix indicates that this flag is supposed to take an arbitrary string parameter. These parameters are always optional, the entry in the qdict will be omitted if the flag is not given.

[PULL 13/18] migration: Move static var in ram_block_from_stream() into global

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Static variable is very unfriendly to threading of ram_block_from_stream(). Move it into MigrationIncomingState. Make the incoming state pointer to be passed over to ram_block_from_stream() on both caller sites. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu

[PULL 16/18] migration: Add migration_incoming_transport_cleanup()

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Add a helper to cleanup the transport listener. When do it, we should also null-ify the cleanup hook and the data, then it's even safe to call it multiple times. Move the socket_address_list cleanup altogether, because that's a mirror of the listener channels and only for the

[PULL 08/18] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu The enablement of postcopy listening has a few steps, add a few tracepoints to be there ready for some basic measurements for them. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20220301083925.33483-3-pet...@redhat.com> Signed-off-by: Dr. David Alan

[PULL 11/18] migration: Dump ramblock and offset too when non-same-page detected

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu In ram_load_postcopy() we'll try to detect non-same-page case and dump error. This error is very helpful for debugging. Adding ramblock & offset into the error log too. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id:

[PULL 14/18] migration: Enlarge postcopy recovery to capture !-EIO too

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu We used to have quite a few places making sure -EIO happened and that's the only way to trigger postcopy recovery. That's based on the assumption that we'll only return -EIO for channel issues. It'll work in 99.99% cases but logically that won't cover some corner cases. One

[PULL 10/18] migration: Introduce postcopy channels on dest node

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Postcopy handles huge pages in a special way that currently we can only have one "channel" to transfer the page. It's because when we install pages using UFFDIO_COPY, we need to have the whole huge page ready, it also means we need to have a temp huge page when trying to receive

[PULL 06/18] migration/rdma: set the REUSEADDR option for destination

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Jack Wang We hit following error during testing RDMA transport: in case of migration error, mgmt daemon pick one migration port, incoming rdma:[::]:8089: RDMA ERROR: Error: could not rdma_bind_addr Then try another -incoming rdma:[::]:8103, sometime it worked, sometimes need another try

[PULL 05/18] qapi/monitor: allow VNC display id in set/expire_password

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: Stefan Reiter It is possible to specify more than one VNC server on the command line, either with an explicit ID or the auto-generated ones à la "default", "vnc2", "vnc3", ... It is not possible to change the password on one of these extra VNC displays though. Fix this by adding a

[PULL 01/18] clock-vmstate: Add missing END_OF_LIST

2022-03-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the missing VMSTATE_END_OF_LIST to vmstate_muldiv Fixes: 99abcbc7600 ("clock: Provide builtin multiplier/divider") Signed-off-by: Dr. David Alan Gilbert Message-Id: <2022001934.115028-1-dgilb...@redhat.com> Reviewed-by: Peter Maydell Reviewed-by:

[PATCH] deprecation: x86 default machine types

2022-03-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Declare the intent to require a machine type to be specified on x86 system emulation. Signed-off-by: Dr. David Alan Gilbert --- docs/about/deprecated.rst | 8 1 file changed, 8 insertions(+) diff --git a/docs/about/deprecated.rst

[PULL 10/12] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony

[PULL 12/12] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Honor the expected behavior of syncfs() to synchronously flush all data and metadata to disk on linux systems. If virtiofsd is started with '-o announce_submounts', the client is expected to send a FUSE_SYNCFS request for each individual submount. In this case, we just create a

[PULL 09/12] virtiofsd: Create new file with security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has

[PULL 11/12] virtiofsd: Add an option to enable/disable security label

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is

[PULL 08/12] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context

[PULL 04/12] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal

[PULL 07/12] virtiofsd: Move core file creation code in separate function

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal

[PULL 06/12] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-6-vgo...@redhat.com>

[PULL 05/12] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal ->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32

[PULL 03/12] linux-headers: Update headers to v5.17-rc1

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-3-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/standard-headers/asm-x86/kvm_para.h | 1 +

[PULL 02/12] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major

[PULL 01/12] virtiofsd: Do not support blocking flock

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Sebastian Hasler With the current implementation, blocking flock can lead to deadlock. Thus, it's better to return EOPNOTSUPP if a user attempts to perform a blocking flock request. Signed-off-by: Sebastian Hasler Message-Id:

[PULL 00/12] virtiofs queue

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 09:57:11 +) are available in the Git repository at:

[PULL 07/12] virtiofsd: Move core file creation code in separate function

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal

[PULL 05/12] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal ->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32

[PULL 09/12] virtiofsd: Create new file with security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has

[PULL 12/12] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Honor the expected behavior of syncfs() to synchronously flush all data and metadata to disk on linux systems. If virtiofsd is started with '-o announce_submounts', the client is expected to send a FUSE_SYNCFS request for each individual submount. In this case, we just create a

[PULL 11/12] virtiofsd: Add an option to enable/disable security label

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is

[PULL 08/12] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context

[PULL 10/12] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony

[PULL 04/12] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal

[PULL 06/12] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-6-vgo...@redhat.com>

[PULL 03/12] linux-headers: Update headers to v5.17-rc1

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-3-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/standard-headers/asm-x86/kvm_para.h | 1 +

[PULL 01/12] virtiofsd: Do not support blocking flock

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Sebastian Hasler With the current implementation, blocking flock can lead to deadlock. Thus, it's better to return EOPNOTSUPP if a user attempts to perform a blocking flock request. Signed-off-by: Sebastian Hasler Message-Id:

[PULL 02/12] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major

[PULL 00/12] virtiofs queue

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 09:57:11 +) are available in the Git repository at:

[PULL 10/12] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony

[PULL 06/12] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-6-vgo...@redhat.com>

[PULL 03/12] linux-headers: Update headers to v5.17-rc1

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-3-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/standard-headers/asm-x86/kvm_para.h | 1 +

[PULL 12/12] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Honor the expected behavior of syncfs() to synchronously flush all data and metadata to disk on linux systems. If virtiofsd is started with '-o announce_submounts', the client is expected to send a FUSE_SYNCFS request for each individual submount. In this case, we just create a

[PULL 05/12] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal ->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32

[PULL 11/12] virtiofsd: Add an option to enable/disable security label

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is

[PULL 08/12] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context

[PULL 04/12] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal

[PULL 09/12] virtiofsd: Create new file with security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has

[PULL 07/12] virtiofsd: Move core file creation code in separate function

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal

[PULL 01/12] virtiofsd: Do not support blocking flock

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Sebastian Hasler With the current implementation, blocking flock can lead to deadlock. Thus, it's better to return EOPNOTSUPP if a user attempts to perform a blocking flock request. Signed-off-by: Sebastian Hasler Message-Id:

[PULL 00/12] virtiofs queue

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 09:57:11 +) are available in the Git repository at:

[PULL 02/12] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major

[PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'q35' machine type series has been around for a few years now, and is getting heavily used downstream without many problems; lets flip to using it as the default. While it is of course newer and shinier than it's old i440fx cousin, the main reasons are: *

[PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/device-plug-test.c | 20 +-- tests/qtest/drive_del-test.c | 35 +-

[PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" For tests that rely on old hardware, e.g. floppies or IDE drives, explicitly select the 'pc' machine type. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/fdc-test.c| 2 +- tests/qtest/hd-geo-test.c | 12 +--- tests/qtest/i440fx-test.c | 2 +-

[PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/device-plug-test.c | 20 +-- tests/qtest/drive_del-test.c | 35 +-

[PATCH 0/3] x86: Switch over to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We've been using q35 heavily for a while now and it generally works quite nicely; downstream in RH we prefer it as our default, and I wanted to see what people think of making it the default. The only pain really is that it requires some more setup for hotplug; so

[PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'q35' machine type series has been around for a few years now, and is getting heavily used downstream without many problems; lets flip to using it as the default. While it is of course newer and shinier than it's old i440fx cousin, the main reasons are: *

[PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" For tests that rely on old hardware, e.g. floppies or IDE drives, explicitly select the 'pc' machine type. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/fdc-test.c| 2 +- tests/qtest/hd-geo-test.c | 12 +--- tests/qtest/i440fx-test.c | 2 +-

[PATCH 0/3] x86: Switch over to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We've been using q35 heavily for a while now and it generally works quite nicely; downstream in RH we prefer it as our default, and I wanted to see what people think of making it the default. The only pain really is that it requires some more setup for hotplug; so

[PATCH v2] Deprecate C virtiofsd

2022-02-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There's a nice new Rust implementation out there; recommend people do new work on that. Signed-off-by: Dr. David Alan Gilbert --- docs/about/deprecated.rst | 17 + 1 file changed, 17 insertions(+) diff --git a/docs/about/deprecated.rst

[PATCH] Deprecate C virtiofsd

2022-02-09 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There's a nice new Rust implementation out there; recommend people do new work on that. Signed-off-by: Dr. David Alan Gilbert --- docs/about/deprecated.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/about/deprecated.rst

[PATCH v2] Fix %#0 misuses

2022-02-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Joe Perches pointed out on lkml [1] that the format special %# (which adds 0x) is included in the character count, i.e.: printf("0: %#08x\n0: %#08x\n", 0xabcdef01,1); gives: 0: 0xabcdef01 0: 0x01 rather than padding to the expected 8 data characters.

[PULL 1/1] virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)

2022-01-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal At the start, drop membership of all supplementary groups. This is not required. If we have membership of "root" supplementary group and when we switch uid/gid using setresuid/setsgid, we still retain membership of existing supplemntary groups. And that can allow some

[PULL 0/1] virtiofs queue

2022-01-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit aeb0ae95b7f18c66158792641cb6ba0cde5789ab: Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging (2022-01-22 12:03:22 +) are available in the Git repository at:

[PATCH v2 2/3] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be

[PATCH v2 0/3] vmsd checks

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Aftern the patch the other day where I added a missing END_OF_LIST, Peter suggested adding something more robust. Here I: add a check for a flag at the end of the list add a check that's performed in vmstate_register_with_alias_id only within qtest

[PATCH v2 3/3] migration: Perform vmsd structure check during tests

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert --- migration/savevm.c | 39 +++ 1 file changed, 39

[PATCH v2 1/3] ppc: Fix vmstate_pbr403 subsection name

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The pbr403 subsection is part of the tlb6xx state, so I believe it's name needs to be: .name = "cpu/tlb6xx/pbr403", Signed-off-by: Dr. David Alan Gilbert --- target/ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be

[PATCH] clock-vmstate: Add missing END_OF_LIST

2022-01-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the missing VMSTATE_END_OF_LIST to vmstate_muldiv Fixes: 99abcbc7600 ("clock: Provide builtin multiplier/divider") Signed-off-by: Dr. David Alan Gilbert --- hw/core/clock-vmstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/clock-vmstate.c

[PULL 5/5] virtiofsd: Error on bad socket group name

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Make the '--socket-group=' option fail if the group name is unknown: ./tools/virtiofsd/virtiofsd --socket-group=zaphod vhost socket: unable to find group 'zaphod' Reported-by: Xiaoling Gao Signed-off-by: Dr. David Alan Gilbert Message-Id:

[PULL 1/5] virtiofsd: xattr mapping add a new type "unsupported"

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Right now for xattr remapping, we support types of "prefix", "ok" or "bad". Type "bad" returns -EPERM on setxattr and hides xattr in listxattr. For getxattr, mapping code returns -EPERM but getxattr code converts it to -ENODATA. I need a new semantics where if an xattr is

[PULL 2/5] virtiofsd: Remove unused virtio_fs_config definition

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal "struct virtio_fs_config" definition seems to be unused in fuse_virtio.c. Remove it. Signed-off-by: Vivek Goyal Message-Id: <20210930153037.1194279-4-vgo...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_virtio.c | 6

[PULL 0/5] virtiofs queue

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c5b2f559814104f4145f8bc310f4d33c7ead8f49: Merge remote-tracking branch 'remotes/vivier/tags/trivial-branch-for-6.2-pull-request' into staging (2021-10-23 14:30:10 -0700) are available in the Git repository at:

[PULL 4/5] virtiofsd: Add a helper to stop all queues

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Use a helper to stop all the queues. Later in the patch series I am planning to use this helper at one more place later in the patch series. Signed-off-by: Vivek Goyal Message-Id: <20210930153037.1194279-6-vgo...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr.

[PULL 3/5] virtiofsd: Add a helper to send element on virtqueue

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal We have open coded logic to take locks and push element on virtqueue at three places. Add a helper and use it everywhere. Code is easier to read and less number of lines of code. Signed-off-by: Vivek Goyal Message-Id: <20210930153037.1194279-5-vgo...@redhat.com> Reviewed-by:

[PATCH] Fix %#08 misuses

2021-10-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Joe Perches pointed out on lkml [1] that the format special %# (which adds 0x) is included in the character count, i.e.: printf("0: %#08x\n0: %#08x\n", 0xabcdef01,1); gives: 0: 0xabcdef01 0: 0x01 rather than padding to the expected 8 data characters. It

[PATCH] virtiofsd: Error on bad socket group name

2021-10-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Make the '--socket-group=' option fail if the group name is unknown: ./tools/virtiofsd/virtiofsd --socket-group=zaphod vhost socket: unable to find group 'zaphod' Reported-by: Xiaoling Gao Signed-off-by: Dr. David Alan Gilbert ---

[PULL 1/2] tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist

2021-09-16 Thread Dr. David Alan Gilbert (git)
From: Thomas Huth The virtiofsd currently crashes on s390x when doing something like this in the guest: mkdir -p /mnt/myfs mount -t virtiofs myfs /mnt/myfs touch /mnt/myfs/foo.txt stat -f /mnt/myfs/foo.txt The problem is that the fstatfs64 syscall is called in this case from the virtiofsd.

[PULL 0/2] virtiofs queue

2021-09-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 57b6f58c1d0df757c9311496c32d502925056894: Merge remote-tracking branch 'remotes/hreitz/tags/pull-block-2021-09-15' into staging (2021-09-15 18:55:59 +0100) are available in the Git repository at:

[PULL 2/2] virtiofsd: Reverse req_list before processing it

2021-09-16 Thread Dr. David Alan Gilbert (git)
From: Sergio Lopez With the thread pool disabled, we add the requests in the queue to a GList, processing by iterating over there afterwards. For adding them, we're using "g_list_prepend()", which is more efficient but causes the requests to be processed in reverse order, breaking the

[PATCH] virtio-balloon: Fix page-poison subsection name

2021-09-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The subsection name for page-poison was typo'd as: vitio-balloon-device/page-poison Note the missing 'r' in virtio. When we have a machine type that enables page poison, and the guest enables it (which needs a new kernel), things fail rather unpredictably.

[PATCH] configure: Remove spurious [] from tr

2021-08-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" ShellCheck points out that tr '[a-z]' actually replaces the []'s and only the a-z is needed. Remove the spurious [] - although in this use it will make no difference. Fixes: bb55b712e8dc4d4eb515144d5c26798fea178cba Signed-off-by: Dr. David Alan Gilbert ---

[PATCH] audio: Never send migration section

2021-08-09 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The audio migration vmstate is empty, and always has been; we can't just remove it though because an old qemu might send it us. Changes with -audiodev now mean it's sometimes created when it didn't used to be, and can confuse migration to old qemu. Change it so

[PULL 5/7] migration: Teach QEMUFile to be QIOChannel-aware

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu migration uses QIOChannel typed qemufiles. In follow up patches, we'll need the capability to identify this fact, so that we can get the backing QIOChannel from a QEMUFile. We can also define types for QEMUFile but so far since we only need to be able to identify QIOChannel,

[PULL 4/7] migration: Introduce migration_ioc_[un]register_yank()

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu There're plenty of places in migration/* that checks against either socket or tls typed ioc for yank operations. Provide two helpers to hide all these information. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id:

[PULL 6/7] migration: Move the yank unregister of channel_close out

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It's efficient, but hackish to call yank unregister calls in channel_close(), especially it'll be hard to debug when qemu crashed with some yank function leaked. Remove that hack, but instead explicitly unregister yank functions at the places where needed, they are: (on src)

[PULL 2/7] migration: Fix missing join() of rp_thread

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It's possible that the migration thread skip the join() of the rp_thread in below race and crash on src right at finishing migration: migration_thread rp_thread - migration_completion()

[PULL 3/7] migration: Make from_dst_file accesses thread-safe

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Accessing from_dst_file is potentially racy in current code base like below: if (s->from_dst_file) do_something(s->from_dst_file); Because from_dst_file can be reset right after the check in another thread (rp_thread). One example is migrate_fd_cancel(). Use the same

[PULL 7/7] migration: clear the memory region dirty bitmap when skipping free pages

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: Wei Wang When skipping free pages to send, their corresponding dirty bits in the memory region dirty bitmap need to be cleared. Otherwise the skipped pages will be sent in the next round after the migration thread syncs dirty bits from the memory region dirty bitmap. Cc: David Hildenbrand

[PULL 1/7] tests/qtest/migration-test.c: use 127.0.0.1 instead of 0

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" OpenBSD doesn't like :0 as an address, switch to using 127.0.0.1 in baddest; it's really testing the :0 port number that isn't allowed on anything. (The test doesn't currently run anyway because of the userfault problem that Peter noticed, but this gets us closer

[PULL 0/7] migration queue

2021-07-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit a2376507f615495b1d16685449ce0ea78c2caf9d: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-24 11:04:57 +0100) are available in the Git repository at:

[PATCH] tests/qtest/migration-test.c: use 127.0.0.1 instead of 0

2021-07-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" OpenBSD doesn't like :0 as an address, switch to using 127.0.0.1 in baddest; it's really testing the :0 port number that isn't allowed on anything. (The test doesn't currently run anyway because of the userfault problem that Peter noticed, but this gets us closer

[PULL 6/6] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty()

2021-07-13 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Taking the mutex every time for each dirty bit to clear is too slow, especially we'll take/release even if the dirty bit is cleared. So far it's only used to sync with special cases with qemu_guest_free_page_hint() against migration thread, nothing really that serious yet. Let's

[PULL 3/6] migration: Release return path early for paused postcopy

2021-07-13 Thread Dr. David Alan Gilbert (git)
From: Peter Xu When postcopy pause triggered, we rely on the migration thread to cleanup the to_dst_file handle, and the return path thread to cleanup the from_dst_file handle (which is stored in the local variable "rp"). Within the process, from_dst_file cleanup (qemu_fclose) is postponed

[PULL 2/6] migration: failover: emit a warning when the card is not fully unplugged

2021-07-13 Thread Dr. David Alan Gilbert (git)
From: Laurent Vivier When the migration fails or is canceled we wait the end of the unplug operation to be able to plug it back. But if the unplug operation is never finished we stop to wait and QEMU emits a warning to inform the user. Based-on: 20210629155007.629086-1-lviv...@redhat.com

<    1   2   3   4   5   6   7   8   9   10   >