Help with record/replay

2021-05-05 Thread Alex Bennée
Hi Pavel, I'm trying to get reverse debugging working to look at a Xen problem and I'm confused about what is going wrong. I've converted by normal setup which uses a ZFS block device to qcow2 so I have a place for the snapshots: ./qemu-system-aarch64 -machine virt,virtualization=on -cpu cortex

Re: [PATCH 08/23] hw/block/nvme: Avoid dynamic stack allocation

2021-05-05 Thread Klaus Jensen
On May 5 23:10, Philippe Mathieu-Daudé wrote: Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/nvme.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Philippe Mathieu-Daudé
On 5/6/21 4:15 AM, Keith Busch wrote: > On Wed, May 05, 2021 at 06:09:10PM -0500, Eric Blake wrote: >> On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote: >>> +Eric >>> >>> On 5/5/21 11:22 PM, Keith Busch wrote: On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote: > The com

Re: [PATCH 09/10] pckbd: correctly disable PS/2 communication

2021-05-05 Thread Philippe Mathieu-Daudé
Hi Volker, On 5/5/21 9:21 PM, Volker Rümelin wrote: > Currently the PS/2 controller command KBD_CCMD_MOUSE_DISABLE > doesn't disable the PS/2 mouse communication at all, and the > PS/2 controller commands KBD_CCMD_KBD_DISABLE and > KBD_CCMD_KBD_ENABLE disable and enable the keyboard interrupt, > w

Re: [PATCH 03/10] ps2: don't deassert irq twice if queue is empty

2021-05-05 Thread Philippe Mathieu-Daudé
On 5/5/21 9:21 PM, Volker Rümelin wrote: > Don't deassert the irq twice if the queue is empty. While the > second deassertion doesn't do any harm, it's unnecessary. > > Signed-off-by: Volker Rümelin > --- > hw/input/ps2.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: P

[Bug 1895363] Re: borland IDEs double up cursor key presses (need timing on PS2 port input)

2021-05-05 Thread Philippe Mathieu-Daudé
Possible fix: https://www.mail-archive.com/qemu-devel@nongnu.org/msg804823.html ** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1895363 Title: bor

[Bug 1897568] Re: Strange keyboard behaviour in Vim editor

2021-05-05 Thread Philippe Mathieu-Daudé
Possible fix: https://www.mail-archive.com/qemu-devel@nongnu.org/msg804823.html ** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1897568 Title: Str

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Klaus Jensen
On May 5 23:10, Philippe Mathieu-Daudé wrote: The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE' is a constant! Help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block

[Bug 1865248] Re: bundle QEMU installer with a QEMU GUI (graphical user interface) such as Virt Manager

2021-05-05 Thread Thomas Huth
Sorry, but I don't think that any of the current QEMU project members has plans to work on such a bundle. This requires a new contributor to step up and do the job. ** Changed in: qemu Status: New => Won't Fix -- You received this bug notification because you are a member of qemu- devel-m

[Bug 1865348] Re: virsh domfsinfo testdom crashes the guest agent

2021-05-05 Thread Thomas Huth
Does this problem still reproduce with the latest versions of QEMU and libvirt? If so, could you please provide a backtrace of the crashed guest-agent? Thanks! ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, w

Re: [PATCH 04/10] pckbd: split out interrupt line changing code

2021-05-05 Thread Philippe Mathieu-Daudé
On 5/5/21 9:21 PM, Volker Rümelin wrote: > Split out the interrupt line changing code from kbd_update_irq(). > This is a preparation for the next patch. There is no functional > change. > > Signed-off-by: Volker Rümelin > --- > hw/input/pckbd.c | 32 ++-- > 1 file cha

[Bug 1865252] Re: QEMU Windows Portable Version (with HAXM accelerator and QEMU GUI)

2021-05-05 Thread Thomas Huth
QEMU, like most open source projects, relies on contributors who have motivation, skills and available time to work on implementing particular features. They naturally tend to focus on features that result in the greatest benefit to their own use cases. I'm sorry, but as far as I know there is curr

Re: [PATCH 02/10] ps2: don't raise an interrupt if queue is full

2021-05-05 Thread Philippe Mathieu-Daudé
On 5/5/21 9:21 PM, Volker Rümelin wrote: > ps2_queue() behaves differently than the very similar functions > ps2_queue_2() to ps2_queue_4(). The first one calls update_irq() > even if the queue is full, the others don't. Change ps2_queue() > to be consistent with the others. > > Signed-off-by: Vol

