Re: [Qemu-devel] [RFC PATCH v2 04/16] monitor: use debug version of memory access apis

2016-09-22 Thread Paolo Bonzini
On 22/09/2016 16:52, Brijesh Singh wrote: > diff --git a/target-i386/monitor.c b/target-i386/monitor.c > index fccfe40..47d3c2d 100644 > --- a/target-i386/monitor.c > +++ b/target-i386/monitor.c > @@ -130,12 +130,12 @@ static void tlb_info_64(Monitor *mon, CPUArchState *env) > > pml4_addr

[Qemu-devel] [PATCH 1/2] target-i386: introduce kvm_put_one_msr

2016-09-22 Thread Paolo Bonzini
Avoid further code duplication in the next patch. Signed-off-by: Paolo Bonzini --- target-i386/kvm.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index f1ad805..38609fd 100644 ---

[Qemu-devel] [PATCH v6 00/10] linux-user: Fix assorted Qemu user mode issues

2016-09-22 Thread Aleksandar Markovic
From: Aleksandar Markovic v5->v6: - reworked all patches according to review feedback - added two new patches on relatively simple issues v4->v5: - removed three cleanup patches v3->v4: - rebased to the latest code - added patch on

[Qemu-devel] [PATCH 0/2] kvm: fix incorrect LAPIC reset after reboot in x2apic mode

2016-09-22 Thread Paolo Bonzini
Linux 4.8 introduces changes that really really require you to set the APIC base (via either KVM_SET_SREGS or KVM_SET_MSRS) before the KVM_SET_LAPIC ioctl, unless KVM_SET_LAPIC is immediately preceded by KVM_GET_LAPIC. This is because in x2apic mode KVM now moves the APIC id from bits 31-24 of

[Qemu-devel] [PATCH V5 0/2] Add option to configure guest vPMU

2016-09-22 Thread Wei Huang
This patchset adds a pmu=[on/off] option to enable/disable vPMU support for guest VM. There are several reasons to justify this option. First, vPMU can be problematic for cross-migration between different SoC as perf counters are architecture-dependent. It is more flexible to have an option to

Re: [Qemu-devel] [PATCH v2 0/6] target-i386: Increase CPUID level/xlevel/xlevel2 automatically

2016-09-22 Thread Richard Henderson
On 09/22/2016 07:53 AM, Eduardo Habkost wrote: Eduardo Habkost (6): target-i386: Remove unused X86CPUDefinition::xlevel2 field target-i386: Add a marker to end of the region zeroed on reset tests: Add test code for CPUID level/xlevel handling tests: Test CPUID level handling for old

Re: [Qemu-devel] [PATCH v6 5/8] hw/intc/arm_gicv3_its: Implement support for in-kernel ITS emulation

