Re: [Qemu-devel] RAMBlock's named ""

2017-03-07 Thread Peter Maydell
On 7 March 2017 at 20:46, Dr. David Alan Gilbert wrote: > The real fun is that there doesn't seem to be anything that stops > two blocks having the same name! The memory region API says that the name is for debugging only, so the problem is in code which relies on them being unique :-) thanks --

Re: [Qemu-devel] [PATCH v2] spapr_pci: allow control of BAR alignment through SLOF

2017-03-07 Thread Michael Roth
Quoting David Gibson (2017-03-06 03:43:49) > On Sun, Mar 05, 2017 at 11:44:54PM -0600, Michael Roth wrote: > > Quoting David Gibson (2017-03-05 22:16:58) > > > On Fri, Mar 03, 2017 at 05:32:57PM -0600, Michael Roth wrote: > > > > In certain cases, such as PCI-passthrough with VFIO, we cannot offloa

Re: [Qemu-devel] [PATCH RFC 1/1] vmstate: draft fix for failed iotests case 68 and 91

2017-03-07 Thread QingFeng Hao
在 2017/3/7 18:19, Halil Pasic 写道: On 03/07/2017 11:05 AM, Kevin Wolf wrote: Am 07.03.2017 um 10:54 hat Halil Pasic geschrieben: On 03/07/2017 10:29 AM, Kevin Wolf wrote: Am 07.03.2017 um 03:53 hat QingFeng Hao geschrieben: I am not very clear about the logic in vmstate.c, but from its con

[Qemu-devel] [PATCH v2] file-posix: Incoporate max_segments in block limit

2017-03-07 Thread Fam Zheng
Linux exposes a separate limit, /sys/block/.../queue/max_segments, which in the worst case can be more restrictive than BLKSECTGET (as they are two different things). Similar to the BLKSECTGET story, guests don't see this limit and send big requests will get -EINVAL error on SG_IO. Lean on the saf

