Re: [Qemu devel PATCH v3 1/3] hw/net: Add Smartfusion2 emac block

2020-04-08 Thread Jason Wang
On 2020/4/7 下午7:15, sundeep.l...@gmail.com wrote: From: Subbaraya Sundeep Modelled Ethernet MAC of Smartfusion2 SoC. Micrel KSZ8051 PHY is present on Emcraft's SOM kit hence same PHY is emulated. Signed-off-by: Subbaraya Sundeep --- MAINTAINERS| 2 +

Re: [PATCH v1 5/5] i386: Hyper-V VMBus ACPI DSDT entry

2020-04-08 Thread Jon Doron
On 08/04/2020, Roman Kagan wrote: On Wed, Apr 08, 2020 at 07:16:39AM +0300, Jon Doron wrote: On 07/04/2020, Maciej S. Szmigiero wrote: > On 07.04.2020 20:56, Roman Kagan wrote: > > On Mon, Apr 06, 2020 at 11:20:39AM +0300, Jon Doron wrote: > > > Well I want it to be merged in :-) > > > > Hmm

Re: [PATCH] Fixed IPv6 payload lenght without jumbo option

2020-04-08 Thread Jason Wang
On 2020/4/6 上午3:19, and...@daynix.com wrote: From: Andrew Melnychenko Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1708065 e1000e driver doesn't sets 'plen' field for IPv6 for big packets if TSO is enabled. Jumbo option isn't added yet, until qemu supports packets greater than 64K.

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

2020-04-08 Thread Jiaxun Yang
On Thu, 9 Apr 2020 10:17:46 +0800 Huacai Chen wrote: > Hi, Aleksandar, > > On Wed, Apr 8, 2020 at 11:30 PM Aleksandar Markovic > wrote: > > > > 11:08 Sre, 08.04.2020. Huacai Chen је > > написао/ла: > > > > > > I submitted the MIPS/fulong2e support about ten years ago, and > > > after that I

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

2020-04-08 Thread Huacai Chen
Hi, Aleksandar, On Wed, Apr 8, 2020 at 11:30 PM Aleksandar Markovic wrote: > > 11:08 Sre, 08.04.2020. Huacai Chen је написао/ла: > > > > I submitted the MIPS/fulong2e support about ten years ago, and after > > that I became a MIPS kernel developer. Last year, Philippe Mathieu- > > Daudé asked

Re: [PATCH] target/ppc: Fix wrong interpretation of the disposition flag.

2020-04-08 Thread David Gibson
On Wed, Apr 08, 2020 at 10:39:44PM +0530, Ganesh Goudar wrote: > Bitwise AND with kvm_run->flags to evaluate if we recovered from > MCE or not is not correct, As disposition in kvm_run->flags is a > two-bit integer value and not a bit map, So check for equality > instead of bitwise AND. > >

[PATCH v18 QEMU 2/3] virtio-balloon: Add support for providing free page reports to host

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[PATCH v18 QEMU 0/3] virtio-balloon: add support for providing free page reporting

2020-04-08 Thread Alexander Duyck
This series provides an asynchronous means of reporting free guest pages to QEMU through virtio-balloon so that the memory associated with those pages can be dropped and reused by other processes and/or guests on the host. Using this it is possible to avoid unnecessary I/O to disk and greatly

[PATCH v18 QEMU 1/3] virtio-balloon: Implement support for page poison tracking feature

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[PATCH v18 QEMU 3/3] virtio-balloon: Provide a interface for free page reporting

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "free page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic

Re: [PATCH v1 5/5] i386: Hyper-V VMBus ACPI DSDT entry

2020-04-08 Thread Maciej S. Szmigiero
On 08.04.2020 22:26, Roman Kagan wrote: > On Tue, Apr 07, 2020 at 09:03:05PM +0200, Maciej S. Szmigiero wrote: >> On 07.04.2020 20:56, Roman Kagan wrote: >>> On Mon, Apr 06, 2020 at 11:20:39AM +0300, Jon Doron wrote: Well I want it to be merged in :-) >>> >>> Hmm I'm curious why, it has

RE: [Bug 1871250] Failed to create HAX VM

2020-04-08 Thread Morris, Russell
Hi Volker, I need to take back something I said - my error! . I got fooled a bit, let me try to explain. I ran the "stock" download, the Windows version that QEMU points to (web site). It does say it's v4.2.0, but seems it's not quite, it's v4.2.0 with some more recent updates (but version

Re: [PATCH v17 RESUBMIT QEMU 0/3] virtio-balloon: add support for providing free page reporting

2020-04-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200408194628.24143.51644.stgit@localhost.localdomain/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v17 RESUBMIT QEMU 0/3] virtio-balloon: add support for providing free page reporting

Re: [PATCH v1 5/5] i386: Hyper-V VMBus ACPI DSDT entry

