Re: [Qemu-devel] [PATCH] qmp: extend QMP to provide read/write access to physical memory

2014-12-03 Thread Fam Zheng
On Wed, 12/03 22:28, Bryan D. Payne wrote: > > > > It is critical as a transport data structure. You have to define a > > byte-by-byte > > layout (concerning endianness and padding) and use padding fields together > > with > > QEMU_PACKED, so the representation is not dependent on alignment > > >

[Qemu-devel] [Question] about ipxe version update

2014-12-03 Thread Gonglei (Arei)
Hi, Recently, my colleagues encountered a confused issue about ipxe in qemu release version, both qemu-2.1 and qemu-2.2-rc4. Details: When vm configured a lot of network devices, ipxe install failed. The result as follow: Configuring (net0 00:e0:fc::00:fc:54)Error 0x04

Re: [Qemu-devel] [RFC PATCH 3/3] virtio-blk: introduce multiread

2014-12-03 Thread Peter Lieven
On 03.12.2014 18:25, Max Reitz wrote: On 2014-12-02 at 15:33, Peter Lieven wrote: this patch finally introduce multiread support to virtio-blk while multiwrite support was there for a long time read support was missing. To achieve this the patch does serveral things which might need futher expl

Re: [Qemu-devel] [PATCH] block/rbd: fix memory leak

2014-12-03 Thread Gonglei
On 2014/12/4 14:51, Amos Kong wrote: > 'local_err' was defined for collecting error insider qemu_opts_absorb_qdict(). > We should set error to 'errp', then the error can be passed to caller, > and free the memory in future. > > Reviewed-by: Amos Kong Thanks :) Regards, -Gonglei

Re: [Qemu-devel] [PATCH] block/rbd: fix memory leak

2014-12-03 Thread Amos Kong
On Thu, Dec 04, 2014 at 02:34:11PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Variable local_err going out of scope > leaks the storage it points to. > > Cc: Markus Armbruster > Signed-off-by: Gonglei > --- > block/rbd.c | 8 > 1 file changed, 4 insertions(+), 4 deleti

