[Qemu-devel] [PATCH RFC for-2.3 0/6] qga: add three logical memory hotplug related commands

2014-12-05 Thread zhanghailiang
Hi, This patch series add three guest commands about memory block: guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-block-size. With these three commands, we can get information about guest's memory block online/offline status and memory block size (unit of memory online/offline

[Qemu-devel] [PATCH RFC for-2.3 5/6] qga: implement qmp_guest_get_memory_block_size() for Linux with sysfs

2014-12-05 Thread zhanghailiang
The size of a memory block is architecture dependent, For example, power uses 16MiB, ia64 uses 1GiB, x86 uses 128M. It represents the logical unit upon which memory online/offline operations are to be performed. This function will return the value to host user. Signed-off-by: zhanghailiang ---

[Qemu-devel] [PATCH RFC for-2.3 1/6] qga: introduce three guest memory block commands with stubs

2014-12-05 Thread zhanghailiang
Introduce three new guest commands: guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-block-size. With these three commands, we can support online/offline guest's memory block (logical memory hotplug/unplug) as required from host. Signed-off-by: zhanghailiang --- qga/commands-p

[Qemu-devel] [PATCH RFC for-2.3 4/6] qga: implement qmp_guest_set_memory_blocks() for Linux with sysfs

2014-12-05 Thread zhanghailiang
Signed-off-by: zhanghailiang --- qga/commands-posix.c | 42 +++--- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index d3f7d4f..1010e86 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@

[Qemu-devel] [PATCH RFC for-2.3 6/6] qga: add memory block command that unsupported to blacklist

2014-12-05 Thread zhanghailiang
For memory block command, we only support for linux with sysfs. Signed-off-by: zhanghailiang --- qga/commands-posix.c | 4 +++- qga/commands-win32.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 02c6b44..b701108 100644 ---

[Qemu-devel] [PATCH RFC for-2.3 2/6] qga: introduce three help functions for memory block functions

2014-12-05 Thread zhanghailiang
Signed-off-by: zhanghailiang --- qga/commands-posix.c | 130 +++ 1 file changed, 130 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index b0d6a5d..8917dca 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -1875

[Qemu-devel] [PATCH RFC for-2.3 3/6] qga: implement qmp_guest_get_memory_blocks() for Linux with sysfs

2014-12-05 Thread zhanghailiang
We can get guest's memory block information by using command "guest-get-memory-blocks", the returned value contains a list of memory block info, such as phys_index, online state, can-offline info. Signed-off-by: zhanghailiang --- qga/commands-posix.c | 66

Re: [Qemu-devel] Providing a mechanism to reopen() file based chardevs

2014-12-05 Thread Tony Breeds
On Fri, Dec 05, 2014 at 11:09:02PM +0100, Paolo Bonzini wrote: > I think so. Should it reopen stdout/stderr too? Thanks for the feedback I'm gald it's something that isn't a clearly terrible idea. I don't think that's required for my use case, but it's not all about me. If that's something pe

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

2014-12-05 Thread Greg Bellows
Thanks for the clarification Marcel. I'm not sure my stuff is quite ready to go in either, so why don't we both move ahead and we can address it when we have a better idea of who might make it in first. Yes, 2.3 would be the target and we have plenty of time. Greg On 5 December 2014 at 16:44, M

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

2014-12-05 Thread Marcel Apfelbaum
On Fri, 2014-12-05 at 14:40 -0600, Greg Bellows wrote: > Thanks Marcel. > > > Just to make sure I understand, at this point do to limitations in the > existing functionality, there is nothing that can be done other than > adding the option to the global qemu_machine_opts list. Once you add > a f

Re: [Qemu-devel] Providing a mechanism to reopen() file based chardevs

2014-12-05 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/2014 22:35, Tony Breeds wrote: > Hi All, Openstcak (Nova) has had an issue for a longish time where > a running instance (qemu via libvirt) which has a file based > console can fill the disk of the hypervisor causing all guests to > stall. >

[Qemu-devel] Providing a mechanism to reopen() file based chardevs

2014-12-05 Thread Tony Breeds
Hi All, Openstcak (Nova) has had an issue for a longish time where a running instance (qemu via libvirt) which has a file based console can fill the disk of the hypervisor causing all guests to stall. I'm looking at ways to fix this. Clearly it can be done in openstack wothout changing qemu b

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

2014-12-05 Thread Bryan D. Payne
> > Actually, it sends it through a UNIX domain socket. Still I/O, just > different I/O. "Faster" is plausible, but by how much I can't say > without measurements. "Several orders of magnitude" needs evidence. > I've been testing introspection performance on both Xen and KVM for over 5 years no

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

2014-12-05 Thread Greg Bellows
Thanks Marcel. Just to make sure I understand, at this point do to limitations in the existing functionality, there is nothing that can be done other than adding the option to the global qemu_machine_opts list. Once you add a fix then it will be possible to add it dynamically. If I missed anythi

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

