[PULL 1/2] amd_iommu: Fix pte_override_page_mask()

2021-04-22 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker AMD IOMMU PTEs have a special mode allowing to specify an arbitrary page size. Quoting the AMD IOMMU specification: "When the Next Level bits [of a pte] are 7h, the size of the page is determined by the first zero bit in the page address, starting from bit 12." So if

[PULL 2/2] x86: acpi: use offset instead of pointer when using build_header()

2021-04-22 Thread Michael S. Tsirkin
From: Igor Mammedov Do the same as in commit (4d027afeb3a97 Virt: ACPI: fix qemu assert due to re-assigned table data address) for remaining tables that happen to use saved at the beginning pointer to build header to avoid assert when table_data is relocated due to implicit re-size. In this ca

Re: [Bug 1743191] Re: Interacting with NetBSD serial console boot blocks no longer works

2021-04-22 Thread Ottavio Caruso
On Thu, 22 Apr 2021 at 18:23, Andreas Gustafsson <1743...@bugs.launchpad.net> wrote: > > Ottavio Caruso wrote: > > I am currently using: > > > > $ qemu-system-x86_64 --version > > QEMU emulator version 5.2.0 > > > > And I have no problem selecting from menu in serial console, so I > > assume this i

[PATCH v2 0/7] linux-user: sigaction fixes/cleanups

2021-04-22 Thread Richard Henderson
Alpha had two bugs, one with the non-ka_restorer fallback using the wrong offset, and the other with the ka_restorer value getting lost in do_sigaction. Sparc had another bug, where the ka_restorer field was written to user memory. Version 2 splits patch 2 into 6. r~ Richard Henderson (7):

[PATCH v2 1/7] linux-user/alpha: Fix rt sigframe return

2021-04-22 Thread Richard Henderson
We incorrectly used the offset of the non-rt sigframe. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/alpha/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/alpha/signal.c b/linux-user/alpha

[PATCH v2 6/7] linux-user/alpha: Share code for TARGET_NR_sigaction

2021-04-22 Thread Richard Henderson
There's no longer a difference between the alpha code and the generic code. There is a type difference in target_old_sigaction.sa_flags, which can be resolved with a very much smaller ifdef, which allows us to finish sharing the target_sigaction definition. Signed-off-by: Richard Henderson ---

[PATCH v2 5/7] linux-user/alpha: Define TARGET_ARCH_HAS_KA_RESTORER

2021-04-22 Thread Richard Henderson
This means that we can share the TARGET_NR_rt_sigaction code, and the target_rt_sigaction structure is unused. Untangling the ifdefs so that target_sigaction can be shared will wait until the next patch. Signed-off-by: Richard Henderson --- linux-user/alpha/target_signal.h | 1 + linux-user/sy

[PATCH v2 2/7] linux-user/alpha: Rename the sigaction restorer field

2021-04-22 Thread Richard Henderson
Use ka_restorer, in line with TARGET_ARCH_HAS_KA_RESTORER vs TARGET_ARCH_HAS_SA_RESTORER, since Alpha passes this field as a syscall argument. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 2 +- linux-user/alpha/signal.c | 8 linux-user/syscall.c | 4 ++-- 3 file

[PATCH v2 3/7] linux-user: Pass ka_restorer to do_sigaction

2021-04-22 Thread Richard Henderson
The value of ka_restorer needs to be saved in sigact_table. At the moment, the attempt to save it in do_syscall is improperly clobbering user memory. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 2 +- linux-user/signal.c | 5 - linux-user/syscall.c | 19 +

[PATCH v2 4/7] linux-user: Honor TARGET_ARCH_HAS_SA_RESTORER in do_syscall

2021-04-22 Thread Richard Henderson
Do not access a field that may not be present. This will become an issue when sharing more code in the next patch. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 36169a0ded..89d6

[PATCH v2 7/7] linux-user: Tidy TARGET_NR_rt_sigaction

