Re: [PATCH 5/5] hw/core: Remove uses of QERR_INVALID_PARAMETER_VALUE

2021-11-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > QERR_INVALID_PARAMETER_VALUE definition is obsolete since 2015 > (commit 4629ed1e989, "qerror: Finally unused, clean up"). > Replace the definitions used in hw/core/. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/qdev-properties-system.c | 2 +- >

[PATCH v4 1/3] qtest/libqos: add a function to initialize secondary PCI buses

2021-11-19 Thread Laurent Vivier
Scan the PCI devices to find bridge and set PCI_SECONDARY_BUS and PCI_SUBORDINATE_BUS (algorithm from seabios) Signed-off-by: Laurent Vivier --- include/hw/pci/pci_bridge.h | 8 +++ tests/qtest/libqos/pci.c| 118 tests/qtest/libqos/pci.h| 1 + 3

[PATCH v4 2/3] tests/qtest: add some tests for virtio-net failover

2021-11-19 Thread Laurent Vivier
Add test cases to test several error cases that must be generated by invalid failover configuration. Add a combination of coldplug and hotplug test cases to be sure the primary is correctly managed according the presence or not of the STANDBY feature. Signed-off-by: Laurent Vivier ---

[PATCH-for-6.2? v2 1/3] docs: Spell QEMU all caps

2021-11-19 Thread Philippe Mathieu-Daudé
QEMU should be written all caps. Normally checkpatch.pl warns when it is not (see commit 9964d8f9422: "checkpatch: Add QEMU specific rule"). Replace Qemu -> QEMU. Reviewed-by: Darren Kenny Reviewed-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- docs/devel/modules.rst

[PATCH-for-6.2? v2 2/3] misc: Spell QEMU all caps

2021-11-19 Thread Philippe Mathieu-Daudé
QEMU should be written all caps. Normally checkpatch.pl warns when it is not (see commit 9964d8f9422: "checkpatch: Add QEMU specific rule"). Replace Qemu -> QEMU. Signed-off-by: Philippe Mathieu-Daudé --- qapi/block-core.json | 2 +- python/qemu/machine/machine.py |

Re: [PULL 0/3] Net patches

2021-11-19 Thread Richard Henderson
On 11/19/21 5:03 AM, Jason Wang wrote: The following changes since commit 44a3aa0608f01274418487b655d42467c1d8334e: Merge tag 'sev-hashes-pull-request' of https://gitlab.com/berrange/qemu into staging (2021-11-18 15:06:05 +0100) are available in the git repository at:

Re: [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) VGA devices

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 10:58, Thomas Huth wrote: > On 19/11/2021 10.49, Philippe Mathieu-Daudé wrote: >> On 11/19/21 09:21, Mark Cave-Ayland wrote: >>> On 18/11/2021 19:20, Philippe Mathieu-Daudé wrote: >>> Commit 7852a77f598 fixed creating multiple TYPE_ISA_VGA devices, generalize the fix to all

[PATCH 1/3] virtio-net: Fix indentation

2021-11-19 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index f2014d5ea0..004acf858f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3501,7 +3501,7 @@ static void

Re: [PATCH 0/5] hw/core: Remove uses of obsolete QERR_ definitions

2021-11-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > QERR_ definitions are obsolete since 2015... Remove their > uses in hw/core/. Eleven down, 220 to go. Thanks!

Re: [PATCH 3/7] python/machine: add instance disambiguator to default nickname

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/18/21 21:46, John Snow wrote: > If you create two instances of QEMUMachine(), they'll both create the > same nickname by default -- which is not that helpful. > > Luckily, they'll both create unique temporary directories ... but due to > user configuration, they may share logging and

[PATCH v5 2/4] tests/qtest: add some tests for virtio-net failover

2021-11-19 Thread Laurent Vivier
Add test cases to test several error cases that must be generated by invalid failover configuration. Add a combination of coldplug and hotplug test cases to be sure the primary is correctly managed according the presence or not of the STANDBY feature. Signed-off-by: Laurent Vivier ---

[PATCH v5 1/4] qtest/libqos: add a function to initialize secondary PCI buses

2021-11-19 Thread Laurent Vivier
Scan the PCI devices to find bridge and set PCI_SECONDARY_BUS and PCI_SUBORDINATE_BUS (algorithm from seabios) Signed-off-by: Laurent Vivier --- include/hw/pci/pci_bridge.h | 8 +++ tests/qtest/libqos/pci.c| 118 tests/qtest/libqos/pci.h| 1 + 3

Re: [qemu-web PATCH] Update URLs of "SubmitAPatch" wiki doc

2021-11-19 Thread Paolo Bonzini
On 11/18/21 18:00, Kashyap Chamarthy wrote: We've recently converted[1] the "SubmitAPatch" page from Wiki to in-tree docs. So update the website to reflect this. [1] https://gitlab.com/qemu-project/qemu/-/commit/9f73de8df03 -- 9f73de8df0 (docs: rSTify the "SubmitAPatch" wiki, 2021-11-10)

Re: [PATCH v2 1/3] target/ppc: Fixed call to deferred exception

