Re: [PATCH RFC v2 08/16] vfio-user: get region info

2021-09-08 Thread Stefan Hajnoczi
On Thu, Sep 09, 2021 at 05:35:40AM +, John Johnson wrote: > > > > On Sep 7, 2021, at 7:31 AM, Stefan Hajnoczi wrote: > > > > On Mon, Aug 16, 2021 at 09:42:41AM -0700, Elena Ufimtseva wrote: > >> @@ -1514,6 +1515,16 @@ bool vfio_get_info_dma_avail(struct > >> vfio_iommu_type1_info *info, >

Re: [PATCH v10 3/7] [RISCV_PM] Support CSRs required for RISC-V PM extension except for the h-mode

2021-09-08 Thread Alistair Francis
On Mon, Aug 30, 2021 at 3:54 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo > --- > target/riscv/cpu.c | 6 + > target/riscv/cpu.h | 11 ++ > target/riscv/csr.c | 276 + > 3 files changed, 293 insertions(+) > > diff --git

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

2021-09-08 Thread John Johnson
> 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 Johnson >> Signed-off-by: Jagannathan Raman >> --- >> hw/vfio/user-protocol.h | 25

Re: [PATCH RFC v2 08/16] vfio-user: get region info

2021-09-08 Thread John Johnson
> On Sep 7, 2021, at 7:31 AM, Stefan Hajnoczi wrote: > > On Mon, Aug 16, 2021 at 09:42:41AM -0700, Elena Ufimtseva wrote: >> @@ -1514,6 +1515,16 @@ bool vfio_get_info_dma_avail(struct >> vfio_iommu_type1_info *info, >> return true; >> } >> >> +static int

Re: [PATCH RFC v2 04/16] vfio-user: connect vfio proxy to remote server

2021-09-08 Thread John Johnson
> On Sep 7, 2021, at 6:21 AM, Stefan Hajnoczi wrote: > > > This way the network communication code doesn't need to know how > messages will by processed by the client or server. There is no need for > if (isreply) { qemu_cond_signal(>cv); } else { > proxy->request(proxy->reqarg, buf, ); }.

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

2021-09-08 Thread Leonardo Bras Soares Passos
On Wed, Sep 8, 2021 at 11:05 PM Peter Xu wrote: > > On Wed, Sep 08, 2021 at 10:57:06PM +0100, Daniel P. Berrangé wrote: > > We think we're probably ok with migration as we are going to rely on the > > face that we eventually pause the guest to stop page changes during the > > final switchover.

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

2021-09-08 Thread Markus Armbruster
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 because there are a reasonable number of scenarios where the cost >> > of

Re: [PATCH v3 2/2] sifive_u: Connect the SiFive PWM device

2021-09-08 Thread Bin Meng
On Thu, Sep 9, 2021 at 11:55 AM Alistair Francis wrote: > > From: Alistair Francis > > Connect the SiFive PWM device and expose it via the device tree. > > Signed-off-by: Alistair Francis > --- > docs/system/riscv/sifive_u.rst | 1 + > include/hw/riscv/sifive_u.h| 14 - >

Re: [PATCH v3 1/2] hw/timer: Add SiFive PWM support

2021-09-08 Thread Bin Meng
On Thu, Sep 9, 2021 at 11:55 AM Alistair Francis wrote: > > From: Alistair Francis > > This is the initial commit of the SiFive PWM timer. This is used by > guest software as a timer and is included in the SiFive FU540 SoC. > > Signed-off-by: Justin Restivo > Signed-off-by: Alexandra Clifford

Re: [PATCH v10 2/7] [RISCV_PM] Add CSR defines for RISC-V PM extension

2021-09-08 Thread Alistair Francis
On Mon, Aug 30, 2021 at 3:51 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu_bits.h | 96 + > 1 file changed, 96 insertions(+) > > diff --git a/target/riscv/cpu_bits.h

Re: [PATCH] hw/i386/acpi-build: Fix a typo

2021-09-08 Thread Ani Sinha
On Thu, 9 Sep 2021, Philippe Mathieu-Daudé wrote: > Fix 'hotplugabble' -> 'hotpluggabble' typo. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha > --- > hw/i386/acpi-build.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/i386/acpi-build.c

[PATCH v3 1/2] hw/timer: Add SiFive PWM support

2021-09-08 Thread Alistair Francis
From: Alistair Francis This is the initial commit of the SiFive PWM timer. This is used by guest software as a timer and is included in the SiFive FU540 SoC. Signed-off-by: Justin Restivo Signed-off-by: Alexandra Clifford Signed-off-by: Amanda Strnad Signed-off-by: Alistair Francis ---

[PATCH v3 2/2] sifive_u: Connect the SiFive PWM device

2021-09-08 Thread Alistair Francis
From: Alistair Francis Connect the SiFive PWM device and expose it via the device tree. Signed-off-by: Alistair Francis --- docs/system/riscv/sifive_u.rst | 1 + include/hw/riscv/sifive_u.h| 14 - hw/riscv/sifive_u.c| 55 +-

[PATCH v3 0/2] Add the SiFive PWM device

2021-09-08 Thread Alistair Francis
From: Alistair Francis This series adds a the SiFive PWM device and connects it to the sifive_u machine. This has been tested as a timer with seL4. v3: - Small fixups v2: - Address Bin's comments - Expose PWM via the device tree Alistair Francis (2): hw/timer: Add SiFive PWM support

RE: [PATCH] vmdk: allow specification of tools version

2021-09-08 Thread Weissschuh, Thomas [ext]
> -Original Message- > From: Eric Blake > Sent: Wednesday, September 8, 2021 7:56 PM > To: Weissschuh, Thomas [ext] > Cc: Fam Zheng ; Kevin Wolf ; Hanna Reitz > ; Markus Armbruster ; qemu- > bl...@nongnu.org; tho...@t-8ch.de; qemu-devel@nongnu.org > Subject: Re: [PATCH] vmdk: allow

Re: [PULL v4 13/43] vl: Add sgx compound properties to expose SGX EPC sections to guest

2021-09-08 Thread Yang Zhong
On Wed, Sep 08, 2021 at 09:52:40AM -0500, Eric Blake wrote: > On Wed, Sep 08, 2021 at 12:03:56PM +0200, Paolo Bonzini wrote: > > From: Sean Christopherson > > > > Because SGX EPC is enumerated through CPUID, EPC "devices" need to be > > realized prior to realizing the vCPUs themselves, i.e. long

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

2021-09-08 Thread Jason Wang
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 think it should work since it's an independent feature. The current > >

Re: [PATCH] virtio-net: fix use after unmap/free for sg

2021-09-08 Thread Jason Wang
在 2021/9/2 下午1:44, Jason Wang 写道: When mergeable buffer is enabled, we try to set the num_buffers after the virtqueue elem has been unmapped. This will lead several issues, E.g a use after free when the descriptor has an address which belongs to the non direct access region. In this case we

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

2021-09-08 Thread Yang Zhong
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.c | 66

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

2021-09-08 Thread Yang Zhong
On Wed, Sep 08, 2021 at 10:32:27AM +0200, Philippe Mathieu-Daudé wrote: > On 9/8/21 10:19 AM, Yang Zhong wrote: > > Add the sgx_get_info() interface for hmp and QMP usage, which > > will get the SGX info from this API. > > > > Signed-off-by: Yang Zhong > > --- > > hw/i386/sgx.c | 21

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

2021-09-08 Thread Daniele Buono
Stefan, the patch looks great. Thank you for debugging the performance issue that was happening with SafeStack. On 9/2/2021 4:10 AM, Stefan Hajnoczi wrote: On Wed, Sep 01, 2021 at 05:09:23PM +0100, Stefan Hajnoczi wrote: It was reported that enabling SafeStack reduces IOPS significantly (>25%)

Re: [PATCH 4/7] bitops: Support 32 and 64 bit mask macro

2021-09-08 Thread Yang Zhong
On Wed, Sep 08, 2021 at 10:34:39AM +0200, Philippe Mathieu-Daudé wrote: > On 9/8/21 10:19 AM, Yang Zhong wrote: > > The Qemu should enable bit mask macro like Linux did in the > > kernel, the GENMASK(h, l) and GENMASK_ULL(h, l) will set the > > bit to 1 from l to h bit in the 32 bit or 64 bit long

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

2021-09-08 Thread Peter Xu
On Wed, Sep 08, 2021 at 10:57:06PM +0100, Daniel P. Berrangé wrote: > We think we're probably ok with migration as we are going to rely on the > face that we eventually pause the guest to stop page changes during the > final switchover. None the less I really strongly dislike the idea of > not

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-08 Thread Jason Wang
On Thu, Sep 9, 2021 at 8:00 AM Yuri Benditovich wrote: > > On Wed, Sep 8, 2021 at 6:45 AM Jason Wang wrote: > > > > On Tue, Sep 7, 2021 at 6:40 PM Yuri Benditovich > > wrote: > > > > > > On Wed, Sep 1, 2021 at 9:42 AM Jason Wang wrote: > > > > > > > > > > > > 在 2021/8/31 上午1:07, Yuri

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-08 Thread Jason Wang
On Wed, Sep 8, 2021 at 11:19 PM Peter Xu wrote: > > On Wed, Sep 08, 2021 at 09:19:27AM +0100, Dr. David Alan Gilbert wrote: > > * Jason Wang (jasow...@redhat.com) wrote: > > > On Wed, Sep 8, 2021 at 2:32 AM Peter Xu wrote: > > > > > > > > On Thu, Sep 02, 2021 at 04:22:55AM -0300, Leonardo Bras

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-08 Thread Yuri Benditovich
On Wed, Sep 8, 2021 at 6:45 AM Jason Wang wrote: > > On Tue, Sep 7, 2021 at 6:40 PM Yuri Benditovich > wrote: > > > > On Wed, Sep 1, 2021 at 9:42 AM Jason Wang wrote: > > > > > > > > > 在 2021/8/31 上午1:07, Yuri Benditovich 写道: > > > > On Fri, Aug 20, 2021 at 6:41 AM Jason Wang wrote: > > > >> >

Re: [PATCH 1/2] elf2dmp: Check curl_easy_setopt() return value

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 11:43 PM, Viktor Prutyanov wrote: > On Wed, 1 Sep 2021 17:25:09 +0200 > Philippe Mathieu-Daudé wrote: > >> On 9/1/21 4:39 PM, Peter Maydell wrote: >>> Coverity points out that we aren't checking the return value >>> from curl_easy_setopt(). >>> >>> Fixes: Coverity CID 1458895 >>>

[RFC PATCH 10/10] hw/sd: Mark sdhci-pci device as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c index c737c8b930e..7a36f88fd87 100644 --- a/hw/sd/sdhci-pci.c +++ b/hw/sd/sdhci-pci.c @@ -64,6 +64,7 @@ static void

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

2021-09-08 Thread Philippe Mathieu-Daudé
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 ++ hw/core/qdev.c | 11 +++ 2 files changed, 17 insertions(+)

[RFC PATCH 07/10] hw/display: Mark ATI and Artist devices as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/display/artist.c | 1 + hw/display/ati.c| 1 + 2 files changed, 2 insertions(+) diff --git a/hw/display/artist.c b/hw/display/artist.c index 21b7fd1b440..067a4b2cb59 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -1482,6 +1482,7 @@

[RFC PATCH 09/10] hw/net: Mark Tulip device as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/net/tulip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/tulip.c b/hw/net/tulip.c index ca69f7ea5e1..eaad3266212 100644 --- a/hw/net/tulip.c +++ b/hw/net/tulip.c @@ -1025,6 +1025,7 @@ static void tulip_class_init(ObjectClass *klass, void

[RFC PATCH 04/10] block/vvfat: Mark the driver as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
While being listed as 'supported' in MAINTAINERS, this driver does not have many reviewers and contains various /* TODO */ unattended since various years. Not safe enough for production environment, so have it taint the global security policy. Signed-off-by: Philippe Mathieu-Daudé ---

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

2021-09-08 Thread Philippe Mathieu-Daudé
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 | 6 ++ 2 files changed, 11 insertions(+), 1 deletion(-)

[RFC PATCH 05/10] block/null: Mark 'read-zeroes=off' option as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
See commit b317006a3f1 ("docs/secure-coding-practices: Describe how to use 'null-co' block driver") for rationale. Signed-off-by: Philippe Mathieu-Daudé --- block/null.c | 8 1 file changed, 8 insertions(+) diff --git a/block/null.c b/block/null.c index cc9b1d4ea72..11e428f3cc2 100644

[RFC PATCH 08/10] hw/misc: Mark testdev devices as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/hyperv/hyperv_testdev.c | 1 + hw/misc/pc-testdev.c | 1 + hw/misc/pci-testdev.c | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/hyperv/hyperv_testdev.c b/hw/hyperv/hyperv_testdev.c index 9a56ddf83fe..6a75c350389 100644 ---

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

2021-09-08 Thread Philippe Mathieu-Daudé
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.c | 1 + accel/xen/xen-all.c | 1 + softmmu/vl.c | 3 +++ 4 files changed,

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

2021-09-08 Thread Philippe Mathieu-Daudé
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 then Daniel. Instead of classifying the code on a file path

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

2021-09-08 Thread Philippe Mathieu-Daudé
Introduce qemu_security_policy_taint() which allows unsafe (read "not very maintained") code to 'taint' QEMU security policy. The "security policy" is the @SecurityPolicy QAPI enum, composed of: - "none" (no policy, current behavior) - "warn" (display a warning when the policy is tainted,

Re: [PATCH 0/3] qapi: static typing conversion, pt5c

2021-09-08 Thread John Snow
On Wed, Sep 8, 2021, 9:42 AM Markus Armbruster wrote: > Needs a rebase now. Let's finish discussing my review of pt5b [v2] > first. Pending patches to expr.py should have made it to master by > then. If you're impatient, suggest to base on master + "[PATCH 0/5] > qapi: Another round of minor

[PATCH] hw/i386/acpi-build: Fix a typo

2021-09-08 Thread Philippe Mathieu-Daudé
Fix 'hotplugabble' -> 'hotpluggabble' typo. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d1f5fa3b5a5..478263e12c9 100644 --- a/hw/i386/acpi-build.c +++

Re: Compatibility between -device sga and -machine graphics=off

2021-09-08 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 10:50:53PM +0200, Gerd Hoffmann wrote: > On Wed, Sep 08, 2021 at 05:08:08PM +0100, Daniel P. Berrangé wrote: > > Given the libvirt XML snippet > > > > > > ... > > > > ... > > > > > > libvirt QEMU driver will always format > > > > -device sga > > > >

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

2021-09-08 Thread Daniel P . Berrangé
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 ++--- > > target/i386/cpu.c | 2 +- > >

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

2021-09-08 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 05:09:33PM -0400, Peter Xu wrote: > On Wed, Sep 08, 2021 at 05:25:50PM -0300, Leonardo Bras Soares Passos wrote: > > On Tue, Sep 7, 2021 at 8:06 AM Dr. David Alan Gilbert > > wrote: > > > > Possibly, yes. This really need David G's input since he understands > > > > the

Re: [PATCH 1/2] elf2dmp: Check curl_easy_setopt() return value

2021-09-08 Thread Viktor Prutyanov
Hi, On Wed, 1 Sep 2021 17:25:09 +0200 Philippe Mathieu-Daudé wrote: > On 9/1/21 4:39 PM, Peter Maydell wrote: > > Coverity points out that we aren't checking the return value > > from curl_easy_setopt(). > > > > Fixes: Coverity CID 1458895 > > Signed-off-by: Peter Maydell > > --- > >

Re: [PATCH 2/2] elf2dmp: Fail cleanly if PDB file specifies zero block_size

2021-09-08 Thread Viktor Prutyanov
Hi, On Wed, 1 Sep 2021 15:39:10 +0100 Peter Maydell wrote: > Coverity points out that if the PDB file we're trying to read > has a header specifying a block_size of zero then we will > end up trying to divide by zero in pdb_ds_read_file(). > Check for this and fail cleanly instead. > > Fixes:

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

2021-09-08 Thread Peter Xu
On Wed, Sep 08, 2021 at 05:25:50PM -0300, Leonardo Bras Soares Passos wrote: > On Tue, Sep 7, 2021 at 8:06 AM Dr. David Alan Gilbert > wrote: > > > Possibly, yes. This really need David G's input since he understands > > > the code in way more detail than me. > > > > Hmm I'm not entirely sure why

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

2021-09-08 Thread Peter Xu
On Wed, Sep 08, 2021 at 05:13:40PM -0300, Leonardo Bras Soares Passos wrote: > On Tue, Sep 7, 2021 at 1:44 PM Peter Xu wrote: > > > > On Thu, Sep 02, 2021 at 03:59:25AM -0300, Leonardo Bras Soares Passos wrote: > > > I also suggested something like that, but I thought it could be good if > > >

Re: Compatibility between -device sga and -machine graphics=off

2021-09-08 Thread Gerd Hoffmann
On Wed, Sep 08, 2021 at 05:08:08PM +0100, Daniel P. Berrangé wrote: > Given the libvirt XML snippet > > > ... > > ... > > > libvirt QEMU driver will always format > > -device sga > > Libguestfs uses this syntax, so we need to make sure it still works > in future even if

Re: [PATCH 2/2] vfio/common: Add trace point when a MMIO RAM section less than PAGE_SIZE

2021-09-08 Thread Alex Williamson
On Fri, 3 Sep 2021 17:36:11 +0800 Kunkun Jiang wrote: > The MSI-X structures of some devices and other non-MSI-X structures > are in the same BAR. They may share one host page, especially in the > case of large page granularity, suck as 64K. s/suck/such/ > For example, MSIX-Table size of 82599

Re: [PATCH 1/2] vfio/pci: Fix vfio-pci sub-page MMIO BAR mmaping in live migration

2021-09-08 Thread Alex Williamson
On Fri, 3 Sep 2021 17:36:10 +0800 Kunkun Jiang wrote: > We expand MemoryRegions of vfio-pci sub-page MMIO BARs to > vfio_pci_write_config to improve IO performance. > The MemoryRegions of destination VM will not be expanded > successful in live migration, because their addresses have > been

[PATCH] vmdk: allow specification of tools version

2021-09-08 Thread Thomas Weißschuh
VMDK files support an attribute that represents the version of the guest tools that are installed on the disk. This attribute is used by vSphere before a machine has been started to determine if the VM has the guest tools installed. This is important when configuring "Operating system

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

2021-09-08 Thread Leonardo Bras Soares Passos
On Tue, Sep 7, 2021 at 8:06 AM Dr. David Alan Gilbert wrote: > > Possibly, yes. This really need David G's input since he understands > > the code in way more detail than me. > > Hmm I'm not entirely sure why we have the sync after each iteration; > the case I can think of is if we're doing async

Re: [PATCH] tcg/arm: Fix tcg_out_vec_op function signature

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 8:53 PM, Jose R. Ziviani wrote: > Commit 5e8892db93 fixed several function signatures but tcg_out_vec_op > for arm is missing. It causes a build error on armv6 and armv7: > > tcg-target.c.inc:2718:42: error: argument 5 of type 'const TCGArg *' > {aka 'const unsigned int *'} declared as

Re: [PATCH] docs/devel: memory: Document MemoryRegionOps requirement

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 8:50 PM, Peter Xu wrote: > On Mon, Sep 06, 2021 at 03:01:54PM +0200, Philippe Mathieu-Daudé wrote: >> On 9/6/21 2:20 PM, Bin Meng wrote: >>> It's been a requirement that at least one function pointer for read >>> and one for write are provided ever since the MemoryRegion APIs were >>>

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

2021-09-08 Thread Leonardo Bras Soares Passos
On Tue, Sep 7, 2021 at 1:44 PM Peter Xu wrote: > > On Thu, Sep 02, 2021 at 03:59:25AM -0300, Leonardo Bras Soares Passos wrote: > > I also suggested something like that, but I thought it could be good if we > > could > > fall back to io_writev() if we didn't have the zerocopy feature (or > > the

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 8:51 PM Ian Jackson wrote: > Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > > Yes, this is the shim to provide a C ABI QMP handler from Rust. This is > where > > all the FFI<->Rust conversion takes place. > > > > The "safe" code is

Re: Compatibility between -device sga and -machine graphics=off

2021-09-08 Thread Paolo Bonzini
Oh, that's cool. It must be part of the kvmvapic migration data. Still, there are very likely some rare cases that would break (on any machine), e.g. if migrating while seabios is accessing the list of option roms. Paolo Il mer 8 set 2021, 18:36 Daniel P. Berrangé ha scritto: > On Wed, Sep 08,

[PATCH] tcg/arm: Fix tcg_out_vec_op function signature

2021-09-08 Thread Jose R. Ziviani
Commit 5e8892db93 fixed several function signatures but tcg_out_vec_op for arm is missing. It causes a build error on armv6 and armv7: tcg-target.c.inc:2718:42: error: argument 5 of type 'const TCGArg *' {aka 'const unsigned int *'} declared as a pointer [-Werror=array-parameter=] const TCGArg

Re: [PATCH] docs/devel: memory: Document MemoryRegionOps requirement

2021-09-08 Thread Peter Xu
On Mon, Sep 06, 2021 at 03:01:54PM +0200, Philippe Mathieu-Daudé wrote: > On 9/6/21 2:20 PM, Bin Meng wrote: > > It's been a requirement that at least one function pointer for read > > and one for write are provided ever since the MemoryRegion APIs were > > introduced in 2012. > > > >

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

2021-09-08 Thread Peter Delevoryas
> 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 amount of time. This > function is called

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

2021-09-08 Thread Eric Blake
On Wed, Sep 08, 2021 at 11:37:10AM +0100, Daniel P. Berrangé wrote: > 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 ad hoc >

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

2021-09-08 Thread Eric Blake
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 ++--- > target/i386/cpu.c | 2 +- > target/i386/cpu.h | 2 +- > 3 files changed, 174 insertions(+), 155

Re: [PATCH] vmdk: allow specification of tools version

2021-09-08 Thread Eric Blake
On Wed, Sep 08, 2021 at 07:42:50PM +0200, Thomas Weißschuh wrote: > VMDK files support an attribute that represents the version of the guest > tools that are installed on the disk. > This attribute is used by vSphere before a machine has been started to > determine if the VM has the guest tools

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

2021-09-08 Thread Eric Blake
On Wed, Sep 08, 2021 at 11:37:07AM +0100, Daniel P. Berrangé wrote: > 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 >

Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-08 Thread Guenter Roeck
On 9/8/21 2:05 AM, Cheng, Xuzhou wrote: Thanks Bin added me into this loop. Hi, Guenter I am interested in your patch and the issue what you found. I want to reproduce your issue on Linux, but I failed, the spi-nor of sabrelite on Linux does not work. Could you share your Linux kernel

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > Yes, this is the shim to provide a C ABI QMP handler from Rust. This is where > all the FFI<->Rust conversion takes place. > > The "safe" code is qga/qmp/vcpus.rs. However, there is no > documentation there, since it's

Re: Compatibility between -device sga and -machine graphics=off

2021-09-08 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 06:28:01PM +0200, Paolo Bonzini wrote: > On 08/09/21 18:08, Daniel P. Berrangé wrote: > > Despite this difference, I was able migrate from a x86 guest using SGA > > to a guest using graphics=off without errors being reported. So it > > doesn't seem to change the migration

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 8:29 PM Ian Jackson wrote: > Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > > You can start by reading `cargo doc -p common --open`. The generated > > code needs some environment variables set, so `cargo doc -p qga` > > will fail unless

Re: Compatibility between -device sga and -machine graphics=off

2021-09-08 Thread Richard W.M. Jones
Just commenting from the libguestfs POV: We don't care about migration, and: On Wed, Sep 08, 2021 at 05:08:08PM +0100, Daniel P. Berrangé wrote: > On non-x86 emulators I see graphics=off has semantic effects beyond > just controlling whether the firmware prints to the serial or not > though.

Re: [PATCH v4 05/12] job: @force parameter for job_cancel_sync()

2021-09-08 Thread Vladimir Sementsov-Ogievskiy
07.09.2021 15:42, Hanna Reitz wrote: Callers should be able to specify whether they want job_cancel_sync() to force-cancel the job or not. In fact, almost all invocations do not care about consistency of the result and just want the job to terminate as soon as possible, so they should pass

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > You can start by reading `cargo doc -p common --open`. The generated > code needs some environment variables set, so `cargo doc -p qga` > will fail unless you set the environment variable > > MESON_BUILD_ROOT=`pwd`

Re: Compatibility between -device sga and -machine graphics=off

2021-09-08 Thread Paolo Bonzini
On 08/09/21 18:08, Daniel P. Berrangé wrote: Despite this difference, I was able migrate from a x86 guest using SGA to a guest using graphics=off without errors being reported. So it doesn't seem to change the migration data sections sent on the wire at least. It would probably break with

Re: [PATCH] hw/i386/acpi-build: adjust q35 IO addr range for acpi pci hotplug

2021-09-08 Thread Ani Sinha
On Wed, 8 Sep 2021, Philippe Mathieu-Daudé wrote: > On 9/8/21 10:43 AM, Igor Mammedov wrote: > > On Wed, 8 Sep 2021 12:51:04 +0530 (IST) > > Ani Sinha wrote: > > > >> On Wed, 8 Sep 2021, Igor Mammedov wrote: > >> > >>> On Wed, 8 Sep 2021 09:41:39 +0530 > >>> Ani Sinha wrote: > >>> >

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > On Wed, Sep 8, 2021 at 7:55 PM Ian Jackson wrote: > > git submodules are just awful IMO. > > Yes, but it's often (always?) the user fault. I must disagree in the strongest possible terms. I don't think I can

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Peter Maydell
On Wed, 8 Sept 2021 at 17:17, Marc-André Lureau wrote: > > Hi > > On Wed, Sep 8, 2021 at 7:55 PM Ian Jackson wrote: >> >> Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): >> > Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" to vendor >> > crates. >> > >> >

Re: [PATCH v4 05/12] job: @force parameter for job_cancel_sync()

2021-09-08 Thread Eric Blake
On Tue, Sep 07, 2021 at 02:42:38PM +0200, Hanna Reitz wrote: > Callers should be able to specify whether they want job_cancel_sync() to > force-cancel the job or not. > > In fact, almost all invocations do not care about consistency of the > result and just want the job to terminate as soon as

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 7:40 PM Ian Jackson wrote: > marcandre.lur...@redhat.com writes ("[RFC v3 13/32] rust: use > vendored-sources"): > > Most likely, QEMU will want tighter control over the sources, rather > > than relying on crates.io downloading, use a git submodule with all the > >

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

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 5:09 PM, Markus Armbruster wrote: > Daniel P. Berrangé writes: > >> We are still adding HMP commands without any QMP counterparts. This is >> done because there are a reasonable number of scenarios where the cost >> of designing a QAPI data type for the command is not justified. >> >>

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 7:55 PM Ian Jackson wrote: > Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > > Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" to vendor > crates. > > > > It seems cc was updated, and I didn't update the submodule accordingly. >

Compatibility between -device sga and -machine graphics=off

2021-09-08 Thread Daniel P . Berrangé
Given the libvirt XML snippet ... ... libvirt QEMU driver will always format -device sga Libguestfs uses this syntax, so we need to make sure it still works in future even if 'sga' is disabled or removed in a QEMU build in favour of SeaBIOS' built-in support. There are

Re: [PATCH v2 3/9] linux-user: Split signal-related prototypes into signal-common.h

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 5:43 PM, Peter Maydell wrote: > Split the signal related prototypes into the existing header file > signal-common.h, and include it in those places that now require it. > > Signed-off-by: Peter Maydell > --- > v1->v2: use existing signal-common.h instead of new header > --- >

Re: [PATCH v2 5/9] linux-user: Split mmap prototypes into user-mmap.h

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 5:44 PM, Peter Maydell wrote: > Split out the mmap prototypes into a new header user-mmap.h > which we only include where required. > > Signed-off-by: Peter Maydell > --- > linux-user/qemu.h | 14 -- > linux-user/user-mmap.h | 34

Re: [PATCH v2 4/9] linux-user: Split loader-related prototypes into loader.h

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 5:44 PM, Peter Maydell wrote: > Split guest-binary loader prototypes out into a new header > loader.h which we include only where required. > > Signed-off-by: Peter Maydell > --- > linux-user/loader.h| 59 ++ > linux-user/qemu.h | 40

Re: [PATCH RFC server v2 05/11] vfio-user: run vfio-user context

2021-09-08 Thread Stefan Hajnoczi
On Wed, Sep 08, 2021 at 03:21:19PM +, John Levon wrote: > On Wed, Sep 08, 2021 at 04:02:22PM +0100, Stefan Hajnoczi wrote: > > > > We'd have to have a whole separate API to do that, so a separate thread > > > seems a > > > better approach? > > > > Whether to support non-blocking properly in

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" to vendor crates. > > It seems cc was updated, and I didn't update the submodule accordingly. For > reference, this is the dependency tree that WFM: git

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 7:40 PM Ian Jackson wrote: > marcandre.lur...@redhat.com writes ("[RFC v3 13/32] rust: use > vendored-sources"): > > Most likely, QEMU will want tighter control over the sources, rather > > than relying on crates.io downloading, use a git submodule with all the > >

[PATCH v2 9/9] linux-user: Drop unneeded includes from qemu.h

2021-09-08 Thread Peter Maydell
Trim down the #includes in qemu.h where we can, either by dropping unneeded headers or by moving them to user-internals.h. This includes deleting a couple of #includes that appear at weird points midway through the header file. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé

[PATCH v2 4/9] linux-user: Split loader-related prototypes into loader.h

2021-09-08 Thread Peter Maydell
Split guest-binary loader prototypes out into a new header loader.h which we include only where required. Signed-off-by: Peter Maydell --- linux-user/loader.h| 59 ++ linux-user/qemu.h | 40 linux-user/elfload.c |

[PATCH v2 3/9] linux-user: Split signal-related prototypes into signal-common.h

2021-09-08 Thread Peter Maydell
Split the signal related prototypes into the existing header file signal-common.h, and include it in those places that now require it. Signed-off-by: Peter Maydell --- v1->v2: use existing signal-common.h instead of new header --- linux-user/qemu.h| 36

Re: [PATCH v1 4/4] tests: rename virtio_seg_max_adjust to virtio_check_params

2021-09-08 Thread Philippe Mathieu-Daudé
On 1/29/20 3:07 PM, Denis Plotnikov wrote: > Since, virtio_seg_max_adjust checks not only seg_max, but also > virtqueue_size parameter, let's make the test more general and > add new parameters to be checked there in the future. > > Signed-off-by: Denis Plotnikov > --- >

[PATCH v2 7/9] linux-user: Split linux-user internals out of qemu.h

2021-09-08 Thread Peter Maydell
qemu.h is included in various non-linux-user files (which mostly want the TaskState struct and the functions for doing usermode access to guest addresses like lock_user(), unlock_user(), get_user*(), etc). Split out the parts that are only used in linux-user itself into a new user-internals.h.

[PATCH v2 0/9] linux-user: split internals out of qemu.h

2021-09-08 Thread Peter Maydell
linux-user/qemu.h is an awkward header, for two reasons: (1) its name suggests it's a rather common generic header, but it's actually specific to the usermode emulators (2) it is a mix of: * lots of things internal to the implementation of linux-user * functions that a few files

[PATCH v2 6/9] linux-user: Split safe-syscall macro into its own header

2021-09-08 Thread Peter Maydell
Split the safe-syscall macro from qemu.h into a new safe-syscall.h. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- linux-user/qemu.h | 135 - linux-user/safe-syscall.h | 154 ++

[PULL 05/12] mac_via: move ADB variables to MOS6522Q800VIA1State

2021-09-08 Thread Laurent Vivier
From: Mark Cave-Ayland The ADB is accessed using clock and data pins on q800 VIA1 port B and so can be moved to MOS6522Q800VIA1State. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v2 5/9] linux-user: Split mmap prototypes into user-mmap.h

2021-09-08 Thread Peter Maydell
Split out the mmap prototypes into a new header user-mmap.h which we only include where required. Signed-off-by: Peter Maydell --- linux-user/qemu.h | 14 -- linux-user/user-mmap.h | 34 ++ linux-user/elfload.c | 1 +

[PATCH v2 8/9] linux-user: Don't include gdbstub.h in qemu.h

2021-09-08 Thread Peter Maydell
Currently the linux-user qemu.h pulls in gdbstub.h. There's no real reason why it should do this; include it directly from the C files which require it, and drop the include line in qemu.h. (Note that several of the C files previously relying on this indirect include were going out of their way

[PATCH v2 2/9] linux-user: Split strace prototypes into strace.h

2021-09-08 Thread Peter Maydell
The functions implemented in strace.c are only used in a few files in linux-user; split them out of qemu.h and into a new strace.h header which we include in the places that need it. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- linux-user/qemu.h| 18

[PULL 04/12] mac_via: move PRAM/RTC variables to MOS6522Q800VIA1State

2021-09-08 Thread Laurent Vivier
From: Mark Cave-Ayland The PRAM/RTC is accessed using clock and data pins on q800 VIA1 port B and so can be moved to MOS6522Q800VIA1State. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v2 1/9] linux-user: Fix coding style nits in qemu.h

2021-09-08 Thread Peter Maydell
We're about to move a lot of the code in qemu.h out into different header files; fix the coding style nits first so that checkpatch is happy with the pure code-movement patches. This is mostly block-comment style but also a few whitespace issues. Signed-off-by: Peter Maydell Reviewed-by:

[PULL 11/12] mac_via: rename VIA2_IRQ_SLOT_BIT to VIA2_IRQ_NUBUS_BIT

2021-09-08 Thread Laurent Vivier
From: Mark Cave-Ayland Also improve the alignment of the shifted constants. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20210830102447.10806-12-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/misc/mac_via.h | 22 +++---

  1   2   3   4   >