[PATCH v2 09/10] dp8393x: fix CAM descriptor entry index

2021-06-24 Thread Mark Cave-Ayland
Currently when a LOAD CAM command is executed the entries are loaded into the CAM from memory in order which is incorrect. According to the datasheet the first entry in the CAM descriptor is the entry index which means that each descriptor may update any single entry in the CAM rather than the Nth

[PATCH v2 05/10] dp8393x: remove onboard PROM containing MAC address and checksum

2021-06-24 Thread Mark Cave-Ayland
According to the datasheet the dp8393x chipset does not contain any NVRAM capable of storing a MAC address or checksum. Now that both the MIPS jazz and m68k q800 boards generate the PROM region and checksum themselves, remove the generated PROM from the dp8393x device itself. Signed-off-by: Mark

[PATCH v2 02/10] dp8393x: convert to trace-events

2021-06-24 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/net/dp8393x.c| 55 + hw/net/trace-events | 17 ++ 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 56af08f0fe..ea5b22f680 100644 --- a/hw/ne

[PATCH v2 04/10] hw/m68k/q800: move PROM and checksum calculation from dp8393x device to board

2021-06-24 Thread Mark Cave-Ayland
This is in preparation for each board to have its own separate bit storage format and checksum for storing the MAC address. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q8

[PATCH v2 06/10] qemu/bitops.h: add bitrev8 implementation

2021-06-24 Thread Mark Cave-Ayland
This will be required for an upcoming checksum calculation. Signed-off-by: Mark Cave-Ayland --- include/qemu/bitops.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 03213ce952..110c56e099 100644 --- a/include/qemu/b

[PATCH v2 03/10] hw/mips/jazz: move PROM and checksum calculation from dp8393x device to board

2021-06-24 Thread Mark Cave-Ayland
This is in preparation for each board to have its own separate bit storage format and checksum for storing the MAC address. Signed-off-by: Mark Cave-Ayland --- hw/mips/jazz.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/hw/mips/jazz.c b/hw/mips/jazz

[PATCH v2 00/10] dp8393x: fixes for MacOS toolbox ROM

2021-06-24 Thread Mark Cave-Ayland
Here is the next set of patches from my attempts to boot MacOS under QEMU's Q800 machine related to the Sonic network adapter. Patches 1 and 2 sort out checkpatch and convert from DPRINTF macros to trace-events. The discussion for the v1 patchset concluded that the dp8393x device does NOT have it

[PATCH v2 01/10] dp8393x: checkpatch fixes

2021-06-24 Thread Mark Cave-Ayland
Also fix a simple comment typo of "constrainst" to "constraints". Signed-off-by: Mark Cave-Ayland --- hw/net/dp8393x.c | 231 +-- 1 file changed, 122 insertions(+), 109 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 533a8304d0..56

[v4] migration: fix the memory overwriting risk in add_to_iovec

