RE: [PATCH] fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read()

2022-08-29 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Shameerali Kolothum Thodi > Sent: 26 August 2022 13:15 > To: 'Laszlo Ersek' ; qemu-devel@nongnu.org; > qemu-...@nongnu.org > Cc: imamm...@redhat.com; peter.mayd...@linaro.org; Linuxarm > ; chenxiang (M) ; Ard > Biesheuvel (kernel.org address) ; Gerd Hoffmann >

[PATCH 1/2] usb/msd: move usb_msd_packet_complete()

2022-08-29 Thread Gerd Hoffmann
Change ordering to avoid adding forward declarations in following patches. Fix comment code style while being at it. No functional change. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-storage.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/hw/u

[PATCH 2/2] usb/msd: add usb_msd_fatal_error() and fix guest-triggerable assert

2022-08-29 Thread Gerd Hoffmann
Add handler for fatal errors. Moves device into error state where it stops responding until the guest resets it. Guest can send illegal requests where scsi command and usb packet transfer directions are inconsistent. Use the new usb_msd_fatal_error() function instead of assert() in that case. R

[PATCH 0/2] usb/msd: fix guest-triggerable assert

2022-08-29 Thread Gerd Hoffmann
Gerd Hoffmann (2): usb/msd: move usb_msd_packet_complete() usb/msd: add usb_msd_fatal_error() and fix guest-triggerable assert include/hw/usb/msd.h | 1 + hw/usb/dev-storage.c | 56 ++-- hw/usb/trace-events | 1 + 3 files changed, 45 insertions(+)

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-29 Thread Markus Armbruster
Please excuse my late reply; I was on vacation. Daniel P. Berrangé writes: > On Tue, Aug 09, 2022 at 08:40:24AM +0200, Claudio Imbrenda wrote: >> This patch adds support for asynchronously tearing down a VM on Linux. >> >> When qemu terminates, either naturally or because of a fatal signal, >>

Re: [PATCH] osdep: Introduce qemu_get_fd() to wrap the common codes

2022-08-29 Thread Markus Armbruster
Christian Schoenebeck writes: > On Donnerstag, 18. August 2022 14:06:04 CEST Guoyi Tu wrote: >> Ping... >> >> Any comments are welcome >> >> On 8/12/22 19:01, Guoyi Tu wrote: >> > socket_get_fd() have much the same codes as monitor_fd_param(), >> > so qemu_get_fd() is introduced to implement th

[PATCH v3 2/2] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Specification" section of the SDM) - Le

[PATCH v3 1/2] target/i386: Read 8 bytes from cvttps2pi/cvtps2pi memory operands

2022-08-29 Thread Ricky Zhou
Before this change, emulation of cvttps2pi and cvtps2pi instructions would read 16 bytes of memory instead of 8. The SDM states that cvttps2pi takes a 64-bit memory location. The documentation for cvtps2pi claims that it takes a a 128-bit memory location, but as with cvttps2pi, the operand is writt

[PATCH] hcd-ohci: Fix inconsistency when resetting ohci root hubs

2022-08-29 Thread Qiang Liu
I found an assertion failure in usb_cancel_packet() and posted my analysis in https://gitlab.com/qemu-project/qemu/-/issues/1180. I think this issue is because the inconsistency when resetting ohci root hubs. There are two ways to reset ohci root hubs: 1) through HcRhPortStatus, 2) through HcContr

