Re: [Qemu-devel] [PATCH 0/4] block: Drop BDS.filename

2015-02-03 Thread Kevin Wolf
Am 03.02.2015 um 14:48 hat Max Reitz geschrieben: > On 2015-02-03 at 04:32, Kevin Wolf wrote: > >Am 24.09.2014 um 21:48 hat Max Reitz geschrieben: > >>The BDS filename field is generally only used when opening disk images > >>or emitting error or warning messages, the only exception to this rule >

Re: [Qemu-devel] [PATCH v5 07/10] qmp: add rocker device support

2015-02-03 Thread Eric Blake
On 01/22/2015 01:03 AM, sfel...@gmail.com wrote: > From: Scott Feldman > > Add QMP/HMP support for rocker devices. This is mostly for debugging purposes > to see inside the device's tables and port configurations. Some examples: > QMP interface review: > +++ b/qapi-schema.json > @@ -3523,3 +

[Qemu-devel] QEMU crash on PCI passthrough

2015-02-03 Thread Krzysztof Katowicz-Kowalewski
Hello qemu-devel list, I have a problem with PCI passthrough of my second gfx card (Nvidia GTX 760). I use gentoo, gentoo-hardened kernel sources and I have SELinux enabled (anyway for purpose of these tests I've added svirt_t and virtd_t to permissive types, so it shouldn't make any problem). I u

Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-03 Thread Thomas Huth
On Tue, 03 Feb 2015 14:04:43 +0100 Paolo Bonzini wrote: > On 03/02/2015 13:11, Thomas Huth wrote: > > On s390, we've got to make sure to hold the IPTE lock while accessing > > virtual memory. So let's add an ioctl for reading and writing virtual > > memory to provide this feature for userspace, t

Re: [Qemu-devel] [PATCH] vfio: free dynamically-allocated data in instance_finalize

2015-02-03 Thread Alex Williamson
On Tue, 2015-02-03 at 13:48 +0100, Paolo Bonzini wrote: > In order to enable out-of-BQL address space lookup, destruction of > devices needs to be split in two phases. > > Unrealize is the first phase; once it complete no new accesses will > be started, but there may still be pending memory access

[Qemu-devel] Looking for Outreachy sponsors for QEMU, libvirt, and KVM internships (was Outreach Program for Women)

2015-02-03 Thread Stefan Hajnoczi
Outreach Program for Women is renaming to Outreachy. The new website is: http://outreachy.org/ What is Outreachy? Outreachy helps people from underrepresented groups join the open source community through a 12-week full-time paid internship. The format is similar to Google Summer of Code. Inste

Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 16:16, Thomas Huth wrote: > Actually, I'd prefer to keep the "virtual" in the defines for the type > of operation below: When it comes to s390 storage keys, we likely might > need some calls for reading and writing to physical memory, too. Then > we could simply extend this ioctl in

Re: [Qemu-devel] [PATCH] block: introduce BDRV_REQUEST_MAX_SECTORS

2015-02-03 Thread Denis V. Lunev
On 03/02/15 17:30, Peter Lieven wrote: Am 03.02.2015 um 14:29 schrieb Denis V. Lunev: On 03/02/15 15:12, Peter Lieven wrote: we check and adjust request sizes at several places with sometimes inconsistent checks or default values: INT_MAX INT_MAX >> BDRV_SECTOR_BITS UINT_MAX >> BDRV_SECTO

[Qemu-devel] [PATCH v3 0/8] Linked list for tcg ops

2015-02-03 Thread Richard Henderson
Currently tcg ops are simply placed in a buffer in order. Which is fine until we want to actually do something with the opcode stream, such as optimize them. Note the horrible things like call opcodes needing their argument count both prefixed and postfixed so that we can iterate across the call

[Qemu-devel] [PATCH v3 6/8] tcg: Remove opcodes instead of noping them out

2015-02-03 Thread Richard Henderson
With the linked list scheme we need not leave nops in the stream that we need to process later. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- tcg/optimize.c | 14 +++--- tcg/tcg.c | 28 tcg/tcg.h | 1 + 3 files changed, 32 i

[Qemu-devel] [PATCH v3 4/8] tcg: Introduce tcg_op_buf_count and tcg_op_buf_full

2015-02-03 Thread Richard Henderson
The method by which we count the number of ops emitted is going to change. Abstract that away into some inlines. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- target-alpha/translate.c | 14 +++--- target-arm/translate-a64.c| 9 +++-- target-arm/tran

[Qemu-devel] [PATCH v3 2/8] tcg: Reduce ifdefs in tcg-op.c

2015-02-03 Thread Richard Henderson
Almost completely eliminates the ifdefs in this file, improving confidence in the lesser used 32-bit builds. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 449 +++ 1 file changed, 207 insertions(+), 24

[Qemu-devel] [PATCH v3 8/8] tcg: Remove unused opcodes

2015-02-03 Thread Richard Henderson
We no longer need INDEX_op_end to terminate the list, nor do we need 5 forms of nop, since we just remove the TCGOp instead. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- tcg/tcg-opc.h | 9 - tcg/tcg.c | 7 ++- tci.c | 13 - 3 files c

