[PULL 08/15] configure: parse --enable/--disable-strip automatically, flip default

2022-01-04 Thread Paolo Bonzini
Always include the STRIP variable in config-host.mak (it's only used by the s390-ccw firmware build, and it adds a default if configure omitted it), and use meson-buildoptions.sh to turn --enable/--disable-strip into -Dstrip. The default is now not to strip the binaries like for almost every other

[PULL 03/15] meson: cleanup common-user/ build

2022-01-04 Thread Paolo Bonzini
It is not necessary to have a separate static_library just for common_user files; using the one that already covers the rest of common_ss is enough unless you need to reuse some source files between emulators and tests. Just place common files for all user-mode emulators in common_ss, similar to wh

[PULL 07/15] configure, makefile: remove traces of really old files

2022-01-04 Thread Paolo Bonzini
These files have been removed for more than year in the best case, or for more than ten years for some really old TCG files. Remove any traces of it. Acked-by: Richard Henderson Signed-off-by: Paolo Bonzini --- Makefile | 11 --- configure | 9 - 2 files changed, 4 insertions(

[PULL 11/15] configure, meson: move config-poison.h to meson

2022-01-04 Thread Paolo Bonzini
This ensures that the file is regenerated properly whenever config-target.h or config-devices.h files change. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- configure | 11 --- meson.build | 12 scripts/make-conf

[PULL 13/15] KVM: use KVM_{GET|SET}_SREGS2 when supported.

2022-01-04 Thread Paolo Bonzini
From: Maxim Levitsky This allows to make PDPTRs part of the migration stream and thus not reload them after migration which is against X86 spec. Signed-off-by: Maxim Levitsky Message-Id: <20211101132300.192584-2-mlevi...@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 3

[PULL 09/15] configure: move non-command-line variables away from command-line parsing section

2022-01-04 Thread Paolo Bonzini
This makes it easier to identify candidates for moving to Meson. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configure | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 9e01b2278e..e3d603d381 100755 --- a/confi

[PULL 15/15] tests/tcg: Fix target-specific Makefile variables path for user-mode

2022-01-04 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Commit 812b31d3f91 refactor missed to update this path. Fixes: 812b31d3f91 ("configs: rename default-configs to configs and reorganise") Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20211226001541.3807919-1-f4...@amsat.org> Signed-off-by: Paolo Bonzini --- t

[PULL 10/15] meson: build contrib/ executables after generated headers

2022-01-04 Thread Paolo Bonzini
This will be needed as soon as config-poison.h moves from configure to a meson custom_target (which is built at "ninja" time). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- contrib/elf2dmp/meson.build| 2 +- contrib/ivshmem-client/meson.build | 2 +- contrib/ivshm

[PULL 12/15] meson: add comments in the target-specific flags section

2022-01-04 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 5 + 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 36fc720ba3..6489ff8425 100644 --- a/meson.build +++ b/meson.build @@ -238,6 +238,7 @@ endif # Target-specific checks and dependencies # #

[PULL 14/15] KVM: x86: ignore interrupt_bitmap field of KVM_GET/SET_SREGS

2022-01-04 Thread Paolo Bonzini
This is unnecessary, because the interrupt would be retrieved and queued anyway by KVM_GET_VCPU_EVENTS and KVM_SET_VCPU_EVENTS respectively, and it makes the flow more similar to the one for KVM_GET/SET_SREGS2. Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm.c | 24 +---

Re: [PATCH 4/5] usb: allow max 8192 bytes for desc

2022-01-04 Thread Philippe Mathieu-Daudé
On 27/12/21 15:27, zhenwei pi wrote: A device of USB video class usually uses larger desc structure, so use larger buffer to avoid failure. Signed-off-by: zhenwei pi --- hw/usb/desc.c | 15 --- hw/usb/desc.h | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/

Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2022-01-04 Thread Ani Sinha
On Tue, 4 Jan 2022, Stefan Berger wrote: > > On 1/4/22 04:55, Igor Mammedov wrote: > > On Wed, 22 Dec 2021 21:23:09 -0500 > > Stefan Berger wrote: > > > > > Add missing device identification objects _STR and _UID. They will appear > > why, does it break anything or it's just cosmetic? > > I do

Re: [PATCH v2 1/5] hw/arm/virt: Key enablement of highmem PCIe on highmem_ecam

2022-01-04 Thread Eric Auger
Hi Marc, On 12/27/21 4:53 PM, Marc Zyngier wrote: > Hi Eric, > > Picking this up again after a stupidly long time... > > On Mon, 04 Oct 2021 13:00:21 +0100, > Eric Auger wrote: >> Hi Marc, >> >> On 10/3/21 6:46 PM, Marc Zyngier wrote: >>> Currently, the highmem PCIe region is oddly keyed on the h

Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2022-01-04 Thread Stefan Berger
On 1/4/22 10:15, Ani Sinha wrote: On Tue, 4 Jan 2022, Stefan Berger wrote: On 1/4/22 04:55, Igor Mammedov wrote: On Wed, 22 Dec 2021 21:23:09 -0500 Stefan Berger wrote: Add missing device identification objects _STR and _UID. They will appear why, does it break anything or it's just cos

Re: [RFC 0/5] Clean up error handling in libvhost-user memory mapping

2022-01-04 Thread Raphael Norwitz
Ping On Wed, Dec 15, 2021 at 10:29:46PM +, Raphael Norwitz wrote: > Hey Stefan, Marc-Andre, MST, David - > > As promised here is a series cleaning up error handling in the > libvhost-user memory mapping path. Most of these cleanups are > straightforward and have been discussed on the mailing

[PATCH v2 2/5] RISC-V: monitor's print register functionality

2022-01-04 Thread Konrad Schwarz
Enable the print (p) command to display both general-purpose and Contral and Status (CSR) registers. General purpose registers can be named using the xN form or their ABI names (zero, ra, sp, a0, s1, t2). Signed-off-by: Konrad Schwarz --- target/riscv/monitor.c | 69

[PATCH v2 3/5] RISC-V: 'info gmem' to show hypervisor guest -> physical address translations

2022-01-04 Thread Konrad Schwarz
This is analog to the existing 'info mem' command and is implemented using the same machinery. Signed-off-by: Konrad Schwarz --- hmp-commands-info.hx | 16 + include/monitor/hmp-target.h | 2 + target/riscv/monitor.c | 135 +-- 3 files changed

[PATCH v2 4/5] RISC-V: Typed CSRs in gdbserver

2022-01-04 Thread Konrad Schwarz
GDB target descriptions support typed registers; such that `info register X' displays not only the hex value of register `X', but also the individual bitfields the register comprises (if any), using textual labels if possible. This patch includes type information for GDB for a large subset of the

[PATCH v2 5/5] RISC-V: Add `v' (virtualization mode) bit to the `priv' virtual debug register

2022-01-04 Thread Konrad Schwarz
The RISC-V Debug Support specification suggests debuggers provide "virtual debug registers" to show state not directly visible in the ISA, and defines one such register, `priv', which encodes the processor's current operating mode in the two least significant bits. GDB represents virtual debug reg

[PATCH v2 0/5] Improve RISC-V debugging support.

2022-01-04 Thread Konrad Schwarz
Added the files missing in v1 of this patch. -- >8 -- 1) Make the QEMU monitor `info registers' command more informative 2) Implement the QEMU monitor `print $register' 3) Introduce a new command `info gmem' to the QEMU monitor, which displays a RISC-V hypervisor's guest's 2nd level paging tabl

[PATCH v2 1/5] RISC-V: larger and more consistent register set for 'info registers'

2022-01-04 Thread Konrad Schwarz
Display more CSRs in the 'info registers' command and group them according to function. The number of CSRs in RISC-V is so large to make it impractical for all CSRs to be displayed by 'info registers'. The code uses conditional compilation directives around register groups; advanced users can enab

Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2022-01-04 Thread Igor Mammedov
On Tue, 4 Jan 2022 09:48:32 -0500 Stefan Berger wrote: > On 1/4/22 04:55, Igor Mammedov wrote: > > On Wed, 22 Dec 2021 21:23:09 -0500 > > Stefan Berger wrote: > > > >> Add missing device identification objects _STR and _UID. They will appear > > why, does it break anything or it's just cosme

[PATCH v11 2/4] softmmu/dirtylimit: implement vCPU dirtyrate calculation periodically

2022-01-04 Thread huangy81
From: Hyman Huang(黄勇) Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly for dirty page rate limit. Add dirtylimit.c to implement dirtyrate calculation periodly, which will be used for dirty page rate limit. Add dirtylimit.h to export util functions

[PATCH v11 0/4] support dirty restraint on vCPU

2022-01-04 Thread huangy81
From: Hyman Huang(黄勇) v11 - rebase on master - add a commit " refactor dirty page rate calculation" so that dirty page rate limit can reuse the calculation logic. - handle the cpu hotplug/unplug case in the dirty page rate calculation logic. - modify the qmp commands according to Markus's ad

[PATCH v11 1/4] migration/dirtyrate: refactor dirty page rate calculation

2022-01-04 Thread huangy81
From: Hyman Huang(黄勇) abstract out dirty log change logic into function global_dirty_log_change. abstract out dirty page rate calculation logic via dirty-ring into function vcpu_calculate_dirtyrate. abstract out mathematical dirty page rate calculation into do_calculate_dirtyrate, decouple it f

[PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-04 Thread huangy81
From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is enabled. Start a thread to track current dirty pa

[PATCH v11 4/4] softmmu/dirtylimit: implement dirty page rate limit

2022-01-04 Thread huangy81
From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit" to enable, disable, query d

Re: [PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user

2022-01-04 Thread Alex Bennée
Warner Losh writes: > PING! > > If anybody (especially the BSD reviewers) could look at these, that would be > great! > > It's been suggested I rename bsd-user-smoke to just be bsd-user and we put > our tests there until we can switch to the more generic tcg > tests, so I'll do that and resen

Re: [PATCH v3 kvm/queue 11/16] KVM: Add kvm_map_gfn_range

2022-01-04 Thread Sean Christopherson
On Fri, Dec 31, 2021, Chao Peng wrote: > On Fri, Dec 24, 2021 at 12:13:51PM +0800, Chao Peng wrote: > > On Thu, Dec 23, 2021 at 06:06:19PM +, Sean Christopherson wrote: > > > On Thu, Dec 23, 2021, Chao Peng wrote: > > > > This new function establishes the mapping in KVM page tables for a > > >

Re: [PATCH 5/9] target/ppc: Use ppc_interrupts_little_endian in powerpc_excp

2022-01-04 Thread Cédric Le Goater
On 1/4/22 15:11, Fabiano Rosas wrote: Cédric Le Goater writes: On 1/3/22 23:07, Fabiano Rosas wrote: The ppc_interrupts_little_endian function is suitable for determining the endianness of interrupts for all Book3S CPUs. (I'm keeping the MSR check for the rest of the CPUs, but it will go awa

Re: [PATCH v3 kvm/queue 04/16] KVM: Extend the memslot to support fd-based private memory

2022-01-04 Thread Sean Christopherson
On Fri, Dec 31, 2021, Chao Peng wrote: > On Thu, Dec 23, 2021 at 05:35:37PM +, Sean Christopherson wrote: > > On Thu, Dec 23, 2021, Chao Peng wrote: > > > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > > > index 1daa45268de2..41434322fa23 100644 > > > --- a/include/uapi/linu

Re: [PATCH v3 kvm/queue 03/16] mm/memfd: Introduce MEMFD_OPS

2022-01-04 Thread Sean Christopherson
On Fri, Dec 31, 2021, Chao Peng wrote: > On Fri, Dec 24, 2021 at 11:53:15AM +0800, Robert Hoo wrote: > > On Thu, 2021-12-23 at 20:29 +0800, Chao Peng wrote: > > > From: "Kirill A. Shutemov" > > > > > > +static void notify_fallocate(struct inode *inode, pgoff_t start, > > > pgoff_t end) > > > +{

Re: [PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user

2022-01-04 Thread Warner Losh
On Tue, Jan 4, 2022 at 10:21 AM Alex Bennée wrote: > > Warner Losh writes: > > > PING! > > > > If anybody (especially the BSD reviewers) could look at these, that > would be great! > > > > It's been suggested I rename bsd-user-smoke to just be bsd-user and we > put our tests there until we can s

Re: [PATCH v3 kvm/queue 05/16] KVM: Maintain ofs_tree for fast memslot lookup by file offset

2022-01-04 Thread Sean Christopherson
On Fri, Dec 31, 2021, Chao Peng wrote: > On Tue, Dec 28, 2021 at 09:48:08PM +, Sean Christopherson wrote: > >KVM handles > > reverse engineering the memslot to get the offset and whatever else it > > needs. > > notify_fallocate() and other callbacks are unchanged, though they probably > > can

[Bug 1749393] Re: sbrk() not working under qemu-user with a PIE-compiled binary?

2022-01-04 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu - 1:4.2-3ubuntu6.19 --- qemu (1:4.2-3ubuntu6.19) focal; urgency=medium * d/p/u/lp-1749393-linux-user-Reserve-space-for-brk.patch: fix static use cases needing a lot of brk space (LP: #1749393) * d/p/u/lp-1929926-target-s390x-Fix-translati

[Bug 1749393] Update Released

2022-01-04 Thread Brian Murray
The verification of the Stable Release Update for qemu has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a reg

Re: [PULL 00/26] ppc queue

2022-01-04 Thread Richard Henderson
github.com/legoater/qemu/ tags/pull-ppc-20220104 for you to fetch changes up to 0625c7760d5451d7436ef0738f763c6bb5141919: target/ppc: do not call hreg_compute_hflags() in helper_store_mmcr0() (2022-01-04 07:55:35 +0100) ppc

[PATCH v5 1/3] tests: acpi: prepare for updated TPM related tables

2022-01-04 Thread Stefan Berger
Replace existing TPM related tables, that are about to change, with empty files. Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Sinha Signed-off-by: Stefan Berger Acked-by: Ani Sinha Message-id: 20211223022310.575496-2-stef...@linux.ibm.com --- tests/qtest/bios-tables-test-allowed-diff.h |

[PATCH v5 3/3] tests: acpi: Add updated TPM related tables

2022-01-04 Thread Stefan Berger
The updated TPM related tables have the following additions: Device (TPM) { Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */) // _HID: Hardware ID + Name (_STR, "TPM 2.0 Device") // _STR: Description String + Name (_UID, One) // _UID: Unique ID Name (_STA, 0x0

[PATCH v5 2/3] acpi: tpm: Add missing device identification objects

2022-01-04 Thread Stefan Berger
Add missing TPM device identification objects _STR and _UID. They will appear as files 'description' and 'uid' under Linux sysfs. Following inspection of sysfs entries for hardware TPMs we chose uid '1'. Cc: Shannon Zhao Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Sinha Resolves: https:/

Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2022-01-04 Thread Stefan Berger
On 1/4/22 11:34, Igor Mammedov wrote: On Tue, 4 Jan 2022 09:48:32 -0500 Stefan Berger wrote: On 1/4/22 04:55, Igor Mammedov wrote: On Wed, 22 Dec 2021 21:23:09 -0500 Stefan Berger wrote: Add missing device identification objects _STR and _UID. They will appear why, does it break anyth

[PATCH v5 0/3] tpm: Add missing ACPI device identification objects

2022-01-04 Thread Stefan Berger
This series of patches adds missing ACPI device identification objects _STR and _UID to TPM 1.2 and TPM 2 ACPI tables. Stefan v5: - Changed Fixes: tag to Resolves: - Mentioned in 2/3 that choice of uid '1' is based on inspection of hardware TPMs' sysfs entries v4: - Rebased on current m

Re: [PATCH v2] docs: Add measurement calculation details to amd-memory-encryption.txt

2022-01-04 Thread Daniel P . Berrangé
On Mon, Dec 20, 2021 at 10:42:24AM +, Dov Murik wrote: > Add a section explaining how the Guest Owner should calculate the > expected guest launch measurement for SEV and SEV-ES. > > Also update the name and link to the SEV API Spec document. > > Signed-off-by: Dov Murik > Suggested-by: Dani

[PATCH 1/2] hw/display/vmware_vga: replace fprintf calls with trace events

2022-01-04 Thread Carwyn Ellis
Debug output was always being sent to STDERR. This has been replaced with trace events. Signed-off-by: Carwyn Ellis --- hw/display/trace-events | 3 +++ hw/display/vmware_vga.c | 22 ++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hw/display/trace-events

Re: [PATCH] [RESEND] docs: Add spec of OVMF GUIDed table for SEV guests

2022-01-04 Thread Daniel P . Berrangé
On Mon, Jan 03, 2022 at 11:14:13AM +0200, Dov Murik wrote: > Add docs/specs/sev-guest-firmware.rst which describes the GUIDed table > in the end of OVMF's image which is parsed by QEMU, and currently used > to describe some values for SEV and SEV-ES guests. > > Signed-off-by: Dov Murik > --- > d

[PATCH 0/2] use trace events and fix garbled output

2022-01-04 Thread Carwyn Ellis
This patchset supersedes the earlier submission and incorporates feedback from Laurent Vivier and Gerd Hoffmann. There are two patches addressing the following in the vmware vga display code - use of fprintf to log debug output to STDERR This has been replaced with trace events. - garbled

[PATCH 2/2] hw/display/vmware_vga: do not discard screen updates

2022-01-04 Thread Carwyn Ellis
In certain circumstances, typically when there is lots changing on the screen, updates will be discarded resulting in garbled output. This change simplifies the traversal of the display update FIFO queue when applying updates. We just track the queue length and iterate up to the end of the queue.

Re: [PATCH v5 0/3] tpm: Add missing ACPI device identification objects

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 12:58:03PM -0500, Stefan Berger wrote: > This series of patches adds missing ACPI device identification objects _STR > and _UID to TPM 1.2 and TPM 2 ACPI tables. What was the practical impact on guests (if any) from these ACPI objects being missing ? Regards, Daniel -- |:

Re: [PULL 02/15] linux-user: Move syscall error detection into safe_syscall_base

2022-01-04 Thread Richard Henderson
On 1/4/22 5:51 AM, Laurent Vivier wrote: This patch breaks command execution in bash command line interface: - if I run "chroot chroot/powerpc/jessie ls", it works - if I run "echo ls |  chroot chroot/powerpc/jessie", it hangs - if I run "chroot chroot/powerpc/jessie bash invalid_command",  

Re: [PATCH v5 0/3] tpm: Add missing ACPI device identification objects

2022-01-04 Thread Stefan Berger
On 1/4/22 13:09, Daniel P. Berrangé wrote: On Tue, Jan 04, 2022 at 12:58:03PM -0500, Stefan Berger wrote: This series of patches adds missing ACPI device identification objects _STR and _UID to TPM 1.2 and TPM 2 ACPI tables. What was the practical impact on guests (if any) from these ACPI obj

Re: [PATCH 1/2] [crypto] Load all certificates in X509 CA file

2022-01-04 Thread Daniel P . Berrangé
On Wed, Dec 22, 2021 at 03:05:59PM +, Henry Kleynhans wrote: > From: Henry Kleynhans > > Some CA files may contain multiple intermediaries and roots of trust. > These may not fit into the hard-coded limit of 16. > > Extend the validation code to allocate enough space to load all of the > cer

Re: [PULL 0/2] SD/MMC patches for 2022-01-04

2022-01-04 Thread Richard Henderson
https://github.com/philmd/qemu.git tags/sdmmc-20220104 for you to fetch changes up to d666c7b529c503381a714b97d2e174848b5aad8d: hw/sd: Add SDHC support for SD card SPI-mode (2022-01-04 08:50:27 +0100) SD/MMC patches queue - Add SD

Re: [PATCH 2/2] [crypto] Only verify CA certs in chain of trust

2022-01-04 Thread Daniel P . Berrangé
On Wed, Dec 22, 2021 at 03:54:08PM +, Henry Kleynhans wrote: > Hi Daniel, > > This patch tightens the CA verification code to only check the > issuer chain of the client cert. I think this will still not > catch expired/invalid certs if the client and server certs have > different issuer chai

Re: [PATCH 2/2] [crypto] Only verify CA certs in chain of trust

2022-01-04 Thread Daniel P . Berrangé
On Wed, Dec 22, 2021 at 03:06:00PM +, Henry Kleynhans wrote: > From: Henry Kleynhans > > The CA file provided to qemu may contain CA certificates which do not > form part of the chain of trust for the specific certificate we are > sanity checking. > > This patch changes the sanity checking f

[PATCH] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Richard Henderson
For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 Reported-by: Laurent Vivier Signed-off-by: Richard Henderson --- common-user/host/i386/safe-syscall.inc.S | 1 + common-user/hos

Re: [PATCH] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Philippe Mathieu-Daudé
On Tue, Jan 4, 2022 at 8:05 PM Richard Henderson wrote: > > For the ABIs in which the syscall return register is not > also the first function argument register, move the errno > value into the correct place. > > Fixes: a3310c0397e2 Using Laurent alias [*]: Fixes: a3310c0397e ("linux-user: Move s

Re: [PATCH 01/17] pnv_phb3.c: add unique chassis and slot for pnv_phb3_root_port

2022-01-04 Thread Daniel Henrique Barboza
On 1/3/22 05:24, Cédric Le Goater wrote: On 12/28/21 20:37, Daniel Henrique Barboza wrote: When creating a pnv_phb3_root_port using the command line, the first root port is created successfully, but the second fails with the following error: qemu-system-ppc64: -device pnv-phb3-root-port,bus=

Re: [PATCH] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab

2022-01-04 Thread Alex Bennée
WANG Xuerui writes: > Normally this would be based on qemu/debian10 or qemu/ubuntu2004, but > after a week-long struggle, I still cannot build stage2 gcc with the > known-good LoongArch toolchain sources, so I chose the least-resistance > path with Gentoo as base image. As this image is not exp

Re: [PATCH 0/3] Reorg ppc64 pmu insn counting

2022-01-04 Thread Daniel Henrique Barboza
On 1/4/22 07:32, Alex Bennée wrote: Daniel Henrique Barboza writes: On 1/3/22 12:07, Alex Bennée wrote: Daniel Henrique Barboza writes: On 12/23/21 00:01, Richard Henderson wrote: In contrast to Daniel's version, the code stays in power8-pmu.c, but is better organized to not take so m

Re: [PATCH v2] linux-user: don't adjust base of found hole

2022-01-04 Thread Richard Henderson
On 1/4/22 3:32 AM, Alex Bennée wrote: The pgb_find_hole function goes to the trouble of taking account of both mmap_min_addr and any offset we've applied to decide the starting address of a potential hole. This is especially important for emulating 32bit ARM in a 32bit build as we have applied th

Re: [PATCH 0/2] tests/tcg: Fix float_{convs,madds}

2022-01-04 Thread Alex Bennée
Richard Henderson writes: > We didn't read the fp flags early enough, so we got whatever > came out of the guest printf. With careful review of the > hexagon output, we would have seen this long ago. Queued to testing/next, thanks. -- Alex Bennée

Re: [PATCH] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Laurent Vivier
Le 04/01/2022 à 20:04, Richard Henderson a écrit : For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 Reported-by: Laurent Vivier Signed-off-by: Richard Henderson --- common-user

Re: [PATCH] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab

2022-01-04 Thread Richard Henderson
On 1/4/22 10:31 AM, Alex Bennée wrote: +docker-image-gentoo-loongarch64-cross: $(DOCKER_FILES_DIR)/gentoo-loongarch64-cross.docker + $(if $(NOCACHE), \ + $(call quiet-command,

Re: [PATCH 6/9] target/ppc: powerpc_excp: Preserve MSR_LE bit

2022-01-04 Thread Fabiano Rosas
Fabiano Rosas writes: > We currently clear MSR_LE when copying bits from env->msr to > new_msr. However, for CPUs that do not have LPCR_ILE we always set > new_msr[LE] according to env->msr[LE]. And for CPUs that do have ILE > support we need to check LPCR/HID0 anyway, so there's no need to clear

Re: [PATCH v2 1/5] RISC-V: larger and more consistent register set for 'info registers'

2022-01-04 Thread Richard Henderson
On 1/4/22 7:51 AM, Konrad Schwarz wrote: static const int dump_csrs[] = { + +# if 0 +CSR_USTATUS, +CSR_UIE, +CSR_UTVEC, Adding huge sections of #if 0 code is not acceptable. r~

[PATCH v2 0/2] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]

2022-01-04 Thread matheus . ferst
From: Matheus Ferst In the review of 66c6b40aba1, Richard Henderson suggested[1] using "trap" instead of ".long 0x0" to generate the signal to test XER save/restore behavior. However, linux-user aborts when a trap exception is raised, so we kept the patch with SIGILL. This patch series is a foll

[PATCH v2 2/2] tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP

2022-01-04 Thread matheus . ferst
From: Matheus Ferst Now that linux-user delivers the signal on tw, we can change signal_save_restore_xer to use SIGTRAP instead of SIGILL. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Matheus Ferst --- tests/tcg/ppc64le/signal_save_restore_xer.c | 8

[PATCH v2 1/2] linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

2022-01-04 Thread matheus . ferst
From: Matheus Ferst Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. The si_code comes from do_program_check in the kernel source file arch/powerpc/kernel/traps.c Signed-off-by: Matheus Ferst --- linux-user/ppc/cpu_loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

[PATCH] Set return code on failure

2022-01-04 Thread Patrick Venture
From: Peter Foley Match the other error handling in this function. Signed-off-by: Peter Foley --- net/tap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tap.c b/net/tap.c index f716be3e3f..c5cbeaa7a2 100644 --- a/net/tap.c +++ b/net/tap.c @@ -900,6 +900,7 @@ int net_init_tap(const N

Re: [PATCH] Set return code on failure

2022-01-04 Thread Patrick Venture
On Tue, Jan 4, 2022 at 1:18 PM Patrick Venture wrote: > From: Peter Foley > > Match the other error handling in this function. > Just noticed I didn't fix up the commit title here to match style. Should I do a PATCH RESEND or a new patch, or can you add the "net/tap: " to the title before appl

Re: [PATCH] net/tap: Set return code on failure

2022-01-04 Thread Philippe Mathieu-Daudé
Cc'ing Daniel On 4/1/22 22:18, Patrick Venture wrote: From: Peter Foley Match the other error handling in this function. Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for TAP devices") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Foley --- net/tap.c

Re: [PATCH 1/3] target/riscv: rvv-1.0: Call the correct RVF/RVD check funtion for widening fp insns

2022-01-04 Thread Alistair Francis
On Wed, Dec 29, 2021 at 12:15 PM wrote: > > From: Frank Chang > > Vector widening floating-point instructions should use > require_scale_rvf() instead of require_rvf() to check whether RVF/RVD is > enabled. Missing Signed off by line Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc |

[PATCH v2] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Philippe Mathieu-Daudé
When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label can only be part of a statement a

Re: [PATCH v2 0/2] Align SiFive PDMA behavior to real hardware

2022-01-04 Thread Alistair Francis
On Tue, Jan 4, 2022 at 4:56 PM Jim Shu wrote: > > HiFive Unmatched PDMA supports high/low 32-bit access of 64-bit > register, but QEMU emulation supports low part access now. Enhance QEMU > emulation to support high 32-bit access. > > Also, permit 4/8-byte valid access in PDMA as we have verified

Re: [PATCH v2 3/5] RISC-V: 'info gmem' to show hypervisor guest -> physical address translations

2022-01-04 Thread Alistair Francis
On Wed, Jan 5, 2022 at 1:55 AM Konrad Schwarz wrote: > > This is analog to the existing 'info mem' command and is implemented > using the same machinery. > > Signed-off-by: Konrad Schwarz Hello and thanks for the patches > --- > hmp-commands-info.hx | 16 + > include/monitor/hmp-t

Re: [PATCH v2 1/2] linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

2022-01-04 Thread Richard Henderson
On 1/4/22 1:00 PM, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. The si_code comes from do_program_check in the kernel source file arch/powerpc/kernel/traps.c Signed-off-by: Matheus Ferst --- linux-user/ppc/cpu

Re: [PATCH v2] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Richard Henderson
On 1/4/22 1:50 PM, Philippe Mathieu-Daudé wrote: When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:

Re: [PATCH v2 4/5] RISC-V: Typed CSRs in gdbserver

2022-01-04 Thread Alistair Francis
On Wed, Jan 5, 2022 at 1:56 AM Konrad Schwarz wrote: > > GDB target descriptions support typed registers; > such that `info register X' displays not only the hex value of > register `X', but also the individual bitfields the register > comprises (if any), using textual labels if possible. > > This

Re: [PATCH v2 1/5] hw/arm/virt: Key enablement of highmem PCIe on highmem_ecam

2022-01-04 Thread Marc Zyngier
Hi Eric, On Tue, 04 Jan 2022 15:31:33 +, Eric Auger wrote: > > Hi Marc, > > On 12/27/21 4:53 PM, Marc Zyngier wrote: > > Hi Eric, > > > > Picking this up again after a stupidly long time... > > > > On Mon, 04 Oct 2021 13:00:21 +0100, > > Eric Auger wrote: > >> Hi Marc, > >> > >> On 10/3/21

RE: [PATCH 1/2] tests/tcg/multiarch: Read fp flags before printf

2022-01-04 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Thursday, December 23, 2021 9:56 PM > To: qemu-devel@nongnu.org > Cc: alex.ben...@linaro.org; Taylor Simpson > Subject: [PATCH 1/2] tests/tcg/multiarch: Read fp flags before printf > > We need to read the floating-point flags befo

Re: [PATCH v2 4/5] RISC-V: Typed CSRs in gdbserver

2022-01-04 Thread Richard Henderson
On 1/4/22 7:51 AM, Konrad Schwarz wrote: +++ b/target/riscv/csr32-op-gdbserver.h ... +++ b/target/riscv/csr64-op-gdbserver.h There is a *lot* of overlap between these two files. Why not add this data to the main csr_ops array? That would put all the info for each csr in one place. + [CSR_C

Re: [PATCH 1/2] tests/tcg/multiarch: Read fp flags before printf

2022-01-04 Thread Richard Henderson
On 1/4/22 2:48 PM, Taylor Simpson wrote: Was Hexagon the only target that needed new ref files? Yep. A curiosity of the guest libc, I guess. r~

Re: [PULL v3 00/15] Build system and KVM changes for 2021-12-23

2022-01-04 Thread Richard Henderson
On 1/4/22 6:57 AM, Paolo Bonzini wrote: The following changes since commit b5a3d8bc9146ba22a25116cb748c97341bf99737: Merge tag 'pull-misc-20220103' of https://gitlab.com/rth7680/qemu into staging (2022-01-03 09:34:41 -0800) are available in the Git repository at: https://gitlab.com/bonz

Re: [PATCH for 7.0 5/5] bsd-user-smoke: Add to build

2022-01-04 Thread Philippe Mathieu-Daudé
+Paolo for meson On 11/27/21 21:18, Warner Losh wrote: > Add a simple bsd-user smoke test for ensuring bsd-user is minimally > functional. This runs only when bsd-user has been configured. It adds a > simple execution of 'hello world' type binaries for bsd-user. At the > present these are tiny, ha

Re: [PATCH 1/2] hw/display/vmware_vga: replace fprintf calls with trace events

2022-01-04 Thread Philippe Mathieu-Daudé
On 1/4/22 19:06, Carwyn Ellis wrote: > Debug output was always being sent to STDERR. > > This has been replaced with trace events. > > Signed-off-by: Carwyn Ellis > --- > hw/display/trace-events | 3 +++ > hw/display/vmware_vga.c | 22 ++ > 2 files changed, 13 insertions(+)

Re: [PATCH v2] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Richard Henderson
On 1/4/22 1:50 PM, Philippe Mathieu-Daudé wrote: When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:

Re: [PATCH for 7.0 5/5] bsd-user-smoke: Add to build

2022-01-04 Thread Warner Losh
On Tue, Jan 4, 2022 at 4:25 PM Philippe Mathieu-Daudé wrote: > +Paolo for meson > > On 11/27/21 21:18, Warner Losh wrote: > > Add a simple bsd-user smoke test for ensuring bsd-user is minimally > > functional. This runs only when bsd-user has been configured. It adds a > > simple execution of 'he

Re: [PATCH] sysemu: Cleanup qemu_run_machine_init_done_notifiers()

2022-01-04 Thread Richard Henderson
On 1/3/22 6:41 PM, Xiaoyao Li wrote: Remove qemu_run_machine_init_done_notifiers() since no implementation and user. Signed-off-by: Xiaoyao Li --- include/sysemu/sysemu.h | 1 - 1 file changed, 1 deletion(-) Queued to tcg-next. Thanks. r~

Re: [PATCH] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Richard Henderson
On 1/4/22 11:04 AM, Richard Henderson wrote: For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 Reported-by: Laurent Vivier Signed-off-by: Richard Henderson --- common-user/host/

[PULL 0/4] tcg patch queue

2022-01-04 Thread Richard Henderson
The following changes since commit 67e41fe0cfb62e6cdfa659f0155417d17e5274ea: Merge tag 'pull-ppc-20220104' of https://github.com/legoater/qemu into staging (2022-01-04 07:23:27 -0800) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-202

[PULL 2/4] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Richard Henderson
From: Philippe Mathieu-Daudé When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label can

[PULL 3/4] sysemu: Cleanup qemu_run_machine_init_done_notifiers()

2022-01-04 Thread Richard Henderson
From: Xiaoyao Li Remove qemu_run_machine_init_done_notifiers() since no implementation and user. Fixes: f66dc8737c9 ("vl: move all generic initialization out of vl.c") Signed-off-by: Xiaoyao Li Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220104024136.1433545-1-xiaoyao...@intel.com> Sign

[PULL 4/4] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Richard Henderson
For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 ("linux-user: Move syscall error detection into safe_syscall_base") Reported-by: Laurent Vivier Tested-by: Laurent Vivier Reviewed

[PULL 1/4] tcg/optimize: Fix folding of vector ops

2022-01-04 Thread Richard Henderson
Bitwise operations are easy to fold, because the operation is identical regardless of element size. But add and sub need extra element size info that is not currently propagated. Fixes: 2f9f08ba43d Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/799 Reviewed-by:

[RFC 01/10] virtio: get class_id and pci device id by the virtio id

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the deivce which is specificed by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 93 +++

[RFC 00/10] add generic vDPA device support

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Hi guys, This patchset tries to support the generic vDPA device, the previous disscussion can be found here [1]. With the generic vDPA device, QEMU won't need to touch the device types any more, such like vfio. We can use the generic vDPA device as follow: -device vhost-vdpa-d

[RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread Longpeng(Mike)
From: Longpeng To support generic vdpa deivce, we need add the following ioctls: - GET_VECTORS_NUM: the count of vectors that supported - GET_CONFIG_SIZE: the size of the virtio config space - GET_VQS_NUM: the count of virtqueues that exported Signed-off-by: Longpeng --- linux-headers/linux/vh

[RFC 04/10] vdpa-dev: implement the instance_init/class_init interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .instance_init and the .class_init interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev-pci.c | 80 +++- hw/virtio/vdpa-dev.c | 68 +- include/hw/virtio/vdpa-dev.h | 2 + 3 files changed

[RFC 05/10] vdpa-dev: implement the realize interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .realize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 114 +++ include/hw/virtio/vdpa-dev.h | 8 +++ 2 files changed, 122 insertions(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 79011

[RFC 03/10] vdpa: add the infrastructure of vdpa-dev

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Add the infrastructure of vdpa-dev (the generic vDPA device), we can add a generic vDPA device as follow: -device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 hw/virtio/meson.build| 2 ++ hw/virti

<    1   2   3   >