2021-06-24 Thread Lin Feng
From: Feng Lin When testing migration, a Segmentation fault qemu core is generated. 0 error_free (err=0x1) 1 0x7f8b862df647 in qemu_fclose (f=f@entry=0x55e06c247640) 2 0x7f8b8516d59a in migrate_fd_cleanup (s=s@entry=0x55e06c0e1ef0) 3 0x7f8b8516d66c in migrate_fd_cleanup_bh (opaque

Re: [PATCH 0/5] dp8393x: fixes for MacOS toolbox ROM

2021-06-24 Thread Mark Cave-Ayland
On 25/06/2021 05:36, Finn Thain wrote: On Thu, 24 Jun 2021, Mark Cave-Ayland wrote: Thanks for the link and the detailed testing information. I've been trying to understand why you had to set the MAC address in the ARC firmware so I had a bit of an experiment here. The reason that you need to

[PATCH qemu v22] spapr: Implement Open Firmware client interface

2021-06-24 Thread Alexey Kardashevskiy
The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor. Since the beginning, the runtime component of the firmware (RTAS) has been implemented as a 20 byte

[PATCH v2 3/6] tests/acceptance: add replay kernel test for openrisc

2021-06-24 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on openrisc platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Willian Rampazzo --- tests/acceptance/replay_kernel.py | 11 +++ 1 file changed, 11 insertion

[PATCH v2 2/6] tests/acceptance: add replay kernel test for ppc64

2021-06-24 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on ppc64 platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk --- tests/acceptance/replay_kernel.py | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/accepta

[PATCH v2 5/6] tests/acceptance: add replay kernel test for alpha

2021-06-24 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on alpha platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Willian Rampazzo --- tests/acceptance/replay_kernel.py | 17 + 1 file changed, 17 insert

[PATCH v2 6/6] tests/acceptance: Linux boot test for record/replay

2021-06-24 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch adds a test for record/replay, which boots Linux image from the disk and interacts with the network. The idea and code of this test is borrowed from boot_linux.py This test includes only x86_64 platform. Other platforms and machines will be added later after testi

[PATCH v2 4/6] tests/acceptance: add replay kernel test for nios2

2021-06-24 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on nios2 platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Willian Rampazzo --- tests/acceptance/replay_kernel.py | 11 +++ 1 file changed, 11 insertions(+

[PATCH v2 1/6] tests/acceptance: add replay kernel test for s390

2021-06-24 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on s390x platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Willian Rampazzo --- tests/acceptance/replay_kernel.py | 16 1 file changed, 16 inserti

[PATCH v2 0/6] More record/replay acceptance tests

2021-06-24 Thread Pavel Dovgalyuk
The following series adds new record/replay tests to the acceptance group. The provided tests perform kernel boot and disk image boot scenarios. For all of them recording and replaying phases are executed. Tests were borrowed from existing boot_linux*.py tests. New tests include kernel boot for s

Re: [PATCH 6/6] tests/acceptance: Linux boot test for record/replay

2021-06-24 Thread Pavel Dovgalyuk
On 24.06.2021 21:15, Willian Rampazzo wrote: On Wed, Jun 23, 2021 at 3:45 PM Willian Rampazzo wrote: Hi Pavel, On Thu, Jun 10, 2021 at 8:25 AM Pavel Dovgalyuk wrote: From: Pavel Dovgalyuk This patch adds a test for record/replay, which boots Linux image from the disk and interacts with t

Re: [PATCH v2 0/1] Use correct trap number for *BSD

2021-06-24 Thread Warner Losh
On Thu, Jun 24, 2021 at 10:57 PM Warner Losh wrote: > This is a resend of a patch I sent back in March that was missing the > proper > includes due to a rebasing mistake. > > The issue is that all the BSDs use T_PAGEFLT to signal a page fault on x86, > while linux uses 0xe. The patch harmonizes t

[PATCH] arm/aspeed: rainier: Add i2c eeproms and muxes

2021-06-24 Thread Joel Stanley
These are the devices documented by the Rainier device tree. With this we can see the guest discovering the multiplexers and probing the eeprom devices: i2c i2c-2: Added multiplexed i2c bus 16 i2c i2c-2: Added multiplexed i2c bus 17 i2c i2c-2: Added multiplexed i2c bus 18 i2c i2c-2: Added mult

[PATCH v2 1/1] tcg: Use correct trap number for page faults on *BSD systems

2021-06-24 Thread Warner Losh
The trap number for a page fault on BSD systems is T_PAGEFLT not 0xe. 0xe is used by Linux and represents the intel hardware trap vector. The BSD kernels, however, translate this to T_PAGEFLT in their Xpage, Xtrap0e, Xtrap14, etc fault handlers. This is true for i386 and x86_64, though the name of

[PATCH v2 0/1] Use correct trap number for *BSD

2021-06-24 Thread Warner Losh
This is a resend of a patch I sent back in March that was missing the proper includes due to a rebasing mistake. Warner Losh (1): tcg: Use correct trap number for page faults on *BSD systems accel/tcg/user-exec.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) --

[PATCH v2 0/1] Use correct trap number for *BSD

2021-06-24 Thread Warner Losh
This is a resend of a patch I sent back in March that was missing the proper includes due to a rebasing mistake. The issue is that all the BSDs use T_PAGEFLT to signal a page fault on x86, while linux uses 0xe. The patch harmonizes the different ways this can be spelled, as explained in the patch

Re: [PATCH 0/5] dp8393x: fixes for MacOS toolbox ROM

2021-06-24 Thread Finn Thain
On Thu, 24 Jun 2021, Mark Cave-Ayland wrote: > Thanks for the link and the detailed testing information. I've been > trying to understand why you had to set the MAC address in the ARC > firmware so I had a bit of an experiment here. > > The reason that you need to do this is because of the NVRA

RE: [PATCH v4] ui/gtk: New -display gtk option 'full-screen-on-monitor'.

2021-06-24 Thread Khor, Swee Aun
Hi Khairul, > +gdk_monitor = gdk_display_get_monitor(window_display, > + > opts->u.gtk.full_screen_on_monitor > + - 1); > +if (gdk_monitor != NULL) { > +monit

Qemu on Haiku

2021-06-24 Thread Richard Zak
Hello there! I noticed the message which appears when building qemu on Haiku. I'd hate for Haiku to lose qemu, so I would like to help! What is needed in terms of a build system for continuous integration? I'm not familiar with CI systems, other than simply knowing what they do. -- Regards, Ric

[PULL 6/6] net/net.c: Add handler for passthrough filter command

2021-06-24 Thread Zhang Chen
Use the connection protocol,src port,dst port,src ip,dst ip as the key to passthrough certain network traffic in object with network packet processing function. Signed-off-by: Zhang Chen --- net/net.c | 199 +- 1 file changed, 197 insertions(+)

[PULL 5/6] net/colo-compare: Add passthrough list to CompareState

2021-06-24 Thread Zhang Chen
Add passthrough list for each CompareState. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 net/colo-compare.h | 12 2 files changed, 40 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index dcd24bb113..64e72c82f1 100644 --- a/

[PULL 3/6] hmp-commands: Add new HMP command for filter passthrough

2021-06-24 Thread Zhang Chen
Add hmp_passthrough_filter_add and hmp_passthrough_filter_del make user can maintain object network passthrough list in human monitor Signed-off-by: Zhang Chen --- hmp-commands.hx | 26 +++ include/monitor/hmp.h | 2 ++ monitor/hmp-cmds.c| 76 ++

[PULL 4/6] net/colo-compare: Move data structure and define to .h file.

2021-06-24 Thread Zhang Chen
Rename structure with COLO index and move it to .h file, It make other modules can reuse COLO code. Signed-off-by: Zhang Chen --- net/colo-compare.c | 132 - net/colo-compare.h | 86 + 2 files changed, 109 insertions(+), 10

[PULL 2/6] util/qemu-sockets.c: Add inet_parse_base to handle InetSocketAddressBase

2021-06-24 Thread Zhang Chen
No need to carry the flag all the time in many scenarios. Signed-off-by: Zhang Chen --- include/qemu/sockets.h | 1 + util/qemu-sockets.c| 14 ++ 2 files changed, 15 insertions(+) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 0c34bf2398..3a0f8fa8f2 100644 -

[PULL 0/6] COLO-Proxy patches for 2021-06-25

2021-06-24 Thread Zhang Chen
Hi Jason, Please help to queue COLO-proxy patches to net branch. Thanks Chen The following changes since commit b22726abdfa54592d6ad88f65b0297c0e8b363e2: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-06-22 16:07:53 +0100) are availabl

[PULL 1/6] qapi/net: Add IPFlowSpec and QMP command for filter passthrough

2021-06-24 Thread Zhang Chen
Since the real user scenario does not need to monitor all traffic. Add passthrough-filter-add and passthrough-filter-del to maintain a network passthrough list in object with network packet processing function. Add IPFlowSpec struct for all QMP commands. Most the fields of IPFlowSpec are optional,e

Re: [PATCH qemu] hw/net/vmxnet3: Remove g_assert_not_reached() when VMXNET3_REG_ICR is written

2021-06-24 Thread Jason Wang
在 2021/6/25 上午10:19, Qiang Liu 写道: Hi, On Wed, Jun 23, 2021 at 11:23 AM Jason Wang wrote: 在 2021/6/23 上午10:26, Qiang Liu 写道: From: cyruscyliu A malicious guest user can write VMXNET3_REG_ICR to crash QEMU. This patch remove the g_aasert_not_reached() there and make the access pass. Fixes

[PATCH] nvdimm: add 'target-node' option

2021-06-24 Thread Jingqi Liu
Linux kernel version 5.1 brings in support for the volatile-use of persistent memory as a hotplugged memory region (KMEM DAX). When this feature is enabled, persistent memory can be seen as a separate memory-only NUMA node(s). This newly-added memory can be selected by its unique NUMA node. Add 't

Re: [PATCH qemu] hw/net/vmxnet3: Remove g_assert_not_reached() when VMXNET3_REG_ICR is written

2021-06-24 Thread Qiang Liu
Hi, On Wed, Jun 23, 2021 at 11:23 AM Jason Wang wrote: > > > 在 2021/6/23 上午10:26, Qiang Liu 写道: > > From: cyruscyliu > > > > A malicious guest user can write VMXNET3_REG_ICR to crash QEMU. This > > patch remove the g_aasert_not_reached() there and make the access pass. > > > > Fixes: 786fd2b0f87

[PATCH] ipmi/sim: fix watchdog_expired data type error in IPMIBmcSim struct

2021-06-24 Thread Jinhua Cao
1) watchdog_expired is set bool which value could only be 0 or 1, but watchdog_expired every bit mean different Timer Use. 2) Use the command -ipmitool mc get watchdog- to query ipmi-watchdog status in guest. ... [root@localhost ~]# ipmitool mc watchdog get Watchdog Timer Use: SMS/OS (0x44)

