Re: [Qemu-devel] [Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 09:08:24PM +, Tian, Kevin wrote: > actually I'm curious whether it's still necessary to __detect__ PCH. Could > we assume a 1:1 mapping between GPU and PCH, e.g. BDW already hard > code the knowledge: > > } else if (IS_BROADWELL(dev)) { >

[Qemu-devel] [PATCH v12 6/6] qcow2: Add falloc and full preallocation option

2014-07-10 Thread Hu Tao
This adds preallocation=falloc and preallocation=full mode to qcow2 image creation. preallocation=full allocates disk space by writing zeros to disk to ensure disk space in any cases. preallocation=falloc likes preallocation=full, but allocates disk space by posix_fallocate(). Signed-off-by: Hu

[Qemu-devel] [PATCH v12 5/6] raw-posix: Add falloc and full preallocation option

2014-07-10 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements falloc and full preallocation. Reviewed-by: Max Reitz Signed-off-by: Hu Tao --- block/raw-posix.c | 88 +++ 1 file changed, 69 insertions(+), 19 deletions(-) diff --git

[Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-07-10 Thread Hu Tao
This series adds two preallocation mode to qcow2 and raw: Option preallocation=full preallocates disk space for image by writing zeros to disk, this ensures disk space in any cases. Option preallocation=falloc preallocates disk space by calling posix_fallocate(). This is faster than preallocation

[Qemu-devel] [PATCH v12 2/6] raw, qcow2: don't convert file size to sector size

2014-07-10 Thread Hu Tao
and avoid converting it back later. Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Hu Tao --- block/qcow2.c | 10 +- block/raw-posix.c | 6 +++--- block/raw-win32.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/block/qcow2.c b/block/q

[Qemu-devel] [PATCH v12 1/6] block: round up file size to nearest sector

2014-07-10 Thread Hu Tao
Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Hu Tao --- block/qcow2.c | 3 ++- block/raw-posix.c | 4 +-- block/raw-win32.c | 4 +-- tests/qemu-iotests/096 | 64 ++ tests/qemu-iotests/096.out | 14

[Qemu-devel] [PATCH v12 4/6] qapi: introduce PreallocMode and a new PreallocMode full.

2014-07-10 Thread Hu Tao
This patch prepares for the subsequent patches. Reviewed-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Max Reitz Signed-off-by: Hu Tao --- block/qcow2.c | 16 qapi/block-core.json | 17 + tests/qemu-iotests/049.out | 2 +- 3 files chan

[Qemu-devel] [PATCH v12 3/6] rename parse_enum_option to qapi_enum_parse and make it public

2014-07-10 Thread Hu Tao
Suggested-by: Markus Armbruster Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Hu Tao --- blockdev.c | 30 ++ include/qapi/util.h | 17 + qapi/Makefile.objs | 1 + qapi/qapi-util.c| 32 4

Re: [Qemu-devel] [PATCH 3/4 v7] ppc: Add software breakpoint support

2014-07-10 Thread Madhavan Srinivasan
On Thursday 10 July 2014 07:49 PM, Bharat Bhushan wrote: > This patch allow insert/remove software breakpoint. > > When QEMU is not able to handle debug exception then we inject program > exception to guest because for software breakpoint QEMU uses a ehpriv-1 > instruction; > So there cannot be an

Re: [Qemu-devel] [PATCH 3/3] ppc/spapr: Fix MAX_CPUS to 255

2014-07-10 Thread Nikunj A Dadhania
Nikunj A Dadhania writes: > MAX_CPUS 256 is inconsistent with qemu supporting upto 255 cpus. This > MAX_CPUS number was percolated back to "virsh capabilities" with wrong > max_cpus. Agraf, ping

Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation

2014-07-10 Thread Sanidhya Kashyap
>> The single precopy lazy pass would consist of clearing the dirty >> bitmap, starting precopy, then if any page is found dirty by the time >> precopy tries to send it, we skip it. We only send those pages in >> precopy that haven't been modified yet by the time we reach them in >> precopy. >> >>

[Qemu-devel] [PATCH] trace: docs: add trace file description

2014-07-10 Thread Chen Fan
When user used the trace print command from docs/tracing.txt: ./scripts/simpletrace.py trace-events trace-* the user maybe be misled by the "trace-*", because if user directly copy the comand line to run, there alway print the bored message: "usage: ./scripts/simpletrace.py " then we should de

[Qemu-devel] [PATCH] block/quorum: add simple read pattern support

2014-07-10 Thread Liu Yuan
This patch adds single read pattern to quorum driver and quorum vote is default pattern. For now we do a quorum vote on all the reads, it is designed for unreliable underlying storage such as non-redundant NFS to make sure data integrity at the cost of the read performance. For some use cases as

Re: [Qemu-devel] [PATCH] SIOCGIFINDEX: fix typo

2014-07-10 Thread Joakim Tjernlund
Joakim Tjernlund/Transmode wrote on 2014/07/11 03:45:27: > > Joakim Tjernlund wrote on 2014/07/11 03:02:02: > > > > Wrong type was used in ioctl definition. > > > > Signed-off-by: Joakim Tjernlund > > --- > > > > However, this does not fix my dhcp problem: > > > > jocke-ppc ~ # busybox udh

Re: [Qemu-devel] Which method executes the translated blocks (TBs)?

2014-07-10 Thread Anderson Sartor
So, the only test I need to make to be sure that a given TB was completely executed is to check the two lowest bits of next_tb (after tcg_qemu_tb_exec() call), and, if they are not equal to 2 or 3, then the TB finished its execution (if it has 0 or 1 on the 2 lowest bits)? And in the next iteration

Re: [Qemu-devel] [PATCH] SIOCGIFINDEX: fix typo

2014-07-10 Thread Joakim Tjernlund
Joakim Tjernlund wrote on 2014/07/11 03:02:02: > > Wrong type was used in ioctl definition. > > Signed-off-by: Joakim Tjernlund > --- > > However, this does not fix my dhcp problem: > > jocke-ppc ~ # busybox udhcpc -v > Adapter index 24 > MAC fe:22:44:22:55:77 > udhcpc (v1.21.0) started > E

Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation

2014-07-10 Thread Dr. David Alan Gilbert
* Andrea Arcangeli (aarca...@redhat.com) wrote: > On Thu, Jul 10, 2014 at 02:37:43PM +0100, Dr. David Alan Gilbert wrote: > > * Eric Blake (ebl...@redhat.com) wrote: > > > Is there any need for an > > > event telling libvirt that enough pre-copy has occurred to make a > > > postcopy worthwhile? > >

[Qemu-devel] [PATCH] PPC: mac99: Move NVRAM to page boundary when necessary

2014-07-10 Thread Alexander Graf
When running KVM we have to adhere to host page boundaries for memory slots. Unfortunately the NVRAM on mac99 is a 4k RAM hole inside of an MMIO flash area. So if our host is configured with 64k page size, we can't use the mac99 target with KVM. This is a real shame, as this limitation is not real

[Qemu-devel] [PATCH 102/156] dmg: coding style and indentation cleanup

2014-07-10 Thread Michael Roth
From: Stefan Hajnoczi Clean up the mix of tabs and spaces, as well as the coding style violations in block/dmg.c. There are no semantic changes since this patch simply reformats the code. This patch is necessary before we can make meaningful changes to this file, due to the inconsistent formatt

Re: [Qemu-devel] [PATCH] linux-aio: fix submit aio as a batch

2014-07-10 Thread Paolo Bonzini
Il 08/07/2014 17:45, Ming Lei ha scritto: -/* empty io queue */ -s->io_q.idx = 0; +ret = io_submit(s->ctx, len, s->io_q.iocbs); +if (ret == -EAGAIN) { +event_notifier_set(&s->retry); +return 0; You can use a bottom half instead of this event notifier. Paolo

[Qemu-devel] [PATCH v3 2.1 0/4] Suppress error action on r/w beyond end

2014-07-10 Thread Markus Armbruster
When a device model's I/O operation fails, we execute the error action. This lets layers above QEMU implement thin provisioning, or attempt to correct errors before they reach the guest. But when the I/O operation fails because its invalid, reporting the error to the guest is the only sensible ac

Re: [Qemu-devel] [PATCH for-2.1] test-string-output-visitor: Fix unterminated string

2014-07-10 Thread Kevin Wolf
Am 10.07.2014 um 03:41 hat Eric Blake geschrieben: > On 07/09/2014 08:14 AM, Kevin Wolf wrote: > > Don't forget to add a terminating '\0' or the test case will be randomly > > failing. The broken code was added in commit b4900c0e. > > Sorry, but I prefer this solution better: > https://lists.gnu.o

[Qemu-devel] [PULL for-2.1 06/22] AioContext: speed up aio_notify

2014-07-10 Thread Kevin Wolf
From: Paolo Bonzini In many cases, the call to event_notifier_set in aio_notify is unnecessary. In particular, if we are executing aio_dispatch, or if aio_poll is not blocking, we know that we will soon get to the next loop iteration (if necessary); the thread that hosts the AioContext's event lo

[Qemu-devel] [PATCH 1/4 v7] ppc: debug stub: Get trap instruction opcode from KVM

2014-07-10 Thread Bharat Bhushan
Get trap instruction opcode from KVM and this opcode will be used for setting software breakpoint in following patch Signed-off-by: Bharat Bhushan --- v6->v7 - No change target-ppc/kvm.c | 4 1 file changed, 4 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 2d87108..

[Qemu-devel] [PATCH] Tap: fix vcpu long time io blocking on tap

2014-07-10 Thread Wangkai (Kevin,C)
When used a tap as net driver for vm, if too many packets was delivered to the guest os via tap interface, the guest os will be blocked on io events for a long time, while tap driver was busying process packets. kvm vcpu thread block on io lock call trace: __lll_lock_wait _L_lock_1004 __pth

[Qemu-devel] [RFC 09/25] accel: Move Xen registration code to xen-common.c

2014-07-10 Thread Eduardo Habkost
Note that this has an user-visible side-effect: instead of reporting "Xen is not supported for this target", QEMU binaries not supporting Xen will report "xen accelerator does not exist". As xen_available() always return 1 when CONFIG_XEN is enabled, we don't need to set AccelClass.available anymo

Re: [Qemu-devel] another locking issue in current dataplane code?

2014-07-10 Thread Paolo Bonzini
Il 08/07/2014 21:07, Christian Borntraeger ha scritto: On 08/07/14 19:08, Paolo Bonzini wrote: Il 08/07/2014 17:59, Stefan Hajnoczi ha scritto: I sent Christian an initial patch to fix this but now both threads are stuck in rfifolock_lock() inside cond wait. That's very strange and should neve

[Qemu-devel] [PATCH 076/156] qemu-iotests: Support for bochs format

2014-07-10 Thread Michael Roth
From: Kevin Wolf Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi (cherry picked from commit 24f3078a049c52070adfc659fc3a1a71a11a7765) Conflicts: tests/qemu-iotests/group *fix context mismatches in group file Signed-off-by

[Qemu-devel] [PATCH] SIOCGIFINDEX: fix typo

2014-07-10 Thread Joakim Tjernlund
Wrong type was used in ioctl definition. Signed-off-by: Joakim Tjernlund --- However, this does not fix my dhcp problem: jocke-ppc ~ # busybox udhcpc -v Adapter index 24 MAC fe:22:44:22:55:77 udhcpc (v1.21.0) started Executing /usr/share/udhcpc/default.script deconfig Setting IP address 0.0.0.0

[Qemu-devel] [RFC 22/25] target-i386: Add AccelState parameter to cpu_x86_create()

2014-07-10 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 3 ++- target-i386/cpu.c | 4 ++-- target-i386/cpu.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2cf22b1..03a108c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -960,7 +960,8 @@ st

[Qemu-devel] [PULL 03/18] target-alpha: Store IOV exception in fp_status

2014-07-10 Thread Richard Henderson
We were not representing the IOV (integer overflow) exception at all. For ease of implementation, allocate a generic bit in softfloat, even though softfloat will never raise the exception itself. This can be licensed under either the softfloat-2a or -2b license. Reported-by: Al Viro Signed-off-b

[Qemu-devel] [PATCH 053/156] virtio-scsi: fix buffer overrun on invalid state load

2014-07-10 Thread Michael Roth
From: "Michael S. Tsirkin" CVE-2013-4542 hw/scsi/scsi-bus.c invokes load_request. virtio_scsi_load_request does: qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem)); this probably can make elem invalid, for example, make in_num or out_num huge, then: virtio_scsi_parse_

[Qemu-devel] [PATCH 033/156] vmstate: add VMS_MUST_EXIST

2014-07-10 Thread Michael Roth
From: "Michael S. Tsirkin" Can be used to verify a required field exists or validate state in some other way. Signed-off-by: Michael S. Tsirkin Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela (cherry picked from commit 5bf81c8d63db0216a4d29dc87f9ce530bb791dd1) Conflicts:

Re: [Qemu-devel] [PATCH] migration: catch unknown flag combinations in ram_load

2014-07-10 Thread Eric Blake
On 07/09/2014 07:23 AM, Peter Lieven wrote: > Am 09.07.2014 13:00, schrieb Peter Maydell: >> On 9 July 2014 11:56, Amit Shah wrote: >>> On (Wed) 09 Jul 2014 [11:50:18], Peter Maydell wrote: OK; we're treating those as bugs so yes, I think this is 2.1 material. Has somebody other than the

Re: [Qemu-devel] [PATCH buildfix for-2.1] tests: Fix unterminated string output visitor enum human string

2014-07-10 Thread Hu Tao
On Wed, Jul 09, 2014 at 10:28:49PM +0200, Andreas Färber wrote: > The buffer was being allocated of size string length plus two. > Around the string two quotes were being added, but no terminating NUL. > It was then compared using g_assert_cmpstr(), resulting in fairly random > assertion failures:

[Qemu-devel] [PATCH 058/156] stellaris_enet: block migration

2014-07-10 Thread Michael Roth
From: "Michael S. Tsirkin" Incoming migration with stellaris_enet is unsafe. It's being reworked, but for now, simply block it since noone is using it anyway. Block outgoing migration for good measure. CVE-2013-4532 Signed-off-by: Michael S. Tsirkin Signed-off-by: Michael Roth --- hw/net/ste

Re: [Qemu-devel] Help on possible hang in drive-mirror / query-block-jobs

2014-07-10 Thread Daniel P. Berrange
On Thu, Jul 10, 2014 at 05:21:36PM +0200, Paolo Bonzini wrote: > Il 10/07/2014 17:11, Daniel P. Berrange ha scritto: > >I've spent the last week debugging an issue that is hitting OpenStack > >with drive-mirror/block job usage. > > > >Specifically we are seeing that a monitor command for 'query-blo

[Qemu-devel] [PATCH 115/156] parallels: Sanity check for s->tracks (CVE-2014-0142)

2014-07-10 Thread Michael Roth
From: Kevin Wolf This avoids a possible division by zero. Convert s->tracks to unsigned as well because it feels better than surviving just because the results of calculations with s->tracks are converted to unsigned anyway. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Stef

[Qemu-devel] [PATCH 134/156] s390x/css: handle emw correctly for tsch

2014-07-10 Thread Michael Roth
From: Cornelia Huck We should not try to store the emw portion of the irb if extended measurements are not applicable. In particular, we should not surprise the guest by storing a larger irb if it did not enable extended measurements. Cc: qemu-sta...@nongnu.org Reviewed-by: David Hildenbrand Te

[Qemu-devel] [PULL 03/10] mips_malta: Remove incorrect KVM T&E references

2014-07-10 Thread Paolo Bonzini
From: James Hogan Fix the error message and code comments relating to KVM not supporting booting from the flash mapping when no kernel is provided. The issue is a general MIPS KVM issue and isn't specific to the Trap & Emulate version of MIPS KVM. Cc: Aurelien Jarno Cc: Paolo Bonzini Reported-

[Qemu-devel] [RFC 02/25] accel: Move accel code to accel.c

2014-07-10 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/Makefile.objs | 1 + hw/core/accel.c | 113 ++ include/hw/accel.h| 32 ++ vl.c | 81 +--- 4 files changed, 147 insertions(+), 80 de

[Qemu-devel] [PULL 06/10] Enforce stack protector usage

2014-07-10 Thread Paolo Bonzini
From: Miroslav Rezanina If --enable-stack-protector is used is used, configure script try to use --fstack-protector-strong. In case it's not supported, --fstack-protector-all is enabled. If both protectors are not supported, configure does not use any protector at all without any notification. T

[Qemu-devel] [PATCH v4 2.1 4/4] ide: Treat read/write beyond end as invalid

2014-07-10 Thread Markus Armbruster
The block layer fails such reads and writes just fine. However, they then get treated like valid operations that fail: the error action gets executed. Unwanted; reporting the error to the guest is the only sensible action. Reject them before passing them to the block layer. This bypasses the er

Re: [Qemu-devel] another locking issue in current dataplane code?

2014-07-10 Thread Stefan Hajnoczi
On Tue, Jul 8, 2014 at 9:07 PM, Christian Borntraeger wrote: > On 08/07/14 19:08, Paolo Bonzini wrote: >> Il 08/07/2014 17:59, Stefan Hajnoczi ha scritto: >>> I sent Christian an initial patch to fix this but now both threads are >>> stuck in rfifolock_lock() inside cond wait. That's very strange

Re: [Qemu-devel] [PATCH 1/6 v6] ppc: debug stub: Get trap instruction opcode from KVM

2014-07-10 Thread Alexander Graf
On 10.07.14 16:07, Peter Maydell wrote: On 10 July 2014 11:57, Bharat Bhushan wrote: Get trap instruction opcode from KVM and this opcode will be used for setting software breakpoint in following patch Signed-off-by: Bharat Bhushan --- v5->v6 - no change target-ppc/kvm.c | 4 1 fi

[Qemu-devel] [PULL 07/10] target-i386: Add "kvmclock-stable-bit" feature bit name

2014-07-10 Thread Paolo Bonzini
From: Eduardo Habkost KVM_FEATURE_CLOCKSOURCE_STABLE_BIT is enabled by default and supported by KVM. But not having a name defined makes QEMU treat it as an unknown and unmigratable feature flag (as any unknown feature may possibly require state to be migrated), and disable it by default on "-cpu

[Qemu-devel] [PATCH 110/156] qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)

