Re: [PATCH RFC 0/5] Subject: [PATCH RFC 0/5] qapi: Add feature flags to enum members

2021-09-16 Thread Vladimir Sementsov-Ogievskiy
Great! Thanks for working on this! 15.09.2021 22:24, Markus Armbruster wrote: PATCH 1+2 add feature flags to enum members. Awkward due to an introspection design mistake; see PATCH 1 for details. Feedback welcome, in particular from management application guys. PATCH 3+4 implement policy depr

Re: [PATCH] qemu-storage-daemon: Only display FUSE help when FUSE is built-in

2021-09-16 Thread Kevin Wolf
Am 15.09.2021 um 23:36 hat Philippe Mathieu-Daudé geschrieben: > ping & Cc'ing qemu-trivial@ (reviewed twice) ... > > On 8/16/21 8:04 PM, Philippe Mathieu-Daudé wrote: > > When configuring QEMU with --disable-fuse, the qemu-storage-daemon > > still reports FUSE command line options in its help: >

Re: [PATCH v3 5/6] qapi: Add support for aliases

2021-09-16 Thread Markus Armbruster
Kevin Wolf writes: > Introduce alias definitions for object types (structs and unions). This > allows using the same QAPI type and visitor for many syntax variations > that exist in the external representation, like between QMP and the > command line. It also provides a new tool for evolving the

Re: [PATCH v5 06/16] tcg/s390x: Implement tcg_out_ld/st for vector types

2021-09-16 Thread David Hildenbrand
On 15.09.21 23:31, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 132 + 1 file changed, 120 insertions(+), 12 deletions(-) Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v5 10/16] tcg/s390x: Implement andc, orc, abs, neg, not vector operations

2021-09-16 Thread David Hildenbrand
On 15.09.21 23:31, Richard Henderson wrote: These logical and arithmetic operations are optional but trivial. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 1 + tcg/s390x/tcg-target.h | 11 ++- tcg/s390x/tcg-target.c.inc | 32

Re: Re: [RFC v6] virtio/vsock: add two more queues for datagram types

2021-09-16 Thread Stefan Hajnoczi
On Wed, Sep 15, 2021 at 08:59:17PM -0700, Jiang Wang . wrote: > On Tue, Sep 14, 2021 at 5:46 AM Stefan Hajnoczi wrote: > > On Mon, Sep 13, 2021 at 10:18:43PM +, Jiang Wang wrote: > > > diff --git a/hw/virtio/vhost-user-vsock.c b/hw/virtio/vhost-user-vsock.c > > > index 6095ed7349..e9ec0e1c00 1

Re: [PATCH 2/8] block: add BlockParentClass class

2021-09-16 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add a class that will unify block parents for blockdev-replace > functionality we are going to add. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-parent.h | 32 + > block/block-parent.c | 66 +++

[PATCH] target/sparc: Make sparc_cpu_dump_state() static

2021-09-16 Thread Philippe Mathieu-Daudé
The sparc_cpu_dump_state() function is only called within the same file. Make it static. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/cpu.h | 1 - target/sparc/cpu.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index ff8a

[PATCH v4 00/12] virtiofsd: Allow using file handles instead of O_PATH FDs

2021-09-16 Thread Hanna Reitz
Hi, v1 cover letter for an overview: https://listman.redhat.com/archives/virtio-fs/2021-June/msg00033.html v2 cover letter: https://listman.redhat.com/archives/virtio-fs/2021-June/msg00074.html v3 cover letter: https://listman.redhat.com/archives/virtio-fs/2021-July/msg00050.html Here in v4, t

[PATCH v4 04/12] virtiofsd: Use lo_inode_open() instead of openat()

2021-09-16 Thread Hanna Reitz
The xattr functions want a non-O_PATH FD, so they reopen the lo_inode.fd with the flags they need through /proc/self/fd. Similarly, lo_opendir() needs an O_RDONLY FD. Instead of the /proc/self/fd trick, it just uses openat(fd, "."), because the FD is guaranteed to be a directory, so this works.

[PATCH v4 07/12] virtiofsd: Let lo_inode_open() return a TempFd

