[Qemu-devel] [PATCH v3 2/2] target-mips: reimplement SC instruction and use cmpxchg

2016-09-26 Thread Leon Alrae
This patch completely rewrites conditional stores. Now we use cmpxchg and no longer need separate implementations for user and system emulation. Signed-off-by: Leon Alrae Reviewed-by: Richard Henderson --- linux-user/main.c | 58 -- target-mips/cpu.h | 4 -

[Qemu-devel] [PATCH v3 1/2] target-mips: compare virtual addresses in LL/SC sequence

2016-09-26 Thread Leon Alrae
Until now we have been comparing physical addresses in LL/SC sequence. Unfortunately that means that on each SC we have to do the address translation which is a quite complex operation. If we could get rid of it then it would allow us to throw away SC helpers and benefit from having common implemen

[Qemu-devel] [PATCH v3 0/2] target-mips: rework conditional stores for mttcg

2016-09-26 Thread Leon Alrae
These two patches change MIPS conditional stores for mttcg. Version 2 is here: https://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg05005.html v3: * duplicate gen_store_gpr in both branches to avoid tcg_temp_local (Richard) v2: * improved and simplified SC implementation according to Richa

[Qemu-devel] [PATCH v2 5/5] block: keep AioContext pointer in BlockBackend

2016-09-26 Thread Fam Zheng
From: Stefan Hajnoczi blk_get/set_aio_context() delegate to BlockDriverState without storing the AioContext pointer in BlockBackend. There are two flaws: 1. BlockBackend falls back to the QEMU main loop AioContext when there is no root BlockDriverState. This means the drive loses its Aio

[Qemu-devel] [PATCH v2 2/5] blockdev: Move BDS AioContext before inserting to BB

2016-09-26 Thread Fam Zheng
The callers made sure the BDS has no BB attached before, so blk is becoming the sole owner. It is necessary to move the BDS to the right AioContext before inserting it, to keep them in sync. Signed-off-by: Fam Zheng --- blockdev.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/blockd

[Qemu-devel] [PATCH v2 4/5] migration: Set correct AioContext to BlockBackend

2016-09-26 Thread Fam Zheng
The BB is newly created and it should follow the BDS's current context. Signed-off-by: Fam Zheng --- migration/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/block.c b/migration/block.c index ebc10e6..b7365ee 100644 --- a/migration/block.c +++ b/migration/block.c @@ -445,6

[Qemu-devel] [PATCH v2 3/5] block: Introduce and make use of blk_new_with_root

2016-09-26 Thread Fam Zheng
The idiom of "blk_new() + blk_insert_bs()" is common. Use a new BB interface that does both things to make the coming transition that adds AioContext to BB easier. The added blk_new_with_ctx doesn't handle the passed ctx and is purely here to avoid a small code churn. Signed-off-by: Fam Zheng --

[Qemu-devel] [PATCH v2 1/5] blockdev-mirror: Sanity check before moving target_bs AioContext

2016-09-26 Thread Fam Zheng
Similar to blockdev-backup, if the target was already moved to a different AioContext, bad things can happen. This happens when the target belongs to a data plane device. It's a very unlikely case, but let's check it anyway. Signed-off-by: Fam Zheng --- blockdev.c | 35 --

Re: [Qemu-devel] [PATCH] pci-testdev: enhance to support new testcases