2014-07-10 Thread Michael Roth
From: Kevin Wolf The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots != 0. By having the initialisation of both fields separated in qcow2_open(), any error occuring in between would cause the error path to dereference NULL in qcow2_free_snapshots() if the image had any snapsho

[Qemu-devel] [PATCH 6/6 v6] ppc: Add hw breakpoint watchpoint support

2014-07-10 Thread Bharat Bhushan
This patch adds hardware breakpoint and hardware watchpoint support for ppc. On BOOKE architecture we cannot share debug resources between QEMU and guest because: When QEMU is using debug resources then debug exception must be always enabled. To achieve this we set MSR_DE and also set

Re: [Qemu-devel] [PATCH] spapr: Enable use of huge pages

2014-07-10 Thread Paolo Bonzini
Il 09/07/2014 07:57, Alexey Kardashevskiy ha scritto: 0b183fc87 "memory: move mem_path handling to memory_region_allocate_system_memory" disabled -mempath use for all machines that do not use memory_region_allocate_system_memory() to register RAM. Since SPAPR uses memory_region_init_ram(), the hu

[Qemu-devel] [PULL 01/10] mips/kvm: Init EBase to correct KSEG0

2014-07-10 Thread Paolo Bonzini
From: James Hogan The EBase CP0 register is initialised to 0x8000, however with KVM the guest's KSEG0 is at 0x4000. The incorrect value doesn't get passed to KVM yet as KVM doesn't implement the EBase register, however we should set it correctly now so as not to break migration/loadvm to