2021-04-22 Thread Richard Henderson
Initialize variables instead of elses. Use an else instead of a goto. Add braces. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9bc

Re: [PATCH v2 0/7] linux-user: sigaction fixes/cleanups

2021-04-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210422230227.314751-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210422230227.314751-1-richard.hender...@linaro.org Subject: [PATCH v2 0/7] li

Re: [PATCH v6 06/18] cpu: Assert DeviceClass::vmsd is NULL on user emulation

2021-04-22 Thread Richard Henderson
On 4/22/21 12:38 PM, Philippe Mathieu-Daudé wrote: Migration is specific to system emulation. Restrict current DeviceClass::vmsd to sysemu using #ifdef'ry, and assert in cpu_exec_realizefn() that dc->vmsd not set under user emulation. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c

Re: [PATCH v6 07/18] cpu: Rename CPUClass vmsd -> legacy_vmsd

2021-04-22 Thread Richard Henderson
On 4/22/21 12:38 PM, Philippe Mathieu-Daudé wrote: Quoting Peter Maydell [*]: There are two ways to handle migration for a CPU object: (1) like any other device, so it has a dc->vmsd that covers migration for the whole object. As usual for objects that are a subclass of a parent

Re: [PATCH v6 08/18] cpu/{avr, lm32, moxie}: Set DeviceClass vmsd field (not CPUClass one)

2021-04-22 Thread Richard Henderson
On 4/22/21 12:38 PM, Philippe Mathieu-Daudé wrote: See rationale in previous commit. Targets should use the vmsd field of DeviceClass, not CPUClass. As migration is not important on the avr/lm32/moxie targets, break the migration compatibility and set the DeviceClass vmsd field. Signed-off-by: P

Re: [PATCH v6 10/18] cpu: Move CPUClass::vmsd to SysemuCPUOps

2021-04-22 Thread Richard Henderson
On 4/22/21 12:38 PM, Philippe Mathieu-Daudé wrote: Migration is specific to system emulation. - Move the CPUClass::vmsd field to SysemuCPUOps, - restrict VMSTATE_CPU() macro to sysemu, - vmstate_dummy is now unused, remove it. Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Richard He

Re: [PATCH-for-6.0] net: tap: fix crash on hotplug

2021-04-22 Thread Jason Wang
在 2021/4/23 上午5:34, Cole Robinson 写道: On 4/22/21 5:42 AM, Bin Meng wrote: On Thu, Apr 22, 2021 at 5:36 PM Peter Maydell wrote: On Thu, 22 Apr 2021 at 05:29, Bin Meng wrote: On Thu, Apr 22, 2021 at 12:36 AM Philippe Mathieu-Daudé wrote: Cc'ing Bin. On 4/21/21 5:22 PM, Cole Robinson wrote

Re: [PATCH v2] i386: Add ratelimit for bus locks acquired in guest

2021-04-22 Thread Chenyi Qiang
On 4/21/2021 11:18 PM, Eduardo Habkost wrote: On Wed, Apr 21, 2021 at 10:50:10PM +0800, Xiaoyao Li wrote: On 4/21/2021 10:12 PM, Eduardo Habkost wrote: On Wed, Apr 21, 2021 at 02:26:42PM +0800, Chenyi Qiang wrote: Hi, Eduardo, thanks for your comments! On 4/21/2021 12:34 AM, Eduardo Habko

[PATCH RESEND 1/2] target/i386: add "-cpu, lbr-fmt=*" support to enable guest LBR

2021-04-22 Thread Like Xu
The last branch recording (LBR) is a performance monitor unit (PMU) feature on Intel processors that records a running trace of the most recent branches taken by the processor in the LBR stack. The QEMU could configure whether it's enabled or not for each guest via CLI. The LBR feature would be en

[PATCH RESEND 2/2] target/i386: add kvm_exact_match_flags to FeatureWordInfo

