Re: [PATCH for QEMU v2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-03-26 Thread teawater
Ping. Thanks, Hui > 2020年3月23日 00:04,Hui Zhu 写道: > > If the guest kernel has many fragmentation pages, use virtio_balloon > will split THP of QEMU when it calls MADV_DONTNEED madvise to release > the balloon pages. > Set option cont-pages to on will open flags VIRTIO_BALLOON_VQ_INFLATE_CONT > a

Re: [RFC for QEMU] virtio-balloon: Add option thp-order to set VIRTIO_BALLOON_F_THP_ORDER

2020-03-26 Thread Michael S. Tsirkin
On Tue, Mar 17, 2020 at 06:13:32PM +0800, teawater wrote: > > > > 2020年3月12日 16:25,Michael S. Tsirkin 写道: > > > > On Thu, Mar 12, 2020 at 03:49:55PM +0800, Hui Zhu wrote: > >> If the guest kernel has many fragmentation pages, use virtio_balloon > >> will split THP of QEMU when it calls MADV_DON

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 12, 2020 at 09:51:25AM +0100, David Hildenbrand wrote: > On 12.03.20 09:47, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2020 at 09:37:32AM +0100, David Hildenbrand wrote: > >> 2. You are essentially stealing THPs in the guest. So the fastest > >> mapping (THP in guest and host) is gon

[Bug 1869073] Re: qemu-arm-static crashes "segmentation fault" when running "git clone -s"

2020-03-26 Thread Laurent Vivier
What is the version of QEMU you are using? ** Changed in: qemu Assignee: (unassigned) => Laurent Vivier (laurent-vivier) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1869073 Title: qemu-arm-

Re: [PATCH for Linux v2] virtio_balloon: Add VIRTIO_BALLOON_VQ_INFLATE_CONT to handle THP split issue

2020-03-26 Thread Michael S. Tsirkin
First, either QEMU or Linux version of any interface changes should be copied to the virtio TC. : On Mon, Mar 23, 2020 at 12:04:56AM +0800, Hui Zhu wrote: > The first version is in [1]. > According to the comments from Michael and David, I updated the patch. > 1. Added a separate vq inflate_cont

Re: [PATCH for QEMU v2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-03-26 Thread David Hildenbrand
> Am 26.03.2020 um 08:06 schrieb teawater : > > Ping. > On paid leave this week. Will try to have a look next week, but it could take a bit longer. Cheers > Thanks, > Hui > >> 2020年3月23日 00:04,Hui Zhu 写道: >> >> If the guest kernel has many fragmentation pages, use virtio_balloon >> wil

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 12, 2020 at 09:51:25AM +0100, David Hildenbrand wrote: > On 12.03.20 09:47, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2020 at 09:37:32AM +0100, David Hildenbrand wrote: > >> 2. You are essentially stealing THPs in the guest. So the fastest > >> mapping (THP in guest and host) is gon

[PULL 5/6] linux-user: Add x86_64 vsyscall page to /proc/self/maps

2020-03-26 Thread Laurent Vivier
From: Richard Henderson The page isn't (necessarily) present in the host /proc/self/maps, and even if it might be it isn't present in page_flags, and even if it was it might not have the same set of page permissions. The easiest thing to do, particularly when it comes to the "[vsyscall]" note at

[PULL 0/6] Linux user for 5.0 patches

2020-03-26 Thread Laurent Vivier
The following changes since commit 736cf607e40674776d752acc201f565723e86045: Update version for v5.0.0-rc0 release (2020-03-24 17:50:00 +) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user-for-5.0-pull-request for you to fetch changes up to a52f5f8

[PULL 2/6] target/i386: Renumber EXCP_SYSCALL

2020-03-26 Thread Laurent Vivier
From: Richard Henderson We are not short of numbers for EXCP_*. There is no need to confuse things by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is only used for system mode and the latter is only used for user mode. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée

[PULL 1/6] linux-user, configure: fix (again) syscall_nr.h dependencies cleanup

2020-03-26 Thread Laurent Vivier
This patch fixes two problems: - it cleanups linux-user variants (for instance ppc64-linux-user and ppc64le-linux-user) - it removes the .o file when it removes the .d file, otherwise the .o file is never updated Fixes: 5f29856b852d ("linux-user, configure: improve syscall_nr.h dependencies c

[PULL 6/6] linux-user: Flush out implementation of gettimeofday

2020-03-26 Thread Laurent Vivier
From: Richard Henderson The first argument, timeval, is allowed to be NULL. The second argument, timezone, was missing. While its use is deprecated, it is still present in the syscall. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id:

Re: [PATCH for QEMU v2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-03-26 Thread Michael S. Tsirkin
On Mon, Mar 23, 2020 at 12:04:57AM +0800, Hui Zhu wrote: > If the guest kernel has many fragmentation pages, use virtio_balloon > will split THP of QEMU when it calls MADV_DONTNEED madvise to release > the balloon pages. > Set option cont-pages to on will open flags VIRTIO_BALLOON_VQ_INFLATE_CONT >

[PULL 4/6] linux-user/i386: Emulate x86_64 vsyscalls

2020-03-26 Thread Laurent Vivier
From: Richard Henderson Notice the magic page during translate, much like we already do for the arm32 commpage. At runtime, raise an exception to return cpu_loop for emulation. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson Message-Id: <20200213032223.14643-4-richard.hender...@li

[PULL 3/6] linux-user/i386: Split out gen_signal

2020-03-26 Thread Laurent Vivier
From: Richard Henderson This is a bit tidier than open-coding the 5 lines necessary to initialize the target_siginfo_t. In addition, this zeros the remaining bytes of the target_siginfo_t, rather than passing in garbage. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philipp

[Bug 1868116] Re: QEMU monitor no longer works

2020-03-26 Thread Christian Ehrhardt 
I'm not sure how many of you are tracking the Vte bug [1] so here a summary of the latest insight from there. - Short term it seems that new behavior will be reverted in Vte 0.60.1. - Long term the Vte devs might want to deprecate no-pty use cases or at least better understand why apps use it tha

Re: [PATCH 00/13] microvm: add acpi support

2020-03-26 Thread Michael S. Tsirkin
On Wed, Mar 25, 2020 at 07:44:34PM +0100, Igor Mammedov wrote: > On Wed, 25 Mar 2020 16:03:39 +0100 > Gerd Hoffmann wrote: > > > On Wed, Mar 25, 2020 at 01:32:12PM +0100, Igor Mammedov wrote: > > > On Thu, 19 Mar 2020 09:01:04 +0100 > > > Gerd Hoffmann wrote: > > > > > > > I know that not sup

Re: backup transaction with io-thread core dumps

2020-03-26 Thread Sergio Lopez
On Wed, Mar 25, 2020 at 04:40:48PM +0100, Dietmar Maurer wrote: > > On March 25, 2020 1:39 PM Sergio Lopez wrote: > > > > > > On Wed, Mar 25, 2020 at 01:29:48PM +0100, Dietmar Maurer wrote: > > > > As expected, if both BDS are running on the same IOThread (and thus, > > > > the same AioContext)

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-26 Thread David Hildenbrand
> Am 26.03.2020 um 08:21 schrieb Michael S. Tsirkin : > > On Thu, Mar 12, 2020 at 09:51:25AM +0100, David Hildenbrand wrote: >>> On 12.03.20 09:47, Michael S. Tsirkin wrote: >>> On Thu, Mar 12, 2020 at 09:37:32AM +0100, David Hildenbrand wrote: 2. You are essentially stealing THPs in the

Re: backup transaction with io-thread core dumps

2020-03-26 Thread Dietmar Maurer
> > > > So the solution is to disable backups when using io-threads? > > > > > > > > > > I meant forbidding transactions with completion-mode == grouped. It > > > would be still possible running transactions (and thus, backups) with > > > completion-mode == individual, which is the default. > >

Re: [PULL 006/136] vl.c: move -m parsing after memory backends has been processed

2020-03-26 Thread Auger Eric
Hi On 2/25/20 12:48 PM, Paolo Bonzini wrote: > From: Igor Mammedov > > It will be possible for main RAM to come from memory-backend > and we should check that size specified in -m matches the size > of the backend and [MachineState::]ram_size also matches > backend's size. > > However -m parsin

Re: backup transaction with io-thread core dumps

2020-03-26 Thread Dietmar Maurer
> > > As mentioned earlier, even a totally simple/normal backup job fails when > > > using io-threads and the VM is under load. It results in a total > > > VM freeze! > > > > > > > This is definitely a different issue. I'll take a look at it today. > > Thanks. Stefan found a way to avoid that bu

Re: [PULL 0/2] Fixes 20200325 patches

2020-03-26 Thread Peter Maydell
On Wed, 25 Mar 2020 at 11:05, Gerd Hoffmann wrote: > > The following changes since commit 736cf607e40674776d752acc201f565723e86045: > > Update version for v5.0.0-rc0 release (2020-03-24 17:50:00 +) > > are available in the Git repository at: > > git://git.kraxel.org/qemu tags/fixes-2020032

Re: [PATCH v15 Kernel 1/7] vfio: KABI for migration interface for device state

2020-03-26 Thread Christoph Hellwig
s/KABI/UAPI/ in the subject and anywhere else in the series. Please avoid __packed__ structures and just properly pad them, they have a major performance impact on some platforms and will cause compiler warnings when taking addresses of members.

Re: [PATCH for-5.0 3/3] object-add: don't create return value if failed

2020-03-26 Thread Paolo Bonzini
On 25/03/20 19:47, Marc-André Lureau wrote: > If object-add failed, no need to create a return value that may later > be leaked. > > Signed-off-by: Marc-André Lureau > --- > qom/qom-qmp-cmds.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qom/qom-qmp-cmds.c b/qom/qom-

Re: [PATCH] backup: don't acquire aio_context in backup_clean

2020-03-26 Thread Stefan Reiter
On 26/03/2020 06:54, Vladimir Sementsov-Ogievskiy wrote: 25.03.2020 18:50, Stefan Reiter wrote: backup_clean is only ever called as a handler via job_exit, which Hmm.. I'm afraid it's not quite correct. job_clean   job_finalize_single job_completed_txn_abort (lock aio context)

Re: [PATCH 2/2] util/bufferiszero: improve avx2 accelerator

2020-03-26 Thread Paolo Bonzini
On 26/03/20 03:09, Hu, Robert wrote: > BTW, do I need to resend these 2 patches? No, thanks! I have queued them. Paolo

Re: 答复: [question]vhost-user: atuo fix network link broken during migration

2020-03-26 Thread Jason Wang
On 2020/3/24 下午7:08, yangke (J) wrote: We find an issue when host mce trigger openvswitch(dpdk) restart in source host during guest migration, Did you mean the vhost-user netev was deleted from the source host? The vhost-user netev was not deleted from the source host. I mean that: in norma

RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-03-26 Thread Thanos Makatos
I want to continue the discussion regarding using MUSER (https://github.com/nutanix/muser) as a device offloading mechanism. The main drawback of MUSER is that it requires a kernel module, so I've experimented with a proof of concept of how MUSER would look like if we somehow didn't need a kernel m

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 08:54:04AM +0100, David Hildenbrand wrote: > > > > Am 26.03.2020 um 08:21 schrieb Michael S. Tsirkin : > > > > On Thu, Mar 12, 2020 at 09:51:25AM +0100, David Hildenbrand wrote: > >>> On 12.03.20 09:47, Michael S. Tsirkin wrote: > >>> On Thu, Mar 12, 2020 at 09:37:32AM +

Re: [PATCH v16 Kernel 1/7] vfio: KABI for migration interface for device state

2020-03-26 Thread Cornelia Huck
On Wed, 25 Mar 2020 01:02:33 +0530 Kirti Wankhede wrote: > - Defined MIGRATION region type and sub-type. > > - Defined vfio_device_migration_info structure which will be placed at the > 0th offset of migration region to get/set VFIO device related > information. Defined members of structure

Re: [PULL 006/136] vl.c: move -m parsing after memory backends has been processed

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 10:20:31 +0100 Auger Eric wrote: > Hi > > On 2/25/20 12:48 PM, Paolo Bonzini wrote: > > From: Igor Mammedov > > > > It will be possible for main RAM to come from memory-backend > > and we should check that size specified in -m matches the size > > of the backend and [Machin

Re: [PULL 0/9] migration queue

2020-03-26 Thread Peter Maydell
On Wed, 25 Mar 2020 at 13:17, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit 736cf607e40674776d752acc201f565723e86045: > > Update version for v5.0.0-rc0 release (2020-03-24 17:50:00 +) > > are available in the Git repository at:

Re: [PATCH v16 Kernel 2/7] vfio iommu: Remove atomicity of ref_count of pinned pages

2020-03-26 Thread Cornelia Huck
On Wed, 25 Mar 2020 01:02:34 +0530 Kirti Wankhede wrote: > vfio_pfn.ref_count is always updated by holding iommu->lock, using atomic s/by/while/ > variable is overkill. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia > Reviewed-by: Eric Auger > --- > drivers/vfio/vfio_iommu_type1.

[PATCH for-5.0] hw/i386/amd_iommu.c: Fix corruption of log events passed to guest

2020-03-26 Thread Peter Maydell
In the function amdvi_log_event(), we write an event log buffer entry into guest ram, whose contents are passed to the function via the "uint64_t *evt" argument. Unfortunately, a spurious '&' in the call to dma_memory_write() meant that instead of writing the event to the guest we would write the l

Re: [PATCH 0/2] Fix the generic image creation code

2020-03-26 Thread Denis V. Lunev
On 3/26/20 4:12 AM, Maxim Levitsky wrote: > The recent patches from Max Reitz allowed some block drivers to not > provide the .bdrv_co_create_opts and still allow qemu-img to > create/format images as long as the image is already existing > (that is the case with various block storage drivers like

Re: [PATCH 00/13] microvm: add acpi support

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 03:33:35 -0400 "Michael S. Tsirkin" wrote: > On Wed, Mar 25, 2020 at 07:44:34PM +0100, Igor Mammedov wrote: > > On Wed, 25 Mar 2020 16:03:39 +0100 > > Gerd Hoffmann wrote: > > > > > On Wed, Mar 25, 2020 at 01:32:12PM +0100, Igor Mammedov wrote: > > > > On Thu, 19 Mar 202

Re: [RFC v1] arm/virt: Add memory hot remove support

2020-03-26 Thread Auger Eric
Hi Shameer, On 3/18/20 1:37 PM, Shameer Kolothum wrote: > This adds support for memory hot remove on arm/virt that > uses acpi ged device. I gave this a try and it works fine if the PCDIMM slot was initially hotplugged: (QEMU) object-add qom-type=memory-backend-ram id=mem1 props.size=4294967296 {

Re: [PATCH v7] net: tulip: check frame size and r/w data length

2020-03-26 Thread Li Qiang
P J P 于2020年3月25日周三 上午1:31写道: > From: Prasad J Pandit > > Tulip network driver while copying tx/rx buffers does not check > frame size against r/w data length. This may lead to OOB buffer > access. Add check to avoid it. > > Limit iterations over descriptors to avoid potential infinite > loop is

RE: [RFC v1] arm/virt: Add memory hot remove support

2020-03-26 Thread Shameerali Kolothum Thodi
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: 26 March 2020 11:01 > To: Shameerali Kolothum Thodi ; > qemu-devel@nongnu.org; qemu-...@nongnu.org > Cc: imamm...@redhat.com; peter.mayd...@linaro.org; m...@redhat.com; > xuwei (O) ; Zengtao (B) ; > Lin

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Max Reitz
On 26.03.20 02:12, Maxim Levitsky wrote: > Instead of checking the .bdrv_co_create_opts to see if we need the failback, > just implement the .bdrv_co_create_opts in the drivers that need it. > > This way we don't break various places that need to know if the underlying > protocol/format really sup

Re: [PATCH qemu] vfio/spapr: Fix page size calculation

2020-03-26 Thread Peter Maydell
On Thu, 26 Mar 2020 at 00:39, David Gibson wrote: > > On Tue, Mar 24, 2020 at 05:39:12PM +1100, Alexey Kardashevskiy wrote: > > Coverity detected an issue (CID 1421903) with potential call of clz64(0) > > which returns 64 which make it do "<<" with a negative number. > > > > This checks the mask a

Re: [PATCH] Refactor vhost_user_set_mem_table functions

2020-03-26 Thread Marc-André Lureau
On Thu, Mar 26, 2020 at 6:39 AM Raphael Norwitz wrote: > > vhost_user_set_mem_table() and vhost_user_set_mem_table_postcopy() have > gotten convoluted, and have some identical code. > > This change moves the logic populating the VhostUserMemory struct and > fds array from vhost_user_set_mem_table(

[PATCH for-5.0] arm:virt: fix broken IPA range with KVM enabled

2020-03-26 Thread Igor Mammedov
Commit a1b18df9a4848, broke virt_kvm_type() logic, which depends on maxram_size, ram_size, ram_slots being parsed/set on machine instance at the time accelerator (KVM) is initialized. set_memory_options() part was already reverted by commit 2a7b18a3205b, so revert remaining initialization of above

Re: [PATCH qemu] vfio/spapr: Fix page size calculation

2020-03-26 Thread David Gibson
On Thu, Mar 26, 2020 at 11:21:47AM +, Peter Maydell wrote: > On Thu, 26 Mar 2020 at 00:39, David Gibson > wrote: > > > > On Tue, Mar 24, 2020 at 05:39:12PM +1100, Alexey Kardashevskiy wrote: > > > Coverity detected an issue (CID 1421903) with potential call of clz64(0) > > > which returns 64

Re: [PATCH for-5.0] arm:virt: fix broken IPA range with KVM enabled

2020-03-26 Thread Auger Eric
Hi Igor, On 3/26/20 12:28 PM, Igor Mammedov wrote: > Commit a1b18df9a4848, broke virt_kvm_type() logic, which depends on > maxram_size, ram_size, ram_slots being parsed/set on machine instance > at the time accelerator (KVM) is initialized. > > set_memory_options() part was already reverted by co

Re: [PULL for 5.0-rc1 00/11] testing updates (+ one mttcg change)

2020-03-26 Thread Peter Maydell
On Wed, 25 Mar 2020 at 15:15, Alex Bennée wrote: > > The following changes since commit 736cf607e40674776d752acc201f565723e86045: > > Update version for v5.0.0-rc0 release (2020-03-24 17:50:00 +) > > are available in the Git repository at: > > https://github.com/stsquad/qemu.git tags/pull-

Re: [RFC v1] arm/virt: Add memory hot remove support

2020-03-26 Thread Auger Eric
Hi Shameer, On 3/26/20 12:14 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: 26 March 2020 11:01 >> To: Shameerali Kolothum Thodi ; >> qemu-devel@nongnu.org; qemu-...@nongnu.org >> Cc: imamm...@redhat.com;

acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Peter Maydell
Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() is passed a zero 'slots' argument then ctz32(slots) will return 32, and then the code that does '1U << slot' is C undefined behaviour because it's an oversized shift. (This is CID 1421896.) Since the pci_write() function in this fi

Re: [PATCH] backup: don't acquire aio_context in backup_clean

2020-03-26 Thread Sergio Lopez
On Thu, Mar 26, 2020 at 08:54:53AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 25.03.2020 18:50, Stefan Reiter wrote: > > backup_clean is only ever called as a handler via job_exit, which > > Hmm.. I'm afraid it's not quite correct. > > job_clean > > job_finalize_single > > job_complete

Re: [RFC for-5.1 1/4] spapr: Refactor locating NVLink2 devices for device tree creation

2020-03-26 Thread Greg Kurz
On Thu, 26 Mar 2020 16:40:06 +1100 David Gibson wrote: > Currently spapr_phb_nvgpu_populate_pcidev_dt() works a little cryptically. > It steps through all the NVLink2 GPUs and NPUs and if they match the device > we're called for, we generate the relevant device tree information. > > Make this a

Re: [RFC for-5.1 2/4] spapr: Helper to determine if a device is NVLink2 related

2020-03-26 Thread Greg Kurz
On Thu, 26 Mar 2020 16:40:07 +1100 David Gibson wrote: > This adds a simple exported helper function which determins if a given > (supposedly) PCI device is actually an NVLink2 device, which has some > special considerations. > > Signed-off-by: David Gibson > --- Reviewed-by: Greg Kurz > hw

Re: [RFC for-5.1 3/4] spapr: Fix failure path for attempting to hot unplug PCI bridges

2020-03-26 Thread Greg Kurz
On Thu, 26 Mar 2020 16:40:08 +1100 David Gibson wrote: > For various technical reasons we can't currently allow unplug a PCI to PCI > bridge on the pseries machine. spapr_pci_unplug_request() correctly > generates an error message if that's attempted. > > But.. if the given errp is not error_ab

Re: [PATCH 0/2] Fix the generic image creation code

2020-03-26 Thread Max Reitz
On 26.03.20 02:12, Maxim Levitsky wrote: > The recent patches from Max Reitz allowed some block drivers to not > provide the .bdrv_co_create_opts and still allow qemu-img to > create/format images as long as the image is already existing > (that is the case with various block storage drivers like n

Re: [RFC for-5.1 4/4] spapr: Don't allow unplug of NVLink2 devices

2020-03-26 Thread Greg Kurz
On Thu, 26 Mar 2020 16:40:09 +1100 David Gibson wrote: > Currently, we can't properly handle unplug of NVLink2 devices, because we > don't have code to tear down their special memory resources. There's not > a lot of impetus to implement that. Since hardware NVLink2 devices can't > be hot unplug

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 11:52:36 + Peter Maydell wrote: > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > is passed a zero 'slots' argument then ctz32(slots) will return 32, > and then the code that does '1U << slot' is C undefined behaviour > because it's an oversized shift.

Re: [PATCH v6 7/7] virtio-net: add migration support for RSS and hash report

2020-03-26 Thread Yuri Benditovich
ping On Fri, Mar 20, 2020 at 1:58 PM Yuri Benditovich < yuri.benditov...@daynix.com> wrote: > Save and restore RSS/hash report configuration. > > Signed-off-by: Yuri Benditovich > --- > hw/net/virtio-net.c | 37 + > 1 file changed, 37 insertions(+) > > diff -

Re: [PATCH] backup: don't acquire aio_context in backup_clean

2020-03-26 Thread Vladimir Sementsov-Ogievskiy
26.03.2020 12:43, Stefan Reiter wrote: On 26/03/2020 06:54, Vladimir Sementsov-Ogievskiy wrote: 25.03.2020 18:50, Stefan Reiter wrote: backup_clean is only ever called as a handler via job_exit, which Hmm.. I'm afraid it's not quite correct. job_clean    job_finalize_single   job_compl

Re: [PATCH] i386/cpu: Expand MAX_FIXED_COUNTERS from 3 to 4 to for Icelake

2020-03-26 Thread Like Xu
Anyone to help review this change? Thanks, Like Xu On 2020/3/17 13:54, Like Xu wrote: In the Intel SDM, "Table 18-2. Association of Fixed-Function Performance Counters with Architectural Performance Events", we may have a new fixed counter 'TOPDOWN.SLOTS' (since Icelake), which counts the numbe

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 13:29:01 +0100 Igor Mammedov wrote: > On Thu, 26 Mar 2020 11:52:36 + > Peter Maydell wrote: > > > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > > is passed a zero 'slots' argument then ctz32(slots) will return 32, > > and then the code that does '1

[Bug 1868116] Re: QEMU monitor no longer works

2020-03-26 Thread Leonardo Müller
Thank you for investigating this. I would bisect QEMU, but wouldn't investigate its libraries. Consequently, I would never find the cause of this problem. For now, I am using -monitor telnet:127.0.0.1:5,server,nowait to have access to the monitor on QEMU guests. -- You received this bug noti

RE: [RFC v6 01/24] update-linux-headers: Import iommu.h

2020-03-26 Thread Liu, Yi L
> From: Eric Auger > Sent: Saturday, March 21, 2020 12:58 AM > To: eric.auger@gmail.com; eric.au...@redhat.com; qemu-devel@nongnu.org; > Subject: [RFC v6 01/24] update-linux-headers: Import iommu.h > > Update the script to import the new iommu.h uapi header. > > Signed-off-by: Eric Auger >

RE: [RFC v6 08/24] pci: introduce PCIPASIDOps to PCIDevice

2020-03-26 Thread Liu, Yi L
Hi Eric, Not sure about your preference. I've modified my patch as below, which HostIOMMUContext to provide callbacks for vIOMMU to call into VFIO. Please feel free to give your suggestions. https://patchwork.ozlabs.org/patch/1259665/ Regards, Yi Liu > From: Eric Auger > Sent: Saturday, March

Re: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-26 Thread Peter Xu
On Thu, Mar 26, 2020 at 05:41:39AM +, Liu, Yi L wrote: > > From: Liu, Yi L > > Sent: Wednesday, March 25, 2020 9:22 PM > > To: 'Peter Xu' > > Subject: RE: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb > > invalidation to host > > > > > From: Peter Xu > > > Sent: Wednesday, March

Re: [PATCH v2] block: make BlockConf.*_size properties 32-bit

2020-03-26 Thread Eric Blake
On 3/26/20 1:52 AM, Roman Kagan wrote: Devices (virtio-blk, scsi, etc.) and the block layer are happy to use 32-bit for logical_block_size, physical_block_size, and min_io_size. However, the properties in BlockConf are defined as uint16_t limiting the values to 32768. This appears unnecessary ti

[Bug 1867519] Re: qemu 4.2 segfaults on VF detach

2020-03-26 Thread Launchpad Bug Tracker
** Merge proposal linked: https://code.launchpad.net/~paelzer/ubuntu/+source/qemu/+git/qemu/+merge/381033 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1867519 Title: qemu 4.2 segfaults on VF d

RE: [RFC v6 05/24] memory: Introduce IOMMU Memory Region inject_faults API

2020-03-26 Thread Liu, Yi L
Hi Eric, I'm also considering how to inject iommu fault to vIOMMU. As our previous discussion (long time ago), MemoryRegion way doesn't work well for VTd case. So I'd like see your opinion on the proposal below: I've a patch to make vIOMMUs register PCIIOMMUOps to PCI layer. Current usage is to ge

Re: [PATCH 1/2] block: pass BlockDriver reference to the .bdrv_co_create

2020-03-26 Thread Eric Blake
On 3/25/20 8:12 PM, Maxim Levitsky wrote: This will allow to reuse a single generic .bdrv_co_create "allow to ${verb}" is not idiomatic, better is "allow ${subject} to ${verb}" or "allow ${verb}ing". In this case, I'd go with: This will allow the reuse of a single... implementation for se

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Eric Blake
On 3/25/20 8:12 PM, Maxim Levitsky wrote: Instead of checking the .bdrv_co_create_opts to see if we need the failback, fallback just implement the .bdrv_co_create_opts in the drivers that need it. This way we don't break various places that need to know if the underlying protocol/format real

Re: [PATCH 1/2] block: pass BlockDriver reference to the .bdrv_co_create

2020-03-26 Thread Maxim Levitsky
On Thu, 2020-03-26 at 08:18 -0500, Eric Blake wrote: > On 3/25/20 8:12 PM, Maxim Levitsky wrote: > > This will allow to reuse a single generic .bdrv_co_create > > "allow to ${verb}" is not idiomatic, better is "allow ${subject} to > ${verb}" or "allow ${verb}ing". In this case, I'd go with: > >

Re: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-26 Thread Peter Xu
On Thu, Mar 26, 2020 at 09:02:48AM -0400, Peter Xu wrote: [...] > > > > > +static inline bool vtd_pasid_cache_valid( > > > > > + VTDPASIDAddressSpace *vtd_pasid_as) { > > > > > +return vtd_pasid_as->iommu_state && > ^ > > >

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 11:52:36 + Peter Maydell wrote: > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > is passed a zero 'slots' argument then ctz32(slots) will return 32, > and then the code that does '1U << slot' is C undefined behaviour > because it's an oversized shift.

RE: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-26 Thread Liu, Yi L
> From: Peter Xu > Sent: Thursday, March 26, 2020 9:03 PM > To: Liu, Yi L > Subject: Re: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb > invalidation to host > > On Thu, Mar 26, 2020 at 05:41:39AM +, Liu, Yi L wrote: > > > From: Liu, Yi L > > > Sent: Wednesday, March 25, 2020 9:2

Re: [PATCH 2/2] util/bufferiszero: improve avx2 accelerator

2020-03-26 Thread Eric Blake
On 3/25/20 9:09 PM, Hu, Robert wrote: (Don't know why my Linux-Evolution missed this mail.) -Original Message- Long line; it's nice to wrap commit messages around column 70 or so (because reading 'git log' in an 80-column window adds indentation). [Hu, Robert] I think I set my vim o

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 02:23:17PM +0100, Igor Mammedov wrote: > On Thu, 26 Mar 2020 11:52:36 + > Peter Maydell wrote: > > > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > > is passed a zero 'slots' argument then ctz32(slots) will return 32, > > and then the code that do

Re: [PATCH 1/2] block: pass BlockDriver reference to the .bdrv_co_create

2020-03-26 Thread Eric Blake
On 3/26/20 8:22 AM, Maxim Levitsky wrote: On Thu, 2020-03-26 at 08:18 -0500, Eric Blake wrote: On 3/25/20 8:12 PM, Maxim Levitsky wrote: This will allow to reuse a single generic .bdrv_co_create "allow to ${verb}" is not idiomatic, better is "allow ${subject} to ${verb}" or "allow ${verb}ing"

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Kevin Wolf
Am 26.03.2020 um 14:20 hat Eric Blake geschrieben: > > +++ b/block/file-posix.c > > @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = { > > .bdrv_reopen_prepare = raw_reopen_prepare, > > .bdrv_reopen_commit = raw_reopen_commit, > > .bdrv_reopen_abort = raw_reopen_abor

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 09:28:27AM -0400, Michael S. Tsirkin wrote: > On Thu, Mar 26, 2020 at 02:23:17PM +0100, Igor Mammedov wrote: > > On Thu, 26 Mar 2020 11:52:36 + > > Peter Maydell wrote: > > > > > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > > > is passed a zero

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 01:50:41PM +0100, Igor Mammedov wrote: > On Thu, 26 Mar 2020 13:29:01 +0100 > Igor Mammedov wrote: > > > On Thu, 26 Mar 2020 11:52:36 + > > Peter Maydell wrote: > > > > > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > > > is passed a zero 'slots

Re: [PATCH v6 7/7] virtio-net: add migration support for RSS and hash report

2020-03-26 Thread Juan Quintela
Yuri Benditovich wrote: > Save and restore RSS/hash report configuration. > > Signed-off-by: Yuri Benditovich Reviewed-by: Juan Quintela sorry, hadn't seen it. vmstate parts are right.

RE: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-26 Thread Liu, Yi L
> From: Peter Xu > Sent: Thursday, March 26, 2020 9:23 PM > To: Liu, Yi L > Subject: Re: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb > invalidation to host > > On Thu, Mar 26, 2020 at 09:02:48AM -0400, Peter Xu wrote: > > [...] > > > > > > > +static inline bool vtd_pasid_cache_va

Re: [PATCH v6 0/7] reference implementation of RSS and hash report

2020-03-26 Thread Michael S. Tsirkin
On Fri, Mar 20, 2020 at 06:38:51AM -0700, no-re...@patchew.org wrote: > qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or > directory > qemu-system-x86_64: falling back to tcg > = > ==8831==ERROR: AddressSaniti

Re: [PATCH v6 0/7] reference implementation of RSS and hash report

2020-03-26 Thread Michael S. Tsirkin
On Fri, Mar 20, 2020 at 01:57:44PM +0200, Yuri Benditovich wrote: > Support for VIRTIO_NET_F_RSS and VIRTIO_NET_F_HASH_REPORT > features in QEMU for reference purpose. > Implements Toeplitz hash calculation for incoming > packets according to configuration provided by driver. > Uses calculated hash

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Maxim Levitsky
On Thu, 2020-03-26 at 08:20 -0500, Eric Blake wrote: > On 3/25/20 8:12 PM, Maxim Levitsky wrote: > > Instead of checking the .bdrv_co_create_opts to see if we need the failback, > > fallback 100% true. > > > just implement the .bdrv_co_create_opts in the drivers that need it. > > > > This way we

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Eric Blake
On 3/26/20 8:28 AM, Kevin Wolf wrote: Am 26.03.2020 um 14:20 hat Eric Blake geschrieben: +++ b/block/file-posix.c @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = { .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit, .bdrv_reopen_a

Re: [PATCH v6 7/7] virtio-net: add migration support for RSS and hash report

2020-03-26 Thread Michael S. Tsirkin
Code looks OK but patchew testing shows failures. If they are false positives pls reply to that mail. On Thu, Mar 26, 2020 at 02:34:39PM +0200, Yuri Benditovich wrote: > ping > > On Fri, Mar 20, 2020 at 1:58 PM Yuri Benditovich > wrote: > > Save and restore RSS/hash report configuration. >

Re: [PATCH for-5.0 v2 0/4] bug fixes extracted from larger qcow2 zero bit work

2020-03-26 Thread Max Reitz
On 24.03.20 18:42, Eric Blake wrote: > My proposal [1] to add an autoclear all-zero-content bit to the qcow2 > format has now stalled into 5.1 territory, but several patches in my > initial proposal are uncontroversial and obvious bug fixes worth > having in 5.0. > > [1] https://lists.gnu.org/arch

Re: [PATCH 0/2] Fix the generic image creation code

2020-03-26 Thread Max Reitz
On 26.03.20 13:23, Max Reitz wrote: > On 26.03.20 02:12, Maxim Levitsky wrote: >> The recent patches from Max Reitz allowed some block drivers to not >> provide the .bdrv_co_create_opts and still allow qemu-img to >> create/format images as long as the image is already existing >> (that is the case

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Max Reitz
On 26.03.20 14:35, Eric Blake wrote: > On 3/26/20 8:28 AM, Kevin Wolf wrote: >> Am 26.03.2020 um 14:20 hat Eric Blake geschrieben: +++ b/block/file-posix.c @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = {    .bdrv_reopen_prepare = raw_reopen_prepare,    .bdr

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 09:31:09 -0400 "Michael S. Tsirkin" wrote: > On Thu, Mar 26, 2020 at 09:28:27AM -0400, Michael S. Tsirkin wrote: > > On Thu, Mar 26, 2020 at 02:23:17PM +0100, Igor Mammedov wrote: > > > On Thu, 26 Mar 2020 11:52:36 + > > > Peter Maydell wrote: > > > > > > > Hi; Cover

Re: [PATCH RFC 8/9] KVM: Add dirty-ring-size property

2020-03-26 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Mar 25, 2020 at 08:00:31PM +, Dr. David Alan Gilbert wrote: > > > @@ -2077,6 +2079,33 @@ static int kvm_init(MachineState *ms) > > > s->memory_listener.listener.coalesced_io_add = > > > kvm_coalesce_mmio_region; > > > s->memory_listener

[PATCH] qemu-user: fix build with LLVM lld 10

2020-03-26 Thread Roger Pau Monne
lld 10.0.0 introduced a new linker option --image-base equivalent to the GNU -Ttext-segment one, hence use it when available. This fixes the build of QEMU on systems using lld 10 or greater. Signed-off-by: Dimitry Andric Signed-off-by: Roger Pau Monné --- Cc: Laurent Vivier Cc: Richard Henders

Re: [PATCH 2/2] util/bufferiszero: improve avx2 accelerator

2020-03-26 Thread Robert Hoo
On Thu, 2020-03-26 at 08:26 -0500, Eric Blake wrote: > On 3/25/20 9:09 PM, Hu, Robert wrote: > > (Don't know why my Linux-Evolution missed this mail.) > > > -Original Message- > > > Long line; it's nice to wrap commit messages around column 70 or > > > so (because > > > reading 'git log' in

Re: [PATCH for-5.0 v2 0/3] qemu-img: Fix check's leak/corruption fix report

2020-03-26 Thread Max Reitz
On 24.03.20 18:27, Max Reitz wrote: > Branch: https://github.com/XanClic/qemu.git fix-check-result-v2 > Branch: https://git.xanclic.moe/XanClic/qemu.git fix-check-result-v2 > > v1: https://lists.nongnu.org/archive/html/qemu-block/2020-02/msg01418.html Thanks for the review again, applied to my bl

[PATCH] acpi: pcihp: fix left shift undefined behavior in acpi_pcihp_eject_slot()

2020-03-26 Thread Igor Mammedov
Coverity spots subj in following guest triggered code path pci_write(, data = 0) -> acpi_pcihp_eject_slot(,slots = 0) uinst32_t slot = ctz32(slots) ... ... = ~(1U << slot) where 'slot' value is 32 in case 'slots' bitmap is empty. 'slots' is a bitmap and empty one shouldn't do anyt

RE: [PATCH v1 12/22] intel_iommu: add PASID cache management infrastructure

2020-03-26 Thread Liu, Yi L
> From: Liu, Yi L > Sent: Thursday, March 26, 2020 2:15 PM > To: 'Peter Xu' > Subject: RE: [PATCH v1 12/22] intel_iommu: add PASID cache management > infrastructure > > > From: Peter Xu > > Sent: Wednesday, March 25, 2020 10:52 PM > > To: Liu, Yi L > > Subject: Re: [PATCH v1 12/22] intel_iommu:

Re: [PATCH] acpi: pcihp: fix left shift undefined behavior in acpi_pcihp_eject_slot()

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 09:56:24AM -0400, Igor Mammedov wrote: > Coverity spots subj in following guest triggered code path > pci_write(, data = 0) -> acpi_pcihp_eject_slot(,slots = 0) > uinst32_t slot = ctz32(slots) > ... > ... = ~(1U << slot) > where 'slot' value is 32 in case 's

[PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect

2020-03-26 Thread Janosch Frank
In case the protection of the machine fails at s390_pv_vm_enable(), we'll currently report the local_error variable. Problem is that there's no migration blocker error that we can report at this point so the pointer is always NULL which leads to a SEGFAULT. Let's remove the error report. Signed-o

Re: [PATCH RFC 9/9] KVM: Dirty ring support

2020-03-26 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Mar 25, 2020 at 08:41:44PM +, Dr. David Alan Gilbert wrote: > > [...] > > > > +enum KVMReaperState { > > > +KVM_REAPER_NONE = 0, > > > +/* The reaper is sleeping */ > > > +KVM_REAPER_WAIT, > > > +/* The reaper is reaping for dirt

booke206_tlb_ways() returning 0

2020-03-26 Thread Peter Maydell
Hi; Coverity points out a possible issue in booke206_get_tlbm() (this is CID 1421942): static inline ppcmas_tlb_t *booke206_get_tlbm(CPUPPCState *env, const int tlbn, target_ulong ea, int way) { int r; uint32_t ways = booke206_tlb_ways(env, tl

  1   2   3   4   >