[PATCH] build-sys: error when slirp is not found and not disabled

2022-10-03 Thread marcandre . lureau
From: Marc-André Lureau This is an alternative configure-time solution to "[PATCH] net: print a more actionable error when slirp is not found". See also "If your networking is failing after updating to the latest git version of QEMU..." ML thread. Signed-off-by: Marc-André Lureau --- meson.bu

Re: [PATCH v3 2/2] hw/intc: sifive_plic: change interrupt priority register to WARL field

2022-10-03 Thread Clément Chigot
On Mon, Oct 3, 2022 at 6:14 AM Jim Shu wrote: > > PLIC spec [1] requires interrupt source priority registers are WARL > field and the number of supported priority is power-of-2 to simplify SW > discovery. > > Existing QEMU RISC-V machine (e.g. shakti_c) don't strictly follow PLIC > spec, whose num

Re: Commit 'iomap: add support for dma aligned direct-io' causes qemu/KVM boot failures

2022-10-03 Thread Maxim Levitsky
On Sun, 2022-10-02 at 07:56 -0600, Keith Busch wrote: > On Sun, Oct 02, 2022 at 11:59:42AM +0300, Maxim Levitsky wrote: > > On Thu, 2022-09-29 at 19:35 +0200, Paolo Bonzini wrote: > > > On 9/29/22 18:39, Christoph Hellwig wrote: > > > > On Thu, Sep 29, 2022 at 10:37:22AM -0600, Keith Busch wrote: >

Re: [PATCH v3] win32: set threads name