Re: [PATCH v2 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Richard Henderson
On 8/29/22 19:11, Ricky Zhou wrote: Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Spe

[PATCH v2 0/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
Thanks Richard for the detailed comments/code pointers! I've switched to using MO_ALIGN_16 and implemented record_sigbus and do_unaligned_access hooks to simulate #GP(0) as suggested. Given what was said about the low likelihood of implementing #AC anytime soon, I have hardcoded #GP(0) in these hoo

Re: [PATCH for-7.2 v4 15/21] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-29 Thread David Gibson
On Mon, Aug 29, 2022 at 07:00:55PM -0300, Daniel Henrique Barboza wrote: > > > On 8/29/22 00:34, David Gibson wrote: > > On Fri, Aug 26, 2022 at 11:11:44AM -0300, Daniel Henrique Barboza wrote: > > > Reading the FDT requires that the user saves the fdt_blob and then use > > > 'dtc' to read the co

[PATCH v2 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Specification" section of the SDM) - Le

Re: [PATCH v1 15/25] Deprecate 32 bit big-endian MIPS

2022-08-29 Thread Huacai Chen
Reviewed-by: Huacai Chen On Tue, Aug 30, 2022 at 7:39 AM Philippe Mathieu-Daudé wrote: > > Hi Alex, > > (+Aleksandar/Huacai) > > On 26/8/22 19:21, Alex Bennée wrote: > > It's becoming harder to maintain a cross-compiler to test this host > > architecture as the old stable Debian 10 ("Buster") mo

Re: [PATCH v8 0/7] Add support for zoned device

2022-08-29 Thread Sam Li
Stefan Hajnoczi 于2022年8月30日周二 03:44写道: > > On Fri, Aug 26, 2022 at 11:15:29PM +0800, Sam Li wrote: > > Zoned Block Devices (ZBDs) devide the LBA space to block regions called > > zones > > that are larger than the LBA size. It can only allow sequential writes, > > which > > reduces write amplifi

Re: [PATCH 1/5] Update version for v7.1.0-rc4 release

2022-08-29 Thread Dmitry Osipenko
On 8/29/22 18:40, Antonio Caggiano wrote: > From: Richard Henderson > > Signed-off-by: Richard Henderson > --- > VERSION | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/VERSION b/VERSION > index 1c944b9863..b8d5f3ebb6 100644 > --- a/VERSION > +++ b/VERSION > @@ -1 +1 @

Re: [PATCH v1 13/25] gitlab-ci/custom-runners: Disable -static-pie for ubuntu-20.04-aarch64

2022-08-29 Thread Richard Henderson
On 8/29/22 16:16, Philippe Mathieu-Daudé wrote: Shouldn't "--extra-cflags='-fno-pie -no-pie'" be handled by the configure script while processing the --disable-pie option? I think configure just passes b_pie=off to meson, but yes, this could be improved -- there's definitely a disconnect somew

Re: [PATCH v1 15/25] Deprecate 32 bit big-endian MIPS

2022-08-29 Thread Philippe Mathieu-Daudé via
Hi Alex, (+Aleksandar/Huacai) On 26/8/22 19:21, Alex Bennée wrote: It's becoming harder to maintain a cross-compiler to test this host architecture as the old stable Debian 10 ("Buster") moved into LTS which supports fewer architectures. For now: - mark it's deprecation in the docs - dow

Re: [PATCH v1 13/25] gitlab-ci/custom-runners: Disable -static-pie for ubuntu-20.04-aarch64

2022-08-29 Thread Philippe Mathieu-Daudé via
On 26/8/22 19:21, Alex Bennée wrote: From: Richard Henderson The project has reached the magic size at which we see /usr/aarch64-linux-gnu/lib/libc.a(init-first.o): in function `__libc_init_first': (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against \ symbol `__envi

Re: [PATCH v1 12/25] tests/vm: Remove obsolete Fedora VM test

2022-08-29 Thread Philippe Mathieu-Daudé via
On 26/8/22 19:21, Alex Bennée wrote: From: Thomas Huth It's still based on Fedora 30 - which is not supported anymore by QEMU since years. Seems like nobody is using (and refreshing) this, and it's easier to test this via a container anyway, so let's remove this now. Signed-off-by: Thomas Huth

Re: [PATCH] MAINTAINERS: Update Akihiko Odaki's email address

2022-08-29 Thread Philippe Mathieu-Daudé via
On 29/8/22 10:31, Akihiko Odaki wrote: I am now employed by Daynix. Although my role as a reviewer of macOS-related change is not very relevant to the employment, I decided to use the company email address to avoid confusions from different addresses. Signed-off-by: Akihiko Odaki --- MAINTAIN

Re: [PATCH] tests/avocado/migration: Get find_free_port() from the ports

2022-08-29 Thread Philippe Mathieu-Daudé via
On 29/8/22 14:19, Thomas Huth wrote: In upstream Avocado, the find_free_port() function is not available from "network" anymore, but must be used via "ports", see: https://github.com/avocado-framework/avocado/commit/22fc98c6ff76cc55c48 To be able to update to a newer Avocado version later, le

Re: [PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Richard Henderson
On 8/29/22 13:46, Ricky Zhou wrote: Thanks for taking a look at this - did you see the bit in the cover letter where I discuss doing this via alignment requirements on the memory operation? My logic was that the memop alignment checks seem to be more oriented towards triggering #AC exceptions (ev

Re: [PATCH for-7.2 v4 15/21] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-29 Thread Daniel Henrique Barboza
On 8/29/22 00:34, David Gibson wrote: On Fri, Aug 26, 2022 at 11:11:44AM -0300, Daniel Henrique Barboza wrote: Reading the FDT requires that the user saves the fdt_blob and then use 'dtc' to read the contents. Saving the file and using 'dtc' is a strong use case when we need to compare two FD

Re: [PATCH] ui/console: Get tab completion working again in the SDL monitor vc

2022-08-29 Thread Cal Peake
Hi Gerd, Can you take a look at this and let me know what you think? Thanks, -Cal On Thu, 11 Aug 2022, Cal Peake wrote: > Define a QEMU special key constant for the tab key and add an entry for > it in the qcode_to_keysym table. This allows tab completion to work again > in the SDL monitor vir

Re: [PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
On Mon, Aug 29, 2022 at 9:45 AM Richard Henderson wrote: > > On 8/29/22 07:23, Ricky Zhou wrote: > This trap should be raised via the memory operation: > ... > Only the first of the two loads/stores must be aligned, as the other is known > to be +8. > You then must fill in the x86_tcg_ops.do_unal

Re: [PATCH v5 09/18] dump: Use a buffer for ELF section data and headers

2022-08-29 Thread Janis Schoetterl-Glausch
On Thu, 2022-08-11 at 12:11 +, Janosch Frank wrote: > Currently we're writing the NULL section header if we overflow the > physical header number in the ELF header. But in the future we'll add > custom section headers AND section data. > > To facilitate this we need to rearange section handlin

Re: [PATCH v5 04/18] dump: Rework get_start_block

2022-08-29 Thread Janis Schoetterl-Glausch
On Thu, 2022-08-11 at 12:10 +, Janosch Frank wrote: > get_start_block() returns the start address of the first memory block > or -1. > > With the GuestPhysBlock iterator conversion we don't need to set the > start address and can therefore remove that code and the "start" > DumpState struct me

Re: [PATCH v8 0/7] Add support for zoned device

2022-08-29 Thread Stefan Hajnoczi
On Fri, Aug 26, 2022 at 11:15:29PM +0800, Sam Li wrote: > Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones > that are larger than the LBA size. It can only allow sequential writes, which > reduces write amplification in SSD, leading to higher throughput and increased >

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-29 Thread Stefan Hajnoczi
On Sat, Aug 27, 2022 at 12:17:04AM +0800, Sam Li wrote: > +/* > + * Send a zone_management command. > + * op is the zone operation. > + * offset is the starting zone specified as a sector offset. Does "sector offset" mean "byte offset from the start of the device" or does it mean in 512B sector un

Re: [PATCH v8 2/7] file-posix: introduce helper funcations for sysfs attributes

2022-08-29 Thread Stefan Hajnoczi
On Sat, Aug 27, 2022 at 12:11:21AM +0800, Sam Li wrote: If you send another revision please fix the "funcations" typo in the commit message. signature.asc Description: PGP signature

Re: [PATCH 4/9] hw/isa/vt82c686: QOM'ify via-ide creation

2022-08-29 Thread BB
Am 29. August 2022 19:04:06 MESZ schrieb BALATON Zoltan : >On Mon, 29 Aug 2022, BB wrote: >> Am 25. August 2022 01:18:56 MESZ schrieb BALATON Zoltan : >>> On Thu, 25 Aug 2022, Bernhard Beschow wrote: On Wed, Aug 24, 2022 at 3:54 PM BALATON Zoltan wrote: > On Tue, 23 Aug 2022, Bernhard

Re: [PATCH 8/9] hw/isa/vt82c686: QOM'ify RTC creation

2022-08-29 Thread BB
Am 29. August 2022 19:50:10 MESZ schrieb BALATON Zoltan : >On Mon, 29 Aug 2022, BB wrote: >> Am 24. August 2022 01:23:14 MESZ schrieb BALATON Zoltan : >>> On Tue, 23 Aug 2022, Bernhard Beschow wrote: On Tue, Aug 23, 2022 at 2:20 AM BALATON Zoltan wrote: > On Tue, 23 Aug 2022, Bernhard

Re: [PATCH 8/9] hw/isa/vt82c686: QOM'ify RTC creation

2022-08-29 Thread BALATON Zoltan
On Mon, 29 Aug 2022, BB wrote: Am 24. August 2022 01:23:14 MESZ schrieb BALATON Zoltan : On Tue, 23 Aug 2022, Bernhard Beschow wrote: On Tue, Aug 23, 2022 at 2:20 AM BALATON Zoltan wrote: On Tue, 23 Aug 2022, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12

Re: [PATCH RFC 00/13] migration: Postcopy Preempt-Full

2022-08-29 Thread Peter Xu
On Mon, Aug 29, 2022 at 12:56:46PM -0400, Peter Xu wrote: > This is a RFC series. Tree is here: > > https://github.com/xzpeter/qemu/tree/preempt-full > > It's not complete because there're still something we need to do which will > be attached to the end of this cover letter, however this seri

Re: [PATCH 1/1] monitor/hmp: print trace as option in help for log command

2022-08-29 Thread Dongli Zhang
Sorry that the format for "none" should be changed as well. I have sent a v2: https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04445.html Thank you very much! Dongli Zhang On 8/29/22 3:04 AM, Dongli Zhang wrote: > The below is printed when printing help information in qemu-system-x86_6

Re: [PATCH 8/9] hw/isa/vt82c686: QOM'ify RTC creation

2022-08-29 Thread BB
Am 24. August 2022 01:23:14 MESZ schrieb BALATON Zoltan : >On Tue, 23 Aug 2022, Bernhard Beschow wrote: >> On Tue, Aug 23, 2022 at 2:20 AM BALATON Zoltan wrote: >>> On Tue, 23 Aug 2022, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 ++

[PATCH v2 1/1] monitor/hmp: print trace as option in help for log command

2022-08-29 Thread Dongli Zhang
The below is printed when printing help information in qemu-system-x86_64 command line, and when CONFIG_TRACE_LOG is enabled: $ qemu-system-x86_64 -d help ... ... trace:PATTERN enable trace events Use "-d trace:help" to get a list of trace events. However, they are not printed in hmp "help log

[PATCH v2 2/4] tests/x86: Add 'q35' machine type to ivshmem-test

2022-08-29 Thread Michael Labiuk via
Configure pci bridge setting to test ivshmem on 'q35'. Signed-off-by: Michael Labiuk --- tests/qtest/ivshmem-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index e23a97fa8e..c4ca7efc62 100644 --- a

[PATCH v2 3/4] tests/x86: Add 'q35' machine type to hd-geo-test

2022-08-29 Thread Michael Labiuk via
Add pci bridge setting to test hotplug. Duplicate tests for plugging scsi and virtio devices for q35 machine type. Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 148 ++ 1 file changed, 148 insertions(+) diff --git a/tests/qtest/hd-geo-test.c b/

Re: [PATCH 4/9] hw/isa/vt82c686: QOM'ify via-ide creation

2022-08-29 Thread BALATON Zoltan
On Mon, 29 Aug 2022, BB wrote: Am 25. August 2022 01:18:56 MESZ schrieb BALATON Zoltan : On Thu, 25 Aug 2022, Bernhard Beschow wrote: On Wed, Aug 24, 2022 at 3:54 PM BALATON Zoltan wrote: On Tue, 23 Aug 2022, Bernhard Beschow wrote: The IDE function is closely tied to the ISA function (e.g.

[PATCH v2 1/4] tests/x86: Add subtest with 'q35' machine type to device-plug-test

2022-08-29 Thread Michael Labiuk via
Configure pci bridge setting to plug pci device and unplug. Signed-off-by: Michael Labiuk --- tests/qtest/device-plug-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 2e3137843e..2f07b37ba1

[PATCH v2 4/4] tests/x86: Add 'q35' machine type to drive_del-test

2022-08-29 Thread Michael Labiuk via
Configure pci bridge setting Also run tests on 'q35' machine type. Signed-off-by: Michael Labiuk --- tests/qtest/drive_del-test.c | 111 +++ 1 file changed, 111 insertions(+) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 5e6d58b4dd

[PATCH v2 0/4] Add 'q35' machine type to hotplug tests

2022-08-29 Thread Michael Labiuk via
Add pci bridge setting to run hotplug tests on q35 machine type. Hotplug tests was bounded to 'pc' machine type by commit 7b172333f1b Michael Labiuk (4): tests/x86: Add subtest with 'q35' machine type to device-plug-test tests/x86: Add 'q35' machine type to ivshmem-test tests/x86: Add 'q35'

[PATCH RFC 13/13] migration: Send requested page directly in rp-return thread

2022-08-29 Thread Peter Xu
With all the facilities ready, send the requested page directly in the rp-return thread rather than queuing it in the request queue, if and only if postcopy preempt is enabled. It can achieve so because it uses separate channel for sending urgent pages. The only shared data is bitmap and it's pro

[PATCH RFC 08/13] migration: Teach PSS about host page

2022-08-29 Thread Peter Xu
Migration code has a lot to do with host pages. Teaching PSS core about the idea of host page helps a lot and makes the code clean. Meanwhile, this prepares for the future changes that can leverage the new PSS helpers that this patch introduces to send host page in another thread. Three more fie

[PATCH RFC 12/13] migration: Move last_sent_block into PageSearchStatus

2022-08-29 Thread Peter Xu
Since we use PageSearchStatus to represent a channel, it makes perfect sense to keep last_sent_block (aka, leverage RAM_SAVE_FLAG_CONTINUE) to be per-channel rather than global because each channel can be sending different pages on ramblocks. Hence move it from RAMState into PageSearchStatus. Sig

[PATCH RFC 11/13] migration: Make PageSearchStatus part of RAMState

2022-08-29 Thread Peter Xu
We used to allocate PSS structure on the stack for precopy when sending pages. Make it static, so as to describe per-channel ram migration status. Here we declared RAM_CHANNEL_MAX instances, preparing for postcopy to use it, even though this patch has not yet to start using the 2nd instance. Thi

[PATCH RFC 09/13] migration: Introduce pss_channel

2022-08-29 Thread Peter Xu
Introduce pss_channel for PageSearchStatus, define it as "the migration channel to be used to transfer this host page". We used to have rs->f, which is a mirror to MigrationState.to_dst_file. After postcopy preempt initial version, rs->f can be dynamically changed depending on which channel we wa

[PATCH RFC 07/13] migration: Remove RAMState.f references in compression code

2022-08-29 Thread Peter Xu
Removing referencing to RAMState.f in compress_page_with_multi_thread() and flush_compressed_data(). Compression code by default isn't compatible with having >1 channels (or it won't currently know which channel to flush the compressed data), so to make it simple we always flush on the default to_

[PATCH RFC 06/13] migration: Trivial cleanup save_page_header() on same block check

2022-08-29 Thread Peter Xu
The 2nd check on RAM_SAVE_FLAG_CONTINUE is a bit redundant. Use a boolean to be clearer. Signed-off-by: Peter Xu --- migration/ram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 612c7dd708..43893d0a40 100644 --- a/migration/ram

[PATCH RFC 04/13] migration: Cleanup xbzrle zero page cache update logic

2022-08-29 Thread Peter Xu
The major change is to replace "!save_page_use_compression()" with "xbzrle_enabled" to make it clear. Reasonings: (1) When compression enabled, "!save_page_use_compression()" is exactly the same as checking "xbzrle_enabled". (2) When compression disabled, "!save_page_use_compression()" alway

[PATCH RFC 10/13] migration: Add pss_init()

2022-08-29 Thread Peter Xu
Helper to init PSS structures. Signed-off-by: Peter Xu --- migration/ram.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index adcc57c584..bdfcc6171a 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -535,6 +535,14 @@ stati

[PATCH RFC 05/13] migration: Disallow postcopy preempt to be used with compress

2022-08-29 Thread Peter Xu
The preempt mode requires the capability to assign channel for each of the page, while the compression logic will currently assign pages to different compress thread/local-channel so potentially they're incompatible. Signed-off-by: Peter Xu --- migration/migration.c | 11 +++ 1 file chan

[PATCH RFC 02/13] migration: Add postcopy_preempt_active()

2022-08-29 Thread Peter Xu
Add the helper to show that postcopy preempt enabled, meanwhile active. Signed-off-by: Peter Xu --- migration/ram.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index dc1de9ddbc..8c5d5332e8 100644 --- a/migration/ram.c +++ b/migra

[PATCH RFC 01/13] migration: Use non-atomic ops for clear log bitmap

2022-08-29 Thread Peter Xu
Since we already have bitmap_mutex to protect either the dirty bitmap or the clear log bitmap, we don't need atomic operations to set/clear/test on the clear log bitmap. Switching all ops from atomic to non-atomic versions, meanwhile touch up the comments to show which lock is in charge. Introduc

[PATCH RFC 03/13] migration: Yield bitmap_mutex properly when sending/sleeping

2022-08-29 Thread Peter Xu
Don't take the bitmap mutex when sending pages, or when being throttled by migration_rate_limit() (which is a bit tricky to call it here in ram code, but seems still helpful). It prepares for the possibility of concurrently sending pages in >1 threads using the function ram_save_host_page() becaus

[PATCH RFC 00/13] migration: Postcopy Preempt-Full

2022-08-29 Thread Peter Xu
This is a RFC series. Tree is here: https://github.com/xzpeter/qemu/tree/preempt-full It's not complete because there're still something we need to do which will be attached to the end of this cover letter, however this series can already safely pass qtest and any of my test. Comparing to the

Re: [PATCH] linux-user: fix readlinkat handling with magic exe symlink

2022-08-29 Thread Jameson Nash
bump? This helps fix one of the libuv tests when run under qemu https://github.com/libuv/libuv/pull/2941#issuecomment-1207145306 On Mon, Aug 8, 2022 at 3:07 PM Jameson Nash wrote: > Exactly the same as f17f4989fa193fa8279474c5462289a3cfe69aea before was > for readlink. I suppose this was simply

Re: [PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Richard Henderson
On 8/29/22 07:23, Ricky Zhou wrote: Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Spe

Re: [PATCH 4/9] hw/isa/vt82c686: QOM'ify via-ide creation

2022-08-29 Thread BB
Am 25. August 2022 01:18:56 MESZ schrieb BALATON Zoltan : >On Thu, 25 Aug 2022, Bernhard Beschow wrote: >> On Wed, Aug 24, 2022 at 3:54 PM BALATON Zoltan wrote: >>> On Tue, 23 Aug 2022, Bernhard Beschow wrote: The IDE function is closely tied to the ISA function (e.g. the IDE interrup

Re: [PATCH v7 2/2] target/s390x: support PRNO_TRNG instruction

2022-08-29 Thread Jason A. Donenfeld
On Fri, Aug 26, 2022 at 01:28:11PM +0200, Thomas Huth wrote: > > +qemu_guest_getrandom_nofail(tmp, block); > > +for (size_t i = 0; i < block; ++i) { > > +cpu_stb_data_ra(env, wrap_address(env, *buf_reg), tmp[i], ra); > > +*buf_reg = deposit64(*buf_reg, 0, mes

Re: [PATCH v7 1/2] target/s390x: support SHA-512 extensions

2022-08-29 Thread Jason A. Donenfeld
On Fri, Aug 26, 2022 at 12:21:36PM +0200, Thomas Huth wrote: > > + * Copyright (C) 2022 Jason A. Donenfeld . All Rights > > Reserved. > > Please drop the "All rights reserved" ... it does not have any legal meaning No. > > +{ > > +enum { MAX_BLOCKS_PER_RUN = 64 }; /* This is arbitrary, ju

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-08-29 Thread Chao Peng
On Fri, Aug 26, 2022 at 04:19:43PM +0100, Fuad Tabba wrote: > > +bool __weak kvm_arch_private_mem_supported(struct kvm *kvm) > > +{ > > + return false; > > +} > > + > > static int check_memory_region_flags(const struct kvm_user_mem_region *mem) > > { > > u32 valid_flags = KVM_MEM_LO

Re: [PATCH] target/sh4: Fix TB_FLAG_UNALIGN

2022-08-29 Thread Richard Henderson
On 8/29/22 02:05, BALATON Zoltan wrote: On Sun, 28 Aug 2022, Richard Henderson wrote: The value previously chosen overlaps GUSA_MASK. Cc: qemu-sta...@nongnu.org Fixes: 4da06fb3062 ("target/sh4: Implement prctl_unalign_sigbus") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/856 Signed-o

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-08-29 Thread Chao Peng
On Fri, Aug 26, 2022 at 04:19:25PM +0100, Fuad Tabba wrote: > Hi, > > On Wed, Jul 6, 2022 at 9:24 AM Chao Peng wrote: > > > > This is the v7 of this series which tries to implement the fd-based KVM > > guest private memory. The patches are based on latest kvm/queue branch > > commit: > > > > b9

[PATCH 5/5] virtio-gpu: Don't require udmabuf when blob support is enabled

2022-08-29 Thread Antonio Caggiano
From: Dmitry Osipenko Host blobs don't need udmabuf, it's only needed by guest blobs. The host blobs are utilized by the Mesa virgl driver when persistent memory mapping is needed by a GL buffer, otherwise virgl driver doesn't use blobs. Persistent mapping support bumps GL version from 4.3 to 4.5

[PATCH 0/5] virtio-gpu: Blob resources

2022-08-29 Thread Antonio Caggiano
Add shared memory and support blob resource creation, mapping and unmapping through virglrenderer new stable APIs[0] when available. [0] https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/891 Antonio Caggiano (1): virtio-gpu: Handle resource blob commands Dmitry Osipenko (1):

[PATCH 4/5] virtio-gpu: Handle resource blob commands

2022-08-29 Thread Antonio Caggiano
Support BLOB resources creation by calling virgl_renderer_resource_create_blob. Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c| 169 +++ hw/display/virtio-gpu.c | 8 +- include/hw/virtio/virtio-gpu-

[PATCH 3/5] virtio-gpu: hostmem

2022-08-29 Thread Antonio Caggiano
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. v2: Formatting fixes Signed-off-by: Antonio Caggiano Acked-by: Michael S. Tsirkin --- hw/display/virtio-gpu-pci.c| 15 +++ hw/display/virtio-gpu.c| 1 + hw/display/virtio-vga.c| 33 +

[PATCH 1/5] Update version for v7.1.0-rc4 release

2022-08-29 Thread Antonio Caggiano
From: Richard Henderson Signed-off-by: Richard Henderson --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1c944b9863..b8d5f3ebb6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.0.93 +7.0.94 -- 2.34.1

[PATCH 2/5] virtio: Add shared memory capability

2022-08-29 Thread Antonio Caggiano
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' and the data structure 'virtio_pci_shm_cap' to go with it. They allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and disting

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-08-29 Thread Chao Peng
On Fri, Aug 26, 2022 at 04:19:32PM +0100, Fuad Tabba wrote: > Hi Chao, > > On Wed, Jul 6, 2022 at 9:25 AM Chao Peng wrote: > > > > Normally, a write to unallocated space of a file or the hole of a sparse > > file automatically causes space allocation, for memfd, this equals to > > memory allocati

Re: New feature shout outs for KVM Forum QEMU Status Report

2022-08-29 Thread Stefan Hajnoczi
block/ - VDUSE export was added so qemu-storage-daemon can export disk images to the host kernel and guests. See qemu-storage-daemon(1) man page for details. hw/remote/ - vfio-user server support was added so PCI devices can be emulated in a separate QEMU process. vfio-user client support is

Re: [PATCH 22/51] tests/qtest: qmp-test: Skip running test_qmp_oob for win32

2022-08-29 Thread Markus Armbruster
Bin Meng writes: > Hi Markus, > > On Mon, Aug 29, 2022 at 9:14 PM Markus Armbruster wrote: >> >> Bin Meng writes: >> >> > From: Bin Meng >> > >> > The test_qmp_oob test case calls mkfifo() which does not exist on >> > win32. Exclude it. >> > >> > Signed-off-by: Bin Meng >> > --- >> > >> > te

[PATCH] pci: Abort if pci_add_capability fails

2022-08-29 Thread 小田喜陽彦
From: Akihiko Odaki pci_add_capability appears most PCI devices. The error handling required lots of code, and led to inconsistent behaviors such as: - passing error_abort - passing error_fatal - asserting the returned value - propagating the error to the caller - skipping the rest of the functio

[PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Specification" section of the SDM) - Le

[PATCH 0/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
This is a change to raise #GP on unaligned m128 loads/stores when required by the spec. Some notes on this change: 1. I considered making use of the existing support for enforcing memory alignment (setting MO_ALIGN_16 in the load/store's MemOp), but rejected this approach. There are at least

Re: [PATCH 22/51] tests/qtest: qmp-test: Skip running test_qmp_oob for win32

2022-08-29 Thread Bin Meng
Hi Markus, On Mon, Aug 29, 2022 at 9:14 PM Markus Armbruster wrote: > > Bin Meng writes: > > > From: Bin Meng > > > > The test_qmp_oob test case calls mkfifo() which does not exist on > > win32. Exclude it. > > > > Signed-off-by: Bin Meng > > --- > > > > tests/qtest/qmp-test.c | 6 ++ > >

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-08-29 Thread Victor Toso
Hi, On Mon, Aug 29, 2022 at 01:53:51PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > On Tue, Jul 05, 2022 at 08:46:34AM -0700, Andrea Bolognani wrote: > >> I've commented in detail to the single patches, just a couple of > >> additional points. > >> > >> On Fri, Jun 17,

Re: [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-08-29 Thread Victor Toso
Hi, On Mon, Aug 29, 2022 at 01:27:06PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > On Fri, Aug 19, 2022 at 11:27:13AM -0500, Andrea Bolognani wrote: > >> On Wed, Aug 17, 2022 at 04:04:19PM +0200, Victor Toso wrote: > >> > On Tue, Jul 05, 2022 at 08:45:06AM -0700, Andre

Re: [PATCH 22/51] tests/qtest: qmp-test: Skip running test_qmp_oob for win32

2022-08-29 Thread Markus Armbruster
Bin Meng writes: > From: Bin Meng > > The test_qmp_oob test case calls mkfifo() which does not exist on > win32. Exclude it. > > Signed-off-by: Bin Meng > --- > > tests/qtest/qmp-test.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-29 Thread Sam Li
Sam Li 于2022年8月29日周一 20:53写道: > > By adding zone management operations in BlockDriver, storage controller > emulation can use the new block layer APIs including Report Zone and > four zone management operations (open, close, finish, reset). > > Add zoned storage commands of the device: zone_report

[PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-29 Thread Sam Li
By adding zone management operations in BlockDriver, storage controller emulation can use the new block layer APIs including Report Zone and four zone management operations (open, close, finish, reset). Add zoned storage commands of the device: zone_report(zrp), zone_open(zo), zone_close(zc), zone

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-29 Thread Thomas Huth
On 07/08/2022 12.39, John Levon wrote: On Fri, Aug 05, 2022 at 09:24:56AM +0100, Daniel P. Berrangé wrote: [...] If we do add something as a submodule for some reason, I'd like us to say upfront that this is for a fixed time period (ie maximum of 3 releases aka 1 year) only after which we'll re

[PATCH] tests/avocado/migration: Get find_free_port() from the ports

2022-08-29 Thread Thomas Huth
In upstream Avocado, the find_free_port() function is not available from "network" anymore, but must be used via "ports", see: https://github.com/avocado-framework/avocado/commit/22fc98c6ff76cc55c48 To be able to update to a newer Avocado version later, let's use the new way for accessing the fi

Re: [PATCH v5 18/18] s390x: pv: Add dump support

2022-08-29 Thread Thomas Huth
On 11/08/2022 14.11, Janosch Frank wrote: Sometimes dumping a guest from the outside is the only way to get the data that is needed. This can be the case if a dumping mechanism like KDUMP hasn't been configured or data needs to be fetched at a specific point. Dumping a protected guest from the ou

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-08-29 Thread Markus Armbruster
Victor Toso writes: > Hi, > > On Tue, Jul 05, 2022 at 08:46:34AM -0700, Andrea Bolognani wrote: >> I've commented in detail to the single patches, just a couple of >> additional points. >> >> On Fri, Jun 17, 2022 at 02:19:24PM +0200, Victor Toso wrote: >> > * 7) Flat structs by removing embed typ

Re: [PATCH] MAINTAINERS: Update Akihiko Odaki's email address

2022-08-29 Thread Marc-André Lureau
Hi On Mon, Aug 29, 2022 at 12:33 PM Akihiko Odaki wrote: > I am now employed by Daynix. Although my role as a reviewer of > macOS-related change is not very relevant to the employment, I decided > to use the company email address to avoid confusions from different > addresses. > > Signed-off-by:

Re: [PATCH] tests/qtest/ac97-test: Correct reference to driver

2022-08-29 Thread Marc-André Lureau
On Mon, Aug 29, 2022 at 12:38 PM Akihiko Odaki wrote: > Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau > --- > tests/qtest/ac97-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/ac97-test.c b/tests/qtest/ac97-test.c > index b084e31bff.

Re: [PATCH v5 16/18] s390x: Introduce PV query interface

2022-08-29 Thread Thomas Huth
On 11/08/2022 14.11, Janosch Frank wrote: Introduce an interface over which we can get information about UV data. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden --- hw/s390x/pv.c | 61 ++ hw/s390x/s390-virtio-ccw.c | 6 includ

Re: [PATCH v5 15/18] s390x: Add protected dump cap

2022-08-29 Thread Thomas Huth
On 11/08/2022 14.11, Janosch Frank wrote: Add a protected dump capability for later feature checking. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden --- target/s390x/kvm/kvm.c | 7 +++ target/s390x/kvm/kvm_s390x.h | 1 + 2 files changed, 8 insertions(+) Reviewed-by: Th

Re: [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-08-29 Thread Markus Armbruster
Victor Toso writes: > Hi, > > On Fri, Aug 19, 2022 at 11:27:13AM -0500, Andrea Bolognani wrote: >> On Wed, Aug 17, 2022 at 04:04:19PM +0200, Victor Toso wrote: >> > On Tue, Jul 05, 2022 at 08:45:06AM -0700, Andrea Bolognani wrote: >> > > On Fri, Jun 17, 2022 at 02:19:26PM +0200, Victor Toso wrote

[PATCH v7 09/10] parallels: Move statistic collection to a separate function

2022-08-29 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 53 +

[PATCH v7 10/10] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2022-08-29 Thread Alexander Ivanov
Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/block/parallels.

[PATCH v7 04/10] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2022-08-29 Thread Alexander Ivanov
This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

[PATCH v7 08/10] parallels: Move check of leaks to a separate function

2022-08-29 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 84 +-- 1 f

Re: [RFC PATCH v2] tests/9p: introduce declarative function calls

2022-08-29 Thread Greg Kurz
Hi Christian, On Thu, 18 Aug 2022 16:13:40 +0200 Christian Schoenebeck wrote: > On Montag, 18. Juli 2022 16:02:31 CEST Christian Schoenebeck wrote: > > On Montag, 18. Juli 2022 15:10:55 CEST Christian Schoenebeck wrote: > > > There are currently 4 different functions for sending a 9p 'Twalk' > >

[PATCH v7 07/10] parallels: Move check of cluster outside image to a separate function

2022-08-29 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 59 ++- 1 f

[PATCH v7 06/10] parallels: Move check of unclean image to a separate function

2022-08-29 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 31 +

  1   2   >