2021-04-22 Thread Like Xu
Instead of hardcoding the PERF_CAPABILITIES rules in this loop, this could become a FeatureWordInfo field. It would be very useful for other features like intel-pt, where we need some bits to match the host bits too. Suggested-by: Eduardo Habkost Signed-off-by: Like Xu --- target/i386/cpu.c | 2

[PATCH for 6.0] net: check the existence of peer before trying to pad

2021-04-22 Thread Jason Wang
There could be case that peer is NULL. This can happen when during network device hot-add where net device needs to be added first. So the patch check the existence of peer before trying to do the pad. Fixes: 969e50b61a285 ("net: Pad short frames to minimum size before sending from SLiRP/TAP") Si

Re: [PATCH for 6.0] net: check the existence of peer before trying to pad

2021-04-22 Thread Bin Meng
On Fri, Apr 23, 2021 at 11:18 AM Jason Wang wrote: > > There could be case that peer is NULL. This can happen when during > network device hot-add where net device needs to be added first. So > the patch check the existence of peer before trying to do the pad. > > Fixes: 969e50b61a285 ("net: Pad s

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-22 Thread David Gibson
On Thu, Apr 22, 2021 at 04:35:34PM -0300, Fabiano Rosas wrote: > Bruno Piazera Larsen writes: > > >> > You are correct! I've just tweaked the code that defines spr_register and > >> > it should be working now. I'm still working in splitting the SPR > >> > functions > >> > from translate_init, si

[Bug 1879425] Re: The thread of "CPU 0 /KVM" keeping 99.9%CPU

2021-04-22 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1879425 Title: The thread

[Bug 1642421] Re: qemu-system-x86_64: ipv6 and dns is broken with netdev user

2021-04-22 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1642421 Title: qemu-system

[Bug 1820247] Re: QEMU random crash caused by libspice-server

2021-04-22 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1820247 Title: QEMU random

[Bug 1725707] Re: QEMU sends excess VNC data to websockify even when network is poor

2021-04-22 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1725707 Title: QEMU sends

[Bug 1615212] Re: SDL UI switching to monitor half-broken and scrolling broken

2021-04-22 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1615212 Title: SDL UI swit

[Bug 1778966] Re: Windows 1803 and later crashes on KVM

2021-04-22 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1778966 Title: Windows 180

[Bug 1395217] Re: Networking in qemu 2.0.0 and beyond is not compatible with Open Solaris (Illumos) 5.11

2021-04-22 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1395217 Title: Networking

[Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2021-04-22 Thread Thomas Huth
Ok, thanks for answering! So I'm closing this issue now. In case anybody still has similar issues, please open a new bug ticket instead. ** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscr

[PATCH RFC 0/1] To add HMP interface to dump PCI MSI-X table/PBA

2021-04-22 Thread Dongli Zhang
This is inspired by the discussion with Jason on below patchset. https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg09020.html The new HMP command is introduced to dump the MSI-X table and PBA. Initially, I was going to add new option to "info pci". However, as the number of entries is not

[PATCH RFC 1/1] msix: add hmp interface to dump MSI-X info

2021-04-22 Thread Dongli Zhang
This patch is to add the HMP interface to dump MSI-X table and PBA, in order to help diagnose the loss of IRQ issue in VM (e.g., if an MSI-X vector is erroneously masked permanently). Here is the example with vhost-scsi: (qemu) info msix /machine/peripheral/vscsi0 MSI-X Table 0xfee01004 0x

[PATCH for-6.0 v2 0/2] hw/block/nvme: fix msix uninit

2021-04-22 Thread Klaus Jensen
From: Klaus Jensen First patch fixes a regression where msix is not correctly uninit'ed when an nvme device is hotplugged with device_del. When viewed in conjunction with the commit that introduced the bug (commit 1901b4967c3f), I think the fix looks relatively obvious. Second patch disables hot

[PATCH for-6.0 v2 2/2] hw/block/nvme: disable hotplugging for subsystem-linked controllers

2021-04-22 Thread Klaus Jensen
From: Klaus Jensen If a controller is linked to a subsystem, do not allow it to be hotplugged since this will mess up the (possibly shared) namespaces. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c inde

[PATCH for-6.0 v2 1/2] hw/block/nvme: fix invalid msix exclusive uninit

2021-04-22 Thread Klaus Jensen
From: Klaus Jensen Commit 1901b4967c3f changed the nvme device from using a bar exclusive for MSI-x to sharing it on bar0. Unfortunately, the msix_uninit_exclusive_bar() call remains in nvme_exit() which causes havoc when the device is removed with, say, device_del. Fix this. Additionally, a su

Re: [PATCH for 6.0] net: check the existence of peer before trying to pad

2021-04-22 Thread Stefan Weil
Am 23.04.21 um 05:18 schrieb Jason Wang: There could be case that peer is NULL. This can happen when during network device hot-add where net device needs to be added first. So the patch check the existence of peer before trying to do the pad. Fixes: 969e50b61a285 ("net: Pad short frames to mini

constant_tsc support for SVM guest

2021-04-22 Thread Wei Huang
There was a customer request for const_tsc support on AMD guests. Right now this feature is turned off by default for QEMU x86 CPU types (in CPUID_Fn8007_EDX[8]). However we are seeing a discrepancy in guest VM behavior between Intel and AMD. In Linux kernel, Intel x86 code enables X86_FEA

Re: [PATCH RFC 0/1] To add HMP interface to dump PCI MSI-X table/PBA

2021-04-22 Thread Jason Wang
在 2021/4/23 下午12:47, Dongli Zhang 写道: This is inspired by the discussion with Jason on below patchset. https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg09020.html The new HMP command is introduced to dump the MSI-X table and PBA. Initially, I was going to add new option to "info pci"

Re: [PATCH for 6.0] net: check the existence of peer before trying to pad

2021-04-22 Thread Jason Wang
在 2021/4/23 下午1:42, Stefan Weil 写道: Am 23.04.21 um 05:18 schrieb Jason Wang: There could be case that peer is NULL. This can happen when during network device hot-add where net device needs to be added first. So the patch check the existence of peer before trying to do the pad. Fixes: 969e50

Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

2021-04-22 Thread Stefano Garzarella
On Thu, Apr 22, 2021 at 06:54:21PM +0200, Philippe Mathieu-Daudé wrote: On 4/22/21 6:07 PM, Thomas Huth wrote: On 22/04/2021 17.52, Stefano Garzarella wrote: On Thu, Apr 22, 2021 at 05:38:26PM +0200, Thomas Huth wrote: On 22/04/2021 16.31, Philippe Mathieu-Daudé wrote: On 4/22/21 2:41 PM, Chr

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-04-22 Thread Bin Meng
On Mon, Feb 8, 2021 at 10:41 PM Bin Meng wrote: > > On Thu, Jan 21, 2021 at 10:18 PM Francisco Iglesias > wrote: > > > > Hi Bin, > > > > On [2021 Jan 21] Thu 16:59:51, Bin Meng wrote: > > > Hi Francisco, > > > > > > On Thu, Jan 21, 2021 at 4:50 PM Francisco Iglesias > > > wrote: > > > > > > > >

Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

2021-04-22 Thread Christian Borntraeger
On 23.04.21 08:40, Stefano Garzarella wrote: On Thu, Apr 22, 2021 at 06:54:21PM +0200, Philippe Mathieu-Daudé wrote: On 4/22/21 6:07 PM, Thomas Huth wrote: On 22/04/2021 17.52, Stefano Garzarella wrote: On Thu, Apr 22, 2021 at 05:38:26PM +0200, Thomas Huth wrote: On 22/04/2021 16.31, Phili

socket.c added support for unix domain socket datagram transport

2021-04-22 Thread Ralph Schmieder
Hey... new to this list. I was looking for a way to use Unix domain sockets as a network transport between local VMs. I'm part of a team where we run dozens if not hundreds of VMs on a single compute instance which are highly interconnected. In the current implementation, I use UDP sockets (e

<    1   2   3   4