2020-04-08 Thread Roman Kagan
On Wed, Apr 08, 2020 at 07:16:39AM +0300, Jon Doron wrote: > On 07/04/2020, Maciej S. Szmigiero wrote: > > On 07.04.2020 20:56, Roman Kagan wrote: > > > On Mon, Apr 06, 2020 at 11:20:39AM +0300, Jon Doron wrote: > > > > Well I want it to be merged in :-) > > > > > > Hmm I'm curious why, it has

Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device

2020-04-08 Thread Cameron Esfahani via
I'm curious why there's two ranges as well. In our branch of QEMU, I've had to modify this RTC creation code to have only one range instead of two ranges. Traditionally Macs have had one range for RTC and we have incompatibility with a two ranges. If you could change it to one range without

Re: [PATCH v1 5/5] i386: Hyper-V VMBus ACPI DSDT entry

2020-04-08 Thread Roman Kagan
On Tue, Apr 07, 2020 at 09:03:05PM +0200, Maciej S. Szmigiero wrote: > On 07.04.2020 20:56, Roman Kagan wrote: > > On Mon, Apr 06, 2020 at 11:20:39AM +0300, Jon Doron wrote: > >> Well I want it to be merged in :-) > > > > Hmm I'm curious why, it has little to offer over virtio. > > > > Anyway

[PATCH v17 RESUBMIT QEMU 3/3] virtio-balloon: Provide a interface for free page reporting

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "free page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic

[PATCH v17 RESUBMIT QEMU 1/3] virtio-balloon: Implement support for page poison tracking feature

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[PATCH v17 RESUBMIT QEMU 2/3] virtio-balloon: Add support for providing free page reports to host

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[PATCH v17 RESUBMIT QEMU 0/3] virtio-balloon: add support for providing free page reporting

2020-04-08 Thread Alexander Duyck
This series provides an asynchronous means of reporting free guest pages to QEMU through virtio-balloon so that the memory associated with those pages can be dropped and reused by other processes and/or guests on the host. Using this it is possible to avoid unnecessary I/O to disk and greatly

Re: [PATCH v4 2/2] net/colo-compare.c: handling of the full primary or secondary queue

2020-04-08 Thread Lukas Straub
On Sat, 28 Mar 2020 20:46:46 +0800 Derek Su wrote: > The pervious handling of the full primary or queue is only dropping > the packet. If there are lots of clients to the guest VM, > the "drop" will lead to the lost of the networking connection > until next checkpoint. > > To address the issue,

Re: [PATCH 2/3] chardev/char.c: Use qemu_co_sleep_ns if in coroutine

2020-04-08 Thread Marc-André Lureau
Hi On Wed, Apr 8, 2020 at 8:37 PM Lukas Straub wrote: > > This will be needed in the next patch. > > Signed-off-by: Lukas Straub > --- > chardev/char.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/chardev/char.c b/chardev/char.c > index 04075389bf..51ad0dc6b3

[PATCH 0/3] colo-compare bugfixes

2020-04-08 Thread Lukas Straub
Hello Everyone, Here are fixes for bugs that I found in my tests. Regards, Lukas Straub Lukas Straub (3): net/colo-compare.c: Create event_bh with the right AioContext chardev/char.c: Use qemu_co_sleep_ns if in coroutine net/colo-compare.c: Fix deadlock chardev/char.c | 7 +++-

[PATCH 1/3] net/colo-compare.c: Create event_bh with the right AioContext

2020-04-08 Thread Lukas Straub
qemu_bh_new will set the bh to be executed in the main loop. This causes problems as colo_compare_handle_event assumes that it has exclusive access the queues, which are also accessed in the iothread. It also assumes that it runs in a different thread than the caller and takes the appropriate

[PATCH 3/3] net/colo-compare.c: Fix deadlock

2020-04-08 Thread Lukas Straub
The chr_out chardev is connected to a filter-redirector running in the main loop. qemu_chr_fe_write_all might block here in compare_chr_send if the (socket-)buffer is full. If another filter-redirector in the main loop want's to send data to chr_pri_in it might also block if the buffer is full.

[PATCH 2/3] chardev/char.c: Use qemu_co_sleep_ns if in coroutine

2020-04-08 Thread Lukas Straub
This will be needed in the next patch. Signed-off-by: Lukas Straub --- chardev/char.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index 04075389bf..51ad0dc6b3 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -38,6 +38,7 @@

Re: [PATCH v4 13/30] qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()