2016-09-22 Thread Peter Maydell
On 9 September 2016 at 18:30, Eric Auger wrote: > From: Pavel Fedin > > The ITS control frame is in-kernel emulated while accesses to the > GITS_TRANSLATER are mediated through the KVM_SIGNAL_MSI ioctl (MSI > direct MSI injection advertised by the

[Qemu-devel] [PATCH V5 2/2] arm: virt: add PMU property to mach-virt machine type

2016-09-22 Thread Wei Huang
CPU vPMU is now turned off by default, but it was ON in virt-2.7 machine type. To solve this problem, this patch adds a PMU option in machine state, which is used to control CPU's vPMU status. This PMU option is not exposed to command line and is turned on in virt-2.7 machine type to make sure it

[Qemu-devel] [PATCH v2 0/2] kvm: fix incorrect LAPIC reset after reboot in x2apic mode

2016-09-22 Thread Paolo Bonzini
Linux 4.8 introduces changes that really really require you to set the APIC base (via either KVM_SET_SREGS or KVM_SET_MSRS) before the KVM_SET_LAPIC ioctl, unless KVM_SET_LAPIC is immediately preceded by KVM_GET_LAPIC. This is because in x2apic mode KVM now moves the APIC id from bits 31-24 of

[Qemu-devel] [RFC PATCH v2 16/16] i386: clear C-bit in SEV guest page table walk

2016-09-22 Thread Brijesh Singh
In SEV-enabled guest the physical addresses in page table will have C-bit set, we need to clear the C-bit when walking the page table. The C-bit position should be available in cpuid Fn8000_001f[EBX] Signed-off-by: Brijesh Singh --- target-i386/helper.c | 35

Re: [Qemu-devel] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add options

2016-09-22 Thread Eric Blake
On 08/08/2016 08:13 AM, Fam Zheng wrote: > To allow overriding the default locking behavior when opening the image. > > Signed-off-by: Fam Zheng > --- > qapi/block-core.json | 19 ++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [RFC PATCH v2 06/16] sev: add Secure Encrypted Virtulization (SEV) support

2016-09-22 Thread Paolo Bonzini
On 22/09/2016 16:52, Brijesh Singh wrote: > to launch unencrypted SEV guest: > # $QEMU \ > -object sev-launch-info,id=launch0,flags.ks=off \ > -object sev-guest-info,id,sev0,launch=launch0 \ > -object security-policy,id=secure0,memory-encryption=sev0 \ > -machine

[Qemu-devel] [RFC PATCH v2 14/16] i386: set memory encryption ops for PC.BIOS and PC.RAM regions

2016-09-22 Thread Brijesh Singh
If guest is launched with memory encryption enabled then register BIOS and PC.RAM memory regions with memory encryption handler. Registering PC.BIOS memory region will ensure that memory encryption routines will be used when rom_reset copies the BIOS image into guest memory. A typical sequence

[Qemu-devel] [PATCH v6 02/10] linux-user: Add support for clock_adjtime() syscall

2016-09-22 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode clock_adjtime() syscall support. The implementation is based on invocation of host's clock_adjtime(), and is very similar to the implementation of adjtimex() syscall support. The main difference is

[Qemu-devel] [PATCH v2 0/6] target-i386: Increase CPUID level/xlevel/xlevel2 automatically

2016-09-22 Thread Eduardo Habkost
This series fixes the inconsistency between CPUID[7].EBX features and all the rest of the configurable CPU features. This ensures that level/xlevel/xlevel2 will be set to appropriate values depending on the set of features enabled in a CPU model or in the command-line. Changes v1 -> v2: * Coding

Re: [Qemu-devel] [PATCH 1/2] target-i386: introduce kvm_put_one_msr

2016-09-22 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Avoid further code duplication in the next patch. > > Signed-off-by: Paolo Bonzini > --- > target-i386/kvm.c | 22 +- > 1 file changed, 13 insertions(+), 9 deletions(-) > > diff --git a/target-i386/kvm.c

[Qemu-devel] [PATCH v2 6/6] target-i386: Enable CPUID[0x8000000A] if SVM is enabled

2016-09-22 Thread Eduardo Habkost
SVM needs CPUID[0x800A] to be available. So if SVM is enabled in a CPU model or explicitly in the command-line, adjust CPUID xlevel to expose the CPUID[0x800A] leaf. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Coding style changes (split long lines) *

[Qemu-devel] [PATCH v6 01/10] linux-user: Add support for adjtimex() syscall

2016-09-22 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. Its declaration is: int

[Qemu-devel] [PATCH v2 1/6] target-i386: Remove unused X86CPUDefinition::xlevel2 field

2016-09-22 Thread Eduardo Habkost
No CPU model in builtin_x86_defs has xlevel2 set, so it is always zero. Delete the field. Note that this is not an user-visible change. It doesn't remove the ability to set xlevel2 on the command-line, it just removes an unused field in builtin_x86_defs. Signed-off-by: Eduardo Habkost

[Qemu-devel] [PATCH v6 03/10] linux-user: Add support for sysfs() syscall

2016-09-22 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode sysfs() syscall support. Syscall sysfs() involves returning information about the filesystem types currently present in the kernel, and can operate in three distinct flavors, depending on its first

[Qemu-devel] [RFC PATCH v2 01/16] memattrs: add debug attrs

2016-09-22 Thread Brijesh Singh
Add a new memory debug attribute, this attribute should be set when memory read or write access is performed for debugging purposes. Signed-off-by: Brijesh Singh --- include/exec/memattrs.h |4 1 file changed, 4 insertions(+) diff --git a/include/exec/memattrs.h

[Qemu-devel] [PATCH v2 3/6] tests: Add test code for CPUID level/xlevel handling

2016-09-22 Thread Eduardo Habkost
Add test code that will check if the automatic CPUID level changes are working as expected. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Coding style changes (split long lines) --- tests/Makefile.include| 2 + tests/test-x86-cpuid-compat.c | 108

[Qemu-devel] [RFC PATCH v2 06/16] sev: add Secure Encrypted Virtulization (SEV) support

2016-09-22 Thread Brijesh Singh
This patch adds the initial support required to integrate Secure Encrypted Virtualization (SEV) feature. SEV is an extension to the existing AMD-V technology found on AMD processors. The SEV feature allows the memory contents of a virtual machine to be transparently encrypted with a key unique to

[Qemu-devel] [Bug 1626596] [NEW] Lockup with vhost network

2016-09-22 Thread rm
Public bug reported: After using Qemu in this configuration successfully for quite a while, I changed two things: - moved the VM from a 8-core 4GHz host to a slower 2-core 1.6 Ghz machine - upgraded qemu from 2.1 to 2.5 and almost immediately (in a couple hours) got hit with a vhost-related

[Qemu-devel] [RFC PATCH v2 00/16] x86: Secure Encrypted Virtualization (AMD)

2016-09-22 Thread Brijesh Singh
This RFC series provides support for AMD's new Secure Encrypted Virtualization (SEV) feature. This RFC is based KVM RFC [1]. SEV is an extension to the AMD-V architecture which supports running multiple VMs under the control of a hypervisor. The SEV feature allows the memory contents of a

[Qemu-devel] [PATCH v2 5/6] target-i386: Automatically set level/xlevel/xlevel2 when needed

2016-09-22 Thread Eduardo Habkost
Instead of requiring users and management software to be aware of required CPUID level/xlevel/xlevel2 values for each feature, automatically increase those values when features need them. This was already done for CPUID[7].EBX, and is now made generic for all CPUID feature flags. Unit test

[Qemu-devel] [RFC PATCH v2 09/16] sev: add LAUNCH_START command

2016-09-22 Thread Brijesh Singh
The command is used to prepare a guest for the transition into SEV-enabled mode. Command uses the parameters specified in 'sev-launch-info' object, see doc/amd-memory-encryption.txt for parameter details. The command creates a new VM Encryption Key (VEK) and cryptographic context. The key created

[Qemu-devel] [PATCH v2 4/6] tests: Test CPUID level handling for old machines

2016-09-22 Thread Eduardo Habkost
We're going to change the way level/xlevel/xlevel2 are handled when enabling features, but we need to keep the old behavior on existing machine types. Add test cases for that. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Coding style changes (split long lines) ---

[Qemu-devel] [RFC PATCH v2 15/16] target-i386: add cpuid Fn8000_001f

2016-09-22 Thread Brijesh Singh
Fn8000_001f cpuid provides the memory encryption (aka C-bit) Signed-off-by: Brijesh Singh --- target-i386/cpu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 6a1afab..43e698b 100644 --- a/target-i386/cpu.c

[Qemu-devel] [RFC PATCH v2 07/16] hmp: display memory encryption support in 'info kvm'

2016-09-22 Thread Brijesh Singh
update 'info kvm' to display the memory encryption support. (qemu) info kvm kvm support: enabled memory encryption: disabled Signed-off-by: Brijesh Singh --- hmp.c|2 ++ qapi-schema.json |7 +-- qmp.c|1 + 3 files changed, 8

Re: [Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit

2016-09-22 Thread Paolo Bonzini
On 22/09/2016 14:50, Igor Mammedov wrote: > ACPI ID is 32 bit wide on CPUs with x2APIC support. > Extend 'id' property to support it. > > Signed-off-by: Igor Mammedov > --- > include/hw/i386/apic_internal.h | 3 ++- > target-i386/cpu.h | 1 + >

Re: [Qemu-devel] [PATCH v2 00/14] pc: q35: x2APIC support in kvm_apic mode

2016-09-22 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1474548655-157373-1-git-send-email-imamm...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/14] pc:

[Qemu-devel] [RFC PATCH v2 05/16] core: add new security-policy object

2016-09-22 Thread Brijesh Singh
The object can be used to define global security policy for the guest. object provides two properties: - debug: can be used to disable the guest memory access from hypervisor. e.g if guest owner does not want qemu monitor to debug or dump guest memory then it can do so using the below

[Qemu-devel] [RFC PATCH v2 10/16] sev: add LAUNCH_UPDATE command

2016-09-22 Thread Brijesh Singh
The command is used to encrypt a guest memory region using the VM Encryption Key (VEK) created by LAUNCH_START command. The firmware will also update the measurement with the contents of the memory region. This measurement can be retrieved by calling LAUNCH_FINISH command. Signed-off-by: Brijesh

[Qemu-devel] [RFC PATCH v2 13/16] sev: add DEBUG_ENCRYPT command

2016-09-22 Thread Brijesh Singh
The command is used to encrypt a region of guest memory for debug. See docs/amd-memory-encryption.txt for command parameters detail The command will be used by gdbserver when writing the data into guest memory for debug purposes (e.g setting breakpoint) A typical usage looks like:

[Qemu-devel] [RFC PATCH v2 03/16] exec: add debug version of physical memory read and write apis

2016-09-22 Thread Brijesh Singh
The patch adds the following new APIs: - cpu_physical_memory_read_debug - cpu_physical_memory_write_debug - cpu_physical_memory_rw_debug - ldl_phys_debug - ldq_phys_debug The idea behind this patch is that if all the qemu monitor memory dumps and gdbserver accesses are done through these common

[Qemu-devel] [RFC PATCH v2 12/16] sev: add DEBUG_DECRYPT command

2016-09-22 Thread Brijesh Singh
The command is used to decrypt a page of guest memory for debug. See docs/amd-memory-encryption.txt for command parameters detail. The command will be used by qemu monitor dump and gdbserver to access the guest memory for debug purposes. A typical usage look like: cpu_physical_memory_rw_debug

[Qemu-devel] [RFC PATCH v2 02/16] exec: add guest RAM read and write ops

2016-09-22 Thread Brijesh Singh
In current implementation, read and write of the guest RAM is performed using using memcpy(). This patch adds support to register a callback which can override the memcpy() with something else. This feature will be used in Secure Encrypted Virtualization (SEV) guests in which read and write of

Re: [Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-09-22 Thread Paolo Bonzini
On 22/09/2016 14:50, Igor Mammedov wrote: > +#ifdef KVM_CAP_X2APIC_API > +if (kvm_check_extension(s, KVM_CAP_X2APIC_API)) { > +has_x2apic_ids = !kvm_vm_enable_cap(s, KVM_CAP_X2APIC_API, 0, > +KVM_X2APIC_API_USE_32BIT_IDS); > +} >

[Qemu-devel] [RFC PATCH v2 04/16] monitor: use debug version of memory access apis

2016-09-22 Thread Brijesh Singh
updates hmp monitor to use debug version of memory access apis when accessing the guest memory. Signed-off-by: Brijesh Singh --- cpus.c|2 +- disas.c |2 +- monitor.c |2 +- target-i386/helper.c | 14 +++---

[Qemu-devel] [RFC PATCH v2 11/16] sev: add LAUNCH_FINISH command

2016-09-22 Thread Brijesh Singh
The command is used to finalize the SEV guest launch process. The command returns a measurement value of the data encrypted through the LAUNCH_UPDATE command. This measurement can be handed to the guest owner to verify that the guest was launched into SEV-enabled mode. User can retrieve the

[Qemu-devel] [PATCH v2 2/6] target-i386: Add a marker to end of the region zeroed on reset

2016-09-22 Thread Eduardo Habkost
Instead of using cpuid_level, use an empty struct as a marker (like we already did with {start,end}_init_save). This will avoid accidentaly resetting the wrong fields if we change the field ordering on CPUX86State. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 +-

Re: [Qemu-devel] [PATCH v6 2/8] hw/intc/arm_gicv3_its: Implement ITS base class

2016-09-22 Thread Peter Maydell
On 9 September 2016 at 18:30, Eric Auger wrote: > From: Pavel Fedin > > This is the basic skeleton for both KVM and software-emulated ITS. > Since we already prepare status structure, we also introduce complete > VMState description. But, because we

Re: [Qemu-devel] [PULL 00/13] AVR target

2016-09-22 Thread Peter Maydell
On 20 September 2016 at 20:54, Richard Henderson wrote: > Let us merge patch set v18. > > > r~ > > > > The following changes since commit ebc231d7daf1f41b23d8b6a6d1234800b86e5fe2: > > Merge remote-tracking branch 'remotes/awilliam/tags/vfio-fixes-20160915.0' > into staging

[Qemu-devel] [RFC PATCH v2 08/16] core: loader: create memory encryption context before copying data

2016-09-22 Thread Brijesh Singh
During system boot, rom_reset copies bios binary from internal PC.BIOS ROM to guest RAM (PC.RAM). If memory encryption is enabled then we need to ensure that encryption context is created before we start the copy process. When encryption is enabled any data copy from PC.BIOS ROM to guest RAM will

[Qemu-devel] [PATCH] imx_fec: fix error in qemu_send_packet argument

2016-09-22 Thread Paolo Bonzini
This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini --- hw/net/imx_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 1c415ab..50c7564 100644 ---

Re: [Qemu-devel] [PATCH v9 05/11] vfio: add check host bus reset is support or not

2016-09-22 Thread Dou Liyang
Hi Alex, At 09/22/2016 10:03 PM, Alex Williamson wrote: On Thu, 22 Sep 2016 16:34:32 +0800 Dou Liyang wrote: Hi Alex, At 09/01/2016 03:56 AM, Alex Williamson wrote: On Tue, 19 Jul 2016 15:38:23 +0800 Zhou Jie wrote: From: Chen Fan

[Qemu-devel] [PATCH] mcf_fec: fix error in qemu_send_packet argument

2016-09-22 Thread Paolo Bonzini
This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini --- hw/net/mcf_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c index 0ee8ad9..5a5fc69 100644 ---

Re: [Qemu-devel] [PATCH v6 4/8] kvm-all: Pass requester ID to MSI routing functions

2016-09-22 Thread Peter Maydell
On 9 September 2016 at 18:30, Eric Auger wrote: > From: Pavel Fedin > > Introduce global kvm_msi_use_devid flag and pass the device ID, > if needed, while building the MSI route entry. Device IDs are > required by the ARM GICv3 ITS (IRQ remapping

Re: [Qemu-devel] [PATCH v2 0/3] Fix some qapi assert()

2016-09-22 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20160922130905.4720-1-marcandre.lur...@redhat.com Subject: [Qemu-devel] [PATCH v2 0/3] Fix some qapi

Re: [Qemu-devel] [libvirt] [RFC v2] libvirt vGPU QEMU integration

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 08:19:21AM -0600, Alex Williamson wrote: > On Thu, 22 Sep 2016 09:41:20 +0530 > Kirti Wankhede wrote: > > > > My concern is that a type id seems arbitrary but we're specifying that > > > it be unique. We already have something unique, the

Re: [Qemu-devel] [PATCH v6 1/8] hw/intc/arm_gic(v3)_kvm: Initialize gsi routing

2016-09-22 Thread Peter Maydell
On 9 September 2016 at 18:30, Eric Auger wrote: > From: Eric Auger > > Advertise gsi routing and set up irqchip routing entries for > GIC SPIs. > > This is not mandated as long as MSI routing is not used > (because the kernel sets a default irqchip

Re: [Qemu-devel] [PULL 00/44] ppc-for-2.8 queue 20160922

2016-09-22 Thread Peter Maydell
ository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.8-20160922 > > for you to fetch changes up to 2832da4b6fc549d5feb2cf9fe53ad98cee894327: > > monitor: fix crash for platforms without a CPU 0 (2016-09-22 15:53:01 +1000) > > -

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-22 Thread Alex Williamson
On Thu, 22 Sep 2016 09:41:20 +0530 Kirti Wankhede wrote: > > My concern is that a type id seems arbitrary but we're specifying that > > it be unique. We already have something unique, the name. So why try > > to make the type id unique as well? A vendor can

Re: [Qemu-devel] [PATCH v2 2/3] qapi: fix crash when a parameter is missing

2016-09-22 Thread Eric Blake
On 09/22/2016 08:09 AM, Marc-André Lureau wrote: > Calling: > > { "execute": "qom-set", > "arguments": { "path": "/machine", "property": "rtc-time" } } > > Will crash with: > > qapi/qapi-visit-core.c:277: visit_type_any: Assertion `!err != !*obj' > failed > > Clear the obj and return an

Re: [Qemu-devel] [PATCH v9 05/11] vfio: add check host bus reset is support or not

2016-09-22 Thread Alex Williamson
On Thu, 22 Sep 2016 16:34:32 +0800 Dou Liyang wrote: > Hi Alex, > > At 09/01/2016 03:56 AM, Alex Williamson wrote: > > On Tue, 19 Jul 2016 15:38:23 +0800 > > Zhou Jie wrote: > > > >> From: Chen Fan > >> >

Re: [Qemu-devel] [PATCH v9 05/11] vfio: add check host bus reset is support or not

2016-09-22 Thread Dou Liyang
Hi Alex, At 09/01/2016 10:12 AM, Alex Williamson wrote: [...] I had to move to a different system where I could actually inject an aer error and created a config similar to above but with the 82576 ports downstream of the ioh3420 root port. When I inject a malformed TLP uncorrectable error,

Re: [Qemu-devel] [PATCH v6 0/8] vITS support

2016-09-22 Thread Peter Maydell
On 9 September 2016 at 18:30, Eric Auger wrote: > This series introduces support for in-kernel GICv3 ITS emulation. > > On dt guest the functionality is complete and was tested on Cavium ThunderX > with virtio-net-pci and vhost-net. > > On ACPI guest the series was tested

Re: [Qemu-devel] [PATCH v2 3/9] new: blacklist.tsan

2016-09-22 Thread Alex Bennée
Eric Blake writes: > On 09/22/2016 05:13 AM, Alex Bennée wrote: >> A list of blacklists for tsan instrumentation. One hopes more can be >> removed over time as tsan improves. > > A list of one file? It sounds like this sentence is stale, from an > earlier revision where the

Re: [Qemu-devel] [PATCH] timer: a9gtimer: check auto-increment register value

2016-09-22 Thread Peter Maydell
On 21 September 2016 at 21:13, P J P wrote: > From: Prasad J Pandit > > ARM A9MP processor has a peripheral timer with an auto-increment > register, which holds an increment step value. A user could set > this value to zero, when auto-increment control

[Qemu-devel] [PATCH 2/3] tests/docker: test-build script

2016-09-22 Thread Alex Bennée
Much like test-quick but only builds. This is useful for some of the build targets like ThreadSanitizer that don't yet pass "make check". Signed-off-by: Alex Bennée --- tests/docker/test-build | 18 ++ 1 file changed, 18 insertions(+) create mode 100755

[Qemu-devel] [PATCH 1/3] tests/docker: add travis dockerfile

2016-09-22 Thread Alex Bennée
This target grabs the latest Travis containers from their repository at quay.io and then installs QEMU's build dependencies. With this it is possible to run on broadly the same setup as they have on travis-ci.org. Signed-off-by: Alex Bennée ---

Re: [Qemu-devel] [PATCH v2 1/3] qmp: fix object-add assert() without props

2016-09-22 Thread Eric Blake
On 09/22/2016 08:09 AM, Marc-André Lureau wrote: > Since commit ad739706bbadee49, user_creatable_add_type() expects to be > given a qdict. However, if object-add is called without props, you reach > the assert: "qemu/qom/object_interfaces.c:115: user_creatable_add_type: > Assertion `qdict'

[Qemu-devel] [PATCH 3/3] tests/docker/Makefile.include: add a generic docker-run target

2016-09-22 Thread Alex Bennée
This re-factors the docker makefile to include a docker-run target which can be controlled entirely from environment variables specified on the make command line. This allows us to run against any given docker image we may have in our repository, for example: make docker-run TEST="test-quick"

Re: [Qemu-devel] [PATCH v11 0/8] Add a generic loader

2016-09-22 Thread Peter Maydell
On 22 September 2016 at 12:50, Markus Armbruster wrote: > However, in the case we're discussing, we're not doing that! There is > no RAM device with a trivial backend folded in. There's only a weird > pseudo-device that copies the contents of a file into memory, then sits >

Re: [Qemu-devel] [PATCH v5 4/9] virtio: handle virtqueue_map_desc() errors

2016-09-22 Thread Cornelia Huck
On Wed, 21 Sep 2016 16:52:21 +0100 Stefan Hajnoczi wrote: > Errors can occur during virtqueue_pop(), especially in > virtqueue_map_desc(). In order to handle this we must unmap iov[] > before returning NULL. The caller will consider the virtqueue empty and > the

Re: [Qemu-devel] [PULL 00/01] seccomp branch queue

2016-09-22 Thread Peter Maydell
On 21 September 2016 at 10:38, Eduardo Otubo wrote: > The following changes since commit a008535b9fa396226ff9cf78b8ac5f3584bda58e: > > build-sys: fix make install regression (2016-09-20 11:32:43 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v2 4/9] virtio-blk: handle virtio_blk_handle_request() errors

2016-09-22 Thread Cornelia Huck
On Wed, 21 Sep 2016 18:57:20 +0200 Greg Kurz wrote: > All these errors are caused by a buggy guest: let's switch the device to > the broken state instead of terminating QEMU. > > Signed-off-by: Greg Kurz > --- > v2: - added a out_err: label in

[Qemu-devel] [PATCH 0/3] new docker targets

2016-09-22 Thread Alex Bennée
Hi Fam, A few patches which include the re-factoring of Makfile.include with your review comments addressed (I hope ;-). I've also added a new docker target for Travis which essentially just pulls their quay.io hosted images as described here (although without the su - travis):

Re: [Qemu-devel] [PATCH v2 0/9] virtio: avoid inappropriate QEMU termination

2016-09-22 Thread Cornelia Huck
On Wed, 21 Sep 2016 18:56:46 +0200 Greg Kurz wrote: > This series is a follow up to Stefan's work to eradicate most calls to > exit() we currently have in the virtio code. > > It addresses all exit() call sites in the blk, net and scsi device code, > where the error is about a

[Qemu-devel] [PATCH v2 2/3] qapi: fix crash when a parameter is missing

2016-09-22 Thread Marc-André Lureau
Calling: { "execute": "qom-set", "arguments": { "path": "/machine", "property": "rtc-time" } } Will crash with: qapi/qapi-visit-core.c:277: visit_type_any: Assertion `!err != !*obj' failed Clear the obj and return an error. The patch also fixes a similar potential crash in

Re: [Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 10:36:45AM +0200, Markus Armbruster wrote: > "Lin Ma" writes: > > Markus Armbruster 2016/9/20 星期二 上午 1:13 >>> > >>Andreas Färber writes: > > Saving acceptable values of enumeration types into member description >

Re: [Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 02:03:39PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > > IMHO we should go further and leverage QAPI schema to auto-generate all > > the tedious boilerplate code for QOM objects > > > > eg, consider the crypto/secret.c object

Re: [Qemu-devel] [RFC/PATCH 2] kvm: x86: handle KVM_SET_VCPU_EVENTS/KVM_VCPUEVENT_VALID_SMM properly

2016-09-22 Thread Herongguang (Stephen)
On 2016/9/22 17:29, Paolo Bonzini wrote: On 22/09/2016 09:51, Herongguang (Stephen) wrote: After making memory consistent between source and destination (https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03069.html), there can still reproduce instruction emulation failure in

Re: [Qemu-devel] [PATCH v2 1/9] virtio-9p: add parentheses to sizeof operator

2016-09-22 Thread Cornelia Huck
On Wed, 21 Sep 2016 18:56:55 +0200 Greg Kurz wrote: > Signed-off-by: Greg Kurz > --- > hw/9pfs/virtio-9p-device.c |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Cornelia Huck

Re: [Qemu-devel] [PATCH v2 2/9] virtio-blk: turn virtio_blk_handle_request() into a static function

2016-09-22 Thread Cornelia Huck
On Wed, 21 Sep 2016 18:57:03 +0200 Greg Kurz wrote: > It is only used locally since this commit: > > 03de2f527499 virtio-blk: do not use vring in dataplane > > Signed-off-by: Greg Kurz > --- > hw/block/virtio-blk.c |2 +- >

Re: [Qemu-devel] [PATCH v2 3/9] virtio-9p: handle handle_9p_output() error

2016-09-22 Thread Cornelia Huck
On Wed, 21 Sep 2016 18:57:12 +0200 Greg Kurz wrote: > A broken guest may send a request with only non-empty out buffers > or only non-empty in buffers, virtqueue_pop() will then return a > VirtQueueElement with out_num == 0 or in_num == 0 respectively. > > All 9P requests are

Re: [Qemu-devel] [PATCH 5/6] target-i386: Automatically set level/xlevel/xlevel2 when needed

2016-09-22 Thread Eduardo Habkost
On Wed, Sep 21, 2016 at 01:58:55PM -0700, Richard Henderson wrote: > On 09/21/2016 01:14 PM, Eduardo Habkost wrote: > > On Wed, Sep 21, 2016 at 12:53:08PM -0700, Richard Henderson wrote: > > > On 09/21/2016 11:26 AM, Eduardo Habkost wrote: > > > > +/* Set cpuid_*level* based on

Re: [Qemu-devel] [PATCH v2 5/9] virtio-net: handle virtio_net_handle_ctrl() error

2016-09-22 Thread Cornelia Huck
On Wed, 21 Sep 2016 18:57:29 +0200 Greg Kurz wrote: > This error is caused by a buggy guest: let's switch the device to the > broken state instead of terminating QEMU. > > Signed-off-by: Greg Kurz > --- > v2: - s/return/break in virtio_net_handle_ctrl() for

Re: [Qemu-devel] [PATCH v2 3/3] tests: start generic qemu-qmp tests

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 05:09:05PM +0400, Marc-André Lureau wrote: > These 2 tests exhibit two qmp bugs fixed by the previous patches. > > Signed-off-by: Marc-André Lureau > --- > tests/qemu-qmp-test.c | 61 > ++

Re: [Qemu-devel] [PATCH] MAINTAINERS: update target-mips maintainers

2016-09-22 Thread Yongbok Kim
On 22/09/2016 14:34, Leon Alrae wrote: > Yongbok Kim takes over the target-mips maintenance from me. > > Signed-off-by: Leon Alrae > --- > Hi, > > September is my last month in ImgTec, and therefore soon I won't be able to > look after target-mips code. I would like to

Re: [Qemu-devel] [PATCH] dma: xlnx-zynq-devcfg: Fix up XLNX_ZYNQ_DEVCFG_R_MAX

2016-09-22 Thread Peter Maydell
On 21 September 2016 at 21:40, Alistair Francis wrote: > On Wed, Sep 21, 2016 at 11:09 AM, Nathan Rossi wrote: >> Whilst according to the Zynq TRM this device covers a register region of >> 0x000 - 0x120. The register region is also shared

[Qemu-devel] [PATCH v2 3/3] tests: start generic qemu-qmp tests

2016-09-22 Thread Marc-André Lureau
These 2 tests exhibit two qmp bugs fixed by the previous patches. Signed-off-by: Marc-André Lureau --- tests/qemu-qmp-test.c | 61 ++ tests/Makefile.include | 1 + 2 files changed, 62 insertions(+) create mode

[Qemu-devel] [PATCH] MAINTAINERS: update target-mips maintainers

2016-09-22 Thread Leon Alrae
Yongbok Kim takes over the target-mips maintenance from me. Signed-off-by: Leon Alrae --- Hi, September is my last month in ImgTec, and therefore soon I won't be able to look after target-mips code. I would like to nominate Yongbok Kim as the new co-maintainer. Yongbok

Re: [Qemu-devel] [PATCH] Avoid additional GET_FEATURES call on vhost-user

2016-09-22 Thread Felipe Franciosi
> On 19 Sep 2016, at 18:42, Michael S. Tsirkin wrote: > > Thanks for the reminder. 2.8 is open now so I can integrate this. > I would appreciate it if you could rebase this top of > > commit d1b4259f1ab18af24e6a297edb6a8f71691f3256 > Author: Maxime Coquelin

Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination

2016-09-22 Thread Herongguang (Stephen)
On 2016/9/14 17:05, Paolo Bonzini wrote: On 14/09/2016 09:55, Herongguang (Stephen) wrote: Hi, We found a problem that when a redhat 6 VM reboots (in grub countdown UI), migrating this VM will result in VM’s memory difference between source and destination side. The difference always

Re: [Qemu-devel] [PATCH v4 14/17] trace: get rid of generated-events.h/generated-events.c

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > Currently the generated-events.[ch] files contain the > event dstates, constants and TraceEvent structs, while the > generated-tracers.[ch] files contain the actual trace > probe logic. With the removal of usage of the event enums > from the API there is no longer any

[Qemu-devel] [PATCH] docs: Belatedly update for move of qmp-commands.txt.

2016-09-22 Thread Markus Armbruster
Missed in commit d076a2a and commit bd6092e. Signed-off-by: Markus Armbruster --- docs/xen-save-devices-state.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/xen-save-devices-state.txt b/docs/xen-save-devices-state.txt index 92e08db..a72ecc8

[Qemu-devel] [PATCH v2 00/14] pc: q35: x2APIC support in kvm_apic mode

2016-09-22 Thread Igor Mammedov
Changes since v1: - rebase on top of 2.7 - drop add 2.8 machine and linux headers update patches - drop numa related patches (will post separately as unrelated) - change default mc->maxcpus only for q35 Changes since RFC: - use new KVM_CAP_X2APIC_API to detect x2APIC IDs support -

[Qemu-devel] [PATCH v2 0/3] Fix some qapi assert()

2016-09-22 Thread Marc-André Lureau
Hi, The following series fixes 2 triggerable asserts in qmp code: - object-add assert() without props - input visitor may assert() on missing parameter Marc-André Lureau (3): qmp: fix object-add assert() without props qapi: fix crash when a parameter is missing tests: start generic

Re: [Qemu-devel] [PATCH v4 12/17] trace: dynamically allocate trace_dstate in CPUState

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > The CPUState struct has a bitmap tracking which VCPU > events are currently active. This is indexed based on > the event ID values, and sized according the maximum > TraceEventVCPUID enum value. > When we start dynamically assigning IDs at runtime, > we can't

Re: [Qemu-devel] [PATCH] replay: Fix build with -Werror=unused-result

2016-09-22 Thread Eric Blake
On 09/22/2016 06:51 AM, Markus Armbruster wrote: >> >> I think the file probably should not have been listed as public domain >> in the first place, as its initial contents were copied from qemu-common.h >> which is not public domain. > > Ewww! Needs fixing. Indeed. Commit 5c02632 shows the

Re: [Qemu-devel] [PATCH v2 3/4] qapi: return a 'missing parameter' error

2016-09-22 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing > > parameters, but the qapi qmp_dispatch() code uses > > QERR_INVALID_PARAMETER_TYPE. > > > > Improve qapi code to return

Re: [Qemu-devel] [PATCH 3/7] block/qapi: Move 'aio' option to file driver

2016-09-22 Thread Eric Blake
On 09/22/2016 05:25 AM, Kevin Wolf wrote: >>> >>> +static bool get_aio_option(QemuOpts *opts, int flags, Error **errp) >>> +{ >>> +const char *aio = qemu_opt_get(opts, "aio"); >>> +if (!aio) { >>> +return !!(flags & BDRV_O_NATIVE_AIO); >>> +} else if (!strcmp(aio, "native"))

Re: [Qemu-devel] [PATCH v2 3/4] qapi: return a 'missing parameter' error

2016-09-22 Thread Markus Armbruster
Marc-André Lureau writes: > The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing > parameters, but the qapi qmp_dispatch() code uses > QERR_INVALID_PARAMETER_TYPE. > > Improve qapi code to return QERR_INVALID_PARAMETER_TYPE where > appropriate. > >

[Qemu-devel] [PATCH v2 09/14] pc: apic_common: reset APIC ID to initial ID when switching into x2APIC mode

2016-09-22 Thread Igor Mammedov
SDM: x2APIC State Transitions: State Changes From xAPIC Mode to x2APIC Mode " Any APIC ID value written to the memory-mapped local APIC ID register is not preserved " Signed-off-by: Igor Mammedov --- hw/intc/apic_common.c | 5 + 1 file changed, 5 insertions(+)

Re: [Qemu-devel] [PATCH v4 00/17] Refactor trace to allow modular build

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > These patches were previously posted as part of my giant > trace events modular build series [...] BTW, thanks for the effort. Not only will this improve build times, but I can build a further simplification of the auto-generated files on top (I'll try to merge the

Re: [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and TraceEventVCPUID enums

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 02:35:38PM +0200, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > The TraceEventID and TraceEventVCPUID enums constants are > > no longer actually used for anything critical. > > > The TRACE_EVENT_COUNT limit is used to determine the size > > of the TraceEvents

Re: [Qemu-devel] [PATCH v4 02/17] trace: convert code to use event iterators

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 02:20:26PM +0200, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > This converts the HMP/QMP monitor API implementations > > and some internal trace control methods to use the new > > trace event iterator APIs. > > > Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v2 3/9] new: blacklist.tsan

2016-09-22 Thread Eric Blake
On 09/22/2016 05:13 AM, Alex Bennée wrote: > A list of blacklists for tsan instrumentation. One hopes more can be > removed over time as tsan improves. A list of one file? It sounds like this sentence is stale, from an earlier revision where the blacklist was longer. > > The path needs to be

<    1   2   3   4   5   6   7   >