[Qemu-devel] [PULL 02/10] mips/kvm: Disable FPU on reset with KVM

2014-07-10 Thread Paolo Bonzini
From: James Hogan KVM doesn't yet support the MIPS FPU, or writing to the guest's Config1 register which contains the FPU implemented bit. Clear QEMU's version of that bit on reset and display a warning that the FPU has been disabled. The previous incorrect Config1 CP0 register value wasn't bein

[Qemu-devel] [PATCH 106/156] dmg: sanitize chunk length and sectorcount (CVE-2014-0145)

2014-07-10 Thread Michael Roth
From: Stefan Hajnoczi Chunk length and sectorcount are used for decompression buffers as well as the bdrv_pread() count argument. Ensure that they have reasonable values so neither memory allocation nor conversion from uint64_t to int will cause problems. Signed-off-by: Stefan Hajnoczi Signed-

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-10 Thread Al Viro
On Tue, Jul 08, 2014 at 08:32:55PM +0100, Peter Maydell wrote: On 8 July 2014 18:20, Al Viro wrote: > > On Tue, Jul 08, 2014 at 05:33:16PM +0100, Peter Maydell wrote: > > > >> > Incidentally, combination of --enable-gprof and (default) --enable-pie > >> > won't build - it dies with ld(1) complain

