Re: [Qemu-devel] [PATCH 4/4] q35: introduce q35-lite

2016-11-14 Thread Chao Peng
On Mon, 2016-11-07 at 18:09 +0100, Paolo Bonzini wrote: > > On 06/11/2016 08:06, Michael S. Tsirkin wrote: > > > > On Sat, Nov 05, 2016 at 03:19:51AM -0400, Chao Peng wrote: > > > > > > > > > > > This patch introduces a light weight machine type which shares > > > > the > > > > same codebase wi

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Vincent Palatin
On Sun, Nov 13, 2016 at 4:20 AM, wrote: > Hi, > > Your series seems to have some coding style problems. See output below for > more information: > > Type: series > Subject: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support > Message-id: cover.1478863621.git.vpala...@chromium.org > > === TEST SCRI

Re: [Qemu-devel] [PATCH 3/3] tests: add XSCOM tests for the PowerNV machine

2016-11-14 Thread Cédric Le Goater
> +static uint64_t pnv_xscom_addr(const PnvChip *chip, uint32_t pcba) > +{ > +uint64_t addr = chip->xscom_base; > + > +if (chip->chip_type == PNV_CHIP_POWER9) { > +return addr | ((uint64_t) pcba << 3); > +} else { > +return addr | (((uint64_t) pcba << 4) & ~0xfful) | T

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 09:21, Vincent Palatin wrote: > On Sun, Nov 13, 2016 at 4:20 AM, wrote: >> Hi, >> >> Your series seems to have some coding style problems. See output below for >> more information: >> >> Type: series >> Subject: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support >> Message-id: cove

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Stefan Weil
On 11/14/16 09:21, Vincent Palatin wrote: On Sun, Nov 13, 2016 at 4:20 AM, wrote: === OUTPUT BEGIN === fatal: unrecognized argument: --no-patch Checking PATCH 1/5: ... fatal: unrecognized argument: --no-patch Checking PATCH 2/5: ... fatal: unrecognized argument: --no-patch Checking PATCH 3/5:

Re: [Qemu-devel] [PATCH V11 1/1] fsdev: add IO throttle support to fsdev devices

2016-11-14 Thread Pradeep Jagadeesh
On 11/12/2016 3:13 PM, Greg Kurz wrote: On Fri, 11 Nov 2016 03:54:27 -0500 Pradeep Jagadeesh wrote: Uses throttling APIs to limit I/O bandwidth and number of operations on the devices which use 9p-local driver. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Alberto Garcia" --- Hi Pradeep,

[Qemu-devel] [PATCH v2 0/4] ppc/pnv: XSCOM fixes and unit tests

2016-11-14 Thread Cédric Le Goater
Hello, Here is a little serie adding some fixes for the XSCOM registers of the POWER9 cores and a unit test. Changes since v1 : - fixed pnv_xscom_addr() for 32bit host systems - replace hweight_long() by ctpop64() Tested on a 32-bit LE system and on 64-bit LE and BE systems. Thanks, C. Cé

[Qemu-devel] [PATCH v2 1/4] ppc/pnv: add a 'xscom_core_base' field to PnvChipClass

2016-11-14 Thread Cédric Le Goater
The XSCOM addresses for the core registers are encoded in a slightly different way on POWER8 and POWER9. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 8 +++- include/hw/ppc/pnv.h | 1 + include/hw/ppc/pnv_xscom.h | 5 ++--- 3 files changed, 10 insertions(+), 4 delet

[Qemu-devel] [PATCH v2 3/4] ppc/pnv: Fix fatal bug on 32-bit hosts

2016-11-14 Thread Cédric Le Goater
From: David Gibson If the pnv machine type is compiled on a 32-bit host, the unsigned long (host) type is 32-bit. This means that the hweight_long() used to calculate the number of allowed cores only considers the low 32 bits of the cores_mask variable, and can thus return 0 in some circumstance

[Qemu-devel] [PATCH v2 2/4] ppc/pnv: fix xscom address translation for POWER9

2016-11-14 Thread Cédric Le Goater
High addresses can overflow the uint32_t pcba variable after the 8byte shift. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_xscom.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index f46646141a96..8da271872f59 100644 --- a/h

[Qemu-devel] [PATCH v2 4/4] tests: add XSCOM tests for the PowerNV machine

2016-11-14 Thread Cédric Le Goater
Add a couple of tests on the XSCOM bus of the PowerNV machine for the the POWER8 and POWER9 CPUs. The first tests reads the CFAM identifier of the chip. The second test goes further in the XSCOM address space and reaches the cores to read their DTS registers. Signed-off-by: Cédric Le Goater ---

Re: [Qemu-devel] [PATCH v2 0/4] ppc/pnv: XSCOM fixes and unit tests

2016-11-14 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v2 0/4] ppc/pnv: XSCOM fixes and unit tests Message-id: 1479114778-3881-1-git-send-email-...@kaod.org === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 t

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Vincent Palatin
On Mon, Nov 14, 2016 at 9:55 AM, Stefan Weil wrote: > On 11/14/16 09:21, Vincent Palatin wrote: >> >> On Sun, Nov 13, 2016 at 4:20 AM, wrote: >>> >>> >>> === OUTPUT BEGIN === >>> fatal: unrecognized argument: --no-patch >>> Checking PATCH 1/5: ... >>> fatal: unrecognized argument: --no-patch >>>

Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Add Intel HAX files

2016-11-14 Thread Stefan Weil
Am 11.11.2016 um 12:28 schrieb Vincent Palatin: [...] > > Signed-off-by: Vincent Palatin > --- > hax-stub.c | 74 +++ > include/sysemu/hax.h| 66 ++ > target-i386/hax-all.c | 1490 > +++ Git warns about a whitespace issu

Re: [Qemu-devel] TCP performance problems - GSO/TSO, MSS, 8139cp related

2016-11-14 Thread Dr. David Alan Gilbert
* Russell King - ARM Linux (li...@armlinux.org.uk) wrote: > On Fri, Nov 11, 2016 at 09:23:43PM +, David Woodhouse wrote: > > It's also *fairly* unlikely that the kernel in the guest has developed > > a bug and isn't setting gso_size sanely. I'm more inclined to suspect > > that qemu isn't prope

Re: [Qemu-devel] [PATCH] tcg/mips: Add support for mips64el backend

2016-11-14 Thread Jin Guojie
Richard, I have studied your V2 patch https://lists.nongnu.org/archive/html/qemu-devel/2016-02/msg02969.html . Though I have not tested this patch on Loongson machine, I feel this patch has implemented MIPS64 ISA very completely, including big/little endian, N32 and N64 ABI. The use of #if is m

Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Add Intel HAX files

2016-11-14 Thread Vincent Palatin
On Mon, Nov 14, 2016 at 10:29 AM, Stefan Weil wrote: > Am 11.11.2016 um 12:28 schrieb Vincent Palatin: > [...] >> >> Signed-off-by: Vincent Palatin >> --- >> hax-stub.c | 74 +++ >> include/sysemu/hax.h| 66 ++ >> target-i386/hax-all.c | 1490 >> ++

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Andrew Jones
On Mon, Nov 14, 2016 at 01:32:56PM +0800, Dave Young wrote: > On 11/09/16 at 04:38pm, Laszlo Ersek wrote: > > On 11/09/16 15:47, Daniel P. Berrange wrote: > > > On Wed, Nov 09, 2016 at 01:20:51PM +0100, Andrew Jones wrote: > > >> On Wed, Nov 09, 2016 at 11:58:19AM +, Daniel P. Berrange wrote: >

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

2016-11-14 Thread Kevin Wolf
Am 24.10.2016 um 22:32 hat Eric Blake geschrieben: > On 10/21/2016 08:14 AM, Ed Swierk wrote: > > On Thu, Oct 20, 2016 at 6:38 PM, Eric Blake wrote: > >> On 10/20/2016 07:24 PM, Ed Swierk wrote: > >>> Changing max_transfer in the normal write case to > >>> MIN_NON_ZERO(alignment, MAX_WRITE_ZEROES_

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-14 Thread Andrew Jones
On Fri, Nov 11, 2016 at 01:55:49PM -0600, Wei Huang wrote: > > > On 11/11/2016 01:43 AM, Andrew Jones wrote: > > On Tue, Nov 08, 2016 at 12:17:14PM -0600, Wei Huang wrote: > >> From: Christopher Covington > >> > >> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, > >> even for

Re: [Qemu-devel] facing issue with qemu amd-v support

2016-11-14 Thread Anand J
Hi, Further investigation to the issue revealed that this happens before the guest OS get to execute. KVM is not able to emulate a PF happened during a jump to 0x4000. Folowing is the trace of instructions at which the emulation error is happening. IN: CR3: b859

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Daniel P. Berrange
On Mon, Nov 14, 2016 at 01:32:56PM +0800, Dave Young wrote: > On 11/09/16 at 04:38pm, Laszlo Ersek wrote: > > On 11/09/16 15:47, Daniel P. Berrange wrote: > > > On Wed, Nov 09, 2016 at 01:20:51PM +0100, Andrew Jones wrote: > > >> On Wed, Nov 09, 2016 at 11:58:19AM +, Daniel P. Berrange wrote: >

Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Add Intel HAX files

2016-11-14 Thread Paolo Bonzini
On 11/11/2016 12:28, Vincent Palatin wrote: > + > +memcpy(env->xmm_regs, fpu.mmx_1, sizeof(fpu.mmx_1)); > +memcpy((ZMMReg *) (env->xmm_regs) + 8, fpu.mmx_2, sizeof(fpu.mmx_2)); HAX will only support SSE (128-bit) registers, while env->xmm_regs supports AVX512 (512-bit) so you have to cop

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Paolo Bonzini
On 09/11/2016 17:01, Daniel P. Berrange wrote: > On Wed, Nov 09, 2016 at 04:38:36PM +0100, Laszlo Ersek wrote: >> On 11/09/16 15:47, Daniel P. Berrange wrote: > That doesn't help with trying to diagnose a crash during boot up, since > the guest agent isn't running till fairly late. I'm al

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 11:10, Daniel P. Berrange wrote: > There's already patches posted to create a virtio-pstore device for > QEMU, which is what led me to suggest this as an option: > > https://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg00381.html It's also possible to use UEFI as a pstore

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Daniel P. Berrange
On Mon, Nov 14, 2016 at 11:28:04AM +0100, Paolo Bonzini wrote: > > > On 14/11/2016 11:10, Daniel P. Berrange wrote: > > There's already patches posted to create a virtio-pstore device for > > QEMU, which is what led me to suggest this as an option: > > > > https://lists.nongnu.org/archive/html

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Paolo Bonzini
On 09/11/2016 16:28, Dave Anderson wrote: > I'm not sure whether this "guest userspace agent" is still in play here, > but if there were such a thing, it could theoretically do the same > thing that crash currently does when running on a live system. > > Both of those are available or calculatab

Re: [Qemu-devel] facing issue with qemu amd-v support

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 11:08, Anand J wrote: > Hi, > > Further investigation to the issue revealed that this happens before the > guest OS get to execute. KVM is not able to emulate a PF happened during a > jump to 0x4000. > > Folowing is the trace of instructions at which the emulation error is > h

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Laszlo Ersek
On 11/14/16 11:33, Daniel P. Berrange wrote: > On Mon, Nov 14, 2016 at 11:28:04AM +0100, Paolo Bonzini wrote: >> >> >> On 14/11/2016 11:10, Daniel P. Berrange wrote: >>> There's already patches posted to create a virtio-pstore device for >>> QEMU, which is what led me to suggest this as an option:

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 11:33, Daniel P. Berrange wrote: > On Mon, Nov 14, 2016 at 11:28:04AM +0100, Paolo Bonzini wrote: >> >> >> On 14/11/2016 11:10, Daniel P. Berrange wrote: >>> There's already patches posted to create a virtio-pstore device for >>> QEMU, which is what led me to suggest this as an opti

Re: [Qemu-devel] [PATCH v2 5/5] Plumb the HAXM-based hardware acceleration support

2016-11-14 Thread Paolo Bonzini
On 11/11/2016 12:28, Vincent Palatin wrote: > +/* > + * In Hax, the qemu allocate the virtual address, and HAX kernel > + * populate the memory with physical memory. Currently we have no > + * paging, so user should make sure enough free memory in a

Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Add Intel HAX files

2016-11-14 Thread Paolo Bonzini
On 11/11/2016 12:28, Vincent Palatin wrote: > + > +memcpy(env->xmm_regs, fpu.mmx_1, sizeof(fpu.mmx_1)); > +memcpy((ZMMReg *) (env->xmm_regs) + 8, fpu.mmx_2, sizeof(fpu.mmx_2)); HAX will only support SSE (128-bit) registers, while env->xmm_regs supports AVX512 (512-bit) so you have to cop

Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Add Intel HAX files

2016-11-14 Thread Vincent Palatin
On Mon, Nov 14, 2016 at 11:15 AM, Paolo Bonzini wrote: > > > On 11/11/2016 12:28, Vincent Palatin wrote: >> + >> +memcpy(env->xmm_regs, fpu.mmx_1, sizeof(fpu.mmx_1)); >> +memcpy((ZMMReg *) (env->xmm_regs) + 8, fpu.mmx_2, sizeof(fpu.mmx_2)); > > HAX will only support SSE (128-bit) registers

Re: [Qemu-devel] [PATCH v2 5/5] Plumb the HAXM-based hardware acceleration support

2016-11-14 Thread Vincent Palatin
On Mon, Nov 14, 2016 at 12:56 PM, Paolo Bonzini wrote: > > > On 11/11/2016 12:28, Vincent Palatin wrote: >> +/* >> + * In Hax, the qemu allocate the virtual address, and HAX kernel >> + * populate the memory with physical memory. Currently we have >> no >> +

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Stefan Weil
Am 11.11.2016 um 12:28 schrieb Vincent Palatin: > I took a stab at trying to rebase/upstream the support for Intel HAXM. > (Hardware Accelerated Execution Manager). > Intel HAX is kernel-based hardware acceleration module for Windows and MacOSX. > > I have based my work on the last version of the

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Vincent Palatin
On Mon, Nov 14, 2016 at 1:21 PM, Stefan Weil wrote: > Am 11.11.2016 um 12:28 schrieb Vincent Palatin: >> I took a stab at trying to rebase/upstream the support for Intel HAXM. >> (Hardware Accelerated Execution Manager). >> Intel HAX is kernel-based hardware acceleration module for Windows and >>

[Qemu-devel] [PATCH 1/3] 9pfs: add cleanup operation in FileOperations

2016-11-14 Thread Li Qiang
From: Li Qiang Currently, the backend of VirtFS doesn't have a cleanup function. This will lead resource leak issues if the backed driver allocates resources. This patch addresses this issue. Signed-off-by: Li Qiang --- fsdev/file-op-9p.h | 1 + hw/9pfs/9p.c | 3 +++ 2 files changed, 4 i

[Qemu-devel] [PATCH 2/3] 9pfs: add cleanup operation for handle backend driver

2016-11-14 Thread Li Qiang
From: Li Qiang In the init operation of handle backend dirver, it allocates a handle_data struct and opens a mount file. We should free these resources when the 9pfs device is unrealized. This is what this patch does. Signed-off-by: Li Qiang --- hw/9pfs/9p-handle.c | 8 1 file changed

[Qemu-devel] [PATCH 0/3] add cleanup operation in handle/proxy backend

2016-11-14 Thread Li Qiang
From: Li Qiang Currently, the backend of VirtFS doesn't have a cleanup function. This will leak some resources in handle and proxy backend driver. This patchset addresses this issue. Li Qiang (3): 9pfs: add cleanup operation in FileOperations 9pfs: add cleanup operation for handle backend dr

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Stefan Weil
Am 14.11.2016 um 13:33 schrieb Vincent Palatin: > On Mon, Nov 14, 2016 at 1:21 PM, Stefan Weil wrote: >> >> A full build for Windows needs the patch below to >> fix missing declarations, otherwise it fails with >> compiler warnings and linker errors. > Thanks for filing the gaps. That's very helpf

Re: [Qemu-devel] [QEMU PATCH v2] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-14 Thread Marcelo Tosatti
On Thu, Nov 10, 2016 at 06:57:21PM +0100, Paolo Bonzini wrote: > > > On 10/11/2016 12:48, Marcelo Tosatti wrote: > > Destination has to run the following logic: > > > > If (source has KVM_CAP_ADVANCE_CLOCK) > > use KVM_GET_CLOCK value > > Else > >read pvclock from guest > > > > To suppo

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Stefan Weil
Am 11.11.2016 um 12:28 schrieb Vincent Palatin: [...] > I have tested the end result on a Windows 10 Pro machine (with UG support) > with the Intel HAXM module 6.0.4 and a large ChromiumOS x86_64 image to > exercise various code paths. It looks stable. > I also did a quick regression testing of the

[Qemu-devel] [PATCH 3/3] 9pfs: add cleanup operation for proxy backend driver

2016-11-14 Thread Li Qiang
From: Li Qiang In the init operation of proxy backend dirver, it allocates a V9fsProxy struct and some other resources. We should free these resources when the 9pfs device is unrealized. This is what this patch does. Signed-off-by: Li Qiang --- hw/9pfs/9p-proxy.c | 10 ++ 1 file change

[Qemu-devel] [qemu patch 0/2] improve kvmclock difference on migration

2016-11-14 Thread Marcelo Tosatti
See patches for details.

[Qemu-devel] [PATCH] hw/misc/ivshmem:fix misconfig of not_legacy_32bit

2016-11-14 Thread Zhuangyanying
From: ZhuangYanying After "ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem", ivshmem_64bit renamed to not_legacy_32bit, and changed the implementation of this property. Then use64 = not_legacy_32bit = 1, then PCI attribute configuration ~ PCI_BASE_ADDRESS_MEM_TYPE_64 (default for iv

[Qemu-devel] [qemu patch 1/2] kvm: sync linux headers

2016-11-14 Thread Marcelo Tosatti
Import KVM_CLOCK_TSC_STABLE. Signed-off-by: Marcelo Tosatti diff --git a/include/standard-headers/linux/input.h b/include/standard-headers/linux/input.h index 7361a16..b472b85 100644 --- a/include/standard-headers/linux/input.h +++ b/include/standard-headers/linux/input.h @@ -245,6 +245,7 @@ st

[Qemu-devel] virtIO question

2016-11-14 Thread zhun...@gmail.com
I have a question about qemu.is it a bug in qemu version 1.2? in qemu version 1.2 ,it set avail event by the code : if (vq->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) { vring_avail_event(vq, vring_avail_idx(vq)); } and in version 2.7 the code is if (virtio_vdev_has_fe

[Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Marcelo Tosatti
Check for KVM_CAP_ADJUST_CLOCK capability KVM_CLOCK_TSC_STABLE, which indicates that KVM_GET_CLOCK returns a value as seen by the guest at that moment. For new machine types, use this value rather than reading from guest memory. This reduces kvmclock difference on migration from 5s to 0.1s (when

[Qemu-devel] qemu 2.6.2: e1000 network card hanging after live migration

2016-11-14 Thread Peter Lieven
Hi, I have observed a virtual server with an e1000 network card loosing network connectivity after live migration (not reproducible so far). In the log of the vServer I found several messages like: kernel: [13833656.832108] e1000 :00:05.0 eth2: Reset adapter When I restarted the vServer

Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support

2016-11-14 Thread Vincent Palatin
On Mon, Nov 14, 2016 at 1:36 PM, Stefan Weil wrote: > Am 11.11.2016 um 12:28 schrieb Vincent Palatin: > [...] >> I have tested the end result on a Windows 10 Pro machine (with UG support) >> with the Intel HAXM module 6.0.4 and a large ChromiumOS x86_64 image to >> exercise various code paths. It

Re: [Qemu-devel] [PATCH 07/13] virtio-scsi: always use dataplane path if ioeventfd is active

2016-11-14 Thread Paolo Bonzini
On 11/11/2016 22:03, Alex Williamson wrote: > On Fri, 11 Nov 2016 21:24:33 +0100 > Paolo Bonzini wrote: >> If you can post a backtrace of all threads at the time of the hang, from >> origin/master (so without vhost, and not at ad07cd6) that could help. > > Yes, it occurs with all of the vfio de

Re: [Qemu-devel] Crashing in tcp_close

2016-11-14 Thread Stefan Hajnoczi
On Sun, Nov 13, 2016 at 11:55:16AM +, Brian Candler wrote: > On 12/11/2016 10:44, Samuel Thibault wrote: > > Oops, sorry, my patch was completely bogus, here is a proper one. > > Excellent. > > I've run the original build process 18 times (each run takes about 25 > minutes) without valgrind,

Re: [Qemu-devel] [RFC 0/3] aio: experimental virtio-blk polling mode

2016-11-14 Thread Fam Zheng
On Fri, 11/11 13:59, Karl Rister wrote: > > Stefan > > I ran some quick tests with your patches and got some pretty good gains, > but also some seemingly odd behavior. > > These results are for a 5 minute test doing sequential 4KB requests from > fio using O_DIRECT, libaio, and IO depth of 1. T

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 13:36, Marcelo Tosatti wrote: > +/* local (running VM) restore */ > +if (s->clock_valid) { > +/* > + * if host does not support reliable KVM_GET_CLOCK, > + * read kvmclock value from memory > + */ > +if (!kv

Re: [Qemu-devel] [PATCH v2] qapi-schema: clarify 'colo' state for MigrationStatus

2016-11-14 Thread Stefan Hajnoczi
On Mon, Nov 14, 2016 at 10:36:45AM +0800, Hailiang Zhang wrote: > ping ? > > Anyone pick this up? The original patch that added these lines went through Amit Shah and David Gilbert. I have CCed them. Stefan signature.asc Description: PGP signature

Re: [Qemu-devel] virtIO question

2016-11-14 Thread Stefan Hajnoczi
On Sat, Nov 12, 2016 at 04:43:21PM +0800, zhun...@gmail.com wrote: > Thanks,the expression is not the key problem,I just write it wrong,the key > problem is that what I get from the code is everytime dirver add a sg ,it > will call virtqueue_kick,such as network driver,in start_xmit function ,it

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Marcelo Tosatti
On Mon, Nov 14, 2016 at 02:54:38PM +0100, Paolo Bonzini wrote: > > > On 14/11/2016 13:36, Marcelo Tosatti wrote: > > +/* local (running VM) restore */ > > +if (s->clock_valid) { > > +/* > > + * if host does not support reliable KVM_GET_CLOCK, > > +

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Juan Quintela
Marcelo Tosatti wrote: > Check for KVM_CAP_ADJUST_CLOCK capability KVM_CLOCK_TSC_STABLE, which > indicates that KVM_GET_CLOCK returns a value as seen by the guest at > that moment. > > For new machine types, use this value rather than reading > from guest memory. > > This reduces kvmclock differe

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Juan Quintela
Paolo Bonzini wrote: > On 14/11/2016 13:36, Marcelo Tosatti wrote: >> +/* local (running VM) restore */ >> +if (s->clock_valid) { >> +/* >> + * if host does not support reliable KVM_GET_CLOCK, >> + * read kvmclock value from memory >> +

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 07/11] arm/arm64: gicv2: add an IPI test

2016-11-14 Thread Andrew Jones
On Fri, Nov 11, 2016 at 02:13:31PM +0100, Andrew Jones wrote: > On Fri, Nov 11, 2016 at 11:13:46AM +, Andre Przywara wrote: > > Hi, > > > > more a comment loosely related to this patch ... > > > > > diff --git a/arm/unittests.cfg b/arm/unittests.cfg > > > index 3f6fa45c587e..68bf5cd6008f 1006

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 15:00, Marcelo Tosatti wrote: > On Mon, Nov 14, 2016 at 02:54:38PM +0100, Paolo Bonzini wrote: >> >> >> On 14/11/2016 13:36, Marcelo Tosatti wrote: >>> +/* local (running VM) restore */ >>> +if (s->clock_valid) { >>> +/* >>> + * if host does n

[Qemu-devel] [PATCH RFC v2 2/2] ARM: KVM: Enable in-kernel timers with user space gic

2016-11-14 Thread Alexander Graf
When running with KVM enabled, you can choose between emulating the gic in kernel or user space. If the kernel supports in-kernel virtualization of the interrupt controller, it will default to that. If not, if will default to user space emulation. Unfortunately when running in user mode gic emulat

[Qemu-devel] [PATCH RFC v2 0/2] Enable cp15 timers with user space gic & kvm

2016-11-14 Thread Alexander Graf
When running with KVM enabled, you can choose between emulating the gic in kernel or user space. If the kernel supports in-kernel virtualization of the interrupt controller, it will default to that. If not, if will default to user space emulation. Unfortunately when running in user mode gic emulat

[Qemu-devel] [PATCH RFC v2 1/2] linux-headers: update

2016-11-14 Thread Alexander Graf
This patch updates the Linux headers to include the in-progress user space ARM timer patches. It is explicitly RFC, as the patches are not merged yet. --- linux-headers/asm-arm/kvm.h | 1 + linux-headers/asm-arm64/kvm.h | 1 + linux-headers/linux/kvm.h | 6 ++ 3 files changed, 8 insertio

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Marcelo Tosatti
On Mon, Nov 14, 2016 at 03:22:02PM +0100, Paolo Bonzini wrote: > > > On 14/11/2016 15:00, Marcelo Tosatti wrote: > > On Mon, Nov 14, 2016 at 02:54:38PM +0100, Paolo Bonzini wrote: > >> > >> > >> On 14/11/2016 13:36, Marcelo Tosatti wrote: > >>> +/* local (running VM) restore */ > >>> +

Re: [Qemu-devel] [RFC 0/3] aio: experimental virtio-blk polling mode

2016-11-14 Thread Karl Rister
On 11/14/2016 07:53 AM, Fam Zheng wrote: > On Fri, 11/11 13:59, Karl Rister wrote: >> >> Stefan >> >> I ran some quick tests with your patches and got some pretty good gains, >> but also some seemingly odd behavior. >> >> These results are for a 5 minute test doing sequential 4KB requests from >> f

Re: [Qemu-devel] [RFC 0/3] aio: experimental virtio-blk polling mode

2016-11-14 Thread Christian Borntraeger
On 11/09/2016 06:13 PM, Stefan Hajnoczi wrote: > Recent performance investigation work done by Karl Rister shows that the > guest->host notification takes around 20 us. This is more than the "overhead" > of QEMU itself (e.g. block layer). > > One way to avoid the costly exit is to use polling ins

Re: [Qemu-devel] [RFC 0/3] aio: experimental virtio-blk polling mode

2016-11-14 Thread Christian Borntraeger
On 11/09/2016 06:13 PM, Stefan Hajnoczi wrote: > Recent performance investigation work done by Karl Rister shows that the > guest->host notification takes around 20 us. This is more than the "overhead" > of QEMU itself (e.g. block layer). > > One way to avoid the costly exit is to use polling ins

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 15:50, Marcelo Tosatti wrote: > Well, i didnt want to mix the meaning of the variables: > > +/* whether machine supports reliable KVM_GET_CLOCK */ > +bool mach_use_reliable_get_clock; > + > +/* whether source host supported reliable KVM_GET_CLOCK */ > +bool src_use_

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-14 Thread Stefan Hajnoczi
On Wed, Sep 28, 2016 at 10:45 PM, Stefan Hajnoczi wrote: > On Tue, Sep 27, 2016 at 09:09:49PM -0700, Ashish Mittal wrote: > > Review of .bdrv_open() and .bdrv_aio_writev() code paths. > > The big issues I see in this driver and libqnio: > > 1. Showstoppers like broken .bdrv_open() and leaking memo

Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2016-11-14 Thread Stefan Hajnoczi
On Mon, Nov 07, 2016 at 04:59:44PM -0800, Ashish Mittal wrote: > Source code for the qnio library that this code loads can be downloaded from: > https://github.com/MittalAshish/libqnio.git > > Sample command line using the JSON syntax: > ./qemu-system-x86_64 -name instance-0008 -S -vnc 0.0.0.0

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-14 Thread Christopher Covington
Hi Drew, Wei, On 11/14/2016 05:05 AM, Andrew Jones wrote: > On Fri, Nov 11, 2016 at 01:55:49PM -0600, Wei Huang wrote: >> >> >> On 11/11/2016 01:43 AM, Andrew Jones wrote: >>> On Tue, Nov 08, 2016 at 12:17:14PM -0600, Wei Huang wrote: From: Christopher Covington Ensure that reads o

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm/arm64: add initial gicv3 support

2016-11-14 Thread Andrew Jones
On Fri, Nov 11, 2016 at 04:31:36PM +, Andre Przywara wrote: > Hi, > > On 10/11/16 17:21, Andrew Jones wrote: > > Signed-off-by: Andrew Jones > > > > --- > > v5: use modern register names [Andre] > > v4: > > - only take defines from kernel we need now [Andre] > > - simplify enable by not ca

Re: [Qemu-devel] [RFC 0/3] aio: experimental virtio-blk polling mode

2016-11-14 Thread Stefan Hajnoczi
On Fri, Nov 11, 2016 at 01:59:25PM -0600, Karl Rister wrote: > On 11/09/2016 11:13 AM, Stefan Hajnoczi wrote: > > Recent performance investigation work done by Karl Rister shows that the > > guest->host notification takes around 20 us. This is more than the > > "overhead" > > of QEMU itself (e.g.

Re: [Qemu-devel] [RFC 0/3] aio: experimental virtio-blk polling mode

2016-11-14 Thread Paolo Bonzini
On 14/11/2016 16:26, Stefan Hajnoczi wrote: > On Fri, Nov 11, 2016 at 01:59:25PM -0600, Karl Rister wrote: >> QEMU_AIO_POLL_MAX_NS IOPs >>unset31,383 >>146,860 >>246,440 >>435,246 >>

Re: [Qemu-devel] [RFC 0/3] aio: experimental virtio-blk polling mode

2016-11-14 Thread Karl Rister
On 11/14/2016 09:26 AM, Stefan Hajnoczi wrote: > On Fri, Nov 11, 2016 at 01:59:25PM -0600, Karl Rister wrote: >> On 11/09/2016 11:13 AM, Stefan Hajnoczi wrote: >>> Recent performance investigation work done by Karl Rister shows that the >>> guest->host notification takes around 20 us. This is more

Re: [Qemu-devel] [PATCH v11 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-14 Thread Alex Williamson
On Mon, 14 Nov 2016 13:22:08 +0530 Kirti Wankhede wrote: > On 11/9/2016 2:58 AM, Alex Williamson wrote: > > On Wed, 9 Nov 2016 01:29:19 +0530 > > Kirti Wankhede wrote: > > > >> On 11/8/2016 11:16 PM, Alex Williamson wrote: > >>> On Tue, 8 Nov 2016 21:56:29 +0530 > >>> Kirti Wankhede wrote:

Re: [Qemu-devel] [PULL 0/1] UUID test fix patch for 2.8

2016-11-14 Thread Stefan Hajnoczi
On Fri, Nov 11, 2016 at 09:01:41PM +0800, Fam Zheng wrote: > The following changes since commit 6bbcb76301a72dc80c8d29af13d40bb9a759c9c6: > > MAINTAINERS: Remove obsolete stable branches (2016-11-10 15:29:59 +) > > are available in the git repository at: > > g...@github.com:famz/qemu tag

Re: [Qemu-devel] [PATCH for-2.8 0/2] pc: remove redundant fw_cfg file "etc/boot-cpus"

2016-11-14 Thread Stefan Hajnoczi
On Fri, Nov 11, 2016 at 04:21:10PM +0100, Igor Mammedov wrote: > > Commit 080ac219cc7d9c55adf925c3545b7450055ad625 >pc: Add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs > > added "etc/boot-cpus" fw_cfg file durung 2.8 merge window, however > QEMU alredy had similar legacy F

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Marcelo Tosatti
On Mon, Nov 14, 2016 at 04:00:38PM +0100, Paolo Bonzini wrote: > > > On 14/11/2016 15:50, Marcelo Tosatti wrote: > > Well, i didnt want to mix the meaning of the variables: > > > > +/* whether machine supports reliable KVM_GET_CLOCK */ > > +bool mach_use_reliable_get_clock; > > + > > +

[Qemu-devel] [PATCH v12 05/22] vfio iommu: Added pin and unpin callback functions to vfio_iommu_driver_ops

2016-11-14 Thread Kirti Wankhede
Added APIs for pining and unpining set of pages. These call back into backend iommu module to actually pin and unpin pages. Added two new callback functions to struct vfio_iommu_driver_ops. Backend IOMMU module that supports pining and unpinning pages for mdev devices should provide these functions

[Qemu-devel] [PATCH v12 00/22] Add Mediated device support

2016-11-14 Thread Kirti Wankhede
This series adds Mediated device support to Linux host kernel. Purpose of this series is to provide a common interface for mediated device management that can be used by different devices. This series introduces Mdev core module that creates and manages mediated devices, VFIO based driver for media

[Qemu-devel] [PATCH v12 06/22] vfio iommu type1: Update arguments of vfio_lock_acct

2016-11-14 Thread Kirti Wankhede
Added task structure as input argument to vfio_lock_acct() function. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I5d3673cc9d3786bb436b395d5f74537f1a36da80 --- drivers/vfio/vfio_iommu_type1.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-14 Thread Marcelo Tosatti
On Mon, Nov 14, 2016 at 03:09:46PM +0100, Juan Quintela wrote: > Marcelo Tosatti wrote: > > Check for KVM_CAP_ADJUST_CLOCK capability KVM_CLOCK_TSC_STABLE, which > > indicates that KVM_GET_CLOCK returns a value as seen by the guest at > > that moment. > > > > For new machine types, use this value

[Qemu-devel] [PATCH v12 19/22] docs: Add Documentation for Mediated devices

2016-11-14 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d --- Documentation/vfio-mediated-device.txt | 298 + driver

[Qemu-devel] [PATCH v12 04/22] vfio: Common function to increment container_users

2016-11-14 Thread Kirti Wankhede
This change rearrange functions to have common function to increment container_users Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Reviewed-by: Jike Song Change-Id: I8bdeb352bc8439b107ffd519480fd4dc238677f2 --- drivers/vfio/vfio.c | 34 +- 1 file changed

[Qemu-devel] [PATCH v12 07/22] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-11-14 Thread Kirti Wankhede
Update arguments of vaddr_get_pfn() to take struct mm_struct *mm as input argument. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I885fd4cd4a9f66f4ee2c1caf58267464ec239f52 --- drivers/vfio/vfio_iommu_type1.c | 32 1 file changed, 24 insertions(

[Qemu-devel] [PATCH v12 01/22] vfio: Mediated device Core driver

2016-11-14 Thread Kirti Wankhede
Design for Mediated Device Driver: Main purpose of this driver is to provide a common interface for mediated device management that can be used by different drivers of different devices. This module provides a generic interface to create the device, add it to mediated bus, add device to IOMMU grou

[Qemu-devel] [PATCH v12 20/22] docs: Sysfs ABI for mediated device framework

2016-11-14 Thread Kirti Wankhede
Added details of sysfs ABI for mediated device framework Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Icb0fd4ed58a2fa793fbcb1c3d5009a4403c1f3ac --- Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ 1 file changed, 111 insertions(+) create mode 1

[Qemu-devel] [PATCH v12 08/22] vfio iommu type1: Add find_iommu_group() function

2016-11-14 Thread Kirti Wankhede
Add find_iommu_group() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Reviewed-by: Jike Song Reviewed-by: Dong Jia Shi Change-Id: I9d372f1ebe9eb01a5a21374b8a2b03f7df73601f --- drivers/vfio/vfio_iommu_type1.c | 57 - 1 file changed, 33 insertions(

[Qemu-devel] [PATCH v12 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-14 Thread Kirti Wankhede
Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers about DMA_UNMAP. Exported two APIs vfio_register_notifier() and vfio_unregister_notifier(). Notifier should be registered, if external user wants to use vfio_pin_pages()/vfio_unpin_pages() APIs to pin/unpin pages. Vendor driver

[Qemu-devel] [PATCH v12 02/22] vfio: VFIO based driver for Mediated devices

2016-11-14 Thread Kirti Wankhede
vfio_mdev driver registers with mdev core driver. mdev core driver creates mediated device and calls probe routine of vfio_mdev driver for each device. Probe routine of vfio_mdev driver adds mediated device to VFIO core module This driver forms a shim layer that pass through VFIO devices operation

[Qemu-devel] [PATCH v12 22/22] MAINTAINERS: Add entry VFIO based Mediated device drivers

2016-11-14 Thread Kirti Wankhede
Adding myself as a maintainer of mediated device framework, a sub module of VFIO. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I58f6717783e0d4008ca31f4a5c4494696bae8571 --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS inde

[Qemu-devel] [PATCH v12 18/22] vfio: Define device_api strings

2016-11-14 Thread Kirti Wankhede
Defined device API strings. Vendor driver using mediated device framework should use corresponding string for device_api attribute. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I42d29f475f02a7132ce13297fbf2b48f1da10995 --- include/uapi/linux/vfio.h | 10 ++ 1 file cha

[Qemu-devel] [PATCH v12 03/22] vfio: Rearrange functions to get vfio_group from dev

2016-11-14 Thread Kirti Wankhede
This patch rearranges functions to get vfio_group from device Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Reviewed-by: Jike Song Change-Id: I1f93262bdbab75094bc24b087b29da35ba70c4c6 --- drivers/vfio/vfio.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v12 21/22] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-11-14 Thread Kirti Wankhede
The Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mediated-device.txt | 103 ++- samples/vfio-mdev/Makefile | 13 + sampl

[Qemu-devel] [PATCH v12 16/22] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-14 Thread Kirti Wankhede
Updated vfio_pci.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I9f3daba89d8dba5cb5b01a8cff420412f30686c7 --- drivers/vfio/pci/vfio_pci.c | 34 +++--- 1 file changed, 7 insertions(+), 27 deletions(-)

[Qemu-devel] [PATCH v12 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-14 Thread Kirti Wankhede
Add task structure to vfio_dma structure. During DMA_UNMAP, same task who mapped it or other task who shares same address space is allowed to unmap, otherwise unmap fails. QEMU maps few iova ranges initially, then fork threads and from the child thread calls DMA_UNMAP on previously mapped iova. Sin

Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2016-11-14 Thread Fam Zheng
On Mon, 11/14 15:07, Stefan Hajnoczi wrote: > On Mon, Nov 07, 2016 at 04:59:44PM -0800, Ashish Mittal wrote: > > diff --git a/block/vxhs.c b/block/vxhs.c > > new file mode 100644 > > index 000..8913e8f > > --- /dev/null > > +++ b/block/vxhs.c > > @@ -0,0 +1,689 @@ > > +/* > > + * QEMU Block dri

[Qemu-devel] [PATCH v12 13/22] vfio: Introduce common function to add capabilities

2016-11-14 Thread Kirti Wankhede
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. vfio_info_cap_shift() manipulated a data buffer to add an offset to each element in a chain. This data buffer is documente

  1   2   3   >