2020-04-08 Thread Alberto Garcia
On Wed 08 Apr 2020 01:23:42 PM CEST, Max Reitz wrote: >> +switch (type) { >> +case QCOW2_CLUSTER_COMPRESSED: >> +return QCOW2_SUBCLUSTER_COMPRESSED; > > Why did you drop the check that l2_bitmap == 0 here? We don't generally check that reserved bits are 0. It would for

Re: [PATCH v4 18/30] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-04-08 Thread Alberto Garcia
On Wed 08 Apr 2020 02:49:14 PM CEST, Max Reitz wrote: > (Oops, totally missed the L1 entry out of bounds / L1 entry empty part > in v3.) Yeah, and you can mix values between different enum types in C quite easily without the compiler producing a warning. Berto

Re: [PATCH v4 02/30] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-04-08 Thread Alberto Garcia
On Wed 08 Apr 2020 12:51:24 PM CEST, Max Reitz wrote: >> -if (has_data_file(bs) && *cluster_offset != offset - >> offset_in_cluster) >> +if (has_data_file(bs) && *host_offset != offset - offset_in_cluster) >> { > > (1) The { should be moved to the preceding line; > > (2)

[PATCH] target/ppc: Fix wrong interpretation of the disposition flag.

2020-04-08 Thread Ganesh Goudar
Bitwise AND with kvm_run->flags to evaluate if we recovered from MCE or not is not correct, As disposition in kvm_run->flags is a two-bit integer value and not a bit map, So check for equality instead of bitwise AND. Without the fix qemu treats any unrecoverable mce error as recoverable and ends

Re: [PATCH 2/2] target/arm: Fail on invalid size for VMUL (float)

2020-04-08 Thread Peter Maydell
On Wed, 8 Apr 2020 at 16:29, Fredrik Strupe wrote: > > Bit 1 of VMUL (float)'s size field encodes the opcode and must be 0, > with 1 making it undefined. Thus, make VMUL (float) instructions > with size=0b10 or size=0b11 (size >= 2) undefined. > > (U is 1 for VMUL, while it is 0 for VMLA/VMLS.) >

Re: linux-user: keep the name-ending parenthesis in /proc/self/stat

2020-04-08 Thread Brice Goglin
Please apply my first patch if you believe Philippe's patch is wrong. I can't spend more time debugging this trivial issue unfortunately. Brice Le 08/04/2020 à 17:48, Laurent Vivier a écrit : > Le 08/04/2020 à 10:24, Brice Goglin a écrit : >> When the program name is very long, qemu-user may

Re: linux-user: keep the name-ending parenthesis in /proc/self/stat

2020-04-08 Thread Laurent Vivier
Le 08/04/2020 à 10:24, Brice Goglin a écrit : > When the program name is very long, qemu-user may truncate it in > /proc/self/stat. However the truncation must keep the ending ") " > to conform to the proc manpage which says: > (2) comm %s >The filename of the executable, in

[PATCH for-5.0? v2] target/xtensa: Statically allocate xtensa_insnbufs in DisasContext

2020-04-08 Thread Richard Henderson
From: Max Filippov Rather than dynamically allocate, and risk failing to free when we longjmp out of the translator, allocate the maximum buffer size from any of the supported cpus. Signed-off-by: Max Filippov [rth: Merged the fixup in Max's reply to his original] Signed-off-by: Richard

Re: [PATCH for-5.0? v2] target/xtensa: Statically allocate xtensa_insnbufs in DisasContext

2020-04-08 Thread Richard Henderson
On 4/8/20 8:30 AM, Richard Henderson wrote: > From: Max Filippov > > Rather than dynamically allocate, and risk failing to free > when we longjmp out of the translator, allocate the maximum > buffer size from any of the supported cpus. > > Signed-off-by: Max Filippov > [rth: Merged the fixup

[PULL for-5.0 0/1] target/rx update for coverity warning

2020-04-08 Thread Richard Henderson
The following changes since commit f3bac27cc1e303e1860cc55b9b6889ba39dee587: Update version for v5.0.0-rc2 release (2020-04-07 23:13:37 +0100) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-rx-20200408 for you to fetch changes up

[PULL for-5.0 1/1] target/rx/translate: Add missing fall through comment

2020-04-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Coverity reported a missing fall through comment, add it. Fixes: e5918d7d7f0 ("target/rx: TCG translation") Reported-by: Coverity (CID 142 MISSING_BREAK) Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id:

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

2020-04-08 Thread Aleksandar Markovic
11:08 Sre, 08.04.2020. Huacai Chen је написао/ла: > > I submitted the MIPS/fulong2e support about ten years ago, and after > that I became a MIPS kernel developer. Last year, Philippe Mathieu- > Daudé asked me that whether I can be a reviewer of MIPS/fulong2e, and I > promised that I will do some

Re: [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures

2020-04-08 Thread Paolo Bonzini
On 08/04/20 11:12, Ying Fang wrote: > On 2020/4/7 22:07, Paolo Bonzini wrote: >> ARM machines and other weakly-ordered architectures have been suffering >> for a long time from hangs in qemu-img and qemu-io.  For QEMU binaries >> these are mitigated by the timers that sooner or later fire in the

Re: [PATCH v6 32/42] nvme: allow multiple aios per command

2020-04-08 Thread Klaus Birkelund Jensen
On Mar 31 12:10, Maxim Levitsky wrote: > On Tue, 2020-03-31 at 07:47 +0200, Klaus Birkelund Jensen wrote: > > On Mar 25 12:57, Maxim Levitsky wrote: > > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > > @@ -516,10 +613,10 @@ static inline uint16_t nvme_check_prinfo(NvmeCtrl > > > >

[PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

2020-04-08 Thread Huacai Chen
I submitted the MIPS/fulong2e support about ten years ago, and after that I became a MIPS kernel developer. Last year, Philippe Mathieu- Daudé asked me that whether I can be a reviewer of MIPS/fulong2e, and I promised that I will do some QEMU work in the next year (i.e., 2020 and later). I think

[PATCH 1/3] target/mips: Support variable page size

2020-04-08 Thread Huacai Chen
Traditionally, MIPS use 4KB page size, but Loongson prefer 16KB page size in system emulator. So, let's define TARGET_PAGE_BITS_VARY and TARGET_PAGE_BITS_MIN to support variable page size. Cc: Jiaxun Yang Signed-off-by: Huacai Chen --- target/mips/cpu-param.h | 5 + 1 file changed, 5

[PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

2020-04-08 Thread Huacai Chen
Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14. Cc: Jiaxun Yang Signed-off-by: Huacai Chen --- hw/mips/mips_fulong2e.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index

[PATCH 1/2] target/arm: Make VQDMULL undefined when U=1

2020-04-08 Thread Fredrik Strupe
According to Arm ARM, VQDMULL is only valid when U=0, while having U=1 is unallocated. Signed-off-by: Fredrik Strupe Fixes: 695272dcb976 ("target-arm: Handle UNDEF cases for Neon 3-regs-different-widths") --- target/arm/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/2] target/arm: Fail on invalid size for VMUL (float)

2020-04-08 Thread Fredrik Strupe
Bit 1 of VMUL (float)'s size field encodes the opcode and must be 0, with 1 making it undefined. Thus, make VMUL (float) instructions with size=0b10 or size=0b11 (size >= 2) undefined. (U is 1 for VMUL, while it is 0 for VMLA/VMLS.) Signed-off-by: Fredrik Strupe --- target/arm/translate.c | 5

Re: [PATCH v1 3/3] hvf: Support AVX512 guests on capable hardware

2020-04-08 Thread Roman Bolshakov
On Mon, Mar 30, 2020 at 05:16:06PM -0700, Cameron Esfahani wrote: > macOS lazily enables AVX512. Explicitly enable it if the processor > supports it. > > cpu_x86_cpuid() tries to handle OSXSAVE but refers to env->cr[4] for the > guest copy of CR4. HVF doesn't support caching CPUID values like

Re: [PATCH v6 0/8] pci_expander_brdige:acpi:Support pxb-pcie for ARM

2020-04-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200408125816.955-1-miaoy...@huawei.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v6 0/8] pci_expander_brdige:acpi:Support pxb-pcie for ARM Message-id:

[PATCH v6 5/8] acpi: Align the size to 128k

2020-04-08 Thread Yubo Miao
From: miaoyubo If table size is changed between virt_acpi_build and virt_acpi_build_update, the table size would not be updated to UEFI, therefore, just align the size to 128kb, which is enough and same with x86. It would warn if 64k is not enough and the align size should be updated.

Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device

2020-04-08 Thread Gerd Hoffmann
Hi, > > > > > > +crs = aml_resource_template(); > > > > > > +aml_append(crs, aml_io(AML_DECODE16, 0x0070, 0x0070, 0x10, > > > > > > 0x02)); > maybe replace magic 0x0070 with macro > RTC_BASE_ADDR Yes, that sounds better. > > > > > > +aml_append(crs, aml_irq_no_flags(8)); > > >

[PATCH v6 0/8] pci_expander_brdige:acpi:Support pxb-pcie for ARM

2020-04-08 Thread Yubo Miao
From: miaoyubo Changes with v5 v5->v6: stat crs_range_insert in aml_build.h Changes with v4 v4->v5: Not using specific resources for PXB. Instead, the resources for pxb are composed of the bar space of the pci-bridge/pcie-root-port behined it and the config space of devices behind it. Only if

[PATCH v6 8/8] unit-test: Add the binary file and clear diff.h

2020-04-08 Thread Yubo Miao
From: miaoyubo Add the binary file DSDT.pxb and clear bios-tables-test-allowed-diff.h Signed-off-by: miaoyubo --- tests/data/acpi/virt/DSDT.pxb | Bin 0 -> 7802 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) create mode 100644

[PATCH v6 4/8] acpi: Refactor the source of host bridge and build tables for pxb

2020-04-08 Thread Yubo Miao
From: miaoyubo The resources of pxbs and obtained by crs_build and the resources used by pxbs would be moved form the resources defined for host-bridge. The resources for pxb are composed of the bar space of the pci-bridge/pcie-root-port behined it and the config space of devices behind it.

[PATCH v6 7/8] unit-test: Add testcase for pxb

2020-04-08 Thread Yubo Miao
From: miaoyubo Add testcase for pxb to make sure the ACPI table is correct for guest. Signed-off-by: miaoyubo --- tests/qtest/bios-tables-test.c | 58 ++ 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/tests/qtest/bios-tables-test.c

[PATCH v6 1/8] acpi: Extract two APIs from acpi_dsdt_add_pci

2020-04-08 Thread Yubo Miao
From: miaoyubo Extract two APIs acpi_dsdt_add_pci_route_table and acpi_dsdt_add_pci_osc form acpi_dsdt_add_pci. The first API is used to specify the pci route table and the second API is used to declare the operation system capabilities. These two APIs would be used to specify the pxb-pcie in

[PATCH v6 2/8] fw_cfg: Write the extra roots into the fw_cfg

2020-04-08 Thread Yubo Miao
From: miaoyubo Write the extra roots into the fw_cfg therefore the uefi could get the extra roots. Only if the uefi know there are extra roots, the config space of devices behind the root could be obtained. Signed-off-by: miaoyubo --- hw/arm/virt.c | 23 +++ 1 file

[PATCH v6 3/8] acpi: Extract crs build form acpi_build.c

2020-04-08 Thread Yubo Miao
From: miaoyubo Extract crs build form acpi_build.c, the function could also be used to build the crs for pxbs for arm. The resources are composed by two parts: 1. The bar space of pci-bridge/pcie-root-ports 2. The resources devices behind PXBs need. The base and limit of memory/io are obtained

[PATCH v6 6/8] unit-test: The files changed.

2020-04-08 Thread Yubo Miao
From: miaoyubo The unit-test is seperated into three patches: 1. The files changed and list in bios-tables-test-allowed-diff.h 2. The unit-test 3. The binary file and clear bios-tables-test-allowed-diff.h The ASL diff would also be listed. Sice there are 1000+lines diff, some changes would be

Re: [PATCH v4 18/30] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-04-08 Thread Max Reitz
On 17.03.20 19:16, Alberto Garcia wrote: > The logic of this function remains pretty much the same, except that > it uses count_contiguous_subclusters(), which combines the logic of > count_contiguous_clusters() / count_contiguous_clusters_unallocated() > and checks individual subclusters. > >

Re: [PATCH v4 15/30] qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCLUSTER_*

2020-04-08 Thread Max Reitz
On 17.03.20 19:16, Alberto Garcia wrote: > In order to support extended L2 entries some functions of the qcow2 > driver need to start dealing with subclusters instead of clusters. > > qcow2_get_host_offset() is modified to return the subcluster type > instead of the cluster type, and all callers

Re: [PATCH v4 14/30] qcow2: Add cluster type parameter to qcow2_get_host_offset()

2020-04-08 Thread Max Reitz
On 17.03.20 19:16, Alberto Garcia wrote: > This function returns an integer that can be either an error code or a > cluster type (a value from the QCow2ClusterType enum). > > We are going to start using subcluster types instead of cluster types > in some functions so it's better to use the exact

Re: [PATCH] configure: Add nios2-softmmu to the libfdt-required list

2020-04-08 Thread Philippe Mathieu-Daudé
On 4/8/20 10:16 AM, Stephanos Ioannidis wrote: The nios2-softmmu target requires libfdt to function properly (see hw/nios2/boot.c). Signed-off-by: Stephanos Ioannidis --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index

Re: [PATCH for-5.0] aio-posix: signal-proof fdmon-io_uring

2020-04-08 Thread Philippe Mathieu-Daudé
On 4/8/20 11:11 AM, Stefan Hajnoczi wrote: The io_uring_enter(2) syscall returns with errno=EINTR when interrupted by a signal. Retry the syscall in this case. It's essential to do this in the io_uring_submit_and_wait() case. My interpretation of the Linux v5.5 io_uring_enter(2) code is that

Re: [PATCH v6 14/42] nvme: add missing mandatory features

2020-04-08 Thread Klaus Birkelund Jensen
On Mar 31 12:39, Maxim Levitsky wrote: > On Tue, 2020-03-31 at 07:41 +0200, Klaus Birkelund Jensen wrote: > > On Mar 25 12:41, Maxim Levitsky wrote: > > > BTW the user of the device doesn't have to have 1:1 mapping between qid > > > and msi interrupt index, > > > in fact when MSI is not used, all

Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device

2020-04-08 Thread Igor Mammedov
On Tue, 7 Apr 2020 12:26:58 +0200 Gerd Hoffmann wrote: > On Mon, Apr 06, 2020 at 02:17:05PM +0200, Igor Mammedov wrote: > > On Mon, 6 Apr 2020 10:25:17 +0200 > > Gerd Hoffmann wrote: > > > > > On Fri, Apr 03, 2020 at 12:09:21PM +0200, Igor Mammedov wrote: > > > > On Fri, 3 Apr 2020

Re: [PATCH v4 13/30] qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()

2020-04-08 Thread Max Reitz
On 17.03.20 19:16, Alberto Garcia wrote: > This patch adds QCow2SubclusterType, which is the subcluster-level > version of QCow2ClusterType. All QCOW2_SUBCLUSTER_* values have the > the same meaning as their QCOW2_CLUSTER_* equivalents (when they > exist). See below for details and caveats. > >

Re: [PATCH v4 09/30] qcow2: Add subcluster-related fields to BDRVQcow2State

2020-04-08 Thread Max Reitz
On 17.03.20 19:16, Alberto Garcia wrote: > This patch adds the following new fields to BDRVQcow2State: > > - subclusters_per_cluster: Number of subclusters in a cluster > - subcluster_size: The size of each subcluster, in bytes > - subcluster_bits: No. of bits so 1 << subcluster_bits =

Re: [PATCH v4 07/30] qcow2: Document the Extended L2 Entries feature

2020-04-08 Thread Max Reitz
On 17.03.20 19:16, Alberto Garcia wrote: > Subcluster allocation in qcow2 is implemented by extending the > existing L2 table entries and adding additional information to > indicate the allocation status of each subcluster. > > This patch documents the changes to the qcow2 format and how they >

[Bug 1871250] Re: Failed to create HAX VM

2020-04-08 Thread James Le Cuirot
I am also seeing this. It was working as of commit d649689a8ecb2e276cc20d3af6d416e3c299cb17 so something must have changed in the past month. I can't see anything HAX-related though. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [PATCH v4 02/30] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-04-08 Thread Max Reitz
On 17.03.20 19:15, Alberto Garcia wrote: > qcow2_get_cluster_offset() takes an (unaligned) guest offset and > returns the (aligned) offset of the corresponding cluster in the qcow2 > image. > > In practice none of the callers need to know where the cluster starts > so this patch makes the

Re: [PATCH] hw/pci/pcie: Forbid hot-plug via QMP if it's disabled on the slot

2020-04-08 Thread Igor Mammedov
On Tue, 7 Apr 2020 16:50:17 +0200 Julia Suvorova wrote: > Raise an error when trying to hot-plug/unplug a device through QMP to a device > with disabled hot-plug capability. This makes the device behaviour more > consistent and provides an explanation of the failure in the case of >

Re: hotplug issue of vhost-user-blk

2020-04-08 Thread Igor Mammedov
On Wed, 8 Apr 2020 10:25:42 +0800 Li Feng wrote: > Hi all, > > Hotplug of vhost-user-blk doesn't not work in qemu master branch and > all previous version. > > The action I insert a vhost-user-blk disk is: > (qemu) chardev-add socket,id=spdk_vhost_blk2,path=/vhost-blk.0,reconnect=1 > (qemu)

Re: [PATCH for-5.0? 0/9] block/io: safer inc/dec in_flight sections

2020-04-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200408093051.9893-1-vsement...@virtuozzo.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

Re: [PATCH v4 01/30] qcow2: Make Qcow2AioTask store the full host offset

2020-04-08 Thread Max Reitz
On 17.03.20 19:15, Alberto Garcia wrote: > The file_cluster_offset field of Qcow2AioTask stores a cluster-aligned > host offset. In practice this is not very useful because all users(*) > of this structure need the final host offset into the cluster, which > they calculate using > >

Re: [PATCH for-5.0? 0/9] block/io: safer inc/dec in_flight sections

2020-04-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200408093051.9893-1-vsement...@virtuozzo.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

Re: [PATCH for-5.0? 0/9] block/io: safer inc/dec in_flight sections

2020-04-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200408093051.9893-1-vsement...@virtuozzo.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH] Makefile: libfdt: build only the strict necessary

2020-04-08 Thread Claudio Fontana
On 4/8/20 11:08 AM, Daniel P. Berrangé wrote: > On Wed, Apr 08, 2020 at 09:49:56AM +0200, Claudio Fontana wrote: >> Hi, >> >> On 4/8/20 9:06 AM, no-re...@patchew.org wrote: >>> Patchew URL: >>> https://patchew.org/QEMU/20200408070231.20265-1-cfont...@suse.de/ >>> >>> >>> >>> Hi, >>> >>> This

Re: [PATCH v9 5/9] docs/clocks: add device's clock documentation

2020-04-08 Thread Damien Hedde
On 4/7/20 7:07 AM, Markus Armbruster wrote: > Damien Hedde writes: > >> Add the documentation about the clock inputs and outputs in devices. >> >> This is based on the original work of Frederic Konrad. >> >> Signed-off-by: Damien Hedde >> Reviewed-by: Alistair Francis >> Reviewed-by: Edgar

Re: [PATCH for-5.0] aio-posix: signal-proof fdmon-io_uring

2020-04-08 Thread Stefano Garzarella
On Wed, Apr 08, 2020 at 10:11:39AM +0100, Stefan Hajnoczi wrote: > The io_uring_enter(2) syscall returns with errno=EINTR when interrupted > by a signal. Retry the syscall in this case. > > It's essential to do this in the io_uring_submit_and_wait() case. My > interpretation of the Linux v5.5

Re: [PATCH] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-04-08 Thread Joao Martins
On 4/8/20 3:25 AM, Liu, Jingqi wrote: > On 4/8/2020 2:28 AM, Joao Martins wrote: >> On 4/7/20 5:55 PM, Dan Williams wrote: >>> On Tue, Apr 7, 2020 at 4:01 AM Joao Martins >>> wrote: On 4/1/20 4:13 AM, Jingqi Liu wrote: > If the backend file is devdax pmem character device, the alignment

[PATCH 5/9] block/io: expand in_flight inc/dec section: simple cases

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
It's safer to expand in_flight request to start before enter to coroutine in synchronous wrappers and end after BDRV_POLL_WHILE loop. Note that qemu_coroutine_enter may only schedule the coroutine in some circumstances. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 155

[PATCH 8/9] block/io: move bdrv_make_zero under block-status

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
We are going to use bdrv_co_block_status in bdrv_make_zero, so move it now down. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 82 +++--- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/block/io.c b/block/io.c index

[PATCH 4/9] block/io: move bdrv_rw_co_entry and friends down

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
We are going to use bdrv_co_pwritev_part and bdrv_co_preadv_part in bdrv_rw_co_entry, so move it down. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 361 +++-- 1 file changed, 181 insertions(+), 180 deletions(-) diff --git

[PATCH 7/9] block/io: add bdrv_do_pwrite_zeroes

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
We'll need a bdrv_co_pwrite_zeroes version without inc/dec in_flight to be used in further implementation of bdrv_make_zero. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/block/io.c

[PATCH 6/9] block/io: expand in_flight inc/dec section: block-status

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
It's safer to expand in_flight request to start before enter to coroutine in synchronous wrappers and end after BDRV_POLL_WHILE loop. Note that qemu_coroutine_enter may only schedule the coroutine in some circumstances. block-status requests are complex, they involve querying different block

[PATCH 9/9] block/io: expand in_flight inc/dec section: bdrv_make_zero

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
It's safer to expand in_flight request to start before enter to coroutine in synchronous wrappers and end after BDRV_POLL_WHILE loop. Note that qemu_coroutine_enter may only schedule the coroutine in some circumstances. bdrv_make_zero update includes refactoring: move the whole loop into

[PATCH for-5.0? 0/9] block/io: safer inc/dec in_flight sections

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
Hi all! This is inspired by Kevin's "block: Fix blk->in_flight during blk_wait_while_drained()" series. So, like it's now done for block-backends, let's expand in_flight-protected sections for bdrv_ interfaces, including coroutine_enter and BDRV_POLL_WHILE loop into these sections. Vladimir

[PATCH 3/9] block/io: move flush and pdiscard stuff down

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
bdrv_co_flush and bdrv_co_pdiscard will become static in further patch, move their usage down. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 56 +++--- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/block/io.c

[PATCH 1/9] block/io: refactor bdrv_is_allocated_above to run only one coroutine

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
bdrv_is_allocated_above creates new coroutine on each iteration if called from non-coroutine context. To simplify expansion of in_flight inc/dec sections in further patch let's refactor it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 77

[PATCH 2/9] block/io: refactor bdrv_co_ioctl: move aio stuff to corresponding block

2020-04-08 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/block/io.c b/block/io.c index a9f1a3e93e..29e53271b6 100644 --- a/block/io.c +++ b/block/io.c @@ -3126,31 +3126,38 @@ int

Re: [PATCH] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-04-08 Thread Joao Martins
On 4/8/20 2:16 AM, Liu, Jingqi wrote: > On 4/7/2020 11:51 PM, Joao Martins wrote: >> On 4/7/20 3:31 PM, Paolo Bonzini wrote: >>> On 07/04/20 12:59, Joao Martins wrote: Perhaps, you meant instead: /sys/dev/char/%d:%d/align ? > Hi Joao, > > In my machine with real

Re: [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures

2020-04-08 Thread Ying Fang
On 2020/4/7 22:07, Paolo Bonzini wrote: ARM machines and other weakly-ordered architectures have been suffering for a long time from hangs in qemu-img and qemu-io. For QEMU binaries these are mitigated by the timers that sooner or later fire in the main loop, but these will not happen for

Re: [PATCH] Makefile: libfdt: build only the strict necessary

2020-04-08 Thread Daniel P . Berrangé
On Wed, Apr 08, 2020 at 09:49:56AM +0200, Claudio Fontana wrote: > Hi, > > On 4/8/20 9:06 AM, no-re...@patchew.org wrote: > > Patchew URL: > > https://patchew.org/QEMU/20200408070231.20265-1-cfont...@suse.de/ > > > > > > > > Hi, > > > > This series failed the asan build test. Please find the

[PATCH for-5.0] aio-posix: signal-proof fdmon-io_uring

2020-04-08 Thread Stefan Hajnoczi
The io_uring_enter(2) syscall returns with errno=EINTR when interrupted by a signal. Retry the syscall in this case. It's essential to do this in the io_uring_submit_and_wait() case. My interpretation of the Linux v5.5 io_uring_enter(2) code is that it shouldn't affect the io_uring_submit()

Re: [PATCH] configure: check for bison, flex before dtc submodule build

2020-04-08 Thread David Gibson
On Wed, Apr 08, 2020 at 10:08:57AM +0200, Claudio Fontana wrote: > On 4/8/20 10:00 AM, David Gibson wrote: > > On Wed, Apr 08, 2020 at 09:52:40AM +0200, Claudio Fontana wrote: > >> On 4/8/20 3:57 AM, David Gibson wrote: > >>> On Tue, Apr 07, 2020 at 12:20:15PM +0100, Peter Maydell wrote: > On

Re: [PATCH RESEND v4] nvme: introduce PMR support from NVMe 1.4 spec

2020-04-08 Thread Kevin Wolf
Am 30.03.2020 um 18:55 hat Keith Busch geschrieben: > On Mon, Mar 30, 2020 at 09:46:56AM -0700, Andrzej Jakowski wrote: > > This patch introduces support for PMR that has been defined as part of NVMe > > 1.4 > > spec. User can now specify a pmrdev option that should point to > >

Re: [PATCH for-5.0] xen: fixup RAM memory region initialization

2020-04-08 Thread Igor Mammedov
On Tue, 7 Apr 2020 12:36:34 +0100 Anthony PERARD wrote: > On Thu, Apr 02, 2020 at 04:30:33PM +0200, Igor Mammedov wrote: > > 1. why xen uses memory_region_init_ram() which does not allocate anything > > This seems to be due to history. > > >can it use plain memory_region_init() instead?

Re: [PATCH] configure: check for bison, flex before dtc submodule build

2020-04-08 Thread Claudio Fontana
On 4/8/20 10:00 AM, David Gibson wrote: > On Wed, Apr 08, 2020 at 09:52:40AM +0200, Claudio Fontana wrote: >> On 4/8/20 3:57 AM, David Gibson wrote: >>> On Tue, Apr 07, 2020 at 12:20:15PM +0100, Peter Maydell wrote: On Tue, 7 Apr 2020 at 12:16, Claudio Fontana wrote: > > if fdt is

linux-user: keep the name-ending parenthesis in /proc/self/stat

2020-04-08 Thread Brice Goglin
When the program name is very long, qemu-user may truncate it in /proc/self/stat. However the truncation must keep the ending ") " to conform to the proc manpage which says: (2) comm %s The filename of the executable, in parentheses. This is visible whether or not the

Re: linux-user: keep the name-ending parenthesis in /proc/self/stat

2020-04-08 Thread Laurent Vivier
Le 08/04/2020 à 08:40, Brice Goglin a écrit : > Le 31/03/2020 à 00:29, Brice Goglin a écrit : >> Le 31/03/2020 à 00:05, Philippe Mathieu-Daudé a écrit : >>> On 3/30/20 9:07 PM, Brice Goglin wrote: When the program name is very long, qemu-user may truncate it in /proc/self/stat. However

Re: [PATCH v1 1/3] hvf: use standard CR0 and CR4 register definitions

2020-04-08 Thread Paolo Bonzini
On 08/04/20 08:09, Cameron Esfahani wrote: >>> >>> if (efer & MSR_EFER_LME) { >>> -if (!(old_cr0 & CR0_PG) && (cr0 & CR0_PG)) { >>> +if (!(old_cr0 & CR0_PG_MASK) && (cr0 & CR0_PG_MASK)) { >>> enter_long_mode(vcpu, cr0, efer); >>> } >>> -if

  1   2   >