Re: [Qemu-devel] Partial NUMA config

2018-03-19 Thread Igor Mammedov
On Mon, 19 Mar 2018 15:28:50 +1100 Alexey Kardashevskiy wrote: > On 13/3/18 1:26 pm, Alexey Kardashevskiy wrote: > > Hi Igor, > > > > ec78f8114bc4c1 "numa: use possible_cpus for not mapped CPUs check" added a > > warning about "All CPU(s) up to maxcpus should be described in NUMA config, > > abi

[Qemu-devel] [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of DISAS_EXIT

2018-03-19 Thread Victor Kamensky
In OE project 4.15 linux kernel boot hang was observed under single cpu aarch64 qemu. Kernel code was in a loop waiting for vtimer arrival, spinning in TC generated blocks, while interrupt was pending unprocessed. This happened because when qemu tried to handle vtimer interrupt target had interrupt

Re: [Qemu-devel] [PATCH] hax: Properly handle IA32_APIC_BASE MSR

2018-03-19 Thread Qin, Chao
On 3/20/2018 12:05 AM, Igor Mammedov wrote: On Mon, 19 Mar 2018 17:04:49 +0800 chao@linux.intel.com wrote: > >> From: Qin Chao >> >> Emulation of IA32_APIC_BASE MSR in HAXM is not correct, such as >> bit 8, which is BSP flag and should be set to 1 for the bootstrap >> processor and set

Re: [Qemu-devel] [PATCH for-2.12] hw/misc/macio: Fix crash when listing device properties of macio device

2018-03-19 Thread Mark Cave-Ayland
On 19/03/18 14:00, Thomas Huth wrote: The macio-newworld device can currently be used to abort QEMU unexpectedly: $ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio {"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2}, "package": "build-all"}, "capabilities": [

Re: [Qemu-devel] [PATCH v3] RISC-V: Fix riscv_isa_string memory size bug

2018-03-19 Thread Richard Henderson
On 03/20/2018 02:35 AM, Michael Clark wrote: > FYI - I also have an experimental branch containing a RISC-V TCG back-end > that I started on during the RISC-V Hackathon in Portland last week: > > - https://github.com/michaeljclark/riscv-qemu/tree/wip-riscv-tcg-backend Cool. > I'm able to run a v

[Qemu-devel] [Bug 1385934] Re: USB with passthrougth guest cannot enumerate USB host

2018-03-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1385934 Title: USB with pa

Re: [Qemu-devel] pvrdma build with clang fails

2018-03-19 Thread Marcel Apfelbaum
Hi Michael, On 20/03/2018 3:40, Michael S. Tsirkin wrote: > Marcel, could you pls try a pvrdma build with clang? > It seems to fail due to enum type mismatches. > I guess this is something worth fixing. > Sure, I will fix it. Marcel

Re: [Qemu-devel] [PATCH] scripts/decodetree: Fix insnmask not marked as global in main()

2018-03-19 Thread Richard Henderson
On 03/20/2018 09:24 AM, Richard Henderson wrote: > On 03/19/2018 07:58 PM, Bastian Koppelmann wrote: >> if '-w 16' was given as a cmdline args a local copy of insnmask >> is set and not the global one. >> >> Signed-off-by: Peer Adelt >> Signed-off-by: Bastian Koppelmann > > Reviewed-by: Richard

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v5 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-19 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 11:18:23AM +0800, Wei Wang wrote: > On 03/20/2018 10:59 AM, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 10:16:09AM +0800, Wei Wang wrote: > > > On 03/20/2018 06:55 AM, Michael S. Tsirkin wrote: > > > > On Mon, Mar 19, 2018 at 05:01:38PM +0800, Wei Wang wrote: > > >

Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-19 Thread Zhoujian (jay)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, March 20, 2018 11:14 AM > To: Zhoujian (jay) > Cc: qemu-devel@nongnu.org; imamm...@redhat.com; Huangweidong (C) > ; wangxin (U) ; Gonglei > (Arei) ; Liuzhe (Ahriy, Euler) > Subject: Re: [PATCH v9]

[Qemu-devel] [PULL v2 46/50] vhost+postcopy: Wire up POSTCOPY_END notify

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Wire up a call to VHOST_USER_POSTCOPY_END message to the vhost clients right before we ask the listener thread to shutdown. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --

Re: [Qemu-devel] [Qemu-block] [PATCH v3 04/16] block/mirror: Pull out mirror_perform()

2018-03-19 Thread Jeff Cody
On Wed, Feb 28, 2018 at 07:04:55PM +0100, Max Reitz wrote: > When converting mirror's I/O to coroutines, we are going to need a point > where these coroutines are created. mirror_perform() is going to be > that point. > > Signed-off-by: Max Reitz > Reviewed-by: Fam Zheng > Reviewed-by: Vladimir

[Qemu-devel] [PULL v2 41/50] postcopy: postcopy_notify_shared_wake

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add a hook to allow a client userfaultfd to be 'woken' when a page arrives, and a walker that calls that hook for relevant clients given a RAMBlock and offset. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Marc-André Lureau Reviewed-by

Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-19 Thread Zhoujian (jay)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, March 20, 2018 10:51 AM > To: Zhoujian (jay) > Cc: qemu-devel@nongnu.org; imamm...@redhat.com; Huangweidong (C) > ; wangxin (U) ; Gonglei > (Arei) ; Liuzhe (Ahriy, Euler) > Subject: Re: [PATCH v9]

[Qemu-devel] [PULL v2 43/50] vhost+postcopy: Call wakeups

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Cause the vhost-user client to be woken up whenever: a) We place a page in postcopy mode b) We get a fault and the page has already been received Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- mig

