Re: [PULL 02/41] target/ppc: 603: fix restore of GPRs 0-3 on rfi

2022-02-01 Thread Cédric Le Goater
On 1/31/22 20:08, Mark Cave-Ayland wrote: On 31/01/2022 17:50, Cédric Le Goater wrote: diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index bc646c67a0f5..980f62fd7964 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -1164,6 +1164,10 @@ static void do_rfi

Re: [PATCH] linux-user: Move generic TARGET_RLIMIT* definitions to generic/target_resource.h

2022-02-01 Thread Laurent Vivier
Le 29/01/2022 à 20:46, Serge Belyshev a écrit : Signed-off-by: Serge Belyshev --- Compile tested, and also verified that target definitions did not change. linux-user/aarch64/target_resource.h| 1 + linux-user/alpha/target_resource.h | 21 ++ linux-user/arm/target_resourc

Re: [PATCH 3/4] acpi: fix OEM ID/OEM Table ID padding

2022-02-01 Thread Ani Sinha
On Tue, 1 Feb 2022, Igor Mammedov wrote: > On Mon, 31 Jan 2022 19:51:24 +0530 (IST) > Ani Sinha wrote: > > > On Mon, 31 Jan 2022, Igor Mammedov wrote: > > > > > On Mon, 31 Jan 2022 18:58:57 +0530 (IST) > > > Ani Sinha wrote: > > > > > > > On Mon, 31 Jan 2022, Igor Mammedov wrote: > > > > > >

Re: [PATCH] linux-user/syscall: Translate TARGET_RLIMIT_RTTIME

2022-02-01 Thread Laurent Vivier
Le 29/01/2022 à 20:48, Serge Belyshev a écrit : Signed-off-by: Serge Belyshev --- linux-user/generic/target_resource.h | 1 + linux-user/syscall.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/linux-user/generic/target_resource.h b/linux-user/generic/target_resourc

Re: [PATCH v1 1/1] target/i386: Mask xstate_bv based on the cpu enabled features

2022-02-01 Thread Igor Mammedov
On Mon, 31 Jan 2022 12:53:31 + David Edmondson wrote: > On Saturday, 2022-01-29 at 06:46:45 -03, Leonardo Bras wrote: > > > The following steps describe a migration bug: > > 1 - Bring up a VM with -cpu EPYC on a host with EPYC-Milan cpu > > 2 - Migrate to a host with EPYC-Naples cpu > > > >

Re: [PATCH v5 6/7] target/riscv: Add XVentanaCondOps custom extension

2022-02-01 Thread Philipp Tomsich
On Tue, 1 Feb 2022 at 04:22, Alistair Francis wrote: > > On Mon, Jan 31, 2022 at 9:23 PM Philipp Tomsich > wrote: > > > > This adds the decoder and translation for the XVentanaCondOps custom > > extension (vendor-defined by Ventana Micro Systems), which is > > documented at > > https://github.co

Re: [PATCH 00/11] target/ppc: powerpc_excp improvements [BookE] (6/n)

2022-02-01 Thread Cédric Le Goater
Hello Zoltan, On 1/29/22 01:07, BALATON Zoltan wrote: On Fri, 28 Jan 2022, Fabiano Rosas wrote: This series handles the BookE exception code. Tested the following machines/CPUs: == bamboo == 440ep, 460ex, 440-xilinx-w-dfpu == sam460ex == 440ep, 460ex, 440-xilinx-w-dfpu What OS did you test

Re: [RFC PATCH 1/1] i386: Remove features from Epyc-Milan cpu

2022-02-01 Thread Igor Mammedov
On Mon, 31 Jan 2022 17:18:04 -0300 Leonardo Bras Soares Passos wrote: > On Mon, Jan 31, 2022 at 3:04 PM Daniel P. Berrangé > wrote: > > > > On Mon, Jan 31, 2022 at 02:56:38PM -0300, Leonardo Bras Soares Passos > > wrote: > > > Hello Daniel, > > > > > > On Mon, Jan 31, 2022 at 6:08 AM Daniel

Re: [PATCH 00/16] arm: Fix handling of unrecognized functions in PSCI emulation

2022-02-01 Thread Cédric Le Goater
On 1/27/22 16:46, Peter Maydell wrote: This series fixes our handling of PSCI calls where the function ID is not recognized. These are supposed to return an error value, but currently we instead emulate the SMC or HVC instruction to trap to the guest at EL3 or EL2. Particularly of note for code r

Re: [PATCH 2/5] docs: Only mention iscsi in the man page when available

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 19:57 hat Peter Maydell geschrieben: > On Mon, 31 Jan 2022 at 17:33, Kevin Wolf wrote: > > > > If libiscsi is disabled in the build, the man page shouldn't contain > > information on how to construct iscsi URLs etc. > > > > This patch is best viewed with whitespace changes ignored

Re: [PATCH 3/4] acpi: fix OEM ID/OEM Table ID padding