Re: [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has"

2014-12-03 Thread Amos Kong
On Thu, Dec 04, 2014 at 02:18:16PM +0800, Fam Zheng wrote: > Using "has" is more slick because which(1) is not always there. > > Signed-off-by: Fam Zheng > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 47048f0..cae588c 100

[Qemu-devel] [PATCH] block/rbd: fix memory leak

2014-12-03 Thread arei.gonglei
From: Gonglei Variable local_err going out of scope leaks the storage it points to. Cc: Markus Armbruster Signed-off-by: Gonglei --- block/rbd.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 5b5a64a..f3ab2dd 100644 --- a/block/rbd.

Re: [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has"

2014-12-03 Thread Stefan Weil
Am 04.12.2014 um 07:18 schrieb Fam Zheng: > Using "has" is more slick because which(1) is not always there. > > Signed-off-by: Fam Zheng > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 47048f0..cae588c 100755 > --- a/confi

Re: [Qemu-devel] [PATCH for-2.3 0/4] s390 patches for QEMU 2.3

2014-12-03 Thread Cornelia Huck
On Wed, 3 Dec 2014 15:38:27 +0100 Jens Freimann wrote: > Cornelia, Alex, Christian, > > here are some patches targeted at QEMU 2.3. > > * Patches 1-3 are simple clean-ups > * Patch 4 moves some register values into struct kvm_run, > thereby saving us a lot of set_one_reg triggered syscall

Re: [Qemu-devel] [PATCH] qmp: extend QMP to provide read/write access to physical memory

2014-12-03 Thread Bryan D. Payne
> > It is critical as a transport data structure. You have to define a > byte-by-byte > layout (concerning endianness and padding) and use padding fields together > with > QEMU_PACKED, so the representation is not dependent on alignment This makes sense for network protocols. But, in this case,

Re: [Qemu-devel] [PATCH 0/2] Remove BLOCK_OPT_NOCOW from VDI and VPC

2014-12-03 Thread Stefan Weil
Am 03.12.2014 um 17:50 schrieb Max Reitz: > On 2014-12-03 at 16:30, Jeff Cody wrote: >> This removes the unneeded BLOCK_OPT_NOCOW options from vdi >> and vpc. >> >> Jeff Cody (2): >>block: remove BLOCK_OPT_NOCOW from vdi_create_opts >>block: remove BLOCK_OPT_NOCOW from vpc_create_opts >> >>

[Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has"

2014-12-03 Thread Fam Zheng
Using "has" is more slick because which(1) is not always there. Signed-off-by: Fam Zheng --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 47048f0..cae588c 100755 --- a/configure +++ b/configure @@ -2727,7 +2727,7 @@ fi if test "$modul

Re: [Qemu-devel] [PATCH] qmp: extend QMP to provide read/write access to physical memory

2014-12-03 Thread Fam Zheng
On Wed, 12/03 19:37, Bryan D. Payne wrote: > > > > Out of curiosity, what are existing solutions? > > > > Basically just attaching gdb and pulling memory out manually (or writing a > program to do the same). > > > > +struct request { > > > +uint8_t type; /* 0 quit, 1 read, 2 write, ...

[Qemu-devel] [PATCH v2 5/6] tests: Add test case for qemu_poll

2014-12-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile| 2 + tests/test-poll.c | 272 ++ 2 files changed, 274 insertions(+) create mode 100644 tests/test-poll.c diff --git a/tests/Makefile b/tests/Makefile index 16f0e4c..79f399d 100644 --- a/tests/

[Qemu-devel] [PATCH v2 4/6] main-loop: Replace qemu_poll_ns with qemu_poll

2014-12-03 Thread Fam Zheng
qemu_poll_set_fds + qemu_poll does the same, and when epoll is available, it is faster. Signed-off-by: Fam Zheng --- include/qemu/timer.h | 13 - main-loop.c | 35 ++- qemu-timer.c | 28 3 files changed, 30

[Qemu-devel] [PATCH v2 6/6] poll-linux: Add timerfd support

2014-12-03 Thread Fam Zheng
In qemu_poll_timerfd, we arm the timerfd with timeout_ns. The timerfd is also watched by epollfd, so that when there is no other events, epoll_wait will still return on time, even though we pass -1 (wait infinitely). Signed-off-by: Fam Zheng --- poll-linux.c | 84

[Qemu-devel] [PATCH v2 2/6] posix-aio: Use QEMU poll interface

2014-12-03 Thread Fam Zheng
The AIO handler list is only modified by aio_set_fd_handler, so we can easily add del poll fd there. Initialize a QEMUPoll and keep track of all the fds, so we don't need to rebuild a GPollFD array for g_poll in aio_poll. Signed-off-by: Fam Zheng --- aio-posix.c | 52

[Qemu-devel] [PATCH v2 3/6] poll: Add epoll implementation for qemu_poll

2014-12-03 Thread Fam Zheng
This implements qemu_poll with ppoll + epoll. The only complex part is qemu_poll_set_fds, which will sync up epollfd with epoll_ctl by computing the symmetric difference of previous and new fds. The ppoll is used to retain ns precision of timeout. Signed-off-by: Fam Zheng --- Makefile.objs |

[Qemu-devel] [PATCH v2 1/6] poll: Introduce QEMU Poll API

2014-12-03 Thread Fam Zheng
This is abstract of underlying poll implementation. A glib implementation is included. Signed-off-by: Fam Zheng --- Makefile.objs | 2 +- include/qemu/poll.h | 40 +++ include/qemu/typedefs.h | 2 + poll-glib.c | 130

[Qemu-devel] [PATCH v2 0/6] aio: Support epoll by introducing qemu_poll abstraction

2014-12-03 Thread Fam Zheng
v2: Emulate nanoseconds precison of timeout with ppoll and timerfd. Their performance is on par with each other, but both much better than qemu.git: syscall high # of fd low # of fd - qemu.git(ppoll) 44

Re: [Qemu-devel] [PATCH] qmp: extend QMP to provide read/write access to physical memory

2014-12-03 Thread Bryan D. Payne
> > Out of curiosity, what are existing solutions? > Basically just attaching gdb and pulling memory out manually (or writing a program to do the same). > +struct request { > > +uint8_t type; /* 0 quit, 1 read, 2 write, ... rest reserved */ > > +uint64_t address; /* address to read

Re: [Qemu-devel] [RFC PATCH v2 0/6] Support to change VNC keyboard layout dynamically

2014-12-03 Thread Gonglei
On 2014/12/3 20:10, Gerd Hoffmann wrote: > Hi, > >> Hi, Daniel >> Actually, my team had received the requirement of changing VNC keyboard >> layout dynamically on the scenario of Desktop Cloud. The clientele just use >> the simplest tight vnc client, but not GTK-VNC etc. I think we should supp

[Qemu-devel] [PATCH v4 3/3] qemu-iotests: Test blockdev-backup in 055

2014-12-03 Thread Fam Zheng
This applies cases on drive-backup on blockdev-backup, except cases with target format and mode. Also add a case to check source == target. Signed-off-by: Fam Zheng --- tests/qemu-iotests/055 | 211 + tests/qemu-iotests/055.out | 4 +- 2 files c

[Qemu-devel] [PATCH v4 2/3] block: Add blockdev-backup to transaction

2014-12-03 Thread Fam Zheng
Also add version info for other transaction types. Signed-off-by: Fam Zheng --- blockdev.c | 81 qapi-schema.json | 7 + 2 files changed, 88 insertions(+) diff --git a/blockdev.c b/blockdev.c index f1a..a98a4f8 100644 --- a

[Qemu-devel] [PATCH v4 1/3] qmp: Add command 'blockdev-backup'

2014-12-03 Thread Fam Zheng
Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file. Also add blocker on target bs, since the target is also a named device now. Add check and report error for bs == target which became possible but is an illegal case with introduction of

[Qemu-devel] [PATCH v4 0/3] qmp: Add "blockdev-backup"

2014-12-03 Thread Fam Zheng
v4: Rebase to block-next. Support dataplane by acquiring AioContext. (Stefan) v3: Address Eric's comments on documentation. Squashed 3/4 into 2/4. v2: Address Markus' and Eric's comments: Fix qapi schema documentation. Fix versioning of transactions. Improve test case code by

Re: [Qemu-devel] [PATCH v2 2/2] iotests: Add test for vmdk JSON file names

2014-12-03 Thread Fam Zheng
On Wed, 12/03 14:57, Max Reitz wrote: > Add a test for vmdk files which use a file with a JSON file name, and > which then try to open extents. That should fail and the error message > should at least try to look helpful. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/059 | 6 ++

Re: [Qemu-devel] [PATCH v2 1/2] vmdk: Fix error for JSON descriptor file names

2014-12-03 Thread Fam Zheng
On Wed, 12/03 14:57, Max Reitz wrote: > If vmdk blindly tries to use path_combine() using bs->file->filename as > the base file name, this will result in a bad error message for JSON > file names when calling bdrv_open(). It is better to only try > bs->file->exact_filename; if that is empty, bs->fi

Re: [Qemu-devel] [PATCH v4 17/26] progress: Allow regressing progress

2014-12-03 Thread Eric Blake
On 12/03/2014 05:37 AM, Max Reitz wrote: > Progress may regress; this should be displayed correctly by > qemu_progress_print(). > > While touching that area of code, drop the redundant parentheses in the > same condition. > > Signed-off-by: Max Reitz > --- > util/qemu-progress.c | 3 ++- > 1 fi

Re: [Qemu-devel] [PATCH v4 26/26] iotests: Add test for different refcount widths

2014-12-03 Thread Eric Blake
On 12/03/2014 05:37 AM, Max Reitz wrote: > Add a test for conversion between different refcount widths and errors > specific to certain widths (i.e. snapshots with refcount_bits=1). > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/112 | 296 > +

Re: [Qemu-devel] [PATCH v4 23/26] qcow2: Add function for refcount order amendment

2014-12-03 Thread Eric Blake
On 12/03/2014 05:37 AM, Max Reitz wrote: > Add a function qcow2_change_refcount_order() which allows changing the > refcount order of a qcow2 image. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 452 > + > block/qcow2.h |

Re: [Qemu-devel] [PATCH v4 16/26] qcow2: Allow creation with refcount order != 4

2014-12-03 Thread Eric Blake
On 12/03/2014 05:37 AM, Max Reitz wrote: > Add a creation option to qcow2 for setting the refcount order of images > to be created, and respect that option's value. > > This breaks some test outputs, fix them. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 20 > inc

Re: [Qemu-devel] [PATCH v4 24/26] qcow2: Invoke refcount order amendment function

2014-12-03 Thread Eric Blake
On 12/03/2014 05:37 AM, Max Reitz wrote: > Make use of qcow2_change_refcount_order() to support changing the > refcount order with qemu-img amend. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 44 +++- > 1 file changed, 35 insertions(+), 9 deletions

[Qemu-devel] [PATCH v4 6/6] vmdk: Set errp on failures in vmdk_open_vmdk4

2014-12-03 Thread Fam Zheng
Reported-by: Markus Armbruster Signed-off-by: Fam Zheng Reviewed-by: Markus Armbruster Reviewed-by: Don Koch Reviewed-by: Max Reitz --- block/vmdk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index da2d323..65af414 100644 --- a/block/vmdk.c +++ b/block/

[Qemu-devel] [PATCH v4 3/6] vmdk: Clean up descriptor file reading

2014-12-03 Thread Fam Zheng
Zeroing a buffer that will be filled right after is not necessary, and allocating a power of two + 1 is naughty. Suggested-by: Markus Armbruster Signed-off-by: Fam Zheng Reviewed-by: Don Koch Reviewed-by: Markus Armbruster Reviewed-by: Max Reitz --- block/vmdk.c | 5 +++-- 1 file changed, 3

[Qemu-devel] [PATCH v4 5/6] vmdk: Remove unnecessary initialization

2014-12-03 Thread Fam Zheng
It will be assigned to the return value of vmdk_read_desc. Suggested-by: Markus Armbruster Signed-off-by: Fam Zheng Reviewed-by: Markus Armbruster Reviewed-by: Don Koch Reviewed-by: Max Reitz --- block/vmdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vmdk.c b/

[Qemu-devel] [PATCH v4 0/6] vmdk: A few small fixes

2014-12-03 Thread Fam Zheng
v4: Add Don's and Max's rev-by in 1, 3, 5, 6. 2/6: Add VMFSSPARSE (Max) 4/6: Don't set errno, and add a comment. Fam Zheng (6): vmdk: Use g_random_int to generate CID vmdk: Fix comment to match code of extent lines vmdk: Clean up descriptor file reading vmdk: Check descriptor file

[Qemu-devel] [PATCH v4 2/6] vmdk: Fix comment to match code of extent lines

2014-12-03 Thread Fam Zheng
commit 04d542c8b (vmdk: support vmfs files) added support of VMFS extent type but the comment above the changed code is left out. Update the comment so they are consistent. Signed-off-by: Fam Zheng --- block/vmdk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/v

[Qemu-devel] [PATCH v4 4/6] vmdk: Check descriptor file length when reading it

2014-12-03 Thread Fam Zheng
Since a too small file cannot be a valid VMDK image, and also since the buffer's first 4 bytes will be unconditionally examined by vmdk_open_sparse, let's error out the small file case to be clear. Signed-off-by: Fam Zheng --- block/vmdk.c | 8 1 file changed, 8 insertions(+) diff --gi

[Qemu-devel] [PATCH v4 1/6] vmdk: Use g_random_int to generate CID

2014-12-03 Thread Fam Zheng
This replaces two "time(NULL)" invocations with "g_random_int()". According to VMDK spec, CID "is a random 32‐bit value updated the first time the content of the virtual disk is modified after the virtual disk is opened". Using "seconds since epoch" is just a "lame way" to generate it, and not comp

Re: [Qemu-devel] [PATCH v3 4/6] vmdk: Check descriptor file length when reading it

2014-12-03 Thread Fam Zheng
On Wed, 12/03 15:17, Max Reitz wrote: > On 2014-12-03 at 11:28, Fam Zheng wrote: > >Since a too small file cannot be a valid VMDK image, and also since the > >buffer's first 4 bytes will be unconditionally examined by > >vmdk_open_sparse, let's error out the small file case to be clear. > > > >Sign

Re: [Qemu-devel] [PATCH] qmp: extend QMP to provide read/write access to physical memory

2014-12-03 Thread Bryan D. Payne
> > In addition to Fam's review, I have a question - does this code properly > use qemu_open() so that I can use 'add-fd' to pass in a pre-opened > socket fd into fdset 1, then call pmemaccess with '/dev/fdset/1'? If > not, can you please fix it to allow this usage? > I'm not familiar with this s

Re: [Qemu-devel] [PATCH v4 15/26] iotests: Prepare for refcount_bits option

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Some tests do not work well with certain refcount widths (i.e. you > cannot create internal snapshots with refcount_bits=1), so make those > widths unsupported. > > Furthermore, add another filter to _filter_img_create in common.filter > which filters out

[Qemu-devel] Bug in s390 instruction emulation

2014-12-03 Thread Torbjörn Granlund
The s390 instruction emulation makes GMP fail most of its tests. I have isolated one of the problems: How to reproduce: gcc m.c x.s ./a.out Correct output on actual hardware: Incorrect output using QEMU 2.2.0 rc4: 0 File m.c: #include int foo(); int main() { printf("%x\n", foo()); re

Re: [Qemu-devel] [PATCH] ARM64: support access to more performance registers in AA64 mode

2014-12-03 Thread Peter Maydell
On 3 December 2014 at 20:53, Chengyu Song wrote: > The version I use is A.a Non-Confidential Beta, release on 04 September > 2013. I don't have any later version. We're up to rev A.d now; you can get it from http://infocenter.arm.com/help/topic/com.arm.doc.ddi0487a.d/index.html (if you haven't re

Re: [Qemu-devel] [PATCH] ARM64: support access to more performance registers in AA64 mode

2014-12-03 Thread Chengyu Song
Hi Christopher, > On Dec 3, 2014, at 3:25 PM, Christopher Covington wrote: > On 12/03/2014 02:12 AM, Chengyu Song wrote: >> In AA64 mode, certain system registers are access through MSR/MRS >> instructions instead of MCR/MRC. This patch added more such registers: > > If you don't mind sharing,

Re: [Qemu-devel] [PATCH] ARM64: support access to more performance registers in AA64 mode

2014-12-03 Thread Peter Maydell
On 3 December 2014 at 20:25, Christopher Covington wrote: > Hi Chengyu, > > On 12/03/2014 02:12 AM, Chengyu Song wrote: >> { .name = "PMINTENSET", .cp = 15, .crn = 9, .crm = 14, .opc1 = 0, .opc2 >> = 1, >>.access = PL1_RW, >>.fieldoffset = offsetof(CPUARMState, cp15.c9_pmint

Re: [Qemu-devel] [PATCH] ARM64: support access to more performance registers in AA64 mode

2014-12-03 Thread Christopher Covington
Hi Chengyu, On 12/03/2014 02:12 AM, Chengyu Song wrote: > In AA64 mode, certain system registers are access through MSR/MRS > instructions instead of MCR/MRC. This patch added more such registers: If you don't mind sharing, I'm curious what motivated this patch. I have a particular interest in h

[Qemu-devel] [PATCH 12/13] target-arm: Set CPU secure prop during virt init

2014-12-03 Thread Greg Bellows
Add setting of the CPU secure property based on the virt machine secure property during initialization. This enables/disables secure state during start-up. Signed-off-by: Greg Bellows --- hw/arm/virt.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.

[Qemu-devel] [PATCH 13/13] target-arm: add cpu feature EL3 to CPUs with Security Extensions

2014-12-03 Thread Greg Bellows
From: Fabian Aggeler Set ARM_FEATURE_EL3 feature for CPUs that implement Security Extensions. Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- target-arm/cpu.c | 4 1 file changed, 4 insertions(+) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 0e660f9..9e8d40c 10064

[Qemu-devel] [PATCH] target-arm: Check error conditions on kvm_arm_reset_vcpu

2014-12-03 Thread Christoffer Dall
When resetting a VCPU we currently call both kvm_arm_vcpu_init() and write_kvmstate_to_list(), both of which can fail, but we never check the return value. The only choice here is to print an error an exit if the calls fail. Signed-off-by: Christoffer Dall --- target-arm/kvm32.c | 13 ++

[Qemu-devel] [PATCH 10/13] target-arm: Add ARMCPU secure property

2014-12-03 Thread Greg Bellows
Added a "secure" state property to the ARMCPU descriptor. This property indicates whether the ARMCPU is enabled for secure state or not. By default it is disabled at this time. Signed-off-by: Greg Bellows --- target-arm/cpu-qom.h | 2 ++ target-arm/cpu.c | 24 2 f

[Qemu-devel] [PATCH 08/13] target-arm: Add virt machine secure property

2014-12-03 Thread Greg Bellows
Add "secure" virt machine specific property to allow override of the default secure state configuration. By default, when using the QEMU -kernel command line argument, virt machines boot into NS/SVC. When using the QEMU -bios command line argument, virt machines boot into S/SVC. The secure state

[Qemu-devel] [PATCH 07/13] target-arm: Add virt class and machine types

2014-12-03 Thread Greg Bellows
Switch virt qemu machine support to use the newer object type, class, and instance model. Added virt TypeInfo with static registration along with virt specific class and machine structs. Also added virt class initialization method. Signed-off-by: Greg Bellows --- hw/arm/virt.c | 40 +++

[Qemu-devel] [PATCH 09/13] target-arm: Add feature unset function

2014-12-03 Thread Greg Bellows
Add an unset_feature() function to compliment the set_feature() function. This will be used to disable functions after they have been enabled during initialization. Signed-off-by: Greg Bellows --- target-arm/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target-arm/cpu.c b/targe

[Qemu-devel] [PATCH 06/13] target-arm: Change vexpress daughterboard init arg

2014-12-03 Thread Greg Bellows
Change the Vexpress daughterboard initialization method to take a vexpress machine state pointer instead of the daughterboard struct pointer. The machine state now contains the daughterboard pointer. Signed-off-by: Greg Bellows --- hw/arm/vexpress.c | 10 +- 1 file changed, 5 insertions

[Qemu-devel] [PATCH 04/13] target-arm: Add secure qemu machine option

2014-12-03 Thread Greg Bellows
Added 'secure' qemu boolean option to qemu_machine_opts[]. Signed-off-by: Greg Bellows --- vl.c | 4 1 file changed, 4 insertions(+) diff --git a/vl.c b/vl.c index eb89d62..5d640f7 100644 --- a/vl.c +++ b/vl.c @@ -387,6 +387,10 @@ static QemuOptsList qemu_machine_opts = { .nam

[Qemu-devel] [PATCH 01/13] target-arm: Add vexpress class and machine types

2014-12-03 Thread Greg Bellows
Adds base Vexpress class and machine objects and infrastructure. This is in preparation for switching to the full QEMU object model. The base vexpress infrastructure is intended to handle common vexpress details. Signed-off-by: Greg Bellows --- hw/arm/vexpress.c | 44 ++

[Qemu-devel] [PATCH 00/13] target-arm: Add CPU security extension enablement

2014-12-03 Thread Greg Bellows
This patchset adds functionality for enabling the ARM CPU security extensions. At this time, the only machines supported are Versatile Express and the QEMU ARM virtual machines both with Cortex A9 & A15. The patchset establishes the default security state along with adding overriding controls of t

[Qemu-devel] [PATCH 05/13] target-arm: Add vexpress machine secure property

2014-12-03 Thread Greg Bellows
Add "secure" Vexpress machine specific property to allow override of the default secure state configuration. By default, when using the QEMU -kernel command line argument, Vexpress machines boot into NS/SVC. When using the QEMU -bios command line argument, Vexpress machines boot into S/SVC. The

[Qemu-devel] [PATCH 11/13] target-arm: Set CPU secure prop during VE init

2014-12-03 Thread Greg Bellows
Adds setting of the CPU secure state property based on the vexpress machine secure state property during initialization. This enablesi/disables secure state during start-up. Changes include adding an additional secure state boolean during vexpress CPU initialization. Signed-off-by: Greg Bellows

[Qemu-devel] [PATCH 03/13] target-arm: Switch to common vexpress machine init

2014-12-03 Thread Greg Bellows
Switched the Vexpress machine initialization to use the common function with the machine pointer to board info. Signed-off-by: Greg Bellows --- hw/arm/vexpress.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c

[Qemu-devel] [PATCH 02/13] target-arm: Add vexpress a9 & a15 machine objects

2014-12-03 Thread Greg Bellows
Add Vexpress machine objects for the the Cortex A9 & A15 variants. The older style QEMUMachine types were replaced with dedicated TypeInfo objects. The new objects include dedicated class init functions that currently ustilze dedicated machine init methods. The previous qemu_register_machine call

Re: [Qemu-devel] [PATCH v4 14/26] qcow2: Use symbolic macros in qcow2_amend_options

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > qcow2_amend_options() should not compare options against some inline > strings but rather use the symbolic macros available for each of the > creation options. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 31 --- > 1

Re: [Qemu-devel] [PATCH v4 13/26] qcow2: refcount_order parameter for qcow2_create2

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Add a refcount_order parameter to qcow2_create2(), use that value for > the image header and for calculating the size required for > preallocation. > > For now, always pass 4. > > This addition requires changes to the calculation of the file size for > t

Re: [Qemu-devel] [PATCH v4 11/26] qcow2: More helpers for refcount modification

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Add helper functions for getting and setting refcounts in a refcount > array for any possible refcount order, and choose the correct one during > refcount initialization. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 121 > +

Re: [Qemu-devel] [PATCH v4 10/26] qcow2: Helper function for refcount modification

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Since refcounts do not always have to be a uint16_t, all refcount blocks > and arrays in memory should not have a specific type (thus they become > pointers to void) and for accessing them, two helper functions are used > (a getter and a setter). Those fun

[Qemu-devel] [PATCH v2] target-mips: Tighten ISA level checks

2014-12-03 Thread Maciej W. Rozycki
On Wed, 19 Nov 2014, Maciej W. Rozycki wrote: Tighten ISA level checks down to MIPS II that many of our instructions are missing. Also make sure any 64-bit instruction enables are only applied to 64-bit processors, that is ones that implement at least the MIPS III ISA. Signed-off-by: Maciej W. R

Re: [Qemu-devel] [PATCH] target-mips: Tighten ISA level checks

2014-12-03 Thread Maciej W. Rozycki
On Wed, 3 Dec 2014, Leon Alrae wrote: > > -env->hflags |= MIPS_HFLAG_DM | MIPS_HFLAG_64 | MIPS_HFLAG_CP0; > > +if (env->insn_flags & ISA_MIPS3) > > +env->hflags |= MIPS_HFLAG_64; > > According to the CODING_STYLE braces are required even for a single > statement "if" b

Re: [Qemu-devel] [PATCH v4 09/26] qcow2: Helper for refcount array reallocation

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Add a helper function for reallocating a refcount array, independent of > the refcount order. The newly allocated space is zeroed and the function > handles failed reallocations gracefully. > > The helper function will always align the buffer size to a cl

Re: [Qemu-devel] [PATCH] target-mips: Tighten ISA level checks

2014-12-03 Thread Leon Alrae
On 19/11/2014 14:20, Maciej W. Rozycki wrote: > -env->hflags |= MIPS_HFLAG_DM | MIPS_HFLAG_64 | MIPS_HFLAG_CP0; > +if (env->insn_flags & ISA_MIPS3) > +env->hflags |= MIPS_HFLAG_64; According to the CODING_STYLE braces are required even for a single statement "if" block.

Re: [Qemu-devel] [PATCH v4 08/26] qcow2: Refcount overflow and qcow2_alloc_bytes()

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > qcow2_alloc_bytes() may reuse a cluster multiple times, in which case > the refcount is increased accordingly. However, if this would lead to an > overflow the function should instead just not reuse this cluster and > allocate a new one. > > Signed-off-by

Re: [Qemu-devel] [RFC PATCH 1/3] block: add accounting for merged requests

2014-12-03 Thread Eric Blake
On 12/02/2014 07:33 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block.c|2 ++ > block/accounting.c |7 +++ > block/qapi.c |2 ++ > hmp.c |6 +- > include/block/accounting.h |3 +++ > qapi/

Re: [Qemu-devel] [RFC PATCH 3/3] virtio-blk: introduce multiread

2014-12-03 Thread Max Reitz
On 2014-12-02 at 15:33, Peter Lieven wrote: this patch finally introduce multiread support to virtio-blk while multiwrite support was there for a long time read support was missing. To achieve this the patch does serveral things which might need futher explaination: - the whole merge and mult

Re: [Qemu-devel] [PATCH v3 6/6] vmdk: Set errp on failures in vmdk_open_vmdk4

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 18:28:41 +0800 Fam Zheng wrote: > Reported-by: Markus Armbruster > Signed-off-by: Fam Zheng > Reviewed-by: Markus Armbruster > --- Reviewed-by: Don Koch > block/vmdk.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block/vmdk.c b/block/vmdk.c > index ed492b

Re: [Qemu-devel] [PATCH v3 5/6] vmdk: Remove unnecessary initialization

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 18:28:40 +0800 Fam Zheng wrote: > It will be assigned to the return value of vmdk_read_desc. > > Suggested-by: Markus Armbruster > Signed-off-by: Fam Zheng > Reviewed-by: Markus Armbruster > --- Reviewed-by: Don Koch > block/vmdk.c | 2 +- > 1 file changed, 1 insertion(

Re: [Qemu-devel] [PATCH v4 07/26] qcow2: Respect error in qcow2_alloc_bytes()

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > qcow2_update_cluster_refcount() may fail, and qcow2_alloc_bytes() should > mind that case. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 33 + > 1 file changed, 21 insertions(+), 12 deletions(-) > Review

Re: [Qemu-devel] [PATCH v3 3/6] vmdk: Clean up descriptor file reading

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 18:28:38 +0800 Fam Zheng wrote: > Zeroing a buffer that will be filled right after is not necessary, and > allocating a power of two + 1 is naughty. > > Suggested-by: Markus Armbruster > Signed-off-by: Fam Zheng > --- Reviewed-by: Don Koch > block/vmdk.c | 5 +++-- > 1 f

Re: [Qemu-devel] [PATCH v3 1/6] vmdk: Use g_random_int to generate CID

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 18:28:36 +0800 Fam Zheng wrote: > This replaces two "time(NULL)" invocations with "g_random_int()". > According to VMDK spec, CID "is a random 32‐bit value updated the first > time the content of the virtual disk is modified after the virtual disk > is opened". Using "seconds s

Re: [Qemu-devel] [PATCH 0/2] Remove BLOCK_OPT_NOCOW from VDI and VPC

2014-12-03 Thread Max Reitz
On 2014-12-03 at 16:30, Jeff Cody wrote: This removes the unneeded BLOCK_OPT_NOCOW options from vdi and vpc. Jeff Cody (2): block: remove BLOCK_OPT_NOCOW from vdi_create_opts block: remove BLOCK_OPT_NOCOW from vpc_create_opts block/vdi.c | 5 - block/vpc.c | 5 - 2 files chang

Re: [Qemu-devel] [PATCH for-2.3 v2 3/6] vmdk: Clean up descriptor file reading

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 17:20:27 +0800 Fam Zheng wrote: > On Wed, 12/03 09:21, Markus Armbruster wrote: > > Fam Zheng writes: > > > > > Zeroing a buffer that will be filled right after is not necessary, and > > > allocating a power of two + 1 is naughty. > > > > > > Suggested-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 0/2] Remove BLOCK_OPT_NOCOW from VDI and VPC

2014-12-03 Thread Max Reitz
On 2014-12-03 at 16:30, Jeff Cody wrote: This removes the unneeded BLOCK_OPT_NOCOW options from vdi and vpc. Jeff Cody (2): block: remove BLOCK_OPT_NOCOW from vdi_create_opts block: remove BLOCK_OPT_NOCOW from vpc_create_opts block/vdi.c | 5 - block/vpc.c | 5 - 2 files chang

Re: [Qemu-devel] [PATCH v4 06/26] qcow2: Use 64 bits for refcount values

2014-12-03 Thread Max Reitz
On 2014-12-03 at 17:11, Eric Blake wrote: On 12/03/2014 06:37 AM, Max Reitz wrote: Refcounts may have a width of up to 64 bits, so qemu should use the same width to represent refcount values internally. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 2 +- block/qcow2-refcount.c | 42

Re: [Qemu-devel] [PATCH v4 06/26] qcow2: Use 64 bits for refcount values

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Refcounts may have a width of up to 64 bits, so qemu should use the same > width to represent refcount values internally. > > Signed-off-by: Max Reitz > --- > block/qcow2-cluster.c | 2 +- > block/qcow2-refcount.c | 42

Re: [Qemu-devel] [PATCH v4 05/26] qcow2: Use unsigned addend for update_refcount()

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > update_refcount() and qcow2_update_cluster_refcount() currently take a > signed addend. At least one caller passes a value directly derived from > an absolute refcount that should be reached ("l2_refcount - 1" in > expand_zero_clusters_in_l1()). Therefore,

Re: [Qemu-devel] [PATCH v4 04/26] qcow2: Only return status from qcow2_get_refcount

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Refcounts can theoretically be of type uint64_t; in order to be able to > represent the full range, qcow2_get_refcount() cannot use a single > variable to represent both all refcount values and also keep some values > reserved for errors. > > One solution

[Qemu-devel] [PATCH 0/2] Remove BLOCK_OPT_NOCOW from VDI and VPC

2014-12-03 Thread Jeff Cody
This removes the unneeded BLOCK_OPT_NOCOW options from vdi and vpc. Jeff Cody (2): block: remove BLOCK_OPT_NOCOW from vdi_create_opts block: remove BLOCK_OPT_NOCOW from vpc_create_opts block/vdi.c | 5 - block/vpc.c | 5 - 2 files changed, 10 deletions(-) -- 1.9.3

[Qemu-devel] [PATCH 2/2] block: remove BLOCK_OPT_NOCOW from vpc_create_opts

2014-12-03 Thread Jeff Cody
In commit fef6070, the need for NOCOW was removed from the vpc driver, as we removed the the posix calls. However, the BLOCK_OPT_NOCOW was not removed from vpc_create_opts. This was a mistake - remove the opt from there as well. Signed-off-by: Jeff Cody --- block/vpc.c | 5 - 1 file change

[Qemu-devel] [PATCH 1/2] block: remove BLOCK_OPT_NOCOW from vdi_create_opts

2014-12-03 Thread Jeff Cody
In commit 7074786, the need for NOCOW was removed from the vdi driver, as we removed the the posix calls. However, the BLOCK_OPT_NOCOW was not removed from vdi_create_opts. This was a mistake - remove the opt from there as well. Signed-off-by: Jeff Cody --- block/vdi.c | 5 - 1 file change

Re: [Qemu-devel] [PATCH 1/1] pci-host: add educational driver

2014-12-03 Thread Paolo Bonzini
On 03/12/2014 16:11, Jiri Slaby wrote: > On 10/13/2014, 03:00 PM, Paolo Bonzini wrote: >>> +static void edu_dma_timer(void *opaque) >>> +{ >>> + EduState *edu = opaque; >>> + bool raise_irq = false; >>> + >>> + qemu_mutex_lock(&edu->dma_mutex); >> >> dma_mutex and mutex and irq_mutex are no

Re: [Qemu-devel] [PATCH v4 03/26] qcow2: Do not return new value after refcount update

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > qcow2_update_cluster_refcount() does not have any quick access to the > new refcount value, it has to call qcow2_get_refcount(). Some callers do > not need that new value at all, others call qcow2_get_refcount() > themselves anyway (albeit in a different c

Re: [Qemu-devel] [PATCH 1/1] pci-host: add educational driver

2014-12-03 Thread Jiri Slaby
On 10/13/2014, 03:00 PM, Paolo Bonzini wrote: >> +static void edu_dma_timer(void *opaque) >> +{ >> +EduState *edu = opaque; >> +bool raise_irq = false; >> + >> +qemu_mutex_lock(&edu->dma_mutex); > > dma_mutex and mutex and irq_mutex are not necessary. All I/O happens > under the big Q

Re: [Qemu-devel] [PATCH v4 02/26] qcow2: Add refcount_bits to format-specific info

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Add the bit width of every refcount entry to the format-specific > information. > > In contrast to lazy_refcounts and the corrupt flag, this should be > always emitted, even for compat=0.10 although it does not support any > refcount width other than 16 b

Re: [Qemu-devel] [PATCH] ide: Check validity of logical block size

2014-12-03 Thread Kevin Wolf
Am 03.12.2014 um 13:35 hat Kevin Wolf geschrieben: > Our IDE emulation can't handle logical block sizes other than 512. Check > for it. > > The original assumption was that other values would silently be ignored > (which is bad enough), but it's not quite true: The physical block size > is exposed

Re: [Qemu-devel] [PATCH v4 01/26] qcow2: Add two new fields to BDRVQcowState

2014-12-03 Thread Eric Blake
On 12/03/2014 06:37 AM, Max Reitz wrote: > Add two new fields regarding refcount information (the bit width of > every entry and the maximum refcount value) to the BDRVQcowState. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 2 +- > block/qcow2.c | 3 +++ > block/qcow2.h

Re: [Qemu-devel] Review of monitor commands identifying BDS / BB by name

2014-12-03 Thread Markus Armbruster
Eric Blake writes: > On 12/03/2014 03:30 AM, Kevin Wolf wrote: >> [ CCed Benoît and Max, this is blockdev work ] >> [ CCed Jeff, we're also talking about op blockers ] >> >> Not stripping quoted text for their convenience. > > I still intend to go through this mail in more detail, but off of a >

Re: [Qemu-devel] [Xen-devel] [PATCH] increase maxmem before calling xc_domain_populate_physmap

2014-12-03 Thread Stefano Stabellini
On Wed, 3 Dec 2014, Don Slutz wrote: > On 12/03/14 07:20, Stefano Stabellini wrote: > > On Wed, 3 Dec 2014, Wei Liu wrote: > > > On Tue, Dec 02, 2014 at 03:23:29PM -0500, Don Slutz wrote: > > > [...] > > > > > > > >hw_error("xc_domain_getinfo failed"); > > > > > > > >} > > > > >

Re: [Qemu-devel] [PATCH] ide: Check validity of logical block size

2014-12-03 Thread Kevin Wolf
Am 03.12.2014 um 15:37 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Our IDE emulation can't handle logical block sizes other than 512. Check > > for it. > > I guess this is in part due to the 512 literals sprinkled all over the > IDE code. Yes, this is one part. The other part

Re: [Qemu-devel] [PATCH] ide: Check validity of logical block size

2014-12-03 Thread John Snow
On 12/03/2014 07:35 AM, Kevin Wolf wrote: Our IDE emulation can't handle logical block sizes other than 512. Check for it. The original assumption was that other values would silently be ignored (which is bad enough), but it's not quite true: The physical block size is exposed in IDENTIFY DEVI

[Qemu-devel] [PATCH for-2.3 4/4] s390x/kvm: avoid syscalls by syncing registers with kvm_run

2014-12-03 Thread Jens Freimann
From: David Hildenbrand We can avoid loads of syscalls when dropping to user space by storing the values of more registers directly within kvm_run. Support is added for: - ARCH0: CPU timer, clock comparator, TOD programmable register, guest breaking-event register, program parameter - P

  1   2   3   >