[PATCH v8 3/4] kvm: expose struct KVMState

2022-09-29 Thread Chenyi Qiang
Expose struct KVMState out of kvm-all.c so that the field of struct KVMState can be accessed when defining target-specific accelerator properties. Signed-off-by: Chenyi Qiang --- accel/kvm/kvm-all.c | 74 --- include/sysemu/kvm_int.h | 75

[PATCH v8 4/4] i386: add notify VM exit support

2022-09-29 Thread Chenyi Qiang
There are cases that malicious virtual machine can cause CPU stuck (due to event windows don't open up), e.g., infinite loop in microcode when nested #AC (CVE-2015-5307). No event window means no event (NMI, SMI and IRQ) can be delivered. It leads the CPU to be unavailable to host or other VMs. Not

[PATCH v8 2/4] kvm: allow target-specific accelerator properties

2022-09-29 Thread Chenyi Qiang
From: Paolo Bonzini Several hypervisor capabilities in KVM are target-specific. When exposed to QEMU users as accelerator properties (i.e. -accel kvm,prop=value), they should not be available for all targets. Add a hook for targets to add their own properties to -accel kvm, for now no such prop

[PATCH v8 1/4] i386: kvm: extend kvm_{get, put}_vcpu_events to support pending triple fault

2022-09-29 Thread Chenyi Qiang
For the direct triple faults, i.e. hardware detected and KVM morphed to VM-Exit, KVM will never lose them. But for triple faults sythesized by KVM, e.g. the RSM path, if KVM exits to userspace before the request is serviced, userspace could migrate the VM and lose the triple fault. A new flag KVM_

Re: [PATCH 03/10] mac_{old|new}world: Set default values for some local variables

2022-09-29 Thread Mark Cave-Ayland
On 25/09/2022 10:16, BALATON Zoltan wrote: On Sun, 25 Sep 2022, Mark Cave-Ayland wrote: On 17/09/2022 00:07, BALATON Zoltan wrote: Some lines can be dropped making the code flow simpler and easier to follow by setting default values at variable declaration for some variables in both mac_oldwor

Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-29 Thread Thomas Huth
On 27/09/2022 23.35, Alex Bennée wrote: It seems the depth of path we need to support can vary depending on the order of the init constructors getting called. It seems --enable-lto shuffles things around just enough to push you over the limit. Signed-off-by: Alex Bennée Fixes: https://gitlab.co

Re: [PATCH v2 03/13] mac_{old|new}world: Set tbfreq at declaration

2022-09-29 Thread Mark Cave-Ayland
On 25/09/2022 13:38, BALATON Zoltan wrote: The tbfreq variable is only set once in an if-else which can be done at the variable declaration saving some lines of code and making it simpler. Signed-off-by: BALATON Zoltan --- hw/ppc/mac_newworld.c | 9 + hw/ppc/mac_oldworld.c | 9 +

[PATCH v8 0/4] Enable notify VM exit

2022-09-29 Thread Chenyi Qiang
Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT. The detailed info can be seen in Patch 4. The corresponding KVM support can be found in linux 6.0-rc

[RESEND PATCH v8 0/4] Enable notify VM exit

2022-09-29 Thread Chenyi Qiang
There's a minor issue in previous version. Sorry for that and please ignore that version. Resend the patch set. --- Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X8

Re: [PATCH v2 2/4] target/loongarch: bstrins.w need set dest register EXT_SIGN

2022-09-29 Thread gaosong
在 2022/9/28 下午11:13, Richard Henderson 写道: On 9/26/22 23:48, Song Gao wrote: Signed-off-by: Song Gao ---   target/loongarch/insn_trans/trans_bit.c.inc | 4 ++--   1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/loongarch/insn_trans/trans_bit.c.inc b/target/loongarch/insn_

[RESEND PATCH v8 2/4] kvm: allow target-specific accelerator properties

2022-09-29 Thread Chenyi Qiang
From: Paolo Bonzini Several hypervisor capabilities in KVM are target-specific. When exposed to QEMU users as accelerator properties (i.e. -accel kvm,prop=value), they should not be available for all targets. Add a hook for targets to add their own properties to -accel kvm, for now no such prop

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

2022-09-29 Thread Mark Cave-Ayland
On 25/09/2022 10:26, BALATON Zoltan wrote: On Sun, 25 Sep 2022, Mark Cave-Ayland wrote: On 17/09/2022 00:07, 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: BALATON

[RESEND PATCH v8 4/4] i386: add notify VM exit support

2022-09-29 Thread Chenyi Qiang
There are cases that malicious virtual machine can cause CPU stuck (due to event windows don't open up), e.g., infinite loop in microcode when nested #AC (CVE-2015-5307). No event window means no event (NMI, SMI and IRQ) can be delivered. It leads the CPU to be unavailable to host or other VMs. Not

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

2022-09-29 Thread Mark Cave-Ayland
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/ppc/mac_oldworld.c index cb67e44081..75fbd2a7df 100644 --- a/hw/ppc/mac_oldworld.c +++ b/h

Re: [PATCH v2 4/4] target/loongarch: flogb_{s/d} add set float_flag_divbyzero

2022-09-29 Thread gaosong
在 2022/9/28 下午11:24, Richard Henderson 写道: On 9/26/22 23:48, Song Gao wrote: if fj ==0 or fj == INT32_MIN/INT64_MIN, LoongArch host set fcsr cause exception FP_DIV0, So we need set exception flags float_flagdivbyzero if fj ==0. You are correct that ieee754 says that logB(0) should raise div

Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup

2022-09-29 Thread Michael S. Tsirkin
On Wed, Sep 21, 2022 at 04:00:58PM -0700, Si-Wei Liu wrote: > > > >The spec doesn't explicitly say anything about that > > > > as far as I see. > > > Here the spec is totally ruled by the (software artifact of) > > > implementation rather than what a real device is expected to work with > > > V

[RESEND PATCH v8 3/4] kvm: expose struct KVMState

2022-09-29 Thread Chenyi Qiang
Expose struct KVMState out of kvm-all.c so that the field of struct KVMState can be accessed when defining target-specific accelerator properties. Signed-off-by: Chenyi Qiang --- accel/kvm/kvm-all.c | 74 --- include/sysemu/kvm_int.h | 75

Re: [PATCH v2 09/13] hw/ppc/mac.h: Move macio specific parts out from shared header

2022-09-29 Thread Mark Cave-Ayland
On 25/09/2022 13:38, BALATON Zoltan wrote: Move the parts specific to and only used by macio out from the shared mac.h into macio.c where they better belong. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/macio/macio.c | 5 +++-- hw/ppc/mac.h

[RESEND PATCH v8 1/4] i386: kvm: extend kvm_{get, put}_vcpu_events to support pending triple fault

2022-09-29 Thread Chenyi Qiang
For the direct triple faults, i.e. hardware detected and KVM morphed to VM-Exit, KVM will never lose them. But for triple faults sythesized by KVM, e.g. the RSM path, if KVM exits to userspace before the request is serviced, userspace could migrate the VM and lose the triple fault. A new flag KVM_

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

2022-09-29 Thread Alexander Ivanov
Replace a dumb function in commands-bsd.c by the code of HW address getting. Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/qga/commands-bsd.c b/qga/commands-bsd.c index ca81114171..f9997ee1ec 100644 -

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

2022-09-29 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 | 14 ++ qga/commands-posix.c | 8 qga/main.c | 6 +- 4 files changed,

Re: [PATCH 1/2] target/arm: Disable VFPv4-D32 when NEON is not available

2022-09-29 Thread Cédric Le Goater
On 9/29/22 01:00, Joel Stanley wrote: On Wed, 28 Sept 2022 at 16:47, Cédric Le Goater wrote: As the Cortex A7 MPCore Technical reference says : "When FPU option is selected without NEON, the FPU is VFPv4-D16 and uses 16 double-precision registers. When the FPU is implemented with NEO

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

2022-09-29 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| 18 +++ qga/commands-com

Re: [PATCH 1/1] qxl: add subsystem_vendor_id property

2022-09-29 Thread Gerd Hoffmann
On Wed, Sep 28, 2022 at 05:52:44PM +0200, Denis V. Lunev wrote: > This property is needed for WHQL/inboxing of Windows drivers. We do need > to get drivers to be separated by the hypervisor vendors and that should > be done as PCI subvendor ID. > > This patch adds PCI subsystem vendor ID to QXL de

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

2022-09-29 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. Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c| 169 +++ qga/commands-common.h |

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

2022-09-29 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. Signed-off-by: Alexander Ivanov

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

2022-09-29 Thread Mark Cave-Ayland
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 +- 1 file changed, 17 insertion

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

2022-09-29 Thread Alexander Ivanov
Add freeze/thaw, shutdown/halt/reboot and password setting support for FreeBSD. v2: 1: Reject the idea to move all the Linux-specific code to a separate file. First commit now adds initial support of FreeBSD. Fixed device paths and fixed virtio device initialization (disable echo). Add comme

Re: [PATCH v2 2/2] dump: fix kdump to work over non-aligned blocks

2022-09-29 Thread Marc-André Lureau
Hi On Mon, Sep 5, 2022 at 5:13 PM wrote: > From: Marc-André Lureau > > Rewrite get_next_page() to work over non-aligned blocks. When it > encounters non aligned addresses, it will try to fill a page provided by > the caller. > > This solves a kdump crash with "tpm-crb-cmd" RAM memory region, >

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

2022-09-29 Thread Mark Cave-Ayland
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: BALATON Zoltan --- hw/pci-host/grackle.c | 1 + hw/ppc/mac.h | 3 --- hw/ppc/mac_ol

Re: [PATCH] tests: Add sndio to the FreeBSD CI containers / VM

2022-09-29 Thread Daniel P . Berrangé
On Thu, Sep 29, 2022 at 01:07:34AM -0400, Brad Smith wrote: > tests: Add sndio to the FreeBSD CI containers / VM > > Signed-off-by: Brad Smith > --- > .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- > .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- > tests/vm/freebsd| 3 +++ > 3 file

Re: [PATCH v2 13/13] mac_nvram: Use NVRAM_SIZE constant

2022-09-29 Thread Mark Cave-Ayland
On 25/09/2022 13:38, BALATON Zoltan wrote: The NVRAM_SIZE constant was defined but not used. Rename it to MACIO_NVRAM_SIZE to match the device model and use it where appropriate. Signed-off-by: BALATON Zoltan --- hw/misc/macio/macio.c| 2 +- hw/ppc/mac_newworld.c| 4 ++-- i

[PATCH v10 2/7] file-posix: introduce helper functions for sysfs attributes

2022-09-29 Thread Sam Li
Use get_sysfs_str_val() to get the string value of device zoned model. Then get_sysfs_zoned_model() can convert it to BlockZoneModel type of QEMU. Use get_sysfs_long_val() to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke Reviewed-by: Stefan H

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

2022-09-29 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 | 223 +++ 1 file changed, 118 insertio

[PATCH v10 1/7] include: add zoned device structs

2022-09-29 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) diff --git a/include/block/block-common.h b/include/block/block-common.h index fdb7306e78..36bd0e480e 1006

[PATCH v10 7/7] docs/zoned-storage: add zoned device documentation

2022-09-29 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs/devel/zoned-storage.rst | 40 ++ docs/system/qemu-block-drivers.rst.inc | 6 2 files changed, 46 insertions(+) creat

[PATCH v10 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-29 Thread Sam Li
Add a new zoned_host_device BlockDriver. The zoned_host_device option accepts only zoned host block devices. By adding zone management operations in this new BlockDriver, users can use the new block layer APIs including Report Zone and four zone management operations (open, close, finish, reset).

[PATCH v10 6/7] qemu-iotests: test new zone operations

2022-09-29 Thread Sam Li
We have added new block layer APIs of zoned block devices. Test it with: Create a null_blk device, run each zone operation on it and see whether reporting right zone information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned.out | 53 ++ t

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

2022-09-29 Thread Alexander Ivanov
Add appropriate shutdown command arguments to qmp_guest_shutdown() for FreeBSD. 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..88e0d0fe24 100644 --- a/qga/commands-p

[PATCH v10 0/7] Add support for zoned device

2022-09-29 Thread Sam Li
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones that are larger than the LBA size. It can only allow sequential writes, which reduces write amplification in SSD, leading to higher throughput and increased capacity. More details about ZBDs can be found at: https://zone

[PATCH v10 4/7] raw-format: add zone operations to pass through requests

2022-09-29 Thread Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal --- block/raw-format.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/raw-for

[PATCH v10 5/7] config: add check to block layer

2022-09-29 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- block.c | 17 + block/file-posix.c | 13 + block/raw-format.c | 1 + include/block/b

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

2022-09-29 Thread Akihiko Odaki
On Mon, Sep 5, 2022 at 7:11 PM Akihiko Odaki wrote: > > On Mon, Sep 5, 2022 at 6:26 PM Markus Armbruster wrote: > > > > Akihiko Odaki writes: > > > > > On Fri, Sep 2, 2022 at 7:23 PM Markus Armbruster > > > wrote: > > >> > > >> Akihiko Odaki writes: > > >> > > >> > pci_add_capability appears

[PATCH v9 4/5] dmg: warn when opening dmg images containing blocks of unknown type

2022-09-29 Thread Claudio Fontana
From: Kevin Wolf Signed-off-by: Kevin Wolf Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- block/dmg.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/dmg.c b/block/dmg.c index 837f18aa20..96f8c2d14f 100644 --- a/block/dmg.c +++ b/block/dmg.c @

[PATCH v9 2/5] module: rename module_load_one to module_load

2022-09-29 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- audio/audio.c | 2 +- block.c | 4 ++-- block/dmg.c | 4 ++-- hw/core/qdev.c| 2 +- include/qemu/module.h | 10 +- qom/object.c | 4

[PATCH v9 0/5] improve error handling for module load

2022-09-29 Thread Claudio Fontana
CHANGELOG: v8 -> v9: * add Signed-off-by tag for Kevin's commit * fully reviewed, added tags. v7 -> v8: * fix a problem in module_load, where the module_name in v7 was mistakenly freed via g_free() also in the success code path, and instead module_name memory is owned by g_hash_table afer g

[PATCH v9 1/5] module: removed unused function argument "mayfail"

2022-09-29 Thread Claudio Fontana
mayfail is always passed as false for every invocation throughout the program. It controls whether to printf or not to printf an error on g_module_open failure. Remove this unused argument. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- i

[PATCH v9 5/5] accel: abort if we fail to load the accelerator plugin

2022-09-29 Thread Claudio Fontana
if QEMU is configured with modules enabled, it is possible that the load of an accelerator module will fail. Exit in this case, relying on module_object_class_by_name to report the specific load error if any. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson [claudio: changed abort(

[PATCH v2 0/2] add zone append write for zoned device

2022-09-29 Thread Sam Li
v2: - split patch to two patches for better reviewing - change BlockZoneWps's structure to an array of integers - use only mutex lock on locking conditions of zone wps - coding styles and clean-ups v1: - introduce zone append write Sam Li (2): file-posix: add the tracking of the zones wp bloc

[PATCH v2 1/2] file-posix: add the tracking of the zones wp

2022-09-29 Thread Sam Li
Since Linux doesn't have a user API to issue zone append operations to zoned devices from user space, the file-posix driver is modified to add zone append emulation using regular writes. To do this, the file-posix driver tracks the wp location of all zones of the device. It uses an array of uint64_

Re: Question regarding live-migration with drive-mirror

2022-09-29 Thread Fiona Ebner
Am 28.09.22 um 20:53 schrieb Dr. David Alan Gilbert: > * Fiona Ebner (f.eb...@proxmox.com) wrote: >> Hi, >> recently one of our users provided a backtrace[0] for the following >> assertion failure during a live migration that uses drive-mirror to sync >> a local disk: >>> bdrv_co_write_req_prepare:

[PATCH v9 3/5] module: add Error arguments to module_load and module_load_qom

2022-09-29 Thread Claudio Fontana
improve error handling during module load, by changing: bool module_load(const char *prefix, const char *lib_name); void module_load_qom(const char *type); to: int module_load(const char *prefix, const char *name, Error **errp); int module_load_qom(const char *type, Error **errp); where the ret

[PATCH v2 2/2] block: introduce zone append write for zoned devices

2022-09-29 Thread Sam Li
A zone append command is a write operation that specifies the first logical block of a zone as the write position. When writing to a zoned block device using zone append, the byte offset of the write is pointing to the write pointer of that zone. Upon completion the device will respond with the pos

[PATCH v2 2/2] virtio-blk: add zoned storage emulation for zoned devices

2022-09-29 Thread Sam Li
This patch extends virtio-blk emulation to handle zoned device commands by calling the new block layer APIs to perform zoned device I/O on behalf of the guest. It supports Report Zone, four zone oparations (open, close, finish, reset), and Append Zone. The VIRTIO_BLK_F_ZONED feature bit will only

[PATCH v2 0/2] Add zoned storage emulation to virtio-blk driver

2022-09-29 Thread Sam Li
v2: - change units of emulated zone op coresponding to block layer APIs - modify error checking cases [Stefan, Damien] v1: - add zoned storage emulation Sam Li (2): include: update virtio_blk headers from Linux 5.19-rc2+ virtio-blk: add zoned storage emulation for zoned devices hw/block/vir

[PATCH v2 1/2] include: update virtio_blk headers from Linux 5.19-rc2+

2022-09-29 Thread Sam Li
Use scripts/update-linux-headers.sh to update virtio-blk headers from Dmitry's "virtio-blk:add support for zoned block devices" linux patch. There is a link for more information: https://github.com/dmitry-fomichev/virtblk-zbd Signed-off-by: Sam Li --- include/standard-headers/linux/virtio_blk.h

Re: [PATCH v3 1/5] msmouse: Handle mouse reset

2022-09-29 Thread Arwed Meyer
Hi, thanks for the reminder and ack. I opened this issue: https://gitlab.com/qemu-project/qemu/-/issues/1234 (wow, it's really 1234) Best regards, Arwed Am 27.09.22 um 11:21 schrieb Marc-André Lureau: Hi On Sun, Sep 11, 2022 at 10:39 PM Arwed Meyer mailto:arwed.me...@gmx.de>> wrote: De

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

2022-09-29 Thread Cornelia Huck
On Thu, Sep 29 2022, 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 memory lay

Re: [PATCH v3] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events.

2022-09-29 Thread Paolo Bonzini
On Wed, Sep 28, 2022 at 8:06 PM Venu Busireddy wrote: > > Section 5.6.6.3 of VirtIO specification states, "Events will also > be reported via sense codes..." However, no sense data is sent when > VIRTIO_SCSI_EVT_RESET_RESCAN or VIRTIO_SCSI_EVT_RESET_REMOVED events > are reported (when disk hotplug

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

2022-09-29 Thread Markus Armbruster
Akihiko Odaki writes: > On Mon, Sep 5, 2022 at 6:26 PM Markus Armbruster wrote: >> >> Akihiko Odaki writes: >> >> > On Fri, Sep 2, 2022 at 7:23 PM Markus Armbruster wrote: >> >> >> >> Akihiko Odaki writes: >> >> >> >> > pci_add_capability appears most PCI devices. Its error handling required

[RFC PATCH] tests/docker: move alpine from edge to tagged release

2022-09-29 Thread Alex Bennée
Tracking alpine-edge like debian-sid is a moving target. Usually such rolling releases are marked as "allow_failure: true" in our CI. However as alpine presents a musl based and provides useful extra coverage lets track a release branch instead to avoid random breakages. Signed-off-by: Alex Bennée

[PULL 0/8] chardev patches

2022-09-29 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit dbc4f48b5ab3e6d85f78aa4df6bd6ad561c3d152: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2022-09-27 11:08:36 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.g

[PULL 2/8] chardev: src buffer const for write functions

2022-09-29 Thread marcandre . lureau
From: Arwed Meyer Make source buffers const for char be write functions. This allows using buffers returned by fifo as buf parameter and source buffer should not be changed by write functions anyway. Signed-off-by: Arwed Meyer Reviewed-by: Marc-André Lureau Message-Id: <20220911181840.8933-3-a

[PULL 5/8] serial: Allow unaligned i/o access

2022-09-29 Thread marcandre . lureau
From: Arwed Meyer Unaligned i/o access on serial UART works on real PCs. This is used for example by FreeDOS CTMouse driver. Without this it can't reset and detect serial mice. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/77 Signed-off-by: Arwed Meyer Reviewed-by: Marc-André Lureau

[PULL 4/8] msmouse: Add pnp data

2022-09-29 Thread marcandre . lureau
From: Arwed Meyer Make msmouse send serial pnp data. Enables you to see nice qemu device name in Win9x. Signed-off-by: Arwed Meyer Reviewed-by: Marc-André Lureau Message-Id: <20220911181840.8933-5-arwed.me...@gmx.de> --- chardev/msmouse.c | 58 ++-

[PULL 1/8] msmouse: Handle mouse reset

2022-09-29 Thread marcandre . lureau
From: Arwed Meyer Detect mouse reset via RTS or DTR line: Don't send or process anything while in reset. When coming out of reset, send ID sequence first thing. This allows msmouse to be detected by common mouse drivers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/77 Signed-off-by: A

Re: [RFC PATCH] tests/docker: move alpine from edge to tagged release

2022-09-29 Thread Thomas Huth
On 29/09/2022 12.55, Alex Bennée wrote: Tracking alpine-edge like debian-sid is a moving target. Usually such rolling releases are marked as "allow_failure: true" in our CI. However as alpine presents a musl based and provides useful extra "a musl based distro" ? coverage lets track a release

[PULL 7/8] oslib-posix: Introduce qemu_socketpair()

2022-09-29 Thread marcandre . lureau
From: Guoyi Tu qemu_socketpair() will create a pair of connected sockets with FD_CLOEXEC set Signed-off-by: Guoyi Tu Reviewed-by: Christian Schoenebeck Reviewed-by: Marc-André Lureau Message-Id: <17fa1eff729eeabd9a001f4639abccb127ceec81.1661240709.git.t...@chinatelecom.cn> --- include/qemu/

[PULL 6/8] chardev: fix segfault in finalize

2022-09-29 Thread marcandre . lureau
From: Maksim Davydov If finalize chardev-msmouse or chardev-wctable is called immediately after init it cases QEMU to crash with segfault. This happens because of QTAILQ_REMOVE in qemu_input_handler_unregister tries to dereference NULL pointer. For instance, this error can be reproduced via `qom-

[PULL 3/8] msmouse: Use fifo8 instead of array

2022-09-29 Thread marcandre . lureau
From: Arwed Meyer Make use of fifo8 functions instead of implementing own fifo code. This makes the code more readable and reduces risk of bugs. Signed-off-by: Arwed Meyer Reviewed-by: Marc-André Lureau Message-Id: <20220911181840.8933-4-arwed.me...@gmx.de> --- chardev/msmouse.c | 47

Re: [PATCH v1 3/7] util: Introduce ThreadContext user-creatable object

2022-09-29 Thread Markus Armbruster
David Hildenbrand writes: > Setting the CPU affinity of QEMU threads is a bit problematic, because > QEMU doesn't always have permissions to set the CPU affinity itself, > for example, with seccomp after initialized by QEMU: > -sandbox enable=on,resourcecontrol=deny > > While upper layers are

[PULL 8/8] vhost-user: Call qemu_socketpair() instead of socketpair()

2022-09-29 Thread marcandre . lureau
From: Guoyi Tu As the close-on-exec flags is not set on the file descriptors returned by socketpair() at default, the fds will survive across exec' function. In the case that exec' function get invoked, such as the live-update feature which is been developing, it will cause fd leaks. To address

Re: [PATCH v1 4/7] util: Add write-only "node-affinity" property for ThreadContext

2022-09-29 Thread Markus Armbruster
David Hildenbrand writes: > Let's make it easier to pin threads created via a ThreadContext to > all current CPUs belonging to given NUMA nodes. > > As "node-affinity" is simply a shortcut for setting "cpu-affinity", that > property cannot be read and if the CPUs for a node change due do CPU > ho

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

2022-09-29 Thread Gavin Shan
Hi Cornelia, On 9/29/22 8:27 PM, Cornelia Huck wrote: On Thu, Sep 29 2022, Gavin Shan wrote: 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_H

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

2022-09-29 Thread Marc-André Lureau
Hi On Thu, Sep 29, 2022 at 11:54 AM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > Replace a dumb function in commands-bsd.c by the code of HW address > getting. > > Signed-off-by: Alexander Ivanov > lgtm Reviewed-by: Marc-André Lureau > --- > qga/commands-bsd.c | 17 +

Re: [PATCH v1 3/7] util: Introduce ThreadContext user-creatable object

2022-09-29 Thread David Hildenbrand
On 29.09.22 13:12, Markus Armbruster wrote: David Hildenbrand writes: Setting the CPU affinity of QEMU threads is a bit problematic, because QEMU doesn't always have permissions to set the CPU affinity itself, for example, with seccomp after initialized by QEMU: -sandbox enable=on,resourc

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

2022-09-29 Thread Marc-André Lureau
Hi Alexander On Thu, Sep 29, 2022 at 12:52 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: Alexande

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

2022-09-29 Thread Marc-André Lureau
On Thu, Sep 29, 2022 at 12:16 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 freeze/thaw code to a separate fil

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

2022-09-29 Thread Marc-André Lureau
Hi On Thu, Sep 29, 2022 at 12:02 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 comman

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

2022-09-29 Thread Marc-André Lureau
On Thu, Sep 29, 2022 at 1:02 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > Add appropriate shutdown command arguments to qmp_guest_shutdown() > for FreeBSD. > > Signed-off-by: Alexander Ivanov > Reviewed-by: Marc-André Lureau > --- > qga/commands-posix.c | 7 +++ > 1 fil

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

2022-09-29 Thread Marc-André Lureau
On Thu, Sep 29, 2022 at 11:56 AM 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 > --- > meson.build | 2 +- > qga/channel-posix.c |

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

2022-09-29 Thread Marc-André Lureau
On Thu, Sep 29, 2022 at 12:04 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 list of mounted FS. > > Signed-off-b

[PATCH v1 05/51] configure: move detected gdb to TCG's config-host.mak

2022-09-29 Thread Alex Bennée
When tests/tcg gained it's own config-host.mak we forgot to move the GDB detection. Fixes: 544f4a2578 (tests/tcg: isolate from QEMU's config-host.mak) Signed-off-by: Alex Bennée Message-Id: <20220922145832.1934429-6-alex.ben...@linaro.org> --- configure | 7 +++ 1 file changed, 7 insertions(

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

2022-09-29 Thread BALATON Zoltan
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/ppc/mac_oldworld.c index cb67e44081..75fbd2a

[PATCH v1 07/51] target/hexagon: regenerate docker/cirrus files

2022-09-29 Thread Alex Bennée
From: Anton Johansson This patch updates the docker and cirrus files with the new packages by running tests/lcitool/refresh Signed-off-by: Anton Johansson Signed-off-by: Alex Bennée Message-Id: <20220804115548.13024-10-a...@rev.ng> --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2

[PATCH v1 09/51] tests/docker: update fedora-win[32|64]-cross with lcitool

2022-09-29 Thread Alex Bennée
Convert another two dockerfiles to lcitool and update. I renamed the helper because it is not Debian specific. Signed-off-by: Alex Bennée --- .../dockerfiles/fedora-win32-cross.docker | 139 -- .../dockerfiles/fedora-win64-cross.docker | 137 - tests/lcito

[PATCH v1 03/51] scripts/ci/setup: spice-server only on x86 aarch64

2022-09-29 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" Changed build-environment.yml to only install spice-server on x86_64 and aarch64 as this package is only available on those architectures. Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220922135516.33627-4-

[PATCH v1 06/51] target/hexagon: add flex/bison/glib2 to qemu.yml

2022-09-29 Thread Alex Bennée
From: Anton Johansson Note, the glib2-native mapping exists separately from the normal glib2 mapping. The latter uses a `foreign` cross-policy-default, and libvirt-ci is not able to support package mappings for multiple cross-compilation policies. This will probably change in the future. Signed

[PATCH v1 01/51] scripts/ci/setup: ninja missing from build-environment

2022-09-29 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" ninja-build is missing from the RHEL environment, so a system prepared with that script would still fail to compile QEMU. Tested on a Fedora 36 Signed-off-by: Lucas Mateus Castro (alqotel) Message-Id: <20220922135516.33627-2-lucas.ara...@eldorado.org.br> Si

[PATCH v1 12/51] configure: do not invoke as/ld directly for pc-bios/optionrom

2022-09-29 Thread Alex Bennée
From: Paolo Bonzini Just use using the compiler binary, with -nostdlib in the case of the linker; the compiler driver (whether i686-*-gcc, or x86_64-*-gcc with the -m32 option) will then pick the right magic option to as and ld. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée --- conf

[PATCH v1 11/51] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-29 Thread Alex Bennée
It seems the depth of stack we need to support can vary depending on the order of the init constructors getting called. It seems --enable-lto shuffles things around just enough to push you over the limit. Signed-off-by: Alex Bennée Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186 Acked-b

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

2022-09-29 Thread BALATON Zoltan
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: BALATON Zoltan --- hw/pci-host/grackle.c | 1 +

[PATCH v1 14/51] pc-bios/s390-ccw: detect CC options just once

2022-09-29 Thread Alex Bennée
From: Paolo Bonzini In preparation for adding Docker container support, detect compiler options just once rather than once per Make run; container startup overhead is substantial and doing the detection just once makes things faster. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée ---

[PATCH v1 00/51] maintainer pre-PR (testing, plugins, gitdm, semihosting)

2022-09-29 Thread Alex Bennée
Hi, This is a pre-PR series for a pull request I intend to cut next week. It includes bits and pieces from my various maintainer trees as well Paolo's continuing clean-up of cross-compilation. - more docker testing updates - cross compile fixes - semihosting doc patch - various plugin and

[PATCH v1 04/51] tests/docker: run script use realpath instead of readlink

2022-09-29 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" The alpine docker image only comes with busybox, which doesn't have the '-e' option on its readlink, so change it to 'realpath' to avoid that problem. Suggested-by: Daniel P. Berrangé Signed-off-by: Lucas Mateus Castro (alqotel) Message-Id: <20220922135516

[PATCH v1 02/51] scripts/ci/setup: Fix libxen requirements

2022-09-29 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" XEN hypervisor is only available in ARM and x86, but the yaml only checked if the architecture is different from s390x, changed it to a more accurate test. Tested this change on a Ubuntu 20.04 ppc64le. Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-b

[PATCH v1 08/51] target/hexagon: manually add flex/bison/glib2 to remaining containers

2022-09-29 Thread Alex Bennée
From: Anton Johansson Adds our build-time dependencies to containers which build qemu-hexagon, but aren't covered by libvirt-ci. Signed-off-by: Anton Johansson Signed-off-by: Alex Bennée Message-Id: <20220804115548.13024-11-a...@rev.ng> --- .gitlab-ci.d/windows.yml

[PATCH v1 16/51] build: add recursive distclean rules

2022-09-29 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b576cba5a8..0fcde48bec 100644 --- a/Makefile +++ b/Makefile @@ -186,7 +186,7 @@ include $(SRC_PATH)/tests/

[PATCH v2] tests/9p: split virtio-9p-test.c into tests and 9p client part

2022-09-29 Thread Christian Schoenebeck
This patch is pure refactoring, it does not change behaviour. virtio-9p-test.c grew to 1657 lines. Let's split this file up between actual 9p test cases vs. 9p test client, to make it easier to concentrate on the actual 9p tests. Move the 9p test client code to a new unit virtio-9p-client.c, whic

[PATCH v1 10/51] tests/docker: move alpine from edge to tagged release

2022-09-29 Thread Alex Bennée
Tracking alpine-edge like debian-sid is a moving target. Usually such rolling releases are marked as "allow_failure: true" in our CI. However as alpine presents a musl based distro and provides useful extra coverage lets track a release branch instead to avoid random breakages. Signed-off-by: Alex

  1   2   3   >