Re: [PULL 09/12] configure, meson: convert libusb detection to meson

2021-06-24 Thread Yonggang Luo
On Wed, Jun 23, 2021 at 8:27 PM Paolo Bonzini wrote: > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Paolo Bonzini > --- > configure | 27 --- > hw/usb/meson.build | 2 +- > meson.build| 11 +++ > meson_options.txt | 2 ++ > 4 files chang

RE: [v3] migration: fix the memory overwriting risk in add_to_iovec

2021-06-24 Thread linfeng (M)
* Dr. David Alan Gilbert(mailto:dgilb...@redhat.com) wrote: > * Lin Feng (linfen...@huawei.com) wrote: > > From: Feng Lin > > > > When testing migration, a Segmentation fault qemu core is generated. > > 0 error_free (err=0x1) > > 1 0x7f8b862df647 in qemu_fclose (f=f@entry=0x55e06c247640) > >

Re: [PATCH v2] mc146818rtc: Make PF independent of PIE

2021-06-24 Thread Paolo Bonzini
On 23/06/21 16:24, Jason Thorpe wrote: Second, the firmware could set a nonzero period, and this would cause continuous interruptions of the guest after the firmware stops, due to s->periodic_timer firing. This is "optimized" by the bug that you are fixing. To keep the optimization you could:

Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23

