Re: [PATCH v3 1/9] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-05-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Move out x86-specific structures from generic machine code. > > Acked-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé > --- > qapi/machine-target.json | 45 ++ > qapi/machine.json | 42 ---

Re: [PATCH 50/55] s390x/event-facility: Simplify creation of SCLP event devices

2020-05-25 Thread Markus Armbruster
Paolo Bonzini writes: > On 25/05/20 09:01, Markus Armbruster wrote: >>> Just remembered that we fail creating the machine and therefore abort. So >>> not necessary :) >> True. >> >> But let's review briefly what happens when a realize method fails. >> >> In theory, realize fails cleanly, i.e.

[PATCH 14/14] hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask()

2020-05-25 Thread Philippe Mathieu-Daudé
Replace printf() calls by qemu_log_mask(UNIMP), which is disabled by default. This avoid flooding the terminal when fuzzing the device. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/pxa2xx_lcd.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git

[PATCH 13/14] hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP)

2020-05-25 Thread Philippe Mathieu-Daudé
Replace fprintf() call by qemu_log_mask(LOG_UNIMP), which is disabled by default. This avoid flooding the terminal when fuzzing the device. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/omap_dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/omap_dss.c b/

[PATCH 12/14] hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR)

2020-05-25 Thread Philippe Mathieu-Daudé
Replace DPRINT_ERROR() by qemu_log_mask(GUEST_ERROR). Signed-off-by: Philippe Mathieu-Daudé --- hw/display/exynos4210_fimd.c | 46 +++- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c inde

[PATCH 10/14] hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR)

2020-05-25 Thread Philippe Mathieu-Daudé
Avoid flooding stdio by converting printf() calls to qemu_log_mask(GUEST_ERROR), which are disabled by default. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vmware_vga.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/dis

[PATCH 11/14] hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegion

2020-05-25 Thread Philippe Mathieu-Daudé
To avoid the orphan I/O memory region being added in the /unattached QOM container, register the PCI device as its owner. Signed-off-by: Philippe Mathieu-Daudé --- RFC: This might break migration --- hw/display/vmware_vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/d

[PATCH 09/14] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report()

2020-05-25 Thread Philippe Mathieu-Daudé
DPRINTF() calls are disabled by default, so when unexpected data is used, the whole process abort without information. Display a bit of information with error_report() before crashing. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/xlnx_dp.c | 14 -- 1 file changed, 8 insertio

[PATCH 07/14] hw/display/dpcd: Fix memory region size

2020-05-25 Thread Philippe Mathieu-Daudé
The memory region size is 512K. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/dpcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c index 170545c605..0c1b7b35fb 100644 --- a/hw/display/dpcd.c +++ b/hw/display/dpcd.c @@ -1,5 +1

[PATCH 05/14] hw/display/cirrus_vga: Use qemu_log_mask(ERROR) instead of debug printf

2020-05-25 Thread Philippe Mathieu-Daudé
Replace some debug printf() calls by qemu_log_mask(LOG_GUEST_ERROR). Signed-off-by: Philippe Mathieu-Daudé --- hw/display/cirrus_vga.c | 77 ++--- 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c

[PATCH 04/14] hw/display/cirrus_vga: Use qemu_log_mask(UNIMP) instead of debug printf

2020-05-25 Thread Philippe Mathieu-Daudé
Replace some debug printf() calls by qemu_log_mask(LOG_UNIMP), and add a new one in cirrus_linear_bitblt_read(). Signed-off-by: Philippe Mathieu-Daudé --- hw/display/cirrus_vga.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/displ

[PATCH 03/14] hw/display/cirrus_vga: Convert debug printf() to trace event

2020-05-25 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/display/cirrus_vga.c | 4 +--- hw/display/trace-events | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 1f29731ffe..33ccdde000 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/di

[PATCH 06/14] hw/display/cirrus_vga: Convert debug printf() to trace event

2020-05-25 Thread Philippe Mathieu-Daudé
Convert the final bit of DEBUG_BITBLT to a tracepoint. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/cirrus_vga.c | 24 ++-- hw/display/trace-events | 1 + 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga

[PATCH 08/14] hw/display/dpcd: Convert debug printf()s to trace events

2020-05-25 Thread Philippe Mathieu-Daudé
Convert DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/dpcd.c | 16 +++- hw/display/trace-events | 4 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c index 0c1b7b35f