2022-02-01 Thread Igor Mammedov
On Tue, 1 Feb 2022 13:25:20 +0530 (IST) Ani Sinha wrote: > On Tue, 1 Feb 2022, Igor Mammedov wrote: > > > On Mon, 31 Jan 2022 19:51:24 +0530 (IST) > > Ani Sinha wrote: > > > > > On Mon, 31 Jan 2022, Igor Mammedov wrote: > > > > > > > On Mon, 31 Jan 2022 18:58:57 +0530 (IST) > > > > Ani Sinh

[PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too

2022-02-01 Thread Thomas Huth
When running "make lcitool-refresh" in an out-of-tree build, it currently fails with an error message from git like this: fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). Fix it by changing to the source d

Re: "make check-acceptance" takes way too long

2022-02-01 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 07:31:39AM +0100, Stefano Brivio wrote: > Hi, > > On Tue, 25 Jan 2022 10:20:11 +0100 > Gerd Hoffmann wrote: > > > Hi, > > > > > IMHO the ideal scenario would be for us to have a kernel, initrd > > > containing just busybox tools for the key arch targets we care > > > a

Re: [RFC PATCH 1/1] i386: Remove features from Epyc-Milan cpu

2022-02-01 Thread Dr. David Alan Gilbert
* Babu Moger (babu.mo...@amd.com) wrote: > > On 1/31/22 14:18, Leonardo Bras Soares Passos wrote: > > On Mon, Jan 31, 2022 at 3:04 PM Daniel P. Berrangé > > wrote: > >> On Mon, Jan 31, 2022 at 02:56:38PM -0300, Leonardo Bras Soares Passos > >> wrote: > >>> Hello Daniel, > >>> > >>> On Mon, Jan

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Emanuele Giuseppe Esposito
On 31/01/2022 16:49, Paolo Bonzini wrote: > On 1/31/22 15:33, Kevin Wolf wrote: >> I feel "use this function if your code is going to be used by unit >> tests, but use qemu_mutex_iothread_locked() otherwise" is a very strange >> interface. I'm relatively sure that qemu_mutex_iothread_locked() is

Re: [PATCH v3 2/2] hw/i386/sgx: Attach SGX-EPC objects to machine

2022-02-01 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 12:35:07AM +0100, Philippe Mathieu-Daudé wrote: > Previously SGX-EPC objects were exposed in the QOM tree at a path > > /machine/unattached/device[nn] > > where the 'nn' varies depending on what devices were already created. > > With this change the SGX-EPC objects are

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Stefan Hajnoczi
On Mon, Jan 31, 2022 at 09:16:23AM -0700, Alex Williamson wrote: > On Fri, 28 Jan 2022 09:18:08 + > Stefan Hajnoczi wrote: > > > On Thu, Jan 27, 2022 at 02:22:53PM -0700, Alex Williamson wrote: > > > If the goal here is to restrict DMA between devices, ie. peer-to-peer > > > (p2p), why are we