Re: [for-6.1 v2 2/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-05-05 Thread Greg Kurz
On Wed, 5 May 2021 14:52:42 -0400 Vivek Goyal wrote: > On Mon, Apr 26, 2021 at 05:21:35PM +0200, Greg Kurz wrote: > > Honor the expected behavior of syncfs() to synchronously flush all > > data and metadata on linux systems. > > > > Flushing is done with syncfs(). This is suboptimal as it will a

[Bug 1865188] Re: Switching from the monitor to the emulated machine with a French keyboard (AZERTY)

2021-05-05 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the state back to

[Bug 1865252] Re: QEMU Windows Portable Version (with HAXM accelerator and QEMU GUI)

2021-05-05 Thread Thomas Huth
** Tags added: feature-request haxm ** Changed in: qemu Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1865252 Title: QEMU Windows Portable Version (with HAXM a

[Bug 1864984] Re: "nr_entries is too big" when using virgl

2021-05-05 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the state back to

[Bug 1865099] Re: cannot run x64 based system on x64 host with Intel Haxm

2021-05-05 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the state back to

[Bug 1863710] Re: qemu 4.2 does not process discard(trim) commands

2021-05-05 Thread Thomas Huth
I mean: Please provide the QEMU command line parameters ... is this also reproducible without libvirt? ... otherwise it might also be a problem in libvirt instead... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchp

[Bug 1864955] Re: bundle QEMU installer with HAXM accelerator for Windows

2021-05-05 Thread Thomas Huth
The QEMU project itself does not provide any binaries for Windows, so I'm closing this ticket now. There are several people who provide binaries for Windows, so if you want to get one of these changed, please get in touch with the corresponding person who offers that binary instead. ** Changed in:

[Bug 1863710] Re: qemu 4.2 does not process discard(trim) commands

2021-05-05 Thread Thomas Huth
How did you start QEMU? Does this still happen with the latest version of QEMU? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863710 Title: qe

Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info

2021-05-05 Thread P J P
+-- On Wed, 5 May 2021, Li Qiang wrote --+ | P J P 于2021年5月5日周三 下午3:24写道: | > - vg_ctrl_response(g, cmd, &resp.hdr, sizeof(resp)); | > + vg_ctrl_response(g, cmd, &resp.hdr, sizeof(resp.hdr)); | > | > * While memset(3) is okay, should it also send header(hdr) size as 'resp_len'? | | I don't t

[Bug 1864704] Re: No compatible -machine option in qemu-system-ppc64 for e6500 core

2021-05-05 Thread Thomas Huth
You could try to build an image for this machine with buildroot (see https://buildroot.org/). Anyway, I'm closing this ticket now since this was not a bug. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is

[Bug 1864814] Re: Improve UX for macOS when launching from a fullscreen app

2021-05-05 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the state back to

[Bug 1864536] Re: Support for XSAVES intel instructions in QEMU

2021-05-05 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the state back to

[Bug 1863601] Re: unable to type "|" character in french keyboard.

2021-05-05 Thread Thomas Huth
Aditya, does the problem still persist? If so, could you please provide the QEMU command line as requested by Daniel? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.l

[Bug 1863678] Re: qemu and virtio-vga black screen in Android

2021-05-05 Thread Thomas Huth
I'm closing this now. If the problem still persists, please report it to libslirp instead. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863678 Tit

[Bug 1891749] Re: CGA Mode 6 is only 100 pixels tall, when it's supposed to be 200

2021-05-05 Thread Thomas Huth
Could you please provide a test program for this issue? ** Tags added: graphics ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1891749 Title: C

Re: [PATCH 09/23] hw/net/e1000e_core: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Jason Wang
在 2021/5/6 上午5:10, Philippe Mathieu-Daudé 写道: The compiler isn't clever enough to figure 'min_buf_size' is a constant, so help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- hw/net/e1000e_core.c | 7 --- 1 file changed, 4 insert

Re: [PATCH] virtio-net: failover: add missing remove_migration_state_change_notifier()

2021-05-05 Thread Jason Wang
在 2021/5/5 下午3:46, Laurent Vivier 写道: On 29/04/2021 09:26, Jason Wang wrote: 在 2021/4/28 下午6:14, Michael S. Tsirkin 写道: On Tue, Apr 27, 2021 at 03:02:34PM +0100, Dr. David Alan Gilbert wrote: * Laurent Vivier (lviv...@redhat.com) wrote: In the failover case configuration, virtio_net_device_

Re: [RFC-PATCH] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-05 Thread Vaibhav Jain
Hi David, Firstly, apologies for responding so late. I have spinned off a v2 of this RFC patch addressing your recent review comments at https://lore.kernel.org/qemu-devel/20210506024924.85526-1-vaib...@linux.ibm.com -- Cheers ~ Vaibhav David Gibson writes: > On Tue, Apr 20, 2021 at 03:06:18

Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases

2021-05-05 Thread Brad Smith
On 5/5/2021 10:19 PM, Jason Wang wrote: 在 2021/5/2 下午12:10, Brad Smith 写道: On 4/1/2021 3:24 AM, Jason Wang wrote: 在 2021/3/30 上午4:38, Brad Smith 写道: On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases any

Re: [PATCH v2] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Jason Wang
在 2021/5/3 下午9:53, Guenter Roeck 写道: If a PHY does not exist, attempts to read from it should return 0x. Otherwise the Linux kernel will believe that a PHY is there and select the non-existing PHY. This in turn will result in network errors later on since the real PHY is not selected or con

Re: [PATCH 1/7] migration: use GDateTime for formatting timestamp in snapshot names

2021-05-05 Thread Brad Smith
Thank you. On 5/5/2021 6:36 AM, Daniel P. Berrangé wrote: The GDateTime APIs provided by GLib avoid portability pitfalls, such as some platforms where 'struct timeval.tv_sec' field is still 'long' instead of 'time_t'. When combined with automatic cleanup, GDateTime often results in simpler code

Re: [PATCH] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Guenter Roeck
On Thu, May 06, 2021 at 10:24:52AM +0800, Jason Wang wrote: [ ... ] > Ok, please send V2. > You should have it by now. Please let me know if it got lost. Thanks, Guenter

[RFC PATCH v2] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-05 Thread Vaibhav Jain
Add support for H_SCM_PERFORMANCE_STATS described at [1] for spapr nvdimms. This enables guest to fetch performance stats[2] like expected life of an nvdimm ('MemLife ') etc and display them to the user. Linux kernel support for fetching these performance stats and exposing them to the user-space w

Re: [PATCH] hw/arm/xlnx: Fix PHY address for xilinx-zynq-a9

2021-05-05 Thread Guenter Roeck
On 5/5/21 6:58 PM, Bin Meng wrote: > Hi Guenter, > > On Tue, May 4, 2021 at 8:41 PM Guenter Roeck wrote: >> >> Commit dfc388797cc4 ("hw/arm: xlnx: Set all boards' GEM 'phy-addr' >> property value to 23") configured the PHY address for xilinx-zynq-a9 >> to 23. When trying to boot xilinx-zynq-a9 wi

Re: [PATCH] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Jason Wang
在 2021/5/3 上午12:14, Guenter Roeck 写道: On 5/2/21 9:09 AM, Bin Meng wrote: On Mon, May 3, 2021 at 12:03 AM Guenter Roeck wrote: If a PHY does not exist, attempts to read from it should return 0x. Otherwise the Linux kernel will believe that a PHY is there and select the non-existing PHY. T

Re: [PATCH] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Jason Wang
在 2021/5/3 上午12:03, Guenter Roeck 写道: If a PHY does not exist, attempts to read from it should return 0x. Otherwise the Linux kernel will believe that a PHY is there and select the non-existing PHY. This in turn will result in network errors later on since the real PHY is not selected or co

Re: [PATCH 5/5] target/ppc/kvm: Replace alloca() by g_malloc()

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 07:00:55PM +0200, Philippe Mathieu-Daudé wrote: > The ALLOCA(3) man-page mentions its "use is discouraged". > > Replace it by a g_malloc() call. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/kvm.c | 10 +- > 1 file changed

Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases

2021-05-05 Thread Jason Wang
在 2021/5/2 下午12:10, Brad Smith 写道: On 4/1/2021 3:24 AM, Jason Wang wrote: 在 2021/3/30 上午4:38, Brad Smith 写道: On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases anymore. So is there a doc/wiki to say Q

Re: [PATCH 11/23] hw/intc/xics: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:35PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > hw/intc/xics.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH 15/23] net: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:39PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé fsl_etsec parts Acked-by: David Gibson > --- > hw/net/fsl_etsec/rings.c | 9 - > hw/n

Re: [RFC PATCH v2 1/2] target/ppc: Moved functions out of mmu-hash64

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 02:30:35PM -0300, Lucas Mateus Martins Araujo e Castro wrote: > > On 03/05/2021 01:24, David Gibson wrote: > > On Fri, Apr 30, 2021 at 03:40:46PM -0300, Lucas Mateus Castro (alqotel) > > wrote: > > > The functions ppc_store_lpcr, ppc_hash64_filter_pagesizes and > > > ppc_

Re: [PATCH 21/23] target/ppc/kvm: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:45PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH 10/23] hw/ppc/pnv: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:34PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > hw/ppc/pnv.c | 4 ++-- > hw/ppc/spapr.c |

Re: [PATCH 2/2] vhost-vdpa: doorbell mapping support

2021-05-05 Thread Jason Wang
在 2021/5/1 上午6:32, Si-Wei Liu 写道: On 4/15/2021 1:04 AM, Jason Wang wrote: This patch implements the doorbell mapping support for vhost-vDPA. This is simply done by using mmap()/munmap() for the vhost-vDPA fd during device start/stop. For the device without doorbell support, we fall back to e

Re: [RESEND PATCH 13/32] linux-headers: Add placeholder for KVM_CAP_SGX_ATTRIBUTE

2021-05-05 Thread Kai Huang
On Fri, 2021-04-30 at 14:24 +0800, Yang Zhong wrote: > From: Sean Christopherson > > KVM_CAP_SGX_ATTRIBUTE is a proposed capability for Intel SGX that can be > used by userspace to enable privileged attributes, e.g. access to the > PROVISIONKEY. > > Signed-off-by: Sean Christopherson > Signed-o

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Keith Busch
On Wed, May 05, 2021 at 06:09:10PM -0500, Eric Blake wrote: > On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote: > > +Eric > > > > On 5/5/21 11:22 PM, Keith Busch wrote: > >> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote: > >>> The compiler isn't clever enough to figure 'SEG

Re: [PATCH 1/2] Consistent function names for sifive uart read and write function

2021-05-05 Thread Alistair Francis
On Wed, May 5, 2021 at 2:50 AM Lukas Jünger wrote: > > Signed-off-by: Lukas Jünger Reviewed-by: Alistair Francis Alistair > --- > hw/char/sifive_uart.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c > inde

Re: [PATCH v2] target/riscv: fix wfi exception behavior

2021-05-05 Thread Alistair Francis
On Wed, Apr 21, 2021 at 7:37 AM Jose Martins wrote: > > The wfi exception trigger behavior should take into account user mode, > hstatus.vtw, and the fact the an wfi might raise different types of > exceptions depending on various factors: > > If supervisor mode is not present: > > - an illegal in

Re: [PATCH 16/22] qapi/parser: add docstrings

2021-05-05 Thread John Snow
On 4/27/21 5:03 AM, Markus Armbruster wrote: John Snow writes: On 4/25/21 9:27 AM, Markus Armbruster wrote: John Snow writes: Signed-off-by: John Snow --- My hubris is infinite. Score one of the three principal virtues of a programmer ;) It was written before the prior review, but