[PATCH 00/14] hw/display: Omnibus cleanups

2020-05-25 Thread Philippe Mathieu-Daudé
Hi Gerd, for your convenience I joined all the hw/display/ patches I sent recently altogether in a series. Regards, Phil. Philippe Mathieu-Daudé (14): hw/display/edid: Add missing 'qdev-properties.h' header hw/display/cg3: Convert debug printf()s to trace events hw/display/cirrus_vga: Conv

[PATCH 02/14] hw/display/cg3: Convert debug printf()s to trace events

2020-05-25 Thread Philippe Mathieu-Daudé
Convert DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/cg3.c| 14 -- hw/display/trace-events | 4 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index f7f1c199ce..7

[PATCH 01/14] hw/display/edid: Add missing 'qdev-properties.h' header

2020-05-25 Thread Philippe Mathieu-Daudé
When trying to consume the DEFINE_EDID_PROPERTIES() macro by including "hw/display/edid.h", we get this build failure: include/hw/display/edid.h:24:5: error: implicit declaration of function ‘DEFINE_PROP_UINT32’ [-Werror=implicit-function-declaration] 24 | DEFINE_PROP_UINT32("xres", _

Re: [PATCH v7 00/32] Add subcluster allocation to qcow2

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1590429901.git.be...@igalia.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 BEGIN === #!/b

Re: [PATCH] hw/mips/mips_fulong2e: Remove unused 'audio/audio.h' include

2020-05-25 Thread chen huacai
Reviewed-by: Huacai Chen On Tue, May 26, 2020 at 2:04 PM Philippe Mathieu-Daudé wrote: > > ping? > > On 5/15/20 10:42 AM, Philippe Mathieu-Daudé wrote: > > The Fuloong machine never had to use "audio/audio.h", remove it. > > > > Signed-off-by: Philippe Mathieu-Daudé > > --- > > hw/mips/mips_fu

Re: [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'

2020-05-25 Thread Philippe Mathieu-Daudé
ping... On 5/5/20 12:07 PM, Philippe Mathieu-Daudé wrote: > Use the generic AUDIO_HOST_ENDIANNESS definition instead > of a custom one. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Who/what machine is using this device anyway? > --- > hw/audio/gus.c | 8 +--- > 1 file changed, 1 insert

Re: [PATCH 0/7] audio: Spring cleaning

2020-05-25 Thread Philippe Mathieu-Daudé
On 5/5/20 3:25 PM, Philippe Mathieu-Daudé wrote: > Cleaning old branches, salvaging what seems worthwhile... > This series is from the time I wanted cleaner buffer handling > to avoid abuses, started with chardev/ but got lost with reviews. > audio/ is smaller, so easier. > > - Convert various pro

Re: [PATCH] hw/mips/mips_fulong2e: Remove unused 'audio/audio.h' include

2020-05-25 Thread Philippe Mathieu-Daudé
ping? On 5/15/20 10:42 AM, Philippe Mathieu-Daudé wrote: > The Fuloong machine never had to use "audio/audio.h", remove it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/mips/mips_fulong2e.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_f

Re: [PATCH] hw/mips/mips_fulong2e: Remove unused 'audio/audio.h' include

2020-05-25 Thread Philippe Mathieu-Daudé
ping? On 5/15/20 10:42 AM, Philippe Mathieu-Daudé wrote: > The Fuloong machine never had to use "audio/audio.h", remove it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/mips/mips_fulong2e.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_f

[PATCH 2/2] tests/qtest/fuzz: Avoid QTest mmio serialization

2020-05-25 Thread Philippe Mathieu-Daudé
We don't need to serialize over QTest chardev when we can directly access the MMIO address space via the first registered CPU view. virtio-net-socket gets ~50% performance improvement. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/fuzz/virtio_net_fuzz.c | 6 -- tests/qtest/fuzz/vir

[PATCH 1/2] tests/qtest/fuzz: Avoid QTest ioport serialization

2020-05-25 Thread Philippe Mathieu-Daudé
We don't need to serialize over QTest chardev when we can directly access the globally registered I/O address space. i440fx-qtest-reboot-fuzz gets 2x performance improvement. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/fuzz/i440fx_fuzz.c | 19 +-- 1 file changed, 13 in

[PATCH 0/2] tests/qtest/fuzz: Avoid QTest serialization

2020-05-25 Thread Philippe Mathieu-Daudé
Hi Alexander, I forgot to share these 2 patches wrote before the direct MemoryRegion fuzzer sent yesterday. Regards, Phil. Philippe Mathieu-Daudé (2): tests/qtest/fuzz: Avoid QTest ioport serialization tests/qtest/fuzz: Avoid QTest mmio serialization tests/qtest/fuzz/i440fx_fuzz.c |

Re: [PATCH] audio: fix wavcapture segfault

2020-05-25 Thread Gerd Hoffmann
On Thu, May 21, 2020 at 11:29:31AM -0600, Bruce Rogers wrote: > Commit 571a8c522e caused the HMP wavcapture command to segfault when > processing audio data in audio_pcm_sw_write(), where a NULL > sw->hw->pcm_ops is dereferenced. This fix checks that the pointer is > valid before dereferincing it.

Re: [PATCH] audio/mixeng: fix clang 10+ warning

2020-05-25 Thread Gerd Hoffmann
On Sat, May 23, 2020 at 10:17:12PM +0200, Volker Rümelin wrote: > The code in CONV_NATURAL_FLOAT() and CLIP_NATURAL_FLOAT() > seems to use the constant 2^31-0.5 to convert float to integer > and back. But the float type lacks the required precision and > the constant used for the conversion is 2^3

Re: [PATCH v7 00/32] Add subcluster allocation to qcow2

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1590429901.git.be...@igalia.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 BEGIN === #!/b

Re: [PATCH 1/1] util/oslib: Returns real thread identifier on FreeBSD and NetBSD

2020-05-25 Thread Thomas Huth
On 23/05/2020 09.23, David CARLIER wrote: > Hi this is my first contribution hope it s useful . Regards. Hi! Thanks for your contribution. Some hints for getting your patch included: - Please make sure to CC: the corresponding maintainers, otherwise your patch might get lost in the high traffic

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-25 Thread Ani Sinha
> On May 21, 2020, at 9:10 PM, Laine Stump wrote: > > I recall at one time someone (Marcel maybe?) proposed changing the default of > that setting, but don't remember why. https://patchwork.kernel.org/patch/9409349/

Re: [PATCH 06/24] armv7m: Bury unwanted "ARM,bitband-memory" devices

2020-05-25 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 25 May 2020 at 13:32, Paolo Bonzini wrote: >> >> On 25/05/20 07:50, Markus Armbruster wrote: >> > Peter Maydell writes: >> > >> >> On Mon, 18 May 2020 at 06:04, Markus Armbruster wrote: >> >>> These devices are optional, and enabled by property "enable-bitband".

Re: [PATCH v7 00/32] Add subcluster allocation to qcow2

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1590429901.git.be...@igalia.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 BEGIN === #!/b

Re: -nic model=rocker causes qemu to abort

2020-05-25 Thread Thomas Huth
On 25/05/2020 21.46, Michael Tokarev wrote: > 25.05.2020 21:45, Thomas Huth wrote: >> On 29/04/2020 18.43, Michael Tokarev wrote: >>> Hi! >>> >>> Just a fun case of (invalid) usage of qemu-system command line. >>> Someone tried -nic model=rocker, and qemu does this: >>> >>> Unexpected error in obj

Re: [PATCH 51/55] qdev: Make qdev_realize() support bus-less devices

2020-05-25 Thread Markus Armbruster
Paolo Bonzini writes: > On 25/05/20 08:38, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> On 20/05/20 17:02, Markus Armbruster wrote: >> >> qdev_realize_and_unref() remains restricted, because its reference >> counting would become rather confusing for bus-less devices. >>

Re: [PATCH v3 14/22] microvm: use 2G split unconditionally

2020-05-25 Thread Gerd Hoffmann
> > Well, I think we can (should) drop max-ram-below-4g too. There is > > no reason to use that with microvm, other that shooting yourself into > > the foot (by making mmio overlap with ram). > > > > With that being gone too there isn't much logic left ... > > I wonder if we need 2G split for mi

Re: [RFC PATCH] tests/qtest/fuzz: Add direct MemoryRegion fuzzer

2020-05-25 Thread Alexander Bulekov
On 200525 1927, Philippe Mathieu-Daudé wrote: > This is a proof-of-concept fuzzer that resolve a MemoryRegion > Object within the fuzzed QEMU process, then directly do > memory accesses using memory_region_dispatch_read/write calls. > > We avoid first the serialization of QTest strings, then the >

Re: [PATCH v7 00/32] Add subcluster allocation to qcow2

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1590429901.git.be...@igalia.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 BEGIN === #!/b

Re: [RFC PATCH] tests/qtest/fuzz: Add direct MemoryRegion fuzzer

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200525172704.32142-1-f4...@amsat.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200525172704.32142-1-f4...@amsat.org Subject: [RFC PATCH] tests/qtest/fuzz: Add direct MemoryRegion fuzze

Re: [PATCH v6 1/3] memory: drop guest writes to read-only ram device regions

2020-05-25 Thread Yan Zhao
On Mon, May 25, 2020 at 01:04:56PM +0200, Paolo Bonzini wrote: > On 25/05/20 12:54, Philippe Mathieu-Daudé wrote: > >> Not all of them, only those that need to return MEMTX_ERROR. I would > >> like some guidance from Peter as to whether (or when) reads from ROMs > >> should return MEMTX_ERROR. Th

Re: [PATCH 0/3] microvm: memory config tweaks

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200525134101.24740-1-kra...@redhat.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 === #!/bin/bash export

Re: [PATCH 0/3] microvm: memory config tweaks

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200525134101.24740-1-kra...@redhat.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 BEGIN === #

Re: [QUESTION] How to improve virtio-gpu performance

2020-05-25 Thread Jun Piao
ping? 在 2020/5/22 10:39, Jun Piao 写道: > Hi Gerd, > > I'm using glmark2 to test virtio-gpu on AMDGPU, but the result is > unsatisfactory. > > GPU: AMD Radeon Pro WX 5100 > Host OS: CentOS Linux release 7.7.1908 (AltArch) > --QEMU: 4.0.0 > --linux kernel 4.18 > --mesa 18.3 > --virglrendere

Re: [RFC v3 0/4] QEMU cpus.c refactoring

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200525145440.29728-1-cfont...@suse.de/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200525145440.29728-1-cfont...@suse.de Subject: [RFC v3 0/4] QEMU cpus.c refactoring Type: series === TE

Re: [PATCH v2] hw/adc/stm32f2xx_adc: Correct memory region size and access size

2020-05-25 Thread Alistair Francis
On Mon, May 25, 2020 at 4:10 AM Philippe Mathieu-Daudé wrote: > > The ADC region size is 256B, split as: > - [0x00 - 0x4f] defined > - [0x50 - 0xff] reserved > > All registers are 32-bit (thus when the datasheet mentions the > last defined register is 0x4c, it means its address range is > 0x4c .

Re: [PATCH] hw/block/pflash_cfi01: Limit maximum flash size to 256 MiB

2020-05-25 Thread Peter Maydell
On Mon, 25 May 2020 at 16:58, Philippe Mathieu-Daudé wrote: > > As of this commit, the biggest CFI01 NOR flash documented is > the Micron PC28F00BP33EF. Its size is 2 GiB (256 MiB). > > Actually this "2Gb device employs a virtual chip enable feature, > which combines two 1Gb die with a common chip

Re: [PATCH v3 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-05-25 Thread Raphael Norwitz
On Mon, May 25, 2020 at 4:58 AM Dima Stepanov wrote: > > On Wed, May 20, 2020 at 06:53:13PM +0300, Dima Stepanov wrote: > > A socket write during vhost-user communication may trigger a disconnect > > event, calling vhost_user_blk_disconnect() and clearing all the > > vhost_dev structures holding d

Re: -nic model=rocker causes qemu to abort

2020-05-25 Thread Michael Tokarev
25.05.2020 21:45, Thomas Huth wrote: > On 29/04/2020 18.43, Michael Tokarev wrote: >> Hi! >> >> Just a fun case of (invalid) usage of qemu-system command line. >> Someone tried -nic model=rocker, and qemu does this: >> >> Unexpected error in object_property_find() at >> /build/qemu/git/qom/object

[Bug 1877706] Re: [Feature request] qemu does not support for Octeon MIPS64 on X86

2020-05-25 Thread Aleksandar Markovic
Hi, Lu. Where can I download Octeon toolchain you used? I want to try it by myself. Aleksandar -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1877706 Title: [Feature request] qemu does not suppo

Re: [PATCH] hw/block/pflash_cfi01: Limit maximum flash size to 256 MiB

2020-05-25 Thread Laszlo Ersek
On 05/25/20 17:58, Philippe Mathieu-Daudé wrote: > As of this commit, the biggest CFI01 NOR flash documented is > the Micron PC28F00BP33EF. Its size is 2 GiB (256 MiB). I don't understand what "2 GiB (256 MiB)" means; please clarify. > > Actually this "2Gb device employs a virtual chip enable fe

Re: -nic model=rocker causes qemu to abort

2020-05-25 Thread Thomas Huth
On 29/04/2020 18.43, Michael Tokarev wrote: > Hi! > > Just a fun case of (invalid) usage of qemu-system command line. > Someone tried -nic model=rocker, and qemu does this: > > Unexpected error in object_property_find() at > /build/qemu/git/qom/object.c:1029: > qemu-system-x86_64: Property '.m

Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets

2020-05-25 Thread Aleksandar Markovic
пет, 22. мај 2020. у 05:12 Richard Henderson је написао/ла: > > On 5/21/20 4:32 AM, Ahmed Karaman wrote: > > Does this mean that there is a bug > > in this function for the other targets? > > Yes, I think so. > > > That we have to do the page crossings check in both modes to avoid the > > user-mod

Re: [PATCH] MAINTAINERS: add Thomas as additional s390x maintainer

2020-05-25 Thread Thomas Huth
On 25/05/2020 17.58, Cornelia Huck wrote: > ...because two people are better than one. > > Cc: Thomas Huth > Signed-off-by: Cornelia Huck > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 3690f313c3b6..b3c729688649 100644 > --- a/MAI

[PATCH v7 32/32] iotests: Add tests for qcow2 images with extended L2 entries

2020-05-25 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/271 | 705 + tests/qemu-iotests/271.out | 603 +++ tests/qemu-iotests/group | 1 + 3 files changed, 1309 insertions(+) create mode 100755 tests/qemu-iotests/271 create mo

[PATCH v7 02/32] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-05-25 Thread Alberto Garcia
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 function calculate and return the final host offset directly.

[PATCH v7 30/32] qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bit

2020-05-25 Thread Alberto Garcia
Now that the implementation of subclusters is complete we can finally add the necessary options to create and read images with this feature, which we call "extended L2 entries". Signed-off-by: Alberto Garcia --- qapi/block-core.json | 7 +++ block/qcow2.h| 8 +

[PATCH v7 17/32] qcow2: Add cluster type parameter to qcow2_get_host_offset()

2020-05-25 Thread Alberto Garcia
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 data types instead of integers for clarity and in or

[PATCH v7 20/32] qcow2: Add subcluster support to calculate_l2_meta()

2020-05-25 Thread Alberto Garcia
If an image has subclusters then there are more copy-on-write scenarios that we need to consider. Let's say we have a write request from the middle of subcluster #3 until the end of the cluster: 1) If we are writing to a newly allocated cluster then we need copy-on-write. The previous contents

[PATCH v7 03/32] qcow2: Add calculate_l2_meta()

2020-05-25 Thread Alberto Garcia
handle_alloc() creates a QCowL2Meta structure in order to update the image metadata and perform the necessary copy-on-write operations. This patch moves that code to a separate function so it can be used from other places. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2-cl

[PATCH v7 12/32] qcow2: Add l2_entry_size()

2020-05-25 Thread Alberto Garcia
qcow2 images with subclusters have 128-bit L2 entries. The first 64 bits contain the same information as traditional images and the last 64 bits form a bitmap with the status of each individual subcluster. Because of that we cannot assume that L2 entries are sizeof(uint64_t) anymore. This function

[PATCH v7 25/32] qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2()

2020-05-25 Thread Alberto Garcia
The L2 bitmap needs to be updated after each write to indicate what new subclusters are now allocated. This needs to happen even if the cluster was already allocated and the L2 entry was otherwise valid. In some cases however a write operation doesn't need change the L2 bitmap (because all affecte

[PATCH v7 21/32] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-05-25 Thread Alberto Garcia
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. qcow2_cluster_to_subcluster_type() is not necessary as a

[PATCH v7 24/32] qcow2: Add subcluster support to check_refcounts_l2()

2020-05-25 Thread Alberto Garcia
Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an image has subclusters. Instead, the individual 'all zeroes' bits must be used. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/qcow2-refcount.c |

[PATCH v7 05/32] qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied()

2020-05-25 Thread Alberto Garcia
When writing to a qcow2 file there are two functions that take a virtual offset and return a host offset, possibly allocating new clusters if necessary: - handle_copied() looks for normal data clusters that are already allocated and have a reference count of 1. In those clusters we ca

[PATCH v7 26/32] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-05-25 Thread Alberto Garcia
Compressed clusters always have the bitmap part of the extended L2 entry set to 0. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2-cluster.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 2276cee6d6..deff838fe8 100

[PATCH v7 27/32] qcow2: Add subcluster support to handle_alloc_space()

2020-05-25 Thread Alberto Garcia
The bdrv_co_pwrite_zeroes() call here fills complete clusters with zeroes, but it can happen that some subclusters are not part of the write request or the copy-on-write. This patch makes sure that only the affected subclusters are overwritten. A potential improvement would be to also fill with ze

[PATCH v7 00/32] Add subcluster allocation to qcow2

2020-05-25 Thread Alberto Garcia
Hi, this is the same as v6 but with a single fix in patch 23. Please refer to the cover letter of the first version for a full description of the patches: https://lists.gnu.org/archive/html/qemu-block/2019-10/msg00983.html The big change (in v6) is that the code does not need to iterate over

[PATCH v7 19/32] qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC

2020-05-25 Thread Alberto Garcia
When dealing with subcluster types there is a new value called QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC that has no equivalent in QCow2ClusterType. This patch handles that value in all places where subcluster types are processed. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Vladi

[PATCH v7 04/32] qcow2: Split cluster_needs_cow() out of count_cow_clusters()

2020-05-25 Thread Alberto Garcia
We are going to need it in other places. Signed-off-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-cluster.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/block/qcow2-cluster.c b/blo

[PATCH v7 18/32] qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCLUSTER_*

2020-05-25 Thread Alberto Garcia
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 are updated to replace all values of QCow2ClusterTyp

[PATCH v7 10/32] qcow2: Add offset_to_sc_index()

2020-05-25 Thread Alberto Garcia
For a given offset, return the subcluster number within its cluster (i.e. with 32 subclusters per cluster it returns a number between 0 and 31). Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.h | 5 + 1 file changed, 5 inserti

[PATCH v7 29/32] qcow2: Add subcluster support to qcow2_measure()

2020-05-25 Thread Alberto Garcia
Extended L2 entries are bigger than normal L2 entries so this has an impact on the amount of metadata needed for a qcow2 file. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/block/q

[PATCH v7 14/32] qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()

2020-05-25 Thread Alberto Garcia
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. In images without extended L2 entries clusters are trea

[PATCH v7 31/32] qcow2: Assert that expand_zero_clusters_in_l1() does not support subclusters

2020-05-25 Thread Alberto Garcia
This function is only used by qcow2_expand_zero_clusters() to downgrade a qcow2 image to a previous version. It is however not possible to downgrade an image with extended L2 entries because older versions of qcow2 do not have this feature. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake -

[PATCH v7 06/32] qcow2: Add get_l2_entry() and set_l2_entry()

2020-05-25 Thread Alberto Garcia
The size of an L2 entry is 64 bits, but if we want to have subclusters we need extended L2 entries. This means that we have to access L2 tables and slices differently depending on whether an image has extended L2 entries or not. This patch replaces all l2_slice[] accesses with calls to get_l2_entr

[PATCH v7 15/32] qcow2: Add qcow2_get_subcluster_range_type()

2020-05-25 Thread Alberto Garcia
There are situations in which we want to know how many contiguous subclusters of the same type there are in a given cluster. This can be done by simply iterating over the subclusters and repeatedly calling qcow2_get_subcluster_type() for each one of them. However once we determined the type of a s

[PATCH v7 08/32] qcow2: Add dummy has_subclusters() function

2020-05-25 Thread Alberto Garcia
This function will be used by the qcow2 code to check if an image has subclusters or not. At the moment this simply returns false. Once all patches needed for subcluster support are ready then QEMU will be able to create and read images with subclusters and this function will return the actual val

[PATCH v7 11/32] qcow2: Add offset_into_subcluster() and size_to_subclusters()

2020-05-25 Thread Alberto Garcia
Like offset_into_cluster() and size_to_clusters(), but for subclusters. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake --- block/qcow2.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/qcow2.h b/block/qcow2.h index ca73ac9b67..79c4f82383 100644 --- a/block/qcow2.h +

[PATCH v7 01/32] qcow2: Make Qcow2AioTask store the full host offset

2020-05-25 Thread Alberto Garcia
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 host_offset = file_cluster_offset + offset_into_cluster(s, offse

[PATCH v7 23/32] qcow2: Add subcluster support to discard_in_l2_slice()

2020-05-25 Thread Alberto Garcia
Two things need to be taken into account here: 1) With full_discard == true the L2 entry must be cleared completely. This also includes the L2 bitmap if the image has extended L2 entries. 2) With full_discard == false we have to make the discarded cluster read back as zeroes. With normal

[PATCH v7 16/32] qcow2: Add qcow2_cluster_is_allocated()

2020-05-25 Thread Alberto Garcia
This helper function tells us if a cluster is allocated (that is, there is an associated host offset for it). Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake --- block/qcow2.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/qcow2.h b/block/qcow2.h index 27dbcbc502..ba7614e

[PATCH v7 09/32] qcow2: Add subcluster-related fields to BDRVQcow2State

2020-05-25 Thread Alberto Garcia
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 = subcluster_size Images without subclusters are treated as if

[PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-05-25 Thread Alberto Garcia
This works now at the subcluster level and pwrite_zeroes_alignment is updated accordingly. qcow2_cluster_zeroize() is turned into qcow2_subcluster_zeroize() with the following changes: - The request can now be subcluster-aligned. - The cluster-aligned body of the request is still zeroized

[PATCH v7 13/32] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()

2020-05-25 Thread Alberto Garcia
Extended L2 entries are 128-bit wide: 64 bits for the entry itself and 64 bits for the subcluster allocation bitmap. In order to support them correctly get/set_l2_entry() need to be updated so they take the entry width into account in order to calculate the correct offset. This patch also adds th

[PATCH v7 07/32] qcow2: Document the Extended L2 Entries feature

2020-05-25 Thread Alberto Garcia
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 affect the calculation of the L2 cache size. Signed-of

[PATCH v7 22/32] qcow2: Add subcluster support to zero_in_l2_slice()

2020-05-25 Thread Alberto Garcia
The QCOW_OFLAG_ZERO bit that indicates that a cluster reads as zeroes is only used in standard L2 entries. Extended L2 entries use individual 'all zeroes' bits for each subcluster. This must be taken into account when updating the L2 entry and also when deciding that an existing entry does not nee

Re: [PATCH 2/2] qmp: Expose MachineClass::default_ram_id

2020-05-25 Thread Eduardo Habkost
On Mon, May 25, 2020 at 07:03:28PM +0200, Michal Privoznik wrote: > If a management application (like Libvirt) want's to preserve > migration ability and switch to '-machine memory-backend' it > needs to set exactly the same RAM id as QEMU would. Since the id > is machine type dependant, expose it

Re: [PATCH v3] spapr: Add a new level of NUMA for GPUs

2020-05-25 Thread Reza Arbab
On Mon, May 25, 2020 at 03:05:50PM +1000, David Gibson wrote: On Fri, May 22, 2020 at 02:53:33PM -0500, Reza Arbab wrote: --- a/hw/ppc/spapr_pci_nvlink2.c +++ b/hw/ppc/spapr_pci_nvlink2.c @@ -362,7 +362,7 @@ void spapr_phb_nvgpu_ram_populate_dt(SpaprPhbState *sphb, void *fdt) uint32_t

Re: [RFC v3 1/4] softmmu: move softmmu only files from root

2020-05-25 Thread Philippe Mathieu-Daudé
On 5/25/20 5:37 PM, Claudio Fontana wrote: > On 5/25/20 5:12 PM, Philippe Mathieu-Daudé wrote: >> On 5/25/20 4:54 PM, Claudio Fontana wrote: >>> move arch_init, balloon, cpus, ioport, memory, memory_mapping, qtest. >>> >>> They are all specific to CONFIG_SOFTMMU. >>> >>> Signed-off-by: Claudio Font

[RFC PATCH] tests/qtest/fuzz: Add direct MemoryRegion fuzzer

2020-05-25 Thread Philippe Mathieu-Daudé
This is a proof-of-concept fuzzer that resolve a MemoryRegion Object within the fuzzed QEMU process, then directly do memory accesses using memory_region_dispatch_read/write calls. We avoid first the serialization of QTest strings, then the FlatView resolve and AddressSpace dispatch. Various TODO

[PATCH 1/2] qapi: Fix comment format for @CpuInstanceProperties

2020-05-25 Thread Michal Privoznik
In 176d2cda0de, the @die-id attribute was introduced to CpuInstanceProperties type. However, it mangled the comment. Signed-off-by: Michal Privoznik --- qapi/machine.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index ff7b5032e3.

Re: [PATCH 0/9] Record/replay acceptance tests

2020-05-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/159040554265.2615.8993443700754452381.stgit@pasha-ThinkPad-X280/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 159040554265.2615.8993443700754452381.stgit@pasha-ThinkPad-X280 Subject: [PATCH 0

[PATCH 2/2] qmp: Expose MachineClass::default_ram_id

2020-05-25 Thread Michal Privoznik
If a management application (like Libvirt) want's to preserve migration ability and switch to '-machine memory-backend' it needs to set exactly the same RAM id as QEMU would. Since the id is machine type dependant, expose it under 'query-machines' result. Signed-off-by: Michal Privoznik --- hw/c

[PATCH 0/2] qmp: Expose MachineClass::default_ram_id

2020-05-25 Thread Michal Privoznik
The important patch is 2/2. Michal Privoznik (2): qapi: Fix comment format for @CpuInstanceProperties qmp: Expose MachineClass::default_ram_id hw/core/machine-qmp-cmds.c | 1 + qapi/machine.json | 8 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) -- 2.26.2

Re: [PATCH 2/3] microvm: drop max-ram-below-4g support

2020-05-25 Thread Igor Mammedov
On Mon, 25 May 2020 15:41:00 +0200 Gerd Hoffmann wrote: > Not useful for microvm and allows users to shot themself s/shot/shoot/ > into the foot (make ram + mmio overlap). also see my toher reply to previous version, parhaps we can drop some more logic here > Signed-off-by: Gerd Hoffmann Revi

Re: [RFC PATCH 2/3] block: Allow bdrv_run_co() from different AioContext

2020-05-25 Thread Kevin Wolf
Am 25.05.2020 um 16:18 hat Stefan Reiter geschrieben: > On 5/12/20 4:43 PM, Kevin Wolf wrote: > > Coroutine functions that are entered through bdrv_run_co() are already > > safe to call from synchronous code in a different AioContext because > > bdrv_coroutine_enter() will schedule them in the cont

Re: [PATCH v3 14/22] microvm: use 2G split unconditionally

2020-05-25 Thread Igor Mammedov
On Mon, 25 May 2020 13:45:08 +0200 Gerd Hoffmann wrote: > On Thu, May 21, 2020 at 11:29:21AM +0200, Igor Mammedov wrote: > > On Wed, 20 May 2020 15:19:55 +0200 > > Gerd Hoffmann wrote: > > > > > Looks like the logiv was copied over from q35. > > > > > > q35 does this for backward compatibili

Re: [RFC v2 5/9] vhost-vdpa: implement vhost-vdpa backend

2020-05-25 Thread Stefan Hajnoczi
On Mon, May 25, 2020 at 4:34 PM Cindy Lu wrote: > On Thu, May 21, 2020 at 8:40 PM Stefan Hajnoczi wrote: > > On Sat, May 09, 2020 at 12:32:14AM +0800, Cindy Lu wrote: > > > From: Tiwei Bie > > > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > > vhost-user. The abo

Re: [PATCH v6 00/32] Add subcluster allocation to qcow2

2020-05-25 Thread Alberto Garcia
On Sun 24 May 2020 06:34:17 PM CEST, no-re...@patchew.org wrote: > /tmp/qemu-test/src/block/qcow2-cluster.c:1912:54: error: implicit conversion > from enumeration type 'QCow2ClusterType' (aka 'enum QCow2ClusterType') to > different enumeration type 'enum qcow2_discard_type' > [-Werror,-Wenum-con

[PATCH] hw/block/pflash_cfi01: Limit maximum flash size to 256 MiB

2020-05-25 Thread Philippe Mathieu-Daudé
As of this commit, the biggest CFI01 NOR flash documented is the Micron PC28F00BP33EF. Its size is 2 GiB (256 MiB). Actually this "2Gb device employs a virtual chip enable feature, which combines two 1Gb die with a common chip enable". Since we do not want to model unrealistic hardware, cap the c

  1   2   3   >