Re: [PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too

2022-02-01 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 09:55:54AM +0100, Thomas Huth wrote: > When running "make lcitool-refresh" in an out-of-tree build, it > currently fails with an error message from git like this: > > fatal: not a git repository (or any parent up to mount point /) > Stopping at filesystem boundary (GIT_DI

Re: [PATCH v8 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-02-01 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 03:28:59AM -0300, Leonardo Bras wrote: > Add flags to io_writev and introduce io_flush as optional callback to > QIOChannelClass, allowing the implementation of zero copy writes by > subclasses. > > How to use them: > - Write data using qio_channel_writev*(...,QIO_CHANNEL_W

Re: [RFC PATCH 1/1] i386: Remove features from Epyc-Milan cpu

2022-02-01 Thread Daniel P . Berrangé
On Mon, Jan 31, 2022 at 05:18:04PM -0300, Leonardo Bras Soares Passos wrote: > On Mon, Jan 31, 2022 at 3:04 PM Daniel P. Berrangé > wrote: > > > > On Mon, Jan 31, 2022 at 02:56:38PM -0300, Leonardo Bras Soares Passos wrote: > > > What I meant here is: > > > 1 - Host with these feature bits start

Re: [PATCH v5 17/18] vfio-user: register handlers to facilitate migration

2022-02-01 Thread Stefan Hajnoczi
On Tue, Feb 01, 2022 at 03:49:40AM +, Jag Raman wrote: > > > > On Jan 28, 2022, at 3:29 AM, Stefan Hajnoczi wrote: > > > > On Thu, Jan 27, 2022 at 05:04:26PM +, Jag Raman wrote: > >> > >> > >>> On Jan 25, 2022, at 10:48 AM, Stefan Hajnoczi wrote: > >>> > >>> On Wed, Jan 19, 2022 at

Re: [PATCH v2 2/6] hw/hppa: Allow up to 16 emulated CPUs

2022-02-01 Thread Helge Deller
On 1/31/22 23:05, Richard Henderson wrote: > On 2/1/22 08:35, Helge Deller wrote: >> This brings the hppa_hardware.h file in sync with the copy in the >> SeaBIOS-hppa sources. >> >> In order to support up to 16 CPUs, it's required to move the HPA for >> MEMORY_HPA out of the address space of the 16

Re: [PATCH v3 1/2] hw/i386: Attach CPUs to machine

2022-02-01 Thread Daniel P . Berrangé
Cc libvir-list since this will (intentionally) break compatibility with current libvirt code that looks for "/machine/unattached/device[0]" in the assumption it is the first CPU. On Tue, Feb 01, 2022 at 12:35:06AM +0100, Philippe Mathieu-Daudé wrote: > Previously CPUs were exposed in the QOM tree

Re: [PATCH v6 02/33] include/block/block: split header into I/O and global state API

2022-02-01 Thread Emanuele Giuseppe Esposito
On 31/01/2022 16:58, Paolo Bonzini wrote: > On 1/31/22 15:54, Kevin Wolf wrote: >> So I guess the decision depends on what you're going to use the >> categories in the future. I get the feeling that we have one more >> category than this series introduces: >> >> * Global State (must run from the

Re: [PATCH v3 3/3] kvm: Support for querying fd-based stats

2022-02-01 Thread Daniel P . Berrangé
On Mon, Jan 31, 2022 at 01:43:12PM -0600, Mark Kanda wrote: > Add support for querying fd-based KVM stats - as introduced by Linux kernel > commit: > > cb082bfab59a ("KVM: stats: Add fd-based API to read binary stats data") > > Signed-off-by: Mark Kanda > --- > accel/kvm/kvm-all.c | 308 +++

Re: [PATCH v2] tests/9pfs: Use g_autofree and g_autoptr where possible

2022-02-01 Thread Greg Kurz
On Mon, 31 Jan 2022 18:43:22 +0100 Christian Schoenebeck wrote: > On Montag, 31. Januar 2022 17:39:30 CET Greg Kurz wrote: > > It is recommended to use g_autofree or g_autoptr as it reduces > > the odds of introducing memory leaks in future changes. Let's do > > that everywhere a glib allocation

[PATCH] memory: Make memory_region_readd_subregion() properly handle mapped aliases

2022-02-01 Thread David Hildenbrand
memory_region_readd_subregion() wants to readd a region by first removing it and then readding it. For readding, it doesn't use one of the memory_region_add_*() variants, which is why fail to re-increment the mr->mapped_via_alias counters, resulting in the assert(alias->mapped_via_alias >= 0) in me

[PATCH 2/2] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-01 Thread Thomas Huth
Support for CentOS 8 has stopped at the end of 2021, so let's switch to the Stream variant instead. Signed-off-by: Thomas Huth --- tests/docker/dockerfiles/centos8.docker | 4 ++-- tests/lcitool/refresh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test

Re: [PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too

2022-02-01 Thread Alex Bennée
Thomas Huth writes: > When running "make lcitool-refresh" in an out-of-tree build, it > currently fails with an error message from git like this: > > fatal: not a git repository (or any parent up to mount point /) > Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). >

Re: "make check-acceptance" takes way too long

2022-02-01 Thread Stefano Brivio
On Tue, 1 Feb 2022 09:06:25 + Daniel P. Berrangé wrote: > On Tue, Feb 01, 2022 at 07:31:39AM +0100, Stefano Brivio wrote: > > Hi, > > > > On Tue, 25 Jan 2022 10:20:11 +0100 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > IMHO the ideal scenario would be for us to have a kernel,

Re: [PATCH v6 02/33] include/block/block: split header into I/O and global state API

2022-02-01 Thread Paolo Bonzini
On 2/1/22 10:45, Emanuele Giuseppe Esposito wrote: That said, even if they are a different category, I think it makes sense to leave them in the same header file as I/O functions, because I/O functions are locked out between drained_begin and drained_end. Proposed category description: /* * "

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Thu, 27 Jan 2022 08:30:13 + > Stefan Hajnoczi wrote: > > > On Wed, Jan 26, 2022 at 04:13:33PM -0500, Michael S. Tsirkin wrote: > > > On Wed, Jan 26, 2022 at 08:07:36PM +, Dr. David Alan Gilbert wrote: > > > > * Stefan Hajnoczi (

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Paolo Bonzini
On 2/1/22 10:08, Emanuele Giuseppe Esposito wrote: + * + * This function should never be used in the block layer, please + * instead refer to qemu_in_main_thread(). This function should never be used in the block layer, because unit tests, block layer tools and qemu-storage-daemon do not hav

Re: [PATCH v3 3/3] kvm: Support for querying fd-based stats

2022-02-01 Thread Paolo Bonzini
On 1/31/22 20:43, Mark Kanda wrote: +for (i = 0; i < header->num_desc; ++i) { +struct kvm_stats_desc *pdesc = (void *)stats_desc + i * size_desc; +size_data = pdesc->size * sizeof(uint64_t); + +uint64_t *stats_data = g_malloc(size_data); + +ret = pread(stats_f

Re: [PATCH] memory: Make memory_region_readd_subregion() properly handle mapped aliases

2022-02-01 Thread Paolo Bonzini
On 2/1/22 11:09, David Hildenbrand wrote: memory_region_readd_subregion() wants to readd a region by first removing it and then readding it. For readding, it doesn't use one of the memory_region_add_*() variants, which is why fail to re-increment the mr->mapped_via_alias counters, resulting in th

Re: [PATCH 2/2] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-01 Thread Thomas Huth
Please ignore the "2/2" in the subject, this is meant to be a standalone patch. Thomas On 01/02/2022 11.19, Thomas Huth wrote: Support for CentOS 8 has stopped at the end of 2021, so let's switch to the Stream variant instead. Signed-off-by: Thomas Huth --- tests/docker/dockerfiles/cent

Re: [PATCH v3 1/3] qmp: Support for querying stats

2022-02-01 Thread Paolo Bonzini
On 1/31/22 20:43, Mark Kanda wrote: { "execute": "query-stats", "arguments" : { "target": "vm" } } { "return": { "list": [ { "provider": "kvm", "stats": [ { "name": "max_mmu_page_hash_collisions", "value": 0 }, { "name": "max_mmu_rmap_size", "value": 0

Re: [PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too

2022-02-01 Thread Philippe Mathieu-Daudé via
On 2/1/22 09:55, Thomas Huth wrote: > When running "make lcitool-refresh" in an out-of-tree build, it > currently fails with an error message from git like this: > > fatal: not a git repository (or any parent up to mount point /) > Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM

Re: [PATCH] memory: Make memory_region_readd_subregion() properly handle mapped aliases

2022-02-01 Thread Philippe Mathieu-Daudé via
On 2/1/22 11:09, David Hildenbrand wrote: > memory_region_readd_subregion() wants to readd a region by first > removing it and then readding it. For readding, it doesn't use one of > the memory_region_add_*() variants, which is why fail to re-increment the > mr->mapped_via_alias counters, resulting

Re: [PATCH 2/2] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-01 Thread Philippe Mathieu-Daudé via
On 2/1/22 11:19, Thomas Huth wrote: > Support for CentOS 8 has stopped at the end of 2021, so let's > switch to the Stream variant instead. "Run 'make lcitool-refresh' to update the generated centos8.docker." > Signed-off-by: Thomas Huth > --- > tests/docker/dockerfiles/centos8.docker | 4 ++--

Re: [PATCH 11/31] vhost: Add vhost_svq_valid_device_features to shadow vq

2022-02-01 Thread Eugenio Perez Martin
On Mon, Jan 31, 2022 at 4:49 PM Eugenio Perez Martin wrote: > > On Sat, Jan 29, 2022 at 9:11 AM Jason Wang wrote: > > > > > > 在 2022/1/22 上午4:27, Eugenio Pérez 写道: > > > This allows SVQ to negotiate features with the device. For the device, > > > SVQ is a driver. While this function needs to bypa

Re: [PATCH] block: bdrv_set_backing_hd(): use drained section

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
28.01.2022 17:12, Emanuele Giuseppe Esposito wrote: On 27/01/2022 15:13, Kevin Wolf wrote: Am 25.01.2022 um 11:12 hat Vladimir Sementsov-Ogievskiy geschrieben: 25.01.2022 12:24, Paolo Bonzini wrote: On 1/24/22 18:37, Vladimir Sementsov-Ogievskiy wrote: Graph modifications should be done in

Re: "make check-acceptance" takes way too long

2022-02-01 Thread Kashyap Chamarthy
On Tue, Jan 25, 2022 at 10:20:11AM +0100, Gerd Hoffmann wrote: > Hi, > > > IMHO the ideal scenario would be for us to have a kernel, initrd > > containing just busybox tools for the key arch targets we care > > about. Those could be used with direct kernel boot or stuffed > > into a disk iamge.

Re: [PATCH v3 1/3] qmp: Support for querying stats

2022-02-01 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 11:51:26AM +0100, Paolo Bonzini wrote: > On 1/31/22 20:43, Mark Kanda wrote: > > > > { "execute": "query-stats", "arguments" : { "target": "vm" } } > > { "return": { > > "list": [ > >{ "provider": "kvm", > > "stats": [ > >{ "name": "max_mmu

[PATCH 08/22] bsd-user: Remove bsd_type

2022-02-01 Thread Warner Losh
Remove keeping track of which type of bsd we're running on. It's no longer referenced in the code. Building bsd-user on NetBSD or OpenBSD isn't possible, let alone running that code. Stop pretending that we can do the cross BSD thing since there's been a large divergence since 2000 that makes this

Re: [PATCH] contrib/plugins: add mask plugin

2022-02-01 Thread Alex Bennée
Vasilev Oleg writes: > On 1/24/2022 3:26 PM, Alex Bennée wrote: > >> Oleg Vasilev writes: >> >>> From: Oleg Vasilev >>> >>> Plugin can be used to track statistics based on virtual address mask >>> matching. >>> Useful for tracking kernel vs user translation blocks. >> Could we have a bit mor

[PATCH 07/22] bsd-user/x86_64/target_arch_thread.h: Assume a FreeBSD target

2022-02-01 Thread Warner Losh
Since we can't run on anything else, assume for the moment that this is a FreeBSD target. In the future, we'll need to handle this properly via some include file in bsd-user/*bsd/x86_64/mumble.h. There's a number of other diffs that would be needed to make things work on OtherBSD, so it doesn't mak

[PATCH 01/22] bsd-user/main.c: Drop syscall flavor arg -bsd

2022-02-01 Thread Warner Losh
We've not realistically been able to actually run any bsd program on any other bsd program. They are too diverged to do this easily. The current code is setup to do it, but implementing it is hard. Stop pretending that we can do this. Signed-off-by: Warner Losh --- bsd-user/main.c | 12 -

[PATCH 05/22] bsd-user/arm/target_arch_cpu.h: Only support FreeBSD sys calls

2022-02-01 Thread Warner Losh
Since we don't build on OpenBSD, only do FreeBSD system calls here. In the future, we'll need to move this to some place like bsd-user/freebsd/arm/mumble.h, but until then just leave this inline. This reflects changes to the upstream. Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h

Re: [RFC PATCH] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
On 1/27/22 17:15, Kevin Wolf wrote: > Am 22.01.2022 um 14:49 hat Philippe Mathieu-Daudé geschrieben: >> When building on FreeBSD we get: >> >> [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o >> ../block/export/fuse.c:628:16: error: use of undeclared identifier >> 'FALLOC_F

[PATCH 14/22] bsd-user/freebsd/os-syscall.c: lock_iovec

2022-02-01 Thread Warner Losh
lock_iovec will lock an I/O vec and the memory to which it referrs and create a iovec in the host space that referrs to it, with full error unwinding. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 92 +++ 1 file changed, 92 insertions(+) diff --g

[PATCH 15/22] bsd-user/freebsd/os-syscall.c: unlock_iovec

2022-02-01 Thread Warner Losh
Releases the references to the iovec created by lock_iovec. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index c21759ae7ce..d49945f0fcc 10064

[PATCH 20/22] bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv

2022-02-01 Thread Warner Losh
Implement do_bsd_{read,pread,readv,preadv}. Connect them to the system call table. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 79 +++ bsd-user/freebsd/os-syscall.c | 24 +++ 2 files

[PATCH 02/22] bsd-user/x86_64/target_arch_cpu.h: int $80 never was a BSD system call on amd64

2022-02-01 Thread Warner Losh
Although initial versions of NetBSD did use int $80, it was replaced by syscall before any releases. OpenBSD and FreeBSD always did syscall. Signed-off-by: Warner Losh --- bsd-user/x86_64/target_arch_cpu.h | 58 --- 1 file changed, 58 deletions(-) diff --git a/bsd-us

[PATCH 06/22] bsd-user/arm/target_arch_thread.h: Assume a FreeBSD target

2022-02-01 Thread Warner Losh
Since we can't run on anything else, assume for the moment that this is a FreeBSD target. In the future, we'll need to handle this properly via some include file in bsd-user/*bsd/arm/mumble.h. There's a number of other diffs that would be needed to make things work on OtherBSD, so it doesn't make s

[PATCH 19/22] bsd-user: Add safe system call macros

2022-02-01 Thread Warner Losh
Add a series of macros to create system call macros that go via the safe_syscall path. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/syscall_defs.h | 47 + 1 file changed, 47 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-us

[PATCH 09/22] bsd-user/freebsd/os-syscall.c: Move syscall processing here

2022-02-01 Thread Warner Losh
While there is some commonality between *BSD syscall processing, there's a number of differences and the system call numbers and ABIs have been independent since the late 90s. Move FreeBSD's proessing here and delete it. The upstream implementation is somewhat different than the current implementa

Re: [PATCH 2/2] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-01 Thread Alex Bennée
Thomas Huth writes: > Support for CentOS 8 has stopped at the end of 2021, so let's > switch to the Stream variant instead. > > Signed-off-by: Thomas Huth Queued to testing/next, thanks. -- Alex Bennée

[PATCH 10/22] bsd-user: Move system call building to os-syscall.c

2022-02-01 Thread Warner Losh
Signed-off-by: Warner Losh --- bsd-user/freebsd/meson.build | 1 + bsd-user/meson.build | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/freebsd/meson.build b/bsd-user/freebsd/meson.build index 4b69cca7b90..f87c788e846 100644 --- a/bsd-user/freebsd/meson.build

[PATCH 03/22] bsd-user/x86_64/target_arch_cpu.h: Remove openbsd syscall

2022-02-01 Thread Warner Losh
This doesn't build on openbsd at the moment, and this could should arguably be in bsd-user/*bsd/x86_64 somewhere. Until we refactor to support OpenBSD/NetBSD again, drop it here. Signed-off-by: Warner Losh --- bsd-user/x86_64/target_arch_cpu.h | 27 --- 1 file changed, 8

[PATCH 04/22] bsd-user/i386/target_arch_cpu.h: Remove openbsd syscall

2022-02-01 Thread Warner Losh
This doesn't build on openbsd at the moment, and this could should arguably be in bsd-user/*bsd/i386 somewhere. Until we refactor to support OpenBSD/NetBSD again, drop it here. Signed-off-by: Warner Losh --- bsd-user/i386/target_arch_cpu.h | 84 +++-- 1 file changed,

[PATCH v3 1/2] block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate()

2022-02-01 Thread Philippe Mathieu-Daudé via
In order to safely maintain a mixture of #ifdef'ry with if-else-if ladder, rearrange the last statement (!mode) first. Since it is mutually exclusive with the other conditions, checking it first doesn't make any logical difference, but allows to add #ifdef'ry around in a more cleanly way. Suggeste

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Hanna Reitz
On 01.02.22 12:18, Vladimir Sementsov-Ogievskiy wrote: 28.01.2022 18:51, Hanna Reitz wrote: s->ioc must always be attached to the NBD node's AioContext.  If that context changes, s->ioc must be attached to the new context. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1990835 Signed-off-

[PATCH 00/22] bsd-user: Start upstreaming the system calls.

2022-02-01 Thread Warner Losh
This series of patches does two things. First, it starts to give up on the idea that you can run FooBSD binaries on BarBSD. They are too different to make that happen any time soon, though I've kept the support for Net/OpenBSD, even though they haven't built. We'll need a lot of work to make that h

[PATCH 11/22] bsd-user/sycall.c: Now obsolete, remove

2022-02-01 Thread Warner Losh
Signed-off-by: Warner Losh --- bsd-user/syscall.c | 516 - 1 file changed, 516 deletions(-) delete mode 100644 bsd-user/syscall.c diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c deleted file mode 100644 index d3322760f43..000 --- a/bsd-us

Re: [PATCH 28/31] vdpa: Expose VHOST_F_LOG_ALL on SVQ

2022-02-01 Thread Eugenio Perez Martin
On Sun, Jan 30, 2022 at 7:50 AM Jason Wang wrote: > > > 在 2022/1/22 上午4:27, Eugenio Pérez 写道: > > SVQ is able to log the dirty bits by itself, so let's use it to not > > block migration. > > > > Also, ignore set and clear of VHOST_F_LOG_ALL on set_features if SVQ is > > enabled. Even if the device

[PATCH 12/22] bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno

2022-02-01 Thread Warner Losh
Add the helper functions get_errno and host_to_target_errno. get_errno returns either the system call results, or the -errno when system call indicates failure by returning -1. Host_to_target_errno returns errno (since on FreeBSD they are the same on all architectures) along with a comment about wh

[PATCH 13/22] bsd-user/bsd-file.h: Implementation details for the filesystem calls

2022-02-01 Thread Warner Losh
An include file that pulls in all the definitions needed for the file related system calls. This also includes the host definitions to implement the system calls and some helper routines to lock/unlock different aspects of the system call arguments. Signed-off-by: Warner Losh --- bsd-user/bsd-fi

[PATCH 18/22] bsd-user: Define target_arg64

2022-02-01 Thread Warner Losh
target_arg64 is a generic way to extract 64-bits from a pair of arguments. On 32-bit platforms, it returns them joined together as appropriate. On 64-bit platforms, it returns the first arg because it's already 64-bits. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/qemu.h |

[PATCH 17/22] bsd-user: introduce target.h

2022-02-01 Thread Warner Losh
Create target.h. This file is intended to be simple and describe basic things about the architecture. If something is a basic feature of the architecture, it belongs here. Should we need something that's per-BSD there will be a target-os.h that will live in the per-bsd directories. Define regpairs

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 16:49 hat Paolo Bonzini geschrieben: > > > However, commit 5f50be9b5810293141bb53cfd0cb46e765367d56 changed the > > > stub to return false for a specific reason. > > > > I must admit I don't really understand the reasoning there: > > > > With this change, the stub qemu_mutex

[PATCH 16/22] bsd-user/freebsd/os-syscall.c: Tracing and error boilerplate

2022-02-01 Thread Warner Losh
Add in the tracing and this system call not implemented boilerplate. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index d4

Re: "make check-acceptance" takes way too long

2022-02-01 Thread Alex Bennée
Stefano Brivio writes: > On Tue, 1 Feb 2022 09:06:25 + > Daniel P. Berrangé wrote: > >> On Tue, Feb 01, 2022 at 07:31:39AM +0100, Stefano Brivio wrote: >> > Hi, >> > >> > On Tue, 25 Jan 2022 10:20:11 +0100 >> > Gerd Hoffmann wrote: >> > >> > > Hi, >> > > >> > > > IMHO the ideal s

Re: [PATCH v3 1/3] qmp: Support for querying stats

2022-02-01 Thread Daniel P . Berrangé
On Mon, Jan 31, 2022 at 01:43:10PM -0600, Mark Kanda wrote: > Introduce QMP support for querying stats. Provide a framework for adding new > stats and support for the following commands: > > - query-stats > Returns a list of all stats per target type (only VM and VCPU for now), with > additional o

[PATCH 21/22] bsd-user/bsd-file.h: Meat of the write system calls

2022-02-01 Thread Warner Losh
Implement write, writev, pwrite and pwritev and connect them to the system call dispatch routine. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 85 +++ bsd-user/freebsd/os-syscall.c | 23 ++

Re: [PATCH 18/31] vhost: Shadow virtqueue buffers forwarding

2022-02-01 Thread Eugenio Perez Martin
On Sun, Jan 30, 2022 at 7:47 AM Jason Wang wrote: > > > 在 2022/1/22 上午4:27, Eugenio Pérez 写道: > > @@ -272,6 +590,28 @@ void vhost_svq_set_svq_kick_fd(VhostShadowVirtqueue > > *svq, int svq_kick_fd) > > void vhost_svq_stop(VhostShadowVirtqueue *svq) > > { > > event_notifier_set_handler(&

[PATCH 22/22] bsd-user/freebsd/os-syscall.c: Implement exit

2022-02-01 Thread Warner Losh
Implement the exit system call. Bring in bsd-proc.h to contain all the process system call implementation and helper routines. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-proc.h | 43 +++ bsd-user/freebsd/os-syscall.c | 7

Re: [PATCH v3 2/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Hanna Reitz
On 01.02.22 12:26, Philippe Mathieu-Daudé wrote: When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) {

[PATCH v3 2/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) { ^ ../block/export/fuse.c:651:16: error: use

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
28.01.2022 18:51, Hanna Reitz wrote: s->ioc must always be attached to the NBD node's AioContext. If that context changes, s->ioc must be attached to the new context. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1990835 Signed-off-by: Hanna Reitz --- This is an RFC because I believe th

Re: [PATCH 00/11] target/ppc: powerpc_excp improvements [BookE] (6/n)

2022-02-01 Thread BALATON Zoltan
On Tue, 1 Feb 2022, Cédric Le Goater wrote: On 1/29/22 01:07, BALATON Zoltan wrote: On Fri, 28 Jan 2022, Fabiano Rosas wrote: This series handles the BookE exception code. Tested the following machines/CPUs: == bamboo == 440ep, 460ex, 440-xilinx-w-dfpu == sam460ex == 440ep, 460ex, 440-xilinx

Re: [PATCH] block.h: remove outdated comment

2022-02-01 Thread Hanna Reitz
On 31.01.22 13:56, Emanuele Giuseppe Esposito wrote: The comment "disk I/O throttling" doesn't make any sense at all any more. It was added in commit 0563e191516 to describe bdrv_io_limits_enable()/disable(), which were removed in commit 97148076, so the comment is just a forgotten leftover. Sug

Re: [PATCH] block/curl.c: Check error return from curl_easy_setopt()

2022-02-01 Thread Hanna Reitz
On 28.01.22 17:55, Peter Maydell wrote: Coverity points out that we aren't checking the return value from curl_easy_setopt() for any of the calls to it we make in block/curl.c. Fixes: Coverity CID 1459336, 1459482, 1460331 Signed-off-by: Peter Maydell --- Big fat disclaimer: tested only with 'm

Re: [PATCH v3 0/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 12:26 hat Philippe Mathieu-Daudé geschrieben: > Since v2: > - Rearrange if-else-if ladder first (Kevin) > > Philippe Mathieu-Daudé (2): > block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate() > block/export/fuse: Fix build failure on FreeBSD Thanks, applied to th

[PATCH v3 0/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
Since v2: - Rearrange if-else-if ladder first (Kevin) Philippe Mathieu-Daudé (2): block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate() block/export/fuse: Fix build failure on FreeBSD block/export/fuse.c | 45 + 1 file changed, 25 inse

Re: [PATCH] block.h: remove outdated comment

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 13:56 hat Emanuele Giuseppe Esposito geschrieben: > The comment "disk I/O throttling" doesn't make any sense at all > any more. It was added in commit 0563e191516 to describe > bdrv_io_limits_enable()/disable(), which were removed in commit > 97148076, so the comment is just a forg

Re: [PATCH v2] qsd: Document fuse's allow-other option

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 11:31 hat Hanna Reitz geschrieben: > We did not add documentation to the storage daemon's man page for fuse's > allow-other option when it was introduced, so do that now. > > Fixes: 8fc54f9428b9763f800 ("export/fuse: Add allow-other option") > Signed-off-by: Hanna Reitz Thanks,

Re: [PATCH v2 10/11] 9p: darwin: Implement compatibility for mknodat

2022-02-01 Thread Christian Schoenebeck
On Montag, 31. Januar 2022 23:26:46 CET Will Cohen wrote: > Upon further review, it looks like since 10.12 there's actually a > (not-heavily-documented) function that wraps this syscall and avoids the > need to call the private syscall directly: > https://opensource.apple.com/source/libpthread/libp

Re: [PATCH] qemu-img: Unify [-b [-F]] documentation

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 14:59 hat Hanna Reitz geschrieben: > qemu-img convert documents the backing file and backing format options > as follows: > [-B backing_file [-F backing_fmt]] > whereas qemu-img create has this: > [-b backing_file] [-F backing_fmt] > > That is, for convert, we document tha

Re: [PATCH v7 1/5] target/riscv: Ignore reserved bits in PTE for RV64

2022-02-01 Thread Weiwei Li
在 2022/2/1 上午11:31, Alistair Francis 写道: On Fri, Jan 28, 2022 at 7:11 PM Weiwei Li wrote: From: Guo Ren Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we need to ignore them. They cannot be a part of ppn. 1: The RISC-V Instruction Set Manual, Volume II: Privileged Architec

Re: [PATCH v7 3/5] target/riscv: add support for svnapot extension

2022-02-01 Thread Weiwei Li
在 2022/2/1 下午2:22, Alistair Francis 写道: On Fri, Jan 28, 2022 at 6:57 PM Weiwei Li wrote: - add PTE_N bit - add PTE_N bit check for inner PTE - update address translation to support 64KiB continuous region (napot_bits = 4) Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: A

Re: [PATCH 00/11] target/ppc: powerpc_excp improvements [BookE] (6/n)

2022-02-01 Thread Fabiano Rosas
BALATON Zoltan writes: > On Tue, 1 Feb 2022, Cédric Le Goater wrote: >> On 1/29/22 01:07, BALATON Zoltan wrote: >>> On Fri, 28 Jan 2022, Fabiano Rosas wrote: This series handles the BookE exception code. Tested the following machines/CPUs: == bamboo == 440ep, 460ex

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
01.02.2022 14:40, Hanna Reitz wrote: On 01.02.22 12:18, Vladimir Sementsov-Ogievskiy wrote: 28.01.2022 18:51, Hanna Reitz wrote: s->ioc must always be attached to the NBD node's AioContext.  If that context changes, s->ioc must be attached to the new context. Buglink: https://bugzilla.redhat.c

Re: [PATCH v2] tests/9pfs: Use g_autofree and g_autoptr where possible

2022-02-01 Thread Christian Schoenebeck
On Dienstag, 1. Februar 2022 11:11:37 CET Greg Kurz wrote: > On Mon, 31 Jan 2022 18:43:22 +0100 > > Christian Schoenebeck wrote: > > On Montag, 31. Januar 2022 17:39:30 CET Greg Kurz wrote: > > > It is recommended to use g_autofree or g_autoptr as it reduces > > > the odds of introducing memory l

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 12:55 hat Kevin Wolf geschrieben: > Am 31.01.2022 um 16:49 hat Paolo Bonzini geschrieben: > > > > However, commit 5f50be9b5810293141bb53cfd0cb46e765367d56 changed the > > > > stub to return false for a specific reason. > > > > > > I must admit I don't really understand the reasoni

Re: [PATCH V2 for-6.2 0/2] fixes for bdrv_co_block_status

2022-02-01 Thread Kevin Wolf
Am 13.01.2022 um 15:44 hat Peter Lieven geschrieben: > V1->V2: > Patch 1: Treat a hole just like an unallocated area. [Ilya] > Patch 2: Apply workaround only for pre-Quincy librbd versions and > ensure default striping and non child images. [Ilya] > > Peter Lieven (2): > block/rbd: f

[PULL 10/24] iotest 065: explicit compression type

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The test checks different options. It of course fails if set IMGOPTS='compression_type=zstd'. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy R

[PULL 17/24] iotest 39: use _qcow2_dump_header

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy _qcow2_dump_header has filter for compression type, so this change makes test pass with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20211223160144.1097696-16-vsement...@virtuozzo.com> Signed

Re: [PATCH] qemu-img: Unify [-b [-F]] documentation

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
31.01.2022 16:59, Hanna Reitz wrote: qemu-img convert documents the backing file and backing format options as follows: [-B backing_file [-F backing_fmt]] whereas qemu-img create has this: [-b backing_file] [-F backing_fmt] That is, for convert, we document that -F cannot be given with

[PULL 14/24] qcow2: simple case support for downgrading of qcow2 images with zstd

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy If image doesn't have any compressed cluster we can easily switch to zlib compression, which may allow to downgrade the image. That's mostly needed to support IMGOPTS='compression_type=zstd' in some iotests which do qcow2 downgrade. While being here also fix c

  1   2   3   4   >