2021-11-19 Thread Richard Henderson
On 11/18/21 2:25 PM, Lucas Mateus Castro (alqotel) wrote: +if ((fpscr & FP_VXSOFT) && (fpscr_ve != 0)) { +error = POWERPC_EXCP_FP_VXSOFT; +} else if ((fpscr & FP_OX) && (fpscr & FP_OE)) { +error = POWERPC_EXCP_FP_OX; +} else if ((fpscr & FP_UX) && (fpscr & FP_UE)) { +

Re: [PATCH-for-6.2 2/2] hw/display: Do not allow multiple identical VGA devices

2021-11-19 Thread Paolo Bonzini
On 11/18/21 20:20, Philippe Mathieu-Daudé wrote: +if (obj) { +const char *typename = object_get_typename(obj); + +/* + * make sure this device is not being added twice, + * if so exit without crashing qemu + */ +if (object_resolve_path_type("",

Re: [PATCH v1] chardev/wctable: don't free the instance in wctablet_chr_finalize

2021-11-19 Thread Paolo Bonzini
On 11/17/21 15:51, Marc-André Lureau wrote: Hi On Wed, Nov 17, 2021 at 6:25 PM Daniil Tatianin wrote: Object is supposed to be freed by invoking obj->free, and not obj->instance_finalize. This would lead to use-after-free followed by double free in object_unref/object_finalize.

[PATCH 3/3] virtio-net: Fix log message

2021-11-19 Thread Eugenio Pérez
The message has never been true in the case of non tap networking, so only tell that userland networking will be used if possible. Signed-off-by: Eugenio Pérez --- hw/net/virtio-net.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/net/virtio-net.c

Re: [PATCH v4 00/25] block layer: split block APIs in global state and I/O

2021-11-19 Thread Emanuele Giuseppe Esposito
On 19/11/2021 04:13, Paolo Bonzini wrote: El jue., 18 nov. 2021 16:31, Hanna Reitz > escribió: On 18.11.21 14:50, Paolo Bonzini wrote: > On 11/15/21 17:03, Hanna Reitz wrote: >> >> I only really see four solutions for this: >> (1) We

Re: [PATCH 3/5] hw/core: Remove uses of QERR_DEVICE_NO_HOTPLUG

2021-11-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > QERR_DEVICE_NO_HOTPLUG definition is obsolete since 2015 (commit > 4629ed1e989, "qerror: Finally unused, clean up"). Replace the two > uses and drop the definition. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qapi/qmp/qerror.h | 3 --- >

[PULL for-6.2 0/3] hw/nvme fixes

2021-11-19 Thread Klaus Jensen
From: Klaus Jensen Hi, The following changes since commit 44a3aa0608f01274418487b655d42467c1d8334e: Merge tag 'sev-hashes-pull-request' of https://gitlab.com/berrange/qemu into staging (2021-11-18 15:06:05 +0100) are available in the Git repository at:

[PATCH v5 3/4] failover: fix unplug pending detection

2021-11-19 Thread Laurent Vivier
Failover needs to detect the end of the PCI unplug to start migration after the VFIO card has been unplugged. To do that, a flag is set in pcie_cap_slot_unplug_request_cb() and reset in pcie_unplug_device(). But since 17858a169508 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35") we

Re: [PATCH-for-6.2?] docs: Spell QEMU all caps

2021-11-19 Thread Paolo Bonzini
On 11/18/21 15:34, Philippe Mathieu-Daudé wrote: Replace Qemu -> QEMU. Signed-off-by: Philippe Mathieu-Daudé --- docs/devel/modules.rst| 2 +- docs/devel/multi-thread-tcg.rst | 2 +- docs/devel/style.rst | 2 +- docs/devel/ui.rst

[PATCH v5 4/4] tests/libqtest: update virtio-net failover test

2021-11-19 Thread Laurent Vivier
Update the migration test to check we correctly wait the end of the card unplug before doing the migration. Signed-off-by: Laurent Vivier --- tests/qtest/virtio-net-failover.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/tests/qtest/virtio-net-failover.c

[PATCH-for-6.2? v2 3/3] qga: Spell QEMU all caps

2021-11-19 Thread Philippe Mathieu-Daudé
QEMU should be written all caps. Normally checkpatch.pl warns when it is not (see commit 9964d8f9422: "checkpatch: Add QEMU specific rule"). Replace Qemu -> QEMU, update the error message to use the more descriptive "Guest Agent" name instead of "GA". Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH-for-6.2?] docs: Spell QEMU all caps

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 10:17, Paolo Bonzini wrote: > On 11/18/21 15:34, Philippe Mathieu-Daudé wrote: >> Replace Qemu -> QEMU. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>   docs/devel/modules.rst    |  2 +- >>   docs/devel/multi-thread-tcg.rst   |  2 +- >>   docs/devel/style.rst

Re: [PATCH v2 2/3] target/ppc: ppc_store_fpscr doesn't update bit 52

2021-11-19 Thread Richard Henderson
On 11/18/21 2:25 PM, Lucas Mateus Castro (alqotel) wrote: +/* FPSCR bits that can be set by mtfsf, mtfsfi and mtfsb1 */ +#define FPSCR_MTFS_MASK (~((1ull << 11) | FP_VX | FP_FEX)) If you're going to make the reserved bit 52 read-as-zero-writes-ignored, you should do the same for reserved bits

Re: [PATCH v2 1/3] target/ppc: Fixed call to deferred exception

2021-11-19 Thread Richard Henderson
On 11/19/21 10:24 AM, Cédric Le Goater wrote: +    } else if ((fpscr & FP_VXVC) && (fpscr_ve != 0)) { +    error = POWERPC_EXCP_FP_VXVC; +    } Is there a defined order for these in the manual?  I couldn't find it quickly if so.  If there is no defined order, I think you should test VE

Re: [PATCH v5 3/6] net/vmnet: implement shared mode (vmnet-shared)

2021-11-19 Thread Vladislav Yaroshchuk
пт, 19 нояб. 2021 г. в 05:57, Jason Wang : > On Fri, Nov 19, 2021 at 1:12 AM Vladislav Yaroshchuk > wrote: > > > > > > > > пн, 15 нояб. 2021 г. в 07:47, Jason Wang : > >> > >> On Fri, Nov 12, 2021 at 5:14 PM Vladislav Yaroshchuk > >> wrote: > >> > > >> > Signed-off-by: Phillip Tennen > >> >

[PATCH 0/3] vdpa: Fix SIGSEGV on failed vdpa devices

2021-11-19 Thread Eugenio Pérez
Qemu falls back on userland handlers even if vhost-user and vhost-vdpa cases. These assumes a tap device can handle the packets. If a vdpa device fail to start, it can trigger a sigsegv because of that. Add dummy receivers that return no progress so it can keep running. Tested with a modified

[PULL for-6.2 3/3] hw/nvme: fix buffer overrun in nvme_changed_nslist (CVE-2021-3947)

2021-11-19 Thread Klaus Jensen
From: Klaus Jensen Fix missing offset verification. Cc: qemu-sta...@nongnu.org Cc: Philippe Mathieu-Daudé Reported-by: Qiuhao Li Fixes: f432fdfa121 ("support changed namespace asynchronous event") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 5 +

Re: [PATCH] ui/gtk: mon_num parameter to specify target monitor for launching Qemu

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/18/21 23:51, Dongwon Kim wrote: > Introducing a new integer parameter to specify the monitor where the > Qemu window is placed upon launching. > > Monitor index can start from 0 to (total number of monitors - 1). > Default value for the parameter is -1, which doesn't affect anything. > >

Re: [PATCH v2 1/2] iotests: Use aes-128-cbc

2021-11-19 Thread Thomas Huth
On 17/11/2021 16.17, Hanna Reitz wrote: Our gnutls crypto backend (which is the default as of 8bd0931f6) supports neither twofish-128 nor the CTR mode. CBC and aes-128 are supported by all of our backends (as far as I can tell), so use aes-128-cbc in our iotests. (We could also use e.g.

Re: [PATCH v4 0/3] tests/qtest: add some tests for virtio-net failover

2021-11-19 Thread Laurent Vivier
Hi, I did something wrong and the last patch adding the test has been removed from the series. I'm going to send a v5 with the test added correctly. Sorry for the noise. Laurent On 19/11/2021 09:49, Laurent Vivier wrote: This series adds a qtest entry to test virtio-net failover feature.

[PATCH v5 0/4] tests/qtest: add some tests for virtio-net failover

2021-11-19 Thread Laurent Vivier
This series adds a qtest entry to test virtio-net failover feature. We check following error cases: - check missing id on device with failover_pair_id triggers an error - check a primary device plugged on a bus that doesn't support hotplug triggers an error We check the status of the machine

Re: [PATCH v2 1/3] target/ppc: Fixed call to deferred exception

2021-11-19 Thread Cédric Le Goater
On 11/19/21 10:18, Richard Henderson wrote: On 11/18/21 2:25 PM, Lucas Mateus Castro (alqotel) wrote: +    if ((fpscr & FP_VXSOFT) && (fpscr_ve != 0)) { +    error = POWERPC_EXCP_FP_VXSOFT; +    } else if ((fpscr & FP_OX) && (fpscr & FP_OE)) { +    error = POWERPC_EXCP_FP_OX; +    }

Re: [PATCH] ui/gtk: mon_num parameter to specify target monitor for launching Qemu

2021-11-19 Thread Paolo Bonzini
On 11/18/21 23:51, Dongwon Kim wrote: +# @mon-num: Indicate monitor where Qemu window is lauched. mon-num +# could be any number from -1 to (total num of monitors - 1). +# (default: -1: use default monitor) +# since 6.2 There is no need to accept

Re: [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) VGA devices

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 09:21, Mark Cave-Ayland wrote: > On 18/11/2021 19:20, Philippe Mathieu-Daudé wrote: > >> Commit 7852a77f598 fixed creating multiple TYPE_ISA_VGA devices, >> generalize the fix to all VGA devices. >> >> See https://gitlab.com/qemu-project/qemu/-/issues/44 >> >> Philippe Mathieu-Daudé

Other pages for docs/devel/ [Was: Re: ... Update URLs of "SubmitAPatch" ...]

2021-11-19 Thread Kashyap Chamarthy
On Fri, Nov 19, 2021 at 10:09:27AM +0100, Paolo Bonzini wrote: [...] > Hi, I'm applying instead > https://lore.kernel.org/r/2028074702.216951-2-pbonzini%40redhat.com > (sorry, you couldn't know of the magic redirect since that's done directly > on shell.qemu.org's Apache configuration). Ah,

Re: [PATCH for-6.2] Fix some typos in documentation (found by codespell)

2021-11-19 Thread Stefan Weil
Am 18.11.21 um 00:27 schrieb Philippe Mathieu-Daudé: On 11/17/21 22:07, Stefan Weil wrote: Signed-off-by: Stefan Weil --- docs/devel/multi-process.rst| 2 +- docs/devel/qgraph.rst | 2 +- docs/devel/writing-monitor-commands.rst | 2 +- docs/hyperv.txt

[PATCH 2/3] vdpa: Add dummy receive callbacks

2021-11-19 Thread Eugenio Pérez
Qemu falls back on userland handlers even if vhost-user and vhost-vdpa cases. These assumes a tap device can handle the packets. If a vdpa device fail to start, it can trigger a sigsegv because of that. Add dummy receivers that return no progress so it can keep running. Fixes: 1e0a84ea49

[PATCH for-6.2] hw/misc/sifive_u_otp: Use IF_PFLASH for the OTP device instead of IF_NONE

2021-11-19 Thread Thomas Huth
Configuring a drive with "if=none" is meant for creation of a backend only, it should not get automatically assigned to a device frontend. Use "if=pflash" for the One-Time-Programmable device instead (like it is e.g. also done for the efuse device in hw/arm/xlnx-zcu102.c). Since the old way of

Re: [PATCH 2/5] hw/core: Remove use of QERR_FEATURE_DISABLED

2021-11-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > QERR_FEATURE_DISABLED definition is obsolete since 2015 (commit > 4629ed1e989, "qerror: Finally unused, clean up"). Replace it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/machine-qmp-cmds.c | 3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) VGA devices

2021-11-19 Thread Mark Cave-Ayland
On 18/11/2021 19:20, Philippe Mathieu-Daudé wrote: Commit 7852a77f598 fixed creating multiple TYPE_ISA_VGA devices, generalize the fix to all VGA devices. See https://gitlab.com/qemu-project/qemu/-/issues/44 Philippe Mathieu-Daudé (2): hw/display: Add Error* handle to vga_common_init()

Re: [PATCH v1 0/9] hw/mos6522: VIA timer emulation fixes and improvements

2021-11-19 Thread Finn Thain
On Thu, 18 Nov 2021, Mark Cave-Ayland wrote: > > Hi Finn, > > I've not forgotten about this series - we're now in 6.2 freeze, but it's > on my TODO list to revisit in the next development cycle this along with > the ESP stress-ng changes which I've also been looking at. As mentioned > in my

[PATCH v4 3/3] failover: fix unplug pending detection

2021-11-19 Thread Laurent Vivier
Failover needs to detect the end of the PCI unplug to start migration after the VFIO card has been unplugged. To do that, a flag is set in pcie_cap_slot_unplug_request_cb() and reset in pcie_unplug_device(). But since 17858a169508 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35") we

Re: [PATCH] nvmm: Fix support for stable version

2021-11-19 Thread Paolo Bonzini
On 11/18/21 16:50, nia wrote: Ping? It would be very nice if this could make it into 6.2 so we don't have to continue patching around this. Queued, thanks. Paolo

Re: [PATCH for-6.2 0/2] esp: add fix for reset before transfer

2021-11-19 Thread Paolo Bonzini
On 11/18/21 11:03, Mark Cave-Ayland wrote: This is the fix for Gitlab issue #724 discovered by fuzzing which I think is worth including in 6.2 for 2 reasons: firstly the fix is to zero out an extra field during chip reset which normally only occurs during driver initialisation and durring IO

Re: Chardev: delete the QemuOpts reserved in vm_config_groups

2021-11-19 Thread Paolo Bonzini
On 11/8/21 09:46, Marc-André Lureau wrote: + QemuOpts *opts; chr = qemu_chr_find(id); if (chr == NULL) { @@ -1175,6 +1177,10 @@ void qmp_chardev_remove(const char *id, Error **errp) return; } object_unparent(OBJECT(chr)); +/* delete the opts reserved in

Re: [PATCH v2 for-6.2] meson.build: Support ncurses on MacOS and OpenBSD

2021-11-19 Thread Paolo Bonzini
On 11/17/21 21:53, Stefan Weil wrote: MacOS provides header files for curses 5.7 with support for wide characters, but requires _XOPEN_SOURCE_EXTENDED=1 to activate that. By default those old header files are used even if there is a newer Homebrew installation of ncurses 6.2 available. Change

[Ping] [PATCH v1 0/2] vl: flush all task from rcu queue before exiting

2021-11-19 Thread Denis Plotnikov
Ping! On 15.11.2021 12:41, Denis Plotnikov wrote: v1 -> v0: * move monitor cleanup to the very end of qemu cleanup [Paolo] The goal is to notify management layer about device destruction on qemu shutdown. Without this series DEVICE_DELETED event may not be sent because of stuck tasks in the

Re: [PATCH-for-6.2 2/2] hw/display: Do not allow multiple identical VGA devices

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 10:20, Paolo Bonzini wrote: > On 11/18/21 20:20, Philippe Mathieu-Daudé wrote: >> +    if (obj) { >> +    const char *typename = object_get_typename(obj); >> + >> +    /* >> + * make sure this device is not being added twice, >> + * if so exit without crashing

?????? Chardev: delete the QemuOpts reserved in vm_config_groups

2021-11-19 Thread ????????????
OK, thank you Paolo! I will write achar_unparent as your comment. Wind Yu ---- ??: "Paolo Bonzini"

Re: [PATCH v2 3/3] test/tcg/ppc64le: test mtfsf

2021-11-19 Thread Richard Henderson
On 11/18/21 2:25 PM, Lucas Mateus Castro (alqotel) wrote: +void sigfpe_handler(int sig, siginfo_t *si, void *ucontext) +{ +exit(0); +} It would be good to verify si->si_code = FPE_FLTINV, Otherwise, Reviewed-by: Richard Henderson r~

Re: [PULL 02/22] arm: tcg: Adhere to SMCCC 1.3 section 5.2

2021-11-19 Thread Alexander Graf
On 18.11.21 22:57, Peter Maydell wrote: On Thu, 30 Sept 2021 at 16:12, Peter Maydell wrote: From: Alexander Graf The SMCCC 1.3 spec section 5.2 says The Unknown SMC Function Identifier is a sign-extended value of (-1) that is returned in the R0, W0 or X0 registers. An implementation

Re: [PATCH for-6.2] hw/misc/sifive_u_otp: Use IF_PFLASH for the OTP device instead of IF_NONE

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 11:25, Thomas Huth wrote: > Configuring a drive with "if=none" is meant for creation of a backend > only, it should not get automatically assigned to a device frontend. > Use "if=pflash" for the One-Time-Programmable device instead (like > it is e.g. also done for the efuse device in

[PULL for-6.2 1/3] hw/nvme: reattach subsystem namespaces on hotplug

2021-11-19 Thread Klaus Jensen
From: Hannes Reinecke With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") namespaces get moved from the controller to the subsystem if one is specified. That keeps the namespaces alive after a controller hot-unplug, but after a controller hotplug we have to reconnect the namespaces

[PULL for-6.2 2/3] hw/nvme: change nvme-ns 'shared' default

2021-11-19 Thread Klaus Jensen
From: Klaus Jensen Change namespaces to be shared namespaces by default (parameter shared=on). Keep shared=off for older machine types. Reviewed-by: Keith Busch Signed-off-by: Klaus Jensen --- docs/system/devices/nvme.rst | 24 ++-- hw/core/machine.c| 1 +

[PATCH v4 0/3] tests/qtest: add some tests for virtio-net failover

2021-11-19 Thread Laurent Vivier
This series adds a qtest entry to test virtio-net failover feature. We check following error cases: - check missing id on device with failover_pair_id triggers an error - check a primary device plugged on a bus that doesn't support hotplug triggers an error We check the status of the machine

Re: [PATCH v4 08/25] block: introduce assert_bdrv_graph_writable

2021-11-19 Thread Emanuele Giuseppe Esposito
On 18/11/2021 16:17, Hanna Reitz wrote: On 18.11.21 10:55, Emanuele Giuseppe Esposito wrote: On 12/11/2021 15:40, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: We want to be sure that the functions that write the child and parent list of a bs are under BQL and

[PATCH-for-6.2? v2 0/3] misc: Spell QEMU all caps

2021-11-19 Thread Philippe Mathieu-Daudé
Replace Qemu -> QEMU. Supersedes: <2028143401.4101497-1-phi...@redhat.com> Philippe Mathieu-Daudé (3): docs: Spell QEMU all caps misc: Spell QEMU all caps qga: Spell QEMU all caps docs/devel/modules.rst | 2 +- docs/devel/multi-thread-tcg.rst| 2 +-

Re: [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) VGA devices

2021-11-19 Thread Thomas Huth
On 19/11/2021 10.49, Philippe Mathieu-Daudé wrote: On 11/19/21 09:21, Mark Cave-Ayland wrote: On 18/11/2021 19:20, Philippe Mathieu-Daudé wrote: Commit 7852a77f598 fixed creating multiple TYPE_ISA_VGA devices, generalize the fix to all VGA devices. See

Re: [PATCH-for-6.2 2/2] hw/display: Do not allow multiple identical VGA devices

2021-11-19 Thread Daniel P . Berrangé
On Thu, Nov 18, 2021 at 08:20:20PM +0100, Philippe Mathieu-Daudé wrote: > vga_common_init() create a MemoryRegion named "vga.vram", > used as a singleton for the device class. When creating > the same device type multiple times, we get: > > $ qemu-system-mips64 -M pica61 -device isa-cirrus-vga

[RFC PATCH-for-6.2?] hw/misc/sifive_u_otp: Do not reset OTP content on hardware reset

2021-11-19 Thread Philippe Mathieu-Daudé
Once a "One Time Programmable" is programmed, it shouldn't be reset. Do not re-initialize the OTP content in the DeviceReset handler, initialize it once in the DeviceRealize one. Fixes: 9fb45c62ae8 ("riscv: sifive: Implement a model for SiFive FU540 OTP") Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH for-6.2] hw/misc/sifive_u_otp: Use IF_PFLASH for the OTP device instead of IF_NONE

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 12:02, Thomas Huth wrote: > On 19/11/2021 11.40, Philippe Mathieu-Daudé wrote: >> On 11/19/21 11:25, Thomas Huth wrote: >>> Configuring a drive with "if=none" is meant for creation of a backend >>> only, it should not get automatically assigned to a device frontend. >>> Use "if=pflash"

Re: [PATCH 3/5] hw/core: Remove uses of QERR_DEVICE_NO_HOTPLUG

2021-11-19 Thread Damien Hedde
On 11/19/21 09:20, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: QERR_DEVICE_NO_HOTPLUG definition is obsolete since 2015 (commit 4629ed1e989, "qerror: Finally unused, clean up"). Replace the two uses and drop the definition. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH 1/7] python/machine: add @sock_dir property

2021-11-19 Thread Willian Rampazzo
On Thu, Nov 18, 2021 at 5:50 PM John Snow wrote: > > Analogous to temp_dir and log_dir, add a sock_dir property that defaults > to @temp_dir -- instead of base_temp_dir -- when the user hasn't > overridden the sock dir value in the initializer. > > This gives us a much more unique directory to

Re: [PATCH 3/7] python/machine: add instance disambiguator to default nickname

2021-11-19 Thread Willian Rampazzo
On Thu, Nov 18, 2021 at 5:49 PM John Snow wrote: > > If you create two instances of QEMUMachine(), they'll both create the > same nickname by default -- which is not that helpful. > > Luckily, they'll both create unique temporary directories ... but due to > user configuration, they may share

Re: [PATCH for-6.2] hw/misc/sifive_u_otp: Use IF_PFLASH for the OTP device instead of IF_NONE

2021-11-19 Thread Alistair Francis
On Fri, Nov 19, 2021 at 8:27 PM Thomas Huth wrote: > > Configuring a drive with "if=none" is meant for creation of a backend > only, it should not get automatically assigned to a device frontend. > Use "if=pflash" for the One-Time-Programmable device instead (like > it is e.g. also done for the

[RFC PATCH 2/2] ppc: Add PVRs for the MPC7450 family

2021-11-19 Thread Fabiano Rosas
This allows the processors from the 7450 family to pass the initial PVR verification. Enables 7441, 7445, 7447, 7447a, 7448, 7450, 7451, 7455, 7457 and 7457a. Signed-off-by: Fabiano Rosas --- arch/ppc/qemu/init.c | 52 1 file changed, 52

[RFC v2 PATCH 04/13] KVM: Add fd-based memslot data structure and utils

2021-11-19 Thread Chao Peng
For fd-based memslot store the file references for shared fd and the private fd (if any) in the memslot structure. Since there is no 'hva' concept we cannot call hva_to_pfn() to get a pfn, instead kvm_memfd_ops is added to get_pfn/put_pfn from the memory backing stores that provide these fds.

[RFC v2 PATCH 07/13] KVM: Handle page fault for fd based memslot

2021-11-19 Thread Chao Peng
Current code assume the private memory is persistent and KVM can check with backing store to see if private memory exists at the same address by calling get_pfn(alloc=false). Signed-off-by: Yu Zhang Signed-off-by: Chao Peng --- arch/x86/kvm/mmu/mmu.c | 75

[RFC v2 PATCH 05/13] KVM: Implement fd-based memory using new memfd interfaces

2021-11-19 Thread Chao Peng
This patch pairs a fd-based memslot to a memory backing store. Two sides handshake to exchange callbacks that will be called later. KVM->memfd: - get_pfn: get or allocate(when alloc is true) page at specified offset in the fd, the page will be locked - put_pfn: put and unlock the pfn

[PATCH] tests/avocado: ppc: Add smoke tests for MPC7400 and MPC7450 families

2021-11-19 Thread Fabiano Rosas
These tests ensure that our emulation for these cpus is not completely broken and we can at least run OpenBIOS on them. $ make check-avocado AVOCADO_TESTS=../tests/avocado/ppc_74xx.py Signed-off-by: Fabiano Rosas --- Note that the 7450s are currently broken, depending on the fix for

[PULL 2/7] nvmm: Fix support for stable version

2021-11-19 Thread Paolo Bonzini
From: nia NVMM user version 1 is the version being shipped with netbsd-9, which is the most recent stable branch of NetBSD. This makes it possible to use the NVMM accelerator on the most recent NetBSD release, 9.2, which lacks nvmm_cpu_stop. (CC'ing maintainers) Signed-off-by: Nia Alarie

[PULL 0/7] Misc bugfixes for 2021-11-19

2021-11-19 Thread Paolo Bonzini
The following changes since commit 42f6c9179be4401974dd3a75ee72defd16b5092d: Merge tag 'pull-ppc-2022' of https://github.com/legoater/qemu into staging (2021-11-12 12:28:25 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

[PULL 5/7] docs: Spell QEMU all caps

2021-11-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Replace Qemu -> QEMU. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Darren Kenny Reviewed-by: Markus Armbruster Message-Id: <2028143401.4101497-1-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- docs/devel/modules.rst| 2 +-

[PULL 7/7] chardev/wctable: don't free the instance in wctablet_chr_finalize

2021-11-19 Thread Paolo Bonzini
From: Daniil Tatianin Object is supposed to be freed by invoking obj->free, and not obj->instance_finalize. This would lead to use-after-free followed by double free in object_unref/object_finalize. Signed-off-by: Daniil Tatianin Reviewed-by: Marc-André Lureau Message-Id:

Re: [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) VGA devices

2021-11-19 Thread Thomas Huth
On 19/11/2021 11.17, Philippe Mathieu-Daudé wrote: On 11/19/21 10:58, Thomas Huth wrote: On 19/11/2021 10.49, Philippe Mathieu-Daudé wrote: On 11/19/21 09:21, Mark Cave-Ayland wrote: On 18/11/2021 19:20, Philippe Mathieu-Daudé wrote: Commit 7852a77f598 fixed creating multiple TYPE_ISA_VGA

[PATCH-for-6.2] qom/object: Ignore global properties with empty name

2021-11-19 Thread Philippe Mathieu-Daudé
When using -global, properties might have empty name/value. This fixes this legitimate use case: $ qemu-system-x86_64 -global driver=isa-fdc qemu-system-x86_64: ../../devel/qemu/qapi/string-input-visitor.c:394: string_input_visitor_new: Assertion `str' failed. Aborted (core dumped)

Re: [PATCH 4/7] python/machine: move more variable initializations to _pre_launch

2021-11-19 Thread Willian Rampazzo
On Thu, Nov 18, 2021 at 5:51 PM John Snow wrote: > > No need to clear them only to set them later. > > Signed-off-by: John Snow > --- > python/qemu/machine/machine.py | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > Reviewed-by: Willian Rampazzo

Re: [PATCH v4 17/20] target/riscv: Fix check range for first fault only

2021-11-19 Thread Alistair Francis
On Fri, Nov 12, 2021 at 2:05 AM LIU Zhiwei wrote: > > Only check the range that has passed the address translation. > > Signed-off-by: LIU Zhiwei > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/vector_helper.c | 4 ++-- > 1 file changed, 2

Re: [PATCH v4 00/20] Support UXL filed in xstatus

2021-11-19 Thread Alistair Francis
On Fri, Nov 12, 2021 at 1:52 AM LIU Zhiwei wrote: > > In this patch set, we process the pc reigsters writes, > gdb reads and writes, and address calculation under > different UXLEN settings. Awesome! Do you have steps on how to test this? Alistair > > The patch set v4 mainly address Richard

Re: [RFC PATCH v3 1/5] rename MachineInitPhase enum constants for QAPI compatibility

2021-11-19 Thread Alistair Francis
On Thu, Nov 18, 2021 at 12:49 AM Damien Hedde wrote: > > From: Mirela Grujic > > This commit is a preparation to switch to a QAPI definition > of the MachineInitPhase enum. > > QAPI will generate enumeration constants prefixed with the > MACHINE_INIT_PHASE_, so rename values accordingly. > >

[RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-19 Thread Chao Peng
From: "Kirill A. Shutemov" The new seal type provides semantics required for KVM guest private memory support. A file descriptor with the seal set is going to be used as source of guest memory in confidential computing environments such as Intel TDX and AMD SEV. F_SEAL_GUEST can only be set on

[RFC v2 PATCH 02/13] KVM: Add KVM_EXIT_MEMORY_ERROR exit

2021-11-19 Thread Chao Peng
This new exit allows userspace to handle memory related error. It will be used for shared memory <-->private memory conversion. Signed-off-by: Yu Zhang Signed-off-by: Chao Peng --- include/uapi/linux/kvm.h | 15 +++ 1 file changed, 15 insertions(+) diff --git

[RFC v2 PATCH 13/13] KVM: Enable memfd based page invalidation/fallocate

2021-11-19 Thread Chao Peng
Since the memory backing store does not get notified when VM is destroyed so need check if VM is still live in these callbacks. Signed-off-by: Yu Zhang Signed-off-by: Chao Peng --- virt/kvm/memfd.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/virt/kvm/memfd.c

[RFC v2 PATCH 10/13] KVM: Match inode for invalidation of fd-based slot

2021-11-19 Thread Chao Peng
Different fd/priv_fd can have the same userspace_addr so start/end is meaningful only when they are used together with fd/priv_fd. Signed-off-by: Yu Zhang Signed-off-by: Chao Peng --- virt/kvm/kvm_main.c | 13 + 1 file changed, 13 insertions(+) diff --git a/virt/kvm/kvm_main.c

[RFC v2 PATCH 06/13] KVM: Register/unregister memfd backed memslot

2021-11-19 Thread Chao Peng
Signed-off-by: Yu Zhang Signed-off-by: Chao Peng --- virt/kvm/kvm_main.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 271cef8d1cd0..b8673490d301 100644 --- a/virt/kvm/kvm_main.c +++

Re: [PULL 02/22] arm: tcg: Adhere to SMCCC 1.3 section 5.2

2021-11-19 Thread Peter Maydell
On Fri, 19 Nov 2021 at 10:35, Alexander Graf wrote: > Ugh :(. Conceptually, once you tell QEMU to handle PSCI, you're > basically giving up that EL to it. It sounds almost as if what these > boards (imx6ul + highbank) want is an EL4 they can call into to deflect > PSCI calls into from EL3 they

Re: [PATCH v4 2/6] net/vmnet: add vmnet backends to qapi/net

2021-11-19 Thread Markus Armbruster
I apologize for taking so long to respond. I spotted v5, but haven't reviewed it. Please read my response, then assess whether you need v6. If not, let me know, so I can have a look at v5. Vladislav Yaroshchuk writes: > --325dde05d084e6e4 > Content-Type: text/plain;

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-19 Thread Jason Gunthorpe
On Fri, Nov 19, 2021 at 09:47:27PM +0800, Chao Peng wrote: > From: "Kirill A. Shutemov" > > The new seal type provides semantics required for KVM guest private > memory support. A file descriptor with the seal set is going to be used > as source of guest memory in confidential computing

Re: [PATCH v2] hw/arm/virt: Expose empty NUMA nodes through ACPI

2021-11-19 Thread Jonathan Cameron
On Thu, 18 Nov 2021 11:23:06 + Jonathan Cameron wrote: > On Thu, 18 Nov 2021 12:06:27 +0100 > David Hildenbrand wrote: > > > On 18.11.21 11:28, Jonathan Cameron wrote: > > > On Wed, 17 Nov 2021 19:08:28 +0100 > > > David Hildenbrand wrote: > > > > > >> On 17.11.21 15:30, Jonathan

Re: [PATCH for-6.2] hw/misc/sifive_u_otp: Use IF_PFLASH for the OTP device instead of IF_NONE

2021-11-19 Thread Markus Armbruster
Thomas Huth writes: > On 19/11/2021 11.40, Philippe Mathieu-Daudé wrote: >> On 11/19/21 11:25, Thomas Huth wrote: >>> Configuring a drive with "if=none" is meant for creation of a backend >>> only, it should not get automatically assigned to a device frontend. >>> Use "if=pflash" for the

[PATCH] block vvfat.c fix leak when failure occurs

2021-11-19 Thread Daniella Lee
Based on your suggestions. I made a new patch which contians: 1.format detection 2.replace calloc with g_malloc0 in enable_write_target function 3.use g_free without null pointer detection in vvfat_open function 4.delete line "ret = 0", use return ret directly in vvfat_open function

[PULL for-6.2 1/2] pmu: fix pmu vmstate subsection list

2021-11-19 Thread Cédric Le Goater
From: Laurent Vivier The subsection is not closed by a NULL marker so this can trigger a segfault when the pmu vmstate is saved. This can be easily shown with: $ ./qemu-system-ppc64 -dump-vmstate vmstate.json Segmentation fault (core dumped) Fixes: d811d61fbc6c ("mac_newworld: add PMU

[PULL for-6.2 2/2] tests/tcg/ppc64le: Fix compile flags for byte_reverse

2021-11-19 Thread Cédric Le Goater
From: Richard Henderson With a host compiler new enough to recognize power10 insns, CROSS_CC_HAS_POWER10 is true, but we do not supply the -cpu option to the compiler, resulting in /tmp/ccAVdYJd.s: Assembler messages: /tmp/ccAVdYJd.s:49: Error: unrecognized opcode: `brh' /tmp/ccAVdYJd.s:78:

Re: [PATCH v9 5/8] qmp: decode feature & status bits in virtio-status

2021-11-19 Thread Markus Armbruster
Jonah Palmer writes: > On 11/10/21 08:49, Markus Armbruster wrote: >> Jonah Palmer writes: >> >>> From: Laurent Vivier >>> >>> Display feature names instead of bitmaps for host, guest, and >>> backend for VirtIODevice. >>> >>> Display status names instead of bitmaps for VirtIODevice. >>> >>>

Re: [PATCH v4 15/20] target/riscv: Remove VILL field in VTYPE

2021-11-19 Thread Alistair Francis
On Fri, Nov 12, 2021 at 2:09 AM LIU Zhiwei wrote: > > Signed-off-by: LIU Zhiwei > Acked-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h > index

Re: [PATCH v4 20/20] target/riscv: Enable uxl field write

2021-11-19 Thread Alistair Francis
On Fri, Nov 12, 2021 at 2:14 AM LIU Zhiwei wrote: > > Signed-off-by: LIU Zhiwei Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu_bits.h | 2 ++ > target/riscv/csr.c | 8 +--- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/target/riscv/cpu_bits.h

Re: [PATCH v2 02/13] hw: Replace trivial drive_get_next() by drive_get()

2021-11-19 Thread Alistair Francis
On Thu, Nov 18, 2021 at 2:42 AM Markus Armbruster wrote: > > drive_get_next() is basically a bad idea. It returns the "next" block > backend of a certain interface type. "Next" means bus=0,unit=N, where > subsequent calls count N up from zero, per interface type. > > This lets you define unit

  1   2   3   >