[Qemu-devel] [PATCH v4 2.1 1/4] virtio-blk: Factor common checks out of virtio_blk_handle_read/write()

2014-07-10 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Fam Zheng --- hw/block/virtio-blk.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index aec3146..d946fa9 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/

[Qemu-devel] [PATCH/RFC 4/5] KVM: prepare for KVM_(S|G)ET_MP_STATE on other architectures

2014-07-10 Thread Christian Borntraeger
From: David Hildenbrand Highlight the aspects of the ioctls that are actually specific to x86 and ia64. As defined restrictions (irqchip) and mp states may not apply to other architectures, these parts are flagged to belong to x86 and ia64. In preparation for the use of KVM_(S|G)ET_MP_STATE by s

[Qemu-devel] [PATCH 007/156] scsi: Change scsi sense buf size to 252

2014-07-10 Thread Michael Roth
From: Fam Zheng Current buffer size fails the assersion check in like hw/scsi/scsi-bus.c:1655:assert(req->sense_len <= sizeof(req->sense)); when backend (block/iscsi.c) returns more data then 96. Exercise the core dump path by booting an Gentoo ISO with scsi-generic device backed with

[Qemu-devel] [PATCH 148/156] nbd: Don't export a block device with no medium.

2014-07-10 Thread Michael Roth
From: Hani Benhabiles The device is exported with erroneous values and can't be read. Before the patch: $ sudo nbd-client localhost -p 10809 /dev/nbd0 -name floppy0 Negotiation: ..size = 17592186044415MB bs=1024, sz=18446744073709547520 bytes $ sudo mount /dev/nbd0 /mnt/tmp/ mount: block device

