Re: [Qemu-devel] my attempt at new QEMU website

2016-10-20 Thread Stefan Weil
On 10/21/16 04:10, Programmingkid wrote: On Oct 20, 2016, at 8:56 AM, Paolo Bonzini wrote: - Original Message - From: "Daniel P. Berrange" To: "Programmingkid" Cc: "qemu-devel qemu-devel" , "Paolo Bonzini"

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread Peter Xu
On Fri, Oct 21, 2016 at 11:50:05AM +1100, David Gibson wrote: [...] > > > In my setup the VFIO registered two memory areas with one page of > > > unregistered memory > > > between them. > > > > > > When I'm calling memory_region_notify_iommu it calls the notifier function > > > of VFIO twice >

[Qemu-devel] [PATCH v2] ppc: allow certain HV interrupts to be delivered to guests

2016-10-20 Thread Nicholas Piggin
On Fri, 21 Oct 2016 12:09:54 +1100 David Gibson wrote: > On Fri, Oct 21, 2016 at 12:40:58AM +1100, Nicholas Piggin wrote: > > On Thu, 20 Oct 2016 15:08:07 +0200 > > Cédric Le Goater wrote: > > > > > On 10/20/2016 08:59 AM, Nicholas Piggin wrote:

Re: [Qemu-devel] [PATCH v3 27/34] target-arm: emulate LL/SC using cmpxchg helpers

2016-10-20 Thread Richard Henderson
On 10/20/2016 12:07 PM, Pranith Kumar wrote: On Thu, Oct 20, 2016 at 3:02 PM, Richard Henderson wrote: On 10/20/2016 11:58 AM, Pranith Kumar wrote: Indeed, I was looking at atomic-6 on github. atomic-7 is not there yet :) I've rebased atomic-6 (no -7). It should be

[Qemu-devel] [RFC, v1, 2/2] hw/arm/sysbus-fdt: enable vfio-hisi-hnsvf dynamic instantiation

2016-10-20 Thread Rick Song
This patch allows the instantiation of the vfio-hisi-hnsvf device from the QEMU command line (-device vfio-hisi-hnsvf,host=""). A specialized device tree node is created for the guest, containing compat, dma-coherent, reg and interrupts properties. Signed-off-by: Rick Song

[Qemu-devel] [Bug 1635339] Re: qxl_pre_save assertion failure on vm "save"