Re: [PATCH v6 02/17] target/riscv: rvb: count leading/trailing zeros

2021-05-05 Thread Alistair Francis
On Thu, May 6, 2021 at 2:24 AM wrote: > > From: Kito Cheng > > Signed-off-by: Kito Cheng > Signed-off-by: Frank Chang > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h | 1 + > target/riscv/insn32.decode |

Re: [PATCH] hw/arm/xlnx: Fix PHY address for xilinx-zynq-a9

2021-05-05 Thread Bin Meng
Hi Guenter, On Tue, May 4, 2021 at 8:41 PM Guenter Roeck wrote: > > Commit dfc388797cc4 ("hw/arm: xlnx: Set all boards' GEM 'phy-addr' > property value to 23") configured the PHY address for xilinx-zynq-a9 > to 23. When trying to boot xilinx-zynq-a9 with zynq-zc702.dtb or > zynq-zc706.dtb, this r

[RFC][PATCH v1 10/10] Introduce new CPUClass::get_phys_page_attrs_debug implementation for encrypted guests

2021-05-05 Thread Yuan Yao
From: Yuan Yao Add new function x86_cpu_get_phys_page_attrs_encrypted_debug() to walking guset page tables to do VA -> PA translation for encrypted guests. Now install this to cc->get_phys_page_attrs_debug for INTEL TD guests only. Signed-off-by: Yuan Yao diff --git a/target/i386/cpu.h b/targ

