Re: [Qemu-devel] Aspirant for AMD IOMMU emulation project for Outreachy

2015-09-10 Thread Jan Kiszka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2015-09-11 08:50, Jan Kiszka wrote: > Hi Rita, > > [CC'ing Andrew due to overlap with split irqchip topic] > > On 2015-09-09 19:41, Rita Sinha wrote: >> Hi Jan, >> >>> >>> Most likely than not you'll work on the Intel IOMMU and I would >>> sugge

Re: [Qemu-devel] [PATCH] ide: fix ATAPI command permissions

2015-09-10 Thread Michael Tokarev
09.09.2015 19:28, John Snow wrote: > We're a little too lenient with what we'll let an ATAPI drive handle. > Clamp down on the IDE command execution table to remove CD_OK permissions > from commands that are not and have never been ATAPI commands. FWIW, this issue has been assigned CVE-2015-6855 i

Re: [Qemu-devel] Aspirant for AMD IOMMU emulation project for Outreachy

2015-09-10 Thread Jan Kiszka
Hi Rita, [CC'ing Andrew due to overlap with split irqchip topic] On 2015-09-09 19:41, Rita Sinha wrote: > Hi Jan, > >> >> Most likely than not you'll work on the Intel IOMMU and I would >> suggest, if you wish to get your feet dirty, just start right away >> with the Intel IOMMU (In which case J

Re: [Qemu-devel] [RFC PATCH v1 00/25] error: Automatic error concatenation and prefixing

2015-09-10 Thread Markus Armbruster
Quick initial high-level feedback, since I'm afraid real review will take a while (series is long, and I'm still swamped). Peter Crosthwaite writes: > Hi Markus and all, > > This patch series adds support for automatically concatenating multiple > errors to the one Error *. > > I'll start with w

Re: [Qemu-devel] [PATCH v17 00/21] Deterministic replay core

2015-09-10 Thread Paolo Bonzini
On 11/09/2015 07:52, Pavel Dovgaluk wrote: > Paolo, > > Are these patches good enough? Haven't reviewed them as I already have a 50 patch queue. I will look at them next week. I can already tell you that I'd like some comments in front of clock warp calls, but that can be added as a follow up

Re: [Qemu-devel] [PATCH v17 00/21] Deterministic replay core

2015-09-10 Thread Pavel Dovgaluk
Paolo, Are these patches good enough? Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Monday, September 07, 2015 11:40 AM > To: qemu-devel@nongnu.org > Cc: edgar.igles...@xilinx.com; peter.mayd...@linaro.org; > igor.rubi...@gmail.co

[Qemu-devel] [PULL v1 15/21] sh4: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. This removes another architecture specific definition from the global namespace. Cc: Aurelien Jarno Acked-by: Aurelien Jarno

[Qemu-devel] [PULL v1 18/21] mips: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The bootloaders can just pass EM_MIPS directly, as that is architecture specific code. This removes another architecture specif

[Qemu-devel] [PULL v1 13/21] tricore: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The bootloader can just pass EM_TRICORE directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Bastian Koppelmann Acked-By: Bastian Koppelmann Reviewed-by: Richard Henderson Acked-By: Riku

[Qemu-devel] [PULL v1 12/21] or32: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The bootloader can just pass EM_OPENRISC directly, as that is architecture specific code. This removes another architecture spe

[Qemu-devel] [PULL v1 00/21] Multi-arch queue

2015-09-10 Thread Peter Crosthwaite
Flush of multi-arch pre-requisite work. multi-arch queue: * add EM_MOXIE * Cleanup ELF_MACHINE and remove from cpu.h The following changes since commit 9d34158a5af734e8de0b42b0a7228200c426a8d0: Merge remote-track

[Qemu-devel] [PULL v1 10/21] unicore: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. This removes another architecture specific definition from the global namespace. Cc: Guan Xuetao Reviewed-by: Richard Henderso

[Qemu-devel] [PATCH v1 14/15] cpu-common: Define tb_page_addr_t for everyone

2015-09-10 Thread Peter Crosthwaite
In system mode emulation (at least) this definition has no architecture specific dependencies. Move it to common code such that common code can use it (primarily for defining function prototypes). Signed-off-by: Peter Crosthwaite --- So this is the same as in RFCv2 and the comment there was that

[Qemu-devel] [PULL v1 09/21] moxie: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The bootloader can just pass EM_MOXIE directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Anthony Green Reviewed-by: Richard Henderson Acked-By: Riku Voipio Signed-off-by: Peter Crosthwa

[Qemu-devel] [PATCH v1 09/15] core: Convert tcg_enabled() uses to any/all variants

2015-09-10 Thread Peter Crosthwaite
Convert core code usages of tcg_enabled() which don't have a specific CPU associated with, to either tcg_any_enabled() or tcg_all_enabled(). This is to prepare support for multiple tcg engines, where queries must query a specific CPU or use global any/all logic. Signed-off-by: Peter Crosthwaite -

[Qemu-devel] [PULL v1 08/21] cris: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The bootloader can just pass EM_CRIS directly, as that is architecture specific code. This removes another architecture specifi

[Qemu-devel] [PULL v1 21/21] ppc: Rename ELF_MACHINE to be PPC specific

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite Rename ELF_MACHINE to be PPC specific. This is used as-is by the various PPC bootloaders and is locally defined to ELF_MACHINE in linux user in PPC specific ifdeffery. This removes another architecture specific definition from the global namespace (as desired by multi-arc

[Qemu-devel] [PATCH v1 12/15] cputlb: Change tlb_set_dirty() arg to cpu

2015-09-10 Thread Peter Crosthwaite
Change tlb_set_dirty() to accept a CPU instead of an env pointer. This allows for removal of another CPUArchState usage from prototypes that need to be QOMified. Signed-off-by: Peter Crosthwaite --- cputlb.c | 3 ++- exec.c| 3 +-- include/exec/cputlb.h | 2 +- 3 fi

[Qemu-devel] [PULL v1 07/21] m68k: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The machine model bootloaders can just pass EM_68K directly, as that is architecture specific code. This removes another archit

[Qemu-devel] [PATCH] iscsi: Add chap and "initiator-name" etc as per drive options

2015-09-10 Thread Fam Zheng
Previously we use "-iscsi id=target-iqn,user=foo,password=bar,..." to specify iscsi connection parameters, unfortunately it doesn't work with qemu-img. This patch adds per drive options to iscsi driver so that at least qemu-img can use the "json:{...}" filename magic. Signed-off-by: Fam Zheng --

[Qemu-devel] [PATCH v1 10/15] exec-all: Move cpu_can_do_io() to qom/cpu.h

2015-09-10 Thread Peter Crosthwaite
This function has no architecture specific dependencies and should be callable from core code. Move it to qom/cpu.h. Reviewed-by: Richard Henderson Signed-off-by: Peter Crosthwaite --- include/qom/cpu.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/qom/cpu.

[Qemu-devel] [PULL v1 19/21] alpha: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite ELF_MACHINE is unused by target alpha. Cc: Richard Henderson Reviewed-by: Richard Henderson Acked-By: Riku Voipio Signed-off-by: Peter Crosthwaite --- target-alpha/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h ind

[Qemu-devel] [PULL v1 02/21] linux-user: elfload: Provide default for elf_check_arch

2015-09-10 Thread Peter Crosthwaite
For many arch's this macro is defined as the predicatable behaviour of checking the argument for eqaulity against ELF_ARCH. Provide a default define as such, so only archs with special handling (usually allowing multiple EM values) need to provide a def. Arches that do any of: 1: provide this def

[Qemu-devel] [PULL v1 14/21] xtensa: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The bootloaders can just pass EM_XTENSA directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Max Filippov Reviewed-by: Richard Henderson Acked-By: Riku Voipio Signed-off-by: Peter Crosthw

[Qemu-devel] [PATCH v1 00/15] Multi-Arch Phase 1

2015-09-10 Thread Peter Crosthwaite
This is the first set of patches needed to enable Multi-arch system emulation. For full context refer to RFCv3: [PATCH v3 00/35] Multi Architecture System Emulation https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg03929.html This is the first patch-pack intended for merge. Original cover

[Qemu-devel] [PULL v1 03/21] elf_ops: Fix coding style for EM alias case statement

2015-09-10 Thread Peter Crosthwaite
Fix the coding style for these cases as per CODING_STYLE. Reverse the Yoda conditions and add missing if braces. Reviewed-by: Richard Henderson Signed-off-by: Peter Crosthwaite --- include/hw/elf_ops.h | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/include/

[Qemu-devel] [PULL v1 05/21] arm: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user. Linux user already has a lot of #ifdef TARGET_ customisation so instead, define ELF_ARCH as either EM_ARM or EM_AARCH64 appropriately. The armv7m bootloader can just pass EM_ARM directly, as that is architecture specifi

[Qemu-devel] [RFC PATCH v1 25/25] core: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and error_report_err() as appropriate. Cc: Paolo Bonzini Signed-off-by: Peter Crosthwaite --- arch_init.c | 5 ++--- ui/vnc.c| 5 ++--- vl.c| 7 +++ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/arch_init.c b/arch_init.c index 38f5fb9..bb8db

[Qemu-devel] [PULL v1 01/21] linux_user: elfload: Default ELF_MACHINE to ELF_ARCH

2015-09-10 Thread Peter Crosthwaite
In most (but not all) cases, ELF_MACHINE and ELF_ARCH are safely the same. Default ELF_MACHINE to ELF_ARCH. This makes defining ELF_MACHINE optional for target-*/cpu.h when they are known to match. Reviewed-by: Richard Henderson Acked-By: Riku Voipio Signed-off-by: Peter Crosthwaite --- linux

[Qemu-devel] [RFC PATCH v1 21/25] tests: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and error_report_err() as appropriate. Cc: Stefan Hajnoczi Signed-off-by: Peter Crosthwaite --- tests/test-aio.c | 5 ++--- tests/test-thread-pool.c | 5 ++--- tests/test-throttle.c| 9 - 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tes

[Qemu-devel] [PATCH v1 11/15] cputlb: move CPU_LOOP() for tlb_reset() to exec.c

2015-09-10 Thread Peter Crosthwaite
To prepare for multi-arch, cputlb.c should only have awareness of one single architecture. This means it should not have access to the full CPU lists which may be heterogeneous. Instead, push the CPU_LOOP() up to the one and only caller in exec.c. Signed-off-by: Peter Crosthwaite --- Easier readi

[Qemu-devel] [PULL v1 20/21] i386: Rename ELF_MACHINE to be x86 specific

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite Rename ELF_MACHINE to be I386 specific. This is used as-is by the multiboot loader. Linux-user previously used this definition but will not anymore, falling back to the default bahaviour of using ELF_ARCH as ELF_MACHINE. This removes another architecture specific definit

[Qemu-devel] [RFC PATCH v1 20/25] block: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and error_report_err() as appropriate. Use the prefix + propagate combo rather than manual prefix + freeing. Cc: Kevin Wolf Cc: qemu-bl...@nongnu.org Signed-off-by: Peter Crosthwaite --- block.c | 5 ++--- block/qcow2.c | 5 ++---

[Qemu-devel] [PATCH v1 06/15] translate: move real_host_page setting to -common

2015-09-10 Thread Peter Crosthwaite
Move the size and mask globals for the "real" host page size to translate-common. This is to allow system-level code to use REAL_HOST_PAGE_ALIGN and friends in builds which hide translate-all behind arch-obj. Cc: dgilb...@redhat.com Signed-off-by: Peter Crosthwaite --- translate-all.c| 2 --

[Qemu-devel] [PULL v1 17/21] sparc: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The bootloaders can just pass EM_SPARC or EM_SPARCV9 directly, as they are architecture specific code (to one or the other). This removes another architecture specific definition from the global namespace. Cc: Mark Cave-Ayland Reviewed-by: Richard Henderson Acked-By: R

[Qemu-devel] [PATCH v1 15/15] monitor: uninclude cpu_ldst

2015-09-10 Thread Peter Crosthwaite
This header is non-needed anymore and wont work in multi-arch where this service is not provided to core code. Cc: Markus Armbruster Signed-off-by: Peter Crosthwaite --- monitor.c | 1 - 1 file changed, 1 deletion(-) diff --git a/monitor.c b/monitor.c index fc32f12..0de1643 100644 --- a/monit

[Qemu-devel] [RFC PATCH v1 19/25] qdev: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and error_report_err() as appropriate. Signed-off-by: Peter Crosthwaite --- hw/core/qdev-properties.c | 7 +++ hw/core/qdev.c| 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index

[Qemu-devel] [PATCH v1 04/15] tcg: split tcg_op_defs to -common

2015-09-10 Thread Peter Crosthwaite
tcg_op_defs (and the _max) are both needed by the TCI disassembler. For multi-arch, tcg.c will be multiple-compiled (arch-obj) with its symbols hidden from common code. So split the definition off to new file, tcg-common.c which will remain a regular obj-y for use by both the TCI disas as well as t

[Qemu-devel] [PATCH v1 13/15] include/exec: Move cputlb exec.c defs out

2015-09-10 Thread Peter Crosthwaite
Move the architecture agnostic function prototypes for exec.c out of cputlb.h to exec-all.h. This allows hiding of the arch specific cputlb.h from exec.c which should be getting close to having no architecture specifics. Prepares support for multi-arch, which will have a minimal cpu.h that services

[Qemu-devel] [PULL v1 16/21] s390: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The bootloader can just pass EM_S390 directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Richard Henderson Cc: Alexander Graf Reviewed-by: Richard Henderson Acked-By: Riku Voipio Signed

[Qemu-devel] [PATCH v1 02/15] translate: Listify tcg_exec_init()

2015-09-10 Thread Peter Crosthwaite
Create a global list of tcg_exec_init() functions that is populated at startup. Multiple translation engines can register an init function and all will be called on the master call to tcg_exec_init(). Introduce a new module, translate-common. This is common code for translation functionality such

[Qemu-devel] [RFC PATCH v1 18/25] monitor: update error API usages

2015-09-10 Thread Peter Crosthwaite
Convert monitor_printf() to a error API printfer and use error_printf_fn(). Cc: Markus Armbruster Signed-off-by: Peter Crosthwaite --- hmp.c | 33 + include/monitor/monitor.h | 2 +- monitor.c | 11 +-- stubs/mon-prin

[Qemu-devel] [PATCH v1 08/15] translate-common: Listify tcg_enabled()

2015-09-10 Thread Peter Crosthwaite
Add an interface for TCG engines to register their tcg_enabled() function for addition to a global list. Each TCG engine will register and then two functions, tcg_any_enabled() & tcg_all_enabled() can be used to query the overall tcg enablement state. Signed-off-by: Peter Crosthwaite --- includ

[Qemu-devel] [PULL v1 06/21] mb: Remove ELF_MACHINE from cpu.h

2015-09-10 Thread Peter Crosthwaite
From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux-users' default behaviour or setting ELF_MACHINE to ELF_ARCH will handle this. The microblaze bootloader can just pass EM_MICROBLAZE directly, as that is architecture specific code. This removes another archit

[Qemu-devel] [RFC PATCH v1 16/25] ppc: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and error_report_err() as appropriate. Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Peter Crosthwaite --- hw/ppc/e500.c | 4 ++-- hw/ppc/spapr.c | 4 ++-- hw/ppc/spapr_drc.c | 6 ++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/p

[Qemu-devel] [RFC PATCH v1 24/25] migration: savevm: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and convert monitor_printf to error_printf_fn. Cc: Juan Quintela Signed-off-by: Peter Crosthwaite --- migration/savevm.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 6071215..683201d

[Qemu-devel] [PATCH v1 07/15] cpus: Listify cpu_list() function

2015-09-10 Thread Peter Crosthwaite
Multiple multi-arch targets may wish to implement cpu_list(). When the command is called each should be called one after other. Create a list to allow registrations. When cpu_list() is called the list is iterated calling all implementors. The original singleton #define'able cpu_list() mechanism re

[Qemu-devel] [PULL v1 04/21] elf: Update EM_MOXIE definition

2015-09-10 Thread Peter Crosthwaite
EM_MOXIE now has a proper assigned elf code. Use it. Register the old interim value as EM_MOXIE_OLD and accept either in elf loading. Cc: Anthony Green Reviewed-by: Richard Henderson Signed-off-by: Peter Crosthwaite --- hw/moxie/moxiesim.c | 1 + include/elf.h| 3 +++ include/hw/elf_

[Qemu-devel] [RFC PATCH v1 15/25] cpu: arm: Remove un-needed error checking

2015-09-10 Thread Peter Crosthwaite
Collect all errors and remove constant checking for realize failures. Cc: Peter Maydell Signed-off-by: Peter Crosthwaite --- hw/cpu/a15mpcore.c | 6 ++ hw/cpu/a9mpcore.c| 22 ++ hw/cpu/arm11mpcore.c | 18 ++ hw/cpu/realview_mpcore.c |

[Qemu-devel] [RFC PATCH v1 23/25] scsi: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use the prefix + propagate combo rather than manual prefix + freeing. Cc: Paolo Bonzini Signed-off-by: Peter Crosthwaite --- hw/scsi/vhost-scsi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 7eacca9..bd55ebc 100644 -

[Qemu-devel] [PATCH v1 05/15] tcg: Move tcg_tb_ptr to -common

2015-09-10 Thread Peter Crosthwaite
This requires global visibility to common code. Move to tcg-common. Cc: Stefan Weil Signed-off-by: Peter Crosthwaite --- tcg/tcg-common.c | 2 ++ tci.c| 6 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tcg/tcg-common.c b/tcg/tcg-common.c index 6a68c42..bcbd0

[Qemu-devel] [RFC PATCH v1 12/25] arm: netduino: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Collect all errors and remove constant checking for realize failures. Use error_report_err as appropriate. Cc: Alistair Francis Cc: Peter Maydell Signed-off-by: Peter Crosthwaite --- hw/arm/netduino2.c | 2 +- hw/arm/stm32f205_soc.c | 14 ++ 2 files changed, 3 insertions(+),

[Qemu-devel] [RFC PATCH v1 22/25] usb: bus: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and error_report_err() as appropriate. Use the prefix + propagate combo rather than manual prefix + freeing. Cc: Gerd Hoffmann Signed-off-by: Peter Crosthwaite --- hw/usb/bus.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/usb/bus.c b/hw/u

[Qemu-devel] [PATCH v1 03/15] translate-all: Move tcg_handle_interrupt() to -common

2015-09-10 Thread Peter Crosthwaite
Move this function to common code. It has no arch specific dependencies. Prepares support for multi-arch where the translate-all interface needs to be virtualised. One less thing to virtualise. Reviewed-by: Richard Henderson Signed-off-by: Peter Crosthwaite --- translate-all.c| 32

[Qemu-devel] [RFC PATCH v1 13/25] arm: allwinner: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Collect all errors and remove constant checking for realize failures. Prefix errors as appropriate and raise all errors at once at the end of machine init. Cc: Li Guang Cc: Peter Maydell Signed-off-by: Peter Crosthwaite --- hw/arm/allwinner-a10.c | 18 ++ hw/arm/cubieboard.c

[Qemu-devel] [PATCH v1 01/15] cpu-exec: Migrate some generic fns to cpu-exec-common

2015-09-10 Thread Peter Crosthwaite
The goal is to split the functions such that cpu-exec is CPU specific content, while cpus-exec-common.c is generic code only. The function interface to cpu-exec needs to be virtualised to prepare support for multi-arch and moving these definitions out saves bloating the QOM interface. So move these

[Qemu-devel] [RFC PATCH v1 10/25] arm: xlnx-zynqmp: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Collect all errors and remove constant checking for realize failures. Use error_report_err as appropriate. Cc: Alistair Francis Signed-off-by: Peter Crosthwaite --- hw/arm/xilinx_zynq.c | 14 +- hw/arm/xlnx-ep108.c | 2 +- hw/arm/xlnx-zynqmp.c | 29 +

[Qemu-devel] [RFC PATCH v1 14/25] arm: digic: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Collect all errors and remove constant checking for realize failures. Prefix errors and use error_report_err() as appropriate. Cc: Antony Pavlov Cc: Peter Maydell Signed-off-by: Peter Crosthwaite --- hw/arm/digic.c| 19 ++- hw/arm/digic_boards.c | 4 ++-- 2 files chan

[Qemu-devel] [RFC PATCH v1 05/25] error: Add error prefix API

2015-09-10 Thread Peter Crosthwaite
Add an API to prefix an already set error with a caller-centric message. If multiple errors are set, all are prefixed individually. Signed-off-by: Peter Crosthwaite --- include/qapi/error.h | 6 ++ util/error.c | 26 ++ 2 files changed, 32 insertions(+) di

[Qemu-devel] [RFC PATCH v1 17/25] i386: pc: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Use error_prefix() and error_report_err() as appropriate. Signed-off-by: Peter Crosthwaite --- hw/i386/pc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9f2924e..1edee5b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1276,9 +1276,8

[Qemu-devel] [RFC PATCH v1 06/25] error: Add error_printf_fn()

2015-09-10 Thread Peter Crosthwaite
Add an API to report an error with a custom printf function. Use this for the implementation of error_report_err(). Signed-off-by: Peter Crosthwaite --- include/qapi/error.h | 7 +++ util/error.c | 22 -- 2 files changed, 27 insertions(+), 2 deletions(-) diff -

[Qemu-devel] [RFC PATCH v1 11/25] arm: fsl-imx*: Update error API usages

2015-09-10 Thread Peter Crosthwaite
Collect all errors and remove constant checking for realize failures. Cc: Jean-Christophe Dubois Cc: Peter Maydell Signed-off-by: Peter Crosthwaite --- hw/arm/fsl-imx25.c | 46 ++ hw/arm/fsl-imx31.c | 42 ++ 2

[Qemu-devel] [RFC PATCH v1 03/25] error: Factor out common error setter logic

2015-09-10 Thread Peter Crosthwaite
Currently set_error, set_error_errno, set_error_win32 do pretty much the same thing with only a little bit of string manipulation in the error code cases. Coreify that string manipulation as a callback and factor out the bulk of the error_set fns to a common helper that calls the callback at the ri

[Qemu-devel] [RFC PATCH v1 09/25] qdev: gpio: Ignore unconnectable GPIOs

2015-09-10 Thread Peter Crosthwaite
Nop rather than assert if a GPIO connection cannot be made. This allows for continuation of machine init after an error which allows removal of error detection boilerplate and detection of subsequent errors. The actual error (i.e. a GPIO endpoint was not inited) will have already been raised by ot

[Qemu-devel] [RFC PATCH v1 08/25] memory: nop APIs when they have NULL arguments

2015-09-10 Thread Peter Crosthwaite
When doing a subregion or alias and the SR/Aliased region is NULL, perform no action. This makes the memory API tolerant of API calls following an earlier failure with setting up these dependencies. This in turn allows removal of some of the constant error-checking boiler-plate from machine models.

[Qemu-devel] [RFC PATCH v1 04/25] error: Add support for multiple errors

2015-09-10 Thread Peter Crosthwaite
Allow errors to stack. If an error is already set, don't assert, instead, form a linked list. Recent errors are at the front of the list, older ones at the back. The assertion against the destination erro already being set is removed. copy/free are all to call their functionality recursively. Pr

[Qemu-devel] [RFC PATCH v1 07/25] sysbus: mmio_map+mmio_get_region: ignore range OOB errors

2015-09-10 Thread Peter Crosthwaite
Ignore these errors as they may be a follow on effect of device realisation failure. Ideally we should have an error ** to populate in own right, but that requires an API change. Mark FIXME. Signed-off-by: Peter Crosthwaite --- hw/core/sysbus.c | 11 ++- 1 file changed, 10 insertions(+)

[Qemu-devel] [RFC PATCH v1 00/25] error: Automatic error concatenation and prefixing

2015-09-10 Thread Peter Crosthwaite
Hi Markus and all, This patch series adds support for automatically concatenating multiple errors to the one Error *. I'll start with what I am actually trying to do, which is get rid of the boilerplate: some_api_call(... , &local_err); if (local_err) { error_propagate(errp, local_err);

[Qemu-devel] [RFC PATCH v1 02/25] s390x: virtio-ccw: Remove un-needed if guard

2015-09-10 Thread Peter Crosthwaite
error_propagate is already NULL safe. Remove these un-needed if guards. Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Peter Crosthwaite --- hw/s390x/virtio-ccw.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b

[Qemu-devel] [RFC PATCH v1 01/25] exec: convert error_report to error_report_err

2015-09-10 Thread Peter Crosthwaite
This is a standard error_report_err. Convert it. Cc: Paolo Bonzini Signed-off-by: Peter Crosthwaite --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 31d2dc7..1e7fad8 100644 --- a/exec.c +++ b/exec.c @@ -1241,7 +1241,7 @@ static void *file_ram

Re: [Qemu-devel] [edk2] EDK II & GPL - Re: OVMF BoF @ KVM Forum 2015

2015-09-10 Thread Andrew Fish
> On Sep 10, 2015, at 8:44 PM, Kevin Davis wrote: > >> >> On 09/10/2015 08:14 PM, Kevin Davis wrote: >>> Ah. I wasn't in the room when they figured it out. And I've never seen >> their written opinion. Is it documented somewhere? >> >> which in turn leads to this FAQ: >> https://urlde

[Qemu-devel] [RFT PATCH v1 3/3] net: smc91c111: flush packets on RCR register changes

2015-09-10 Thread Peter Crosthwaite
The SOFT_RST or RXEN in the control register can be used as a condition to unblock the net layer via can_receive(). So check for possible flushes on RCR changes. This will drop all pending packets on soft reset or disable which is the functional intent of the can_receive() logic. Signed-off-by: Pe

[Qemu-devel] [RFT PATCH v1 2/3] net: smc91c111: gate can_receive() on rx FIFO having a slot

2015-09-10 Thread Peter Crosthwaite
Return false from can_receive() when the FIFO doesn't have a free RX slot. This fixes a bug in the current code where the allocated buffer is freed before the fifo pop, triggering a premature flush of queued RX packets. It also will handle a corner case, where the guest manually frees the allocated

[Qemu-devel] [RFT PATCH v1 1/3] net: smc91c111: guard flush_queued_packets() on can_rx()

2015-09-10 Thread Peter Crosthwaite
Check that the core can once again receive packets before asking the net layer to do a flush. This will make it more convenient to flush packets when adding new conditions to can_receive. Add missing if braces while moving the can_receive() core code. Signed-off-by: Peter Crosthwaite --- hw/ne

[Qemu-devel] [RFT PATCH v1 0/3] net: smc91c111 can_receive fixes

2015-09-10 Thread Peter Crosthwaite
Hi Richard, This should hopefully fix your bug, while addressing the extra concern I raised. There was also inconsistent behaviour with corking packets through a soft reset which I notice and fixed. Please let me know if this works for you. Regards, Peter Peter Crosthwaite (3): net: smc91c1

Re: [Qemu-devel] [PATCH] hw/misc/zynq_slcr: Change CPU clock rate

2015-09-10 Thread Peter Crosthwaite
On Thu, Sep 10, 2015 at 6:57 PM, Guenter Roeck wrote: > Hi Peter, > > On Thu, Sep 10, 2015 at 04:26:13PM -0700, Peter Crosthwaite wrote: >> On Wed, Aug 12, 2015 at 7:24 AM, Guenter Roeck wrote: >> > The Linux kernel only accepts 34 Khz and 67 Khz clock rates, and >> > may crash if the act

Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-09-10 Thread Chen Gang
On 2015年08月12日 17:00, gchen gchen wrote: > > - At present, x86_64 laptop run arm linux-user run i386 linux-user run >wine run Windows i386 graphic programs are OK, the performance is >acceptable! the qemu code keeps no touch -- our qemu is very good!!!. > Oh, sorry, wine will use execve

Re: [Qemu-devel] [edk2] EDK II & GPL - Re: OVMF BoF @ KVM Forum 2015

2015-09-10 Thread Kevin Davis
> > On 09/10/2015 08:14 PM, Kevin Davis wrote: > >> > > Ah. I wasn't in the room when they figured it out. And I've never seen > their written opinion. Is it documented somewhere? > > which in turn leads to this FAQ: > https://web.archive.org/web/20121116185559/http://lkml.org/lkml/2009/6/ > 2

Re: [Qemu-devel] [PATCH v2 1/1] atapi: abort transfers with 0 byte limits

2015-09-10 Thread Fam Zheng
On Thu, 09/10 19:20, John Snow wrote: > > +/* Nondata commands permit the byte_count_limit to be 0. > + * If this is a data-transferring PIO command and BCL is 0, > + * we abort at the /ATA/ level, not the ATAPI level. > + * See ATA8 ACS3 section 7.17.6.49 and 7.21.5 */ > +if

Re: [Qemu-devel] [PATCH v2] virtio: ring sizes vs. reset

2015-09-10 Thread Jason Wang
On 09/10/2015 07:48 PM, Cornelia Huck wrote: > We allow guests to change the size of the virtqueue rings by supplying > a number of buffers that is different from the number of buffers the > device was initialized with. Current code has some problems, however, > since reset does not reset the rin

Re: [Qemu-devel] [edk2] EDK II & GPL - Re: OVMF BoF @ KVM Forum 2015

2015-09-10 Thread Eric Blake
On 09/10/2015 08:14 PM, Kevin Davis wrote: >> >> >> On 10/09/2015 16:24, Kevin Davis wrote: >>> Further leading me to guess that any actual use of those >>> implementations could lead to you actually needing to hire a real >>> attorney and not one that you find on YouTube. >> >> The good thing is t

Re: [Qemu-devel] [edk2] EDK II & GPL - Re: OVMF BoF @ KVM Forum 2015

2015-09-10 Thread Kevin Davis
> > > On 10/09/2015 16:24, Kevin Davis wrote: > > Further leading me to guess that any actual use of those > > implementations could lead to you actually needing to hire a real > > attorney and not one that you find on YouTube. > > The good thing is that attorneys have already figured it out. I

Re: [Qemu-devel] [PATCH] hw/misc/zynq_slcr: Change CPU clock rate

2015-09-10 Thread Guenter Roeck
Hi Peter, On Thu, Sep 10, 2015 at 04:26:13PM -0700, Peter Crosthwaite wrote: > On Wed, Aug 12, 2015 at 7:24 AM, Guenter Roeck wrote: > > The Linux kernel only accepts 34 Khz and 67 Khz clock rates, and > > may crash if the actual clock rate is too low. The clock rate used to be > > (ps-cl

Re: [Qemu-devel] [PATCH] ui/cocoa.m: remove open dialog code

2015-09-10 Thread Programmingkid
On Sep 10, 2015, at 8:49 PM, Programmingkid wrote: > Remove the open dialog code that runs when no arguments are supplied with > QEMU. > Not everyone needs a hard drive or cdrom to boot their target. A user might > only > need to use their target's bios to do work. With that said, this patch re

[Qemu-devel] [PATCH v2] Add argument filters to the seccomp sandbox

2015-09-10 Thread namnamc
> The current intention of the seccomp filter in QEMU, is that /all/ existing > QEMU features continue to work unchanged. So even if a flag is used in a > seemingly uncommon code path, we still need to allow that in a seccomp > filter. It already doesn't work very well, e.g. with -chroot, it fails

Re: [Qemu-devel] [PATCH v3 1/2] spapr_drc: use RTAS return codes for methods called by RTAS

2015-09-10 Thread David Gibson
On Thu, Sep 10, 2015 at 04:11:02PM -0500, Michael Roth wrote: > Certain methods in sPAPRDRConnector objects are only ever called by > RTAS and in many cases are responsible for the logic that determines > the RTAS return codes. > > Rather than having a level of indirection requiring RTAS code to >

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-09-10 Thread David Gibson
On Thu, Sep 10, 2015 at 02:13:26PM +0200, Alexander Graf wrote: > > > > Am 10.09.2015 um 14:03 schrieb Thomas Huth : > > > >> On 10/09/15 12:40, David Gibson wrote: > >>> On Thu, Sep 10, 2015 at 09:33:21AM +0200, Thomas Huth wrote: > On 09/09/15 23:10, Thomas Huth wrote: > On 08/09/15

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-09-10 Thread David Gibson
On Thu, Sep 10, 2015 at 02:03:39PM +0200, Thomas Huth wrote: > On 10/09/15 12:40, David Gibson wrote: > > On Thu, Sep 10, 2015 at 09:33:21AM +0200, Thomas Huth wrote: > >> On 09/09/15 23:10, Thomas Huth wrote: > >>> On 08/09/15 07:15, David Gibson wrote: > >> ... > At this point rather than ju

[Qemu-devel] [PATCH] ui/cocoa.m: remove open dialog code

2015-09-10 Thread Programmingkid
Remove the open dialog code that runs when no arguments are supplied with QEMU. Not everyone needs a hard drive or cdrom to boot their target. A user might only need to use their target's bios to do work. With that said, this patch removes the unneeded open dialog code. Signed-off-by: John Arbuck

Re: [Qemu-devel] [PULL 0/19] xen-2015-09-08-tag

2015-09-10 Thread Chen, Tiejun
Thanks! I'll fold it the offending patch (http://marc.info/?l=qemu-devel&m=144174596628052&w=2) and resend. Reviewed-by: Michael S. Tsirkin Michale and Stefano, Thanks a lot :) Tiejun

Re: [Qemu-devel] [PATCH v6 00/12] Dirty bitmaps migration

2015-09-10 Thread John Snow
Ping: Quintela, David Gilbert, Amit Shah -- Looking for an ACK on this series for 2.5 time-frame. On 08/07/2015 05:32 AM, Vladimir Sementsov-Ogievskiy wrote: > From: Vladimir Sementsov-Ogievskiy > > These patches provide dirty bitmap migration feature. Only named dirty > bitmaps are to be migrat

Re: [Qemu-devel] [PATCH 08/12] migration: add migration/block-dirty-bitmap.c

2015-09-10 Thread John Snow
On 08/07/2015 05:32 AM, Vladimir Sementsov-Ogievskiy wrote: > From: Vladimir Sementsov-Ogievskiy > > Live migration of dirty bitmaps. Only named dirty bitmaps, associated with > root nodes and non-root named nodes are migrated. > > If destination qemu is already containing a dirty bitmap with

Re: [Qemu-devel] [PATCH 07/12] migration/qemu-file: add qemu_put_counted_string()

2015-09-10 Thread John Snow
On 08/07/2015 05:32 AM, Vladimir Sementsov-Ogievskiy wrote: > Add function opposite to qemu_get_counted_string. > qemu_put_counted_string puts one-byte length of the string (string > should not be longer than 255 characters), and then it puts the string, > without last zero byte. > > Signed-off-

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/4] qtest/ahci: use generate_pattern everywhere

2015-09-10 Thread Eric Blake
On 09/10/2015 05:09 PM, John Snow wrote: > Fix the pattern generation to actually be interesting, > and make sure all buffers in the ahci-test actually use it. > > Signed-off-by: John Snow > --- > tests/ahci-test.c | 23 ++- > 1 file changed, 6 insertions(+), 17 deletions(-)

[Qemu-devel] [PATCH v2 1/4] qtest/ahci: use generate_pattern everywhere

2015-09-10 Thread John Snow
Fix the pattern generation to actually be interesting, and make sure all buffers in the ahci-test actually use it. Signed-off-by: John Snow --- tests/ahci-test.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c ind

[Qemu-devel] [PATCH v2 2/4] qtest/ahci: export generate_pattern

2015-09-10 Thread John Snow
Share the pattern function for ide and ahci test. Signed-off-by: John Snow --- tests/ahci-test.c | 26 -- tests/libqos/libqos.c | 26 ++ tests/libqos/libqos.h | 1 + 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/tests/ahci-t

[Qemu-devel] [PATCH v2 0/4] ide: simple ATAPI tests

2015-09-10 Thread John Snow
We don't have any CDROM tests yet. So, add some for the PCI/BMDMA HBA. === v2: === - Some readability feedback from Markus - Added an IRQ poll for the DRQ read loop For convenience, this branch is available at: h

[Qemu-devel] [PATCH v2 4/4] ide-test: add cdrom dma test

2015-09-10 Thread John Snow
Now, test the DMA functionality of the ATAPI drive. Signed-off-by: John Snow --- tests/ide-test.c | 90 1 file changed, 72 insertions(+), 18 deletions(-) diff --git a/tests/ide-test.c b/tests/ide-test.c index b3ddcf4..5594738 100644 --- a

[Qemu-devel] [PATCH v2 3/4] ide-test: add cdrom pio test

2015-09-10 Thread John Snow
Add a simple read test for ATAPI devices, using the PIO mechanism. Signed-off-by: John Snow --- tests/ide-test.c | 157 +++ 1 file changed, 157 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index 4a07e3a..b3ddcf4 100644 --- a/

Re: [Qemu-devel] [PATCH] hw/misc/zynq_slcr: Change CPU clock rate

2015-09-10 Thread Peter Crosthwaite
On Wed, Aug 12, 2015 at 7:24 AM, Guenter Roeck wrote: > The Linux kernel only accepts 34 Khz and 67 Khz clock rates, and > may crash if the actual clock rate is too low. The clock rate used to be > (ps-clk-frequency * 26 / 4), which resulted in a CPU frequency of > 21 Khz if ps-clk-fre

  1   2   3   4   5   >