2016-10-20 Thread DocMAX
I tried other QXL drivers: 22.33.46.473. These work (but have a older date: 2015-07-28. 17.54.59.923 have the date 2016-04-21. I got them from this package: http://depot.flexvdi.com/guest-tools/flexvdi-guest-tools-2.2.11.iso Those provide something, which lets my window resize freely. -- You

[Qemu-devel] [RFC, v1, 1/2] hw/vfio/platform: add hisilicon hnsvf device

2016-10-20 Thread Rick Song
The platform device class has become abstract. This patch introduces a hisilicon hnsvf device that derives from it. Signed-off-by: Rick Song --- hw/vfio/Makefile.objs | 1 + hw/vfio/hisi-hnsvf.c | 56 +++

[Qemu-devel] [Bug 1635339] Re: qxl_pre_save assertion failure on vm "save"

2016-10-20 Thread DocMAX
QXL driver version is 17.54.59.923 Commandline (git compiled today) is: /usr/sbin/qemu-system-x86_64 -name guest=dc,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-dc /master-key.aes -machine pc-i440fx-2.7,accel=kvm,usb=off,vmport=off

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-20 Thread Peter Xu
On Thu, Oct 20, 2016 at 10:11:15PM +0300, Aviv B.D. wrote: [...] > > > +static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s, > > > + uint16_t domain_id, hwaddr > > addr, > > > + uint8_t am) > > > +{ >

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Alex Williamson
On Fri, 21 Oct 2016 08:30:53 +0530 Kirti Wankhede wrote: > On 10/21/2016 2:52 AM, Alex Williamson wrote: > > On Fri, 21 Oct 2016 02:44:37 +0530 > > Kirti Wankhede wrote: > > > ... > > >> > >> +extern const char

Re: [Qemu-devel] [Bug 1626972] Re: [PATCH] util: secure memfd_create fallback mechanism

2016-10-20 Thread Rafael David Tinoco
Hello Again, finally I could get back to this, and.. I was finishing a patch creating the open+truncate+mmap+unlink mechanism on files specified by "vhostlog" parameter of tap devices. Patch is done, problem is that... looks like the "memfd" is only used for shared logs AND vhost-net (used

Re: [Qemu-devel] [Bug 1626972] Re: [PATCH] util: secure memfd_create fallback mechanism

2016-10-20 Thread Rafael David Tinoco
The correct (and draft) one: http://pastebin.ubuntu.com/23357210/ Im passing vhostlog parameter as "hdev->log_filename" so it can be accessed from net_init_tap()-> functions AND from vhost_dev_start()-> functions. This way I don't have to change function prototypes anymore. > On Oct 21, 2016,

[Qemu-devel] [PATCHv2 07/12] pseries: Consolidate construction of /chosen device tree node

2016-10-20 Thread David Gibson
For historical reasons, building the /chosen node in the guest device tree is split across several places and includes both parts which write the DT sequentially and others which use random access functions. This patch consolidates construction of the node into one place, using random access

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Kirti Wankhede
On 10/21/2016 2:52 AM, Alex Williamson wrote: > On Fri, 21 Oct 2016 02:44:37 +0530 > Kirti Wankhede wrote: > ... >> >> +extern const char *vfio_device_api_string(u32 flags); >> + >> struct pci_dev; >> #ifdef CONFIG_EEH >> extern void

[Qemu-devel] [PATCHv2 12/12] pseries: Remove spapr_create_fdt_skel()

2016-10-20 Thread David Gibson
For historical reasons construction of the guest device tree in spapr is divided between spapr_create_fdt_skel() which is called at init time, and spapr_build_fdt() which runs at reset time. Over time, more and more things have needed to be moved to reset time. Previous cleanups mean the only

[Qemu-devel] [PATCHv2 08/12] pseries: Consolidate construction of /rtas device tree node

2016-10-20 Thread David Gibson
For historical reasons construction of the /rtas node in the device tree (amongst others) is split into several places. In particular it's split between spapr_create_fdt_skel(), spapr_build_fdt() and spapr_rtas_device_tree_setup(). In fact, as well as adding the actual RTAS tokens to the device

[Qemu-devel] [PATCHv2 10/12] pseries: Move /hypervisor node construction to fdt_build_fdt()

2016-10-20 Thread David Gibson
Currently the /hypervisor device tree node is constructed in spapr_create_fdt_skel(). As part of consolidating device tree construction to reset time, move it to a function called from spapr_build_fdt(). Signed-off-by: David Gibson Reviewed-by: Thomas Huth

[Qemu-devel] [PATCHv2 06/12] pseries: Move construction of /interrupt-controller fdt node

2016-10-20 Thread David Gibson
Currently the device tree node for the XICS interrupt controller is in spapr_create_fdt_skel(). As part of consolidating device tree construction to reset time, this moves it to a function called from spapr_build_fdt(). In addition we move the actual code into hw/intc/xics_spapr.c with the rest

[Qemu-devel] [PATCHv2 11/12] pseries: Consolidate construction of /vdevice device tree node

2016-10-20 Thread David Gibson
Construction of the /vdevice node (and its children) is divided between spapr_create_fdt_skel() (at init time), which creates the base node, and spapr_populate_vdevice() (at reset time) which creates the nodes for each individual virtual device. This consolidates both into a single function

[Qemu-devel] [PATCHv2 09/12] pseries: Move /event-sources construction to spapr_build_fdt()

2016-10-20 Thread David Gibson
The /event-sources device tree node is built from spapr_create_fdt_skel(). As part of consolidating device tree construction to reset time, this moves it to spapr_build_fdt(). Signed-off-by: David Gibson Reviewed-by: Thomas Huth --- hw/ppc/spapr.c

[Qemu-devel] [PATCHv2 01/12] pseries: Split device tree construction from device tree load

2016-10-20 Thread David Gibson
spapr_finalize_fdt() both finishes building the device tree for the guest and loads it into guest memory. For future cleanups, it's going to be more convenient to do these two things separately. The loading portion is pretty trivial, so we move it inline into the caller, ppc_spapr_reset(). We

[Qemu-devel] [PATCHv2 02/12] pseries: Remove rtas_addr and fdt_addr fields from machinestate

2016-10-20 Thread David Gibson
These values are used only within ppc_spapr_reset(), so just change them to local variables. Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 14 +++---

[Qemu-devel] [PATCHv2 03/12] pseries: Make spapr_create_fdt_skel() get information from machine state

2016-10-20 Thread David Gibson
Currently spapr_create_fdt_skel() takes a bunch of individual parameters for various things it will put in the device tree. Some of these can already be taken directly from sPAPRMachineState. This patch alters it so that all of them can be taken from there, which will allow this code to be moved

[Qemu-devel] [PATCHv2 05/12] pseries: Consolidate RTAS loading

2016-10-20 Thread David Gibson
At each system reset, the pseries machine needs to load RTAS (the runtime portion of the guest firmware) into the VM. This means copying the actual RTAS code into guest memory, and also updating the device tree so that the guest OS and boot firmware can locate it. For historical reasons the copy

[Qemu-devel] [PATCHv2 00/12] pseries: Consolidate guest device tree construction

2016-10-20 Thread David Gibson
For historical reasons construction of the guest device tree in spapr is divided between spapr_create_fdt_skel() which is called at init time, and spapr_build_fdt() which runs at reset time. Over time, more and more things have needed to be moved to reset time. This series consolidates all the

[Qemu-devel] [PATCHv2 04/12] pseries: Move adding of fdt reserve map entries

2016-10-20 Thread David Gibson
The flattened device tree passed to pseries guests contains a list of reserved memory areas. Currently we construct this list early in spapr_create_fdt_skel() as we sequentially write the fdt. This will be inconvenient for upcoming cleanups, so this patch moves the reserve map changes to the end

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-20 Thread Jike Song
On 10/21/2016 01:19 AM, Xiao, Guangrong wrote: >> On 10/19/2016 10:14 PM, Paolo Bonzini wrote: >>> On 19/10/2016 15:39, Xiao Guangrong wrote: >>> >>> >>> I understood that KVM side is safe, however, vfio side is independent >>> with kvm and the user of usrdata can fetch kvm struct at any time,

Re: [Qemu-devel] [PATCH v9 01/12] vfio: Mediated device Core driver

2016-10-20 Thread Jike Song
On 10/21/2016 01:12 AM, Alex Williamson wrote: > On Thu, 20 Oct 2016 15:23:53 +0800 > Jike Song wrote: > >> On 10/18/2016 05:22 AM, Kirti Wankhede wrote: >>> diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c >>> new file mode 100644 >>> index

Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()

2016-10-20 Thread Jason Wang
On 2016年10月20日 12:53, Hailiang Zhang wrote: On 2016/10/20 11:53, Jason Wang wrote: On 2016年10月10日 11:49, Zhang Chen wrote: On 10/10/2016 11:13 AM, Hailiang Zhang wrote: Hi, On 2016/10/10 10:52, Zhang Chen wrote: On 09/30/2016 12:06 PM, zhanghailiang wrote: find_and_check_chardev()

Re: [Qemu-devel] my attempt at new QEMU website

2016-10-20 Thread Programmingkid
On Oct 20, 2016, at 8:56 AM, Paolo Bonzini wrote: > > > - Original Message - >> From: "Daniel P. Berrange" >> To: "Programmingkid" >> Cc: "qemu-devel qemu-devel" , "Paolo Bonzini" >> >>

Re: [Qemu-devel] [PATCH] net: vmxnet: initialise local tx descriptor

2016-10-20 Thread Jason Wang
On 2016年10月19日 03:35, P J P wrote: Hello Jason, +-- On Thu, 11 Aug 2016, Dmitry Fleytman wrote --+ | Reviewed-by: Dmitry Fleytman | | > @@ -531,6 +531,7 @@ static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32_t tx_ridx) | > | >

Re: [Qemu-devel] [PATCH] e1000e: Don't zero out buffer address in rx descriptor

2016-10-20 Thread Jason Wang
On 2016年10月18日 22:27, Kevin Wolf wrote: Am 18.10.2016 um 16:10 hat Dmitry Fleytman geschrieben: > On 17 Oct 2016, at 01:35 AM, Kevin Wolf wrote: > > The e1000e emulation zeroes out any used rx descriptor and then writes a > completely newly constructed value

Re: [Qemu-devel] [PATCH] e1000e: Don't zero out buffer address in rx descriptor

2016-10-20 Thread Jason Wang
On 2016年10月18日 22:10, Dmitry Fleytman wrote: On 17 Oct 2016, at 01:35 AM, Kevin Wolf wrote: The e1000e emulation zeroes out any used rx descriptor and then writes a completely newly constructed value there. By doing this, it doesn't only update the write-back area of the

Re: [Qemu-devel] is there a way to optimize vhost of virtio-net

2016-10-20 Thread Jason Wang
On 2016年10月17日 18:39, yue wrote: hi, jasowang: according to my test , the vm's network performance is just 20% of physical ethernet, the thread of vhost easily eat up 100% cpu when under pressure. What's you configuration (e.g qemu cli, host and guest kernel versions and network

Re: [Qemu-devel] [PATCH] eepro100: Fix memory leak and simplify code for VMStateDescription

2016-10-20 Thread Jason Wang
On 2016年10月17日 17:01, Dr. David Alan Gilbert wrote: * Stefan Weil (s...@weilnetz.de) wrote: On 10/14/16 10:25, Dr. David Alan Gilbert wrote: * Stefan Weil (s...@weilnetz.de) wrote: Instead of allocating a VMStateDescription for each NIC instance, the code now uses a single constant

Re: [Qemu-devel] [PATCH 02/13] pseries: Split device tree construction from device tree load

2016-10-20 Thread David Gibson
On Thu, Oct 20, 2016 at 09:03:04AM +0200, Thomas Huth wrote: > On 20.10.2016 07:11, David Gibson wrote: > > spapr_finalize_fdt() both finishes building the device tree for the guest > > and loads it into guest memory. For future cleanups, it's going to be > > more convenient to do these two

Re: [Qemu-devel] [PATCH 1/3] ppc: fix MSR_ME handling for system reset interrupt

2016-10-20 Thread Nicholas Piggin
On Fri, 21 Oct 2016 12:09:15 +1100 David Gibson wrote: > On Thu, Oct 20, 2016 at 05:59:10PM +1100, Nicholas Piggin wrote: > > Power ISA specifies ME bit handling for system reset interrupt: > > > > if the interrupt occurred while the thread was in power-saving >

Re: [Qemu-devel] [PATCH 08/13] spapr: Consolidate construction of /chosen device tree node

2016-10-20 Thread David Gibson
On Thu, Oct 20, 2016 at 09:49:42AM +0200, Thomas Huth wrote: > On 20.10.2016 07:12, David Gibson wrote: > > For historical reasons, building the /chosen node in the guest device tree > > is split across several places and includes both parts which write the DT > > sequentially and others which use

[Qemu-devel] [RFC, v1, 1/2] hw/vfio/platform: add hisilicon hnsvf device

2016-10-20 Thread Rick Song
The platform device class has become abstract. This patch introduces a hisilicon hnsvf device that derives from it. Signed-off-by: Rick Song --- hw/vfio/Makefile.objs | 1 + hw/vfio/hisi-hnsvf.c | 56 +++

Re: [Qemu-devel] Assertion failure on qcow2 disk with cluster_size != 64k

2016-10-20 Thread Eric Blake
On 10/20/2016 07:24 PM, Ed Swierk wrote: > Shortly after I start qemu 2.7.0 with a qcow2 disk image created with > -o cluster_size=1048576, it prints the following and dies: > > block/qcow2.c:2451: qcow2_co_pwrite_zeroes: Assertion `head + count <= > s->cluster_size' failed. > > I narrowed the

[Qemu-devel] [RFC, v1, 2/2] hw/arm/sysbus-fdt: enable vfio-hisi-hnsvf dynamic instantiation

2016-10-20 Thread Rick Song
This patch allows the instantiation of the vfio-hisi-hnsvf device from the QEMU command line (-device vfio-hisi-hnsvf,host=""). A specialized device tree node is created for the guest, containing compat, dma-coherent, reg and interrupts properties. Signed-off-by: Rick Song

[Qemu-devel] [PATCHv4 11/11] libqos: Change PCI accessors to take opaque BAR handle

2016-10-20 Thread David Gibson
The usual use model for the libqos PCI functions is to map a specific PCI BAR using qpci_iomap() then pass the returned token into IO accessor functions. This, and the fact that iomap() returns a (void *) which actually contains a PCI space address, kind of suggests that the return value from

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/3] ppc/spapr: implement H_SIGNAL_SYS_RESET

2016-10-20 Thread David Gibson
On Fri, Oct 21, 2016 at 11:56:34AM +1100, Nicholas Piggin wrote: > On Thu, 20 Oct 2016 18:49:22 +0200 > Greg Kurz wrote: > > > On Thu, 20 Oct 2016 17:59:12 +1100 > > Nicholas Piggin wrote: > > > > > The H_SIGNAL_SYS_RESET hcall allows a guest CPU to raise a

[Qemu-devel] [PATCHv4 08/11] tests: Clean up IO handling in ide-test

2016-10-20 Thread David Gibson
ide-test uses many explicit inb() / outb() operations for its IO, which means it's not portable to non-x86 platforms. This cleans it up to use the libqos PCI accessors instead. Signed-off-by: David Gibson --- tests/ide-test.c | 179

[Qemu-devel] [PATCHv4 10/11] tests: Use qpci_mem{read, write} in ivshmem-test

2016-10-20 Thread David Gibson
ivshmem implements a block of shared memory in a PCI BAR. Currently our test case accesses this using qtest_mem{read,write}. However, deducing the correct addresses for these requires making assumptions about the internel format returned by qpci_iomap(), along with some ugly casts. This patch

[Qemu-devel] [PATCHv4 09/11] libqos: Add 64-bit PCI IO accessors

2016-10-20 Thread David Gibson
Currently the libqos PCI layer includes accessor helpers for 8, 16 and 32 bit reads and writes. It's likely that we'll want 64-bit accesses in the future (plenty of modern peripherals will have 64-bit reigsters). This adds them. For PIO (not MMIO) accesses on the PC backend, this is implemented

[Qemu-devel] [PATCHv4 07/11] libqos: Implement mmio accessors in terms of mem{read, write}

2016-10-20 Thread David Gibson
In the libqos PCI code we now have accessors both for registers (byte significance preserving) and for streaming data (byte address order preserving). These exist in both the interface for qtest drivers and in the machine specific backends. However, the register-style accessors aren't actually

Re: [Qemu-devel] [PATCH] net: rocker: set limit to DMA buffer size

2016-10-20 Thread Jason Wang
On 2016年10月12日 17:52, Jiri Pirko wrote: Wed, Oct 12, 2016 at 11:10:55AM CEST, ppan...@redhat.com wrote: From: Prasad J Pandit Rocker network switch emulator has test registers to help debug DMA operations. While testing host DMA access, a buffer address is written to

[Qemu-devel] [PATCHv4 04/11] libqos: Better handling of PCI legacy IO

2016-10-20 Thread David Gibson
The usual model for PCI IO with libqos is to use qpci_iomap() to map a specific BAR for a PCI device, then perform IOs within that BAR using qpci_io_{read,write}*(). However, certain devices also have legacy PCI IO. In this case, instead of (or as well as) being accessed via PCI BARs, the device

[Qemu-devel] [PATCHv4 03/11] libqos: Move BAR assignment to common code

2016-10-20 Thread David Gibson
The PCI backends in libqos each supply an iomap() and iounmap() function which is used to set up a specified PCI BAR. But PCI BAR allocation takes place entirely within PCI space, so doesn't really need per-backend versions. For example, Linux includes generic BAR allocation code used on

[Qemu-devel] [PATCHv4 02/11] libqos: Handle PCI IO de-multiplexing in common code

2016-10-20 Thread David Gibson
The PCI IO space (aka PIO, aka legacy IO) and PCI memory space (aka MMIO) are distinct address spaces by the PCI spec (although parts of one might be aliased to parts of the other in some cases). However, qpci_io_read*() and qpci_io_write*() can perform accesses to either space depending on

Re: [Qemu-devel] [PATCH 0/3] ppc/xics: interface cleanups

2016-10-20 Thread David Gibson
On Tue, Oct 18, 2016 at 10:06:31AM +0200, Cédric Le Goater wrote: > Hello, > > Here are a couple of changes removing duplicated code and modifying > the remaining icp_ routines still using a 'XICSState *' as argument. Applied to ppc-for-2.8, thanks. > > Thanks, > > C. > > Cédric Le Goater

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread David Gibson
On Thu, Oct 20, 2016 at 02:06:08PM -0600, Alex Williamson wrote: > [cc +david] > > On Thu, 20 Oct 2016 22:17:18 +0300 > "Aviv B.D." wrote: > > > On Mon, Oct 17, 2016 at 7:07 PM, Alex Williamson > > wrote: > > > > > On Mon, 17 Oct 2016 18:44:21

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/3] ppc: allow system reset interrupt to be delivered to guests

2016-10-20 Thread David Gibson
On Fri, Oct 21, 2016 at 12:40:58AM +1100, Nicholas Piggin wrote: > On Thu, 20 Oct 2016 15:08:07 +0200 > Cédric Le Goater wrote: > > > On 10/20/2016 08:59 AM, Nicholas Piggin wrote: > > > Signed-off-by: Nicholas Piggin > > > --- > > > target-ppc/excp_helper.c |

[Qemu-devel] [PATCHv4 06/11] libqos: Add streaming accessors for PCI MMIO

2016-10-20 Thread David Gibson
Currently PCI memory (aka MMIO) space is accessed via a set of readb/writeb style accessors. This is what we want for accessing discrete registers of a certain size. However, there are a few cases where we instead need a "bag of bytes" style streaming interface to PCI MMIO space. This can be

Re: [Qemu-devel] [PATCH 1/3] ppc: fix MSR_ME handling for system reset interrupt

2016-10-20 Thread David Gibson
On Thu, Oct 20, 2016 at 05:59:10PM +1100, Nicholas Piggin wrote: > Power ISA specifies ME bit handling for system reset interrupt: > > if the interrupt occurred while the thread was in power-saving > mode, set to 1; otherwise not altered > > Signed-off-by: Nicholas Piggin

[Qemu-devel] [PATCHv4 05/11] tests: Adjust tco-test to use qpci_legacy_iomap()

2016-10-20 Thread David Gibson
Avoid tco-test making assumptions about the internal format of the address tokens passed to PCI IO accessors, by using the new qpci_legacy_iomap() function. Signed-off-by: David Gibson Reviewed-by: Laurent Vivier --- tests/tco-test.c | 2 +- 1

[Qemu-devel] [PATCHv4 01/11] libqos: Give qvirtio_config_read*() consistent semantics

2016-10-20 Thread David Gibson
The 'addr' parameter to qvirtio_config_read*() doesn't have a consistent meaning: when using the virtio-pci versions, it's a full PCI space address, but for virtio-mmio, it's an offset from the device's base mmio address. This means that the callers need to do different things to calculate the

[Qemu-devel] [PATCHv4 00/11] Cleanups to qtest PCI handling

2016-10-20 Thread David Gibson
This series contains a number of cleanups to the libqos code for accessing PCI devices, and to tests which use it. The general aim is to improve the consistency of semantics across functions, and reduce the amount of intimate knowledge of the libqos PCI layer needed by tests. This should make it

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/3] ppc/spapr: implement H_SIGNAL_SYS_RESET

2016-10-20 Thread Nicholas Piggin
On Thu, 20 Oct 2016 18:49:22 +0200 Greg Kurz wrote: > On Thu, 20 Oct 2016 17:59:12 +1100 > Nicholas Piggin wrote: > > > The H_SIGNAL_SYS_RESET hcall allows a guest CPU to raise a system > > reset exception on other CPUs in the same guest. > > > > Actually

[Qemu-devel] Assertion failure on qcow2 disk with cluster_size != 64k

2016-10-20 Thread Ed Swierk
Shortly after I start qemu 2.7.0 with a qcow2 disk image created with -o cluster_size=1048576, it prints the following and dies: block/qcow2.c:2451: qcow2_co_pwrite_zeroes: Assertion `head + count <= s->cluster_size' failed. I narrowed the problem to bdrv_co_do_pwrite_zeroes(), called by

Re: [Qemu-devel] [PATCHv3 08/11] tests: Clean up IO handling in ide-test

2016-10-20 Thread David Gibson
On Thu, Oct 20, 2016 at 11:54:42AM +0200, Laurent Vivier wrote: > > > On 20/10/2016 05:43, David Gibson wrote: > > ide-test uses many explicit inb() / outb() operations for its IO, which > > means it's not portable to non-x86 platforms. This cleans it up to use > > the libqos PCI accessors

Re: [Qemu-devel] [PATCH RFC] tcmu: Introduce qemu-tcmu

2016-10-20 Thread Fam Zheng
On Thu, 10/20 10:21, Andy Grover wrote: > On 10/20/2016 07:30 AM, Fam Zheng wrote: > > On Thu, 10/20 15:08, Stefan Hajnoczi wrote: > > > If a corrupt image is able to execute arbitrary code in the qemu-tcmu > > > process, does /dev/uio0 or the tcmu shared memory interface allow get > > > root or

Re: [Qemu-devel] [PATCH RFC] tcmu: Introduce qemu-tcmu

2016-10-20 Thread Fam Zheng
On Thu, 10/20 15:55, Huamin Chen wrote: > Hi Fam > > Can you push your code to github? I am spoiled with git :) Pushed: https://github.com/famz/qemu qemu-tcmu Fam > > Thanks > > Huamin

Re: [Qemu-devel] [Bug 1630723] [NEW] UART writes to netduino2/stm32f205-soc disappear

2016-10-20 Thread Seth K
I've narrowed this down. In exec.c the address is reduced by section->offset_within_address_space. However, half the time that seems to be wrong. For usart1 at 40011004 it is 40011000, a difference of 4 which signals a usart write. For usart2 at 40004404 it is 4c00, a difference of 3804

[Qemu-devel] [PATCH 4/5] blockjob: add block_job_start

2016-10-20 Thread John Snow
Instead of automatically starting jobs at creation time via backup_start et al, we'd like to return a job object pointer that can be started manually at later point in time. For now, add the block_job_start mechanism and start the jobs automatically as we have been doing, with conversions

[Qemu-devel] [PATCH 5/5] blockjob: refactor backup_start as backup_job_create

2016-10-20 Thread John Snow
Refactor backup_start as backup_job_create, which only creates the job, but does not automatically start it. The old interface, 'backup_start', is not kept in favor of limiting the number of nearly-identical interfaces that would have to be edited to keep up with QAPI changes in the future.

[Qemu-devel] [PATCH 3/5] blockjob: add .start field

2016-10-20 Thread John Snow
Add an explicit start field to specify the entrypoint. We already have ownership of the coroutine itself AND managing the lifetime of the coroutine, let's take control of creation of the coroutine, too. This will allow us to delay creation of the actual coroutine until we know we'll actually

[Qemu-devel] [PATCH 2/5] blockjob: add .clean property

2016-10-20 Thread John Snow
Cleaning up after we have deferred to the main thread but before the transaction has converged can be dangerous and result in deadlocks if the job cleanup invokes any BH polling loops. A job may attempt to begin cleaning up, but may induce another job to enter its cleanup routine. The second job,

[Qemu-devel] [PATCH 1/5] blockjob: fix dead pointer in txn list

2016-10-20 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Though it is not intended to be reached through normal circumstances, if we do not gracefully deconstruct the transaction QLIST, we may wind up with stale pointers in the list. The rest of this series attempts to address the

[Qemu-devel] [PATCH 0/5] jobs: fix transactional race condition

2016-10-20 Thread John Snow
Requires: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1 There are a few problems with transactional job completion right now. First, if jobs complete so quickly they complete before remaining jobs get a chance to join the transaction, the completion mode can leave well

[Qemu-devel] Crashing in tcp_close

2016-10-20 Thread Brian Candler
I have some reproducible-ish segfaults in qemu 2.7.0 (built from source) running under ubuntu 16.04, on a quad-core i7 Mac Mini Server. I can reproduce these problems on a different Mac Mini, and I also replaced the RAM on mine, so I'm sure it's not hardware related. It's somewhat painful to

[Qemu-devel] [Bug 818673] Re: virtio: trying to map MMIO memory

2016-10-20 Thread Thomas Huth
According to comment 41, this bug has been fixed, so I'm setting the status to "Fix released" now ... Vitalis, your problem from comment 46 sounds differently - if it still persists today, please open a new bug ticket for this instead. ** Changed in: qemu Status: New => Fix Released --

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Alex Williamson
On Fri, 21 Oct 2016 02:44:37 +0530 Kirti Wankhede wrote: > On 10/21/2016 2:35 AM, Alex Williamson wrote: > > On Fri, 21 Oct 2016 01:59:55 +0530 > > Kirti Wankhede wrote: > > > >> On 10/21/2016 1:04 AM, Alex Williamson wrote: > >>> On Tue, 18 Oct

Re: [Qemu-devel] [PATCH v4 0/4] fdc: Use separate qdev device for drives

2016-10-20 Thread John Snow
On 10/20/2016 03:55 AM, Kevin Wolf wrote: We have been complaining for a long time about how the floppy controller and floppy drives are combined in a single qdev device and how this makes the device awkward to work with because it behaves different from all other block devices. The latest

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Kirti Wankhede
On 10/21/2016 2:35 AM, Alex Williamson wrote: > On Fri, 21 Oct 2016 01:59:55 +0530 > Kirti Wankhede wrote: > >> On 10/21/2016 1:04 AM, Alex Williamson wrote: >>> On Tue, 18 Oct 2016 02:52:10 +0530 >>> Kirti Wankhede wrote: >>> Function

[Qemu-devel] [PATCH v5 2/3] IOMMU: change iommu_op->translate's is_write to flags, add support to NO_FAIL flag mode

2016-10-20 Thread Aviv B.D
From: "Aviv Ben-David" Supports translation trials without reporting error to guest on translation failure. Signed-off-by: Aviv Ben-David --- exec.c| 3 ++- hw/i386/amd_iommu.c | 4 ++-- hw/i386/intel_iommu.c | 59

[Qemu-devel] [PATCH v5 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-20 Thread Aviv B.D
From: "Aviv Ben-David" Adds a list of registered vtd_as's to intel iommu state to save iteration over each PCI device in a search of the corrosponding domain. Signed-off-by: Aviv Ben-David --- hw/i386/intel_iommu.c | 109

[Qemu-devel] [PATCH v5 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread Aviv B.D
From: "Aviv Ben-David" * Advertize Cache Mode capability in iommu cap register. This capability is controlled by "cache-mode" property of intel-iommu device. To enable this option call QEMU with "-device intel-iommu,cache-mode=true". * On page cache invalidation in intel

[Qemu-devel] [PATCH v5 1/3] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest

2016-10-20 Thread Aviv B.D
From: "Aviv Ben-David" This capability asks the guest to invalidate cache before each map operation. We can use this invalidation to trap map operations in the hypervisor. Signed-off-by: Aviv Ben-David --- hw/i386/intel_iommu.c | 5 +

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Alex Williamson
On Fri, 21 Oct 2016 01:59:55 +0530 Kirti Wankhede wrote: > On 10/21/2016 1:04 AM, Alex Williamson wrote: > > On Tue, 18 Oct 2016 02:52:10 +0530 > > Kirti Wankhede wrote: > > > >> Function vfio_device_api_string() returns string based on flag set in

Re: [Qemu-devel] [PATCH] qemu-ga: Remove stray 'q' in documentation

2016-10-20 Thread Michael Roth
Quoting Stefan Weil (2016-10-20 14:24:38) > Signed-off-by: Stefan Weil Reviewed-by: Michael Roth > --- > qemu-ga.texi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-ga.texi b/qemu-ga.texi > index 0e53bf6..4c7a8fd

[Qemu-devel] [PATCH] fixup! pc: add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs

2016-10-20 Thread Eduardo Habkost
On Thu, Oct 20, 2016 at 04:58:42PM +0200, Igor Mammedov wrote: > Currently firmware uses 1 byte at 0x5F offset in RTC CMOS > to get number of CPUs present at boot. However 1 byte is > not enough to handle more than 255 CPUs. So add a new > fw_cfg file that would allow QEMU to tell it. > For

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Kirti Wankhede
On 10/21/2016 1:04 AM, Alex Williamson wrote: > On Tue, 18 Oct 2016 02:52:10 +0530 > Kirti Wankhede wrote: > >> Function vfio_device_api_string() returns string based on flag set in >> vfio_device_info's flag. This should be used by vendor driver to get string >> based on

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-20 Thread Kirti Wankhede
Alex, Addressing your comments other than invalidation part. On 10/20/2016 2:32 AM, Alex Williamson wrote: > On Tue, 18 Oct 2016 02:52:04 +0530 > Kirti Wankhede wrote: > ... >> Tested by assigning below combinations of devices to a single VM: >> - GPU pass through only

Re: [Qemu-devel] [kvm-unit-tests PATCH v3 07/10] arm/arm64: add initial gicv3 support

2016-10-20 Thread Andre Przywara
Hi Drew, On 15/07/16 14:00, Andrew Jones wrote: > Signed-off-by: Andrew Jones > > --- > v2: configure irqs as NS GRP1 > --- > lib/arm/asm/arch_gicv3.h | 184 ++ > lib/arm/asm/gic-v3.h | 321 > + >

Re: [Qemu-devel] [PATCH] Makefile: Fix help text for target 'installer'

2016-10-20 Thread Michael Roth
Quoting Stefan Weil (2016-10-20 14:36:32) > The NSIS based installer currently does not install qemu-ga. > It installs the executables and other files for the QEMU system emulation. > > Signed-off-by: Stefan Weil Reviewed-by: Michael Roth > --- >

Re: [Qemu-devel] [ndctl PATCH 0/8] dimm label space initialization support

2016-10-20 Thread Dan Williams
On Thu, Oct 20, 2016 at 12:32 PM, Vishal Verma wrote: > On 10/19, Dan Williams wrote: >> The 4.9 kernel added support for sub-dividing PMEM. With this kernel >> patch [1] on top of that baseline, the PMEM-sub-division support can be >> enabled for QEMU-KVM and any other

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread Alex Williamson
[cc +david] On Thu, 20 Oct 2016 22:17:18 +0300 "Aviv B.D." wrote: > On Mon, Oct 17, 2016 at 7:07 PM, Alex Williamson > wrote: > > > On Mon, 17 Oct 2016 18:44:21 +0300 > > "Aviv B.D" wrote: > > > > > From: "Aviv Ben-David"

Re: [Qemu-devel] external usb flash drive support on qemu virtualization

2016-10-20 Thread Kumar Girish
Hi All, I have analysed my code and added the usb configuration while spawning the guest CMM. Unfortunately still the usb is not visible. Could you please help me on this. I added this config "-usb -usbdevice host:090c:1000 " . you can see in the last but one line Following is my config

Re: [Qemu-devel] [PATCHv3 06/11] libqos: Add streaming accessors for PCI MMIO

2016-10-20 Thread Greg Kurz
On Thu, 20 Oct 2016 14:43:09 +1100 David Gibson wrote: > Currently PCI memory (aka MMIO) space is accessed via a set of readb/writeb > style accessors. This is what we want for accessing discrete registers of > a certain size. However, there are a few cases where

[Qemu-devel] [PATCH] Makefile: Fix help text for target 'installer'

2016-10-20 Thread Stefan Weil
The NSIS based installer currently does not install qemu-ga. It installs the executables and other files for the QEMU system emulation. Signed-off-by: Stefan Weil --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Alex Williamson
On Tue, 18 Oct 2016 02:52:10 +0530 Kirti Wankhede wrote: > Function vfio_device_api_string() returns string based on flag set in > vfio_device_info's flag. This should be used by vendor driver to get string > based on flag for device_api attribute. > > Signed-off-by: Kirti

Re: [Qemu-devel] [ndctl PATCH 0/8] dimm label space initialization support

2016-10-20 Thread Vishal Verma
On 10/19, Dan Williams wrote: > The 4.9 kernel added support for sub-dividing PMEM. With this kernel > patch [1] on top of that baseline, the PMEM-sub-division support can be > enabled for QEMU-KVM and any other platforms that advertise both un-aliased > PMEM regions and support for the label DSM

Re: [Qemu-devel] [PATCHv3 03/11] libqos: Move BAR assignment to common code

2016-10-20 Thread Greg Kurz
On Thu, 20 Oct 2016 14:43:06 +1100 David Gibson wrote: > The PCI backends in libqos each supply an iomap() and iounmap() function > which is used to set up a specified PCI BAR. But PCI BAR allocation takes > place entirely within PCI space, so doesn't really need

Re: [Qemu-devel] [PATCH v9 05/12] vfio: Introduce common function to add capabilities

2016-10-20 Thread Alex Williamson
On Tue, 18 Oct 2016 02:52:05 +0530 Kirti Wankhede wrote: > Vendor driver using mediated device framework should use > vfio_info_add_capability() to add capabilities. > Introduced this function to reduce code duplication in vendor drivers. > > Signed-off-by: Kirti Wankhede

Re: [Qemu-devel] [PATCH v9 06/12] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-10-20 Thread Alex Williamson
On Tue, 18 Oct 2016 02:52:06 +0530 Kirti Wankhede wrote: > Update msix_sparse_mmap_cap() to use vfio_info_add_capability() > Update region type capability to use vfio_info_add_capability() > Can't split this commit for MSIx and region_type cap since there is a > common code

[Qemu-devel] [PATCH] qemu-ga: Remove stray 'q' in documentation

2016-10-20 Thread Stefan Weil
Signed-off-by: Stefan Weil --- qemu-ga.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-ga.texi b/qemu-ga.texi index 0e53bf6..4c7a8fd 100644 --- a/qemu-ga.texi +++ b/qemu-ga.texi @@ -30,7 +30,7 @@ set user's password @end itemize qemu-ga will

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread Aviv B.D.
On Mon, Oct 17, 2016 at 7:07 PM, Alex Williamson wrote: > On Mon, 17 Oct 2016 18:44:21 +0300 > "Aviv B.D" wrote: > > > From: "Aviv Ben-David" > > > > * Advertize Cache Mode capability in iommu cap register. > > This

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-20 Thread Aviv B.D.
On Wed, Oct 19, 2016 at 12:33 PM, Peter Xu wrote: > On Mon, Oct 17, 2016 at 06:44:24PM +0300, Aviv B.D wrote: > > From: "Aviv Ben-David" > > > > Adds a list of registered vtd_as's to intel iommu state to save > > iteration over each PCI device in a search

  1   2   3   4   >