2016-09-26 Thread Peter Xu
On Thu, Sep 22, 2016 at 09:23:05PM +0300, Michael S. Tsirkin wrote: > On Thu, Sep 22, 2016 at 02:15:08PM +0800, Peter Xu wrote: > > pci-testdev is used mostly in kvm-unit-test for some eventfd tests. > > However I see it a good framework for other tests as well (e.g., the > > IOMMU unit test in the

[Qemu-devel] [PATCH v2 0/5] block: keep AioContext pointer in BlockBackend

2016-09-26 Thread Fam Zheng
The first patches clean up usage of BlockBackend and changing of its (root's) aio contexts; the last patch is an update of Stefan's previous version rebasing on top of current master. The biggest change from the RFC is that blk_insert_bs callers are responsible to put the BB and BDS on the same con

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-26 Thread Benjamin Herrenschmidt
On Tue, 2016-09-27 at 07:54 +0200, Cédric Le Goater wrote: > > > but I guess if you have the decoding of those "core" registers  > > here as well, then that doesn't make so much sense. Those core registers may well change with P9, we havne't looked closely yet... > yes and there is also the hand

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-26 Thread Cédric Le Goater
On 09/27/2016 04:35 AM, David Gibson wrote: > On Mon, Sep 26, 2016 at 06:11:36PM +0200, Cédric Le Goater wrote: >> On 09/23/2016 04:46 AM, David Gibson wrote: >>> On Thu, Sep 22, 2016 at 10:25:59AM +0200, Cédric Le Goater wrote: >> @@ -493,6 +525,8 @@ static void pnv_chip_power9_class_init(Obje

[Qemu-devel] [PATCH] 9pfs: fix information leak in xattr read

2016-09-26 Thread Li Qiang
From: Li Qiang 9pfs uses g_malloc() to allocate the xattr memory space, if the guest reads this memory before writing to it, this will leak host heap memory to the guest. This patch avoid this. Signed-off-by: Li Qiang --- hw/9pfs/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PATCH] 9pfs: fix potential host memory leak in v9fs_read

2016-09-26 Thread Li Qiang
From: Li Qiang In 9pfs read dispatch function, it doesn't free two QEMUIOVector object thus causing potential memory leak. This patch avoid this. Signed-off-by: Li Qiang --- hw/9pfs/9p.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index d960a2e..b1ff8e7

[Qemu-devel] [PATCH] 9pfs: make illegal path name detection more robust

2016-09-26 Thread Li Qiang
From: Li Qiang The parameter of name_is_illegal can be NULL, adding detection of this to avoid NULL pointer dereference issue. Signed-off-by: Li Qiang --- hw/9pfs/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index dd3145c..d960a2e 100644

[Qemu-devel] [PATCH] 9pfs: fix NULL pointer dereference in v9fs_version

2016-09-26 Thread Li Qiang
From: Li Qiang In 9pfs get version dispatch function, a guest can provide a NULL version string thus causing an NULL pointer dereference issue. This patch fix this issue. Signed-off-by: Li Qiang --- hw/9pfs/9p.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p

Re: [Qemu-devel] [PATCH] tests: Test IPv6 and ppc64 in the PXE tester

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 10:17:46PM +0200, Thomas Huth wrote: > The firmware of the pseries machine, SLOF, is able to load files via > IPv6 networking, too. So to test both, network bootloading on ppc64 > and IPv6 (via Slirp) , let's add some PXE tests for this environment, > too. Since we can not u

Re: [Qemu-devel] [PATCH v2 2/6] intc/i8259: implement InterruptStatsProvider interface

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 10:23:24PM +0200, Hervé Poussineau wrote: > Signed-off-by: Hervé Poussineau > --- > hw/intc/i8259.c | 37 + > 1 file changed, 37 insertions(+) > > diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c > index c2607a5..75c8d22 100644 > --- a/hw

Re: [Qemu-devel] [PATCH v2 0/6] intc: change 'info irq' and 'info pic' to be target-agnostic

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 10:23:22PM +0200, Hervé Poussineau wrote: > Hi, > > This patchset aims at genericizing the 'info irq' and 'info pic' HMP > commands, so > that it is available on all machines and can display details about more than > one > interrupt controller per machine. > > Patch 1 ad

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] libqos: add PPC64 PCI support

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 04:10:46PM +0200, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > tests/Makefile.include | 1 + > tests/libqos/pci-pc.c| 22 > tests/libqos/pci-spapr.c | 280 > +++ > test

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] libqos: add PCI management in qtest_vboot()/qtest_shutdown()

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 04:10:47PM +0200, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > tests/e1000e-test.c | 2 +- > tests/i440fx-test.c | 2 +- > tests/ide-test.c| 2 +- > tests/ivshmem-test.c| 2 +- > tests/libqos/ahci.c | 2 +- >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] libqos: use generic qtest_shutdown()

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 04:10:48PM +0200, Laurent Vivier wrote: > Machine specific shutdown function can be registered by > the machine specific qtest_XXX_boot() if needed. > > So we will not have to test twice the archicture (on boot and on > shutdown) if the test can be run on several architectu

Re: [Qemu-devel] [Qemu-ppc] [PATCH 4/4] tests: enable ohci/uhci/xhci tests on PPC64

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 04:10:49PM +0200, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > tests/Makefile.include| 8 +++- > tests/libqos/usb.c| 14 ++ > tests/usb-hcd-uhci-test.c | 24 > 3 files changed, 37 insertions(+), 9 delet

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] tests: enable ohci/uhci/xhci tests on PPC64

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 04:10:45PM +0200, Laurent Vivier wrote: > This series enables USB tests on PPC64, and for > that implements libqos SPAPR PCI support. I have a few comments on various patches in the series, but overall it looks like a good idea. Anyone have any objection to me taking this