[Qemu-devel] [PATCH v3 5/8] tcg: Put opcodes in a linked list

2015-02-03 Thread Richard Henderson
The previous setup required ops and args to be completely sequential, and was error prone when it came to both iteration and optimization. Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 22 ++- tcg/optimize.c| 286 ++- tcg/tcg-op.c

[Qemu-devel] [PATCH v3 3/8] tcg: Move emit of INDEX_op_end into gen_tb_end

2015-02-03 Thread Richard Henderson
Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 2 ++ target-alpha/translate.c | 2 +- target-arm/translate-a64.c| 1 - target-arm/translate.c| 1 - target-cris/translate.c | 2 +- target-i386/translate.c | 2 +- t

[Qemu-devel] [PATCH v3 7/8] tcg: Implement insert_op_before

2015-02-03 Thread Richard Henderson
Rather reserving space in the op stream for optimization, let the optimizer add ops as necessary. Signed-off-by: Richard Henderson --- tcg/optimize.c | 57 +++-- tcg/tcg-op.c | 21 - tcg/tcg-op.h | 1 - 3 files changed,

Re: [Qemu-devel] [PATCH v2 3/7] softfloat: Convert `*_default_nan' variables into inline functions

2015-02-03 Thread Richard Henderson
On 01/30/2015 08:02 AM, Maciej W. Rozycki wrote: > Hmm, so perhaps my idea for a later improvement: > >> > Eventually we might want to move the new inline functions into a >> > separate header to be included from softfloat.h instead of softfloat.c, >> > but let's make changes one step at a time.

Re: [Qemu-devel] [RFC 02/10] use a different translation block list for each cpu.

2015-02-03 Thread Richard Henderson
On 01/16/2015 09:19 AM, fred.kon...@greensocs.com wrote: > @@ -759,7 +760,9 @@ static void page_flush_tb_1(int level, void **lp) > PageDesc *pd = *lp; > > for (i = 0; i < V_L2_SIZE; ++i) { > -pd[i].first_tb = NULL; > +for (j = 0; j < MAX_CPUS; j++) { > +

Re: [Qemu-devel] [PATCH v5 02/10] virtio-net: use qemu_mac_strdup_printf

2015-02-03 Thread Eric Blake
On 01/22/2015 01:03 AM, sfel...@gmail.com wrote: > From: Scott Feldman > > Signed-off-by: Scott Feldman > --- > hw/net/virtio-net.c | 12 +++- > 1 file changed, 3 insertions(+), 9 deletions(-) You could merge this with 1/10 without any dire consequences. But whether you merge or kee

Re: [Qemu-devel] [RFC PATCH v2 09/11] hw/arm/virt-acpi-build: Generate XSDT table

2015-02-03 Thread Igor Mammedov
On Thu, 29 Jan 2015 16:37:11 +0800 Shannon Zhao wrote: > XDST points to other tables except FACS & DSDT. Is there any reason to use XSDT instead of RSDT? If ACPI tables are below 4Gb which probably would be the case then RSDT could be used just fine and we could share more code between x86 and AR

Re: [Qemu-devel] [PATCH] vfio: free dynamically-allocated data in instance_finalize

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 16:20, Alex Williamson wrote: > On Tue, 2015-02-03 at 13:48 +0100, Paolo Bonzini wrote: >> In order to enable out-of-BQL address space lookup, destruction of >> devices needs to be split in two phases. >> >> Unrealize is the first phase; once it complete no new accesses will >> be s

Re: [Qemu-devel] [PATCH 0/7] MIPS: IEEE 754-2008 features support

2015-02-03 Thread Thomas Schwinge
Hi! On Fri, 30 Jan 2015 13:47:17 +, "Maciej W. Rozycki" wrote: > On Fri, 30 Jan 2015, Peter Maydell wrote: > > > > This patch series comprises changes to QEMU, both the MIPS backend and > > > generic SoftFloat support code, to support IEEE 754-2008 features > > > introduced to revision 3.5

Re: [Qemu-devel] [RFC 05/10] extract TBContext from TCGContext.

2015-02-03 Thread Richard Henderson
On 01/29/2015 07:44 AM, Peter Maydell wrote: > On 16 January 2015 at 17:19, wrote: >> From: KONRAD Frederic >> >> In order to have one TCGContext per thread and a single TBContext we have to >> extract TBContext from TCGContext. > > This seems a bit odd. It's not clear to me what the advantages

Re: [Qemu-devel] [RFC 02/10] use a different translation block list for each cpu.

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 17:17, Richard Henderson wrote: >> > @@ -759,7 +760,9 @@ static void page_flush_tb_1(int level, void **lp) >> > PageDesc *pd = *lp; >> > >> > for (i = 0; i < V_L2_SIZE; ++i) { >> > -pd[i].first_tb = NULL; >> > +for (j = 0; j < MAX_CPUS; j+

Re: [Qemu-devel] [PATCH v5 03/10] rocker: add register programming guide

2015-02-03 Thread Eric Blake
On 01/22/2015 01:03 AM, sfel...@gmail.com wrote: > From: Scott Feldman > > This is the register programming guide for the Rocker device. It's intended > for driver writers and device writers. It covers the device's PCI space, > the register set, DMA interface, and interrupts. > In addition to

Re: [Qemu-devel] [RFC PATCH v2 09/11] hw/arm/virt-acpi-build: Generate XSDT table

2015-02-03 Thread Laszlo Ersek
On 02/03/15 17:19, Igor Mammedov wrote: > On Thu, 29 Jan 2015 16:37:11 +0800 > Shannon Zhao wrote: > >> XDST points to other tables except FACS & DSDT. > Is there any reason to use XSDT instead of RSDT? > If ACPI tables are below 4Gb which probably would > be the case then RSDT could be used just

[Qemu-devel] balloon vs postcopy migrate

2015-02-03 Thread Dr. David Alan Gilbert
Hi, Andrea pointed out there is a risk that a guest inflating its balloon during a postcopy migrate could cause us problems, and I wanted to see what the best way of avoiding the problem was. Guests inflating there balloon cause an madvise(MADV_DONTNEED) on the host, marking pages as not present

Re: [Qemu-devel] [PATCH] vfio: free dynamically-allocated data in instance_finalize

2015-02-03 Thread Alex Williamson
On Tue, 2015-02-03 at 17:25 +0100, Paolo Bonzini wrote: > > On 03/02/2015 16:20, Alex Williamson wrote: > > On Tue, 2015-02-03 at 13:48 +0100, Paolo Bonzini wrote: > >> In order to enable out-of-BQL address space lookup, destruction of > >> devices needs to be split in two phases. > >> > >> Unreal

Re: [Qemu-devel] [PATCH] vfio: free dynamically-allocated data in instance_finalize

2015-02-03 Thread Alex Williamson
On Tue, 2015-02-03 at 10:26 -0700, Alex Williamson wrote: > On Tue, 2015-02-03 at 17:25 +0100, Paolo Bonzini wrote: > > > > On 03/02/2015 16:20, Alex Williamson wrote: > > > On Tue, 2015-02-03 at 13:48 +0100, Paolo Bonzini wrote: > > >> In order to enable out-of-BQL address space lookup, destructi

Re: [Qemu-devel] balloon vs postcopy migrate

2015-02-03 Thread Pankaj Gupta
> Hi, > Andrea pointed out there is a risk that a guest inflating its > balloon during a postcopy migrate could cause us problems, and > I wanted to see what the best way of avoiding the problem was. > > Guests inflating there balloon cause an madvise(MADV_DONTNEED) on > the host, marking pages

Re: [Qemu-devel] balloon vs postcopy migrate

2015-02-03 Thread Dr. David Alan Gilbert
* Pankaj Gupta (pagu...@redhat.com) wrote: > > > Hi, > > Andrea pointed out there is a risk that a guest inflating its > > balloon during a postcopy migrate could cause us problems, and > > I wanted to see what the best way of avoiding the problem was. > > > > Guests inflating there balloon cau

Re: [Qemu-devel] [PATCH] integrator/cp: Wire up MMC card detection

2015-02-03 Thread Peter Maydell
On 30 January 2015 at 20:19, Jan Kiszka wrote: > This allows to use MMC emulation with the Integrator/CP model. Well, > mostly. There seems to be timing issues with Linux so that the card is > not always detected (but most of the time). > > Note that the read-only pin is intentionally left unconne

[Qemu-devel] [PATCH 2/2] target-i386: Eliminate unnecessary get_cpuid_vendor() function

2015-02-03 Thread Eduardo Habkost
The function was used in only two places. In one of them, the function made the code less readable by requiring temporary te[bcd]x variables. In the other one we can simply inline the existing code. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 20 ++-- 1 file changed, 6

[Qemu-devel] [PATCH 0/2] target-i386: Small code cleanup

2015-02-03 Thread Eduardo Habkost
Just two small code cleanups in target-i386/cpu.c. Patch 1/2 changes behavior of "-cpu ?" to not print feature names in reverse order anymore. Patch 2/2 doesn't introduce any behavior changes. Eduardo Habkost (2): target-i386: Simplify listflags() function target-i386: Eliminate unnecessary g

[Qemu-devel] [PATCH 1/2] target-i386: Simplify listflags() function

2015-02-03 Thread Eduardo Habkost
listflags() had lots of unnecessary complexity. Instead of printing to a buffer that will be immediately printed, simply call the printing function directly. Also, remove the fbits and flags arguments that were always set to the same value. Also, there's no need to list the flags in reverse order.

Re: [Qemu-devel] [PATCH 2/2] target-i386: Eliminate unnecessary get_cpuid_vendor() function

2015-02-03 Thread Andreas Färber
Am 03.02.2015 um 19:08 schrieb Eduardo Habkost: > The function was used in only two places. In one of them, the function > made the code less readable by requiring temporary te[bcd]x variables. > In the other one we can simply inline the existing code. > > Signed-off-by: Eduardo Habkost Reviewed

Re: [Qemu-devel] [PATCH] vfio: free dynamically-allocated data in instance_finalize

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 18:26, Alex Williamson wrote: > Hmm, except qemu segfaults in whatever sanity test/capabilities probing > happens when the VM is first opened. I haven't figured out how to > capture that instance in gdb yet. hw/vfio/common.c changes were missing. :( Will retest and resend tomorro

Re: [Qemu-devel] [PATCH v3 3/4] target-arm: Add 32/64-bit register sync

2015-02-03 Thread Peter Maydell
On 27 January 2015 at 23:58, Greg Bellows wrote: > Add AArch32 to AArch64 register sychronization functions. > Replace manual register synchronization with new functions in > aarch64_cpu_do_interrupt() and HELPER(exception_return)(). > > Signed-off-by: Greg Bellows > > --- > > v2 -> v3 > - Condit

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add AArch32 guest support to KVM64

2015-02-03 Thread Peter Maydell
On 27 January 2015 at 23:58, Greg Bellows wrote: > Add 32-bit to/from 64-bit register synchronization on register gets and puts. > Set EL1_32BIT feature flag passed to KVM > > Signed-off-by: Greg Bellows > > --- > > v2 -> v3 > - Conditionalize sync of 32-bit and 64-bit registers > --- > target-a

[Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
Hi, I'm interested in adding a way for a host to pass environment variables into a qemu guest VM -- analogous to setting environment variables for a process to access via getenv() and friends. The QEMU Guest Agent (QGA) does not appear to quite fit the bill, at least not in its current form: The

Re: [Qemu-devel] [PATCH v3 2/4] target-arm: Add feature parsing to virt

2015-02-03 Thread Peter Maydell
On 27 January 2015 at 23:58, Greg Bellows wrote: > Added machvirt parsing of feature keywords added to the -cpu command line > option. Parsing occurs during machine initialization. > -vbi = find_machine_info(cpu_model); > +/* Separate the actual CPU model name from any appended features

Re: [Qemu-devel] [PATCH v3 1/4] target-arm: Add CPU property to disable AArch64

2015-02-03 Thread Peter Maydell
On 27 January 2015 at 23:58, Greg Bellows wrote: > Adds registration and get/set functions for enabling/disabling the AArch64 > execution state on AArch64 CPUs. By default AArch64 execution state is > enabled > on AArch64 CPUs, setting the property to off, will disable the execution > state. >

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Denis V. Lunev
On 03/02/15 22:09, Gabriel L. Somlo wrote: Hi, I'm interested in adding a way for a host to pass environment variables into a qemu guest VM -- analogous to setting environment variables for a process to access via getenv() and friends. The QEMU Guest Agent (QGA) does not appear to quite fit the

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

2015-02-03 Thread Kevin Wolf
Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: > 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 | 46 ++-

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Eric Blake
On 02/03/2015 12:09 PM, Gabriel L. Somlo wrote: > Hi, > > I'm interested in adding a way for a host to pass environment variables > into a qemu guest VM -- analogous to setting environment variables for > a process to access via getenv() and friends. > > The QEMU Guest Agent (QGA) does not appear

[Qemu-devel] [PATCH v2 4/9] target-i386: Simplify error handling on cpu_x86_init_user()

2015-02-03 Thread Eduardo Habkost
Isolate error handling path from the "if (error)" checks. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 43d958e..632a1ba 100644 --- a/target-i386/cpu.c +++

[Qemu-devel] [PATCH v2 1/9] target-i386: Move topology.h to include/hw/i386

2015-02-03 Thread Eduardo Habkost
This will allow the PC code to use the header, and lets us eliminate the QEMU_INCLUDES hack inside tests/Makefile. Signed-off-by: Eduardo Habkost --- Change v2: * Move it to include/hw/i386 instead of hw/i386 --- {target-i386 => include/hw/i386}/topology.h | 6 +++--- target-i386/cpu.c

[Qemu-devel] [PATCH v2 0/9] target-i386: Simplify APIC ID initialization, move compat code to pc.c

2015-02-03 Thread Eduardo Habkost
This series removes the APIC ID initialization code from x86_cpu_initfn() (getting us one step closer to making object_new() of X86CPU have no dependency on cpu_exec_init() and other global QEMU state), and moves the APIC ID compatibility logic from target-i386/cpu.c to hw/i386/pc.c. Changes v1 ->

[Qemu-devel] [PATCH v2 2/9] target-i386: Rename cpu_x86_init() to cpu_x86_init_user()

2015-02-03 Thread Eduardo Habkost
The function is used only for CONFIG_USER, so make its purpose clear. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 +- target-i386/cpu.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index c45c9b1..5e4010c 100644 --- a/

[Qemu-devel] [PATCH v2 5/9] target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id

2015-02-03 Thread Eduardo Habkost
The field doesn't need to be inside CPUState, and it is not specific for the CPUID instruction, so move and rename it. Signed-off-by: Eduardo Habkost --- target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 17 - target-i386/cpu.h | 1 - target-i386/kvm.c | 2 +- 4 fil

[Qemu-devel] [PATCH v2 9/9] target-i386: Move APIC ID compatibility code to pc.c

2015-02-03 Thread Eduardo Habkost
The APIC ID compatibility code is required only for PC, and now that x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that code can be moved to pc.c. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 35 +++ target-i386/cpu.c | 34 --

[Qemu-devel] [PATCH v2 3/9] target-i386: Eliminate cpu_init() function

2015-02-03 Thread Eduardo Habkost
Instead of putting extra logic inside cpu.h, just do everything inside cpu_x86_init_user(). Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 6 +++--- target-i386/cpu.h | 12 +++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

[Qemu-devel] [PATCH v2 6/9] linux-user: Check for cpu_init() errors

2015-02-03 Thread Eduardo Habkost
This was the only caller of cpu_init() that was not checking for NULL yet. Signed-off-by: Eduardo Habkost Cc: Riku Voipio --- linux-user/main.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux-user/main.c b/linux-user/main.c index cfa7d07..d0ecde4 100644 --- a/l

[Qemu-devel] [PATCH v2 7/9] target-i386: Set APIC ID using cpu_index on CONFIG_USER

2015-02-03 Thread Eduardo Habkost
The PC CPU initialization code already sets apic-id based on the CPU topology, and CONFIG_USER doesn't need the topology-based APIC ID calculation code. Make CONFIG_USER set apic-id before realizing the CPU (just like PC already does), so we can simplify x86_cpu_initfn later. As there is no CPU to

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

2015-02-03 Thread Max Reitz
On 2015-02-03 at 14:26, Kevin Wolf wrote: Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: 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-refcou

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
Hi Denis, On Tue, Feb 03, 2015 at 10:14:03PM +0300, Denis V. Lunev wrote: > On 03/02/15 22:09, Gabriel L. Somlo wrote: >> >>I'm interested in adding a way for a host to pass environment variables >>into a qemu guest VM -- analogous to setting environment variables for >>a process to access via get

Re: [Qemu-devel] [PATCH] integrator/cp: Wire up MMC card detection

2015-02-03 Thread Jan Kiszka
On 2015-02-03 19:03, Peter Maydell wrote: > On 30 January 2015 at 20:19, Jan Kiszka wrote: >> This allows to use MMC emulation with the Integrator/CP model. Well, >> mostly. There seems to be timing issues with Linux so that the card is >> not always detected (but most of the time). >> >> Note tha

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Denis V. Lunev
On 03/02/15 23:14, Gabriel L. Somlo wrote: Hi Denis, On Tue, Feb 03, 2015 at 10:14:03PM +0300, Denis V. Lunev wrote: On 03/02/15 22:09, Gabriel L. Somlo wrote: I'm interested in adding a way for a host to pass environment variables into a qemu guest VM -- analogous to setting environment vari

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Michael Roth
Quoting Gabriel L. Somlo (2015-02-03 13:09:22) > Hi, > > I'm interested in adding a way for a host to pass environment variables > into a qemu guest VM -- analogous to setting environment variables for > a process to access via getenv() and friends. > > The QEMU Guest Agent (QGA) does not appear

Re: [Qemu-devel] [PATCH v2 0/8] qemu: guest agent: implement guest-exec command for Linux

2015-02-03 Thread Michael Roth
Quoting Denis V. Lunev (2015-01-13 04:13:03) > On 09/01/15 22:29, Michael Roth wrote: > > Quoting Denis V. Lunev (2015-01-09 12:09:10) > >> On 09/01/15 20:06, Michael Roth wrote: > >>> Quoting Denis V. Lunev (2014-12-31 07:06:46) > hese patches for guest-agent add the functionality to execute

[Qemu-devel] [PULL 02/10] target-s390: Implement EPSW

2015-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-s390x/insn-data.def | 2 ++ target-s390x/translate.c | 18 ++ 2 files changed, 20 insertions(+) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index 42b99b2..859cfba 100644 --- a/target-s390x/insn-data.def +++ b

[Qemu-devel] [PULL 00/10] s390x translator bug fixes

2015-02-03 Thread Richard Henderson
nding bug fixes. r~ The following changes since commit 16017c48547960539fcadb1f91d252124f442482: softfloat: Clarify license status (2015-01-29 16:45:45 +) are available in the git repository at: git://github.com/rth7680/qemu.git tags/pull-tg-s390-20150203 for you to fetch changes

[Qemu-devel] [PULL 04/10] target-s390: Fix STURA

2015-02-03 Thread Richard Henderson
We were storing 16 bits instead of 32. Signed-off-by: Richard Henderson --- target-s390x/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c index 5a55de8..4736b7b 100644 --- a/target-s390x/mem_helper.c +++ b/targ

[Qemu-devel] [PULL 01/10] target-s390: Implement SAM specification exception

2015-02-03 Thread Richard Henderson
Also, these are user-mode instructions; allow their use in CONFIG_USER_ONLY. Signed-off-by: Richard Henderson --- target-s390x/insn-data.def | 8 target-s390x/translate.c | 31 +++ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/target-s390

[Qemu-devel] [PULL 03/10] target-s390: Fix STIDP

2015-02-03 Thread Richard Henderson
The implementation had been incomplete, as we did not store the machine type. Note that the machine_type member is still unset during initialization, so this has no effect yet. Signed-off-by: Richard Henderson --- target-s390x/cpu.h | 4 +++- target-s390x/translate.c | 6 ++ 2 files c

[Qemu-devel] [PULL 08/10] disas/s390.c: Remove unused variables

2015-02-03 Thread Richard Henderson
From: Peter Maydell The variables s390_opformats and s390_num_opformats are unused and provoke clang warnings: disas/s390.c:849:33: warning: variable 's390_opformats' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct s390_opcode s390_opformats[] =

[Qemu-devel] [PULL 05/10] target-s390: Implement LURA, LURAG, STURG

2015-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-s390x/helper.h | 3 +++ target-s390x/insn-data.def | 4 target-s390x/mem_helper.c | 22 ++ target-s390x/translate.c | 26 ++ 4 files changed, 55 insertions(+) diff --git a/target-s390x/helper.h

[Qemu-devel] [PULL 06/10] target-s390: Implement ECAG

2015-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-s390x/insn-data.def | 2 ++ target-s390x/translate.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index 60dbe80..8d8e47e 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/

[Qemu-devel] [PULL 07/10] target-s390x: Mark check_privileged() as !CONFIG_USER_ONLY

2015-02-03 Thread Richard Henderson
From: Peter Maydell The function check_privileged() is only used in the softmmu configs; wrap it in an #ifndef CONFIG_USER_ONLY to avoid clang warnings on the linux-user builds. [rth: Remove inline marker too; it was only there to prevent exactly this warning in GCC.] Signed-off-by: Peter Mayde

[Qemu-devel] [PULL 09/10] target-s390x: support OC and NC in the EX instruction

2015-02-03 Thread Richard Henderson
From: Paolo Bonzini This is needed to run the GMP testsuite. Reported-by: Torbjorn Granlund Tested-by: Torbjorn Granlund Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-s390x/mem_helper.c | 8 1 file changed, 8 insertions(+) diff --git a/target-s390x/mem_h

[Qemu-devel] [PULL 10/10] target-s390x: fix and optimize slb* and slbg* computation of carry/borrow flag

2015-02-03 Thread Richard Henderson
From: Torbjorn Granlund This patch fixes the bug with borrow_in being set incorrectly, but it also simplifies the logic to be much more plain, improving speed. It fixes both the 32-bit SLB* and 64-bit SLBG*. The SLBG* change has been well-tested. I haven't tested the SLB* change explicitly, bu

[Qemu-devel] [PATCH v2 8/9] target-i386: Require APIC ID to be explicitly set before CPU realize

2015-02-03 Thread Eduardo Habkost
Instead of setting APIC ID automatically when creating a X86CPU, require the property to be set before realizing the object (which all callers of cpu_x86_create() already do). Signed-off-by: Eduardo Habkost Cc: Gu Zheng --- target-i386/cpu-qom.h | 2 +- target-i386/cpu.c | 7 ++- 2 file

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
On Tue, Feb 03, 2015 at 12:26:47PM -0700, Eric Blake wrote: > On 02/03/2015 12:09 PM, Gabriel L. Somlo wrote: > > Hi, > > > > I'm interested in adding a way for a host to pass environment variables > > into a qemu guest VM -- analogous to setting environment variables for > > a process to access v

Re: [Qemu-devel] [PATCH 2/8] qga: implement file commands for Windows guest

2015-02-03 Thread Michael Roth
Quoting Denis V. Lunev (2014-12-31 07:06:48) > From: Olga Krishtal > > The following commands are implemented: > - guest_file_open > - guest_file_close > - guest_file_write > - guest_file_read > - guest_file_seek > - guest_file_flush > > Motivation is quite simple: Windows guests should be suppo

Re: [Qemu-devel] [PATCH v3 1/4] target-arm: Add CPU property to disable AArch64

2015-02-03 Thread Peter Maydell
On 3 February 2015 at 19:14, Peter Maydell wrote: > On 27 January 2015 at 23:58, Greg Bellows wrote: >> static void aarch64_cpu_initfn(Object *obj) >> { >> +object_property_add_bool(obj, "aarch64", aarch64_cpu_get_aarch64, >> + aarch64_cpu_set_aarch64, NULL); >>

Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-02-03 Thread Paul Mackerras
On Tue, Feb 03, 2015 at 05:10:51PM +1100, David Gibson wrote: > qemu currently implements the hypercalls H_LOGICAL_CI_LOAD and > H_LOGICAL_CI_STORE as PAPR extensions. These are used by the SLOF firmware > for IO, because performing cache inhibited MMIO accesses with the MMU off > (real mode) is v

Re: [Qemu-devel] [PATCH v3 1/4] target-arm: Add CPU property to disable AArch64

2015-02-03 Thread Christoffer Dall
On Tue, Feb 3, 2015 at 10:15 PM, Peter Maydell wrote: > On 3 February 2015 at 19:14, Peter Maydell wrote: >> On 27 January 2015 at 23:58, Greg Bellows wrote: >>> static void aarch64_cpu_initfn(Object *obj) >>> { >>> +object_property_add_bool(obj, "aarch64", aarch64_cpu_get_aarch64, >>> +

Re: [Qemu-devel] [PATCHv2 1/2] m48t59: introduce new year_offset qdev property

2015-02-03 Thread Mark Cave-Ayland
On 01/02/15 19:50, Hervé Poussineau wrote: > Le 01/02/2015 19:39, Mark Cave-Ayland a écrit : >> Currently the m48t59 device uses the hardware model in order to determine >> whether the year value is offset from the hardware value. As this will >> soon be required by the x59 model, change the year

Re: [Qemu-devel] [PATCH 1/8] qga: fixed warning in qemu-ga.exe for mingw >= 4.9.1

2015-02-03 Thread Eric Blake
On 12/31/2014 06:06 AM, Denis V. Lunev wrote: > From: Olga Krishtal > > strtok_r was redefined before the patch > > Signed-off-by: Olga Krishtal > Signed-off-by: Denis V. Lunev > CC: Michael Roth > --- > include/sysemu/os-win32.h | 2 ++ > 1 file changed, 2 insertions(+) What's the actual c

Re: [Qemu-devel] [PATCH v2 0/8] qemu: guest agent: implement guest-exec command for Linux

2015-02-03 Thread Denis V. Lunev
On 03/02/15 23:24, Michael Roth wrote: Quoting Denis V. Lunev (2015-01-13 04:13:03) On 09/01/15 22:29, Michael Roth wrote: Quoting Denis V. Lunev (2015-01-09 12:09:10) On 09/01/15 20:06, Michael Roth wrote: Quoting Denis V. Lunev (2014-12-31 07:06:46) hese patches for guest-agent add the fun

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
On Tue, Feb 03, 2015 at 02:11:12PM -0600, Michael Roth wrote: > > This does seem like useful functionality, but I think I'd like to know > more about the actual use-cases being looked at. The proposed functionality is mostly equivalent to that offered by "GuestInfo variables". So yes, initial act

Re: [Qemu-devel] [PATCH v3 1/4] target-arm: Add CPU property to disable AArch64

2015-02-03 Thread Greg Bellows
On Tue, Feb 3, 2015 at 3:21 PM, Christoffer Dall < christoffer.d...@linaro.org> wrote: > On Tue, Feb 3, 2015 at 10:15 PM, Peter Maydell > wrote: > > On 3 February 2015 at 19:14, Peter Maydell > wrote: > >> On 27 January 2015 at 23:58, Greg Bellows > wrote: > >>> static void aarch64_cpu_initfn(

Re: [Qemu-devel] [PATCH 5/8] guest agent: add guest-exec and guest-exec-status interfaces

2015-02-03 Thread Eric Blake
On 12/31/2014 06:06 AM, Denis V. Lunev wrote: > From: Simon Zolin > > Interfaces to execute/manage processes in the guest. Child process' > stdin/stdout/stderr can be associated with handles for communication > via read/write interfaces. > > Signed-off-by: Simon Zolin > Acked-by: Roman Kagan >

[Qemu-devel] [PATCH v2 05/19] libqos/ahci: Add ahci_port_check_error helper

2015-02-03 Thread John Snow
ahci_port_check_error checks a given port's error registers and asserts that everything from the port-level view is still OK. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 8 +--- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h | 1 + 3

[Qemu-devel] [PATCH v2 14/19] libqos/ahci: add ahci command size setters

2015-02-03 Thread John Snow
Adds setters for size, prd_size and both via set_sizes. Signed-off-by: John Snow --- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h | 5 + 2 files changed, 27 insertions(+) diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c index d1e511a..60849ea 100644 --- a/test

[Qemu-devel] [PATCH v2 02/19] libqos/ahci: Add ahci_port_clear helper

2015-02-03 Thread John Snow
Add a helper that assists in clearing out potentially old error and FIS information from an AHCI port's data structures. This ensures we always start with a blank slate for interrupt and FIS receipt information. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 9 ++

Re: [Qemu-devel] [PATCH v3 1/4] target-arm: Add CPU property to disable AArch64

2015-02-03 Thread Greg Bellows
On Tue, Feb 3, 2015 at 1:14 PM, Peter Maydell wrote: > On 27 January 2015 at 23:58, Greg Bellows wrote: > > Adds registration and get/set functions for enabling/disabling the > AArch64 > > execution state on AArch64 CPUs. By default AArch64 execution state is > enabled > > on AArch64 CPUs, sett

[Qemu-devel] [PATCH v2 01/19] libqos/ahci: Add ahci_port_select helper

2015-02-03 Thread John Snow
This helper identifies which port of the AHCI HBA has a device we may run tests on. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 19 ++- tests/libqos/ahci.c | 27 +++ tests/libqos/ahci.h | 1 + 3 files changed, 30 inserti

[Qemu-devel] [PATCH v2 15/19] libqos/ahci: Add ahci_guest_io

2015-02-03 Thread John Snow
ahci_guest_io is a shorthand function that will, in one shot, execute a data command on the guest to the specified guest buffer location, in the requested amount. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/libqos/ahci.c | 15 +++ tests/libqos/ahci.h | 2 ++ 2 fil

[Qemu-devel] [PATCH v2 04/19] libqos/ahci: Add command header helpers

2015-02-03 Thread John Snow
Adds command header helper functions: -ahci_command_header_set -ahci_command_header_get, -ahci_command_destroy, and -ahci_cmd_pick These helpers help to quickly manage the command header information in the AHCI device. ahci_command_header_set and get will store or retrieve an AHCI command header,

[Qemu-devel] [PATCH v2 00/19] qtest/ahci: add dma test

2015-02-03 Thread John Snow
Add a simple DMA r/w test to ahci-test. Oh, and for the first 18 patches, refactor everything into helpers so that each ahci_test isn't a thousand lines long. This patch depends upon the "ahci test preliminary refactoring" series upstream, which shuffled a lot of libqos and malloc facilities to s

[Qemu-devel] [PATCH v2 07/19] libqos/ahci: Add port_check_nonbusy helper

2015-02-03 Thread John Snow
A simple helper that asserts a given port is not busy processing any commands via the TFD, Command Issue and SACT registers. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 1 + tests/libqos/ahci.c | 18 ++ tests/libqos/ahci.h | 1 + 3 files chang

[Qemu-devel] [PATCH v2 03/19] qtest/ahci: rename 'Command' to 'CommandHeader'

2015-02-03 Thread John Snow
The structure name is a bit of a misnomer; the structure currently named command is actually the commandheader. A future patch in this series will add an actual "Command" structure, so we'll rename it now before the rest of the functions in this series try to use it. In addition, rename the "b1" a

[Qemu-devel] [PATCH v2 08/19] libqos/ahci: Add cmd response sanity check helpers

2015-02-03 Thread John Snow
This patch adds a few helpers to help sanity-check the response of the AHCI device after a command. ahci_d2h_check_sanity inspects the D2H Register FIS, ahci_pio_check_sanity inspects the PIO Setup FIS, and ahci_cmd_check_sanity inspects the command header. To support the PIO sanity check, a new

[Qemu-devel] [PATCH v2 17/19] libqos/ahci: Add ahci_clean_mem

2015-02-03 Thread John Snow
Clean up guest memory being used in ahci_clean_mem, to be called during ahci_shutdown. With all guest memory leaks removed, add an option to the allocator to throw an assertion if a leak occurs. This test adds some sanity to both the AHCI library and the allocator. Signed-off-by: John Snow Revie

[Qemu-devel] [PATCH v2 10/19] qtest/ahci: add ahci_write_fis

2015-02-03 Thread John Snow
Similar to ahci_set_command_header, add a helper that takes an in-memory representation of a command FIS and writes it to guest memory, handling endianness as-needed. Signed-off-by: John Snow --- tests/ahci-test.c | 2 +- tests/libqos/ahci.c | 10 ++ tests/libqos/ahci.h | 1 + 3 file

[Qemu-devel] [PATCH v2 09/19] qtest/ahci: Demagic ahci tests.

2015-02-03 Thread John Snow
Add human-readable command names and other miscellaneous #defines to help make the code more readable. Some of these definitions are not yet used in this current series, but for convenience and sanity they have been lumped together here, as it's more trouble than it is worth in a test suite to han

[Qemu-devel] [PATCH v2 06/19] libqos/ahci: Add ahci_port_check_interrupts helper

2015-02-03 Thread John Snow
A helper that compares a given port's current interrupts and checks them against a supplied list of expected interrupt bits, and throws an error if they do not match. The helper then resets the requested interrupts on this port, and asserts that the interrupt register is now empty. Signed-off-by:

[Qemu-devel] [PATCH v2 18/19] qtest/ahci: Assert sector size in identify test

2015-02-03 Thread John Snow
A minor sanity check to assert that the sector size is 512. The current block layer code deeply assumes that the IDE sector size will be 512 bytes, so we carry forward that assumption here. This is useful for the DMA tests, which currently assume that a sector will always be 512 bytes. Signed-off

[Qemu-devel] [PATCH v2 11/19] libqos/ahci: Add ide cmd properties

2015-02-03 Thread John Snow
Add a structure that defines some properties of various IDE commands. These will be used to simplify the interface to the libqos AHCI calls, lessening the redundancy of specifying and respecifying properties of commands to various helper functions. Signed-off-by: John Snow --- tests/libqos/ahci.

<    1   2   3   >