2021-09-16 Thread Hanna Reitz
Strictly speaking, this is not necessary, because lo_inode_open() will always return a new FD owned by the caller, so TempFd.owned will always be true. The auto-cleanup is nice, though. Also, we get a more unified interface where you always get a TempFd when you need an FD for an lo_inode (regard

[PATCH v4 02/12] virtiofsd: Limit setxattr()'s creds-dropped region

2021-09-16 Thread Hanna Reitz
We only need to drop/switch our credentials for the (f)setxattr() call alone, not for the openat() or fchdir() around it. (Right now, this may not be that big of a problem, but with inodes being identified by file handles instead of an O_PATH fd, we will need open_by_handle_at() calls here, which

[PATCH v4 01/12] virtiofsd: Keep /proc/self/mountinfo open

2021-09-16 Thread Hanna Reitz
File handles are specific to mounts, and so name_to_handle_at() returns the respective mount ID. However, open_by_handle_at() is not content with an ID, it wants a file descriptor for some inode on the mount, which we have to open. We want to use /proc/self/mountinfo to find the mounts' root dire

[PATCH v4 05/12] virtiofsd: Add lo_inode_fd() helper

2021-09-16 Thread Hanna Reitz
Once we let lo_inode.fd be optional, we will need its users to open the file handle stored in lo_inode instead. This function will do that. For now, it just returns lo_inode.fd, though. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 159 +-- 1 fil

[PATCH v4 09/12] virtiofsd: Add lo_inode.fhandle

2021-09-16 Thread Hanna Reitz
This new field is an alternative to lo_inode.fd: Either of the two must be set. In case an O_PATH FD is needed for some lo_inode, it is either taken from lo_inode.fd, if valid, or a temporary FD is opened with open_by_handle_at(). Using a file handle instead of an FD has the advantage of keeping

[PATCH v4 03/12] virtiofsd: Add TempFd structure

2021-09-16 Thread Hanna Reitz
We are planning to add file handles to lo_inode objects as an alternative to lo_inode.fd. That means that everywhere where we currently reference lo_inode.fd, we will have to open a temporary file descriptor that needs to be closed after use. So instead of directly accessing lo_inode.fd, there wi

[PATCH v4 06/12] virtiofsd: Let lo_fd() return a TempFd

2021-09-16 Thread Hanna Reitz
Accessing lo_inode.fd must generally happen through lo_inode_fd(), and lo_fd() is no exception; and then it must pass on the TempFd it has received from lo_inode_fd(). (Note that all lo_fd() calls now use proper error handling, where all of them were in-line before; i.e. they were used in place of

[PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-09-16 Thread Hanna Reitz
Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefore, when the respective inode is unlinked, its inode ID will remain in use until we drop our lo_inode (and lo_inode_put() thus closes the FD). Therefore, lo_find() can safely use the inode ID as an l

[PATCH v4 08/12] virtiofsd: Pass lo_data to lo_inode_{fd,open}()

2021-09-16 Thread Hanna Reitz
In order to be able to use file handles for identifying lo_inode objects, we will add some global state to lo_data, which we will need in a future function to be called from lo_inode_fd() and lo_inode_open(). To prepare for this, pass a (non-const) lo_data pointer to lo_inode_fd() and lo_inode_ope

Re: [RFC PATCH 7/7] linux-user: Reorg cpu_signal_handler

2021-09-16 Thread Philippe Mathieu-Daudé
Hi Richard, On 9/14/21 12:05 AM, Richard Henderson wrote: > Split out two functions into linux-user/host/arch/host-signal.h. > Since linux-user requires a linux host, drop all of the BSD and > Solaris ifdefs. These should be recreated under bsd-user/ when > the current blanks there are filled. >

[PATCH v4 12/12] virtiofsd: Add lazy lo_do_find()

2021-09-16 Thread Hanna Reitz
lo_find() right now takes two lookup keys for two maps, namely the file handle for inodes_by_handle and the statx information for inodes_by_ids. However, we only need the statx information if looking up the inode by the file handle failed. There are two callers of lo_find(): The first one, lo_do_l

[PATCH v4 11/12] virtiofsd: Optionally fill lo_inode.fhandle

2021-09-16 Thread Hanna Reitz
When the inode_file_handles option is set, try to generate a file handle for new inodes instead of opening an O_PATH FD. Being able to open these again will require CAP_DAC_READ_SEARCH, so setting this option will result in us taking that capability. Generating a file handle returns the mount ID

Re: [RFC v6] virtio/vsock: add two more queues for datagram types

2021-09-16 Thread Stefano Garzarella
On Thu, Sep 16, 2021 at 08:26:15AM +0200, Stefano Garzarella wrote: On Wed, Sep 15, 2021 at 08:59:17PM -0700, Jiang Wang . wrote: On Tue, Sep 14, 2021 at 5:46 AM Stefan Hajnoczi wrote: On Mon, Sep 13, 2021 at 10:18:43PM +, Jiang Wang wrote: Datagram sockets are connectionless and unrelia

Re: [PATCH] tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist

2021-09-16 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > The virtiofsd currently crashes on s390x when doing something like > this in the guest: > > mkdir -p /mnt/myfs > mount -t virtiofs myfs /mnt/myfs > touch /mnt/myfs/foo.txt > stat -f /mnt/myfs/foo.txt > > The problem is that the fstatfs64 syscall is ca

Re: [PATCH] virtiofsd: Reverse req_list before processing it

2021-09-16 Thread Dr. David Alan Gilbert
* Sergio Lopez (s...@redhat.com) wrote: > With the thread pool disabled, we add the requests in the queue to a > GList, processing by iterating over there afterwards. > > For adding them, we're using "g_list_prepend()", which is more > efficient but causes the requests to be processed in reverse o

Re: [PATCH v2 0/2] elf2dmp: Fix minor Coverity nits

2021-09-16 Thread Peter Maydell
On Fri, 10 Sept 2021 at 18:08, Philippe Mathieu-Daudé wrote: > > This is a respin of Peter Maydell series, with slightly different > logic on the first patch. Quoting v1 cover [*]: > > Coverity complains about a couple of minor issues in elf2dmp: >* we weren't checking the return value from

Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms

2021-09-16 Thread Peter Maydell
On Mon, 13 Sept 2021 at 16:53, Richard Henderson wrote: > > On 9/13/21 7:21 AM, Peter Maydell wrote: > > On Mon, 13 Sept 2021 at 14:56, Richard Henderson > > wrote: > >> > >> On 9/13/21 2:54 AM, Peter Maydell wrote: > >>> +static void do_gvec_shri_s(unsigned vece, uint32_t dofs, uint32_t aofs, >

[PATCH v3 02/20] nubus-device: expose separate super slot memory region

2021-09-16 Thread Mark Cave-Ayland
According to "Designing Cards and Drivers for the Macintosh Family" each physical nubus slot can access 2 separate address ranges: a super slot memory region which is 256MB and a standard slot memory region which is 16MB. Currently a Nubus device uses the physical slot number to determine whethe

[PATCH v3 03/20] nubus-device: add device slot parameter

2021-09-16 Thread Mark Cave-Ayland
This prepares for allowing Nubus devices to be placed in a specific slot instead of always being auto-allocated by the bus itself. Signed-off-by: Mark Cave-Ayland --- hw/nubus/nubus-device.c | 6 ++ include/hw/nubus/nubus.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH v3 04/20] nubus: use bitmap to manage available slots

2021-09-16 Thread Mark Cave-Ayland
Convert nubus_device_realize() to use a bitmap to manage available slots to allow for future Nubus devices to be plugged into arbitrary slots from the command line. Update mac_nubus_bridge_init() to only allow slots 0x9 to 0xe on a Macintosh machines as documented in "Desigining Cards and Driver

[PATCH v3 05/20] nubus: move slot bitmap checks from NubusDevice realize() to BusClass check_address()

2021-09-16 Thread Mark Cave-Ayland
Allow Nubus to manage the slot allocations itself using the BusClass check_address() virtual function rather than managing this during NubusDevice realize(). Signed-off-by: Mark Cave-Ayland --- hw/nubus/nubus-bus.c| 37 + hw/nubus/nubus-device.c | 29

[PATCH v3 00/20] nubus: bus, device, bridge, IRQ and address space improvements

2021-09-16 Thread Mark Cave-Ayland
This patchset is the next set of changes required to boot MacOS on the q800 machine. The main aim of these patches is to improve the Nubus support so that devices can be plugged into the Nubus from the command line i.e. -device nubus-macfb[,slot=num][,romfile=decl.rom] At the moment the onl

[PATCH v3 01/20] nubus-device: rename slot_nb variable to slot

2021-09-16 Thread Mark Cave-Ayland
This is in preparation for creating a qdev property of the same name. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/nubus/nubus-device.c | 14 +++--- include/hw/nubus/nubus.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/nubus/n

[PATCH v3 06/20] nubus: implement BusClass get_dev_path()

2021-09-16 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/nubus/nubus-bus.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/nubus/nubus-bus.c b/hw/nubus/nubus-bus.c index 141876b579..63e7d66b95 100644 --- a/hw/nubus/nubus-bus.c +++ b/hw/nubus/nubus-bus.c

[PATCH v3 10/20] nubus-device: remove nubus_register_rom() and nubus_register_format_block()

2021-09-16 Thread Mark Cave-Ayland
Since there is no need to generate a dummy declaration ROM, remove both nubus_register_rom() and nubus_register_format_block(). These will shortly be replaced with a mechanism to optionally load a declaration ROM from disk to allow real images to be used within QEMU. Signed-off-by: Mark Cave-Aylan

[PATCH v3 07/20] nubus: add trace-events for empty slot accesses

2021-09-16 Thread Mark Cave-Ayland
Increase the max_access_size to 4 bytes for empty Nubus slot and super slot accesses to allow tracing of the Nubus enumeration process by the guest OS. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/nubus/nubus-bus.c | 10 +++--- hw/nubus/trace-events | 7 +

[PATCH v3 11/20] nubus-device: add romfile property for loading declaration ROMs

2021-09-16 Thread Mark Cave-Ayland
The declaration ROM is located at the top-most address of the standard slot space. Signed-off-by: Mark Cave-Ayland --- hw/nubus/nubus-device.c | 43 +++- include/hw/nubus/nubus.h | 6 ++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/hw/n

[PATCH v3 09/20] macfb: don't register declaration ROM

2021-09-16 Thread Mark Cave-Ayland
The macfb device is an on-board framebuffer and so is initialised by the system declaration ROM included within the MacOS toolbox ROM. Signed-off-by: Mark Cave-Ayland --- hw/display/macfb.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/display/macfb.c b/hw/display/macfb.c index d81

[PATCH v3 12/20] nubus: move nubus to its own 32-bit address space

2021-09-16 Thread Mark Cave-Ayland
According to "Designing Cards and Drivers for the Macintosh Family" the Nubus has its own 32-bit address space based upon physical slot addressing. Move Nubus to its own 32-bit address space and then use memory region aliases to map available slot and super slot ranges into the q800 system address

[PATCH v3 13/20] nubus-bridge: introduce separate NubusBridge structure

2021-09-16 Thread Mark Cave-Ayland
This is to allow the Nubus bridge to store its own additional state. Also update the comment in the file header to reflect that nubus-bridge is not specific to the Macintosh. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/nubus/nubus-bridge.c | 4 ++-- in

[PATCH v3 08/20] nubus: generate bus error when attempting to access empty slots

2021-09-16 Thread Mark Cave-Ayland
According to "Designing Cards and Drivers for the Macintosh Family" any attempt to access an unimplemented address location on Nubus generates a bus error. MacOS uses a custom bus error handler to detect empty Nubus slots, and with the current implementation assumes that all slots are occupied as

[PATCH v3 15/20] nubus: move NubusBus from mac-nubus-bridge to nubus-bridge

2021-09-16 Thread Mark Cave-Ayland
Now that Nubus has its own address space rather than mapping directly into the system bus, move the Nubus reference from MacNubusBridge to NubusBridge. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/q800.c | 2 +- hw/nubus/mac-nubus-bridge.c

[PATCH v3 16/20] nubus-bridge: embed the NubusBus object directly within nubus-bridge

2021-09-16 Thread Mark Cave-Ayland
Since nubus-bridge is a container for NubusBus then it should be embedded directly within the bridge device using qbus_create_inplace(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/q800.c | 2 +- hw/nubus/mac-nubus-bridge.c | 7 --- hw/nubus/

[PATCH v3 14/20] mac-nubus-bridge: rename MacNubusState to MacNubusBridge

2021-09-16 Thread Mark Cave-Ayland
This better reflects that the mac-nubus-bridge device is derived from the nubus-bridge device, and that the structure represents the state of the bridge device and not the Nubus itself. Also update the comment in the file header to reflect that mac-nubus-bridge is specific to the Macintosh. Signed

[PATCH v3 17/20] nubus-bridge: make slot_available_mask a qdev property

2021-09-16 Thread Mark Cave-Ayland
This is to allow Macintosh machines to further specify which slots are available since the number of addressable slots may not match the number of physical slots present in the machine. Signed-off-by: Mark Cave-Ayland --- hw/nubus/nubus-bridge.c | 7 +++ 1 file changed, 7 insertions(+) diff

[PATCH v3 20/20] q800: configure nubus available slots for Quadra 800

2021-09-16 Thread Mark Cave-Ayland
Slot 0x9 is reserved for use by the in-built framebuffer whilst only slots 0xc, 0xd and 0xe physically exist on the Quadra 800. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index fbc45a301f..63f427

[PATCH v3 18/20] nubus: add support for slot IRQs

2021-09-16 Thread Mark Cave-Ayland
Each Nubus slot has an IRQ line that can be used to request service from the CPU. Connect the IRQs to the Nubus bridge so that they can be wired up using qdev gpios accordingly, and introduce a new nubus_set_irq() function that can be used by Nubus devices to control the slot IRQ. Signed-off-by:

Re: [PULL 00/32] Block patches

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 18:53, Hanna Reitz wrote: > > The following changes since commit 0b6206b9c6825619cd721085fe082d7a0abc9af4: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210914-4' > into staging (2021-09-15 13:27:49 +0100) > > are available in the Git repository at

[PATCH v3 19/20] q800: wire up nubus IRQs

2021-09-16 Thread Mark Cave-Ayland
Nubus IRQs are routed to the CPU through the VIA2 device so wire up the IRQs using gpios accordingly. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index e34df1a829..fbc45a301f 100644 --- a/hw/m68k/q800

RE: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-16 Thread Cheng, Xuzhou
> diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c > index 189423bb3a..7a093156bd 100644 > --- a/hw/ssi/imx_spi.c > +++ b/hw/ssi/imx_spi.c > @@ -167,6 +167,8 @@ static void imx_spi_flush_txfifo(IMXSPIState *s) > DPRINTF("Begin: TX Fifo Size = %d, RX Fifo Size = %d\n", > fifo32_nu

Re: [PATCH 2/8] block: add BlockParentClass class

2021-09-16 Thread Vladimir Sementsov-Ogievskiy
16.09.2021 11:34, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add a class that will unify block parents for blockdev-replace functionality we are going to add. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-parent.h | 32 + block/bloc

Re: [PULL 0/4] Update meson version

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 23:00, Paolo Bonzini wrote: > > On 15/09/21 19:34, Peter Maydell wrote: > >> Paolo Bonzini (4): > >>meson: bump submodule to 0.58.2 > >>meson: switch minimum meson version to 0.58.2 > >>hexagon: use env keyword argument to pass PYTHONPATH > >>

Re: [PATCH] target/sparc: Make sparc_cpu_dump_state() static

2021-09-16 Thread Laurent Vivier
Le 16/09/2021 à 10:40, Philippe Mathieu-Daudé a écrit : > The sparc_cpu_dump_state() function is only called within > the same file. Make it static. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sparc/cpu.h | 1 - > target/sparc/cpu.c | 2 +- > 2 files changed, 1 insertion(+), 2 delet

Re: [PATCH] intel_iommu: Fix typo in comments

2021-09-16 Thread Laurent Vivier
Le 30/07/2021 à 15:27, Philippe Mathieu-Daudé a écrit : > On 7/30/21 3:49 AM, Cai Huoqing wrote: >> Fix typo: >> *Unknwon ==> Unknown >> *futher ==> further >> *configed ==> configured >> >> Signed-off-by: Cai Huoqing >> --- >> hw/i386/intel_iommu.c | 8 >> 1 file changed, 4 insertion

Re: [PATCH, trivial, for-6.1] target/i386: spelling: occured=>occurred

2021-09-16 Thread Laurent Vivier
Le 18/08/2021 à 16:13, Michael Tokarev a écrit : > Signed-off-by: Michael Tokarev > --- > accel/kvm/kvm-all.c | 2 +- > target/i386/cpu-sysemu.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c > index 0125c17edb..cace5ffe

Re: [PATCH] hw/vfio: Fix typo in comments

2021-09-16 Thread Laurent Vivier
Le 30/07/2021 à 13:26, Philippe Mathieu-Daudé a écrit : > On 7/30/21 3:26 AM, Cai Huoqing wrote: >> Fix typo in comments: >> *programatically ==> programmatically >> *disconecting ==> disconnecting >> *mulitple ==> multiple >> *timout ==> timeout >> *regsiter ==> register >> *forumula ==> for

Re: [PATCH v3 04/20] nubus: use bitmap to manage available slots

2021-09-16 Thread Philippe Mathieu-Daudé
On 9/16/21 12:05 PM, Mark Cave-Ayland wrote: > Convert nubus_device_realize() to use a bitmap to manage available slots to > allow > for future Nubus devices to be plugged into arbitrary slots from the command > line. > > Update mac_nubus_bridge_init() to only allow slots 0x9 to 0xe on a Macinto

Re: [PATCH v3 05/20] nubus: move slot bitmap checks from NubusDevice realize() to BusClass check_address()

2021-09-16 Thread Philippe Mathieu-Daudé
On 9/16/21 12:05 PM, Mark Cave-Ayland wrote: > Allow Nubus to manage the slot allocations itself using the BusClass > check_address() > virtual function rather than managing this during NubusDevice realize(). > > Signed-off-by: Mark Cave-Ayland > --- > hw/nubus/nubus-bus.c| 37 +

Re: [PATCH v11 01/10] arm: Move PMC register definitions to cpu.h

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > We will need PMC register definitions in accel specific code later. > Move all constant definitions to common arm headers so we can reuse > them. > > Signed-off-by: Alexander Graf Subject should say internals.h. Otherwise Reviewed-by: Pet

Re: [PATCH] target/avr: Fix compiler errors (-Werror=enum-conversion)

2021-09-16 Thread Laurent Vivier
Le 06/07/2021 à 20:09, Stefan Weil a écrit : > ../target/avr/translate.c: In function ‘gen_jmp_ez’: > ../target/avr/translate.c:1012:22: error: implicit conversion from ‘enum > ’ to ‘DisasJumpType’ [-Werror=enum-conversion] > 1012 | ctx->base.is_jmp = DISAS_LOOKUP; > |

Re: [PATCH RESEND 1/1] multi-process: fix usage information

2021-09-16 Thread Laurent Vivier
Le 13/07/2021 à 02:47, Dongli Zhang a écrit : > From source code, the 'devid' of x-remote-object should be one of devices > in remote QEMU process. > > Signed-off-by: Dongli Zhang > Reviewed-by: Jagannathan Raman > --- > Resend to be applied as trivial patch. > > I have verified by reading the

Re: [PATCH v2] qobject: Fix maybe uninitialized in qdict_array_split

2021-09-16 Thread Laurent Vivier
Le 15/06/2021 à 15:09, Janosch Frank a écrit : > Lets make the compiler happy. > Found on gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1) > > Signed-off-by: Janosch Frank > Reviewed-by: Philippe Mathieu-Daudé > --- > qobject/block-qdict.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(

Re: [PATCH v11 03/10] hvf: Introduce hvf_arch_init() callback

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > We will need to install a migration helper for the ARM hvf backend. > Let's introduce an arch callback for the overall hvf init chain to > do so. > > Signed-off-by: Alexander Graf > --- > accel/hvf/hvf-accel-ops.c | 3 ++- > include/sysemu

Re: [PATCH 5/8] qdev: improve find_device_state() to distinguish simple not found case

2021-09-16 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > We'll need this for realizing qdev_find_child() in the next commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > softmmu/qdev-monitor.c | 48 +- > 1 file changed, 33 insertions(+), 15 deletions(-) > > diff

Re: [PATCH] target/sparc: Make sparc_cpu_dump_state() static

2021-09-16 Thread Mark Cave-Ayland
On 16/09/2021 09:40, Philippe Mathieu-Daudé wrote: The sparc_cpu_dump_state() function is only called within the same file. Make it static. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/cpu.h | 1 - target/sparc/cpu.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff -

Re: [PATCH v2 25/53] target/sparc: convert to use format_state instead of dump_state

2021-09-16 Thread Mark Cave-Ayland
On 14/09/2021 15:20, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- target/sparc/cpu.c | 85 +- target/sparc/cpu.h | 2 +- 2 files changed, 47 insertions(+), 40 deletions(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c i

Re: [PATCH v2 48/53] target/sparc: convert to use format_tlb callback

2021-09-16 Thread Mark Cave-Ayland
On 14/09/2021 15:20, Daniel P. Berrangé wrote: Change the "info tlb" implementation to use the format_tlb callback. Signed-off-by: Daniel P. Berrangé --- target/sparc/cpu.c| 1 + target/sparc/cpu.h| 1 + target/sparc/mmu_helper.c | 43 -

Re: [PATCH v3 11/20] nubus-device: add romfile property for loading declaration ROMs

2021-09-16 Thread Philippe Mathieu-Daudé
On 9/16/21 12:05 PM, Mark Cave-Ayland wrote: > The declaration ROM is located at the top-most address of the standard slot > space. > > Signed-off-by: Mark Cave-Ayland > --- > hw/nubus/nubus-device.c | 43 +++- > include/hw/nubus/nubus.h | 6 ++ > 2 file

Re: [PATCH] net: Add "info neighbors" command

2021-09-16 Thread Marc-André Lureau
Hi On Sat, Sep 4, 2021 at 10:26 AM Markus Armbruster wrote: > Doug Evans writes: > > > On Fri, Sep 3, 2021 at 6:08 AM Markus Armbruster > wrote: > > > >> Doug Evans writes: > >> > >> > This command dumps the ARP and NDP tables maintained within slirp. > >> > One use-case for it is showing the

[PATCH] monitor: Tidy up find_device_state()

2021-09-16 Thread Markus Armbruster
Commit 6287d827d4 "monitor: allow device_del to accept QOM paths" extended find_device_state() to accept QOM paths in addition to qdev IDs. This added a checked conversion to TYPE_DEVICE at the end, which duplicates the check done for the qdev ID case earlier, except it sets a *different* error: G

Re: [PATCH] monitor: Tidy up find_device_state()

2021-09-16 Thread Daniel P . Berrangé
On Thu, Sep 16, 2021 at 01:17:07PM +0200, Markus Armbruster wrote: > Commit 6287d827d4 "monitor: allow device_del to accept QOM paths" > extended find_device_state() to accept QOM paths in addition to qdev > IDs. This added a checked conversion to TYPE_DEVICE at the end, which > duplicates the che

Re: [PATCH RFC v2 04/16] vfio-user: connect vfio proxy to remote server

2021-09-16 Thread Stefan Hajnoczi
On Wed, Sep 15, 2021 at 07:14:30PM +, John Johnson wrote: > > > > On Sep 15, 2021, at 6:04 AM, Stefan Hajnoczi wrote: > > > > On Wed, Sep 15, 2021 at 12:21:10AM +, John Johnson wrote: > >> > >> > >>> On Sep 14, 2021, at 6:06 AM, Stefan Hajnoczi wrote: > >>> > >>> On Mon, Sep 13, 202

Re: [PATCH v11 02/10] hvf: Add execute to dirty log permission bitmap

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > Hvf's permission bitmap during and after dirty logging does not include > the HV_MEMORY_EXEC permission. At least on Apple Silicon, this leads to > instruction faults once dirty logging was enabled. > > Add the bit to make it work properly.

Re: [PATCH v11 04/10] hvf: Add Apple Silicon support

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > With Apple Silicon available to the masses, it's a good time to add support > for driving its virtualization extensions from QEMU. > > This patch adds all necessary architecture specific code to get basic VMs > working, including save/restor

Re: [PATCH v11 05/10] arm/hvf: Add a WFI handler

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > From: Peter Collingbourne > > Sleep on WFI until the VTIMER is due but allow ourselves to be woken > up on IPI. > > In this implementation IPI is blocked on the CPU thread at startup and > pselect() is used to atomically unblock the signal

[PATCH V3] block/rbd: implement bdrv_co_block_status

2021-09-16 Thread Peter Lieven
the qemu rbd driver currently lacks support for bdrv_co_block_status. This results mainly in incorrect progress during block operations (e.g. qemu-img convert with an rbd image as source). This patch utilizes the rbd_diff_iterate2 call from librbd to detect allocated and unallocated (all zero area

Re: [PATCH v11 06/10] hvf: arm: Implement -cpu host

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > Now that we have working system register sync, we push more target CPU > properties into the virtual machine. That might be useful in some > situations, but is not the typical case that users want. > > So let's add a -cpu host option that al

Re: [PATCH v11 07/10] hvf: arm: Implement PSCI handling

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > We need to handle PSCI calls. Most of the TCG code works for us, > but we can simplify it to only handle aa64 mode and we need to > handle SUSPEND differently. > > This patch takes the TCG code as template and duplicates it in HVF. > > To te

Re: [PULL 14/14] hw/arm/aspeed: Add Fuji machine type

2021-09-16 Thread Cédric Le Goater
On 9/14/21 17:22, Richard Henderson wrote: On 9/14/21 5:26 AM, Peter Maydell wrote: (2) RAM blocks should have a length that fits inside a signed 32-bit type on 32-bit hosts (at least I assume this is where the 2047MB limit is coming from; in theory this ought to be improveable bu

Re: [PATCH v11 10/10] arm: tcg: Adhere to SMCCC 1.3 section 5.2

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > 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 must > return this error code when it receives: > > *

Re: [PATCH v11 09/10] hvf: arm: Add rudimentary PMC support

2021-09-16 Thread Peter Maydell
On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: > > We can expose cycle counters on the PMU easily. To be as compatible as > possible, let's do so, but make sure we don't expose any other architectural > counters that we can not model yet. > > This allows OSs to work that require PMU support.

Re: [PATCH v5 0/6] block/rbd: migrate to coroutines and add write zeroes support

2021-09-16 Thread Peter Lieven
Am 09.07.21 um 12:21 schrieb Kevin Wolf: Am 08.07.2021 um 20:23 hat Peter Lieven geschrieben: Am 08.07.2021 um 14:18 schrieb Kevin Wolf : Am 07.07.2021 um 20:13 hat Peter Lieven geschrieben: Am 06.07.2021 um 17:25 schrieb Kevin Wolf : Am 06.07.2021 um 16:55 hat Peter Lieven geschrieben: I wil

Re: [PATCH RFC 00/13] hw/nvme: experimental user-creatable objects

2021-09-16 Thread Kevin Wolf
Am 14.09.2021 um 22:37 hat Klaus Jensen geschrieben: > From: Klaus Jensen > > Hi, > > This is an attempt at adressing a bunch of issues that have presented > themselves since we added subsystem support. It's been brewing for a > while now. > > Fundamentally, I've come to the conclusion that mod

Re: [PATCH v3 01/10] hw/acpi: Add VIOT table

2021-09-16 Thread Eric Auger
Hi Jean, On 9/14/21 4:19 PM, Jean-Philippe Brucker wrote: > Add a function that generates a Virtual I/O Translation table (VIOT), > describing the topology of paravirtual IOMMUs. The table is created when > instantiating a virtio-iommu device. It contains a virtio-iommu node and > PCI Range nodes

Re: [PATCH] hw/intc: GIC maintenance interrupt not triggered

2021-09-16 Thread Peter Maydell
On Thu, 16 Sept 2021 at 05:36, Philippe Mathieu-Daudé wrote: > > On 9/15/21 10:58 PM, Shashi Mallela wrote: > > During sbsa acs level 3 testing,it is seen that the GIC > > maintenance interrupts are not triggered and the related test > > cases failed.On debugging the cause,found that the value of

Re: [PATCH v3 04/10] hw/arm/virt: Reject instantiation of multiple IOMMUs

2021-09-16 Thread Eric Auger
Hi Jean, On 9/14/21 4:19 PM, Jean-Philippe Brucker wrote: > We do not support instantiating multiple IOMMUs. Before adding a > virtio-iommu, check that no other IOMMU is present. This will detect > both "iommu=smmuv3" machine parameter and another virtio-iommu instance. > > Fixes: 70e89132c9 ("hw/

Re: [PATCH v3 12/20] nubus: move nubus to its own 32-bit address space

2021-09-16 Thread BALATON Zoltan
On Thu, 16 Sep 2021, Mark Cave-Ayland wrote: According to "Designing Cards and Drivers for the Macintosh Family" the Nubus has its own 32-bit address space based upon physical slot addressing. Move Nubus to its own 32-bit address space and then use memory region aliases to map available slot and

Re: [PATCH] target/sparc: Make sparc_cpu_dump_state() static

2021-09-16 Thread Laurent Vivier
Le 16/09/2021 à 10:40, Philippe Mathieu-Daudé a écrit : > The sparc_cpu_dump_state() function is only called within > the same file. Make it static. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sparc/cpu.h | 1 - > target/sparc/cpu.c | 2 +- > 2 files changed, 1 insertion(+), 2 delet

Re: [PATCH 5/8] qdev: improve find_device_state() to distinguish simple not found case

2021-09-16 Thread Vladimir Sementsov-Ogievskiy
16.09.2021 13:48, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: We'll need this for realizing qdev_find_child() in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- softmmu/qdev-monitor.c | 48 +- 1 file changed, 33 in

Re: [PATCH RFC 0/5] Subject: [PATCH RFC 0/5] qapi: Add feature flags to enum members

2021-09-16 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Great! Thanks for working on this! > > 15.09.2021 22:24, Markus Armbruster wrote: >> PATCH 1+2 add feature flags to enum members. Awkward due to an >> introspection design mistake; see PATCH 1 for details. Feedback >> welcome, in particular from management

Re: [PATCH 2/3] hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35

2021-09-16 Thread Julia Suvorova
On Tue, Sep 14, 2021 at 6:54 AM Ani Sinha wrote: > > Change caf108bc58790 ("hw/i386/acpi-build: Add ACPI PCI hot-plug methods to > Q35") > selects an IO address range for acpi based PCI hotplug for q35 arbitrarily. It > starts at address 0x0cc4 and ends at 0x0cdb. At the time when the patch was >

Re: [PATCH v3 1/1] python: Update for pylint 2.10

2021-09-16 Thread Daniel P . Berrangé
On Wed, Sep 15, 2021 at 11:40:31AM -0400, John Snow wrote: > A few new annoyances. Of note is the new warning for an unspecified > encoding when opening a text file, which actually does indicate a > potentially real problem; see > https://www.python.org/dev/peps/pep-0597/#motivation > > Use LC_CTY

Re: [PATCH v3 11/20] nubus-device: add romfile property for loading declaration ROMs

2021-09-16 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 9/16/21 12:05 PM, Mark Cave-Ayland wrote: >> The declaration ROM is located at the top-most address of the standard slot >> space. >> >> Signed-off-by: Mark Cave-Ayland >> --- >> hw/nubus/nubus-device.c | 43 +++- >> incl

Re: [PATCH RFC 0/5] Subject: [PATCH RFC 0/5] qapi: Add feature flags to enum members

2021-09-16 Thread Vladimir Sementsov-Ogievskiy
16.09.2021 15:57, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Great! Thanks for working on this! 15.09.2021 22:24, Markus Armbruster wrote: PATCH 1+2 add feature flags to enum members. Awkward due to an introspection design mistake; see PATCH 1 for details. Feedback welco

[PATCH v2 1/3] bios-tables-test: allow changes in DSDT ACPI tables for q35

2021-09-16 Thread Ani Sinha
We are going to commit a change to fix IO address range allocated for acpi pci hotplug in q35. This affects DSDT tables. This change allows DSDT table modification so that unit tests are not broken. Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h

hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35

2021-09-16 Thread Ani Sinha
Here's sending v2. changelog : v1: original patch. v2: typo fixed. reviewed-by tags added. This issue has been reported here: https://gitlab.com/qemu-project/qemu/-/issues/561 We have disucssed this issue at length here: https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg02146.html This i

Re: [PATCH v3 01/16] python: Update for pylint 2.10

2021-09-16 Thread Alex Bennée
John Snow writes: > A few new annoyances. Of note is the new warning for an unspecified > encoding when opening a text file, which actually does indicate a > potentially real problem; see > https://www.python.org/dev/peps/pep-0597/#motivation > > Use LC_CTYPE to determine an encoding to use for

[PATCH v2 2/3] hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35

2021-09-16 Thread Ani Sinha
Change caf108bc58790 ("hw/i386/acpi-build: Add ACPI PCI hot-plug methods to Q35") selects an IO address range for acpi based PCI hotplug for q35 arbitrarily. It starts at address 0x0cc4 and ends at 0x0cdb. At the time when the patch was written but the final version of the patch was not yet pushed

Re: [PATCH] hw/rtc/pl031: Send RTC_CHANGE QMP event

2021-09-16 Thread Peter Maydell
On Thu, 9 Sept 2021 at 13:24, Eric Auger wrote: > > The PL031 currently is not able to report guest RTC change to the QMP > monitor as opposed to mc146818 or spapr RTCs. This patch adds the call > to qapi_event_send_rtc_change() when the Load Register is written. The > value that is reported corre

[PATCH v2 3/3] bios-tables-test: Update ACPI DSDT table golden blobs for q35

2021-09-16 Thread Ani Sinha
We have modified the IO address range for ACPI pci hotplug in q35. See change: 5adcc9e39e6a5 ("hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35") The ACPI DSDT table golden blobs must be regenrated in order to make the unit tests pass. This change updates the golden AC

  1   2   3   4   >