Re: [Qemu-devel] [Qemu-ppc] How to add my implementation of the fmadds instruction to QEMU

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 09:05:22PM -0400, G 3 wrote: > I made my own experimental implementation of the fmadds instruction that I > would like to add to QEMU. How would I do this? > > My implementation would probably look like this: > > void fmadds(float *frD, float frA, float frC, float frB) > {

[Qemu-devel] [Bug 1626972] Re: QEMU memfd_create fallback mechanism change for security drivers

2016-09-26 Thread Rafael David Tinoco
I'll follow to see if patch was accepted upstream: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg06191.html https://www.mail-archive.com/qemu-devel@nongnu.org/msg400892.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

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

2016-09-26 Thread Rafael David Tinoco
Commit: 35f9b6ef3acc9d0546c395a566b04e63ca84e302 added a fallback mechanism for systems not supporting memfd_create syscall (started being supported since 3.17). Backporting memfd_create might not be accepted for distros relying on older kernels. Nowadays there is no way for security driver to dis

Re: [Qemu-devel] [PATCH]MC146818 RTC: Get correct guest time when irq coalesced

2016-09-26 Thread zhong...@sangfor.com.cn
>No, it's not seconds. It depends on the interval of the periodic interrupt. > >In any case this approach is not acceptable, unfortunately; it causes >the time to go backwards for the guest as soon as an interrupt is coalesced. > >What is the guest that you're seeing issues with? Yes, it's leng

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-26 Thread Yuanhan Liu
On Mon, Sep 26, 2016 at 10:24:55PM +0300, Michael S. Tsirkin wrote: > On Mon, Sep 26, 2016 at 11:01:58AM -0700, Stephen Hemminger wrote: > > I assume that if using Version 1 that the bit will be ignored Yes, but I will just quote what you just said: what if the guest virtio device is a legacy devi

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

2016-09-26 Thread Rafael David Tinoco
Commit: 35f9b6ef3acc9d0546c395a566b04e63ca84e302 added a fallback mechanism for systems not supporting memfd_create syscall (started being supported since 3.17). Backporting memfd_create might not be accepted for distros relying on older kernels. Nowadays there is no way for security driver to dis

Re: [Qemu-devel] [PATCH] spapr_vscsi: fix build error introduced by f19661c8

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 03:17:44PM +0100, Felipe Franciosi wrote: > A typo introduced in f19661c8 prevents qemu from building when configured > with --enable-trace-backend=dtrace. > > Signed-off-by: Felipe Franciosi Applied to ppc-for-2.8, thanks. > --- > hw/scsi/spapr_vscsi.c | 2 +- > hw/sc

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 06:11:36PM +0200, Cédric Le Goater wrote: > On 09/23/2016 04:46 AM, David Gibson wrote: > > On Thu, Sep 22, 2016 at 10:25:59AM +0200, Cédric Le Goater wrote: > @@ -493,6 +525,8 @@ static void pnv_chip_power9_class_init(ObjectClass > *klass, void *data) >

[Qemu-devel] [PATCH V15 10/12] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-09-26 Thread Zhang Chen
We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror) to secondary guest, secondary get it use filter-redirector. Then,pr

[Qemu-devel] [PATCH V15 12/12] docs: Add documentation for COLO-proxy

2016-09-26 Thread Zhang Chen
Introduce the design of COLO-proxy, and how to use it. Signed-off-by: Zhang Chen --- docs/colo-proxy.txt | 188 1 file changed, 188 insertions(+) create mode 100644 docs/colo-proxy.txt diff --git a/docs/colo-proxy.txt b/docs/colo-proxy.txt n

[Qemu-devel] [PATCH V15 00/12] Introduce COLO-Proxy

2016-09-26 Thread Zhang Chen
COLO-proxy is a part of COLO project. COLO project is composed of COLO-frame, COLO-proxy and block-replication. It is used to compare the network package to help COLO decide whether to do checkpoint. With COLO-proxy's help, COLO greatly improves the performance. The filter-redirector, filter-mirro

[Qemu-devel] [PATCH V15 11/12] MAINTAINERS: add maintainer for COLO-proxy

2016-09-26 Thread Zhang Chen
add Zhang Chen and Li zhijian as co-maintainers of COLO-proxy. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b6fb84e..4781f9f 100644 --- a/MAINTAINERS

[Qemu-devel] [PATCH V15 06/12] colo-compare: introduce packet comparison thread

2016-09-26 Thread Zhang Chen
If primary packet is same with secondary packet, we will send primary packet and drop secondary packet, otherwise notify COLO frame to do checkpoint. If primary packet comes but secondary packet does not, after REGULAR_PACKET_CHECK_MS milliseconds we set the primary packet as old_packet,then do a c

[Qemu-devel] [PATCH V15 03/12] net/colo.c: add colo.c to define and handle packet

2016-09-26 Thread Zhang Chen
The net/colo.c is used by colo-compare and filter-rewriter. this can share common data structure like net packet, and other functions. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-compare.c | 114 ++