Re: [Qemu-devel] E6500 inside QEMU?

2014-07-10 Thread Alexander Graf
> Am 09.07.2014 um 10:26 schrieb Frederic Konrad : > > Hi, > > I saw some patches about E6500 cpu on the mailing list. > > here: > http://qemu.11.n7.nabble.com/PATCH-1-2-QEMU-PPC-specify-PVRs-for-all-e500-cores-td248146.html > > What is the status of E6500 upstream? That patch only added th

Re: [Qemu-devel] [PATCH] migration: catch unknown flag combinations in ram_load

2014-07-10 Thread Peter Lieven
Am 09.07.2014 13:00, schrieb Peter Maydell: > On 9 July 2014 11:56, Amit Shah wrote: >> On (Wed) 09 Jul 2014 [11:50:18], Peter Maydell wrote: >>> OK; we're treating those as bugs so yes, I think this is 2.1 >>> material. Has somebody other than the original author tested >>> it? (That's a step tha

[Qemu-devel] [PATCH 048/156] pxa2xx: avoid buffer overrun on incoming migration

2014-07-10 Thread Michael Roth
From: "Michael S. Tsirkin" CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_level

[Qemu-devel] [PATCH 133/156] target-arm: Fix errors in writes to generic timer control registers

2014-07-10 Thread Michael Roth
From: Peter Maydell The code for handling writes to the generic timer control registers had several bugs: * ISTATUS (bit 2) is read-only but we forced it to zero on any write * the check for "was IMASK (bit 1) toggled?" incorrectly used '&' where it should be '^' * the handling of IMASK was

[Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-10 Thread Christian Borntraeger
From: David Hildenbrand If a cpu is stopped, it must never be allowed to run and no interrupt may wake it up. A cpu also has to be unhalted if it is halted and has work to do - this scenario wasn't hit in kvm case yet, as only "disabled wait" is processed within QEMU. Signed-off-by: David Hilde

[Qemu-devel] [PATCH 086/156] curl: check data size before memcpy to local buffer. (CVE-2014-0144)

2014-07-10 Thread Michael Roth
From: Fam Zheng curl_read_cb is callback function for libcurl when data arrives. The data size passed in here is not guaranteed to be within the range of request we submitted, so we may overflow the guest IO buffer. Check the real size we have before memcpy to buffer to avoid overflow. Signed-of

Re: [Qemu-devel] [RFC PATCH V5 0/3] Support xen HVM direct kernel boot

2014-07-10 Thread Stefano Stabellini
On Thu, 10 Jul 2014, Ian Campbell wrote: > On Mon, 2014-07-07 at 14:34 +0800, Chunyan Liu wrote: > > Updated current patch series for working with qemu-xen and default > > BIOS (seabios), to make it in good shape. Stubdom support will be > > continued. > > This series is all acked and hasn't reall

[Qemu-devel] [PATCH v2 00/10] aarch64 migration for TCG and KVM

2014-07-10 Thread Alex Bennée
Hi, This series has already been sent out once before under the guise of tidying up the pstate access and getting TCG migration working for ARM v8 hosts. I've since added the final two patches to support KVM based migration as well. For KVM migration you will need some patches for the kernel side

Re: [Qemu-devel] Which method executes the translated blocks (TBs)?

2014-07-10 Thread Anderson Sartor
Thank you for your response. I want to count how many TBs that are executed. For this, I need to know when a given TB is completely executed, without interrupts of any kind. I disabled the chaining, so, at each iteration, it will execute a single TB. I will check the documentation that you mentione

[Qemu-devel] [PATCH 068/156] migration: catch unknown flags in ram_load

2014-07-10 Thread Michael Roth
From: Peter Lieven if a saved vm has unknown flags in the memory data qemu currently simply ignores this flag and continues which yields in an unpredictable result. This patch catches all unknown flags and aborts the loading of the vm. Additionally error reports are thrown if the migration abort

Re: [Qemu-devel] virtualize sparc developer workstation?

2014-07-10 Thread Mark Cave-Ayland
On 08/07/14 14:29, Dennis Luehring wrote: Am 08.07.2014 00:15, schrieb Mark Cave-Ayland: Sadly sun4u support isn't quite there yet; it's enough to boot Linux (and with git master you can actually start booting the *BSD kernels and Solaris) but there are still some issues with the device tree th

[Qemu-devel] [PATCH 116/156] qcow1: Make padding in the header explicit

2014-07-10 Thread Michael Roth
From: Kevin Wolf We were relying on all compilers inserting the same padding in the header struct that is used for the on-disk format. Let's not do that. Mark the struct as packed and insert an explicit padding field for compatibility. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf Review

[Qemu-devel] [PATCH v2 01/10] target-arm/cpu.h: document various program state functions

2014-07-10 Thread Alex Bennée
We have a number of program state saving functions (pstate, cpsr, xpsr) which are dependant on the mode the CPU is in. This commit adds a little documentation to each function and asserts to defend against incorrect use. Signed-off-by: Alex Bennée --- v2: - remove xpsr_state asserts diff --git

[Qemu-devel] [PATCH 0/4 v7] ppc: Add debug stub support

2014-07-10 Thread Bharat Bhushan
This patchset add support for - software breakpoint - h/w breakpoint - h/w watchpoint Please find description in individual patch. v6->v7 - Removed interrupt injection infrastructure - Simplified excp_vector initialization based on comment - Moved program check exception to software break

[Qemu-devel] [PULL 12/18] target-alpha: Ignore the unused fp_status exceptions

2014-07-10 Thread Richard Henderson
Mask out the exceptions that have no correspondance on Alpha so that zero/non-zero tests work as expected. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target-alpha/fpu_helper.c b

[Qemu-devel] [PULL 01/18] target-alpha: Forget installed round mode after MT_FPCR

2014-07-10 Thread Richard Henderson
When we use QUAL_RM_D, we copy fpcr_dyn_round to float_status. When we install a new FPCR value, we update fpcr_dyn_round. Reset the status of the cache so that we re-copy for the next fp insn that requires dynamic rounding. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 5 +

Re: [Qemu-devel] another locking issue in current dataplane code?

2014-07-10 Thread Christian Borntraeger
On 08/07/14 19:08, Paolo Bonzini wrote: > Il 08/07/2014 17:59, Stefan Hajnoczi ha scritto: >> I sent Christian an initial patch to fix this but now both threads are >> stuck in rfifolock_lock() inside cond wait. That's very strange and >> should never happen. > > I had this patch pending for 2.2:

[Qemu-devel] [PATCH/RFC 3/5] KVM: s390: remove __cpu_is_stopped and expose is_vcpu_stopped

2014-07-10 Thread Christian Borntraeger
From: David Hildenbrand The function "__cpu_is_stopped" is not used any more. Let's remove it and expose the function "is_vcpu_stopped" instead, which is actually what we want. This patch also converts an open coded check for CPUSTAT_STOPPED to is_vcpu_stopped(). Signed-off-by: David Hildenbran

[Qemu-devel] [PATCH 05/10] AioContext: export and use aio_dispatch

2014-07-10 Thread Paolo Bonzini
So far, aio_poll's scheme was dispatch/poll/dispatch, where the first dispatch phase was used only in the GSource case in order to avoid a blocking poll. Earlier patches changed it to dispatch/prepare/poll/dispatch, where prepare is aio_compute_timeout. By making aio_dispatch public, we can remov

[Qemu-devel] [PATCH 143/156] KVM: Fix GSI number space limit

2014-07-10 Thread Michael Roth
From: Alexander Graf KVM tells us the number of GSIs it can handle inside the kernel. That value is basically KVM_MAX_IRQ_ROUTES. However when we try to set the GSI mapping table, it checks for r = -EINVAL; if (routing.nr >= KVM_MAX_IRQ_ROUTES) goto out; erroring out even when w

[Qemu-devel] [PATCH 5/6 v6] ppc: Add software breakpoint support

2014-07-10 Thread Bharat Bhushan
This patch allow insert/remove software breakpoint Signed-off-by: Bharat Bhushan --- v5->v6 - No change target-ppc/kvm.c | 73 +--- 1 file changed, 59 insertions(+), 14 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index d123

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-10 Thread Al Viro
On Mon, Jul 07, 2014 at 11:03:08PM -0700, Richard Henderson wrote: > On 07/07/2014 09:20 PM, Al Viro wrote: > > and I'm reasonably sure that this is what they did internally. You are > > proposing to do 4 cases in all their messy glory in qemu itself... > > Yes. Primarily because we *have* to do

[Qemu-devel] [PATCH 1/3] Add qemu_is_ram_block

2014-07-10 Thread Nikolay Nikolaev
This function will check if given address maps into a RAMBlock. Signed-off-by: Nikolay Nikolaev --- exec.c | 15 +++ include/exec/ram_addr.h |1 + 2 files changed, 16 insertions(+) diff --git a/exec.c b/exec.c index 5a2a25e..0b1457b 100644 --- a/exec.c +++ b/e

[Qemu-devel] [PATCH 012/156] mirror: fix throttling delay calculation

2014-07-10 Thread Michael Roth
From: Paolo Bonzini The throttling delay calculation was using an inaccurate sector count to calculate the time to sleep. This broke rate-limiting for the block mirror job. Move the delay calculation into mirror_iteration() where we know how many sectors were transferred. This lets us calculat

[Qemu-devel] [RFC 15/25] accel: Create accel object when initializing machine

2014-07-10 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/core/accel.c b/hw/core/accel.c index 4deb53f..b86773d 100644 --- a/hw/core/accel.c +++ b/hw/core/accel.c @@ -60,11 +60,15 @@ static AccelClass *accel_find(const char *opt_name) static

Re: [Qemu-devel] [PATCH v6 1/5] block: Support Archipelago as a QEMU block backend

2014-07-10 Thread Chrysostomos Nanakos
On 07/10/2014 03:23 AM, Jeff Cody wrote: On Fri, Jun 27, 2014 at 11:24:08AM +0300, Chrysostomos Nanakos wrote: VM Image on Archipelago volume is specified like this: file.driver=archipelago,file.volume=[,file.mport=[, file.vport=][,file.segment=]] 'archipelago' is the protocol. 'mport' is the

[Qemu-devel] [PATCH 3/3] libqtest: add QTEST_LOG for debugging qtest testcases

2014-07-10 Thread Marc Marí
Signed-off-by: Paolo Bonzini Signed-off-by: Marc Marí --- tests/libqtest.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 98e8f4b..056275d 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -167,11 +167,12 @@ QTest

Re: [Qemu-devel] [RFC PATCH v2] spapr: Enable use of huge pages

2014-07-10 Thread Alexander Graf
On 09.07.14 15:59, Alexey Kardashevskiy wrote: On 07/09/2014 05:46 PM, Paolo Bonzini wrote:> Il 09/07/2014 07:57, Alexey Kardashevskiy ha scritto: 0b183fc87 "memory: move mem_path handling to memory_region_allocate_system_memory" disabled -mempath use for all machines that do not use memory_re

[Qemu-devel] [PATCH 027/156] acpi: fix tables for no-hpet configuration

2014-07-10 Thread Michael Roth
From: "Michael S. Tsirkin" acpi build tried to add offset of hpet table to rsdt even when hpet was disabled. If no tables follow hpet, this could lead to a malformed rsdt. Fix it up. To avoid such errors in the future, rearrange code slightly to make it clear that acpi_add_table stores the off

[Qemu-devel] [PATCH 2/4 v7] ppc: synchronize excp_vectors for injecting exception

2014-07-10 Thread Bharat Bhushan
This patch synchronizes env->excp_vectors[] with env->iovr[]. This is required for using the existing interrupt injection mechanism for kvm. Signed-off-by: Bharat Bhushan --- v1->v2 - simplified excp initialization based on Alex comment target-ppc/kvm.c | 27 +++ 1 file

[Qemu-devel] [PULL 13/18] target-alpha: Raise EXC_M_INV properly for fp inputs

2014-07-10 Thread Richard Henderson
Ignore DNZ if software completion isn't used. Raise INV for denormals in system mode so the OS completion handler sees them. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 33 +++-- target-alpha/helper.h | 1 + target-alph

[Qemu-devel] [PATCH/RFC 1/5] KVM: s390: allow only one SIGP STOP (AND STORE STATUS) at a time

2014-07-10 Thread Christian Borntraeger
From: David Hildenbrand A SIGP STOP (AND STORE STATUS) order is complete as soon as the VCPU has been stopped. This patch makes sure that only one SIGP STOP (AND STORE STATUS) may be pending at a time (as defined by the architecture). If the action_bits are still set, a SIGP STOP has been issued

[Qemu-devel] [PATCH/RFC 0/5] s390x/kvm: track the logical cpu state in QEMU and propagate it to kvm

2014-07-10 Thread Christian Borntraeger
This is the qemu part of kernel series "Let user space control the cpu states" Christian Borntraeger (1): update linux headers with with cpustate changes David Hildenbrand (4): s390x/kvm: introduce proper states for s390 cpus s390x/kvm: proper use of the cpu states OPERATING and STOPPED s

[Qemu-devel] [PATCH v2 10/10] target-arm/kvm: make reg sync code common between kvm32/64

2014-07-10 Thread Alex Bennée
Before we launch a guest we query KVM for the list of "co-processor" registers it knows about which is used later for save/restore of machine state. The logic is identical for both 32-bit and 64-bit so I've moved it all into the common code and simplified the exit paths (as failure => exit). This

[Qemu-devel] [PULL for-2.1 00/18] target-alpha patch queue

2014-07-10 Thread Richard Henderson
The queue consists of Al Viro's recent work looking at the dark corner cases of Alpha FPU exception signalling, for which I am most grateful. Please pull for 2.1. r~ The following changes since commit 9d9de254c2b81b68cd48f2324cc753a570a4cdd8: MAINTAINERS: seccomp: change email contact for E

Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation

2014-07-10 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 07/07/2014 16:02, Dr. David Alan Gilbert ha scritto: > >>> Could you have instead a "migrate_start_postcopy" command, and leave the > >>> policy to management instead? > >Hmm; yes that is probably possible - although with the > >migration_set_param

[Qemu-devel] [PATCH 039/156] ahci: fix buffer overrun on invalid state load

2014-07-10 Thread Michael Roth
From: "Michael S. Tsirkin" CVE-2013-4526 Within hw/ide/ahci.c, VARRAY refers to ports which is also loaded. So we use the old version of ports to read the array but then allow any value for ports. This can cause the code to overflow. There's no reason to migrate ports - it never changes. So j

[Qemu-devel] SYSRQ for s390x

2014-07-10 Thread Berthold Gunreben
Hi, for debugging purposes I would like to have the possibility to send a SYSRQ to a running guest on s390x. On x86_64 you can just send a BREAK e.g. from the qemu console by typing CTRL-A B followed by the specific function key (H for help etc.). On s390x this does not work - sending CTRL-A B

[Qemu-devel] [PATCH v2 03/10] target-arm: Support save/load for 64 bit CPUs

2014-07-10 Thread Alex Bennée
This enables the saving and restoring of machine state by including the current program state (*psr) and xregs. The save_state_to_spsr hides the details of if the processor is in 32 or 64 bit mode at the time. Signed-off-by: Alex Bennée --- v2 (ajb) - use common state save functions - re-ba

[Qemu-devel] [PATCH 010/156] tests: Fix 'make test' for i686 hosts (build regression)

2014-07-10 Thread Michael Roth
From: Stefan Weil 'make test' is broken at least since commit baacf04799ace72a9c735dd9306a1ceaf305e7cf. Several source files were moved to util/, and some of them there split, so add the missing prefix and new files to fix the compiler and linker errors. There remain more issues, but these chang

Re: [Qemu-devel] [PATCH v2 0/4] trace: add simpletrace-stap format to generate binary trace

2014-07-10 Thread Stefan Hajnoczi
On Sun, Jun 22, 2014 at 09:46:03PM +0800, Stefan Hajnoczi wrote: > v2: > * I realized that v1 was not complete enough after feedback from Lluís and >Frank Ch. Eigler, so here is a v2 after all. > * Add Makefile target for simpletrace .stp file [Lluís] > * Generate SystemTap probe aliases so

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-10 Thread Richard Henderson
On 07/08/2014 10:47 PM, Al Viro wrote: > So env->fpcr_flush_to_zero = env->fpcr_dnod & env->fpcr_undz; is another > bug - needs s/dnod/unfd/ there... That's exactly what I was looking at, thanks. r~

[Qemu-devel] [PULL for-2.1 00/22] Block patches for 2.1.0-rc2

2014-07-10 Thread Kevin Wolf
The following changes since commit 675879f6f3c9463e103735a4e41e9deb0bee9b39: Update version for v2.1.0-rc1 release (2014-07-08 16:53:59 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to ccd3583aed26144b752ff48d11e

  1   2   3   >