Re: [PATCH v2 3/8] virtio-net: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:54 PM, Raphael Norwitz wrote: On Fri, Aug 26, 2022 at 05:32:43PM +0300, Daniil Tatianin wrote: Use the new common helper. As an added bonus this also makes use of config size sanity checking via the 'max_size' field. Signed-off-by: Daniil Tatianin --- hw/net/virtio-net.c | 8

Re: [PATCH v2 5/8] virtio-blk: move config size params to virtio-blk-common

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:57 PM, Raphael Norwitz wrote: The vhost-user-blk bits in meson.build and Maintainers should probably be in patch 8? You're totally right, thanks. Otherwise LGTM. On Fri, Aug 26, 2022 at 05:32:45PM +0300, Daniil Tatianin wrote: This way we can reuse it for other virtio-blk

Re: [PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:52 PM, Raphael Norwitz wrote: I feel like it would be easier to review if the first 4 patches were squashed together, but that’s not a big deal. Yeah, I think that's fair although I initially thought that maybe that was a bit too big of a change to put in one single commit. I

[PATCH] target/riscv: Implement PMU CSR predicate function for U-mode

2022-09-02 Thread Aurelien Jarno
Recently the Linux kernel started to use a non default value, for the scounteren CSR, which is ignored by QEMU. Fix that by implementing the PMU CSR predicate function for U-mode. Signed-off-by: Aurelien Jarno --- target/riscv/csr.c | 49 ++ 1 file

Re: [PATCH] target/riscv: Implement PMU CSR predicate function for U-mode

2022-09-02 Thread Aurelien Jarno
On 2022-09-02 18:46, Aurelien Jarno wrote: > Recently the Linux kernel started to use a non default value, for > the scounteren CSR, which is ignored by QEMU. Fix that by implementing > the PMU CSR predicate function for U-mode. > > Signed-off-by: Aurelien Jarno > --- > target/riscv/csr.c | 49

Re: [PATCH 04/20] ppc4xx: Use Ppc4xxSdramBank in ppc4xx_sdram_banks()

2022-09-02 Thread BALATON Zoltan
On Fri, 2 Sep 2022, Cédric Le Goater wrote: On 8/19/22 18:55, BALATON Zoltan wrote: Change ppc4xx_sdram_banks() to take one Ppc4xxSdramBank array instead of the separate arrays and adjust ppc4xx_sdram_init() and ppc440_sdram_init() accordingly as well as machines using these. Signed-off-by:

Re: [PATCH v2 5/8] virtio-blk: move config size params to virtio-blk-common

2022-09-02 Thread Raphael Norwitz
The vhost-user-blk bits in meson.build and Maintainers should probably be in patch 8? Otherwise LGTM. On Fri, Aug 26, 2022 at 05:32:45PM +0300, Daniil Tatianin wrote: > This way we can reuse it for other virtio-blk devices, e.g > vhost-user-blk, which currently does not control its config space

Re: [PATCH v2 3/8] virtio-net: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:43PM +0300, Daniil Tatianin wrote: > Use the new common helper. As an added bonus this also makes use of > config size sanity checking via the 'max_size' field. > > Signed-off-by: Daniil Tatianin > --- > hw/net/virtio-net.c | 8 ++-- > 1 file changed, 6

Re: [PATCH v2 8/8] vhost-user-blk: dynamically resize config space based on features

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:48PM +0300, Daniil Tatianin wrote: > Make vhost-user-blk backwards compatible when migrating from older VMs > running with modern features turned off, the same way it was done for > virtio-blk in 20764be0421c ("virtio-blk: set config size depending on the > features

Re: [PATCH v2 2/8] virtio-blk: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:42PM +0300, Daniil Tatianin wrote: > Use the common helper instead of duplicating the same logic. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/block/virtio-blk.c | 16 +++- > 1 file changed, 7 insertions(+), 9

Re: [PATCH v2 7/8] vhost-user-blk: make 'config_wce' part of 'host_features'

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:47PM +0300, Daniil Tatianin wrote: > No reason to have this be a separate field. This also makes it more akin > to what the virtio-blk device does. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 6

Re: [PATCH v2 4/8] virtio: remove the virtio_feature_get_config_size helper

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:44PM +0300, Daniil Tatianin wrote: > This has no more users and is superseded by virtio_get_config_size. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/virtio/virtio.c | 15 --- > include/hw/virtio/virtio.h | 3

[PATCH 7/8] tests: Unfold qtest_pci

2022-09-02 Thread Juan Quintela
We will need to configure depending on machine type for x86_64 on the following patch. It has only two users anyways. Signed-off-by: Juan Quintela --- tests/qtest/meson.build | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/qtest/meson.build

Re: [PATCH v2 6/8] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:46PM +0300, Daniil Tatianin wrote: > It is useful to have the ability to disable these features for > compatibility with older VMs that don't have these implemented. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- >

Re: [PATCH] configure: Only add configuration for targets that are enabled

2022-09-02 Thread Philippe Mathieu-Daudé via
On 2/9/22 18:33, Juan Quintela wrote: Current code configure devices even for targets that we are not compiling, just in case that we have configured the target architecture. Example that showed on my build is that I am compiling only for x86_64-softmmu, but it insists in building roms/SLOF,

[PATCH 6/8] tests: Make all tests that use q35 depend on it being compiled in

2022-09-02 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/meson.build | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index e910cb32ca..67b3b678d3 100644 --- a/tests/qtest/meson.build +++

Re: [PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
I feel like it would be easier to review if the first 4 patches were squashed together, but that’s not a big deal. For this one: Reviewed-by: Raphael Norwitz On Fri, Aug 26, 2022 at 05:32:41PM +0300, Daniil Tatianin wrote: > This is the first step towards moving all device config size

[PATCH 8/8] tests: Make all tests that depend on I440FX state that

2022-09-02 Thread Juan Quintela
All the tests that I have put in qtests_i386_require_default work with either "pc" or "q35". Signed-off-by: Juan Quintela --- tests/qtest/meson.build | 67 + 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/tests/qtest/meson.build

[PATCH 1/8] bios-tables-test: Make oem-fields tests be consistent

2022-09-02 Thread Juan Quintela
Every other test function is named: test_acpi__() Just make this test the same. Once there, rename "acpi/oem-fields" to "acpi/piix4/oem-fields" so it is consistent with everything else. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 16 1 file

[PATCH 0/8] RFC: Pass tests for x86_64 machine types compiled individually

2022-09-02 Thread Juan Quintela
Hi This is a continuation on top of my previous series: tests: Make expliction defaults for tests Based-on: <20220902165126.1482-1-quint...@redhat.com> After the series is applied, the following combinations for x86_64-softmmu-devices.conf pass "make check" CONFIG_ISAPC=y CONFIG_I440FX=y

[PATCH 4/8] tests: Only run intel-hda-tests if machine type is compiled in

2022-09-02 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/intel-hda-test.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/qtest/intel-hda-test.c b/tests/qtest/intel-hda-test.c index a58c98e4d1..d4a8db6fd6 100644 --- a/tests/qtest/intel-hda-test.c +++

[PATCH v8 5/8] s390x/pci: enable adapter event notification for interpreted devices

2022-09-02 Thread Matthew Rosato
Use the associated kvm ioctl operation to enable adapter event notification and forwarding for devices when requested. This feature will be set up with or without firmware assist based upon the 'forwarding_assist' setting. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 20

[PATCH] tests/tcg/x86_64: add cross-modifying code test

2022-09-02 Thread Ilya Leoshkevich
commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before translation") fixed cross-modifying code handling, but did not add a test. The changed code was further improved recently [1], and I was not sure whether these modifications were safe (spoiler: they were fine). Add a test to make sure there

[PATCH 3/8] bios-tables-test: Only run test for machine types compiled in

2022-09-02 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 145 ++--- 1 file changed, 78 insertions(+), 67 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 757db2bc40..bc216cac95 100644 ---

[PATCH v8 4/8] s390x/pci: don't fence interpreted devices without MSI-X

2022-09-02 Thread Matthew Rosato
Lack of MSI-X support is not an issue for interpreted passthrough devices, so let's let these in. This will allow, for example, ISM devices to be passed through -- but only when interpretation is available and being used. Reviewed-by: Thomas Huth Reviewed-by: Pierre Morel Signed-off-by:

[PATCH v8 8/8] s390x/s390-virtio-ccw: add zpcii-disable machine property

2022-09-02 Thread Matthew Rosato
The zpcii-disable machine property can be used to force-disable the use of zPCI interpretation facilities for a VM. By default, this setting will be off for machine 7.2 and newer. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-kvm.c| 4 +++- hw/s390x/s390-virtio-ccw.c

[PATCH 2/8] bios-tables-test: Sort all x86_64 tests by machine type

2022-09-02 Thread Juan Quintela
No code change here, just move test around. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 60 +++--- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index

[PATCH v8 1/8] linux-headers: update to 6.0-rc3

2022-09-02 Thread Matthew Rosato
Signed-off-by: Matthew Rosato --- include/standard-headers/asm-x86/bootparam.h | 7 +- include/standard-headers/drm/drm_fourcc.h | 73 +++- include/standard-headers/linux/ethtool.h | 29 +-- include/standard-headers/linux/input.h| 12 +-

[PATCH 5/8] tests: sb16 has both pc and q35 tests

2022-09-02 Thread Juan Quintela
Check that the machines are compiled in before calling it Signed-off-by: Juan Quintela --- tests/qtest/fuzz-sb16-test.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qtest/fuzz-sb16-test.c b/tests/qtest/fuzz-sb16-test.c index dd1b4b307f..fc445b1871 100644

[PATCH v8 7/8] s390x/pci: reflect proper maxstbl for groups of interpreted devices

2022-09-02 Thread Matthew Rosato
The maximum supported store block length might be different depending on whether the instruction is interpretively executed (firmware-reported maximum) or handled via userspace intercept (host kernel API maximum). Choose the best available value during group creation. Reviewed-by: Pierre Morel

[PATCH v8 6/8] s390x/pci: let intercept devices have separate PCI groups

2022-09-02 Thread Matthew Rosato
Let's use the reserved pool of simulated PCI groups to allow intercept devices to have separate groups from interpreted devices as some group values may be different. If we run out of simulated PCI groups, subsequent intercept devices just get the default group. Furthermore, if we encounter any

[PATCH v8 0/8] s390x/pci: zPCI interpretation support

2022-09-02 Thread Matthew Rosato
Now that the kernel series [1] is merged and the freeze is over, here is a refresh of the zPCI interpretation series. For QEMU, the majority of the work in enabling instruction interpretation is handled via SHM bit settings (to indicate

[PATCH v8 2/8] s390x/pci: add routine to get host function handle from CLP info

2022-09-02 Thread Matthew Rosato
In order to interface with the underlying host zPCI device, we need to know it's function handle. Add a routine to grab this from the vfio CLP capabilities chain. Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 83 ++--

[PATCH v8 3/8] s390x/pci: enable for load/store intepretation

2022-09-02 Thread Matthew Rosato
If the ZPCI_OP ioctl reports that is is available and usable, then the underlying KVM host will enable load/store intepretation for any guest device without a SHM bit in the guest function handle. For a device that will be using interpretation support, ensure the guest function handle matches the

Re: [PATCH 0/8] tests: Make expliction defaults for tests

2022-09-02 Thread Alexander Bulekov
On 220902 1851, Juan Quintela wrote: > Hi > > For a long, long time I have had local hacks on my tree to be able to > run "make tests" when I have a minimal configure guest. This is a > first try to upstream some of it. > > - by default we always setup -display none (it already was the >

[PATCH 3/8] tests/acpi: The new default is -vga none

2022-09-02 Thread Juan Quintela
So we lost a device in each table. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test-allowed-diff.h | 39 + 1 file changed, 39 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index

[PATCH 7/8] meson-build: Enable CONFIG_REPLICATION only when replication is set

2022-09-02 Thread Juan Quintela
Signed-off-by: Juan Quintela --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 20fddbd707..cab0474d0c 100644 --- a/meson.build +++ b/meson.build @@ -1878,7 +1878,7 @@ config_host_data.set('CONFIG_DEBUG_STACK_USAGE',

[PATCH 6/8] tests: Fix error strings

2022-09-02 Thread Juan Quintela
They were copy-pasted from e1000e and never changed. Signed-off-by: Juan Quintela --- tests/qtest/e1000-test.c | 2 +- tests/qtest/es1370-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/e1000-test.c b/tests/qtest/e1000-test.c index

[PATCH 2/8] qtest: Set "-net none" in qtest_init()

2022-09-02 Thread Juan Quintela
This way, we don't have networking by default. If test needs it, configure it. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/libqtest.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c

Re: [PATCH v1 15/40] i386/tdx: Add property sept-ve-disable for tdx-guest object

2022-09-02 Thread Gerd Hoffmann
On Fri, Sep 02, 2022 at 03:26:35PM +, Sean Christopherson wrote: > On Fri, Sep 02, 2022, Gerd Hoffmann wrote: > > > > Hmm, ok, but shouldn't the SEPT_VE bit *really* controlled by the guest > > then? > > > > Having a hypervisor-controlled config bit to protect against a malicious > >

[PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING

2022-09-02 Thread Juan Quintela
With this change "make check" works when configured with --disable-keyring. Signed-off-by: Juan Quintela --- tests/unit/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build index b497a41378..988aed27cb 100644 ---

[PATCH 4/8] tests/qtest: Add -vga none by default

2022-09-02 Thread Juan Quintela
Nothing in qtest where using vga by default except for dbus-display-test. We add -device VGA there. The only other test that fails after this change is: 109/659 qemu:qtest+qtest-ppc64 / qtest-ppc64/qos-test ERROR 21.34s killed by signal 6 SIGABRT Bail out!

[PATCH 1/8] qtest: "-display none" is set in qtest_init()

2022-09-02 Thread Juan Quintela
So we don't need to set anywhere else. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/fuzz-lsi53c895a-test.c | 2 +- tests/qtest/fuzz-megasas-test.c | 2 +- tests/qtest/fuzz-sb16-test.c| 6 +++--- tests/qtest/fuzz-sdcard-test.c | 6

[PATCH 0/8] tests: Make expliction defaults for tests

2022-09-02 Thread Juan Quintela
Hi For a long, long time I have had local hacks on my tree to be able to run "make tests" when I have a minimal configure guest. This is a first try to upstream some of it. - by default we always setup -display none (it already was the default, but some places added it anyways) - by default

Re: [PATCH 41/51] tests/qtest: migration-test: Kill "to" after migration is canceled

2022-09-02 Thread Bin Meng
On Thu, Sep 1, 2022 at 7:35 PM Marc-André Lureau wrote: > > Hi > > On Wed, Aug 24, 2022 at 10:56 PM Dr. David Alan Gilbert > wrote: >> >> * Bin Meng (bmeng...@gmail.com) wrote: >> > From: Xuzhou Cheng >> > >> > Make sure QEMU process "to" is killed before launching another target >> > for

[PATCH] configure: Only add configuration for targets that are enabled

2022-09-02 Thread Juan Quintela
Current code configure devices even for targets that we are not compiling, just in case that we have configured the target architecture. Example that showed on my build is that I am compiling only for x86_64-softmmu, but it insists in building roms/SLOF, that I am not using at all.

Re: [PATCH] qtest/fuzz-lsi53c895a-test: set guest RAM to 2G

2022-09-02 Thread Bin Meng
On Fri, Sep 2, 2022 at 9:39 PM Mauro Matteo Cascella wrote: > > test_lsi_do_msgout_cancel_req does not run on machines with small size > memory. Reduce guest memory from 4G to 2G to alleviate the problem. > > Reported-by: Bin Meng > Signed-off-by: Mauro Matteo Cascella > --- >

Re: [PATCH] qtest/fuzz-lsi53c895a-test: set guest RAM to 2G

2022-09-02 Thread Alexander Bulekov
On 220902 1538, Mauro Matteo Cascella wrote: > test_lsi_do_msgout_cancel_req does not run on machines with small size > memory. Reduce guest memory from 4G to 2G to alleviate the problem. > > Reported-by: Bin Meng > Signed-off-by: Mauro Matteo Cascella > --- >

Re: [PATCH] qtest/fuzz-lsi53c895a-test: set guest RAM to 2G

2022-09-02 Thread Philippe Mathieu-Daudé via
On 2/9/22 15:38, Mauro Matteo Cascella wrote: test_lsi_do_msgout_cancel_req does not run on machines with small size memory. Reduce guest memory from 4G to 2G to alleviate the problem. Reported-by: Bin Meng Signed-off-by: Mauro Matteo Cascella --- tests/qtest/fuzz-lsi53c895a-test.c | 2 +-

Re: [PATCH 29/51] tests/qtest: libqtest: Install signal handler via signal()

2022-09-02 Thread Bin Meng
On Wed, Aug 31, 2022 at 10:16 PM Marc-André Lureau wrote: > > Hi > > On Wed, Aug 24, 2022 at 2:47 PM Bin Meng wrote: >> >> From: Bin Meng >> >> At present the codes uses sigaction() to install signal handler with >> a flag SA_RESETHAND. Such usage can be covered by the signal() API >> that is a

Re: [PATCH 03/20] ppc4xx_sdram: Get rid of the init RAM hack

2022-09-02 Thread BALATON Zoltan
On Fri, 2 Sep 2022, Cédric Le Goater wrote: On 8/19/22 18:55, BALATON Zoltan wrote: The do_init parameter of ppc4xx_sdram_init() is used to map memory regions that is normally done by the firmware by programming the SDRAM controller. This is needed when booting a kernel directly from -kernel

Re: [PULL 0/4] chardev patches & a small audio fix

2022-09-02 Thread Stefan Hajnoczi
On Fri, 2 Sept 2022 at 09:24, wrote: > > From: Marc-André Lureau > > The following changes since commit 93fac696d241dccb04ebb9d23da55fc1e9d8ee36: > > Open 7.2 development tree (2022-08-30 09:40:41 -0700) > > are available in the Git repository at: > >

Re: [PATCH v1 15/40] i386/tdx: Add property sept-ve-disable for tdx-guest object

2022-09-02 Thread Sean Christopherson
On Fri, Sep 02, 2022, Gerd Hoffmann wrote: > On Fri, Sep 02, 2022 at 02:52:25AM +, Sean Christopherson wrote: > > On Fri, Sep 02, 2022, Xiaoyao Li wrote: > > > On 8/26/2022 1:57 PM, Gerd Hoffmann wrote: > > > >Hi, > > > > > For TD guest kernel, it has its own reason to turn SEPT_VE on or

Re: [PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'

2022-09-02 Thread Bin Meng
On Thu, Aug 25, 2022 at 8:04 PM Thomas Huth wrote: > > On 24/08/2022 11.40, Bin Meng wrote: > > From: Bin Meng > > > > When QEMU is configured with '--without-default-devices', we should > > not build and run iotests and qtest because devices used by these > > test cases are not built in. > > >

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

2022-09-02 Thread Victor Toso
Hi, On Fri, Jun 17, 2022 at 02:19:26PM +0200, Victor Toso wrote: > This patch handles QAPI alternate types and generates data structures > in Go that handles it. > > At this moment, there are 5 alternates in qemu/qapi, they are: > * BlockDirtyBitmapMergeSource > * Qcow2OverlapChecks > *

Re: [PATCH 27/51] tests/qtest: Use send/recv for socket communication

2022-09-02 Thread Bin Meng
On Wed, Aug 31, 2022 at 10:06 PM Marc-André Lureau wrote: > > Hi > > On Fri, Aug 26, 2022 at 10:27 PM Thomas Huth wrote: >> >> On 26/08/2022 16.59, Bin Meng wrote: >> > On Thu, Aug 25, 2022 at 9:04 PM Thomas Huth wrote: >> >> >> >> On 24/08/2022 11.40, Bin Meng wrote: >> >>> From: Xuzhou Cheng

Re: [PATCH v1 3/8] migration: Introduce dirty-limit capability

2022-09-02 Thread Hyman Huang
在 2022/9/2 16:07, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned on before live migration and limit dirty page rate durty live migration. Introduce migrate_dirty_limit function to help check if

Re: [PATCH] KVM: use store-release to mark dirty pages as harvested

2022-09-02 Thread Peter Xu
On Fri, Sep 02, 2022 at 02:19:36AM +0200, Paolo Bonzini wrote: > The following scenario can happen if QEMU sets more RESET flags while > the KVM_RESET_DIRTY_RINGS ioctl is ongoing on another host CPU: > > CPU0 CPU1 CPU2 >

Re: [PATCH] Hexagon (target/hexagon) implement mutability mask for GPRs

2022-09-02 Thread Anton Johansson via
Hi, Brian! I've taken a look and most of this patch seems good, however I have a few comments/observations. Some registers are defined to have immutable bits, this commit will implement that behavior. Signed-off-by: Brian Cain --- target/hexagon/gen_masked.c | 44

[PATCH] qtest/fuzz-lsi53c895a-test: set guest RAM to 2G

2022-09-02 Thread Mauro Matteo Cascella
test_lsi_do_msgout_cancel_req does not run on machines with small size memory. Reduce guest memory from 4G to 2G to alleviate the problem. Reported-by: Bin Meng Signed-off-by: Mauro Matteo Cascella --- tests/qtest/fuzz-lsi53c895a-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v7 11/12] multifd: Zero pages transmission

2022-09-02 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > This implements the zero page dection and handling. > > Signed-off-by: Juan Quintela > > --- > > Add comment for offset (dave) > Use local variables for offset/block to have shorter lines > --- > migration/multifd.h | 5 + >

Re: [PATCH v1 2/8] qapi/migration: Introduce x-vcpu-dirty-limit parameters

2022-09-02 Thread Hyman Huang
在 2022/9/2 16:03, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Introduce "x-vcpu-dirty-limit" migration parameter used to limit dirty page rate during live migration. "x-vcpu-dirty-limit" and "x-vcpu-dirty-limit-period" are two dirty-limit-related

Re: [PATCH v7 10/12] multifd: Support for zero pages transmission

2022-09-02 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > This patch adds counters and similar. Logic will be added on the > following patch. > > Signed-off-by: Juan Quintela > > --- > > Added counters for duplicated/non duplicated pages. > Removed reviewed by from David. > Add

Re: [PATCH v7 12/12] So we use multifd to transmit zero pages.

2022-09-02 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela > > --- > > - Check zero_page property before using new code (Dave) > --- > migration/migration.c | 4 +--- > migration/multifd.c | 6 +++--- > migration/ram.c | 33

[PULL 3/4] tests/unit: Update test-io-channel-socket.c for Windows

2022-09-02 Thread marcandre . lureau
From: Bin Meng Change to dynamically include the test cases by checking AF_UNIX availability using a new helper socket_check_afunix_support(). With such changes testing on a Windows host can be covered as well. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id:

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-09-02 Thread Marc-André Lureau
Hi On Fri, Sep 2, 2022 at 3:16 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Thu, Aug 11, 2022 at 5:35 PM Markus Armbruster > wrote: > > > >> Daniel P. Berrangé writes: > >> > >> > On Thu, Aug 11, 2022 at 02:50:01PM +0400, Marc-André Lureau wrote: > >> >> Hi >

[PULL 1/4] util/qemu-sockets: Enable unix socket support on Windows

2022-09-02 Thread marcandre . lureau
From: Bin Meng Support for the unix socket has existed both in BSD and Linux for the longest time, but not on Windows. Since Windows 10 build 17063 [1], the native support for the unix socket has come to Windows. Starting this build, two Win32 processes can use the AF_UNIX address family over

[PULL 0/4] chardev patches & a small audio fix

2022-09-02 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 93fac696d241dccb04ebb9d23da55fc1e9d8ee36: Open 7.2 development tree (2022-08-30 09:40:41 -0700) are available in the Git repository at: g...@gitlab.com:marcandre.lureau/qemu.git tags/char-pull-request for you to fetch changes up

[PULL 2/4] chardev/char-socket: Update AF_UNIX for Windows

2022-09-02 Thread marcandre . lureau
From: Bin Meng Now that AF_UNIX has come to Windows, update the existing logic in qemu_chr_compute_filename() and qmp_chardev_open_socket() for Windows. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220802075200.907360-4-bmeng...@gmail.com> --- chardev/char-socket.c |

[PULL 4/4] audio: exit(1) if audio backend failed to be found or initialized

2022-09-02 Thread marcandre . lureau
From: Marc-André Lureau If you specify a known backend but it isn't compiled in, or failed to initialize, you get a simple warning and the "none" backend as a fallback, and QEMU runs happily: $ qemu-system-x86_64 -audiodev id=audio,driver=dsound audio: Unknown audio driver `dsound' audio:

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

2022-09-02 Thread Kirill A . Shutemov
On Fri, Sep 02, 2022 at 06:27:57PM +0800, Chao Peng wrote: > > + if (flags & MFD_INACCESSIBLE) { > > + struct file *inaccessible_file; > > + > > + inaccessible_file = memfd_mkinaccessible(file); > > + if (IS_ERR(inaccessible_file)) { > > + error =

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

2022-09-02 Thread Markus Armbruster
Dongli Zhang writes: > 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

[PATCH v2 2/3] io/command: implement support for win32

2022-09-02 Thread marcandre . lureau
From: Marc-André Lureau This is a fairly straightforward implementation of the equivalent UNIX version. GLib uses _mkpipe() to setup the FDs. We take that for granted, and set the underlying named-pipes to nonblocking. This is done by other projects as well (found on github), but I am not

[PATCH v2 3/3] tests/unit: make test-io-channel-command work on win32

2022-09-02 Thread marcandre . lureau
From: Marc-André Lureau This has been tested under msys2 & windows 11. I haven't tried to make it work with other environments yet, but that should be enough to validate the channel-command implementation anyway. Signed-off-by: Marc-André Lureau --- tests/unit/test-io-channel-command.c | 31

[PATCH v2 1/3] io/command: use glib GSpawn, instead of open-coding fork/exec

2022-09-02 Thread marcandre . lureau
From: Marc-André Lureau Simplify qio_channel_command_new_spawn() with GSpawn API. This will allow to build for WIN32 in the following patches. Signed-off-by: Marc-André Lureau --- include/io/channel-command.h | 2 +- io/channel-command.c | 105 ++- 2

[PATCH v2 0/3] io/command: implement portable spawn

2022-09-02 Thread marcandre . lureau
From: Marc-André Lureau Hi, A small series, based on earlier "[PATCH] io/command: implement portable spawn" to enable Windows support of command spawning in the io/ subsystem. Marc-André Lureau (3): io/command: use glib GSpawn, instead of open-coding fork/exec io/command: implement support

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-09-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Aug 11, 2022 at 5:35 PM Markus Armbruster wrote: > >> Daniel P. Berrangé writes: >> >> > On Thu, Aug 11, 2022 at 02:50:01PM +0400, Marc-André Lureau wrote: >> >> Hi >> >> >> >> On Thu, Aug 11, 2022 at 2:22 PM Peter Maydell > > >> >> wrote: >> >> [...]

Re: [PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32

2022-09-02 Thread Bin Meng
On Thu, Sep 1, 2022 at 4:42 PM Marc-André Lureau wrote: > > Hi > > On Wed, Aug 24, 2022 at 2:03 PM Bin Meng wrote: >> >> From: Bin Meng >> >> On Windows, the MinGW provided mkstemp() API opens the file with >> exclusive access, denying other processes to read/write the file. >> Such behavior

Re: [PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32

2022-09-02 Thread Bin Meng
On Thu, Aug 25, 2022 at 8:06 PM Thomas Huth wrote: > > On 24/08/2022 11.40, Bin Meng wrote: > > From: Bin Meng > > > > On Windows, the MinGW provided mkstemp() API opens the file with > > exclusive access, denying other processes to read/write the file. > > Such behavior prevents the QEMU

Re: [PATCH] scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout (CVE-2022-0216)

2022-09-02 Thread Bin Meng
Hi Mauro, On Fri, Sep 2, 2022 at 6:44 PM Mauro Matteo Cascella wrote: > > Hi Bin, > > On Fri, Sep 2, 2022 at 3:56 AM Bin Meng wrote: > > > > Hi, > > > > On Wed, Jul 13, 2022 at 8:45 PM Paolo Bonzini wrote: > > > > > > From: Mauro Matteo Cascella > > > > > > Set current_req to NULL, not

Re: [PATCH 04/20] ppc4xx: Use Ppc4xxSdramBank in ppc4xx_sdram_banks()

2022-09-02 Thread Cédric Le Goater
On 8/19/22 18:55, BALATON Zoltan wrote: Change ppc4xx_sdram_banks() to take one Ppc4xxSdramBank array instead of the separate arrays and adjust ppc4xx_sdram_init() and ppc440_sdram_init() accordingly as well as machines using these. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc405.h |

Re: [PATCH 03/20] ppc4xx_sdram: Get rid of the init RAM hack

2022-09-02 Thread Cédric Le Goater
On 8/19/22 18:55, BALATON Zoltan wrote: The do_init parameter of ppc4xx_sdram_init() is used to map memory regions that is normally done by the firmware by programming the SDRAM controller. This is needed when booting a kernel directly from -kernel without a firmware. Do this from board code

Re: [PATCH] scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout (CVE-2022-0216)

2022-09-02 Thread Mauro Matteo Cascella
Hi Bin, On Fri, Sep 2, 2022 at 3:56 AM Bin Meng wrote: > > Hi, > > On Wed, Jul 13, 2022 at 8:45 PM Paolo Bonzini wrote: > > > > From: Mauro Matteo Cascella > > > > Set current_req to NULL, not current_req->req, to prevent reusing a free'd > > buffer in case of repeated SCSI cancel requests.

RE: [PATCH v2] target/i386: Restore TSX features with taa-no

2022-09-02 Thread Duan, Zhenzhong
>-Original Message- >From: Li, Xiaoyao >Sent: Friday, July 15, 2022 9:14 AM >To: Paolo Bonzini ; Duan, Zhenzhong >; qemu-devel@nongnu.org >Cc: ehabk...@redhat.com; Ma, XiangfeiX ; >Christopherson,, Sean >Subject: Re: [PATCH v2] target/i386: Restore TSX features with taa-no > >On

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

2022-09-02 Thread Chao Peng
On Wed, Aug 31, 2022 at 05:24:39PM +0300, Kirill A . Shutemov wrote: > On Sat, Aug 20, 2022 at 10:15:32PM -0700, Hugh Dickins wrote: > > > I will try next week to rework it as shim to top of shmem. Does it work > > > for you? > > > > Yes, please do, thanks. It's a compromise between us: the

Re: [PATCH 00/20] ppc4xx_sdram QOMify and clean ups

2022-09-02 Thread BALATON Zoltan
On Fri, 2 Sep 2022, Cédric Le Goater wrote: On 9/2/22 10:35, Cédric Le Goater wrote: On 9/1/22 23:02, BALATON Zoltan wrote: On Fri, 19 Aug 2022, BALATON Zoltan wrote: Hello, This is based on gitlab.com/danielhb/qemu/tree/ppc-7.2 Now that the queue is flushed it should apply on master so

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

2022-09-02 Thread Chao Peng
On Wed, Aug 31, 2022 at 10:12:12AM +0100, Fuad Tabba wrote: > > > Moreover, something which was discussed here before [3], is the > > > ability to share in-place. For pKVM/arm64, the conversion between > > > shared and private involves only changes to the stage-2 page tables, > > > which are

Re: [PATCH v2] pci: Assert that capabilities never overlap

2022-09-02 Thread Markus Armbruster
Akihiko Odaki writes: > pci_add_capability appears most PCI devices. Its 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

Re: modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found

2022-09-02 Thread Claudio Fontana
Hi all, modularization of TCG is still incomplete in my view: we need to handle the error case better. If we configure --enable-modules --enable-tcg --enable-kvm , but for some reason the .so is not present or is not loaded successfully, and kvm fails to be enabled (for example, /dev/kvm not

Re: [PATCH v2 0/8] AArch64/HMAT support and tests

2022-09-02 Thread Hesham Almatary via
Hello Michael, On 7/26/2022 4:04 PM, Michael S. Tsirkin wrote: On Tue, Jul 19, 2022 at 10:49:42AM +0100, Hesham Almatary wrote: This patchset adds support for AArch64/HMAT including a test. It relies on other two patch sets from: Brice Goglin: to support -numa without initiators on q35/x86.

[PATCH 6/6] parallels: Image repairing in parallels_open()

2022-09-02 Thread Alexander Ivanov
Repair an image at opening if the image is unclean or out-of-image corruption was detected. Signed-off-by: Alexander Ivanov --- block/parallels.c | 95 --- 1 file changed, 65 insertions(+), 30 deletions(-) diff --git a/block/parallels.c

[PATCH 4/6] parallels: Use highest_offset() helper in leak check

2022-09-02 Thread Alexander Ivanov
Deduplicate code by using highest_offset() helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 339ce45634..688aa081e2 100644 --- a/block/parallels.c +++

[PATCH 5/6] parallels: Replace fprintf by qemu_log

2022-09-02 Thread Alexander Ivanov
Use a standard QEMU function for logging. Signed-off-by: Alexander Ivanov --- block/parallels.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 688aa081e2..08526196da 100644 --- a/block/parallels.c +++

[PATCH 1/6] parallels: Incorrect data end calculation in parallels_open()

2022-09-02 Thread Alexander Ivanov
The BDRVParallelsState structure contains data_end field that is measured in sectors. In parallels_open() initially this field is set by data_off field from parallels image header. According to the parallels format documentation, data_off field contains an offset, in sectors, from the start of

[PATCH 0/6] parallels: Add duplication check, repair at open, fix bugs

2022-09-02 Thread Alexander Ivanov
This patchset is based on git: https://src.openvz.org/~den/qemu.git parallels Fix incorrect data end calculation in parallels_open(). Add parallels_handle_leak() and highest_offset() helpers. Add checking and repairing duplicate offsets in BAT. Deduplicate highest offset calculation. Replace

[PATCH 3/6] parallels: Add checking and repairing duplicate offsets in BAT

2022-09-02 Thread Alexander Ivanov
Cluster offsets must be unique among all BAT entries. Find duplicate offsets in the BAT. If a duplicated offset is found fix it by copying the content of the relevant cluster to a new allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to

[PATCH 2/6] parallels: Create parallels_handle_leak() to truncate excess clusters

2022-09-02 Thread Alexander Ivanov
This helper will be reused in the next patch for duplications check. Signed-off-by: Alexander Ivanov --- block/parallels.c | 65 +++ 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

Re: [Qemu-devel] [RFC PATCH] Add qemu .clang-format

2022-09-02 Thread Daniel P . Berrangé
On Thu, Sep 01, 2022 at 12:55:36PM +0100, Alex Bennée wrote: > > "Wang, Lei" writes: > > > On 9/1/2022 4:12 PM, Daniel P. Berrangé wrote: > >> On Thu, Sep 01, 2022 at 09:08:33AM +0800, Wang, Lei wrote: > >>> On 8/31/2022 6:39 PM, Daniel P. Berrangé wrote: > On Wed, Aug 31, 2022 at

Re: [PATCH 0/2] expose host-phys-bits to guest

2022-09-02 Thread Gerd Hoffmann
Hi, > I feel there are three major sources of controversy here > > 0. the cover letter and subject don't do such a good job >explaining that what we are doing is just telling guest >CPUID is not broken. we are not exposing anything new >and not exposing host capability to guest,

Re: [PATCH 00/20] ppc4xx_sdram QOMify and clean ups

2022-09-02 Thread Cédric Le Goater
On 9/2/22 10:35, Cédric Le Goater wrote: On 9/1/22 23:02, BALATON Zoltan wrote: On Fri, 19 Aug 2022, BALATON Zoltan wrote: Hello, This is based on gitlab.com/danielhb/qemu/tree/ppc-7.2 Now that the queue is flushed it should apply on master so I will take a look (most likely next week)

  1   2   >