[Qemu-devel] [PATCH V15 08/12] filter-rewriter: introduce filter-rewriter initialization

2016-09-26 Thread Zhang Chen
Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's tcp connection established successfully. In this module we will rewrite tcp packet's ack to the secondary from primary,and rewrite tcp packet's seq to the primary from secondary. usage: c

[Qemu-devel] [PATCH V15 02/12] colo-compare: introduce colo compare initialization

2016-09-26 Thread Zhang Chen
This a COLO net ascii figure: Primary qemu Secondary qemu +--+ ++ | +--

[Qemu-devel] [PATCH V15 01/12] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-09-26 Thread Zhang Chen
Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Reviewed-by: Daniel P. Berrange --- i

[Qemu-devel] [PATCH V15 05/12] colo-compare: track connection and enqueue packet

2016-09-26 Thread Zhang Chen
In this patch we use kernel jhash table to track connection, and then enqueue net packet like this: + CompareState ++ | | +---+ +---+ +---+ |conn list +--->conn +->conn | +---+ +-

[Qemu-devel] [PATCH V15 07/12] colo-compare: add TCP, UDP, ICMP packet comparison

2016-09-26 Thread Zhang Chen
We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. Less checkpoint more efficiency. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-compare.c | 147 +++

[Qemu-devel] [PATCH V15 09/12] filter-rewriter: track connection and parse packet

2016-09-26 Thread Zhang Chen
We use net/colo.h to track connection and parse packet Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo.c| 14 ++ net/colo.h| 1 + net/filter-rewriter.c | 50 ++ 3 f

[Qemu-devel] [PATCH V15 04/12] Jhash: add linux kernel jhashtable in qemu

2016-09-26 Thread Zhang Chen
Jhash will be used by colo-compare and filter-rewriter to save and lookup net connection info Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- include/qemu/jhash.h | 59 net/colo.h | 1 + 2 files

[Qemu-devel] [PATCH] qemu-img: Allow unmap backing image for zeroed clusters

2016-09-26 Thread Fam Zheng
We already specified BDRV_O_UNMAP when opening images in 'qemu-img commit', but didn't turn on the "unmap" in the active commit job. This patch fixes that so that zeroed clusters in top image can be discarded which is desired in the virt-sparsify use case, where a temporary overlay is created and f