Re: [Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-07 Thread Markus Armbruster
John Snow writes: > On 03/07/2017 03:16 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 03/06/2017 03:18 AM, Markus Armbruster wrote: Nir Soffer writes: > On Fri, Mar 3, 2017 at 9:29 PM, John Snow wrote: >> >> >> On 03/03/2017 02:26 PM, Nir Soffer wrote:

Re: [Qemu-devel] [PATCH] virtio: destroy region cache during reset

2017-03-07 Thread Jason Wang
On 2017年03月08日 11:21, Jason Wang wrote: On 2017年03月07日 18:55, Paolo Bonzini wrote: On 07/03/2017 09:47, Jason Wang wrote: We don't destroy region cache during reset which can make the maps of previous driver leaked to a buggy or malicious driver that don't set vring address before starting

Re: [Qemu-devel] [PATCH] file-posix: Incoporate max_segments in block limit

2017-03-07 Thread Fam Zheng
On Tue, 03/07 11:58, Paolo Bonzini wrote: > > > On 07/03/2017 03:17, Fam Zheng wrote: > > Linux exposes a separate limit, /sys/block/.../queue/max_segments, which > > in the worst case can be more restrictive than BLKSECTGET (as they are > > two different things). Similar to the BLKSECTGET story,

Re: [Qemu-devel] [PATCH] docker/dockerfiles/debian-s390-cross: include clang

2017-03-07 Thread Fam Zheng
On Tue, 03/07 13:41, Alex Bennée wrote: > > Fam Zheng writes: > > > On Mon, 03/06 11:28, Alex Bennée wrote: > >> It's a silly little limitation on Shippable that is looks for clang > >> in the container even though we won't use it. The arm/aarch64 cross > >> builds inherit this from debian.docke

Re: [Qemu-devel] [PATCH qemu] target-ppc: kvm: make use of KVM_CREATE_SPAPR_TCE_64

2017-03-07 Thread Alexey Kardashevskiy
Ping? It is not urgent, just wanted to make sure that it is not forgotten and I do not need to do anything to update it. Thanks. On 02/03/17 13:40, Alexey Kardashevskiy wrote: > On 09/01/17 13:53, David Gibson wrote: >> On Mon, Jan 09, 2017 at 01:38:26PM +1100, Alexey Kardashevskiy wrote: >>> On

Re: [Qemu-devel] [PATCH v7 kernel 4/5] virtio-balloon: define flags and head for host request vq

2017-03-07 Thread Michael S. Tsirkin
On Fri, Mar 03, 2017 at 01:40:29PM +0800, Wei Wang wrote: > From: Liang Li > > Define the flags and head struct for a new host request virtual > queue. Guest can get requests from host and then responds to > them on this new virtual queue. > Host can make use of this virtqueue to request the gues

Re: [Qemu-devel] [PATCH v7 kernel 2/5] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-07 Thread Michael S. Tsirkin
On Fri, Mar 03, 2017 at 01:40:27PM +0800, Wei Wang wrote: > From: Liang Li > > Add a new feature bit, VIRTIO_BALLOON_F_CHUNK_TRANSFER. Please check > the implementation patch commit for details about this feature. better squash into next patch. > Signed-off-by: Liang Li > Signed-off-by: Wei W

Re: [Qemu-devel] [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-07 Thread Michael S. Tsirkin
On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: > From: Liang Li > > The implementation of the current virtio-balloon is not very > efficient, because the pages are transferred to the host one by one. > Here is the breakdown of the time in percentage spent on each > step of the balloon

Re: [Qemu-devel] [PATCH] virtio: destroy region cache during reset

2017-03-07 Thread Jason Wang
On 2017年03月07日 18:55, Paolo Bonzini wrote: On 07/03/2017 09:47, Jason Wang wrote: We don't destroy region cache during reset which can make the maps of previous driver leaked to a buggy or malicious driver that don't set vring address before starting to use the device. I'm still not sure as

Re: [Qemu-devel] [PATCH] virtio: destroy region cache during reset

2017-03-07 Thread Jason Wang
On 2017年03月07日 18:16, Cornelia Huck wrote: On Tue, 7 Mar 2017 16:47:58 +0800 Jason Wang wrote: We don't destroy region cache during reset which can make the maps of previous driver leaked to a buggy or malicious driver that don't set vring address before starting to use the device. Fix this

Re: [Qemu-devel] [PATCH V3] virtio: do not require IOMMU to be created in advance

2017-03-07 Thread Jason Wang
On 2017年03月08日 10:43, Peter Xu wrote: On Tue, Mar 07, 2017 at 02:47:30PM +0200, Marcel Apfelbaum wrote: On 03/07/2017 11:09 AM, Jason Wang wrote: After commit 96a8821d2141 ("virtio: unbreak virtio-pci with IOMMU after caching ring translations"), IOMMU was required to be created in advance. T

Re: [Qemu-devel] [PATCH] X86/HMP: Expose x86 model specific registers via human monitor

2017-03-07 Thread Richard Henderson
On 03/08/2017 11:16 AM, Julian Kirsch wrote: For instance, many modern x86-64 operating systems maintain access to internal data structures via the MSR_GSBASE/MSR_KERNELGSBASE MSRs. Giving introspection utilities (such as a remotely attached gdb) a way of accessing these registers improves analys

[Qemu-devel] [PATCH v6 10/10] tests: Add coverage for recent block geometry fixes

2017-03-07 Thread Eric Blake
Use blkdebug's new geometry constraints to emulate setups that have caused recent regression fixes: write zeroes asserting when running through a loopback block device with max-transfer smaller than cluster size, and discard rounding away portions of requests not aligned to preferred boundaries. A

[Qemu-devel] [PATCH v6 05/10] blkdebug: Sanity check block layer guarantees

2017-03-07 Thread Eric Blake
Commits 04ed95f4 and 1a62d0ac updated the block layer to auto-fragment any I/O to fit within device boundaries. Additionally, when using a minimum alignment of 4k, we want to ensure the block layer does proper read-modify-write rather than requesting I/O on a slice of a sector. Let's enforce that t

[Qemu-devel] [PATCH v6 07/10] blkdebug: Add pass-through write_zero and discard support

2017-03-07 Thread Eric Blake
In order to test the effects of artificial geometry constraints on operations like write zero or discard, we first need blkdebug to manage these actions. It also allows us to inject errors on those operations, just like we can for read/write/flush. We can also test the contract promised by the bl

[Qemu-devel] [PATCH v6 09/10] blkdebug: Add ability to override unmap geometries

2017-03-07 Thread Eric Blake
Make it easier to simulate various unusual hardware setups (for example, recent commits 3482b9b and b8d0a98 affect the Dell Equallogic iSCSI with its 15M preferred and maximum unmap and write zero sizing, or b2f95fe deals with the Linux loopback block device having a max_transfer of 64k), by allowi

[Qemu-devel] [PATCH v6 01/10] iotests: fix 097 when run with qcow

2017-03-07 Thread Eric Blake
From: "Daniel P. Berrange" The previous commit: commit a3e1505daec31ef56f0489f8c8fff1b8e4ca92bd Author: Eric Blake Date: Mon Dec 5 09:49:34 2016 -0600 qcow2: Don't strand clusters near 2G intervals during commit extended the 097 test case so that it did two passes, once with an in

[Qemu-devel] [PATCH v6 04/10] qcow2: Discard/zero clusters by byte count

2017-03-07 Thread Eric Blake
Passing a byte offset, but sector count, when we ultimately want to operate on cluster granularity, is madness. Clean up the external interfaces to take both offset and count as bytes, while still keeping the assertion added previously that the caller must align the values to a cluster. Then rena

[Qemu-devel] [PATCH v6 06/10] blkdebug: Refactor error injection

2017-03-07 Thread Eric Blake
Rather than repeat the logic at each caller of checking if a Rule exists that warrants an error injection, fold that logic into inject_error(); and rename it to rule_check() for legibility. This will help the next patch, which adds two more callers that need to check rules for the potential of inje

[Qemu-devel] [PATCH v6 02/10] iotests: Improve image-clear tests on non-aligned image

2017-03-07 Thread Eric Blake
Tweak 097 and 176 to operate on an image that is not cluster-aligned, to give further coverage of clearing out an entire image. Signed-off-by: Eric Blake --- v6: new patch --- tests/qemu-iotests/097 | 7 --- tests/qemu-iotests/097.out | 24 tests/qemu-iotests/1

[Qemu-devel] [PATCH v6 08/10] blkdebug: Simplify override logic

2017-03-07 Thread Eric Blake
Rather than store into a local variable, then copy to the struct if the value is valid, then reporting errors otherwise, it is simpler to just store into the struct and report errors if the value is invalid. This however requires that the struct store a 64-bit number, rather than a narrower type.

[Qemu-devel] [PATCH v6 03/10] qcow2: Assert that cluster operations are aligned

2017-03-07 Thread Eric Blake
qcow2_discard_clusters() is set up to silently ignore sub-cluster head or tail on unaligned requests. However, it is easy to audit the various callers: qcow2_snapshot_create() has always passed aligned data since the call was introduced in 1ebf561; qcow2_co_pdiscard() has passed aligned clusters s

[Qemu-devel] [PATCH v6 00/10] add blkdebug tests

2017-03-07 Thread Eric Blake
Available as a tag at: git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v6 v5 was: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg03042.html Since then: - Rebase to master - Pull in Dan's patch that splits test 97 for qcow (patch 1) - Address comments from Kevin (includes creating

Re: [Qemu-devel] [PATCH V3] virtio: do not require IOMMU to be created in advance

2017-03-07 Thread Peter Xu
On Tue, Mar 07, 2017 at 02:47:30PM +0200, Marcel Apfelbaum wrote: > On 03/07/2017 11:09 AM, Jason Wang wrote: > >After commit 96a8821d2141 ("virtio: unbreak virtio-pci with IOMMU > >after caching ring translations"), IOMMU was required to be created in > >advance. This is because we can only get th

Re: [Qemu-devel] [PATCH 2/2] vl: Print CPU help after we've registered the CPU accelerators

2017-03-07 Thread David Gibson
On Tue, Mar 07, 2017 at 09:02:37AM -0300, Eduardo Habkost wrote: > On Tue, Mar 07, 2017 at 02:31:05PM +1100, David Gibson wrote: > > On Mon, Mar 06, 2017 at 08:47:52AM -0300, Eduardo Habkost wrote: > > > On Mon, Mar 06, 2017 at 10:06:27AM +1100, David Gibson wrote: > > > > On Fri, Mar 03, 2017 at 1

Re: [Qemu-devel] [PATCH] X86/HMP: Expose x86 model specific registers via human monitor

2017-03-07 Thread Eric Blake
On 03/07/2017 06:16 PM, Julian Kirsch wrote: > Provide read/write access to x86 model specific registers (MSRs) by means of > two new HMP commands "msr-list" and "msr-set". The rationale behind this > is to improve introspection capabilities for system virtualization mode. > For instance, many mode

[Qemu-devel] [PATCH RFC 1/1] block: Handle NULL options correctly in raw_open

2017-03-07 Thread Dong Jia Shi
A normal call for raw_open should always pass in a non-NULL @options, but for some certain cases (e.g. trying to applying snapshot on a RBD image), they call raw_open with a NULL @options right after the calling for raw_close. Let's take the NULL @options as a sign of trying to do raw_open again,

[Qemu-devel] [PATCH RFC 0/1] block: Handle NULL options correctly in raw_open

2017-03-07 Thread Dong Jia Shi
Trying to restore rbd image on ceph cluster from snapshot with qemu-img could trigger a calling to raw_open with a NULL @options after a calling to raw_close, and that will lead to a failure of the snapshot applying. [root@s8345007 ~]# gdb --args qemu-img snapshot -a snap1 rbd:test_pool/dj_image .

Re: [Qemu-devel] [PATCH for-2.10] ppc/spapr: QOM'ify sPAPRRTCState

2017-03-07 Thread David Gibson
On Tue, Mar 07, 2017 at 10:23:40AM +0100, Cédric Le Goater wrote: > Also use an 'sPAPRRTCState' attribute under the sPAPR machine to hold > the RTC object. Overall, these changes remove an unnecessary and > implicit dependency on SysBus. > > Signed-off-by: Cédric Le Goater Applied to ppc-for-2.1

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

2017-03-07 Thread ashish mittal
Thanks! There is one more input I need some help with! VxHS network library opens a fixed number of connection channels to a given host, and all the vdisks (that connect to the same host) share these connection channels. Therefore, we need to open secure channels to a specific target host only on

[Qemu-devel] Small patch for getdents syscall

2017-03-07 Thread Henry Wertz
I have a trivial, 1-line patch for getdents function; due to use of unsigned long, the struct on 64-bit and 32-bit systems is not the same. qemu is aware of this, however it currently only checks for a 32-bit target on 64-bit host case; in my case, I'm running 64-bit target on 32-bit host (x86-64 b

[Qemu-devel] [Bug 1274170] Re: qemu window hides in the background on osx

2017-03-07 Thread Thomas Huth
Looks like such a line has been added with this commit here: http://git.qemu-project.org/?p=qemu.git;a=commitdiff;h=43227af88a36faed Is the latest version of QEMU now working as expected? ** Changed in: qemu Status: Confirmed => Incomplete -- You received this bug notification because you

[Qemu-devel] [Bug 1131757] Re: QEMU 1.4.0 fails to boot sparc64 linux image

2017-03-07 Thread Thomas Huth
Comment #2 sounds like the issue has been resolved? Or is there something left to do here? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1131757

[Qemu-devel] [Bug 986318] Re: [sdl] Mouse grab breaks GNOME 3 screensaver unlock screen

2017-03-07 Thread Thomas Huth
Does this problem still happen with the latest version of QEMU and GNOME? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/986318 Title: [sdl] Mou

[Qemu-devel] [Bug 795866] Re: pci passthrough doesn´t work

2017-03-07 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this problem with the latest version of QEMU? Or can we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

Re: [Qemu-devel] [PATCH] virtio-serial-bus: Delete timer from list before free it

2017-03-07 Thread Amit Shah
On (Mon) 06 Mar 2017 [11:29:31], zhanghailiang wrote: > Signed-off-by: zhanghailiang Reviewed-by: Amit Shah Michael, please pick this up. Amit -- http://log.amitshah.net/

Re: [Qemu-devel] [PATCH v5 6/7] blkdebug: Add ability to override unmap geometries

2017-03-07 Thread Eric Blake
On 02/15/2017 10:20 AM, Kevin Wolf wrote: > Am 14.02.2017 um 20:25 hat Eric Blake geschrieben: >> Make it easier to simulate various unusual hardware setups (for >> example, recent commits 3482b9b and b8d0a98 affect the Dell >> Equallogic iSCSI with its 15M preferred and maximum unmap and >> write

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-07 Thread Pranith Kumar
Hi Alex, On Tue, Mar 7, 2017 at 10:50 AM, Alex Bennée wrote: > Hi, > > This is the latest iteration of fixes for problems introduced by > MTTCG. Aside from the usual slew of addressing review comments and > applying tags I've also pulled in Yongbok Kim's MIPS patch (to replace > mine) and Paolo's

Re: [Qemu-devel] [PATCH v2 0/3] migration capability to discard the migrated ram pages

2017-03-07 Thread Pavel Butsykin
On 07.03.2017 16:56, Dr. David Alan Gilbert wrote: * Pavel Butsykin (pbutsy...@virtuozzo.com) wrote: On 14.02.2017 17:02, Dr. David Alan Gilbert wrote: Hi Pavel, I was curious, having merged this, how you're using postcopy; do you switch into postcopy mode immediately or wait until the firs

[Qemu-devel] RAMBlock's named ""

2017-03-07 Thread Dr. David Alan Gilbert
We seem to have a couple of weird cases where we end up with RAMBlocks with no name; I think they'll badly confuse the migration code, but I don't quite understand how they're happening. 1) device_del e1000e 2) -object memory-backend-file without wiring it up I added some debug into migration/r

Re: [Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-07 Thread John Snow
On 03/07/2017 03:16 AM, Markus Armbruster wrote: > John Snow writes: > >> On 03/06/2017 03:18 AM, Markus Armbruster wrote: >>> Nir Soffer writes: >>> On Fri, Mar 3, 2017 at 9:29 PM, John Snow wrote: > > > On 03/03/2017 02:26 PM, Nir Soffer wrote: >> On Fri, Mar 3, 2017 at

Re: [Qemu-devel] [PATCH v3 09/11] target-i386: defer VMEXIT to do_interrupt

2017-03-07 Thread Richard Henderson
On 03/08/2017 02:50 AM, Alex Bennée wrote: From: Paolo Bonzini Paths through the softmmu code during code generation now need to be audited to check for double locking of tb_lock. In particular, VMEXIT can take tb_lock through cpu_vmexit -> cpu_x86_update_cr4 -> tlb_flush. To avoid this, spli

Re: [Qemu-devel] [PATCH v3 07/11] translate-all: exit cpu_restore_state early if translating

2017-03-07 Thread Richard Henderson
On 03/08/2017 02:50 AM, Alex Bennée wrote: The translation code uses cpu_ld*_code which can trigger a tlb_fill which if it fails will erroneously attempts a fault resolution. This never works during translation as the TB being generated hasn't been added yet. The target should have checked retadd

Re: [Qemu-devel] [PATCH v4 5/5] xen: use libxendevicemodel when available

2017-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2017, Paul Durrant wrote: > This patch modifies the wrapper functions in xen_common.h to use the > new xendevicemodel interface if it is available along with compatibility > code to use the old libxenctrl interface if it is not. > > Signed-off-by: Paul Durrant > Reviewed-by: Anthony

[Qemu-devel] [PATCH for-2.9?] tests: Ignore more test executables

2017-03-07 Thread Eric Blake
Ignore test executables when building in-tree: test-crypto-hmac introduced in commit 4fd460b test-aio-multithread introduced in commit 0c330a7 Signed-off-by: Eric Blake --- Doesn't affect the built binaries, but does make it harder to accidentally commit an unintended binary when doing 'git add

[Qemu-devel] [PATCH 0/2] migration/postcopy: Disable shared RAM

2017-03-07 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Disable postcopy migration when there's shared RAM, we're still figuring out the details. Without this patch there's a chance it might appear to succeed in some cases. Signed-off-by: Dr. David Alan Gilbert Dr. David Alan Gilbert (2): RAMBlocks: qemu_ram_is_sha

[Qemu-devel] [PATCH 1/2] RAMBlocks: qemu_ram_is_shared

2017-03-07 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Provide a helper to say whether a RAMBlock was created as a shared mapping. Signed-off-by: Dr. David Alan Gilbert --- exec.c| 5 + include/exec/cpu-common.h | 1 + 2 files changed, 6 insertions(+) diff --git a/exec.c b/exec.c index aabb03

[Qemu-devel] [PATCH 2/2] postcopy: Check for shared memory

2017-03-07 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy doesn't support migration of RAM shared with another process yet (we've got a bunch of things to understand). Check for the case and don't allow postcopy to be enabled. Signed-off-by: Dr. David Alan Gilbert --- migration/postcopy-ram.c | 18 +

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 11/11] hw/intc/arm_gic: modernise the DPRINTF

2017-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2017 12:50 PM, Alex Bennée wrote: While I was debugging the icount issues I realised a bunch of the messages look quite similar. I've fixed this by including __func__ in the debug print. At the same time I move the a modern if (GATE) style printf which ensures the compiler can check for

Re: [Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-07 Thread John Snow
On 03/07/2017 03:16 AM, Markus Armbruster wrote: > John Snow writes: > >> On 03/06/2017 03:18 AM, Markus Armbruster wrote: >>> Nir Soffer writes: >>> On Fri, Mar 3, 2017 at 9:29 PM, John Snow wrote: > > > On 03/03/2017 02:26 PM, Nir Soffer wrote: >> On Fri, Mar 3, 2017 at

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 10/11] target/arm/helper: make it clear the EC field is also in hex

2017-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2017 12:50 PM, Alex Bennée wrote: ..just like the rest of the displayed ESR register. Otherwise people might scratch their heads if a not obviously hex number is displayed for the EC field. Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: KONRAD Frederic Reviewed-

Re: [Qemu-devel] [PATCH v3 03/11] cpus.c: add additional error_report when !TARGET_SUPPORT_MTTCG

2017-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2017 12:50 PM, Alex Bennée wrote: While we may fail the memory ordering check later that can be confusing. So in cases where TARGET_SUPPORT_MTTCG has yet to be defined we should say so specifically. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Math

Re: [Qemu-devel] [PATCH v3 05/11] s390x/misc_helper.c: wrap IO instructions in BQL

2017-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2017 12:50 PM, Alex Bennée wrote: Helpers that can trigger IO events (including interrupts) need to be protected by the BQL. I've updated all the helpers that call into an ioinst_handle_* functions. Reported-by: Thomas Huth Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Da

Re: [Qemu-devel] [PATCH/RFC] exec: add cpu_synchronize_state to cpu_memory_rw_debug

2017-03-07 Thread Christian Borntraeger
On 03/07/2017 04:35 PM, Alex Bennée wrote: > > Christian Borntraeger writes: > >> I sometimes got "Cannot access memory" when using the x command >> on the monitor. Turns out that the cpu env did contain stale data >> (e.g. wrong control register content for page table origin). >> We must synchr

Re: [Qemu-devel] [PATCH for-2.9 0/6] disas: Fix various coverity nits

2017-03-07 Thread Peter Maydell
On 3 March 2017 at 15:50, Peter Maydell wrote: > This patchset fixes all the coverity issues for disas/: > * dead ?: code in hppa > * a NULL pointer deref following an internal-error case >in i386 > * unintended sign extension after shift of unsigned char >in m68k, microblaze, cris, arm

Re: [Qemu-devel] [PATCH v4] backup: allow target without .bdrv_get_info

2017-03-07 Thread Vladimir Sementsov-Ogievskiy
07.03.2017 16:47, Kevin Wolf wrote: Am 28.02.2017 um 20:33 hat Vladimir Sementsov-Ogievskiy geschrieben: Currently backup to nbd target is broken, as nbd doesn't have .bdrv_get_info realization. Signed-off-by: Vladimir Sementsov-Ogievskiy --- v4: use error_report() add article v3: fix c

Re: [Qemu-devel] [PATCH for-2.9 v2] nbd/client: fix drop_sync [CVE-2017-2630]

2017-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2017 12:16 PM, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Comparison symbol is misused. It may lead to memory corruption. Introduced in commit 7d3123e. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20170203154757.36140-6-vsement...@virtuozzo.com> [eblake: add CVE

[Qemu-devel] [PATCH] target/mips: fix delay slot detection in gen_msa_branch()

2017-03-07 Thread Yongbok Kim
It is unnecessary to test R6 from delay/forbidden slot check in gen_msa_branch(). https://bugs.launchpad.net/qemu/+bug/1663287 Reported-by: Brian Campbell Signed-off-by: Yongbok Kim --- target/mips/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/tran

[Qemu-devel] [PATCH v3 08/11] target/mips: hold BQL for timer interrupts

2017-03-07 Thread Alex Bennée
From: Yongbok Kim Hold BQL when accessing timer which can cause interrupts Signed-off-by: Yongbok Kim Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- target/mips/op_helper.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/target/m

[Qemu-devel] [PATCH v3 05/11] s390x/misc_helper.c: wrap IO instructions in BQL

2017-03-07 Thread Alex Bennée
Helpers that can trigger IO events (including interrupts) need to be protected by the BQL. I've updated all the helpers that call into an ioinst_handle_* functions. Reported-by: Thomas Huth Signed-off-by: Alex Bennée --- target/s390x/misc_helper.c | 21 + 1 file changed, 21

[Qemu-devel] [PATCH v3 07/11] translate-all: exit cpu_restore_state early if translating

2017-03-07 Thread Alex Bennée
The translation code uses cpu_ld*_code which can trigger a tlb_fill which if it fails will erroneously attempts a fault resolution. This never works during translation as the TB being generated hasn't been added yet. The target should have checked retaddr before calling cpu_restore_state but for th

[Qemu-devel] [PATCH v3 10/11] target/arm/helper: make it clear the EC field is also in hex

2017-03-07 Thread Alex Bennée
..just like the rest of the displayed ESR register. Otherwise people might scratch their heads if a not obviously hex number is displayed for the EC field. Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: KONRAD Frederic --- target/arm/helper.c | 2 +- 1 file changed, 1 inser

[Qemu-devel] [PATCH v3 09/11] target-i386: defer VMEXIT to do_interrupt

2017-03-07 Thread Alex Bennée
From: Paolo Bonzini Paths through the softmmu code during code generation now need to be audited to check for double locking of tb_lock. In particular, VMEXIT can take tb_lock through cpu_vmexit -> cpu_x86_update_cr4 -> tlb_flush. To avoid this, split VMEXIT delivery in two parts, similar to wh

[Qemu-devel] [PATCH v3 11/11] hw/intc/arm_gic: modernise the DPRINTF

2017-03-07 Thread Alex Bennée
While I was debugging the icount issues I realised a bunch of the messages look quite similar. I've fixed this by including __func__ in the debug print. At the same time I move the a modern if (GATE) style printf which ensures the compiler can check for format string errors even if the code gets op

[Qemu-devel] [PATCH v3 06/11] target/xtensa: hold BQL for interrupt processing

2017-03-07 Thread Alex Bennée
Make sure we have the BQL held when processing interrupts. Reported-by: Thomas Huth Signed-off-by: Alex Bennée Acked-by: Max Filippov --- target/xtensa/helper.c| 1 + target/xtensa/op_helper.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/target/xtensa/helper.c b/target/xtens

Re: [Qemu-devel] [PATCH v2 0/3] migration capability to discard the migrated ram pages

2017-03-07 Thread Pavel Butsykin
On 07.03.2017 17:46, Dr. David Alan Gilbert wrote: * Pavel Butsykin (pbutsy...@virtuozzo.com) wrote: On 07.03.2017 16:56, Dr. David Alan Gilbert wrote: * Pavel Butsykin (pbutsy...@virtuozzo.com) wrote: On 14.02.2017 17:02, Dr. David Alan Gilbert wrote: Hi Pavel, I was curious, having mer

[Qemu-devel] [PATCH v3 04/11] sparc/sparc64: grab BQL before calling cpu_check_irqs

2017-03-07 Thread Alex Bennée
IRQ modification is part of device emulation and should be done while the BQL is held to prevent races when MTTCG is enabled. This adds assertions in the hw emulation layer and wraps the calls from helpers in the BQL. Reported-by: Mark Cave-Ayland Signed-off-by: Alex Bennée --- v3 - move BQL

[Qemu-devel] [PATCH v3 03/11] cpus.c: add additional error_report when !TARGET_SUPPORT_MTTCG

2017-03-07 Thread Alex Bennée
While we may fail the memory ordering check later that can be confusing. So in cases where TARGET_SUPPORT_MTTCG has yet to be defined we should say so specifically. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- cpus.c | 4 1 file changed, 4 insertions(+) diff --git a/cpus.

Re: [Qemu-devel] [PATCH v5 07/18] iotests: fix 097 when run with qcow

2017-03-07 Thread Daniel P. Berrange
On Tue, Mar 07, 2017 at 09:44:02AM -0600, Eric Blake wrote: > On 02/22/2017 05:46 PM, Eric Blake wrote: > > On 02/21/2017 05:55 AM, Daniel P. Berrange wrote: > >> The previous commit: > >> > >> commit a3e1505daec31ef56f0489f8c8fff1b8e4ca92bd > >> Author: Eric Blake > >> Date: Mon Dec 5 09:

[Qemu-devel] [PATCH v3 02/11] target/i386/cpu.h: declare TCG_GUEST_DEFAULT_MO

2017-03-07 Thread Alex Bennée
This suppresses the incorrect warning when forcing MTTCG for x86 guests on x86 hosts. A future patch will still warn when TARGET_SUPPORT_MTTCG hasn't been defined for the guest (which is still pending for x86). Reported-by: Paolo Bonzini Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson

[Qemu-devel] [PULL 23/27] qapi-schema: Rename GlusterServer to SocketAddressFlat

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster As its documentation says, it's not specific to Gluster. Rename it, as I'm going to use it for something else. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/gluster.c | 38 +++--- qap

[Qemu-devel] [PULL 24/27] qapi-schema: Rename SocketAddressFlat's variant tcp to inet

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster QAPI type SocketAddressFlat differs from SocketAddress pointlessly: the discriminator value for variant InetSocketAddress is 'tcp' instead of 'inet'. Rename. The type is so far only used by the Gluster block drivers. Take care to keep 'tcp' working in things like -drive

[Qemu-devel] [PULL 26/27] block: Don't use error_abort in blk_new_open

2017-03-07 Thread Kevin Wolf
From: Fam Zheng We have an errp and bdrv_root_attach_child can fail permission check, error_abort is not the best choice here. Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/block-backend.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/block-bac

[Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-07 Thread Alex Bennée
Hi, This is the latest iteration of fixes for problems introduced by MTTCG. Aside from the usual slew of addressing review comments and applying tags I've also pulled in Yongbok Kim's MIPS patch (to replace mine) and Paolo's VMEXIT fix for the problem reported by Alexander Boettcher. Unless anyon

[Qemu-devel] [PULL 27/27] commit: Don't use error_abort in commit_start

2017-03-07 Thread Kevin Wolf
From: Fam Zheng bdrv_set_backing_hd failure needn't be abort. Since we already have error parameter, use it. Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/commit.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/block/commit.c b/block/commi

[Qemu-devel] [PULL 21/27] gluster: Don't duplicate qapi-util.c's qapi_enum_parse()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Niels de Vos Signed-off-by: Kevin Wolf --- block/gluster.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index 7236d59..6fbcf9e 100644

[Qemu-devel] [PULL 20/27] gluster: Drop assumptions on SocketTransport names

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster qemu_gluster_glfs_init() passes the names of QAPI enumeration type SocketTransport to glfs_set_volfile_server(). Works, because they were chosen to match. But the coupling is artificial. Use the appropriate literal strings instead. Signed-off-by: Markus Armbruster Rev

[Qemu-devel] [PULL 22/27] gluster: Plug memory leaks in qemu_gluster_parse_json()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster To reproduce, run $ valgrind qemu-system-x86_64 --nodefaults -S --drive driver=gluster,volume=testvol,path=/a/b/c,server.0.type=xxx Signed-off-by: Markus Armbruster Reviewed-by: Niels de Vos Signed-off-by: Kevin Wolf --- block/gluster.c | 22 +++-

[Qemu-devel] [PATCH v3 01/11] vl/cpus: be smarter with icount and MTTCG

2017-03-07 Thread Alex Bennée
The sense of the test was inverted. Make it simple, if icount is enabled then we disabled MTTCG by default. If the user tries to force MTTCG upon us then we tell them "no". Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- cpus.c | 7 +++ vl.c | 7 ++- 2 files changed, 5 i

[Qemu-devel] [PULL 15/27] sheepdog: Fix snapshot ID parsing in _open(), _create, _goto()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster sd_parse_uri() and sd_snapshot_goto() screw up error checking after strtoul(), and truncate long tag names silently. Fix by replacing those parts by new sd_parse_snapid_or_tag(), which checks more carefully. sd_snapshot_delete() also parses snapshot IDs, but is currently

[Qemu-devel] [PULL 16/27] sheepdog: Don't truncate long VDI name in _open(), _create()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster sd_parse_uri() truncates long VDI names silently. Reject them instead. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kevin Wolf --- block/sheepdog.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/sh

Re: [Qemu-devel] [PATCH v5 07/18] iotests: fix 097 when run with qcow

2017-03-07 Thread Eric Blake
On 02/22/2017 05:46 PM, Eric Blake wrote: > On 02/21/2017 05:55 AM, Daniel P. Berrange wrote: >> The previous commit: >> >> commit a3e1505daec31ef56f0489f8c8fff1b8e4ca92bd >> Author: Eric Blake >> Date: Mon Dec 5 09:49:34 2016 -0600 >> >> qcow2: Don't strand clusters near 2G intervals

[Qemu-devel] [PULL 19/27] sheepdog: Implement bdrv_parse_filename()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster This permits configuration with driver-specific options in addition to pseudo-filename parsed as URI. For instance, --drive driver=sheepdog,host=fido,vdi=dolly instead of --drive driver=sheepdog,file=sheepdog://fido/dolly It's also a first step towards support

[Qemu-devel] [PULL 10/27] block: Fix error handling in bdrv_replace_in_backing_chain()

2017-03-07 Thread Kevin Wolf
When adding an Error parameter, bdrv_replace_in_backing_chain() would become nothing more than a wrapper around change_parent_backing_link(). So make the latter public, renamed as bdrv_replace_node(), and remove bdrv_replace_in_backing_chain(). Most of the callers just remove a node from the graph

[Qemu-devel] [PULL 12/27] sheepdog: Fix error handling in sd_snapshot_delete()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster As a bdrv_snapshot_delete() method, sd_snapshot_delete() must set an error and return negative errno on failure. It sometimes returns -1, and sometimes neglects to set an error. It also prints error messages with error_report(). Fix all that. Moreover, its handling of

[Qemu-devel] [PULL 17/27] sheepdog: Report errors in pseudo-filename more usefully

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster Errors in the pseudo-filename are all reported with the same laconic "Can't parse filename" message. Add real error reporting, such as: $ qemu-system-x86_64 --drive driver=sheepdog,filename=sheepdog:/// qemu-system-x86_64: --drive driver=sheepdog,filename=sheepdo

[Qemu-devel] [PULL 09/27] block: Handle permission errors in change_parent_backing_link()

2017-03-07 Thread Kevin Wolf
Instead of just trying to change parents by parent over to reference @to instead of @from, and abort()ing whenever the permissions don't allow this, do proper permission checking beforehand and pass any error to the callers. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng Reviewed-by: Eric Blak

[Qemu-devel] [PULL 11/27] sheepdog: Defuse time bomb in sd_open() error handling

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster When qemu_opts_absorb_qdict() fails, sd_open() closes stdin, because sd->fd is still zero. Fortunately, qemu_opts_absorb_qdict() can't fail, because: 1. it only fails when qemu_opt_parse() fails, and 2. the only member of runtime_opts.desc[] is a QEMU_OPT_STRING, and 3.

[Qemu-devel] [PULL 25/27] sheepdog: Support blockdev-add

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qapi/block-core.json | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index d63be0a..9bb7f

[Qemu-devel] [PULL 18/27] sheepdog: Use SocketAddress and socket_connect()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster sd_parse_uri() builds a string from host and port parts for inet_connect(). inet_connect() parses it into host, port and options. Whether this gets exactly the same host, port and no options for all inputs is not obvious. Cut out the string middleman and build a SocketAd

[Qemu-devel] [PULL 14/27] sheepdog: Mark sd_snapshot_delete() lossage FIXME

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster sd_snapshot_delete() should delete the snapshot whose ID matches @snapshot_id and whose name matches @name. But that's not what it does. If @snapshot_id is a valid ID, it deletes the snapshot with that ID, else it deletes the snapshot with that name. It doesn't use @nam

[Qemu-devel] [PULL 06/27] block: Factor out should_update_child()

2017-03-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- block.c | 42 +++--- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/block.c b/block.c index f293ccb..6dc02b8 100644 --- a/block.

[Qemu-devel] [PULL 08/27] block: Ignore multiple children in bdrv_check_update_perm()

2017-03-07 Thread Kevin Wolf
change_parent_backing_link() will need to update multiple BdrvChild objects at once. Checking permissions reference by reference doesn't work because permissions need to be consistent only with all parents moved to the new child. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng Reviewed-by: Eric

[Qemu-devel] [PULL 13/27] sheepdog: Fix error handling sd_create()

2017-03-07 Thread Kevin Wolf
From: Markus Armbruster As a bdrv_create() method, sd_create() must set an error and return negative errno on failure. It prints the error instead of setting it when connect_to_sdog() fails. Fix that. While there, return the value of connect_to_sdog() like we do elsewhere, instead of -EIO. No

[Qemu-devel] [PULL 05/27] block: Fix blockdev-snapshot error handling

2017-03-07 Thread Kevin Wolf
For blockdev-snapshot, external_snapshot_prepare() accepts an arbitrary node reference at first and only checks later whether it already has a backing file. Between those places, other errors can occur. Therefore checking in external_snapshot_abort() whether state->new_bs has a backing file is not

[Qemu-devel] [PULL 00/27] Block layer fixes for 2.9.0-rc0

2017-03-07 Thread Kevin Wolf
The following changes since commit ff79d5e939c38677a575e3493eb9b4d36eb21865: Merge remote-tracking branch 'remotes/xtensa/tags/20170306-xtensa' into staging (2017-03-07 09:57:14 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fet

  1   2   3   >