Re: [PATCH 12/22] qapi/parser: add type hint annotations

2021-05-05 Thread John Snow
On 4/27/21 4:43 AM, Markus Armbruster wrote: John Snow writes: On 4/25/21 8:34 AM, Markus Armbruster wrote: value: object isn't wrong, but why not _ExprValue? Updated excuse: because all the way back outside in _parse, we know that: 1. expr is a dict (because of get_expr(False)) 2. expr[

[RFC][PATCH v1 08/10] Introduce debug version of physical memory read/write API

2021-05-05 Thread Yuan Yao
From: Yuan Yao Add below APIs for reading/writing the physical memory, subsequent patch will use them in monitor commands and gdbstub to support encrypted guest debugging. uint32_t x86_ldl_phys_debug(CPUState *cs, hwaddr addr); uint64_t x86_ldq_phys_debug(CPUState *cs, hwaddr addr); void cpu_phy

[RFC][PATCH v1 05/10] Set the RAM's MemoryRegion::debug_ops for INTEL TD guests

2021-05-05 Thread Yuan Yao
From: Yuan Yao Now only set the RAM's debug_ops for INTEL TD guests, SEV can also rely on the common part introduced in previous patch or introduce new debug_ops implementation if it's necessary. Signed-off-by: Yuan Yao diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d5a4345f44..772b19c524 1006