Re: [Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26

2016-09-26 Thread Peter Xu
On Mon, Sep 26, 2016 at 02:19:08PM -0700, Peter Maydell wrote: [...] > I also see this compile failure: > > CCi386-softmmu/hw/i386/amd_iommu.o > /home/petmay01/linaro/qemu-for-merges/hw/i386/amd_iommu.c: In function > ‘amdvi_init’: > /home/petmay01/linaro/qemu-for-merges/hw/i386/amd_iommu.

Re: [Qemu-devel] How does a guest OS differentiate between a Reboot/Shutdown ACPI event

2016-09-26 Thread Srinivasan J
Thank you Paolo for replying. I was able to confirm this. Regards, Srini On Mon, Sep 26, 2016 at 12:40 PM, Paolo Bonzini wrote: > > > On 26/09/2016 04:38, Srinivasan J wrote: >> >> I have Ubuntu 14.04.1 (ubuntu-14.04.1-server-amd64.iso) guest running >> in a KVM host. The host is running Ubuntu

[Qemu-devel] [PATCH] m68k: change default system clock for m5208evb

2016-09-26 Thread Greg Ungerer
The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real ti

[Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-26 Thread G 3
I made my own experimental implementation of the fmadds instruction that I would like to add to QEMU. How would I do this? My implementation would probably look like this: void fmadds(float *frD, float frA, float frC, float frB) { *frD = frA * frC + frB; } I then want to see if this

Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user

2016-09-26 Thread Peter Maydell
On 26 September 2016 at 16:36, Riku Voipio wrote: > On 27 September 2016 at 00:08, Peter Maydell wrote: >> Do you have some examples of the false positives you want >> to suppress here? For new code I would hope that we can >> handle host-arch-specifics by having new files (or just >> new #define

Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user

2016-09-26 Thread Riku Voipio
On 27 September 2016 at 00:08, Peter Maydell wrote: > On 26 September 2016 at 12:58, wrote: >> From: Riku Voipio >> >> Linux-user and bsd-user code needs lots of arch-specific ifdefs, >> so disable the warning. >> >> Signed-off-by: Riku Voipio >> --- >> scripts/checkpatch.pl | 5 +++-- >> 1 f

Re: [Qemu-devel] [Nbd] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Wouter Verhelst
On Mon, Sep 26, 2016 at 03:21:46PM -0500, Eric Blake wrote: > I'd much rather support a single flag that says to zero the entire disk > than to introduce stateful variable-amount shifting. That's almost exactly the opposite of what I said :) Now, I don't feel very strong either way, but what matt

Re: [Qemu-devel] [Qemu-ppc] [PULL 00/44] ppc-for-2.8 queue 20160922

2016-09-26 Thread Alex Bennée
Cédric Le Goater writes: > On 09/24/2016 04:31 PM, Alex Bennée wrote: >> >> David Gibson writes: >> The base containers are 12.04 but there is a Trusty VM and for the >> ThreadSanitizer patches I added the Ubuntu Toolchain PPA which is fairly >> upto date. > > Hello, > > This is a little of to

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

2016-09-26 Thread Kumar Girish
Dear All, I am new to virtualization on Linux. Any help and support is appreciated. Explanation of my current setup Procesor : intel atom linux kernel : 3.10 Virtualization at kernel : KVM Virtualization at application : QEMU 2.7.0 Problem When flash drive(pen drive ) is inserted and mounted, it

[Qemu-devel] [PATCH 3/5] target-i386: Remove has_msr_hv_tsc global variable

2016-09-26 Thread Eduardo Habkost
The global variable is not necessary because we can check cpu->hyperv_time directly. We just need to ensure cpu->hyperv_time will be cleared if the feature is not really being exposed to the guest due to missing KVM_CAP_HYPERV_TIME capability. Signed-off-by: Eduardo Habkost --- target-i386/kvm.

[Qemu-devel] [PATCH 0/5] target-i386: Eliminate unnecessary has_msr_* global variables

2016-09-26 Thread Eduardo Habkost
Some of the has_msr_* global variables are set depending on X86PCU fields and are unnecessary because we can look at the X86CPU object directly. This series eliminates some of them. Eduardo Habkost (5): target-i386: Remove has_msr_mtrr global variable target-i386: Remove has_msr_hv_apic global

[Qemu-devel] [PATCH 4/5] target-i386: Clear KVM CPUID features if KVM is disabled

2016-09-26 Thread Eduardo Habkost
This will ensure all checks for features[FEAT_KVM] in the code will be correct in case the KVM CPUID leaf is completely disabled. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 4 1 file changed, 4 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index db12728..8aa2

[Qemu-devel] [PATCH 5/5] target-i386: Remove has_msr_* global vars for KVM features

2016-09-26 Thread Eduardo Habkost
The global variables are not necessary because we can check KVM feature flags in X86CPU directly. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 4046030..3

[Qemu-devel] [PATCH 1/5] target-i386: Remove has_msr_mtrr global variable

2016-09-26 Thread Eduardo Habkost
The global variable is not necessary because we can check the CPU feature flags directly. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index a0e42b2..5118562 100644 --- a/tar

[Qemu-devel] [PATCH 2/5] target-i386: Remove has_msr_hv_apic global variable

2016-09-26 Thread Eduardo Habkost
The global variable is not necessary because we can check cpu->hyperv_vapic directly. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5118562..031ae90 100644 --- a/target-

Re: [Qemu-devel] [PATCH 15/18] target-riscv: Interrupt Handling

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +if (interruptno + 1) { This is a very odd way to write interruptno != -1. And did you really mean interruptno >= 0? r~

Re: [Qemu-devel] [PATCH 14/18] target-riscv: softmmu/address translation support

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +printf("unassigned address not implemented for riscv\n"); +printf("are you trying to fetch instructions from an MMIO page?\n"); +printf("unassigned Address: %016lX\n", addr); +exit(1); All these printf's (and fprintfs above) are g

Re: [Qemu-devel] [PATCH 2/3] target-arm: add env->tbflags

2016-09-26 Thread Peter Maydell
On 14 September 2016 at 02:56, Paolo Bonzini wrote: > Computing TranslationBlock flags is pretty expensive on ARM, especially > 32-bit. In order to limit the cost we want to cache as many of them > as possible. Therefore, the flags are split in two parts. Static flags > come directly from a new

Re: [Qemu-devel] [PATCH 02/18] target-riscv: Add RISC-V Target stubs inside target-riscv/

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +typedef struct CPURISCVState CPURISCVState; +struct CPURISCVState { +target_ulong gpr[32]; +uint64_t fpr[32]; /* assume both F and D extensions */ +target_ulong PC; +target_ulong load_res; + +target_ulong csr[4096]; /* RISCV CSR

Re: [Qemu-devel] [Qemu-block] [PATCH v3 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above()

2016-09-26 Thread Kashyap Chamarthy
On Mon, Sep 26, 2016 at 05:04:21PM +0200, Kevin Wolf wrote: > Am 19.09.2016 um 22:39 hat Eric Blake geschrieben: [...] > > I typically write this as: > > > > L2 <- L1 <- L0 > > > > (read "L2 backs L1, which in turn backs L0") with the active on the > > right. So I understand the confusion in F

Re: [Qemu-devel] [PATCH 12/18] target-riscv: Add system instructions

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +void helper_fence_i(CPURISCVState *env) +{ +RISCVCPU *cpu = riscv_env_get_cpu(env); +CPUState *cs = CPU(cpu); +/* Flush QEMU's TLB */ +tlb_flush(cs, 1); +/* ARM port seems to not know if this is okay inside a TB + But we n

Re: [Qemu-devel] [PATCH 11/18] target-riscv: Add Double Precision Floating-Point Instructions

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +case OPC_RISC_FSGNJ_D: +/* also OPC_RISC_FSGNJN_D, OPC_RISC_FSGNJX_D */ +if (rm == 0x0) { +gen_helper_fsgnj_d(cpu_fpr[rd], cpu_env, cpu_fpr[rs1], + cpu_fpr[rs2]); +} else if (rm

Re: [Qemu-devel] [PATCH 10/18] target-riscv: Add Single Precision Floating-Point Instructions

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +uint64_t helper_fsgnj_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +{ +frs1 = (frs1 & ~(uint32_t)INT32_MIN) | (frs2 & (uint32_t)INT32_MIN); +return frs1; +} + +uint64_t helper_fsgnjn_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/7] m25p80: add a m25p80_set_rom_storage() routine

2016-09-26 Thread mar.krzeminski
W dniu 26.09.2016 o 10:56, Cédric Le Goater pisze: On 09/26/2016 10:25 AM, KONRAD Frederic wrote: Le 24/09/2016 à 10:55, Edgar E. Iglesias a écrit : On Sat, Sep 24, 2016 at 10:25:39AM +0200, Cédric Le Goater wrote: On 09/23/2016 08:26 PM, mar.krzeminski wrote: Hi Cedric, W dniu 23.09.2016

Re: [Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26

2016-09-26 Thread Peter Maydell
On 26 September 2016 at 06:40, Paolo Bonzini wrote: > The following changes since commit eaff9c4367ac3f7ac44f6c6f4cb7bcd4daa89af5: > > Merge remote-tracking branch 'remotes/lalrae/tags/mips-20160923' into > staging (2016-09-23 15:28:07 +0100) > > are available in the git repository at: > > gi

Re: [Qemu-devel] [PATCH 09/18] target-riscv: Add FMADD, FMSUB, FNMADD, FNMSUB Instructions,

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +/* convert RISC-V rounding mode to IEEE library numbers */ +unsigned int ieee_rm[] = { +float_round_nearest_even, +float_round_to_zero, +float_round_down, +float_round_up, +float_round_ties_away +}; + +/* obtain rm value to use

Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user

2016-09-26 Thread Peter Maydell
On 26 September 2016 at 12:58, wrote: > From: Riku Voipio > > Linux-user and bsd-user code needs lots of arch-specific ifdefs, > so disable the warning. > > Signed-off-by: Riku Voipio > --- > scripts/checkpatch.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/sc

Re: [Qemu-devel] [PULL 00/27] Net patches

2016-09-26 Thread Peter Maydell
On 26 September 2016 at 01:59, Jason Wang wrote: > The following changes since commit 3b71ec8516bb50e9a743645bf139571de0b39f61: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2016-09-23 16:15:33 +0100) > > are available in the git repository at: > > https:/

[Qemu-devel] [PATCH v2 0/6] intc: change 'info irq' and 'info pic' to be target-agnostic

2016-09-26 Thread Hervé Poussineau
Hi, This patchset aims at genericizing the 'info irq' and 'info pic' HMP commands, so that it is available on all machines and can display details about more than one interrupt controller per machine. Patch 1 adds a new interface InterruptStatsProvider, which is used to: - gather statistics for

[Qemu-devel] [PATCH v2 1/6] intc: add an interface to gather statistics/informations on interrupt controllers

2016-09-26 Thread Hervé Poussineau
This interface will be used by HMP commands 'info irq' and 'info pic'. Signed-off-by: Hervé Poussineau --- hw/intc/Makefile.objs | 1 + hw/intc/intc.c | 41 + include/hw/intc/intc.h | 30 ++ 3 files changed, 72 inserti

[Qemu-devel] [PATCH v2 6/6] intc: make HMP 'info irq' and 'info pic' commands available on all targets

2016-09-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hmp-commands-info.hx | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 6a7c476..55d50c4 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -172,8 +172,6 @@ STEXI Show the comm

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Eric Blake
On 09/26/2016 07:51 AM, Paolo Bonzini wrote: >> +- bit 3, `NBD_CMD_FLAG_SHIFT`; This flag is valid for `NBD_CMD_TRIM` and >> + `NBD_CMD_WRITE_ZEROES`. If this flag is set the server shifts request >> + *length* and *offset* left by N bits, where N is defined by >> `NBD_OPT_SHIFT` >> + option o

Re: [Qemu-devel] [PATCH 07/18] target-riscv: Add Loads/Stores, FP Loads/Stores

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: Signed-off-by: Sagar Karandikar --- target-riscv/translate.c | 117 +++ 1 file changed, 117 insertions(+) diff --git a/target-riscv/translate.c b/target-riscv/translate.c index d8044cf..767cdbe 100644 -

[Qemu-devel] [PATCH v2 3/6] intc/slavio_intctl: implement InterruptStatsProvider interface

2016-09-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/intc/slavio_intctl.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c index e82e893..a9acb64 100644 --- a/hw/intc/slavio_intctl.c +++ b/hw/intc/slavio_intctl.c @@ -26,6

[Qemu-devel] [PATCH v2 5/6] intc: make HMP 'info irq' and 'info pic' commands use InterruptStatsProvider interface

2016-09-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hmp-commands-info.hx | 12 - hmp.c | 65 ++ hmp.h | 2 ++ hw/intc/i8259.c| 36 - hw/intc/lm32_pic.c | 31 ---

[Qemu-devel] [PATCH v2 4/6] intc/lm32_pic: implement InterruptStatsProvider interface

2016-09-26 Thread Hervé Poussineau
We have to change the vmstate version due to changes in statistics counters. Signed-off-by: Hervé Poussineau --- hw/intc/lm32_pic.c | 32 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/hw/intc/lm32_pic.c b/hw/intc/lm32_pic.c index 3dad01c..c045b99

[Qemu-devel] [PATCH v2 2/6] intc/i8259: implement InterruptStatsProvider interface

2016-09-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/intc/i8259.c | 37 + 1 file changed, 37 insertions(+) diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c index c2607a5..75c8d22 100644 --- a/hw/intc/i8259.c +++ b/hw/intc/i8259.c @@ -29,6 +29,7 @@ #include "qemu/timer.h" #i

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Eric Blake
On 09/26/2016 07:46 AM, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be > shifted left by several bits. > > This is needed for efficient clearing large regions of th

[Qemu-devel] [PATCH] tests: Test IPv6 and ppc64 in the PXE tester

2016-09-26 Thread Thomas Huth
The firmware of the pseries machine, SLOF, is able to load files via IPv6 networking, too. So to test both, network bootloading on ppc64 and IPv6 (via Slirp) , let's add some PXE tests for this environment, too. Since we can not use the normal x86 boot sector for network boot loading, we use a simp

Re: [Qemu-devel] [PATCH v3 2/3] qapi: auto generate enum value strings

2016-09-26 Thread Eric Blake
On 09/26/2016 05:38 AM, Daniel P. Berrange wrote: > On Mon, Sep 26, 2016 at 06:16:26PM +0800, Lin Ma wrote: >> Automatically generate enum value strings that containing the acceptable >> values. >> (Borrowwed Daniel's code.) s/Borrowwed/Borrowed/ >> >> Signed-off-by: Lin Ma >> --- >> scripts/q

Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user

2016-09-26 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1474919934-21518-1-git-send-email-riku.voi...@linaro.org Subject: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user === TEST SCRIPT BEGIN === #!/

[Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user

2016-09-26 Thread riku . voipio
From: Riku Voipio Linux-user and bsd-user code needs lots of arch-specific ifdefs, so disable the warning. Signed-off-by: Riku Voipio --- scripts/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index dde3f5f..

Re: [Qemu-devel] [PULL v2 00/19] virtio, pc: fixes and features

2016-09-26 Thread Peter Maydell
On 23 September 2016 at 15:04, Michael S. Tsirkin wrote: > The following changes since commit eaff9c4367ac3f7ac44f6c6f4cb7bcd4daa89af5: > > Merge remote-tracking branch 'remotes/lalrae/tags/mips-20160923' into > staging (2016-09-23 15:28:07 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v3 8/9] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error()

2016-09-26 Thread Greg Kurz
On Mon, 26 Sep 2016 17:35:38 +0100 Stefan Hajnoczi wrote: > On Mon, Sep 26, 2016 at 10:34:56AM +0200, Greg Kurz wrote: > > The virtio_scsi_bad_req() function is called when a guest sends a > > request with missing or ill-sized headers. This generally happens > > when the virtio_scsi_parse_req() f

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-26 Thread Michael S. Tsirkin
On Mon, Sep 26, 2016 at 11:01:58AM -0700, Stephen Hemminger wrote: > I assume that if using Version 1 that the bit will be ignored > Therein lies a problem. If dpdk tweaks flags, updating it will break guest migration. One way is to require that users specify all flags fully when creating the vi

[Qemu-devel] [PATCH v1 1/1] cadence_gem: Fix priority queue out of bounds access

2016-09-26 Thread Alistair Francis
There was an error with some of the register implementation assuming there are 16 priority queues supported when the IP only supports 8. This patch corrects the registers to only support 8 queues. Signed-off-by: Alistair Francis Reported-by: Paolo Bonzini --- Thanks to Paolo for pointing this ou

Re: [Qemu-devel] [PATCH 01/18] target-riscv: Add RISC-V target stubs and Maintainer

2016-09-26 Thread Eric Blake
On 09/26/2016 05:56 AM, Sagar Karandikar wrote: > Only files that live outside of target-riscv and hw/riscv, excluding > configure and default-configs changes. > > Signed-off-by: Sagar Karandikar > --- > +++ b/qapi-schema.json > @@ -832,7 +832,7 @@ > # Since: 2.6 > ## > { 'enum': 'CpuInfoArch

Re: [Qemu-devel] [Qemu-block] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-26 Thread John Snow
On 09/26/2016 05:39 AM, Thomas Huth wrote: On 26.09.2016 10:22, Kevin Wolf wrote: Am 23.09.2016 um 18:42 hat John Snow geschrieben: On 09/23/2016 12:09 PM, Thomas Huth wrote: The folder include/hw/ide/ belongs to the IDE section. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file chan

Re: [Qemu-devel] Migration dirty bitmap: should only mark pages as dirty after they have been sent

2016-09-26 Thread Dr. David Alan Gilbert
* Chunguang Li (lichungu...@hust.edu.cn) wrote: > > > > > -原始邮件- > > 发件人: "Dr. David Alan Gilbert" > > 发送时间: 2016年9月26日 星期一 > > 收件人: "Chunguang Li" > > 抄送: qemu-devel@nongnu.org, amit.s...@redhat.com, pbonz...@redhat.com, > > stefa...@redhat.com, quint...@redhat.com > > 主题: Re: [Qemu-

Re: [Qemu-devel] [PATCH v2 1/9] log: Add new IOMMU type

2016-09-26 Thread Edgar E. Iglesias
On Mon, Sep 26, 2016 at 08:54:52AM +0200, Auger Eric wrote: > Hi Edgar, Prem, > > On 25/09/2016 16:58, Edgar E. Iglesias wrote: > > On Tue, Sep 13, 2016 at 01:53:39AM +0530, Prem Mallappa wrote: > >> On Fri, Sep 9, 2016 at 9:06 PM, Auger Eric wrote: > >> > >>> Hi Prem, > >>> > >>> Missing commit

Re: [Qemu-devel] [Qemu-block] [PATCH 0/1] ahci: fix ncq aiocb-related segfault

2016-09-26 Thread John Snow
On 09/26/2016 12:10 PM, Stefan Hajnoczi wrote: On Thu, Sep 22, 2016 at 04:10:39PM -0400, John Snow wrote: Fix ncq_cb to prevent a segfault on sys_reset. John Snow (1): ahci: clear aiocb in ncq_cb hw/ide/ahci.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 Maybe worth adding as a clari

Re: [Qemu-devel] [PATCH] arm-smmu: Fix bug when merging two 32 bit words to form 64 bit word

2016-09-26 Thread Edgar E. Iglesias
On Mon, Sep 26, 2016 at 01:52:22PM +, Paul Kennedy wrote: > From 7bf015d76a5b53cd061c91f91fea4427101b26fd Mon Sep 17 00:00:00 2001 > From: Paul Kennedy > Date: Mon, 26 Sep 2016 11:59:00 +0100 > Subject: [PATCH] arm-smmu: Fix bug when merging two 32 bit words to form 64 > bit word > > Fix bug

Re: [Qemu-devel] [PATCH 06/18] target-riscv: Add JALR, Branch Instructions

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: Signed-off-by: Sagar Karandikar --- target-riscv/translate.c | 107 +++ 1 file changed, 107 insertions(+) diff --git a/target-riscv/translate.c b/target-riscv/translate.c index ccfb795..d8044cf 100644 -

Re: [Qemu-devel] [PULL 23/36] cadence_gem: Add queue support

2016-09-26 Thread Alistair Francis
On Mon, Sep 26, 2016 at 4:01 AM, Paolo Bonzini wrote: > > > On 22/09/2016 19:22, Peter Maydell wrote: >> +case GEM_RECEIVE_Q1_PTR ... GEM_RECEIVE_Q15_PTR: >> +s->rx_desc_addr[offset - GEM_RECEIVE_Q1_PTR + 1] = val; >> +break; > > MAX_PRIORITY_QUEUES is still 8, so this can caus

  1   2   3   4   >