Re: [PULL for-6.1 06/11] hw/nvme: fix controller hot unplugging

2021-09-09 Thread Hannes Reinecke
On 7/26/21 9:18 PM, Klaus Jensen wrote: From: Klaus Jensen Prior to this patch the nvme-ns devices are always children of the NvmeBus owned by the NvmeCtrl. This causes the namespaces to be unrealized when the parent device is removed. However, when subsystems are involved, this is not what we

Re: [PATCH 6/7] monitor: Fix coredump issue in non-x86 platform

2021-09-09 Thread Yang Zhong
On Wed, Sep 08, 2021 at 10:54:06AM +0200, Paolo Bonzini wrote: > On 08/09/21 10:19, Yang Zhong wrote: > >+if (sgx_enabled) { > >+MachineState *ms = MACHINE(qdev_get_machine()); > >+X86MachineState *x86ms = X86_MACHINE(qdev_get_machine()); > >+ > > You can use object_dynamic_cas

Re: [PATCH] multifd: Implement yank for multifd send side

2021-09-09 Thread Juan Quintela
Lukas Straub wrote: > When introducing yank functionality in the migration code I forgot > to cover the multifd send side. > > Signed-off-by: Lukas Straub > Tested-by: Leonardo Bras > Reviewed-by: Leonardo Bras Reviewed-by: Juan Quintela

Re: [PATCH 3/7] i386: Add sgx_get_info() interface

2021-09-09 Thread Yang Zhong
On Wed, Sep 08, 2021 at 10:55:13AM +0200, Paolo Bonzini wrote: > On 08/09/21 10:19, Yang Zhong wrote: > >+if (x86ms->sgx_epc_list) { > >+PCMachineState *pcms = PC_MACHINE(ms); > >+SGXEPCState *sgx_epc = &pcms->sgx_epc; > >+info = g_new0(SGXInfo, 1); > >+ > >+info

Re: [PATCH RFC server v2 06/11] vfio-user: handle PCI config space accesses

2021-09-09 Thread Stefan Hajnoczi
On Fri, Aug 27, 2021 at 01:53:25PM -0400, Jagannathan Raman wrote: > +static ssize_t vfu_object_cfg_access(vfu_ctx_t *vfu_ctx, char * const buf, > + size_t count, loff_t offset, > + const bool is_write) > +{ > +VfuObject *o

Re: [PATCH v5 3/9] migration/ram: Don't passs RAMState to migration_clear_memory_region_dirty_bitmap_*()

2021-09-09 Thread Juan Quintela
David Hildenbrand wrote: > The parameter is unused, let's drop it. > > Reviewed-by: Peter Xu > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: David Hildenbrand Reviewed-by: Juan Quintela

Re: [PATCH v2 1/2] migration: allow multifd for socket protocol only

2021-09-09 Thread Juan Quintela
Li Zhijian wrote: > multifd with unsupported protocol will cause a segment fault. > (gdb) bt > #0 0x563b4a93faf8 in socket_connect (addr=0x0, errp=0x7f7f02675410) at > ../util/qemu-sockets.c:1190 > #1 0x563b4a797a03 in qio_channel_socket_connect_sync > (ioc=0x563b4d16e8c0, addr=0x0, er

Re: [PATCH v2 2/2] migration: allow enabling mutilfd for specific protocol only

2021-09-09 Thread Juan Quintela
Li Zhijian wrote: > And change the default to true so that in '-incoming defer' case, user is able > to change multifd capability. > > Signed-off-by: Li Zhijian Reviewed-by: Juan Quintela

Re: [PATCH RFC server v2 07/11] vfio-user: handle DMA mappings

2021-09-09 Thread Stefan Hajnoczi
On Fri, Aug 27, 2021 at 01:53:26PM -0400, Jagannathan Raman wrote: > Define and register callbacks to manage the RAM regions used for > device DMA > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/remote/vfio-user-obj.c | 50 > +++

Re: [PATCH RFC server v2 08/11] vfio-user: handle PCI BAR accesses

2021-09-09 Thread Stefan Hajnoczi
On Fri, Aug 27, 2021 at 01:53:27PM -0400, Jagannathan Raman wrote: > +/** > + * VFU_OBJECT_BAR_HANDLER - macro for defining handlers for PCI BARs. > + * > + * To create handler for BAR number 2, VFU_OBJECT_BAR_HANDLER(2) would > + * define vfu_object_bar2_handler > + */ > +#define VFU_OBJECT_BAR_HA

Re: [PATCH RFC server v2 09/11] vfio-user: handle device interrupts

2021-09-09 Thread Stefan Hajnoczi
On Fri, Aug 27, 2021 at 01:53:28PM -0400, Jagannathan Raman wrote: > Forward remote device's interrupts to the guest > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > include/hw/remote/iohub.h | 2 ++ > hw/remote/iohub.c | 5

Re: [PULL for-6.1 06/11] hw/nvme: fix controller hot unplugging

2021-09-09 Thread Klaus Jensen
On Sep 9 09:02, Hannes Reinecke wrote: > On 7/26/21 9:18 PM, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Prior to this patch the nvme-ns devices are always children of the > > NvmeBus owned by the NvmeCtrl. This causes the namespaces to be > > unrealized when the parent device is removed.

[PATCH 1/2] hmp: Unbreak "change vnc"

2021-09-09 Thread Markus Armbruster
HMP command "change vnc" can take the password as argument, or prompt for it: (qemu) change vnc password 123 (qemu) change vnc password Password: *** (qemu) This regressed in commit cfb5387a1d "hmp: remove "change vnc TARGET" command", v6.0.0. (qemu) change vnc passwd 123

[PATCH 0/2] hmp: Unbreak "change vnc", tidy up set_password's doc

2021-09-09 Thread Markus Armbruster
If you'd rather delete "change vnc", go ahead and post a patch. Markus Armbruster (2): hmp: Unbreak "change vnc" hmp: Drop a bogus sentence from set_password's documentation monitor/hmp-cmds.c | 2 +- hmp-commands.hx| 11 +-- 2 files changed, 6 insertions(+), 7 deletions(-) --

Re: [PATCH 0/5] Stop adding HMP-only commands, allow QMP for all

2021-09-09 Thread Markus Armbruster
Markus Armbruster writes: [...] > Limitations: > > 1. If we convert a long-running HMP command to this technique, we print >its output only after it completed its work. We also end up with a >long-running QMP command, which is bad, because it stops the main >loop and makes the QMP m

Re: [PATCH RFC server v2 10/11] vfio-user: register handlers to facilitate migration

2021-09-09 Thread Stefan Hajnoczi
On Fri, Aug 27, 2021 at 01:53:29PM -0400, Jagannathan Raman wrote: > +static ssize_t vfu_mig_buf_read(void *opaque, uint8_t *buf, int64_t pos, > +size_t size, Error **errp) > +{ > +VfuObject *o = opaque; > + > +if (pos > o->vfu_mig_buf_size) { > +size

[PATCH 2/2] hmp: Drop a bogus sentence from set_password's documentation

2021-09-09 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hmp-commands.hx | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 8e45bce2cd..cf723c69ac 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1522,12 +1522,11 @@ ERST SRST ``set_passwo

Re: [PATCH RFC server v2 00/11] vfio-user server in QEMU

2021-09-09 Thread Stefan Hajnoczi
Hi Jag, I have finished reviewing these patches and left comments. I didn't take a look at the libvfio-user's implementation. Stefan signature.asc Description: PGP signature

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2021-09-09 Thread Stefano Garzarella
On Wed, Sep 08, 2021 at 06:20:49PM +0300, Denis Plotnikov wrote: On 08.09.2021 16:22, Stefano Garzarella wrote: Message bounced, I use new Denis's email address. On Wed, Sep 08, 2021 at 03:17:16PM +0200, Stefano Garzarella wrote: Hi Denis, I just found this discussion since we still have the

Re: [PATCH] coroutine: resize pool periodically instead of limiting size

2021-09-09 Thread Daniel P . Berrangé
On Wed, Sep 01, 2021 at 05:09:23PM +0100, Stefan Hajnoczi wrote: > It was reported that enabling SafeStack reduces IOPS significantly > (>25%) with the following fio benchmark on virtio-blk using a NVMe host > block device: > > # fio --rw=randrw --bs=4k --iodepth=64 --runtime=1m --direct=1 \ >

Re: [PATCH 0/5] Stop adding HMP-only commands, allow QMP for all

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 06:48:21AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Wed, Sep 08, 2021 at 05:09:13PM +0200, Markus Armbruster wrote: > >> Daniel P. Berrangé writes: > >> > >> > We are still adding HMP commands without any QMP counterparts. This is > >> > done

Re: [PATCH 2/2] hmp: Drop a bogus sentence from set_password's documentation

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 10:12:19AM +0200, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hmp-commands.hx | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-https://www

Re: [PATCH 1/2] hmp: Unbreak "change vnc"

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 10:12:18AM +0200, Markus Armbruster wrote: > HMP command "change vnc" can take the password as argument, or prompt > for it: > > (qemu) change vnc password 123 > (qemu) change vnc password > Password: *** > (qemu) > > This regressed in commit cfb5387a1d "hm

[PATCH] qemu-options.hx: remove -spice options from --help

2021-09-09 Thread marcandre . lureau
From: Marc-André Lureau Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1982600 Signed-off-by: Marc-André Lureau --- softmmu/vl.c| 4 +++- qemu-options.hx | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 55ab70eb97..1e60d286b9 10064

Re: [PATCH] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-09 Thread Michael S. Tsirkin
On Tue, Sep 07, 2021 at 02:22:24PM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 07, 2021 at 02:49:35PM +0200, Stefano Garzarella wrote: > > Commit 1e08fd0a46 ("vhost-vsock: SOCK_SEQPACKET feature bit support") > > enabled the SEQPACKET feature bit. > > This commit is released with QEMU 6.1, so if

Re: [PATCH v1 2/3] io: Add zerocopy and errqueue

2021-09-09 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Sep 08, 2021 at 09:30:58AM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Tue, Sep 07, 2021 at 12:06:15PM +0100, Dr. David Alan Gilbert wrote: > > > > > > What if we do the 'flush()' before we start post-copy,

Re: [PATCH] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 04:47:42AM -0400, Michael S. Tsirkin wrote: > On Tue, Sep 07, 2021 at 02:22:24PM +0100, Daniel P. Berrangé wrote: > > On Tue, Sep 07, 2021 at 02:49:35PM +0200, Stefano Garzarella wrote: > > > Commit 1e08fd0a46 ("vhost-vsock: SOCK_SEQPACKET feature bit support") > > > enabled

Re: [PATCH 4/5] qapi: introduce x-query-registers QMP command

2021-09-09 Thread Markus Armbruster
Daniel P. Berrangé writes: > This is a counterpart to the HMP "info registers" command. It is being > added with an "x-" prefix because this QMP command is intended as an > adhoc debugging tool and will thus not be modelled in QAPI as fully > structured data, nor will it have long term guaranteed

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-09 Thread Mauro Matteo Cascella
On Tue, Sep 7, 2021 at 8:22 AM Philippe Mathieu-Daudé wrote: > > On 9/7/21 7:38 AM, Philippe Mathieu-Daudé wrote: > > On 9/6/21 9:52 PM, BALATON Zoltan wrote: > >> I don't think assigning a CVE to a bug that is in an experimental and > >> largely unused part and happens when one enables debug code

Re: [PATCH v4 1/1] hw/pflash_cfi01: Allow backing devices to be smaller than memory region

2021-09-09 Thread Philippe Mathieu-Daudé
Hi David, On 8/10/21 3:40 PM, David Edmondson wrote: > Allow the backing device to be smaller than the extent of the flash > device by mapping it as a subregion of the flash device region. > > Return zeroes for all reads of the flash device beyond the extent of > the backing device. > > For writ

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/9/21 11:16 AM, Mauro Matteo Cascella wrote: > On Tue, Sep 7, 2021 at 8:22 AM Philippe Mathieu-Daudé > wrote: >> On 9/7/21 7:38 AM, Philippe Mathieu-Daudé wrote: >>> On 9/6/21 9:52 PM, BALATON Zoltan wrote: I don't think assigning a CVE to a bug that is in an experimental and largel

Re: [PATCH 1/5] docs/devel: document expectations for QAPI data modelling for QMP

2021-09-09 Thread Markus Armbruster
Daniel P. Berrangé writes: > Traditionally we have required that newly added QMP commands will model > any returned data using fine grained QAPI types. This is good for > commands that are intended to be consumed by machines, where clear data > representation is very important. Commands that don'

Re: [PATCH 5/7] qmp: Add the qmp_query_sgx_capabilities()

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/9/21 4:51 AM, Yang Zhong wrote: > On Wed, Sep 08, 2021 at 10:38:59AM +0200, Philippe Mathieu-Daudé wrote: >> On 9/8/21 10:19 AM, Yang Zhong wrote: >>> Libvirt can use qmp_query_sgx_capabilities() to get the host >>> sgx capabilities. >>> >>> Signed-off-by: Yang Zhong >>> --- >>> hw/i386/sgx.

[PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-09 Thread Hannes Reinecke
With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") namespaces get moved from the controller to the subsystem if one is specified. That keeps the namespaces alive after a controller hot-unplug, but after a controller hotplug we have to reconnect the namespaces from the subsystem to th

Re: [PATCH] qemu-options.hx: remove -spice options from --help

2021-09-09 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?id=1982600 > > Signed-off-by: Marc-André Lureau > --- > softmmu/vl.c| 4 +++- > qemu-options.hx | 2 ++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/soft

[PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-09 Thread Hannes Reinecke
With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") namespaces get moved from the controller to the subsystem if one is specified. That keeps the namespaces alive after a controller hot-unplug, but after a controller hotplug we have to reconnect the namespaces from the subsystem to th

Re: [PULL for-6.1 06/11] hw/nvme: fix controller hot unplugging

2021-09-09 Thread Hannes Reinecke
On 9/9/21 9:59 AM, Klaus Jensen wrote: > On Sep 9 09:02, Hannes Reinecke wrote: >> On 7/26/21 9:18 PM, Klaus Jensen wrote: >>> From: Klaus Jensen >>> >>> Prior to this patch the nvme-ns devices are always children of the >>> NvmeBus owned by the NvmeCtrl. This causes the namespaces to be >>> unre

Re: [PATCH] ebpf: only include in system emulators

2021-09-09 Thread Peter Maydell
On Thu, 9 Sept 2021 at 04:14, Jason Wang wrote: > > On Wed, Sep 8, 2021 at 1:46 PM Paolo Bonzini wrote: > > > > On 08/09/21 05:08, Jason Wang wrote: > > > > > > 在 2021/9/7 下午6:45, Paolo Bonzini 写道: > > >> eBPF files are being included in system emulators, which is useless > > > > > > > > > I thin

[PATCH] hw/nvme: select first free NSID for legacy drive configuration

2021-09-09 Thread Hannes Reinecke
If a legacy 'drive' argument is passed to the controller we cannot assume that '1' will be a free NSID, as the subsys might already have attached a namespace to this NSID. So select the first free one. Signed-off-by: Hannes Reinecke --- hw/nvme/ctrl.c | 9 - 1 file changed, 8 insertions(

Re: [PATCH] ebpf: only include in system emulators

2021-09-09 Thread Jason Wang
On Thu, Sep 9, 2021 at 5:50 PM Peter Maydell wrote: > > On Thu, 9 Sept 2021 at 04:14, Jason Wang wrote: > > > > On Wed, Sep 8, 2021 at 1:46 PM Paolo Bonzini wrote: > > > > > > On 08/09/21 05:08, Jason Wang wrote: > > > > > > > > 在 2021/9/7 下午6:45, Paolo Bonzini 写道: > > > >> eBPF files are being

Re: [RFC PATCH 03/10] block: Use qemu_security_policy_taint() API

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/9/21 1:20 AM, Philippe Mathieu-Daudé wrote: > Add the BlockDriver::bdrv_taints_security_policy() handler. > Drivers implementing it might taint the global QEMU security > policy. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/block/block_int.h | 6 +- > block.c

Re: [PATCH 3/5] target/i386: convert to use format_state instead of dump_state

2021-09-09 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 11:06:33PM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 08, 2021 at 01:05:13PM -0500, Eric Blake wrote: > > On Wed, Sep 08, 2021 at 11:37:09AM +0100, Daniel P. Berrangé wrote: > > > Signed-off-by: Daniel P. Berrangé > > > --- > > > target/i386/cpu-dump.c | 325 ++

Re: [PATCH 4/5] qapi: introduce x-query-registers QMP command

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 11:05:20AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > This is a counterpart to the HMP "info registers" command. It is being > > added with an "x-" prefix because this QMP command is intended as an > > adhoc debugging tool and will thus not be model

Re: [RFC PATCH 01/10] sysemu: Introduce qemu_security_policy_taint() API

2021-09-09 Thread Paolo Bonzini
On 09/09/21 01:20, Philippe Mathieu-Daudé wrote: +static QemuOptsList qemu_security_policy_opts = { +.name = "security-policy", +.implied_opt_name = "policy", +.merge_lists = true, +.head = QTAILQ_HEAD_INITIALIZER(qemu_security_policy_opts.head), +.desc = { +{ +

Re: qcow2 perfomance: read-only IO on the guest generates high write IO on the host

2021-09-09 Thread Christopher Pereira
On 24-08-2021 11:37, Kevin Wolf wrote: [ Cc: qemu-block ] Am 11.08.2021 um 13:36 hat Christopher Pereira geschrieben: Hi, I'm reading a directory with 5.000.000 files (2,4 GB) inside a guest using "find | grep -c". On the host I saw high write IO (40 MB/s !) during over 1 hour using virt-top

Re: [PATCH v2 1/1] hw/arm/aspeed: Initialize AST2600 UART clock selection registers

2021-09-09 Thread Cédric Le Goater
On 9/7/21 3:37 PM, Peter Delevoryas wrote: > > >> On Sep 7, 2021, at 1:24 AM, Joel Stanley wrote: >> >> On Mon, 6 Sept 2021 at 13:40, wrote: >>> >>> From: Peter Delevoryas >>> >>> UART5 is typically used as the default debug UART on the AST2600, but >>> UART1 is also designed to be a debug UAR

Re: [RFC PATCH 00/10] security: Introduce qemu_security_policy_taint() API

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 01:20:14AM +0200, Philippe Mathieu-Daudé wrote: > Hi, > > This series is experimental! The goal is to better limit the > boundary of what code is considerated security critical, and > what is less critical (but still important!). > > This approach was quickly discussed few

Re: [RFC v3 00/32] Rust binding for QAPI and qemu-ga QMP handler examples

2021-09-09 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Wed, Sep 8, 2021 at 5:23 PM Markus Armbruster wrote: > >> Build fails for me: >> >> make: Entering directory '/work/armbru/qemu/bld' >> config-host.mak is out-of-date, running configure >> GIT ui/keycodemapdb meson tests/fp/berkeley-testfloat-3 >> test

[PULL 4/7] migration/rdma: advise prefetch write for ODP region

2021-09-09 Thread Juan Quintela
From: Li Zhijian To: , CC: , Li Zhijian , "Marcel Apfelbaum" Date: Mon, 23 Aug 2021 11:33:58 +0800 (2 weeks, 3 days, 3 hours ago) The responder mr registering with ODP will sent RNR NAK back to the requester in the face of the page fault. - ibv_poll_cq wc.status=13 RNR retry counter e

[PULL 1/7] multifd: Implement yank for multifd send side

2021-09-09 Thread Juan Quintela
From: Lukas Straub To: qemu-devel Cc: "Dr. David Alan Gilbert" , Juan Quintela , Peter Xu , Leonardo Bras Soares Passos Date: Wed, 1 Sep 2021 17:58:57 +0200 (1 week, 15 hours, 17 minutes ago) [[PGP Signed Part:No public key for 35AB0B289C5DB258 created at 2021-09-01T17:58:57+0200 using RSA]

[PULL 0/7] Migration.next patches

2021-09-09 Thread Juan Quintela
The following changes since commit bd662023e683850c085e98c8ff8297142c2dd9f2: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210908' into staging (2021-09-08 11:06:17 +0100) are available in the Git repository at: https://github.com/juanquintela/qemu.git tags/migration.n

[PULL 2/7] multifd: Unconditionally unregister yank function

2021-09-09 Thread Juan Quintela
From: Lukas Straub To: qemu-devel Cc: "Dr. David Alan Gilbert" , Juan Quintela , Peter Xu , Leonardo Bras Soares Passos Date: Wed, 4 Aug 2021 21:26:32 +0200 (5 weeks, 11 hours, 52 minutes ago) [[PGP Signed Part:No public key for 35AB0B289C5DB258 created at 2021-08-04T21:26:32+0200 using RSA

[PULL 6/7] migration: allow multifd for socket protocol only

2021-09-09 Thread Juan Quintela
From: Li Zhijian To: , , CC: Li Zhijian Date: Sat, 31 Jul 2021 22:05:51 +0800 (5 weeks, 4 days, 17 hours ago) multifd with unsupported protocol will cause a segment fault. (gdb) bt #0 0x563b4a93faf8 in socket_connect (addr=0x0, errp=0x7f7f02675410) at ../util/qemu-sockets.c:1190 #1 0x0

[PULL 7/7] migration: allow enabling mutilfd for specific protocol only

2021-09-09 Thread Juan Quintela
From: Li Zhijian To: , , CC: Li Zhijian Date: Sat, 31 Jul 2021 22:05:52 +0800 (5 weeks, 4 days, 17 hours ago) And change the default to true so that in '-incoming defer' case, user is able to change multifd capability. Signed-off-by: Li Zhijian Reviewed-by: Juan Quintela Signed-off-by: Juan

[PULL 5/7] migration/ram: Don't passs RAMState to migration_clear_memory_region_dirty_bitmap_*()

2021-09-09 Thread Juan Quintela
From: David Hildenbrand The parameter is unused, let's drop it. Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/ram.c | 13 + 1 file changed, 5 insertions(+), 8 dele

Re: [PATCH 5/5] qmp: Added qemu-ebpf-rss-path command.

2021-09-09 Thread Andrew Melnichenko
Hi, > Ther first two are bogus. /work/armbru/tmp/inst-qemu/... is where "make > install" would put things. I last ran "make install" almost three > months ago. > The stamp check is implemented only for the RSS helper. Qemu looks for a helper first in HelpDir, then next to the binary. Bridge/PR h

[PULL 3/7] migration/rdma: Try to register On-Demand Paging memory region

2021-09-09 Thread Juan Quintela
From: Li Zhijian Previously, for the fsdax mem-backend-file, it will register failed with Operation not supported. In this case, we can try to register it with On-Demand Paging[1] like what rpma_mr_reg() does on rpma[2]. [1]: https://community.mellanox.com/s/article/understanding-on-demand-pagi

Re: [RFC PATCH 02/10] accel: Use qemu_security_policy_taint(), mark KVM and Xen as safe

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 01:20:16AM +0200, Philippe Mathieu-Daudé wrote: > Add the AccelClass::secure_policy_supported field to classify > safe (within security boundary) vs unsafe accelerators. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/accel.h | 5 + > accel/kvm/kvm-all.

Re: [RFC PATCH 03/10] block: Use qemu_security_policy_taint() API

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 01:20:17AM +0200, Philippe Mathieu-Daudé wrote: > Add the BlockDriver::bdrv_taints_security_policy() handler. > Drivers implementing it might taint the global QEMU security > policy. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/block/block_int.h | 6 +- >

Re: [PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-09 Thread Klaus Jensen
On Sep 9 11:43, Hannes Reinecke wrote: > With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") > namespaces get moved from the controller to the subsystem if one > is specified. > That keeps the namespaces alive after a controller hot-unplug, but > after a controller hotplug we have to

Re: [PATCH] hw/nvme: select first free NSID for legacy drive configuration

2021-09-09 Thread Klaus Jensen
On Sep 9 11:51, Hannes Reinecke wrote: > If a legacy 'drive' argument is passed to the controller we cannot > assume that '1' will be a free NSID, as the subsys might already > have attached a namespace to this NSID. So select the first free > one. > > Signed-off-by: Hannes Reinecke > --- > hw/

Re: [RFC PATCH 03/10] block: Use qemu_security_policy_taint() API

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 11:40:07AM +0100, Daniel P. Berrangé wrote: > On Thu, Sep 09, 2021 at 01:20:17AM +0200, Philippe Mathieu-Daudé wrote: > > Add the BlockDriver::bdrv_taints_security_policy() handler. > > Drivers implementing it might taint the global QEMU security > > policy. > > > > Signed-

[RFC PATCH v1 2/3] hw/pci: Add PCIe RCEC support

2021-09-09 Thread Mayuresh Chitale
This patch adds support for PCIe Root Complex Event Collector (RCEC) emulation. Further, if a RCiEP supports AER capability then a mapping is created for that RCiEP in the RCEC's endpoint association capability. Signed-off-by: Mayuresh Chitale --- hw/pci/meson.build | 2 +- hw/pci/pcie

[RFC PATCH v1 0/3] PCIe Root complex event collector

2021-09-09 Thread Mayuresh Chitale
Hi All, This is a first attempt to add PCIe Root Complex Event Collector emulation support to Qemu. This patch is created on Qemu commit:88afdc92b6 and tested using Qemu Risc V virt machine and the PCIe aer error injection module in the Linux kernel(v 5.14). Thanks, Mayuresh. Mayuresh Chitale (3

[RFC PATCH v1 3/3] docs: pcie: RCEC

2021-09-09 Thread Mayuresh Chitale
Update root bus section to include information on how to enable PCIe RCEC for any given machine. Signed-off-by: Mayuresh Chitale --- docs/pcie.txt | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/pcie.txt b/docs/pcie.txt index 89e3502075..da5d7b676b 1006

[RFC PATCH v1 1/3] hw/pci/pcie.c: modify PCIe Express capability for RCiEP and RCEC

2021-09-09 Thread Mayuresh Chitale
Skip the link and slot capabilities' configuration for PCIe RCiEP and PCIe RCEC. Signed-off-by: Mayuresh Chitale --- hw/pci/pcie.c | 22 ++ include/hw/pci/pcie.h | 2 ++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c ind

Re: [RFC PATCH 06/10] qdev: Use qemu_security_policy_taint() API

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 01:20:20AM +0200, Philippe Mathieu-Daudé wrote: > Add DeviceClass::taints_security_policy field to allow an > unsafe device to eventually taint the global security policy > in DeviceRealize(). > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/qdev-core.h | 6 +

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2021-09-09 Thread Denis Plotnikov
On 09.09.2021 11:28, Stefano Garzarella wrote: On Wed, Sep 08, 2021 at 06:20:49PM +0300, Denis Plotnikov wrote: On 08.09.2021 16:22, Stefano Garzarella wrote: Message bounced, I use new Denis's email address. On Wed, Sep 08, 2021 at 03:17:16PM +0200, Stefano Garzarella wrote: Hi Denis, I j

Re: [PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-09 Thread Hannes Reinecke
On 9/9/21 12:47 PM, Klaus Jensen wrote: > On Sep 9 11:43, Hannes Reinecke wrote: >> With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") >> namespaces get moved from the controller to the subsystem if one >> is specified. >> That keeps the namespaces alive after a controller hot-unplu

Re: [PATCH] hw/nvme: select first free NSID for legacy drive configuration

2021-09-09 Thread Hannes Reinecke
On 9/9/21 12:52 PM, Klaus Jensen wrote: > On Sep 9 11:51, Hannes Reinecke wrote: >> If a legacy 'drive' argument is passed to the controller we cannot >> assume that '1' will be a free NSID, as the subsys might already >> have attached a namespace to this NSID. So select the first free >> one. >>

Re: [PATCH v3 08/15] PPC64/TCG: Implement 'rfebb' instruction

2021-09-09 Thread Matheus K. Ferst
On 03/09/2021 17:31, Daniel Henrique Barboza wrote: An Event-Based Branch (EBB) allows applications to change the NIA when a event-based exception occurs. Event-based exceptions are enabled by setting the Branch Event Status and Control Register (BESCR). If the event-based exception is enabled wh

[PATCH 2/2] target/rx: gdbstub add acc register operation.

2021-09-09 Thread Yoshinori Sato
I added it because the operation of the acc register was not implemented. Signed-off-by: Yoshinori Sato --- target/rx/gdbstub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/rx/gdbstub.c b/target/rx/gdbstub.c index c811d4810b..b5da5c42cb 100644 --- a/target/rx/gdbs

Re: [RFC PATCH 00/10] security: Introduce qemu_security_policy_taint() API

2021-09-09 Thread Alexander Bulekov
On 210909 0120, Philippe Mathieu-Daudé wrote: > Hi, > > This series is experimental! The goal is to better limit the > boundary of what code is considerated security critical, and > what is less critical (but still important!). > > This approach was quickly discussed few months ago with Markus >

[PATCH 0/2] RX target update

2021-09-09 Thread Yoshinori Sato
I found some problem in RX target. This patches fix it. Yoshinori Sato (2): target/rx: Fix helper definiton. target/rx: gdbstub add acc register operation. target/rx/helper.h | 36 ++-- target/rx/gdbstub.c | 3 ++- 2 files changed, 20 insertions(+), 19 delet

Re: [PATCH RFC v2 09/16] vfio-user: region read/write

2021-09-09 Thread John Levon
On Thu, Sep 09, 2021 at 06:00:36AM +, John Johnson wrote: > > On Sep 7, 2021, at 10:24 AM, John Levon wrote: > > > > On Mon, Aug 16, 2021 at 09:42:42AM -0700, Elena Ufimtseva wrote: > > > >> +int vfio_user_region_write(VFIODevice *vbasedev, uint32_t index, > >> + u

[PATCH 1/2] target/rx: Fix helper definiton.

2021-09-09 Thread Yoshinori Sato
Due to an incorrect definition of helper, TCG optimization could sometimes behave unexpectedly. Signed-off-by: Yoshinori Sato --- target/rx/helper.h | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/target/rx/helper.h b/target/rx/helper.h

Re: [PATCH 5/7] qmp: Add the qmp_query_sgx_capabilities()

2021-09-09 Thread Yang Zhong
On Thu, Sep 09, 2021 at 11:36:58AM +0200, Philippe Mathieu-Daudé wrote: > On 9/9/21 4:51 AM, Yang Zhong wrote: > > On Wed, Sep 08, 2021 at 10:38:59AM +0200, Philippe Mathieu-Daudé wrote: > >> On 9/8/21 10:19 AM, Yang Zhong wrote: > >>> Libvirt can use qmp_query_sgx_capabilities() to get the host >

Re: Application of QEMUTimer in short timing.

2021-09-09 Thread Duo jia
Got it. Peter Maydell 于2021年9月8日周三 下午5:47写道: > On Wed, 8 Sept 2021 at 03:50, Duo jia wrote: > > Also I want to know how to make a delay in qemu. > > For example, when I send a UART data, there is a certain time interval > from setting the register to when the data is sent. Most of this time doe

[PATCH] hw/rtc/pl031: Send RTC_CHANGE QMP event

2021-09-09 Thread Eric Auger
The PL031 currently is not able to report guest RTC change to the QMP monitor as opposed to mc146818 or spapr RTCs. This patch adds the call to qapi_event_send_rtc_change() when the Load Register is written. The value that is reported corresponds to the difference between the new RTC value and the

[PATCH] hw/misc: deprecate the 'sga' device

2021-09-09 Thread Daniel P . Berrangé
This is obsolete since SeaBIOS 1.11.0 introduced native support for sending messages to the serial console. The new support can be activated using -machine graphics=off on x86 targets. Signed-off-by: Daniel P. Berrangé --- docs/about/deprecated.rst | 10 ++ hw/misc/sga.c | 2

Re: [PATCH 01/10] aspeed/smc: Add watchdog Control/Status Registers

2021-09-09 Thread Cédric Le Goater
On 9/8/21 8:46 PM, Peter Delevoryas wrote: > > >> On Sep 6, 2021, at 11:58 PM, Cédric Le Goater wrote: >> >> The Aspeed SoCs have a dual boot function for firmware fail-over >> recovery. The system auto-reboots from the second flash if the main >> flash does not boot sucessfully within a certain

Re: [PATCH 1/2] target/rx: Fix helper definiton.

2021-09-09 Thread Peter Maydell
On Thu, 9 Sept 2021 at 13:10, Yoshinori Sato wrote: > > Due to an incorrect definition of helper, > TCG optimization could sometimes behave unexpectedly. > > Signed-off-by: Yoshinori Sato Could you give more detail, please? I had a look at one or two -- it looks like the floating point related

Re: [PATCH 2/2] target/rx: gdbstub add acc register operation.

2021-09-09 Thread Peter Maydell
On Thu, 9 Sept 2021 at 13:08, Yoshinori Sato wrote: > > I added it because the operation of the acc register was not implemented. > > Signed-off-by: Yoshinori Sato > --- > target/rx/gdbstub.c | 3 ++- Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v0] machine: remove non existent device tuning

2021-09-09 Thread Denis Plotnikov
Device "vhost-blk-device" doesn't exist in qemu yet. So, its compatibility tuning is meaningless. The line with the non existent device was introduced with "1bf8a989a566b virtio: make seg_max virtqueue size dependent" patch by mistake. The oriiginal patch was meant to set "seg-max-adjust" property

Re: [PULL v4 21/43] i386: Update SGX CPUID info according to hardware/KVM/user input

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/8/21 12:04 PM, Paolo Bonzini wrote: > From: Sean Christopherson > > Expose SGX to the guest if and only if KVM is enabled and supports > virtualization of SGX. While the majority of ENCLS can be emulated to > some degree, because SGX uses a hardware-based root of trust, the > attestation as

Re: [PULL v4 35/43] Kconfig: Add CONFIG_SGX support

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/8/21 12:04 PM, Paolo Bonzini wrote: > From: Yang Zhong > > Add new CONFIG_SGX for sgx support in the Qemu, and the Kconfig > default enable sgx in the i386 platform. > > Signed-off-by: Yang Zhong > Message-Id: <20210719112136.57018-32-yang.zh...@intel.com> > Signed-off-by: Paolo Bonzini >

Re: [PATCH 5/7] qmp: Add the qmp_query_sgx_capabilities()

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/9/21 2:06 PM, Yang Zhong wrote: > On Thu, Sep 09, 2021 at 11:36:58AM +0200, Philippe Mathieu-Daudé wrote: >> On 9/9/21 4:51 AM, Yang Zhong wrote: >>> On Wed, Sep 08, 2021 at 10:38:59AM +0200, Philippe Mathieu-Daudé wrote: On 9/8/21 10:19 AM, Yang Zhong wrote: > Libvirt can use qmp_que

Re: [PULL v4 00/43] (Mostly) x86 changes for 2021-09-06

2021-09-09 Thread Peter Maydell
On Wed, 8 Sept 2021 at 11:07, Paolo Bonzini wrote: > > The following changes since commit f9128631fbeb40a55f7bc145397981c963d40909: > > Merge remote-tracking branch > 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2021-09-07 > 13:24:43 +0100) > > are available in the Git repos

Re: [PULL v4 00/43] (Mostly) x86 changes for 2021-09-06

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/9/21 3:25 PM, Peter Maydell wrote: > On Wed, 8 Sept 2021 at 11:07, Paolo Bonzini wrote: >> >> The following changes since commit f9128631fbeb40a55f7bc145397981c963d40909: >> >> Merge remote-tracking branch >> 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2021-09-07 >> 13

Re: [PULL v4 35/43] Kconfig: Add CONFIG_SGX support

2021-09-09 Thread Philippe Mathieu-Daudé
On 9/9/21 3:16 PM, Philippe Mathieu-Daudé wrote: > On 9/8/21 12:04 PM, Paolo Bonzini wrote: >> From: Yang Zhong >> >> Add new CONFIG_SGX for sgx support in the Qemu, and the Kconfig >> default enable sgx in the i386 platform. >> >> Signed-off-by: Yang Zhong >> Message-Id: <20210719112136.57018-32

Re: [PULL 0/7] Migration.next patches

2021-09-09 Thread Peter Maydell
On Thu, 9 Sept 2021 at 11:36, Juan Quintela wrote: > > The following changes since commit bd662023e683850c085e98c8ff8297142c2dd9f2: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210908' > into staging (2021-09-08 11:06:17 +0100) > > are available in the Git repository

RE: [PATCH v2] net/colo: check vnet_hdr_support flag when using virtio-net

2021-09-09 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Sunday, September 5, 2021 7:48 PM > To: Zhang, Chen > Cc: Xu, Tao3 ; lizhij...@cn.fujitsu.com; > jasow...@redhat.com; qemu-devel@nongnu.org > Subject: Re: [PATCH v2] net/colo: check vnet_hdr_support flag when using > virtio-net > > On

Re: [PATCH 1/4] target/arm: Add TB flag for "MVE insns not predicated"

2021-09-09 Thread Peter Maydell
On Fri, 3 Sept 2021 at 14:58, Richard Henderson wrote: > I think you need to go ahead and end the TB and resync immediately. > Just set dc->base.is_jmp = DISAS_UPDATE_NOCHAIN instead. Is there a rule for when we should set is_jmp to DISAS_UPDATE_NOCHAIN, when we should set it to DISAS_UPDATE_EXIT

Re: [PATCH RFC v2 11/16] vfio-user: get and set IRQs

2021-09-09 Thread Stefan Hajnoczi
On Thu, Sep 09, 2021 at 05:50:39AM +, John Johnson wrote: > > > > On Sep 7, 2021, at 8:14 AM, Stefan Hajnoczi wrote: > > > > On Mon, Aug 16, 2021 at 09:42:44AM -0700, Elena Ufimtseva wrote: > >> From: John Johnson > >> > >> Signed-off-by: Elena Ufimtseva > >> Signed-off-by: John G Johnso

[PATCH] memory: remove incorrect RCU comment for address_space_read()

2021-09-09 Thread Stefan Hajnoczi
Although the doc comment says "Called within RCU critical section" the address_space_read() function takes the RCU read lock itself. There is no need for the caller to hold an RCU read lock. Cc: Paolo Bonzini Fixes: b2a44fcad74f1cc7a6786d38eba7db12ab2352ba ("address_space_read: address_space_to_

[PATCH] docs: link to archived Fedora code of conduct

2021-09-09 Thread Paolo Bonzini
Fedora has switched to a different CoC. QEMU's own code of conduct is based on the previous version and cites it as a source. Replace the link with one to the Wayback Machine. Signed-off-by: Paolo Bonzini --- docs/devel/code-of-conduct.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[RFC PATCH 2/5] target/i386: Introduce FeatureWordInfo for Intel PT CPUID leaf 0xD

2021-09-09 Thread Xiaoyao Li
CPUID leaf 0x14 subleaf 0x0 and 0x1 enumerate the resource and capability of Intel PT. Introduce FeatureWord FEAT_14_0_EBX, FEAT_14_1_EAX and FEAT_14_1_EBX, and complete FEAT_14_0_ECX. Thus all the features of Intel PT can be expanded when "-cpu host/max" and can be configured in named CPU model.

[RFC PATCH 0/5] Make Intel PT configurable

2021-09-09 Thread Xiaoyao Li
Initial Intel PT support was added by making it as fixed feature set as ICX's capabilities, which allowed different CPU model with PT enabled live migration on ICX host. However, it breaks the PT exposure/working on SPR machine. Because SPR has less PT capabilities regrading CPUID(0x14,1):EBX[15:0]

[RFC PATCH 5/5] target/i386: Access MSR_IA32_RTIT_ADDRn based on guest CPUID configuration

2021-09-09 Thread Xiaoyao Li
KVM only allows userspace to access legal number of MSR_IA32_RTIT_ADDRn, which is enumrated by guest's CPUID(0x14,0x1):EAX[2:0], i.e., env->features[FEAT_14_1_EAX] & INTEL_PT_ADDR_RANGES_NUM_MASK Signed-off-by: Xiaoyao Li --- target/i386/cpu.c | 1 - target/i386/cpu.h | 2 ++ target/i386

[RFC PATCH 3/5] target/i386: Enable host pass through of Intel PT

2021-09-09 Thread Xiaoyao Li
commit e37a5c7fa459 ("i386: Add Intel Processor Trace feature support") added the support of Intel PT by making CPUID[14] of PT as fixed feature set (from ICX) for any CPU model on any host. This truly breaks the PT exposing on Intel SPR platform because SPR has less supported bitmap CPUID(0x14,1)

  1   2   >