[Qemu-devel] [PULL v2 37/50] vhost+postcopy: Stash RAMBlock and offset

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Stash the RAMBlock and offset for later use looking up addresses. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 34 +++

Re: [Qemu-devel] [PATCH v2] virtio_net: flush uncompleted TX on reset

2018-03-19 Thread Jason Wang
  -static   void qemu_flush_or_purge_queued_packets(NetClientState *nc, bool purge)   {   nc->receive_disabled = 0; Applied and queued for -stable. Thanks Unfortunately, this breaks hotplug test:  TEST: tests/virtio-net-test... (pid=7117) /x86_64/virtio/net/pci/basic: OK /x86_64/v

[Qemu-devel] [PULL v2 44/50] libvhost-user: mprotect & madvises for postcopy

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Clear the area and turn off THP. PROT_NONE the area until after we've userfault advised it to catch any unexpected changes. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --

[Qemu-devel] [PULL v2 47/50] vhost: Huge page align and merge

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Align RAMBlocks to page size alignment, and adjust the merging code to deal with partial overlap due to that alignment. This is needed for postcopy so that we can place/fetch whole hugepages when under userfault. Signed-off-by: Dr. David Alan Gilbert Reviewed-by:

[Qemu-devel] [PULL v2 33/50] postcopy+vhost-user: Split set_mem_table for postcopy

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Split the set_mem_table routines in both qemu and libvhost-user because the postcopy versions are going to be quite different once changes in the later patches are added. However, this patch doesn't produce any functional change, just the split. Signed-off-by: Dr.

[Qemu-devel] [PULL v2 48/50] postcopy: Allow shared memory

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Now that we have the mechanisms in here, allow shared memory in a postcopy. Note that QEMU can't tell who all the users of shared regions are and thus can't tell whether all the users of the shared regions have appropriate support for postcopy. Those devices that

[Qemu-devel] [PULL v2 30/50] postcopy: Allow registering of fd handler

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Allow other userfaultfd's to be registered into the fault thread so that handlers for shared memory can get responses. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- migration/m

[Qemu-devel] [PULL v2 45/50] vhost-user: Add VHOST_USER_POSTCOPY_END message

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" This message is sent just before the end of postcopy to get the client to stop using userfault since we wont respond to any more requests. It should close userfaultfd so that any other pages get mapped to the backing file automatically by the kernel, since at this

[Qemu-devel] [PULL v2 42/50] vhost+postcopy: Add vhost waker

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Register a waker function in vhost-user code to be notified when pages arrive or requests to previously mapped pages get requested. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsi

[Qemu-devel] [PULL v2 29/50] libvhost-user: Open userfaultfd

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Open a userfaultfd (on a postcopy_advise) and send it back in the reply to the qemu for it to monitor. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-u

[Qemu-devel] [PULL v2 38/50] vhost+postcopy: Helper to send requests to source for shared pages

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Provide a helper to be used by shared waker functions to request shared pages from the source. The last_rb pointer is moved into the incoming state since this helper can update it as well as the main fault thread function. Signed-off-by: Dr. David Alan Gilbert Rev

[Qemu-devel] [PULL v2 39/50] vhost+postcopy: Resolve client address

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Resolve fault addresses read off the clients UFD into RAMBlock and offset, and call back to the postcopy code to ask for the page. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-

[Qemu-devel] [PULL v2 35/50] libvhost-user+postcopy: Register new regions with the ufd

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" When new regions are sent to the client using SET_MEM_TABLE, register them with the userfaultfd. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/li

[Qemu-devel] [PULL v2 24/50] postcopy: use UFFDIO_ZEROPAGE only when available

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Use a flag on the RAMBlock to state whether it has the UFFDIO_ZEROPAGE capability, use it when it's available. This allows the use of postcopy on tmpfs as well as hugepage backed files. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Mic

[Qemu-devel] [PULL v2 49/50] libvhost-user: Claim support for postcopy

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Tell QEMU we understand the protocol features needed for postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/libvhost-user.c | 33 +++

[Qemu-devel] [PULL v2 27/50] vhost-user: Add 'VHOST_USER_POSTCOPY_ADVISE' message

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Wire up a notifier to send a VHOST_USER_POSTCOPY_ADVISE message on an incoming advise. Later patches will fill in the behaviour/contents of the message. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-

[Qemu-devel] [PULL v2 34/50] migration/ram: ramblock_recv_bitmap_test_byte_offset

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Utility for testing the map when you already know the offset in the RAMBlock. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- migration/ram.h | 1

[Qemu-devel] [PULL v2 22/50] migrate: Update ram_block_discard_range for shared

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" The choice of call to discard a block is getting more complicated for other cases. We use fallocate PUNCH_HOLE in any file cases; it works for both hugepage and for tmpfs. We use the DONTNEED for non-hugepage cases either where they're anonymous or where they're p

[Qemu-devel] [PULL v2 50/50] postcopy shared docs

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add some notes to the migration documentation for shared memory postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/devel/migration.rst | 41 +

[Qemu-devel] [PULL v2 31/50] vhost+postcopy: Register shared ufd with postcopy

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Register the UFD that comes in as the response to the 'advise' method with the postcopy code. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 20

[Qemu-devel] [PULL v2 26/50] postcopy: Add vhost-user flag for postcopy and check it

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add a vhost feature flag for postcopy support, and use the postcopy notifier to check it before allowing postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/interop/vh

[Qemu-devel] [PULL v2 11/50] acpi: move build_fadt() from i386 specific to generic ACPI source

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov It will be extended and reused by follow up patch for ARM target. PS: Since it's generic function now, don't patch FIRMWARE_CTRL, DSDT fields if they don't point to tables since platform might not provide them and use X_ variants instead if applicable. Signed-off-by: Igor Ma

[Qemu-devel] [PULL v2 40/50] postcopy: helper for waking shared

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Provide a helper to send a 'wake' request on a userfaultfd for a shared process. The address in the clients address space is specified together with the RAMBlock it was resolved to. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by:

[Qemu-devel] [PULL v2 18/50] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-03-19 Thread Michael S. Tsirkin
From: Haozhong Zhang ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity domain of a NVDIMM SPA range must match with corresponding entry in SRAT table. The address ranges of vNVDIMM in QEMU are allocated from the hot-pluggable address space, which is entirely covered by one SRAT

[Qemu-devel] [PULL v2 25/50] postcopy: Add notifier chain

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add a notifier chain for postcopy with a 'reason' flag and an opportunity for a notifier member to return an error. Call it when enabling postcopy. This will initially used to enable devices to declare they're unable to postcopy and later to notify of devices of s

[Qemu-devel] [PULL v2 23/50] qemu_ram_block_host_offset

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Utility to give the offset of a host pointer within a RAMBlock (assuming we already know it's in that RAMBlock) Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/exec/cpu-c

[Qemu-devel] [PULL v2 36/50] vhost+postcopy: Send address back to qemu

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" We need a better way, but at the moment we need the address of the mappings sent back to qemu so it can interpret the messages on the userfaultfd it reads. This is done as a 3 stage set: QEMU -> client set_mem_table mmap stuff, get addresses client

[Qemu-devel] [PULL v2 19/50] tests/bios-tables-test: add test cases for DIMM proximity

2018-03-19 Thread Michael S. Tsirkin
From: Haozhong Zhang QEMU now builds one SRAT memory affinity structure for each PC-DIMM and NVDIMM device presented at boot time with the proximity domain specified in the device option 'node', rather than only one SRAT memory affinity structure covering the entire hotpluggable address space wit

[Qemu-devel] [PULL v2 13/50] tests: acpi: don't read all fields in test_acpi_fadt_table()

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov there is no point to read fields here but not actually checking them so drop it and read only header + dsdt/facs addresses since it's needed later to fetch that tables. With this cleanup we can get rid of AcpiFadtDescriptorRev3/ ACPI_FADT_COMMON_DEF which have no users left.

[Qemu-devel] [PULL v2 17/50] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList

2018-03-19 Thread Michael S. Tsirkin
From: Haozhong Zhang It may need to treat PC-DIMM and NVDIMM differently, e.g., when deciding the necessity of non-volatile flag bit in SRAT memory affinity structures. A new field 'nvdimm' is added to the union type MemoryDeviceInfo for such purpose. Its type is currently PCDIMMDeviceInfo and w

[Qemu-devel] [PULL v2 32/50] vhost+postcopy: Transmit 'listen' to slave

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Notify the vhost-user slave on reception of the 'postcopy-listen' event from the source. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/inte

[Qemu-devel] [PULL v2 14/50] standard-headers: update virtio_net.h

2018-03-19 Thread Michael S. Tsirkin
include speed/duplex fields Signed-off-by: Michael S. Tsirkin --- include/standard-headers/linux/virtio_net.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard-headers/linux/virtio_net.h index 30ff249..e9f255e 10064

[Qemu-devel] [PULL v2 15/50] hw/pci: remove obsolete PCIDevice->init()

2018-03-19 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé All PCI devices are now QOM'ified. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 1 - hw/pci/pci.c | 14 -- 2 files changed, 1

[Qemu-devel] [PULL v2 16/50] pc-dimm: make qmp_pc_dimm_device_list() sort devices by address

2018-03-19 Thread Michael S. Tsirkin
From: Haozhong Zhang Make qmp_pc_dimm_device_list() return sorted by start address list of devices so that it could be reused in places that would need sorted list*. Reuse existing pc_dimm_built_list() to get sorted list. While at it hide recursive callbacks from callers, so that: qmp_pc_dimm

[Qemu-devel] [PULL v2 28/50] libvhost-user: Support sending fds back to qemu

2018-03-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Allow replies with fds (for postcopy) Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/libvhost-user.c | 30 +- 1 file c

[Qemu-devel] [PULL v2 10/50] pc: acpi: use build_append_foo() API to construct FADT

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov build_append_foo() API doesn't need explicit endianness conversions which eliminates a source of errors and it makes build_fadt() look like declarative definition of FADT table in ACPI spec, which makes it easy to review. Also it allows easily extending FADT to support other r

[Qemu-devel] [PULL v2 08/50] acpi: move ACPI_PORT_SMI_CMD define to header it belongs to

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov ACPI_PORT_SMI_CMD is alias for APM_CNT_IOPORT, so make it really one instead of duplicating its value. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/isa/apm.h |

[Qemu-devel] [PULL v2 04/50] acpi: remove unused acpi-dsdt.aml

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov SeaBIOS blob which is currently shipped with QEMU doesn't need acpi-dsdt.aml nor is able to use it and code that loaded it in QEMU was removed by (commit 9fb7aaaf4c "pc: drop external DSDT loading") in 2013. Signed-off-by: Igor Mammedov Reviewed-by: Gerd Hoffmann Reviewed-b

[Qemu-devel] [PULL v2 21/50] Makefile: add target to print generated files

2018-03-19 Thread Michael S. Tsirkin
This is helpful for automatic code analysis. Signed-off-by: Michael S. Tsirkin --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 677a54b..f799390 100644 --- a/Makefile +++ b/Makefile @@ -1045,6 +1045,9 @@ endif include $(SRC_PATH)/tests/docker/Makefil

[Qemu-devel] [PULL v2 09/50] pc: acpi: isolate FADT specific data into AcpiFadtData structure

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov move FADT data initialization out of fadt_setup() into dedicated init_fadt_data() that will set common for pc/q35 values in AcpiFadtData structure and acpi_get_pm_info() will complement it with pc/q35 specific values initialization. That will allow to get rid of fadt_setup()

[Qemu-devel] [PULL v2 07/50] acpi: add build_append_gas() helper for Generic Address Structure

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov it will help to add Generic Address Structure to ACPI tables without using packed C structures and avoid endianness issues as API doesn't need an explicit conversion. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 05/50] pc: replace pm object initialization with one-liner in acpi_get_pm_info()

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov next patch will need it before it gets to piix4/lpc branches that initializes 'obj' now. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[Qemu-devel] [PULL v2 20/50] test/acpi-test-data: add ACPI tables for dimmpxm test

2018-03-19 Thread Michael S. Tsirkin
From: Haozhong Zhang Reviewers can use ACPI tables in this patch to run test_acpi_{piix4,q35}_tcg_dimm_pxm cases. Signed-off-by: Haozhong Zhang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/APIC.dimmpxm | Bin 0 -> 144 bytes tests/acpi-test-da

[Qemu-devel] [PULL v2 03/50] virtio-net: add linkspeed and duplex settings to virtio-net

2018-03-19 Thread Michael S. Tsirkin
From: Jason Baron Although linkspeed and duplex can be set in a linux guest via 'ethtool -s', this requires custom ethtool commands for virtio-net by default. Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows the hypervisor to export a linkspeed and duplex setting. The user c

[Qemu-devel] [PULL v2 01/50] scripts/update-linux-headers: add ethtool.h and update to 4.16.0-rc4

2018-03-19 Thread Michael S. Tsirkin
From: Jason Baron A subsequent patch to add support for setting linkspeed/duplex in virtio-net, requires a few definitions from ethtool.h, which ends up pulling in kernel.h and sysinfo.h as well. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-...@lists.oasis-ope

[Qemu-devel] [PULL v2 06/50] acpi: reuse AcpiGenericAddress instead of Acpi20GenericAddress

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov Drop duplicate in form of Acpi20GenericAddress and reuse AcpiGenericAddress. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/acpi-defs.h | 17 +++

[Qemu-devel] [PULL v2 12/50] virt_arm: acpi: reuse common build_fadt()

2018-03-19 Thread Michael S. Tsirkin
From: Igor Mammedov Extend generic build_fadt() to support rev5.1 FADT and reuse it for 'virt' board, it would allow to phase out usage of AcpiFadtDescriptorRev5_1 and later ACPI_FADT_COMMON_DEF. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger Tested-by: Eric Auger Reviewed-by: Michael S

Re: [Qemu-devel] [Qemu-block] [PATCH v3 02/16] block: BDS deletion in bdrv_do_drained_begin()

2018-03-19 Thread Jeff Cody
On Wed, Feb 28, 2018 at 07:04:53PM +0100, Max Reitz wrote: > Draining a BDS (in the main loop) may cause it to go be deleted. That > is rather suboptimal if we still plan to access it afterwards, so let us > enclose the main body of the function with a bdrv_ref()/bdrv_unref() > pair. > > Signed-o

[Qemu-devel] [PULL v2 02/50] virtio-net: use 64-bit values for feature flags

2018-03-19 Thread Michael S. Tsirkin
From: Jason Baron In prepartion for using some of the high order feature bits, make sure that virtio-net uses 64-bit values everywhere. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-...@lists.oasis-open.org Reviewed-by: Michael S. Tsirkin Signed-off-by: Michae

[Qemu-devel] [PULL v2 00/50] virtio, vhost, pci, pc: features, cleanups

2018-03-19 Thread Michael S. Tsirkin
Changes from v1: - dropped include change for one generated file - proposed a tree-wide refactoring - dropped vhost used slot refactoring due to alignment issues found by clang - added vhost-user post-copy support The following changes since commit 026aaf47c02b79036feb830206cfebb2a726510d: Mer

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v5 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-19 Thread Wei Wang
On 03/20/2018 10:59 AM, Michael S. Tsirkin wrote: On Tue, Mar 20, 2018 at 10:16:09AM +0800, Wei Wang wrote: On 03/20/2018 06:55 AM, Michael S. Tsirkin wrote: On Mon, Mar 19, 2018 at 05:01:38PM +0800, Wei Wang wrote: On 03/19/2018 12:24 PM, Michael S. Tsirkin wrote: On Sun, Mar 18, 2018 at 06:

Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-19 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:09:34AM +, Zhoujian (jay) wrote: > Hi Michael, > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Tuesday, March 20, 2018 9:34 AM > > To: Zhoujian (jay) > > Cc: qemu-devel@nongnu.org; imamm...@redhat.com; Huangweidong (C

Re: [Qemu-devel] [Qemu-block] [PATCH v3 01/16] block: BDS deletion during bdrv_drain_recurse

2018-03-19 Thread Jeff Cody
On Wed, Feb 28, 2018 at 07:04:52PM +0100, Max Reitz wrote: > Draining a BDS child may lead to other children of the same parent being > detached and/or deleted. We should prepare for the former case (by > copying the children list before iterating through it) and prevent the > latter (by bdrv_ref(

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v5 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-19 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 10:16:09AM +0800, Wei Wang wrote: > On 03/20/2018 06:55 AM, Michael S. Tsirkin wrote: > > On Mon, Mar 19, 2018 at 05:01:38PM +0800, Wei Wang wrote: > > > On 03/19/2018 12:24 PM, Michael S. Tsirkin wrote: > > > > On Sun, Mar 18, 2018 at 06:36:20PM +0800, Wei Wang wrote: > > >

Re: [Qemu-devel] [PULL 00/38] QAPI patches for 2018-03-12, 2.12 softfreeze

2018-03-19 Thread Peter Xu
On Mon, Mar 19, 2018 at 10:27:41AM -0500, Eric Blake wrote: > On 03/19/2018 09:57 AM, Eric Blake wrote: > > On 03/19/2018 04:26 AM, Peter Xu wrote: > > > > > > > for you to fetch changes up to > > > > > 75eb57e3ed3682f011a6694863044e8b143a9821: > > > > > > > > > >    qapi: Pass '-u' when doing no

Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-19 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:09:34AM +, Zhoujian (jay) wrote: > Hi Michael, > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Tuesday, March 20, 2018 9:34 AM > > To: Zhoujian (jay) > > Cc: qemu-devel@nongnu.org; imamm...@redhat.com; Huangweidong (C

Re: [Qemu-devel] [PATCH for-2.13 v3 0/2] slirp: Add query-usernet QMP command

2018-03-19 Thread Jason Wang
On 2018年03月16日 14:28, Fam Zheng wrote: v3: - Add Eric's rev-by to patch 2. - Address Eric's comments on patch 1: * Fix spell/grammar: "programmed", "awaiting". * Fix include "qapi/qapi-commands-net.h". * Underscores to dashes. * "Since 2.13" now. v2: Fix compil

Re: [Qemu-devel] [PATCH] i.MX: Support serial RS-232 break properly

2018-03-19 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180320013657.25038-1-tpie...@impinj.com Subject: [Qemu-devel] [PATCH] i.MX: Support serial RS-232 break properly === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=

Re: [Qemu-devel] [PATCH] vhost-user: avoid misaligned access

2018-03-19 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:01:07AM +, Zhoujian (jay) wrote: > > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Saturday, March 17, 2018 2:20 AM > > To: qemu-devel@nongnu.org > > Cc: Zhoujian (jay) > > Subject: [PATCH] vhost-user: avoid misalign

Re: [Qemu-devel] [PATCH v2] virtio_net: flush uncompleted TX on reset

2018-03-19 Thread Jason Wang
On 2018年03月16日 20:07, Greg Kurz wrote: If the backend could not transmit a packet right away for some reason, the packet is queued for asynchronous sending. The corresponding vq element is tracked in the async_tx.elem field of the VirtIONetQueue, for later freeing when the transmission is compl

[Qemu-devel] [PATCH] target/ppc: Fix backwards migration of msr_mask

2018-03-19 Thread David Gibson
21b786f "PowerPC: Add TS bits into msr_mask" added the transaction states to msr_mask for recent POWER CPUs to allow correct migration of machines that are in certain interim transactional memory states. This was correct, but unfortunately breaks backwards of pseries-2.7 and earlier machine types

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v5 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-19 Thread Wei Wang
On 03/20/2018 06:55 AM, Michael S. Tsirkin wrote: On Mon, Mar 19, 2018 at 05:01:38PM +0800, Wei Wang wrote: On 03/19/2018 12:24 PM, Michael S. Tsirkin wrote: On Sun, Mar 18, 2018 at 06:36:20PM +0800, Wei Wang wrote: On 03/16/2018 11:16 PM, Michael S. Tsirkin wrote: On Fri, Mar 16, 2018 at 06:

Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-19 Thread Zhoujian (jay)
Hi Michael, > -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, March 20, 2018 9:34 AM > To: Zhoujian (jay) > Cc: qemu-devel@nongnu.org; imamm...@redhat.com; Huangweidong (C) > ; wangxin (U) ; Gonglei > (Arei) ; Liuzhe (Ahriy, Euler) > Subject: Re: [

[Qemu-devel] [PATCH] target/ppc: Initialize lazy_tlb_flush correctly

2018-03-19 Thread David Gibson
ppc_tr_init_disas_context() correctly sets lazy_tlb_flush to true on certain CPU models. However, it leaves it uninitialized, instead of setting it to false on all others. It wasn't caught before now because we didn't have examples in the tests that exercised this path. However it can now be cau

Re: [Qemu-devel] [PATCH] vhost-user: avoid misaligned access

2018-03-19 Thread Zhoujian (jay)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Saturday, March 17, 2018 2:20 AM > To: qemu-devel@nongnu.org > Cc: Zhoujian (jay) > Subject: [PATCH] vhost-user: avoid misaligned access > > We can't pass a pointer to memory field directly since it's withi

[Qemu-devel] [PATCH RFC v3] scripts/checkpatch.pl: Bug fix

2018-03-19 Thread Su Hang
Commit 2b9aef6fcd96ba7ed8c1ee723e391901852d344c introduced a regression: checkpatch.pl started complaining about the following valid pattern: do { /* something */ } while (condition); Fix the script to once again permit this pattern. Signed-off-by: Su Hang --- v1: fix bug. v2: correct inapp

[Qemu-devel] [PATCH] i.MX: Support serial RS-232 break properly

2018-03-19 Thread Trent Piepho
Linux does not detect a break from this IMX serial driver as a magic sysrq. Nor does it note a break in the port error counts. The former is because the Linux driver uses the BRCD bit in the USR2 register to trigger the RS-232 break handler in the kernel, which is where sysrq hooks in. The emula

Re: [Qemu-devel] [PATCH for-2.12] hw/misc/macio: Fix crash when listing device properties of macio device

2018-03-19 Thread David Gibson
On Mon, Mar 19, 2018 at 03:00:46PM +0100, Thomas Huth wrote: > The macio-newworld device can currently be used to abort QEMU unexpectedly: > > $ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio > {"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2}, > "package": "b

[Qemu-devel] pvrdma build with clang fails

2018-03-19 Thread Michael S. Tsirkin
Marcel, could you pls try a pvrdma build with clang? It seems to fail due to enum type mismatches. I guess this is something worth fixing. -- MST

Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-19 Thread Michael S. Tsirkin
On Mon, Mar 05, 2018 at 05:12:49PM +0800, Jay Zhou wrote: > Used_memslots is shared by vhost kernel and user, it is equal to > dev->mem->nregions, which is correct for vhost kernel, but not for > vhost user, the latter one uses memory regions that have file > descriptor. E.g. a VM has a vhost-user

Re: [Qemu-devel] [PATCH] scripts/decodetree: Fix insnmask not marked as global in main()

2018-03-19 Thread Richard Henderson
On 03/19/2018 07:58 PM, Bastian Koppelmann wrote: > if '-w 16' was given as a cmdline args a local copy of insnmask > is set and not the global one. > > Signed-off-by: Peer Adelt > Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH for-2.12] hw/misc/macio: Fix crash when listing device properties of macio device

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 03:00 PM, Thomas Huth wrote: > The macio-newworld device can currently be used to abort QEMU unexpectedly: > > $ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio > {"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2}, > "package": "build-all"}, "capab

Re: [Qemu-devel] [PATCH RFC v2] scripts/checkpatch.pl: Bug fix

2018-03-19 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1521476567-21818-1-git-send-email-suhan...@mails.ucas.ac.cn Subject: [Qemu-devel] [PATCH RFC v2] scripts/checkpatch.pl: Bug fix === TEST SCRIPT BEGIN === #!/bin/bash BASE=b

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 01/22] target/arm: A53: Initialize PMCEID[01]

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 09:35 PM, Aaron Lindsay wrote: > On Mar 18 23:35, Philippe Mathieu-Daudé wrote: >> Hi Aaron, >> >> On 03/16/2018 09:30 PM, Aaron Lindsay wrote: >>> A53 advertises ARM_FEATURE_PMU, but wasn't initializing pmceid[01]. >>> pmceid[01] are already being initialized to zero for both A15 and

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 14/22] target/arm: Make PMOVSCLR 64 bits wide

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 04:31 PM, Peter Maydell wrote: > On 19 March 2018 at 15:24, Aaron Lindsay wrote: >> Phil, >> >> On Mar 19 00:14, Philippe Mathieu-Daudé wrote: >>> Hi Aaron, >>> >>> On 03/16/2018 09:31 PM, Aaron Lindsay wrote: This is a bug fix to ensure 64-bit reads of this register don't read

Re: [Qemu-devel] [PATCH v2] tcg: Really fix cpu_io_recompile

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 04:15 AM, Richard Henderson wrote: > We have confused the number of instructions that have been > executed in the TB with the number of instructions needed > to repeat the I/O instruction. > > We have used cpu_restore_state_from_tb, which means that > the guest pc is pointing to the

Re: [Qemu-devel] [PATCH v2 2/2] target/m68k: add a mechanism to automatically free TCGv

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 12:35 PM, Laurent Vivier wrote: > SRC_EA() and gen_extend() can return either a temporary > TCGv or a memory allocated one. Mark them when they are > allocated, and free them automatically at end of the > instruction translation. > > We want to free locally allocated TCGv to avoid >

Re: [Qemu-devel] [PATCH v2 1/2] target/m68k: add DisasContext parameter to gen_extend()

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 12:35 PM, Laurent Vivier wrote: > This parameter will be needed to manage automatic release > of temporary allocated TCG variables. > > Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé > --- > target/m68k/translate.c | 46 +++-

Re: [Qemu-devel] [PATCH v2 3/3] nvram: at24c: use standard error reporting

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 10:31 PM, Wolfram Sang wrote: > Replace the ERR macro with error_report() because fprintf is deprecated. > This also fixes the prefix printed out twice. > > Signed-off-by: Wolfram Sang > --- > hw/nvram/eeprom_at24c.c | 17 ++--- > 1 file changed, 6 insertions(+), 11 del

Re: [Qemu-devel] [PATCH v2 1/3] nvram: at24c: prevent segfault by checking "rom-size"

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 10:30 PM, Wolfram Sang wrote: > The value for "rom-size" is used as a divisor, so it must not be 0 or it > will segfault. A size of 0 wouldn't make sense anyhow. > > Signed-off-by: Wolfram Sang > --- > hw/nvram/eeprom_at24c.c | 5 + > 1 file changed, 5 insertions(+) > > diff -

Re: [Qemu-devel] [PATCH v2 2/3] nvram: at24c: use a sane default for "rom-size"

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 10:31 PM, Wolfram Sang wrote: > 0 as "rom-size" will lead to an error message. Let's use the size of a > small 24c01 which has 128 byte. > > Signed-off-by: Wolfram Sang Reviewed-by: Philippe Mathieu-Daudé > --- > hw/nvram/eeprom_at24c.c | 5 - > 1 file changed, 4 insertions(

Re: [Qemu-devel] [PATCH v2 2/2] target/m68k: add a mechanism to automatically free TCGv

2018-03-19 Thread Richard Henderson
On 03/19/2018 07:35 PM, Laurent Vivier wrote: > SRC_EA() and gen_extend() can return either a temporary > TCGv or a memory allocated one. Mark them when they are > allocated, and free them automatically at end of the > instruction translation. > > We want to free locally allocated TCGv to avoid >

Re: [Qemu-devel] [PATCH v2 1/2] target/m68k: add DisasContext parameter to gen_extend()

2018-03-19 Thread Richard Henderson
On 03/19/2018 07:35 PM, Laurent Vivier wrote: > This parameter will be needed to manage automatic release > of temporary allocated TCG variables. > > Signed-off-by: Laurent Vivier > --- > target/m68k/translate.c | 46 +++--- > 1 file changed, 23 insertions

Re: [Qemu-devel] [PATCH for-2.12] gitmodules: Use the QEMU mirror of qemu-palcode

2018-03-19 Thread Richard Henderson
On 03/19/2018 09:17 PM, Peter Maydell wrote: > We have a mirror of the qemu-palcode repository on > git.qemu.org; use that instead of the upstream github, > in line with our general policy of keeping and using > a mirror for submodules. > > Signed-off-by: Peter Maydell Reviewed-by: Richard Hende

Re: [Qemu-devel] [Qemu-arm] [PATCH for-2.12] hw/arm/bcm2836: Use the Cortex-A7 instead of Cortex-A15

2018-03-19 Thread Philippe Mathieu-Daudé
On 03/19/2018 12:02 PM, Peter Maydell wrote: > The BCM2836 uses a Cortex-A7, not a Cortex-A15. Update the device to > use the correct CPU. > https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_rev3.4.pdf > > When the BCM2836 was introduced (bad5623690b) the Cortex-A7 was not

  1   2   3   4   >