[RFC][PATCH v1 02/10] Currently, guest memory access for debugging purposes is performed using memcpy(). Extend the 'struct MemoryRegion' to include new callbacks that can be used to override the use

2021-05-05 Thread Yuan Yao
From: Brijesh Singh The new callbacks can be used to display the guest memory of an SEV guest by registering callbacks to the SEV memory encryption/decryption APIs. Typical usage: mem_read(uint8_t *dest, const uint8_t *hva_src, hwaddr gpa_src, uint32_t len, MemTxAttrs attrs);

[RFC][PATCH v1 09/10] Change the monitor and other commands and gdbstub to use the debug API

2021-05-05 Thread Yuan Yao
From: Yuan Yao Please comment if some changes are incorrect or I missed something here. Signed-off-by: Yuan Yao diff --git a/dump/dump.c b/dump/dump.c index 929138e91d..21eb018092 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1746,7 +1746,7 @@ static void dump_init(DumpState *s, int fd, bool

[RFC][PATCH v1 04/10] Implements the common MemoryRegion::ram_debug_ops for encrypted guests

2021-05-05 Thread Yuan Yao
From: Yuan Yao The new functions are added into target/i386/kvm/kvm.c as common functions to support encrypted guest for KVM on x86. Now we enable these only for INTEL TD guests. Signed-off-by: Yuan Yao diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 05bf4f8b8b..5050b2a82f 10

[RFC][PATCH v1 01/10] Extend the MemTxAttrs to include a 'debug' flag. The flag can be used as general indicator that operation was triggered by the debugger.

2021-05-05 Thread Yuan Yao
From: Brijesh Singh A subsequent patch will set the debug=1 when issuing a memory access from the gdbstub or HMP commands. This is a prerequisite to support debugging an encrypted guest. When a request with debug=1 is seen, the encryption APIs will be used to access the guest memory. Signed-off-

[RFC][PATCH v1 07/10] Add new address_space_read and address_space_write debug helper interfaces which can be invoked by vendor specific guest memory debug assist/hooks to do guest RAM memory accesses

2021-05-05 Thread Yuan Yao
From: Ashish Kalra Yuan Yao: - Fixed fuzz_dma_read_cb() parameter issue for QEMU 5.2.91. - Move the caller of encrypted_memory_debug_ops into phymem.c as common callbacks for encrypted guests. - Adapted address_space_read_debug/address_space_wirte_rom_debug with new defini

[RFC][PATCH v1 06/10] Introduce new MemoryDebugOps which hook into guest virtual and physical memory debug interfaces such as cpu_memory_rw_debug, to allow vendor specific assist/hooks for debugging a

2021-05-05 Thread Yuan Yao
From: Ashish Kalra The MemoryDebugOps are used by cpu_memory_rw_debug() and default to address_space_read and address_space_write_rom. Yuan Yao: Exports the physical_memory_debug_ops variable for functions in target/i386/helper.c Signed-off-by: Ashish Kalra Signed-off-by: Yuan Yao diff --git

[RFC][PATCH v1 03/10] Introduce new interface KVMState::set_mr_debug_ops and its wrapper

2021-05-05 Thread Yuan Yao
From: Yuan Yao This interface is designed to setup the MemoryRegion::debug_ops. Also introduced 2 wrapper functions for installing/calling the KVMState::set_mr_debug_ops from different targets easily. Signed-off-by: Yuan Yao diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index b6d5c9f

[RFC][PATCH v1 00/10] Enable encrypted guest memory access in QEMU

2021-05-05 Thread Yuan Yao
From: Yuan Yao This RFC series introduces the basic framework and a common implementation on x86 to handle encrypted guest memory reading/writing, to support QEMU's built-in guest debugging features, like the monitor command xp and gdbstub. The encrypted guest which its memory and/or register co

Re: [PATCH 12/22] qapi/parser: add type hint annotations

2021-05-05 Thread John Snow
On 4/21/21 11:07 PM, John Snow wrote: +self.exprs: List[Expression] = [] I did indeed intend to use Expression to mean TopLevelExpr ... However, in this case, that's not what actually gets stored here. I tricked myself! This stores the dict that associates 'expr', 'doc' and 'info'.

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Warner Losh
On Wed, May 5, 2021, 5:10 PM Eric Blake wrote: > On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote: > > +Eric > > > > On 5/5/21 11:22 PM, Keith Busch wrote: > >> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote: > >>> The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE'

[Bug 1921061] Re: Corsair iCUE Install Fails, qemu VM Reboots

2021-05-05 Thread Russell Morris
FYI, to provide an update - I found a workaround! It's related to the CPU selection. I can't seem to pass through my host CPU, even with v6.0.0 of qemu. Rather, I have to use the qemu64 CPU. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

[PULL v2 35/42] target/riscv: Remove the hardcoded HGATP_MODE macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 665f624bfdc2e3ca64265004b07de7489c77a766.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 11 --- target/riscv/cpu_helper.c | 24 +++- 2 files cha

[PULL v2 32/42] target/riscv: fix a typo with interrupt names

2021-05-05 Thread Alistair Francis
From: Emmanuel Blot Interrupt names have been swapped in 205377f8 and do not follow IRQ_*_EXT definition order. Signed-off-by: Emmanuel Blot Reviewed-by: Alistair Francis Message-id: 20210421133236.11323-1-emmanuel.b...@sifive.com Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 2 +-

[PULL v2 39/42] target/riscv: Remove an unused CASE_OP_32_64 macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 4853459564af35a6690120c74ad892f60cec35ff.1619234854.git.alistair.fran...@wdc.com --- target/riscv/translate.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/riscv/translate.c b/tar

[PULL v2 28/42] target/riscv: fix vrgather macro index variable type bug

2021-05-05 Thread Alistair Francis
From: Frank Chang ETYPE may be type of uint64_t, thus index variable has to be declared as type of uint64_t, too. Otherwise the value read from vs1 register may be truncated to type of uint32_t. Signed-off-by: Frank Chang Reviewed-by: Richard Henderson Message-id: 20210419060302.14075-1-frank.

[PULL v2 34/42] target/riscv: Remove the hardcoded SSTATUS_SD macro

2021-05-05 Thread Alistair Francis
This also ensures that the SD bit is not writable. Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 9ea842309f0fd7adff172790f5b5fc058b40f2f1.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 6 -- target/riscv/csr.c

[PULL v2 18/42] target/riscv: Fixup saturate subtract function

2021-05-05 Thread Alistair Francis
From: LIU Zhiwei The overflow predication ((a - b) ^ a) & (a ^ b) & INT64_MIN is right. However, when the predication is ture and a is 0, it should return maximum. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-id: 20210212150256.885-4-zhiwei_..

[PULL v2 41/42] target/riscv: Consolidate RV32/64 16-bit instructions

2021-05-05 Thread Alistair Francis
This patch removes the insn16-32.decode and insn16-64.decode decode files and consolidates the instructions into the general RISC-V insn16.decode decode tree. This means that all of the instructions are avaliable in both the 32-bit and 64-bit builds. This also means that we run a check to ensure w

[PULL v2 33/42] target/riscv: Remove the hardcoded RVXLEN macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: a07bc0c6dc4958681b4f93cbc5d0acc31ed3344a.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 6 -- target/riscv/cpu.c | 6 +- 2 files changed, 5 insertions(+), 7 deletions(-)

[PULL v2 15/42] hw/opentitan: Update the interrupt layout

2021-05-05 Thread Alistair Francis
Update the OpenTitan interrupt layout to match the latest OpenTitan bitstreams. This involves changing the Ibex PLIC memory layout and the UART interrupts. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: e92b696f1809c9fa4410da2e9f23c414db5a6960.1617202791.git.alistair.fran...@

[PULL v2 40/42] target/riscv: Consolidate RV32/64 32-bit instructions

2021-05-05 Thread Alistair Francis
This patch removes the insn32-64.decode decode file and consolidates the instructions into the general RISC-V insn32.decode decode tree. This means that all of the instructions are avaliable in both the 32-bit and 64-bit builds. This also means that we run a check to ensure we are running a 64-bit

[PULL v2 30/42] hw/riscv: Fix OT IBEX reset vector

2021-05-05 Thread Alistair Francis
From: Alexander Wagner The IBEX documentation [1] specifies the reset vector to be "the most significant 3 bytes of the boot address and the reset value (0x80) as the least significant byte". [1] https://github.com/lowRISC/ibex/blob/master/doc/03_reference/exception_interrupts.rst Signed-off-b

[PULL v2 13/42] target/riscv: Use RISCVException enum for CSR access

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 302b208f40373557fa11b351b5c9f43039ca8ea3.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 11 +++ target/riscv/csr.c | 37 ++---

[PULL v2 29/42] target/riscv: fix exception index on instruction access fault

2021-05-05 Thread Alistair Francis
From: Emmanuel Blot When no MMU is used and the guest code attempts to fetch an instruction from an invalid memory location, the exception index defaults to a data load access fault, rather an instruction access fault. Signed-off-by: Emmanuel Blot Reviewed-by: Alistair Francis Message-id: fb9e

[PULL v2 37/42] target/riscv: Remove the hardcoded SATP_MODE macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Message-id: 6b701769d6621f45ba1739334198e36a64fe04df.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 11 --- target/riscv/cpu_helper.c | 32 target/riscv/csr.c

[PULL v2 31/42] fpu/softfloat: set invalid excp flag for RISC-V muladd instructions

2021-05-05 Thread Alistair Francis
From: Frank Chang In IEEE 754-2008 spec: Invalid operation exception is signaled when doing: fusedMultiplyAdd(0, Inf, c) or fusedMultiplyAdd(Inf, 0, c) unless c is a quiet NaN; if c is a quiet NaN then it is implementation defined whether the invalid operation exception is signaled. In

[PULL v2 25/42] target/riscv: Add a config option for ePMP

2021-05-05 Thread Alistair Francis
From: Hou Weiying Add a config option to enable experimental support for ePMP. This is disabled by default and can be enabled with 'x-epmp=true'. Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Messag

[PULL v2 12/42] target/riscv: Use the RISCVException enum for CSR operations

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 8566c4c271723f27f3ae8fc2429f906a459f17ce.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 14 +- target/riscv/csr.c | 629 +++-- 2 files cha

[PULL v2 10/42] target/riscv: Use the RISCVException enum for CSR predicates

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 187261fa671c3a77cf5aa482adb2a558c02a7cad.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 3 +- target/riscv/csr.c | 80 +- 2 files chan

[PULL v2 24/42] target/riscv: Implementation of enhanced PMP (ePMP)

2021-05-05 Thread Alistair Francis
From: Hou Weiying This commit adds support for ePMP v0.9.1. The ePMP spec can be found in: https://docs.google.com/document/d/1Mh_aiHYxemL0umN3GTTw8vsbmzHZ_nxZXgjgOUzbvc8 Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Signed-off-by: Alistair Francis Rev

[PULL v2 22/42] target/riscv: Add the ePMP feature

2021-05-05 Thread Alistair Francis
The spec is avaliable at: https://docs.google.com/document/d/1Mh_aiHYxemL0umN3GTTw8vsbmzHZ_nxZXgjgOUzbvc8 Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: 28c8855c80b0388a08c3ae009f5467e2b3960ce0.1618812899.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 1 + 1 file chan

[PULL v2 42/42] target/riscv: Fix the RV64H decode comment

2021-05-05 Thread Alistair Francis
BugLink: https://gitlab.com/qemu-project/qemu/-/issues/47 Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Message-id: 024ce841221c1d15c74b253512428c4baca7e4ba.1619234854.git.alistair.fran...@wdc.com --- target/riscv/insn32.decode | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PULL v2 23/42] target/riscv: Add ePMP CSR access functions

2021-05-05 Thread Alistair Francis
From: Hou Weiying Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: 270762cb2507fba6a9eeb99a774cf49f7da9cc32.1618812899.git.alistair.fran...@wdc.com [ Changes by AF: - Rebase on master - F

[PULL v2 21/42] target/riscv: Define ePMP mseccfg

2021-05-05 Thread Alistair Francis
From: Hou Weiying Use address 0x390 and 0x391 for the ePMP CSRs. Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Reviewed-by: Alistair Francis Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: 63245b559f477a9ce6d4f930136d2d7fd7f99c78.16

[PULL v2 09/42] target/riscv: Convert the RISC-V exceptions to an enum

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Reviewed-by: Richard Henderson Message-id: f191dcf08bf413a822e743a7c7f824d68879a527.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 44 --- target/riscv/cpu.c| 2 +- targe

[PULL v2 38/42] target/riscv: Remove the unused HSTATUS_WPRI macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: e095b57af0d419c8ed822958f04dfc732d7beb7e.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/riscv/cpu_bits.h b/targe

[PULL v2 19/42] docs: Add documentation for shakti_c machine

2021-05-05 Thread Alistair Francis
From: Vijai Kumar K Add documentation for Shakti C reference platform. Signed-off-by: Vijai Kumar K Reviewed-by: Alistair Francis Message-id: 20210412174248.8668-1-vi...@behindbytes.com Signed-off-by: Bin Meng [ Changes from Bin Meng: - Add missing TOC Message-id: 20210430070534.1487242-1-b

[PULL v2 20/42] target/riscv: Fix the PMP is locked check when using TOR

2021-05-05 Thread Alistair Francis
The RISC-V spec says: if PMP entry i is locked and pmpicfg.A is set to TOR, writes to pmpaddri-1 are ignored. The current QEMU code ignores accesses to pmpaddri-1 and pmpcfgi-1 which is incorrect. Update the pmp_is_locked() function to not check the supporting fields and instead enforce t

[PULL v2 08/42] hw/riscv: Connect Shakti UART to Shakti platform

2021-05-05 Thread Alistair Francis
From: Vijai Kumar K Connect one shakti uart to the shakti_c machine. Signed-off-by: Vijai Kumar K Reviewed-by: Alistair Francis Message-id: 20210401181457.73039-5-vi...@behindbytes.com Signed-off-by: Alistair Francis --- include/hw/riscv/shakti_c.h | 2 ++ hw/riscv/shakti_c.c | 8 +++

[PULL v2 36/42] target/riscv: Remove the hardcoded MSTATUS_SD macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Message-id: fcc125d96da941b56c817c9dd6068dc36478fc53.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 10 -- target/riscv/csr.c | 12 ++-- target/riscv/translate.c | 19 +--

[PULL v2 17/42] riscv: don't look at SUM when accessing memory from a debugger context

2021-05-05 Thread Alistair Francis
From: Jade Fink Previously the qemu monitor and gdbstub looked at SUM and refused to perform accesses to user memory if it is off, which was an impediment to debugging. Signed-off-by: Jade Fink Reviewed-by: Alistair Francis Message-id: 20210406113109.1031033-1-q...@jade.fyi Signed-off-by: Alis

[PULL v2 16/42] hw/riscv: Enable VIRTIO_VGA for RISC-V virt machine

2021-05-05 Thread Alistair Francis
imply VIRTIO_VGA for the virt machine, this fixes the following error when specifying `-vga virtio` as a command line argument: qemu-system-riscv64: Virtio VGA not available Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: 7ac26fafee8bd59d2a0640f3233f8ad1ab270e1e.1617367317.gi

  1   2   3   4   5   6   >