2014-12-05 Thread Greg Bellows
Thanks Marcel that appears to have done the trick. On 5 December 2014 at 13:02, Marcel Apfelbaum wrote: > On Fri, 2014-12-05 at 15:16 +, Peter Maydell wrote: > > On 3 December 2014 at 20:05, Greg Bellows > wrote: > > > Adds base Vexpress class and machine objects and infrastructure. This >

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

2014-12-05 Thread Marcel Apfelbaum
On Fri, 2014-12-05 at 15:39 +, Peter Maydell wrote: > On 5 December 2014 at 15:33, Greg Bellows wrote: > > > > > > On 5 December 2014 at 09:18, Peter Maydell wrote: > >> > >> On 3 December 2014 at 20:05, Greg Bellows wrote: > >> > Added 'secure' qemu boolean option to qemu_machine_opts[]. >

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

2014-12-05 Thread Greg Bellows
On 5 December 2014 at 09:26, Peter Maydell wrote: > On 3 December 2014 at 20:06, Greg Bellows wrote: > > 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. >

Re: [Qemu-devel] [kernel PATCH v2 2/2] devicetree: document ARM bindings for QEMU's Firmware Config interface

2014-12-05 Thread Peter Maydell
On 5 December 2014 at 19:04, Laszlo Ersek wrote: > On 12/05/14 19:57, Peter Maydell wrote: >> On 30 November 2014 at 16:51, Laszlo Ersek wrote: >>> +Example: >>> + >>> +/ { >>> + #size-cells = <0x2>; >>> + #address-cells = <0x2>; >>> + >>> + fw-cfg@902 { >>> +

Re: [Qemu-devel] [kernel PATCH v2 2/2] devicetree: document ARM bindings for QEMU's Firmware Config interface

2014-12-05 Thread Laszlo Ersek
On 12/05/14 19:57, Peter Maydell wrote: > On 30 November 2014 at 16:51, Laszlo Ersek wrote: >> +Example: >> + >> +/ { >> + #size-cells = <0x2>; >> + #address-cells = <0x2>; >> + >> + fw-cfg@902 { >> + compatible = "qemu,fw-cfg-mmio"; >> + reg = <0x

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

2014-12-05 Thread Marcel Apfelbaum
On Fri, 2014-12-05 at 15:16 +, Peter Maydell wrote: > On 3 December 2014 at 20:05, Greg Bellows wrote: > > 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

Re: [Qemu-devel] [PATCH 4/4] target-i386: add Ivy Bridge CPU model

2014-12-05 Thread Eduardo Habkost
On Fri, Dec 05, 2014 at 06:44:26PM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini For reference, this is the delta from SandyBridge: model = 58; stepping = 9; features[FEAT_1_ECX] |= CPUID_EXT_F16C | CPUID_EXT_RDRAND; features[FEAT_7_0_EBX] |= CPUID_7_0_EBX_FSGSBA

Re: [Qemu-devel] [kernel PATCH v2 2/2] devicetree: document ARM bindings for QEMU's Firmware Config interface

2014-12-05 Thread Peter Maydell
On 30 November 2014 at 16:51, Laszlo Ersek wrote: > +Example: > + > +/ { > + #size-cells = <0x2>; > + #address-cells = <0x2>; > + > + fw-cfg@902 { > + compatible = "qemu,fw-cfg-mmio"; > + reg = <0x0 0x902 0x0 0x1000>; > + }; I've just no

Re: [Qemu-devel] [PATCH] target-mips: gdbstub: Clean up FPU register handling

2014-12-05 Thread Maciej W. Rozycki
On Fri, 5 Dec 2014, Leon Alrae wrote: > > qemu-mips-gdbstub-cleanup.diff > > Index: qemu-git-trunk/target-mips/gdbstub.c > > === > > --- qemu-git-trunk.orig/target-mips/gdbstub.c 2014-11-20 > > 10:44:24.058944521 + > > +++

Re: [Qemu-devel] [PATCH 0/3] hw/arm/virt: boot with -kernel -initrd -append on top of UEFI

2014-12-05 Thread Peter Maydell
On 5 December 2014 at 18:36, Laszlo Ersek wrote: > A number of tools depend on passing the kernel image, the initial > ramdisk, and the kernel command line to the guest on the QEMU command > line (options -kernel, -initrd, -append, respectively). At the moment, > these QEMU options work, but the g

Re: [Qemu-devel] [PATCH] target-mips: Correct 32-bit address space wrapping

2014-12-05 Thread Maciej W. Rozycki
On Thu, 4 Dec 2014, Leon Alrae wrote: > > Index: qemu-git-trunk/target-mips/translate.c > > === > > --- qemu-git-trunk.orig/target-mips/translate.c 2014-11-12 > > 07:41:26.597542010 + > > +++ qemu-git-trunk/target-mips/transl

Re: [Qemu-devel] [PATCH v2] arm: add fw_cfg to "virt" board

2014-12-05 Thread Laszlo Ersek
On 12/05/14 19:42, Peter Maydell wrote: > On 30 November 2014 at 16:59, Laszlo Ersek wrote: >> fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, >> ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt" >> board. >> >> The mmio register block of fw_cfg is adve

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

2014-12-05 Thread Maciej W. Rozycki
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. Rozycki --- Changes from v1: - missing braces

[Qemu-devel] [PATCH v2] target-mips: gdbstub: Clean up FPU register handling

2014-12-05 Thread Maciej W. Rozycki
Rewrite the FPU register access parts of `mips_cpu_gdb_read_register' and `mips_cpu_gdb_write_register' for consistency between each other. Signed-off-by: Maciej W. Rozycki --- Changes from v1: - missing braces added for blocks required with conditional statements. qemu-mips-gdbstub-cleanup.di

Re: [Qemu-devel] [PATCH v2] arm: add fw_cfg to "virt" board

2014-12-05 Thread Peter Maydell
On 30 November 2014 at 16:59, Laszlo Ersek wrote: > fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, > ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt" > board. > > The mmio register block of fw_cfg is advertized in the device tree. As > base address we

[Qemu-devel] [PATCH 3/3] hw/arm/virt: enable passing of EFI-stubbed kernel to guest UEFI firmware

2014-12-05 Thread Laszlo Ersek
The virt board already ensures mutual exclusion between -bios and -pflash unit#0; we only need to set "bootinfo.firmware_loaded", introduced in the previous patch, if either of those options was used to load the guest firmware. Signed-off-by: Laszlo Ersek --- hw/arm/virt.c | 1 + 1 file changed,

Re: [Qemu-devel] [PATCH 4/4] target-i386: add Ivy Bridge CPU model

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 19:36, Eduardo Habkost wrote: > On Fri, Dec 05, 2014 at 06:44:26PM +0100, Paolo Bonzini wrote: >> Signed-off-by: Paolo Bonzini >> --- >> target-i386/cpu.c | 34 +- >> 1 file changed, 33 insertions(+), 1 deletion(-) >> >> diff --git a/target-i386/cpu

[Qemu-devel] [PATCH 2/3] hw/arm: pass pristine kernel image to guest firmware over fw_cfg

2014-12-05 Thread Laszlo Ersek
Introduce the new boolean field "arm_boot_info.firmware_loaded". When this field is set, it means that the portion of guest DRAM that the VCPU normally starts to execute, or the pflash chip that the VCPU normally starts to execute, has been populated by board-specific code with full-fledged guest f

[Qemu-devel] [PATCH 0/3] hw/arm/virt: boot with -kernel -initrd -append on top of UEFI

2014-12-05 Thread Laszlo Ersek
A number of tools depend on passing the kernel image, the initial ramdisk, and the kernel command line to the guest on the QEMU command line (options -kernel, -initrd, -append, respectively). At the moment, these QEMU options work, but the guest kernel loaded this way is launched by a minimal binar

Re: [Qemu-devel] [PATCH] mips: Correctly save/restore the FP flush-to-zero state

2014-12-05 Thread Maciej W. Rozycki
On Fri, 5 Dec 2014, Leon Alrae wrote: > > I gave it a thought before making this change and concluded it would be > > the lesser evil (plus loudly manifesting and easily correctable) if > > someone accidentally makes QEMU refuse to load older images where in > > fact no compatibility issue exi

Re: [Qemu-devel] [PATCH 4/4] target-i386: add Ivy Bridge CPU model

2014-12-05 Thread Eduardo Habkost
On Fri, Dec 05, 2014 at 06:44:26PM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > target-i386/cpu.c | 34 +- > 1 file changed, 33 insertions(+), 1 deletion(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index b2bb9a4..7767564 10064

[Qemu-devel] [PATCH 1/3] hw/loader: split out load_image_gzipped_buffer()

2014-12-05 Thread Laszlo Ersek
In the next patch we'd like to reuse the image decompression facility without installing the output as a ROM at a specific guest-phys address. In addition, expose LOAD_IMAGE_MAX_GUNZIP_BYTES, because that's a straightforward "max_sz" argument for the new load_image_gzipped_buffer(). Signed-off-by

Re: [Qemu-devel] [PATCH 2/4] target-i386: add VME to all CPUs

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 19:32, Eduardo Habkost wrote: >> > vm86 mode extensions date back to the 486. All models should have >> > them. >> > >> > Signed-off-by: Paolo Bonzini > TCG doesn't support VME (that's probably why we didn't have it set on > most CPU models), and I would like to eventually make c

Re: [Qemu-devel] [PATCH 3/4] target-i386: add f16c and rdrand to Haswell and Broadwell

2014-12-05 Thread Eduardo Habkost
On Fri, Dec 05, 2014 at 06:44:25PM +0100, Paolo Bonzini wrote: > Both were added in Ivy Bridge (for which we do not have a CPU model > yet!). > > Signed-off-by: Paolo Bonzini > --- > hw/i386/pc_piix.c | 4 > hw/i386/pc_q35.c | 4 > target-i386/cpu.c | 4 ++-- > 3 files changed, 10 ins

Re: [Qemu-devel] [PATCH 2/4] target-i386: add VME to all CPUs

2014-12-05 Thread Eduardo Habkost
On Fri, Dec 05, 2014 at 06:44:24PM +0100, Paolo Bonzini wrote: > vm86 mode extensions date back to the 486. All models should have > them. > > Signed-off-by: Paolo Bonzini TCG doesn't support VME (that's probably why we didn't have it set on most CPU models), and I would like to eventually make

Re: [Qemu-devel] [PATCH 1/4] pc: add 2.3 machine types

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 19:14, Eduardo Habkost wrote: >> > #define PC_I440FX_2_2_MACHINE_OPTIONS \ >> > PC_I440FX_MACHINE_OPTIONS, \ > I was going to suggest making PC_I440FX_2_2_MACHINE_OPTIONS reuse > PC_I440FX_2_3_MACHINE_OPTIONS, but I th

Re: [Qemu-devel] [PATCH v5 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-12-05 Thread Peter Maydell
On 5 December 2014 at 16:38, Peter Maydell wrote: > On 30 November 2014 at 18:19, Eric Auger wrote: >> load_dtb is renamed into arm_load_dtb and becomes non static. >> it will be used by machvirt for dynamic instantiation of >> platform devices > > 'virt' shouldn't be a special case -- we should

Re: [Qemu-devel] [RFC PATCH v2 6/6] linux-aio: Queue requests instead of returning -EAGAIN

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 17:06, Kevin Wolf wrote: > If the queue array for io_submit() is already full, but a new request > arrives, we cannot add it to that queue anymore. We can, however, use a > CoQueue, which is implemented as a list and can therefore queue as many > requests as we want. > > Signed-off

Re: [Qemu-devel] [PATCH 1/4] pc: add 2.3 machine types

2014-12-05 Thread Eduardo Habkost
On Fri, Dec 05, 2014 at 06:44:23PM +0100, Paolo Bonzini wrote: > The next patch will differentiate them. > > Signed-off-by: Paolo Bonzini > --- > hw/i386/pc_piix.c | 28 +--- > hw/i386/pc_q35.c | 25 ++--- > 2 files changed, 47 insertions(+), 6 deleti

[Qemu-devel] [PATCH v3 2/5] raw-posix: Factor block size detection out of raw_probe_alignment()

2014-12-05 Thread Ekaterina Tumanova
Put it in new probe_logical_blocksize(). Signed-off-by: Ekaterina Tumanova --- block/raw-posix.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index b1af77e..633d5bc 100644 --- a/block/raw-

[Qemu-devel] [PATCH v3 4/5] block-backend: Add wrappers for blocksizes and geometry probing

2014-12-05 Thread Ekaterina Tumanova
Signed-off-by: Ekaterina Tumanova --- block/block-backend.c | 10 ++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index d0692b1..9cd97c6 100644 --- a/block/block-backend.c +++ b/block/block-b

[Qemu-devel] [PATCH v3 1/5] block: add bdrv functions for geometry and blocksize

2014-12-05 Thread Ekaterina Tumanova
Add driver functions for geometry and blocksize detection Signed-off-by: Ekaterina Tumanova --- block.c | 35 +++ include/block/block.h | 13 + include/block/block_int.h | 5 + 3 files changed, 53 insertions(+) diff --git a/

[Qemu-devel] [PATCH v3 3/5] block: Add driver methods to probe blocksizes and geometry

2014-12-05 Thread Ekaterina Tumanova
This patch introduces driver methods of defining disk blocksizes (physical and logical) and hard drive geometry. The method is only implemented for "host_device". For "raw" devices driver calls child's method. For the time being geometry detection will only work for DASD devices. In order to check

[Qemu-devel] [PATCH v3 0/5] Geometry and blocksize detection for backing devices.

2014-12-05 Thread Ekaterina Tumanova
This 3rd revision of the patch set. Proper geometry and blocksize information is vital for support of DASD/ECKD drives in Linux guests. Otherwise things will fail in certain cases. The existing geometry and blocksize qemu defaults have no sense for DASD drives (hd_geometry_guess detection and 512

[Qemu-devel] [PATCH v3 5/5] BlockConf: Call backend functions to detect geometry and blocksizes

2014-12-05 Thread Ekaterina Tumanova
geometry: hd_geometry_guess function autodetects the drive geometry. This patch adds a block backend call, that probes the backing device geometry. If the inner driver method is implemented and succeeds (currently only for DASDs), the blkconf_geometry will pass-through the backing device geometry.

[Qemu-devel] [Bug 1349277] Re: AArch64 emulation ignores SPSel=0 when taking (or returning from) an exception at EL1 or greater

2014-12-05 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu - 2.1+dfsg-7ubuntu3 --- qemu (2.1+dfsg-7ubuntu3) vivid; urgency=medium * d/p/target-arm-A64-Break-out-aarch64_save-restore_sp.patch d/p/target-arm-A64-Respect-SPSEL-in-ERET-SP-restore.patch d/p/target-arm-A64-Respect-SPSEL-when-taking-e

[Qemu-devel] [PATCH 3/4] target-i386: add f16c and rdrand to Haswell and Broadwell

2014-12-05 Thread Paolo Bonzini
Both were added in Ivy Bridge (for which we do not have a CPU model yet!). Signed-off-by: Paolo Bonzini --- hw/i386/pc_piix.c | 4 hw/i386/pc_q35.c | 4 target-i386/cpu.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c in

[Qemu-devel] [PATCH 2/4] target-i386: add VME to all CPUs

2014-12-05 Thread Paolo Bonzini
vm86 mode extensions date back to the 486. All models should have them. Signed-off-by: Paolo Bonzini --- hw/i386/pc_piix.c | 15 +++ hw/i386/pc_q35.c | 15 +++ target-i386/cpu.c | 30 +++--- 3 files changed, 45 insertions(+), 15 deletions(-) dif

[Qemu-devel] [PATCH 4/4] target-i386: add Ivy Bridge CPU model

2014-12-05 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target-i386/cpu.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index b2bb9a4..7767564 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1039,7 +1039,39 @@ stat

[Qemu-devel] [PATCH 1/4] pc: add 2.3 machine types

2014-12-05 Thread Paolo Bonzini
The next patch will differentiate them. Signed-off-by: Paolo Bonzini --- hw/i386/pc_piix.c | 28 +--- hw/i386/pc_q35.c | 25 ++--- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 741dffd..5ad

[Qemu-devel] [PATCH 0/3] x86 CPU model fixes

2014-12-05 Thread Paolo Bonzini
Most processors were lacking the VME flags. Haswell and Broadwell were lacking two more. And Ivy Bridge was missing altogether. Family/model/stepping for a low-end Xeon E3 v2 found on the SETI@Home CPU list (http://setiathome.berkeley.edu/cpu_list.php), they also match the Ivy Bridge Core i7 pro

Re: [Qemu-devel] [PATCH] iotests: Test non-self-referential qcow2 refblocks

2014-12-05 Thread Eric Blake
On 12/05/2014 09:53 AM, Max Reitz wrote: > It is easy to create only self-referential refblocks, but there are > cases where that is impossible. This adds a test for two of those cases > (combined in a single test case). > > Suggested-by: Eric Blake > Signed-off-by: Max Reitz > --- > This patch

Re: [Qemu-devel] [edk2] [edk2 PATCH 01/12] ArmVirtualizationPkg: VirtFdtDxe: forward FwCfg addresses from DTB to PCDs

2014-12-05 Thread Laszlo Ersek
On 11/28/14 00:19, Laszlo Ersek wrote: > Qemu's firmware configuration interface consists of two MMIO registers, a > 16-bit selector and an 8-bit data register. Parse their addresses and > verify their sizes from the DTB, and expose them to the rest of DXE by > storing them in dynamic PCDs. > > Co

Re: [Qemu-devel] [PATCH] block: fix big write

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 18:03, Max Reitz wrote: > On 2014-12-05 at 17:15, Ming Lei wrote: >> From: Ming Lei >> >> QEMU block should have supported to read/write at most >> 0x7f * 512 bytes, unfortunately INT_MAX is used to check >> bytes in both bdrv_co_do_writev() and bdrv_check_byte_request(), >> so

Re: [Qemu-devel] [PATCH] block: fix big write

2014-12-05 Thread Max Reitz
On 2014-12-05 at 17:15, Ming Lei wrote: From: Ming Lei QEMU block should have supported to read/write at most 0x7f * 512 bytes, unfortunately INT_MAX is used to check bytes in both bdrv_co_do_writev() and bdrv_check_byte_request(), so cause write failure if nr_sectors is equal or more than

Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-05 Thread Max Reitz
On 2014-12-05 at 16:32, Jun Li wrote: Currently, qemu-img can not create qcow2 image format on rbd server. Analysis the code as followings: when create qcow2 format image: qcow2_create2 bdrv_create_file(filename, opts, &local_err); --> Here will create a 0 size file(e.g: file1) on rbd serv

[Qemu-devel] [PATCH] iotests: Test non-self-referential qcow2 refblocks

2014-12-05 Thread Max Reitz
It is easy to create only self-referential refblocks, but there are cases where that is impossible. This adds a test for two of those cases (combined in a single test case). Suggested-by: Eric Blake Signed-off-by: Max Reitz --- This patch depends on version 4 (or hopefully any later version) of

Re: [Qemu-devel] [PATCH v5 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-12-05 Thread Peter Maydell
On 30 November 2014 at 18:19, Eric Auger wrote: > --- /dev/null > +++ b/hw/arm/sysbus-fdt.c > @@ -0,0 +1,180 @@ > +/* > + * ARM Platform Bus device tree generation helpers > + * > + * Copyright (c) 2014 Linaro Limited > + * > + * Authors: > + * Alex Graf > + * Eric Auger > + * > + * This progr

Re: [Qemu-devel] [PATCH v5 6/6] hw/arm/virt: add dynamic sysbus device support

2014-12-05 Thread Peter Maydell
On 30 November 2014 at 18:19, Eric Auger wrote: > Allows sysbus devices to be instantiated from command line by > using -device option. Machvirt creates a platform bus at init. > The dynamic sysbus devices are attached to this platform bus device. > > The platform bus device registers a machine in

Re: [Qemu-devel] [PATCH v5 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-12-05 Thread Peter Maydell
On 30 November 2014 at 18:19, Eric Auger wrote: > load_dtb is renamed into arm_load_dtb and becomes non static. > it will be used by machvirt for dynamic instantiation of > platform devices 'virt' shouldn't be a special case -- we should always handle setting up the DTB in guest memory in the sam

Re: [Qemu-devel] [PATCH] block: fix big write

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 17:15, Ming Lei wrote: > From: Ming Lei > > QEMU block should have supported to read/write at most > 0x7f * 512 bytes, unfortunately INT_MAX is used to check > bytes in both bdrv_co_do_writev() and bdrv_check_byte_request(), > so cause write failure if nr_sectors is equal or m

Re: [Qemu-devel] [PATCH v5 3/6] hw/arm/boot: do not free VirtBoardInfo fdt in arm_load_dtb

2014-12-05 Thread Peter Maydell
On 30 November 2014 at 18:19, Eric Auger wrote: > Currently arm_load_dtb frees the fdt handle whatever it is allocated > from load_device_tree or allocated externally. > > When adding dynamic sysbus nodes after the first dtb load, we would like > to reuse the fdt used during the first load instead

[Qemu-devel] [PATCH] block: fix big write

2014-12-05 Thread Ming Lei
From: Ming Lei QEMU block should have supported to read/write at most 0x7f * 512 bytes, unfortunately INT_MAX is used to check bytes in both bdrv_co_do_writev() and bdrv_check_byte_request(), so cause write failure if nr_sectors is equal or more than 0x40. There are still other INT_MAX u

[Qemu-devel] [RFC PATCH v2 6/6] linux-aio: Queue requests instead of returning -EAGAIN

2014-12-05 Thread Kevin Wolf
If the queue array for io_submit() is already full, but a new request arrives, we cannot add it to that queue anymore. We can, however, use a CoQueue, which is implemented as a list and can therefore queue as many requests as we want. Signed-off-by: Kevin Wolf --- block/linux-aio.c | 31

[Qemu-devel] [RFC PATCH v2 3/6] linux-aio: Don't reenter request coroutine recursively

2014-12-05 Thread Kevin Wolf
When getting an error while submitting requests, we must be careful to wake up only inactive coroutines. Therefore we must special-case the currently active coroutine and communicate an error for that request using the ordinary return value of ioq_submit(). Signed-off-by: Kevin Wolf --- block/li

[Qemu-devel] [RFC PATCH v2 5/6] linux-aio: On -EAGAIN, wait for completions

2014-12-05 Thread Kevin Wolf
Currently, if io_submit() return -EAGAIN, we immediately retry for three times (which will likely still result in -EAGAIN) and then give up, failing all requests in the queue. Instead, keep the requests queued and try to process them as soon as some earlier request completes. If our own queue is f

[Qemu-devel] [RFC PATCH v2 2/6] raw-posix: Convert Linux AIO submission to coroutines

2014-12-05 Thread Kevin Wolf
This improves the performance of requests because an ACB doesn't need to be allocated on the heap any more. It also makes the code nicer and smaller. As a side effect, the codepath taken by aio=threads is changed to use paio_submit_co(). This doesn't change the performance at this point. Results

[Qemu-devel] [RFC PATCH v2 1/6] qemu-img bench

2014-12-05 Thread Kevin Wolf
This adds a qemu-img command that allows doing some simple benchmarks for the block layer without involving guest devices and a real VM. For the start, this implements only a test of sequential reads. Signed-off-by: Kevin Wolf --- qemu-img-cmds.hx | 6 ++ qemu-img.c | 174 ++

[Qemu-devel] [RFC PATCH v2 4/6] linux-aio: Support partial io_submits

2014-12-05 Thread Kevin Wolf
io_submit() can submit less requests than we passed it. In this case, we used to fail the remaining requests, which isn't very nice. Instead, let's just keep the remaining requests around in the request queue and resubmit them after the next request completion when resources should be available for

[Qemu-devel] [RFC PATCH v2 0/6] linux-aio: Convert to coroutines

2014-12-05 Thread Kevin Wolf
This is my current branch for converting the linux-aio interface to coroutines. I started this as a performance optimisation, but I think it also makes it much easier to avoid the recursive coroutine reentrace that Ming Lei has sent a relatively complex callback-based patch for. See patch 3 for a q

Re: [Qemu-devel] [PATCH 0/3] scsi: Trivial cleanups around g_malloc()

2014-12-05 Thread Paolo Bonzini
On 04/12/2014 14:12, Markus Armbruster wrote: > Markus Armbruster (3): > scsi: Drop superfluous conditionals around g_free() > scsi: Fuse g_malloc(); memset() into g_malloc0() > scsi: Use g_new() & friends where that makes obvious sense > > hw/scsi/lsi53c895a.c | 2 +- > hw/scsi/megasa

Re: [Qemu-devel] [PATCH] scsi-disk: provide "max write same length" for block limits VPD page

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 14:00, Ming Lei wrote: > Since QEMU claims to support UNMAP, WRITE SAME and WRITE SAME 16 > in the LBP VPD page, it is better to provide "max write same length" > in response for block limits VPD page because: > > - T10 SBC-3 doesn't describe priority explicitly when all thre

Re: [Qemu-devel] [PATCH] nvme: Fix get/set number of queues feature

2014-12-05 Thread Keith Busch
On Fri, 5 Dec 2014, a...@e8storage.com wrote: From: Alex Friedman According to the specification, the low 16 bits should contain the number of I/O submission queues, and the high 16 bits should contain the number of I/O completion queues. Signed-off-by: Alex Friedman Good catch, thanks for

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

2014-12-05 Thread Eric Blake
On 12/05/2014 04:50 AM, Peter Lieven wrote: > this patch finally introduce multiread support to virtio-blk while s/introduce/introduces/ s/virtio-blk while/virtio-blk. While/ > multiwrite support was there for a long time read support was missing. s/time/time,/ > > To achieve this the patch do

Re: [Qemu-devel] [PATCH 0/4] x86: Trivial cleanups around g_malloc()

2014-12-05 Thread Paolo Bonzini
On 04/12/2014 14:46, Markus Armbruster wrote: > Markus Armbruster (4): > x86: Drop superfluous conditionals around g_free() > x86: Fuse g_malloc(); memset() into g_malloc0() > x86: Use g_new() & friends where that makes obvious sense > x86: Drop some superfluous casts from void * > > hw

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

2014-12-05 Thread Peter Maydell
On 5 December 2014 at 15:33, Greg Bellows wrote: > > > On 5 December 2014 at 09:18, Peter Maydell wrote: >> >> On 3 December 2014 at 20:05, Greg Bellows wrote: >> > Added 'secure' qemu boolean option to qemu_machine_opts[]. >> > >> > Signed-off-by: Greg Bellows >> > --- >> > vl.c | 4 >> >

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

2014-12-05 Thread Greg Bellows
On 5 December 2014 at 09:18, Peter Maydell wrote: > On 3 December 2014 at 20:05, Greg Bellows wrote: > > 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.

[Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-05 Thread Jun Li
Currently, qemu-img can not create qcow2 image format on rbd server. Analysis the code as followings: when create qcow2 format image: qcow2_create2 bdrv_create_file(filename, opts, &local_err); --> Here will create a 0 size file(e.g: file1) on rbd server. ... ret = bdrv_pwrite(bs, 0, heade

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

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:06, Greg Bellows wrote: > 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. Shouldn't this feature be "has_el3" ? It's the configurable

Re: [Qemu-devel] [PATCH] linux-user: Use the 5KEf processor for 64-bit emulation

2014-12-05 Thread Leon Alrae
On 20/11/2014 16:00, Maciej W. Rozycki wrote: > Replace the 20Kc original MIPS64 ISA processor used for 64-bit user > emulation with the 5KEf processor that implements the MIPS64r2 ISA, > complementing the choice of the 24Kf processor for 32-bit emulation. > > Signed-off-by: Maciej W. Rozycki > -

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

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:06, Greg Bellows wrote: > 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 Reviewed-by: Peter Maydell -- PMM

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

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:05, Greg Bellows wrote: > 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 comma

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

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:05, Greg Bellows wrote: > 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,

Re: [Qemu-devel] [PATCH] target-mips: Also apply the CP0.Status mask to MTTC0

2014-12-05 Thread Leon Alrae
On 20/11/2014 11:15, Maciej W. Rozycki wrote: > Make CP0.Status writes made with the MTTC0 instruction respect this > register's mask just like all the other places. Also preserve the > current values of masked out bits. > > Signed-off-by: Maciej W. Rozycki > --- > Hi, > > This should be obvio

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

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:05, Greg Bellows wrote: > 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 Bell

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 13:59, Pavel Dovgaluk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 05/12/2014 11:55, Pavel Dovgaluk wrote: > > And why is can_do_io zero? :) Is the fix to move the place where > can_do_io becomes nonzero? >>> can_do_io is set by gen_io_start function

Re: [Qemu-devel] [PATCH 0/4] x86: Trivial cleanups around g_malloc()

2014-12-05 Thread Eric Blake
On 12/04/2014 06:46 AM, Markus Armbruster wrote: > Markus Armbruster (4): > x86: Drop superfluous conditionals around g_free() > x86: Fuse g_malloc(); memset() into g_malloc0() > x86: Use g_new() & friends where that makes obvious sense > x86: Drop some superfluous casts from void * Review

Re: [Qemu-devel] [PATCH 0/2] net: Trivial cleanups around g_malloc()

2014-12-05 Thread Eric Blake
On 12/04/2014 06:28 AM, Markus Armbruster wrote: > Markus Armbruster (2): > net: Fuse g_malloc(); memset() into g_new0() > net: Use g_new() & friends where that makes obvious sense Reviewed-by: Eric Blake > > net/l2tpv3.c | 9 - > net/queue.c | 2 +- > net/slirp.c | 2 +- > 3 fil

Re: [Qemu-devel] [PATCH] target-mips: gdbstub: Clean up FPU register handling

2014-12-05 Thread Leon Alrae
On 20/11/2014 11:08, Maciej W. Rozycki wrote: > Rewrite the FPU register access parts of `mips_cpu_gdb_read_register' > and `mips_cpu_gdb_write_register' for consistency between each other. > > Signed-off-by: Maciej W. Rozycki > --- > Hi, > > This is the FPU register handling cleanup previousl

Re: [Qemu-devel] [RFC PATCH V2 2/4] hw/virtio-blk: add a constant for max number of merged requests

2014-12-05 Thread Eric Blake
On 12/05/2014 04:50 AM, Peter Lieven wrote: > As it was not obvious (at least for me) where the 32 comes from; > add a constant for it. > > Signed-off-by: Peter Lieven > --- > hw/block/virtio-blk.c |2 +- > include/hw/virtio/virtio-blk.h |4 +++- > 2 files changed, 4 insertions(

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

2014-12-05 Thread Eric Blake
On 12/05/2014 04:50 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] [PATCH v4 2/3] block: Add blockdev-backup to transaction

2014-12-05 Thread Max Reitz
On 2014-12-05 at 10:24, Max Reitz wrote: On 2014-12-05 at 07:37, Fam Zheng wrote: On Thu, 12/04 14:59, Max Reitz wrote: On 2014-12-04 at 03:29, Fam Zheng wrote: Also add version info for other transaction types. Signed-off-by: Fam Zheng --- blockdev.c | 81 ++

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Jeff Cody
On Fri, Dec 05, 2014 at 12:07:19PM +0100, Kevin Wolf wrote: > Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: > > Like for most other image formats, vhdx images read as all zero in qemu > > after their creation (we're taking advantage from the fact that qemu has > > just created the image, becau

Re: [Qemu-devel] [PATCH] mips: Correctly save/restore the FP flush-to-zero state

2014-12-05 Thread Leon Alrae
On 12/11/2014 18:58, Maciej W. Rozycki wrote: > On Wed, 12 Nov 2014, Peter Maydell wrote: > >>> @@ -208,12 +206,12 @@ int cpu_load(QEMUFile *f, void *opaque, >>> MIPSCPU *cpu = mips_env_get_cpu(env); >>> int i; >>> >>> -if (version_id < 3) { >>> +if (version_id != CPU_SAVE_VERSIO

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Jeff Cody
On Fri, Dec 05, 2014 at 12:49:22PM +0100, Kevin Wolf wrote: > Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: > > Like for most other image formats, vhdx images read as all zero in qemu > > after their creation (we're taking advantage from the fact that qemu has > > just created the image, becau

Re: [Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Max Reitz
On 2014-12-05 at 15:07, Eric Blake wrote: On 12/05/2014 06:47 AM, Max Reitz wrote: I'd like to make sure that new commands to control removable media get us closer to a sane set of such commands. Let's consider states and transitions. If we ignore the tray lock for a moment, we have:

  1   2   >