2021-06-24 Thread Paolo Bonzini
On 24/06/21 21:09, Peter Maydell wrote: This generates a new warning on one of my boxes: [...] Has header "sasl/sasl.h" : YES (cached) Library sasl2 found: YES Has header "security/pam_appl.h" : YES Library pam found: YES ../meson.build:926: WARNING: could not link libpam, disabling This is pr

Re: [PATCH 1/5] hw/isa/vt82c686: Replace magic numbers by definitions

2021-06-24 Thread BALATON Zoltan
On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: Replace magic values of the Power Management / SMBus function (#4) by definitions from the datasheet. The result is less compact, and we can follow what the code does without having to recur to the datasheet. I'm not sure this is an improvement

Re: [PATCH 3/5] hw/pci-host/bonito: Allow PCI config accesses smaller than 32-bit

2021-06-24 Thread BALATON Zoltan
On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: When running the official PMON firmware for the Fuloong 2E, we see 8-bit and 16-bit accesses to PCI config space: $ qemu-system-mips64el -M fuloong2e -bios pmon_2e.bin \ -trace -trace bonito\* -trace pci_cfg\* pci_cfg_write vt82c686b-pm 05

[PATCH 3/3] tests: acpi: pc: update expected DSDT blobs

2021-06-24 Thread Igor Mammedov
@@ -930,20 +930,20 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC", 0x0001) Device (S00) { Name (_ADR, Zero) // _ADR: Address -Name (_SUN, Zero) // _SUN: Slot User Number +Name (ASUN, Zero) Me

[PATCH 1/2] tests: acpi: prepare for changing DSDT tables

2021-06-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..6c83a3ef76 100644 --- a/tests/qtest/bios-tables

Re: [PATCH 5/5] tests/acceptance: Test PMON on the Fuloong 2E machine

2021-06-24 Thread BALATON Zoltan
On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: Test the PMON firmware. As the firmware is not redistributable, it has to be downloaded manually first. Then it can be used by providing its path via the PMON_BIN_PATH environment variable: $ PMON2E_BIN_PATH=~/images/fuloong2e/pmon_2e.bin \

[PATCH 0/2] pc: acpi: revert back to 5.2 PCI slot enumeration

2021-06-24 Thread Igor Mammedov
Commit b7f23f62e40 (pci: acpi: add _DSM method to PCI devices), regressed network interface naming for Linux guests in some cases. This reverts PCI slot enumeration to its state before 6.0. For details see 2/3 patch. Thanks Stefan for troubleshooting! Reported-by: john.suc...@ekinops.com CC: st

[PATCH 2/2] acpi: pc: revert back to v5.2 PCI slot enumeration

2021-06-24 Thread Igor Mammedov
Commit [1] moved _SUN variable from only hot-pluggable to all devices. This made linux kernel enumerate extra slots that weren't present before. If extra slot happens to be be enumerated first and there is a device in th same slot but on other bridge, linux kernel will add -N suffix to slot name of

Re: [PATCH v4 01/34] modules: add modinfo macros

2021-06-24 Thread Eduardo Habkost
On Thu, Jun 24, 2021 at 12:38:03PM +0200, Gerd Hoffmann wrote: > Add macros for module info annotations. > > Instead of having that module meta-data stored in lists in util/module.c > place directly in the module source code. > [...] > +/* module implements QOM type */ > +#define module_obj(name

[PATCH 2/5] hw/pci-host/bonito: Trace PCI config accesses smaller than 32-bit

2021-06-24 Thread Philippe Mathieu-Daudé
Per the datasheet section "5.7.5. Accessing PCI configuration space" the address must be 32-bit aligned. Trace eventual accesses not aligned to 32-bit. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 8 hw/pci-host/trace-events | 3 +++ 2 files changed, 11 insertion

[PATCH 3/5] hw/pci-host/bonito: Allow PCI config accesses smaller than 32-bit

2021-06-24 Thread Philippe Mathieu-Daudé
When running the official PMON firmware for the Fuloong 2E, we see 8-bit and 16-bit accesses to PCI config space: $ qemu-system-mips64el -M fuloong2e -bios pmon_2e.bin \ -trace -trace bonito\* -trace pci_cfg\* pci_cfg_write vt82c686b-pm 05:4 @0x90 <- 0xeee1 bonito_spciconf_small_access

[PATCH 1/5] hw/isa/vt82c686: Replace magic numbers by definitions

2021-06-24 Thread Philippe Mathieu-Daudé
Replace magic values of the Power Management / SMBus function (#4) by definitions from the datasheet. The result is less compact, and we can follow what the code does without having to recur to the datasheet. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 50 ++

[PATCH 4/5] tests/acceptance: Test Linux on the Fuloong 2E machine

2021-06-24 Thread Philippe Mathieu-Daudé
Test the kernel from Lemote rescue image: http://dev.lemote.com/files/resource/download/rescue/rescue-yl Once downloaded, set the RESCUE_YL_PATH environment variable to point to the downloaded image and test as: $ RESCUE_YL_PATH=~/images/fuloong2e/rescue-yl \ AVOCADO_ALLOW_UNTRUSTED_CODE=1 \

[PATCH 5/5] tests/acceptance: Test PMON on the Fuloong 2E machine

2021-06-24 Thread Philippe Mathieu-Daudé
Test the PMON firmware. As the firmware is not redistributable, it has to be downloaded manually first. Then it can be used by providing its path via the PMON_BIN_PATH environment variable: $ PMON2E_BIN_PATH=~/images/fuloong2e/pmon_2e.bin \ AVOCADO_ALLOW_UNTRUSTED_CODE=1 \ avocado --show

[PATCH 0/5] hw/mips: Fix the Fuloong 2E machine with PMON bios

2021-06-24 Thread Philippe Mathieu-Daudé
Commit 911629e6d37 ("vt82c686: Fix SMBus IO base and configuration registers") exposed a "bug" in the Bonito north bridge. Fix it and add tests. Thanks to Zoltan for support while debugging :) Philippe Mathieu-Daudé (5): hw/isa/vt82c686: Replace magic numbers by definitions hw/pci-host/bonito

[PATCH v3 1/3] target/ppc: fix address translation bug for radix mmus

2021-06-24 Thread Bruno Larsen (billionai)
This commit attempts to fix the first bug mentioned by Richard Henderson in https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html To sumarize the bug here, when radix-style mmus are translating an address, they might need to call a second level of translation, with hypervisor priv

[PATCH v3 3/3] target/ppc: changed ppc_hash64_xlate to use mmu_idx

2021-06-24 Thread Bruno Larsen (billionai)
Changed hash64 address translation to use the supplied mmu_idx instead of using the one stored in the msr, for parity purposes (other book3s MMUs already use it). Signed-off-by: Bruno Larsen (billionai) --- target/ppc/mmu-hash64.c | 43 - target/ppc/mmu-ha

[PATCH v3 2/3] target/ppc: change ppc_hash32_xlate to use mmu_idx

2021-06-24 Thread Bruno Larsen (billionai)
Changed hash32 address translation to use the supplied mmu_idx, instead of using what was stored in the msr, for parity purposes (radix64 already uses that). Signed-off-by: Bruno Larsen (billionai) --- target/ppc/mmu-hash32.c | 18 +- target/ppc/mmu-hash32.h | 2 +- target/ppc/m

[PATCH v3 0/3] Clean up MMU translation

2021-06-24 Thread Bruno Larsen (billionai)
This is the final part of the MMU fixes that were needed to support disable-tcg, focusing on a possible bug on the second level address translation of radix64 MMUs, and some changes to hash32 and hash64 to work the same as rtadix64. Changes for v3: * removed patches that were already applied * f

Re: [PATCH v2 2/2] docs/devel: tvg-plugins: add execlog plugin description

2021-06-24 Thread Alex Bennée
Alexandre IOOSS writes: > [[PGP Signed Part:Undecided]] > On 6/22/21 12:37 PM, Alex Bennée wrote: >> Alexandre IOOSS writes: >> >>> [[PGP Signed Part:Undecided]] >>> On 6/22/21 10:48 AM, Alex Bennée wrote: Alexandre Iooss writes: > [...] > + > +The execlog tool traces execut

Re: Difficulties to access guest memory in TCG plugins

2021-06-24 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Cc'ing the maintainer: Alex. > > On 6/23/21 5:08 PM, Kevin Mambu wrote: >> Hi, everyone, >> I need to put in place a plugin which is able to modify memory for a >> specific project, and until now I managed to do so using >> cpu_memory_rw_debug(). Out of interes

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Steven Raasch
Peter - Thanks for the clarification, that makes perfect sense. In this case, using GDB is clearly the best way to go about the tracing. I appreciate your time! -S On Thu, Jun 24, 2021 at 1:51 PM Peter Maydell wrote: > On Thu, 24 Jun 2021 at 18:09, Steven Raasch wrote: > > NOTE: I do not ye

Re: [PULL 30/43] vt82c686: Fix SMBus IO base and configuration registers

2021-06-24 Thread Philippe Mathieu-Daudé
On 6/24/21 8:29 PM, BALATON Zoltan wrote: > On Thu, 24 Jun 2021, BALATON Zoltan wrote: >> On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: >>> On 6/24/21 7:00 PM, BALATON Zoltan wrote: On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: > On 6/24/21 6:16 PM, Philippe Mathieu-Daudé wrote:

Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23

2021-06-24 Thread Peter Maydell
On Wed, 23 Jun 2021 at 13:16, Paolo Bonzini wrote: > > The following changes since commit b22726abdfa54592d6ad88f65b0297c0e8b363e2: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging > (2021-06-22 16:07:53 +0100) > > are available in the Git

Re: [v3] migration: fix the memory overwriting risk in add_to_iovec

2021-06-24 Thread Dr. David Alan Gilbert
* Lin Feng (linfen...@huawei.com) wrote: > From: Feng Lin > > When testing migration, a Segmentation fault qemu core is generated. > 0 error_free (err=0x1) > 1 0x7f8b862df647 in qemu_fclose (f=f@entry=0x55e06c247640) > 2 0x7f8b8516d59a in migrate_fd_cleanup (s=s@entry=0x55e06c0e1ef0) >

[PATCH v4 3/5] ui: Create sync objects and fences only for blobs

2021-06-24 Thread Vivek Kasireddy
Create sync objects and fences only for dmabufs that are blobs. Once a fence is created (after glFlush) and is signalled, graphic_hw_gl_flushed() will be called and virtio-gpu cmd processing will be resumed. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c |

[PATCH v4 4/5] ui/gtk-egl: Wait for the draw signal for dmabuf blobs

2021-06-24 Thread Vivek Kasireddy
Instead of immediately drawing and submitting, queue and wait for the draw signal if the dmabuf submitted is a blob. Cc: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/gtk.h | 2 ++ ui/gtk-egl.c | 15 +++ ui/gtk.c | 2 +- 3 file

[PATCH v4 0/5] virtio-gpu: Add a default synchronization mechanism for blobs

2021-06-24 Thread Vivek Kasireddy
When the Guest and Host are using Blob resources, there is a chance that they may use the underlying storage associated with a Blob at the same time leading to glitches such as flickering or tearing. To prevent these from happening, the Host needs to ensure that it waits until its Blit is completed

[PATCH v4 2/5] ui/egl: Add egl helpers to help with synchronization

2021-06-24 Thread Vivek Kasireddy
These egl helpers would be used for creating and waiting on a sync object. Cc: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 2 ++ include/ui/egl-helpers.h | 2 ++ ui/egl-helpers.c | 26 ++ 3 files chang

[PATCH v4 1/5] ui/gtk: Create a common release_dmabuf helper

2021-06-24 Thread Vivek Kasireddy
Since the texture release mechanism is same for both gtk-egl and gtk-glarea, move the helper from gtk-egl to common gtk code so that it can be shared by both gtk backends. Cc: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/gtk.h | 2 -- ui/gtk-egl.c

[PATCH v4 5/5] virtio-gpu: Add gl_flushed callback

2021-06-24 Thread Vivek Kasireddy
Adding this callback provides a way to resume the processing of cmds in fenceq and cmdq that were not processed because the UI was waiting on a fence and blocked cmd processing. Cc: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 32 +++

Re: [PATCH] acpi/ged: fix reset cause

2021-06-24 Thread Michael S. Tsirkin
On Thu, Jun 24, 2021 at 12:06:14PM +0100, Peter Maydell wrote: > On Thu, 24 Jun 2021 at 12:01, Gerd Hoffmann wrote: > > > > Reset requests should use SHUTDOWN_CAUSE_GUEST_RESET not > > SHUTDOWN_CAUSE_GUEST_SHUTDOWN. > > > > Reported-by: Peter Maydell > > Signed-off-by: Gerd Hoffmann > > --- > >

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Peter Maydell
On Thu, 24 Jun 2021 at 18:09, Steven Raasch wrote: > NOTE: I do not yet understand how gdb interacts with the virtual machine. I > have experience with GDB, but only at a linux app-debug level. I don't grok > how gdb on a linux host works with QEMU running a windows guest. > My *assumption* is t

Re: [PATCH v4 0/6] acpi: Error Record Serialization Table, ERST, support for QEMU

2021-06-24 Thread Eric DeVolder
Igor, Thanks for the feedback. I am working to address/correct the items. I hope to have v5 posted early next week. eric From: Igor Mammedov Sent: Tuesday, June 22, 2021 10:51 AM To: Eric DeVolder Cc: qemu-devel@nongnu.org ; m...@redhat.com ; marcel.apfelb...@g

Re: [PULL v2 00/57] target-arm queue

2021-06-24 Thread Peter Maydell
t repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20210624 > > for you to fetch changes up to 90a76c6316cfe6416fc33814a838fb3928f746ee: > > docs/system: arm: Add nRF boards description (2021-06-24 14:58:48 +0100) > > -

Re: [PULL 30/43] vt82c686: Fix SMBus IO base and configuration registers

2021-06-24 Thread Philippe Mathieu-Daudé
On 6/24/21 8:01 PM, BALATON Zoltan wrote: > On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: >> On 6/24/21 7:00 PM, BALATON Zoltan wrote: >>> On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: On 6/24/21 6:16 PM, Philippe Mathieu-Daudé wrote: > On 6/24/21 6:01 PM, Philippe Mathieu-Daudé

[RFC PATCH] audio: Make the AudiodevDriver enum conditional

2021-06-24 Thread Thomas Huth
This way, the upper layers like libvirt could have the possibility to use QAPI to find out which audio drivers have been enabled during compile-time of QEMU. Signed-off-by: Thomas Huth --- Note: Marked as RFC since it's quite a lot of ifdef'ing here... not sure whether I really like it...

Re: [PULL 30/43] vt82c686: Fix SMBus IO base and configuration registers

2021-06-24 Thread BALATON Zoltan
On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: Hi Zoltan, On 2/21/21 3:34 PM, Philippe Mathieu-Daudé wrote: From: BALATON Zoltan The base address of the SMBus io ports and its enabled status is set by registers in the PCI config space but this was not correctly emulated. Instead the SMBus

RE: [PATCH v3 3/5] ui: Create sync objects and fences only for blobs

2021-06-24 Thread Kasireddy, Vivek
Hi Gerd, > > > > > > > dmabuf->buf.fd = res->dmabuf_fd; > > > > +dmabuf->buf.blob = true; > > > > > > Do you actually need the 'blob' field? > > > I think checking 'fd' instead should work too. > > [Kasireddy, Vivek] I want these changes to be limited to blob resources > > only as I do n

Re: [PULL 30/43] vt82c686: Fix SMBus IO base and configuration registers

2021-06-24 Thread BALATON Zoltan
On Thu, 24 Jun 2021, BALATON Zoltan wrote: On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: On 6/24/21 7:00 PM, BALATON Zoltan wrote: On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: On 6/24/21 6:16 PM, Philippe Mathieu-Daudé wrote: On 6/24/21 6:01 PM, Philippe Mathieu-Daudé wrote: On 6/

RE: [RFC v1 0/1] ui: Add a Wayland backend for Qemu UI

2021-06-24 Thread Kasireddy, Vivek
Hi Gerd, > > Why does Qemu need a new Wayland UI backend? > > The main reason why there needs to be a plain and simple Wayland backend > > for Qemu UI is to eliminate the Blit (aka GPU copy) that happens if using > > a toolkit like GTK or SDL (because they use EGL). The Blit can be eliminated > >

Re: [PATCH 6/6] tests/acceptance: Linux boot test for record/replay

2021-06-24 Thread Willian Rampazzo
On Wed, Jun 23, 2021 at 3:45 PM Willian Rampazzo wrote: > > Hi Pavel, > > On Thu, Jun 10, 2021 at 8:25 AM Pavel Dovgalyuk > wrote: > > > > From: Pavel Dovgalyuk > > > > This patch adds a test for record/replay, which boots Linux > > image from the disk and interacts with the network. > > The ide

[PATCH 07/11] block: feature detection for host block support

2021-06-24 Thread Paolo Bonzini
From: Joelle van Dyne On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by: Paolo Bonzini --- block/file-posix.c | 33 ++

[PATCH 08/11] block: check for sys/disk.h

2021-06-24 Thread Paolo Bonzini
From: Joelle van Dyne Some BSD platforms do not have this header. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Reviewed-by: Max Reitz Signed-off-by: Paolo Bonzini --- block.c | 2 +- meso

[PATCH 11/11] file-posix: handle EINTR during ioctl

2021-06-24 Thread Paolo Bonzini
Similar to other handle_aiocb_* functions, handle_aiocb_ioctl needs to cater for the possibility that ioctl is interrupted by a signal. Otherwise, the I/O is incorrectly reported as a failure to the guest. Reported-by: Gordon Watson Signed-off-by: Paolo Bonzini --- block/file-posix.c | 4 +++-

[PATCH 09/11] block: try BSD disk size ioctls one after another

2021-06-24 Thread Paolo Bonzini
Try all the possible ioctls for disk size as long as they are supported, to keep the #if ladder simple. Extracted and cleaned up from a patch by Joelle van Dyne and Warner Losh. Signed-off-by: Paolo Bonzini --- block/file-posix.c | 34 -- 1 file changed, 16 inser

[PATCH 10/11] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-06-24 Thread Paolo Bonzini
From: Joelle van Dyne iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Signed-off-by: Joelle van Dyne Signed-off-by: Paolo Bonzini --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-pos

[PATCH 05/11] block: add max_hw_transfer to BlockLimits

2021-06-24 Thread Paolo Bonzini
For block host devices, I/O can happen through either the kernel file descriptor I/O system calls (preadv/pwritev, io_submit, io_uring) or the SCSI passthrough ioctl SG_IO. In the latter case, the size of each transfer can be limited by the HBA, while for file descriptor I/O the kernel is able to

[PATCH 04/11] block-backend: align max_transfer to request alignment

2021-06-24 Thread Paolo Bonzini
Block device requests must be aligned to bs->bl.request_alignment. It makes sense for drivers to align bs->bl.max_transfer the same way; however when there is no specified limit, blk_get_max_transfer just returns INT_MAX. Since the contract of the function does not specify that INT_MAX means "no m

[PATCH 06/11] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-06-24 Thread Paolo Bonzini
bs->sg is only true for character devices, but block devices can also be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET returns bytes in an int for /dev/sgN devices, and sectors in a short for block devices, so account for that in the code. The maximum transfer also need not be a

[PATCH v5 00/11] block: file-posix queue

2021-06-24 Thread Paolo Bonzini
New patches: - 3/4 (for review comments), - 9 (split for ease of review), - 11 (new bugfix) v1->v2: add missing patch v2->v3: add max_hw_transfer to BlockLimits v3->v4: fix compilation after patch 1, tweak commit messages according to Vladimir's review v4->v5: round down max_transfer an

[PATCH 03/11] osdep: provide ROUND_DOWN macro

2021-06-24 Thread Paolo Bonzini
osdep.h provides a ROUND_UP macro to hide bitwise operations for the purpose of rounding a number up to a power of two; add a ROUND_DOWN macro that does the same with truncation towards zero. While at it, change the formatting of some comments. Signed-off-by: Paolo Bonzini --- include/qemu/osde

[PATCH 01/11] file-posix: fix max_iov for /dev/sg devices

2021-06-24 Thread Paolo Bonzini
Even though it was only called for devices that have bs->sg set (which must be character devices), sg_get_max_segments looked at /sys/dev/block which only works for block devices. On Linux the sg driver has its own way to provide the maximum number of iovecs in a scatter/gather list, so add suppor

[PATCH 02/11] scsi-generic: pass max_segments via max_iov field in BlockLimits

2021-06-24 Thread Paolo Bonzini
I/O to a disk via read/write is not limited by the number of segments allowed by the host adapter; the kernel can split requests if needed, and the limit imposed by the host adapter can be very low (256k or so) to avoid that SG_IO returns EINVAL if memory is heavily fragmented. Since this value is

Re: [PATCH v4 00/34] modules: add meta-data database

2021-06-24 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > On Thu, Jun 24, 2021 at 04:01:25PM +0100, Dr. David Alan Gilbert wrote: > > * Gerd Hoffmann (kra...@redhat.com) wrote: > > > This patch series adds support for module meta-data. Today this is > > > either hard-coded in qemu (see qemu_load_module_for_opt

Re: [PULL 30/43] vt82c686: Fix SMBus IO base and configuration registers

2021-06-24 Thread BALATON Zoltan
On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: On 6/24/21 7:00 PM, BALATON Zoltan wrote: On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: On 6/24/21 6:16 PM, Philippe Mathieu-Daudé wrote: On 6/24/21 6:01 PM, Philippe Mathieu-Daudé wrote: On 6/24/21 5:46 PM, Philippe Mathieu-Daudé wrote:

Re: [PATCH v4 30/34] monitor: allow register hmp commands

2021-06-24 Thread Gerd Hoffmann
On Thu, Jun 24, 2021 at 03:55:29PM +0100, Dr. David Alan Gilbert wrote: > * Gerd Hoffmann (kra...@redhat.com) wrote: > > Allow commands having a NULL cmd pointer, add a function to set the > > pointer later. Use case: allow modules implement hmp commands. > > > > Signed-off-by: Gerd Hoffmann >

Re: [PULL 30/43] vt82c686: Fix SMBus IO base and configuration registers

2021-06-24 Thread Philippe Mathieu-Daudé
On 6/24/21 7:00 PM, BALATON Zoltan wrote: > On Thu, 24 Jun 2021, Philippe Mathieu-Daudé wrote: >> On 6/24/21 6:16 PM, Philippe Mathieu-Daudé wrote: >>> On 6/24/21 6:01 PM, Philippe Mathieu-Daudé wrote: On 6/24/21 5:46 PM, Philippe Mathieu-Daudé wrote: > Hi Zoltan, > > On 2/21/21 3:

Re: [PATCH v1 1/1] migration: Unregister yank if migration setup fails

2021-06-24 Thread Peter Xu
On Thu, Jun 24, 2021 at 06:14:39PM +0100, Dr. David Alan Gilbert wrote: > * Leonardo Bras (leob...@redhat.com) wrote: > > Currently, if a qemu instance is started with "-incoming defer" and > > an incorect parameter is passed to "migrate_incoming", it will print the > > expected error and reply wit

  1   2   3   4   >