2022-10-03 Thread Marc-André Lureau
Hi Richard On Fri, Sep 30, 2022 at 6:10 PM Richard Henderson wrote: > > On 9/30/22 07:03, marcandre.lur...@redhat.com wrote: > > +static bool > > +set_thread_description(HANDLE h, const char *name) > > +{ > > + HRESULT hr; > > + g_autofree wchar_t *namew = NULL; > > + > > + if (!load_set_threa

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-03 Thread Fuad Tabba
Hi On Fri, Sep 30, 2022 at 5:23 PM Kirill A . Shutemov wrote: > > On Fri, Sep 30, 2022 at 05:14:00PM +0100, Fuad Tabba wrote: > > Hi, > > > > <...> > > > > > diff --git a/mm/memfd_inaccessible.c b/mm/memfd_inaccessible.c > > > new file mode 100644 > > > index ..2d33cbdd9282 > > > ---

Re: [PATCH v3] win32: set threads name

2022-10-03 Thread Marc-André Lureau
Hi On Fri, Sep 30, 2022 at 6:10 PM Richard Henderson wrote: > > On 9/30/22 07:03, marcandre.lur...@redhat.com wrote: > > +static bool > > +set_thread_description(HANDLE h, const char *name) > > +{ > > + HRESULT hr; > > + g_autofree wchar_t *namew = NULL; > > + > > + if (!load_set_thread_descri

Re: [PATCH v2 05/13] mac_oldworld: Do not open code sysbus_mmio_map()

2022-10-03 Thread Mark Cave-Ayland
On 29/09/2022 12:32, BALATON Zoltan wrote: On Thu, 29 Sep 2022, Mark Cave-Ayland wrote: On 25/09/2022 13:38, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan ---   hw/ppc/mac_oldworld.c | 8 ++--   1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/ppc/mac_oldworld.c b/hw

Re: [PATCH v2 10/13] hw/ppc/mac.h: Move grackle-pcihost declaration out from shared header

2022-10-03 Thread Mark Cave-Ayland
On 29/09/2022 12:42, BALATON Zoltan wrote: On Thu, 29 Sep 2022, Mark Cave-Ayland wrote: On 25/09/2022 13:38, BALATON Zoltan wrote: It is only used by mac_oldworld anyway and it already instantiates a few devices by name so this allows reducing the shared header further. Signed-off-by: BALATO

Re: [PATCH v6 16/18] hw/core: Add CPUClass.get_pc

2022-10-03 Thread Mark Cave-Ayland
On 30/09/2022 22:26, Richard Henderson wrote: Populate this new method for all targets. Always match the result that would be given by cpu_get_tb_cpu_state, as we will want these values to correspond in the logs. Signed-off-by: Richard Henderson --- Cc: Eduardo Habkost (supporter:Machine cor

Re: [PATCH] build-sys: error when slirp is not found and not disabled

2022-10-03 Thread Daniel P . Berrangé
On Mon, Oct 03, 2022 at 11:05:34AM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This is an alternative configure-time solution to "[PATCH] net: > print a more actionable error when slirp is not found". > > See also "If your networking is failing after updating to the l

Re: [PATCH v2 00/13] Misc ppc/mac machines clean up

2022-10-03 Thread Mark Cave-Ayland
On 26/09/2022 22:40, Daniel Henrique Barboza wrote: Mark, It seems that you're usually push mac changes via a qemu-macppc PR (git log says that the last one was Jan 2021), so feel free to keep doing so. If it's convenient for you I can pick them via ppc-next as well. Just let me know. Thank

Re: [PATCH v2] hw/smbios: support for type 8 (port connector)

2022-10-03 Thread Hal Martin
Hello, Any update on merging this? Kind regards, Hal On Fri, Aug 12, 2022 at 5:04 PM Michael S. Tsirkin wrote: > > On Fri, Aug 12, 2022 at 03:51:53PM +0200, Hal Martin wrote: > > PATCH v1: add support for SMBIOS type 8 to qemu > > PATCH v2: incorporate patch v1 feedback and add smbios type=8 to

Re: [PATCH v3 3/5] hw/arm/virt: Introduce variable region_base in virt_set_high_memmap()

2022-10-03 Thread Eric Auger
Hi Gavin, On 9/29/22 01:15, Gavin Shan wrote: > Hi Eric, > > On 9/28/22 10:10 PM, Eric Auger wrote: >> On 9/22/22 01:13, Gavin Shan wrote: >>> This introduces variable 'region_base' for the base address of the >>> specific high memory region. It's the preparatory work to optimize >>> high memory r

Re: [PATCH v3 2/5] hw/arm/virt: Rename variable size to region_size in virt_set_high_memmap()

2022-10-03 Thread Eric Auger
On 9/22/22 01:13, Gavin Shan wrote: > This renames variable 'size' to 'region_size' in virt_set_high_memmap(). > Its counterpart ('region_base') will be introduced in next patch. > > No functional change intended. > > Signed-off-by: Gavin Shan Reviewed-by: Eric Auger Eric > --- > hw/arm/virt

Re: [PATCH v3 3/5] hw/arm/virt: Introduce variable region_base in virt_set_high_memmap()

2022-10-03 Thread Eric Auger
On 9/22/22 01:13, Gavin Shan wrote: > This introduces variable 'region_base' for the base address of the > specific high memory region. It's the preparatory work to optimize > high memory region address assignment. > > No functional change intended. > > Signed-off-by: Gavin Shan Reviewed-by: Er

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-10-03 Thread Daniel P . Berrangé
On Sat, Oct 01, 2022 at 11:34:20PM +0200, Andreas Schwab wrote: > On Aug 02 2022, Daniel P. Berrangé wrote: > > > This patch removes linux/fs.h, meaning we have to define > > various FS_IOC constants that are now unavailable. > > This breaks a lot of ioctl emulations, as it lacks their definition

Re: [PATCH] RISC-V: Add support for Ztso

2022-10-03 Thread Dr. David Alan Gilbert
* Palmer Dabbelt (pal...@rivosinc.com) wrote: > On Thu, 29 Sep 2022 12:16:48 PDT (-0700), dgilb...@redhat.com wrote: > > * Palmer Dabbelt (pal...@rivosinc.com) wrote: > > > Ztso, the RISC-V extension that provides the TSO memory model, was > > > recently frozen. This provides support for Ztso on t

Re: [PATCH 2/2] thread-pool: use ThreadPool from the running thread

2022-10-03 Thread Emanuele Giuseppe Esposito
Am 30/09/2022 um 17:45 schrieb Kevin Wolf: > Am 30.09.2022 um 14:17 hat Emanuele Giuseppe Esposito geschrieben: >> Am 29/09/2022 um 17:30 schrieb Kevin Wolf: >>> Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: Remove usage of aio_context_acquire by always submitting work

Re: [PATCH v3 4/5] hw/arm/virt: Improve high memory region address assignment

2022-10-03 Thread Eric Auger
Hi Gavin, On 9/29/22 01:37, Gavin Shan wrote: > Hi Eric, > > On 9/28/22 10:51 PM, Eric Auger wrote: >> On 9/22/22 01:13, Gavin Shan wrote: >>> There are three high memory regions, which are VIRT_HIGH_REDIST2, >>> VIRT_HIGH_PCIE_ECAM and VIRT_HIGH_PCIE_MMIO. Their base addresses >>> are floating on

Re: [PATCH v3 5/5] hw/arm/virt: Add 'highmem-compact' property

2022-10-03 Thread Eric Auger
Hi Gavin, On 9/29/22 01:49, Gavin Shan wrote: > Hi Eric, > > On 9/28/22 10:22 PM, Eric Auger wrote: >> On 9/22/22 01:13, Gavin Shan wrote: >>> After the improvement to high memory region address assignment is >>> applied, the memory layout is changed. For example, VIRT_HIGH_PCIE_MMIO >> s/the memo

Re: [PATCH v2 03/10] target/arm: Don't mishandle count when enabling or disabling PMU counters

2022-10-03 Thread Alex Bennée
Peter Maydell writes: > The PMU cycle and event counter infrastructure design requires that > operations on the PMU register fields are wrapped in pmu_op_start() > and pmu_op_finish() calls (or their more specific pmmcntr and > pmevcntr equivalents). This includes any changes to registers whic

Re: If your networking is failing after updating to the latest git version of QEMU...

2022-10-03 Thread Alex Bennée
Thomas Huth writes: > On 29/09/2022 04.32, Jason Wang wrote: >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé >> wrote: >>> >>> On 28/9/22 10:27, Thomas Huth wrote: ... it might have happened due to the removal of the "slirp" submodule from the git repository. For exam

Re: [PATCH 1/2] linux-aio: use LinuxAioState from the running thread

2022-10-03 Thread Emanuele Giuseppe Esposito
Am 30/09/2022 um 17:32 schrieb Kevin Wolf: > Am 30.09.2022 um 12:00 hat Emanuele Giuseppe Esposito geschrieben: >> >> >> Am 29/09/2022 um 16:52 schrieb Kevin Wolf: >>> Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: From: Paolo Bonzini Remove usage of aio_conte

Re: [PATCH v4 00/54] tests/qtest: Enable running qtest on Windows

2022-10-03 Thread Marc-André Lureau
Hi Bin On Tue, Sep 27, 2022 at 3:18 PM Bin Meng wrote: > In preparation to adding virtio-9p support on Windows, this series > enables running qtest on Windows, so that we can run the virtio-9p > tests on Windows to make sure it does not break accidently. > > Changes in v4: > - Do not use g_autof

Re: [PATCH v2 03/10] target/arm: Don't mishandle count when enabling or disabling PMU counters

2022-10-03 Thread Peter Maydell
On Mon, 3 Oct 2022 at 09:55, Alex Bennée wrote: > > > Peter Maydell writes: > > > The PMU cycle and event counter infrastructure design requires that > > operations on the PMU register fields are wrapped in pmu_op_start() > > and pmu_op_finish() calls (or their more specific pmmcntr and > > pmevc

Re: If your networking is failing after updating to the latest git version of QEMU...

2022-10-03 Thread Peter Maydell
On Mon, 3 Oct 2022 at 10:09, Alex Bennée wrote: > > > Thomas Huth writes: > > > On 29/09/2022 04.32, Jason Wang wrote: > >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé > >> wrote: > >>> Jason, Marc-André, could we improve the buildsys check or display > >>> a more helpful information

[PATCH v3 2/7] qga: Move Linux-specific FS freeze/thaw code to a separate file

2022-10-03 Thread Alexander Ivanov
In the next patches we are going to add FreeBSD support for QEMU Guest Agent. In the result, code in commands-posix.c will be too cumbersome. Move Linux-specific FS freeze/thaw code to a separate file commands-linux.c keeping common POSIX code in commands-posix.c. Reviewed-by: Marc-André Lureau

[PATCH v3 5/7] qga: Add support for user password setting in FreeBSD

2022-10-03 Thread Alexander Ivanov
Move qmp_guest_set_user_password() from __linux__ condition to (__linux__ || __FreeBSD__) condition. Add command and arguments for password setting in FreeBSD. Signed-off-by: Alexander Ivanov --- qga/commands-posix.c | 35 +-- 1 file changed, 25 insertions(+), 10

[PATCH v3 7/7] qga: Add HW address getting for FreeBSD

2022-10-03 Thread Alexander Ivanov
Replace a dumb function in commands-bsd.c by the code of HW address getting. Reviewed-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/qga/commands-bsd.c b/qga/commands-bsd.c index 40f7ec7600..5f423a

[PATCH v3 0/7] qga: Add FreeBSD support

2022-10-03 Thread Alexander Ivanov
Add freeze/thaw, shutdown/halt/reboot, password setting and guest-network-get-interfaces command support for FreeBSD. v3: 1: Add a comment about echo suppressing. 5: Replace code moving by splitting the code into a few blocks under architecture conditions. 5,6: Move actions with dumb qmp_guest_

[PATCH v3 1/7] qga: Add initial FreeBSD support

2022-10-03 Thread Alexander Ivanov
- Fix device path. - Fix virtio-serial channel initialization. - Make the code buildable in FreeBSD. Signed-off-by: Alexander Ivanov --- meson.build | 2 +- qga/channel-posix.c | 19 +++ qga/commands-posix.c | 8 qga/main.c | 6 +- 4 files chan

[PATCH v3 3/7] qga: Add UFS freeze/thaw support for FreeBSD

2022-10-03 Thread Alexander Ivanov
UFS supports FS freezing through ioctl UFSSUSPEND on /dev/ufssuspend. Frozen FS can be thawed by closing /dev/ufssuspend file descriptior. Use getmntinfo to get a list of mounted FS. Reviewed-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c| 169

[PATCH v3 4/7] qga: Add shutdown/halt/reboot support for FreeBSD

2022-10-03 Thread Alexander Ivanov
Add appropriate shutdown command arguments to qmp_guest_shutdown() for FreeBSD. Reviewed-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- qga/commands-posix.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 49f9996a9c..88e0d0

Re: [PATCH v3 5/7] qga: Add support for user password setting in FreeBSD

2022-10-03 Thread Marc-André Lureau
On Mon, Oct 3, 2022 at 1:39 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > Move qmp_guest_set_user_password() from __linux__ condition to > (__linux__ || __FreeBSD__) condition. Add command and arguments > for password setting in FreeBSD. > > Signed-off-by: Alexander Ivanov > Rev

Re: [PATCH v3 1/7] qga: Add initial FreeBSD support

2022-10-03 Thread Marc-André Lureau
On Mon, Oct 3, 2022 at 1:39 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > - Fix device path. > - Fix virtio-serial channel initialization. > - Make the code buildable in FreeBSD. > > Signed-off-by: Alexander Ivanov > Acked-by: Marc-André Lureau > --- > meson.build |

[PATCH v3 6/7] qga: Move HW address getting to a separate function

2022-10-03 Thread Alexander Ivanov
In the next patch FreeBSD support for guest-network-get-interfaces will be added. Previously move Linux-specific code of HW address getting to a separate functions and add a dumb function to commands-bsd.c. Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c| 16 +++ qga/commands-com

Re: [PATCH v3 6/7] qga: Move HW address getting to a separate function

2022-10-03 Thread Marc-André Lureau
Hi On Mon, Oct 3, 2022 at 1:39 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > In the next patch FreeBSD support for guest-network-get-interfaces will be > added. Previously move Linux-specific code of HW address getting to a > separate functions and add a dumb function to commands

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

2022-10-03 Thread Marc-André Lureau
Hi On Fri, Sep 2, 2022 at 3:19 PM wrote: > > 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. > Daniel, please review. thanks > Marc-André Lureau (3): >

[PATCH] net: improve error message for missing netdev backend

2022-10-03 Thread Daniel P . Berrangé
The current message when using '-net user...' with SLIRP disabled at compile time is: qemu-system-x86_64: -net user: Parameter 'type' expects a net backend type (maybe it is not compiled into this binary) An observation is that we're using the 'netdev->type' field here which is an enum value,

Re: [PATCH v4 00/54] tests/qtest: Enable running qtest on Windows

2022-10-03 Thread Bin Meng
Hi Marc-André, On Mon, Oct 3, 2022 at 5:26 PM Marc-André Lureau wrote: > > Hi Bin > > On Tue, Sep 27, 2022 at 3:18 PM Bin Meng wrote: >> >> In preparation to adding virtio-9p support on Windows, this series >> enables running qtest on Windows, so that we can run the virtio-9p >> tests on Windows

Re: [PATCH] net: improve error message for missing netdev backend

2022-10-03 Thread Marc-André Lureau
Hi On Mon, Oct 3, 2022 at 2:06 PM Daniel P. Berrangé wrote: > > The current message when using '-net user...' with SLIRP disabled at > compile time is: > > qemu-system-x86_64: -net user: Parameter 'type' expects a net backend type > (maybe it is not compiled into this binary) > > An observatio

Re: If your networking is failing after updating to the latest git version of QEMU...

2022-10-03 Thread Alex Bennée
Peter Maydell writes: > On Mon, 3 Oct 2022 at 10:09, Alex Bennée wrote: >> >> >> Thomas Huth writes: >> >> > On 29/09/2022 04.32, Jason Wang wrote: >> >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé >> >> wrote: >> >>> Jason, Marc-André, could we improve the buildsys check or disp

[PATCH 2/2] tests: avoid DOS line endings in PSK file

2022-10-03 Thread Daniel P . Berrangé
Using FILE * APIs for writing the PSK file results in translation from UNIX to DOS line endings on Windows. When the crypto PSK code later loads the credentials the stray \r will result in failure to load the PSK credentials into GNUTLS. Rather than switching the FILE* APIs to open in binary forma

Re: [PATCH 1/2] target/arm: Don't allow guest to use unimplemented granule sizes

2022-10-03 Thread Peter Maydell
On Fri, 30 Sept 2022 at 22:05, Richard Henderson wrote: > > On 9/30/22 10:48, Peter Maydell wrote: > > @@ -10289,20 +10289,113 @@ static int aa64_va_parameter_tcma(uint64_t tcr, > > ARMMMUIdx mmu_idx) > > } > > } > > > > +typedef enum GranuleSize { > > +/* Same order as TG0 encoding *

[PATCH 0/2] crypto: fix TLS PSK credentials on Windows platforms

2022-10-03 Thread Daniel P . Berrangé
A mixup with DOS/UNIX line endings, combined with lack of error checking, resulted in us not initializing the PSK credentials on the client side. Daniel P. Berrangé (2): crypto: check for and report errors setting PSK credentials tests: avoid DOS line endings in PSK file crypto/tlscredspsk.c

[PATCH v2] mips/malta: pass RNG seed to to kernel via env var

2022-10-03 Thread Jason A. Donenfeld
As of the kernel commit linked below, Linux ingests an RNG seed passed from the hypervisor. So, pass this for the Malta platform, and reinitialize it on reboot too, so that it's always fresh. Cc: Philippe Mathieu-Daudé Cc: Jiaxun Yang Cc: Aurelien Jarno Link: https://git.kernel.org/mips/c/056a6

Re: If your networking is failing after updating to the latest git version of QEMU...

2022-10-03 Thread Peter Maydell
On Mon, 3 Oct 2022 at 11:25, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Mon, 3 Oct 2022 at 10:09, Alex Bennée wrote: > >> > >> > >> Thomas Huth writes: > >> > >> > On 29/09/2022 04.32, Jason Wang wrote: > >> >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé > >> >> wrote:

[PATCH 1/2] crypto: check for and report errors setting PSK credentials

2022-10-03 Thread Daniel P . Berrangé
If setting credentials fails, the handshake will later fail to complete with an obscure error message which is hard to diagnose. Signed-off-by: Daniel P. Berrangé --- crypto/tlscredspsk.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/crypto/tlscredspsk.c b

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

2022-10-03 Thread Daniel P . Berrangé
On Fri, Sep 02, 2022 at 03:18:58PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Simplify qio_channel_command_new_spawn() with GSpawn API. This will > allow to build for WIN32 in the following patches. There a change in semantics here too. The current code only touches

Re: [PATCH v4 04/54] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files

2022-10-03 Thread Daniel P . Berrangé
On Sat, Oct 01, 2022 at 11:44:09AM +0800, Bin Meng wrote: > Hi Daniel, > > On Tue, Sep 27, 2022 at 7:06 PM Bin Meng wrote: > > > > From: Bin Meng > > > > Replace the existing logic to get the directory for temporary files > > with g_get_tmp_dir(), which works for win32 too. > > > > Signed-off-by

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

2022-10-03 Thread Daniel P . Berrangé
On Fri, Sep 02, 2022 at 03:18:59PM +0400, marcandre.lur...@redhat.com wrote: > 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

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

2022-10-03 Thread Daniel P . Berrangé
On Fri, Sep 02, 2022 at 03:19:00PM +0400, marcandre.lur...@redhat.com wrote: > 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 anywa

Re: [PATCH] build-sys: error when slirp is not found and not disabled

2022-10-03 Thread Christian Schoenebeck
On Montag, 3. Oktober 2022 10:05:14 CEST Daniel P. Berrangé wrote: > On Mon, Oct 03, 2022 at 11:05:34AM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > This is an alternative configure-time solution to "[PATCH] net: > > print a more actionable error when slirp is not

Re: [PATCH] meson: -display dbus and CFI are incompatible

2022-10-03 Thread Jason A. Donenfeld
On Fri, Sep 30, 2022 at 09:53:24AM +0200, Paolo Bonzini wrote: > The generated skeletons for DBus call the finalize method of the parent > type using code like > > G_OBJECT_CLASS > (qemu_dbus_display1_chardev_skeleton_parent_class)->finalize (object); > > However, the finalize method is defi

[PATCH v3] m68k: write bootinfo as rom section and re-randomize on reboot

2022-10-03 Thread Jason A. Donenfeld
Rather than poking directly into RAM, add the bootinfo block as a proper ROM, so that it's restored when rebooting the system. This way, if the guest corrupts any of the bootinfo items, but then tries to reboot, it'll still be restored back to normal as expected. Then, since the RNG seed needs to

Re: If your networking is failing after updating to the latest git version of QEMU...

2022-10-03 Thread Daniel P . Berrangé
On Mon, Oct 03, 2022 at 11:36:36AM +0100, Peter Maydell wrote: > On Mon, 3 Oct 2022 at 11:25, Alex Bennée wrote: > > > > > > Peter Maydell writes: > > > > > On Mon, 3 Oct 2022 at 10:09, Alex Bennée wrote: > > >> > > >> > > >> Thomas Huth writes: > > >> > > >> > On 29/09/2022 04.32, Jason Wang w

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-03 Thread Kirill A. Shutemov
On Mon, Oct 03, 2022 at 08:33:13AM +0100, Fuad Tabba wrote: > > I think it is "don't do that" category. inaccessible_register_notifier() > > caller has to know what file it operates on, no? > > The thing is, you could oops the kernel from userspace. For that, all > you have to do is a memfd_create

[PATCH v10 3/5] target/riscv: generate virtual instruction exception

2022-10-03 Thread Mayuresh Chitale
This patch adds a mechanism to generate a virtual instruction instruction exception instead of an illegal instruction exception during instruction decode when virt is enabled. Signed-off-by: Mayuresh Chitale --- target/riscv/translate.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(

[PATCH v10 0/5] RISC-V Smstateen support

2022-10-03 Thread Mayuresh Chitale
This series adds support for the Smstateen specification which provides a mechanism to plug the potential covert channels which are opened by extensions that add to processor state that may not get context-switched. Currently access to *envcfg registers and floating point(fcsr) is controlled via sm

[PATCH v10 1/5] target/riscv: Add smstateen support

2022-10-03 Thread Mayuresh Chitale
Smstateen extension specifies a mechanism to close the potential covert channels that could cause security issues. This patch adds the CSRs defined in the specification and the corresponding predicates and read/write functions. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li --- target/

[PATCH v10 2/5] target/riscv: smstateen check for h/s/envcfg

2022-10-03 Thread Mayuresh Chitale
Accesses to henvcfg, henvcfgh and senvcfg are allowed only if the corresponding bit in mstateen0/hstateen0 is enabled. Otherwise an illegal instruction trap is generated. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/csr.c | 87 +++

Re: [PATCH] build-sys: error when slirp is not found and not disabled

2022-10-03 Thread Christian Schoenebeck
On Montag, 3. Oktober 2022 12:48:35 CEST Christian Schoenebeck wrote: > On Montag, 3. Oktober 2022 10:05:14 CEST Daniel P. Berrangé wrote: > > On Mon, Oct 03, 2022 at 11:05:34AM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > This is an alternative configure-ti

[PATCH v10 5/5] target/riscv: smstateen knobs

2022-10-03 Thread Mayuresh Chitale
Add knobs to allow users to enable smstateen and also export it via the ISA extension string. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c

[PATCH v10 4/5] target/riscv: smstateen check for fcsr

2022-10-03 Thread Mayuresh Chitale
If smstateen is implemented and sstateen0.fcsr is clear then the floating point operations must return illegal instruction exception or virtual instruction trap, if relevant. Signed-off-by: Mayuresh Chitale --- target/riscv/csr.c| 23 target/riscv/insn_trans/

Re: [PATCH] tests/avocado: Add missing require_netdev('user') checks

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 21:52, Peter Maydell wrote: Some avocado tests fail if QEMU was built without libslirp. Add require_netdev('user') checks where necessary: These tests try to ping 10.0.2.2 and expect it to succeed: boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2 boot_linux_console.py

Re: Question about RISC-V brom register a1 set value

2022-10-03 Thread Philippe Mathieu-Daudé via
Cc'ing the RISC-V specific mailing list. On 1/10/22 01:48, Eric Chan wrote: Hi, qemu As I know, brom will pass 3 parameters to the next stage bootloader, ex: openSBI. a0 will pass hartid, a2 will pass fw_dynamic_info start address. although a1 doesn't use directly in openSBI. a1 read value is

Re: [PATCH] net: improve error message for missing netdev backend

2022-10-03 Thread Christian Schoenebeck
On Montag, 3. Oktober 2022 12:06:12 CEST Daniel P. Berrangé wrote: > The current message when using '-net user...' with SLIRP disabled at > compile time is: > > qemu-system-x86_64: -net user: Parameter 'type' expects a net backend type > (maybe it is not compiled into this binary) Is this inten

Re: [PATCH v6 13/18] accel/tcg: Do not align tb->page_addr[0]

2022-10-03 Thread Alex Bennée
Richard Henderson writes: > Let tb->page_addr[0] contain the offset within the page of the > start of the translation block. We need to recover this value > anyway at various points, and it is easier to discard the page > offset when it's not needed, which happens naturally via the > existing

Re: [PATCH] net: improve error message for missing netdev backend

2022-10-03 Thread Daniel P . Berrangé
On Mon, Oct 03, 2022 at 02:46:04PM +0200, Christian Schoenebeck wrote: > On Montag, 3. Oktober 2022 12:06:12 CEST Daniel P. Berrangé wrote: > > The current message when using '-net user...' with SLIRP disabled at > > compile time is: > > > > qemu-system-x86_64: -net user: Parameter 'type' expect

Re: [PATCH v6 15/18] include/hw/core: Create struct CPUJumpCache

2022-10-03 Thread Alex Bennée
Richard Henderson writes: > Wrap the bare TranslationBlock pointer into a structure. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > accel/tcg/tb-hash.h | 1 + > accel/tcg/tb-jmp-cache.h | 24 > include/exec/cpu-common.h |

Re: [PATCH v6 14/18] accel/tcg: Inline tb_flush_jmp_cache

2022-10-03 Thread Alex Bennée
Richard Henderson writes: > This function has two users, who use it incompatibly. > In tlb_flush_page_by_mmuidx_async_0, when flushing a > single page, we need to flush exactly two pages. > In tlb_flush_range_by_mmuidx_async_0, when flushing a > range of pages, we need to flush N+1 pages. > > T

Re: [PATCH v3 1/2] hw/intc: Fix LoongArch extioi function

2022-10-03 Thread Philippe Mathieu-Daudé via
Hi, On 30/9/22 09:10, Xiaojuan Yang wrote: 1.When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_type and id to get the cpu index. 2.Remove the unused extioi system memory region a

Re: [PATCH v6 16/18] hw/core: Add CPUClass.get_pc

2022-10-03 Thread Alex Bennée
Richard Henderson writes: > Populate this new method for all targets. Always match > the result that would be given by cpu_get_tb_cpu_state, > as we will want these values to correspond in the logs. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v10 4/5] target/riscv: smstateen check for fcsr

2022-10-03 Thread weiwei
On 2022/10/3 19:47, Mayuresh Chitale wrote: If smstateen is implemented and sstateen0.fcsr is clear then the floating point operations must return illegal instruction exception or virtual instruction trap, if relevant. Signed-off-by: Mayuresh Chitale --- target/riscv/csr.c

Re: [PATCH 2/2] tests: avoid DOS line endings in PSK file

2022-10-03 Thread Bin Meng
On Mon, Oct 3, 2022 at 6:27 PM Daniel P. Berrangé wrote: > > Using FILE * APIs for writing the PSK file results in translation from > UNIX to DOS line endings on Windows. When the crypto PSK code later > loads the credentials the stray \r will result in failure to load the > PSK credentials into G

Re: [PATCH 1/2] crypto: check for and report errors setting PSK credentials

2022-10-03 Thread Bin Meng
On Mon, Oct 3, 2022 at 6:27 PM Daniel P. Berrangé wrote: > > If setting credentials fails, the handshake will later fail to complete > with an obscure error message which is hard to diagnose. > > Signed-off-by: Daniel P. Berrangé > --- > crypto/tlscredspsk.c | 16 +--- > 1 file chang

Re: [PATCH v3 1/7] qga: Add initial FreeBSD support

2022-10-03 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Oct 3, 2022 at 12:58 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > > > On Mon, Oct 3, 2022 at 1:39 PM Alexander Ivanov < > alexander.iva...@virtuozzo.com> wrote: > >> - Fix device path. >> - Fix virtio-serial channel initialization. >> - Make

Re: [PATCH v3 2/7] qga: Move Linux-specific FS freeze/thaw code to a separate file

2022-10-03 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Oct 3, 2022 at 12:39 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > In the next patches we are going to add FreeBSD support for QEMU Guest > Agent. In the result, code in commands-posix.c will be too cumbersome. > > Move Linux-specific FS f

Re: [PATCH v3 3/7] qga: Add UFS freeze/thaw support for FreeBSD

2022-10-03 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Oct 3, 2022 at 12:39 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > UFS supports FS freezing through ioctl UFSSUSPEND on /dev/ufssuspend. > Frozen FS can be thawed by closing /dev/ufssuspend file descriptior. > > Use getmntinfo to get a lis

Re: [PATCH v3 4/7] qga: Add shutdown/halt/reboot support for FreeBSD

2022-10-03 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Oct 3, 2022 at 12:39 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > Add appropriate shutdown command arguments to qmp_guest_shutdown() > for FreeBSD. > > Reviewed-by: Marc-André Lureau > Signed-off-by: Alexander Ivanov > --- > qga/comman

Re: [PATCH 1/2] target/arm: Don't allow guest to use unimplemented granule sizes

2022-10-03 Thread Richard Henderson
On 10/3/22 03:28, Peter Maydell wrote: I'd assumed you had a reason for using two bools rather than an enum in ARMVAParameters, so I left that alone :-) I think it was because the existing code had variables of those names, so the patch changed "foo" to "param.foo". :-) Putting GranuleSize

Re: [PATCH v3 7/7] qga: Add HW address getting for FreeBSD

2022-10-03 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Oct 3, 2022 at 12:39 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > Replace a dumb function in commands-bsd.c by the code of HW address > getting. > > Reviewed-by: Marc-André Lureau > Signed-off-by: Alexander Ivanov > --- > qga/commands-

Re: [PATCH v3 5/7] qga: Add support for user password setting in FreeBSD

2022-10-03 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Oct 3, 2022 at 12:54 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > > > On Mon, Oct 3, 2022 at 1:39 PM Alexander Ivanov < > alexander.iva...@virtuozzo.com> wrote: > >> Move qmp_guest_set_user_password() from __linux__ condition to >> (__linux_

Re: [PATCH 2/2] tests: avoid DOS line endings in PSK file

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 12:27, Daniel P. Berrangé wrote: Using FILE * APIs for writing the PSK file results in translation from UNIX to DOS line endings on Windows. When the crypto PSK code later loads the credentials the stray \r will result in failure to load the PSK credentials into GNUTLS. Rather than sw

Re: [PATCH v3 6/7] qga: Move HW address getting to a separate function

2022-10-03 Thread Konstantin Kostiuk
On Mon, Oct 3, 2022 at 12:58 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Mon, Oct 3, 2022 at 1:39 PM Alexander Ivanov < > alexander.iva...@virtuozzo.com> wrote: > >> In the next patch FreeBSD support for guest-network-get-interfaces will be >> added. Previously move Linux

Re: [PATCH v6 18/18] accel/tcg: Introduce TARGET_TB_PCREL

2022-10-03 Thread Alex Bennée
Richard Henderson writes: > Prepare for targets to be able to produce TBs that can > run in more than one virtual context. > > Signed-off-by: Richard Henderson > --- > accel/tcg/internal.h | 4 +++ > accel/tcg/tb-jmp-cache.h | 5 > include/exec/cpu-defs.h | 3 +++ > include/ex

Re: [PATCH v6 13/18] accel/tcg: Do not align tb->page_addr[0]

2022-10-03 Thread Richard Henderson
On 10/3/22 05:47, Alex Bennée wrote: Richard Henderson writes: Let tb->page_addr[0] contain the offset within the page of the start of the translation block. We need to recover this value anyway at various points, and it is easier to discard the page offset when it's not needed, which happen

Re: [PATCH 1/2] crypto: check for and report errors setting PSK credentials

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 12:27, Daniel P. Berrangé wrote: If setting credentials fails, the handshake will later fail to complete with an obscure error message which is hard to diagnose. Signed-off-by: Daniel P. Berrangé --- crypto/tlscredspsk.c | 16 +--- 1 file changed, 13 insertions(+), 3 d

Re: [PATCH v2 06/13] mac_newworld: Simplify creation of Uninorth devices

2022-10-03 Thread Philippe Mathieu-Daudé via
Cc'ing CLI refactor team. On 29/9/22 09:39, Mark Cave-Ayland wrote: On 25/09/2022 13:38, BALATON Zoltan wrote: Avoid open coding sysbus_mmio_map() and map regions in ascending otder. Reorganise code a bit to avoid some casts. Signed-off-by: BALATON Zoltan ---   hw/ppc/mac_newworld.c | 42 +++

Re: [PATCH v1 6/7] contrib/gitdm: add Université Grenoble Alpes

2022-10-03 Thread Philippe Mathieu-Daudé via
On 26/9/22 15:46, Alex Bennée wrote: again to the academic group map. Signed-off-by: Alex Bennée Cc: Frédéric Pétrot --- contrib/gitdm/group-map-academics | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH v2 28/29] target/ppc: unify cpu->has_work based on cs->interrupt_request

2022-10-03 Thread Fabiano Rosas
Matheus Ferst writes: > Now that cs->interrupt_request indicates if there is any unmasked > interrupt, checking if the CPU has work to do can be simplified to a > single check that works for all CPU models. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas > --- > target/ppc/cpu_in

Re: [RFC PATCH v2 27/29] target/ppc: introduce ppc_maybe_interrupt

2022-10-03 Thread Fabiano Rosas
Matheus Ferst writes: > The method checks if any pending interrupt is unmasked and calls > cpu_interrupt/cpu_reset_interrupt accordingly. Code that raises/lowers > or masks/unmasks interrupts should call this method to keep > CPU_INTERRUPT_HARD coherent with env->pending_interrupts. > > Signed-of

Re: [PATCH v5 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 00:03, Richard Henderson wrote: In preparation for TARGET_TB_PCREL, reduce reliance on absolute values by passing in pc difference. Signed-off-by: Richard Henderson --- target/arm/translate-a32.h | 2 +- target/arm/translate.h | 6 ++-- target/arm/translate-a64.c | 32 +

Re: [RFC PATCH v2 29/29] target/ppc: move the p*_interrupt_powersave methods to excp_helper.c

2022-10-03 Thread Fabiano Rosas
Matheus Ferst writes: > Move the methods to excp_helper.c and make them static. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas > --- > target/ppc/cpu_init.c| 102 --- > target/ppc/excp_helper.c | 102 +++

Re: [PATCH v5 5/9] target/arm: Remove gen_exception_internal_insn pc argument

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 00:03, Richard Henderson wrote: In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Since we always pass dc->pc_curr, fold the arithmetic to zero displacement. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 6 +++--- target/arm/translate.c

Re: [PATCH v5 4/9] target/arm: Change gen_exception_insn* to work on displacements

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 00:03, Richard Henderson wrote: In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Signed-off-by: Richard Henderson --- target/arm/translate.h| 5 +++-- target/arm/translate-a64.c| 28 ++- target/arm/translate-m-nocp.c | 6 ++

Re: [PATCH] Hexagon (gen_tcg_funcs.py): avoid duplicated tcg code on A_CVI_NEW

2022-10-03 Thread Philippe Mathieu-Daudé via
On 30/9/22 22:08, Matheus Tavares Bernardino wrote: Hexagon instructions with the A_CVI_NEW attribute produce a vector value that can be used in the same packet. The python function responsible for generating code for such instructions has a typo ("if" instead of "elif"), which makes genptr_dst_w

[PATCH] hw/arm/boot: set CPTR_EL3.ESM and SCR_EL3.EnTP2 when booting Linux with EL3

2022-10-03 Thread Jerome Forissier
According to the Linux kernel booting.rst [1], CPTR_EL3.ESM and SCR_EL3.EnTP2 must be initialized to 1 when EL3 is present and FEAT_SME is advertised. This has to be taken care of when QEMU boots directly into the kernel (i.e., "-M virt,secure=on -cpu max -kernel Image"). Cc: qemu-sta...@nongnu.or

Re: [PATCH] net: improve error message for missing netdev backend

2022-10-03 Thread Christian Schoenebeck
On Montag, 3. Oktober 2022 14:50:04 CEST Daniel P. Berrangé wrote: > On Mon, Oct 03, 2022 at 02:46:04PM +0200, Christian Schoenebeck wrote: > > On Montag, 3. Oktober 2022 12:06:12 CEST Daniel P. Berrangé wrote: > > > The current message when using '-net user...' with SLIRP disabled at > > > > > >

Re: [PATCH v6 13/18] accel/tcg: Do not align tb->page_addr[0]

2022-10-03 Thread Alex Bennée
Richard Henderson writes: > On 10/3/22 05:47, Alex Bennée wrote: >> Richard Henderson writes: >> >>> Let tb->page_addr[0] contain the offset within the page of the >>> start of the translation block. We need to recover this value >>> anyway at various points, and it is easier to discard the

  1   2   >