Re: [Qemu-devel] [PATCH v3 11/11] tcg-mips: Adjust condition functions for mips64

2016-11-28 Thread Richard Henderson
On 11/27/2016 11:42 PM, Jin Guojie wrote: By reading Richard and Aurelien's comment, I realized now the best way to solve this problem is not to add ext32s in brcond_32i, but to fix the helper function. In another word, the register value should be 32-bit sign-extened at where it's being *creat

Re: [Qemu-devel] [PATCH v2 1/1] block/vmdk: Fix the endian problem of buf_len and lba

2016-11-28 Thread Hao QingFeng
在 2016-11-28 15:56, liujing 写道: Hi QingFeng, I just have a question that whether the marker->data need convert? I've no idea, just suddenly realized this question. nope, the data is type of char * for the compressed data stream, so no endian issue. thanks. Jing On 11/26/2016 01:46 PM, Q

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 01/11] run_tests: allow forcing of acceleration mode

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:23PM +, Alex Bennée wrote: > While tests can be pegged to tcg it is useful to override this from time > to time, especially when testing correctness on real systems. > --- > run_tests.sh | 8 ++-- > scripts/runtime.bash | 4 > 2 files changed, 10

[Qemu-devel] [PATCH] block/mirror: Fix passing wrong argument to trace_mirror_yield

2016-11-28 Thread Yang Wei
mirror_yield is defined in block/trace-event, just like the following: mirror_yield(void *s, int64_t cnt, int buf_free_count, int in_flight) so we should exchange arguement 2 and 4 while invoking it. Signed-off-by: Yang Wei --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 02/11] run_tests: allow disabling of timeouts

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:24PM +, Alex Bennée wrote: > Certainly during development of the tests and MTTCG there are times when > the timeout just gets in the way. > > Signed-off-by: Alex Bennée > --- > run_tests.sh | 8 ++-- > scripts/runtime.bash | 4 > 2 files changed

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-28 Thread Gerd Hoffmann
Hi, > If I understand correctly, one argument against the current state of > writeable fw_cfg, captured in > , is > that callbacks on write are not supported. Apparently, QEMU code that > uses the data written by the guest is sup

Re: [Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level

2016-11-28 Thread Dr. David Alan Gilbert
* Samuel Thibault (samuel.thiba...@gnu.org) wrote: > Samuel Thibault, on Sun 27 Nov 2016 16:13:46 +0100, wrote: > > Dr. David Alan Gilbert (git), on Wed 23 Nov 2016 18:52:57 +, wrote: > > > +static const VMStateDescription vmstate_slirp_socket_addr = { > > > +.name = "slirp-socket-addr", >

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 03/11] run_tests: allow passing of options to QEMU

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:25PM +, Alex Bennée wrote: > This introduces a the option -o for passing of options directly to QEMU > which is useful. In my case I'm using it to toggle MTTCG on an off: > > ./run_tests.sh -t -o "-tcg mttcg=on" > > Signed-off-by: Alex Bennée > --- > run_test

Re: [Qemu-devel] [PATCH] {disas, slirp}: Replace min/max with MIN/MAX macros

2016-11-28 Thread Yuval Shaia
On Mon, Nov 28, 2016 at 08:39:21AM +0100, Markus Armbruster wrote: > The "{disas, slirp}: " prefix is unusual. Better: "disas, slirp: ". > But I'd instead split the patch into the slirp part, where you really > replace stuff, and the disas part, where you merely drop an unused macro > definition.

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 04/11] libcflat: add PRI(dux)32 format types

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:26PM +, Alex Bennée wrote: > So we can have portable formatting of uint32_t types. > > Signed-off-by: Alex Bennée > --- > lib/libcflat.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/lib/libcflat.h b/lib/libcflat.h > index bdcc561..6dab5be 10064

[Qemu-devel] [PATCH v1] slirp, disas: Replace min/max with MIN/MAX macros

2016-11-28 Thread Yuval Shaia
Signed-off-by: Yuval Shaia --- v0 -> v1: * Remove unndeeded "include" as suggested by Fam Zheng * Change commit message's prefix as suggested by Markus Armbruster * Utilize MIN macro in two extra places in file disas/m68k.c --- disas/m68k.c | 8 ++-- slirp/dhcpv

[Qemu-devel] [Bug 1641861] Re: fail to correctly emulate FPSCR register on arm

2016-11-28 Thread Peter Maydell
Hi. The v8 ARM ARM defines these bits of the FPSCR as "RES0". The glossary definition of "RES0" says that for bits in a RW register it is an implementation choice whether the bits should be "hardwired to 0" (ie writes are ignored) or whether the bit can be written and read back (but has no effect o

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 06/11] arm/Makefile.common: force -fno-pic

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:28PM +, Alex Bennée wrote: > As distro compilers move towards defaults for build hardening for things > like ASLR we need to force -fno-pic. Failure to do can lead to weird > relocation problems when we build our "lat" binaries. > > Signed-off-by: Alex Bennée > -

Re: [Qemu-devel] GPIO input?

2016-11-28 Thread Peter Maydell
On 17 November 2016 at 12:41, Liviu Ionescu wrote: > I added graphical buttons to GNU ARM Eclipse QEMU, and I can already trigger > actions when a button is pushed/released, so currently I can reset the > STM32F4DISCOVERY board clicking the reset button on the board picture. > > Now I want to im

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-28 Thread Paolo Bonzini
On 25/11/2016 15:10, Igor Mammedov wrote: > On Fri, 25 Nov 2016 03:55:29 -0500 (EST) > Paolo Bonzini wrote: >>> if 0x3 were covered by SMRR range, then OSPM wouldn't able to >>> place its own code there and there wouldn't be any need in side interfaces >>> to put and get CPU in/from some und

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 07/11] arm/tlbflush-code: Add TLB flush during code execution test

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:29PM +, Alex Bennée wrote: > This adds a fairly brain dead torture test for TLB flushes intended for > stressing the MTTCG QEMU build. It takes the usual -smp option for > multiple CPUs. > > By default it CPU0 will do a TLBIALL flush after each cycle. You can > pa

Re: [Qemu-devel] [RfC PATCH 0/3] edk2: add efi firmware builds

2016-11-28 Thread Gerd Hoffmann
Hi, > Should we think about our policy for distributing & shipping ROMS > more generally ? Most distros will actively strip out the ROMs that > we ship in the QEMU tar.gz releases, and rebuild them from pristine > source in order to ensure they're fully complying with licensing > requirements w

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 08/11] arm/tlbflush-data: Add TLB flush during data writes test

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:30PM +, Alex Bennée wrote: > This test is the cousin of the tlbflush-code test. Instead of flushing > running code it re-maps virtual addresses while a buffer is being filled > up. It then audits the results checking for writes that have ended up in > the wrong pla

Re: [Qemu-devel] QEMU soundcards vulnerable to jack retasking?

2016-11-28 Thread Dr. David Alan Gilbert
* ban...@openmailbox.org (ban...@openmailbox.org) wrote: > Recent security research shows that soundcards support surreptitiously > switching line-out jacks into line-in by modifying the software stack. The > way modern speakers and headphones are designed makes them readily usable as > microphones

Re: [Qemu-devel] GPIO input?

2016-11-28 Thread Liviu Ionescu
> On 28 Nov 2016, at 11:34, Peter Maydell wrote: > > You might prefer to use the named-gpios ... I already did so, thank you. Liviu

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-28 Thread Laszlo Ersek
On 11/28/16 10:01, Gerd Hoffmann wrote: > Hi, > >> If I understand correctly, one argument against the current state of >> writeable fw_cfg, captured in >> , is >> that callbacks on write are not supported. Apparently, QEMU code

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-28 Thread Ketan Nilangekar
On 11/25/16, 5:05 PM, "Stefan Hajnoczi" wrote: On Fri, Nov 25, 2016 at 08:27:26AM +, Ketan Nilangekar wrote: > On 11/24/16, 9:38 PM, "Stefan Hajnoczi" wrote: > On Thu, Nov 24, 2016 at 11:31:14AM +, Ketan Nilangekar wrote: > > On 11/24/16, 4:41 PM, "Stefan Hajnoc

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 09/11] arm/locking-tests: add comprehensive locking test

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:31PM +, Alex Bennée wrote: > This test has been written mainly to stress multi-threaded TCG behaviour > but will demonstrate failure by default on real hardware. The test takes > the following parameters: > > - "lock" use GCC's locking semantics > - "atomic" u

Re: [Qemu-devel] QEMU soundcards vulnerable to jack retasking?

2016-11-28 Thread Gerd Hoffmann
On Fr, 2016-11-25 at 21:25 +0100, ban...@openmailbox.org wrote: > Recent security research shows that soundcards support surreptitiously > switching line-out jacks into line-in by modifying the software stack. > The way modern speakers and headphones are designed makes them readily > usable as m

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:22PM +, Alex Bennée wrote: > Hi, > > Looking at my records it seems as though it has been a while since I > last posted these tests. As I'm hoping to get the final bits of MTTCG > merged upstream on the next QEMU development cycle I've been re-basing > these and g

Re: [Qemu-devel] QEMU soundcards vulnerable to jack retasking?

2016-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2016 at 10:19:16AM +, Dr. David Alan Gilbert wrote: > * ban...@openmailbox.org (ban...@openmailbox.org) wrote: > > Recent security research shows that soundcards support surreptitiously > > switching line-out jacks into line-in by modifying the software stack. The > > way modern

Re: [Qemu-devel] [PATCH] target-arm: Add VBAR support to ARM1176 CPUs

2016-11-28 Thread Peter Maydell
On 24 November 2016 at 14:29, Cédric Le Goater wrote: > On 09/05/2016 04:39 PM, Peter Maydell wrote: >> We implement VBAR in v7-without-EL3 even though architecturally >> it should only exist in v7-with-EL3 because we have some >> legacy board models which we implement as without-EL3 but >> where

Re: [Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level

2016-11-28 Thread Samuel Thibault
Hello, Dr. David Alan Gilbert, on Mon 28 Nov 2016 09:08:16 +, wrote: > Hmm, I don't really know IPv6 but I'm thinking this code will become > something like > the following (says he not knowing whether a scope-id or a flowinfo > is something that needs migrating) (untested): > > > static co

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:22PM +, Alex Bennée wrote: > Hi, > > Looking at my records it seems as though it has been a while since I > last posted these tests. As I'm hoping to get the final bits of MTTCG > merged upstream on the next QEMU development cycle I've been re-basing > these and g

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Alex Bennée
Andrew Jones writes: > On Thu, Nov 24, 2016 at 04:10:22PM +, Alex Bennée wrote: >> Hi, >> >> Looking at my records it seems as though it has been a while since I >> last posted these tests. As I'm hoping to get the final bits of MTTCG >> merged upstream on the next QEMU development cycle I'v

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Peter Maydell
On 28 November 2016 at 11:12, Alex Bennée wrote: > > Andrew Jones writes: >> I've skimmed over everything looking at it from a framwork/sytle >> perspective. I didn't dig in trying to understand the tests though. >> One general comment, I see many tests introduce MAX_CPUS 8. Why do >> that? Why n

Re: [Qemu-devel] [Nbd] [PATCH v3] doc: Add NBD_CMD_BLOCK_STATUS extension

2016-11-28 Thread Stefan Hajnoczi
On Sun, Nov 27, 2016 at 08:17:14PM +0100, Wouter Verhelst wrote: > Quickly: the reason I haven't merged this yes is twofold: > - I wasn't thrilled with the proposal at the time. It felt a bit > hackish, and bolted onto NBD so you could use it, but without defining > everything in the NBD protoc

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 03/11] run_tests: allow passing of options to QEMU

2016-11-28 Thread Alex Bennée
Andrew Jones writes: > On Thu, Nov 24, 2016 at 04:10:25PM +, Alex Bennée wrote: >> This introduces a the option -o for passing of options directly to QEMU >> which is useful. In my case I'm using it to toggle MTTCG on an off: >> >> ./run_tests.sh -t -o "-tcg mttcg=on" >> >> Signed-off-by:

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-28 Thread Igor Mammedov
On Mon, 28 Nov 2016 10:41:42 +0100 Paolo Bonzini wrote: > On 25/11/2016 15:10, Igor Mammedov wrote: > > On Fri, 25 Nov 2016 03:55:29 -0500 (EST) > > Paolo Bonzini wrote: > >>> if 0x3 were covered by SMRR range, then OSPM wouldn't able to > >>> place its own code there and there wouldn't be

Re: [Qemu-devel] [PATCH v1 1/1] generic-loader: file: Only set a PC if a CPU is specified

2016-11-28 Thread Peter Maydell
On 16 November 2016 at 22:02, Alistair Francis wrote: > On Fri, Nov 11, 2016 at 8:06 PM, Edgar E. Iglesias > wrote: >> On Fri, Nov 11, 2016 at 06:51:20PM -0800, Alistair Francis wrote: >>> This patch fixes the generic-loader file loading to only set the program >>> counter if a CPU is specified.

Re: [Qemu-devel] [PATCH v2 1/1] cadence_uart: Check baud rate generator and divider values on migration

2016-11-28 Thread Peter Maydell
On 8 November 2016 at 00:34, Alistair Francis wrote: > The Cadence UART device emulator calculates speed by dividing the > baud rate by a 'baud rate generator' & 'baud rate divider' value. > The device specification defines these register values to be > non-zero and within certain limits. Checks w

Re: [Qemu-devel] [Qemu-arm] [PATCH] arm: Create /chosen and /memory devicetree nodes if necessary

2016-11-28 Thread Peter Maydell
On 17 November 2016 at 01:30, Guenter Roeck wrote: > While customary, the /chosen and /memory devicetree nodes do not have to > exist. Create if necessary. Also create the /memory/device_type property > if needed. > > Signed-off-by: Guenter Roeck > --- > The problem is seen with the latest versio

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 12:24, Igor Mammedov wrote: > On Mon, 28 Nov 2016 10:41:42 +0100 > Paolo Bonzini wrote: > >> On 25/11/2016 15:10, Igor Mammedov wrote: >>> On Fri, 25 Nov 2016 03:55:29 -0500 (EST) >>> Paolo Bonzini wrote: > if 0x3 were covered by SMRR range, then OSPM wouldn't able to >

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 11:22, Laszlo Ersek wrote: > Michael suggested to use negotiation like virtio does (where the host > can reject invalid combinations of requested features): > > http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg03077.html > http://lists.nongnu.org/archive/html/qemu-devel/2

Re: [Qemu-devel] [PATCH v6 3/4] hw/intc/arm_gicv3_kvm: Save and Restore ICC_SRE_EL1 register

2016-11-28 Thread Peter Maydell
On 23 November 2016 at 12:39, wrote: > From: Vijaya Kumar K > > Save and Restore ICC_SRE_EL1 register. ICC_SRE_EL1 register > value is used by kernel to check if SRE bit is set or not. > > Signed-off-by: Vijaya Kumar K > --- > hw/intc/arm_gicv3_kvm.c| 4 > include/hw/intc/arm_

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Mon, Nov 28, 2016 at 11:14:48AM +, Peter Maydell wrote: > On 28 November 2016 at 11:12, Alex Bennée wrote: > > > > Andrew Jones writes: > >> I've skimmed over everything looking at it from a framwork/sytle > >> perspective. I didn't dig in trying to understand the tests though. > >> One ge

Re: [Qemu-devel] [PATCH v6 2/4] hw/intc/arm_gicv3_kvm: Implement get/put functions

2016-11-28 Thread Peter Maydell
On 23 November 2016 at 12:39, wrote: > From: Vijaya Kumar K > > This actually implements pre_save and post_load methods for in-kernel > vGICv3. > > Signed-off-by: Pavel Fedin > Signed-off-by: Peter Maydell > [PMM: > * use decimal, not 0bnnn > * fixed typo in names of ICC_APR0R_EL1 and ICC_AP

Re: [Qemu-devel] [PATCH v6 3/4] hw/intc/arm_gicv3_kvm: Save and Restore ICC_SRE_EL1 register

2016-11-28 Thread Peter Maydell
On 28 November 2016 at 11:54, Peter Maydell wrote: > On 23 November 2016 at 12:39, wrote: >> From: Vijaya Kumar K >> >> Save and Restore ICC_SRE_EL1 register. ICC_SRE_EL1 register >> value is used by kernel to check if SRE bit is set or not. >> >> Signed-off-by: Vijaya Kumar K >> --- >> hw/in

Re: [Qemu-devel] [PATCH] include: Add roundup_pow_of_two helper function

2016-11-28 Thread Marcel Apfelbaum
On 11/28/2016 09:18 AM, Yuval Shaia wrote: Move private implementation of rthe function to osdep.h Hi Yuval, In my opinion we need to use the function in at least two places in order to promote it to a global utility. You are welcome to try to find another place needing it. Thanks, Marcel

[Qemu-devel] [PATCH v3] crypto: add virtio-crypto driver

2016-11-28 Thread Gonglei
This patch introduces virtio-crypto driver for Linux Kernel. The virtio crypto device is a virtual cryptography device as well as a kind of virtual hardware accelerator for virtual machines. The encryption anddecryption requests are placed in the data queue and are ultimately handled by thebackend

[Qemu-devel] [PATCH v3] virtio-crypto: add Linux driver

2016-11-28 Thread Gonglei
v3: - set cpu affinity when data queues are not equal to the number of online cpus. [Michael] - add TODO comments for cpu hotplug (changing the relationship of binding virtqueue and cpu) - use __u32/64 in the config space since the virtio->get() doesn't support byte-swap yet. [Michael] - dro

Re: [Qemu-devel] [qemu patch V3 0/2] improve kvmclock difference on migration

2016-11-28 Thread Marcelo Tosatti
On Mon, Nov 21, 2016 at 08:50:02AM -0200, Marcelo Tosatti wrote: > See individual patches for details. This patchset depends on kernels > "[PATCH] kvm: kvmclock: let KVM_GET_CLOCK return whether the master > clock is in use" from Paolo. Ping?

[Qemu-devel] [Bug 1563152] Re: general protection fault running VirtualBox in KVM guest

2016-11-28 Thread Robie Basak
** Tags added: needs-upstream-report -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1563152 Title: general protection fault running VirtualBox in KVM guest Status in QEMU: New Status in qemu pack

Re: [Qemu-devel] [PATCH v2 4/4] spec/vhost-user: add VHOST_USER_PROTOCOL_F_VERSATILE_SLAVE

2016-11-28 Thread Marc-André Lureau
Hi On Thu, Nov 24, 2016 at 7:20 AM Wei Wang wrote: > The VHOST_USER_PROTOCOL_F_VERSATILE_SLAVE protocol feature indicates > that the slave side implementation supports different types of devices. > The master tells the slave what type of device to create by sending > the VHOST_USER_SET_DEV_INFO

Re: [Qemu-devel] [PATCH 2/2] virtio-gpu: call cleanup mapping function in resource destroy

2016-11-28 Thread Marc-André Lureau
Hi On Thu, Nov 24, 2016 at 4:30 PM Li Qiang wrote: > If the guest destroy the resource before detach banking, the 'iov' > and 'addrs' field in resource is not freed thus leading memory > leak issue. This patch avoid this. > > That looks correct to me. Reviewed-by: Marc-André Lureau Please s

Re: [Qemu-devel] [PATCH v6 4/4] hw/intc/arm_gicv3_kvm: Reset GICv3 cpu interface registers

2016-11-28 Thread Peter Maydell
On 23 November 2016 at 12:39, wrote: > From: Vijaya Kumar K > > Reset CPU interface registers of GICv3 when CPU is reset. > For this, object interface is used, which is called from > arm_cpu_reset function. > > Signed-off-by: Vijaya Kumar K This approach doesn't handle the SMP case correctly -

Re: [Qemu-devel] [PATCH v3] crypto: add virtio-crypto driver

2016-11-28 Thread Cornelia Huck
On Mon, 28 Nov 2016 20:08:23 +0800 Gonglei wrote: > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > +{ > + u32 status; > + int err; > + > + virtio_cread(vcrypto->vdev, > + struct virtio_crypto_config, status, &status); > + > + /* Ignore unknown (futur

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Peter Maydell
On 28 November 2016 at 11:58, Andrew Jones wrote: > On Mon, Nov 28, 2016 at 11:14:48AM +, Peter Maydell wrote: >> On 28 November 2016 at 11:12, Alex Bennée wrote: >> > >> > Andrew Jones writes: >> >> I've skimmed over everything looking at it from a framwork/sytle >> >> perspective. I didn't

[Qemu-devel] [PATCH 1/2] migration/pcspk: Add a property to state if pcspk is migrated

2016-11-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow us to turn migration of pcspk off for compatibility. Signed-off-by: Dr. David Alan Gilbert --- hw/audio/pcspk.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index 984534b..7980022 100644 --- a/hw/audio/

[Qemu-devel] [PATCH 0/2] pcspk migration compatibility

2016-11-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, 39c88f56 added VMState for pcspk but turned it on for all machine types, this breaks backwards compatibility to older machine types. If this is too late for 2.8 then I suggest we take the 1st of these two patches, which just makes it a property to flip for

Re: [Qemu-devel] [virtio-comment] Re: [PATCH v2 4/4] spec/vhost-user: add VHOST_USER_PROTOCOL_F_VERSATILE_SLAVE

2016-11-28 Thread Wei Wang
On 11/28/2016 08:41 PM, Marc-André Lureau wrote: Hi On Thu, Nov 24, 2016 at 7:20 AM Wei Wang > wrote: The VHOST_USER_PROTOCOL_F_VERSATILE_SLAVE protocol feature indicates that the slave side implementation supports different types of devices. The ma

[Qemu-devel] [PATCH 2/2] migration/pcspk: Turn migration of pcspk off for 2.7 and older

2016-11-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" To keep backwards migration compatibility allow us to turn pcspk migration off. Signed-off-by: Dr. David Alan Gilbert --- include/hw/i386/pc.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 67a1a9e..4b74

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-28 Thread Paolo Bonzini
On 17/11/2016 13:16, Marcelo Tosatti wrote: > What QEMU wants is to use KVM_GET_CLOCK at pre_save independently > of whether masterclock is enabled or not... it just depends > on KVM_GET_CLOCK being correct for the masterclock case > (108b249c453dd7132599ab6dc7e435a7036c193f). > > So a "reliable

Re: [Qemu-devel] [PATCH v4] target-ppc: add vextu[bhw][lr]x instructions

2016-11-28 Thread Richard Henderson
On 11/27/2016 11:56 PM, Nikunj A Dadhania wrote: > From: Avinesh Kumar > > vextublx: Vector Extract Unsigned Byte Left > vextuhlx: Vector Extract Unsigned Halfword Left > vextuwlx: Vector Extract Unsigned Word Left > vextubrx: Vector Extract Unsigned Byte Right-Indexed VX-form > vextuhrx: Vector

[Qemu-devel] [PULL 2/2] arm: Create /chosen and /memory devicetree nodes if necessary

2016-11-28 Thread Peter Maydell
From: Guenter Roeck While customary, the /chosen and /memory devicetree nodes do not have to exist. Create if necessary. Also create the /memory/device_type property if needed. Signed-off-by: Guenter Roeck Message-id: 1479346221-18474-1-git-send-email-li...@roeck-us.net Reviewed-by: Peter Mayde

[Qemu-devel] [PULL 0/2] target-arm queue

2016-11-28 Thread Peter Maydell
-arm.git tags/pull-target-arm-20161128 for you to fetch changes up to b77257d7bae26a0fca6a90af88d54ee2c45f5b61: arm: Create /chosen and /memory devicetree nodes if necessary (2016-11-28 11:32:34 +) target-arm queue: * hw/arm

[Qemu-devel] [PULL 1/2] generic-loader: file: Only set a PC if a CPU is specified

2016-11-28 Thread Peter Maydell
From: Alistair Francis This patch fixes the generic-loader file loading to only set the program counter if a CPU is specified. This follows what is written in the documentation and was always part of the original intention. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Message

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Mon, Nov 28, 2016 at 01:30:54PM +, Peter Maydell wrote: > On 28 November 2016 at 11:58, Andrew Jones wrote: > > On Mon, Nov 28, 2016 at 11:14:48AM +, Peter Maydell wrote: > >> On 28 November 2016 at 11:12, Alex Bennée wrote: > >> > > >> > Andrew Jones writes: > >> >> I've skimmed over

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Mon, Nov 28, 2016 at 03:04:45PM +0100, Andrew Jones wrote: > On Mon, Nov 28, 2016 at 01:30:54PM +, Peter Maydell wrote: > > On 28 November 2016 at 11:58, Andrew Jones wrote: > > > On Mon, Nov 28, 2016 at 11:14:48AM +, Peter Maydell wrote: > > >> On 28 November 2016 at 11:12, Alex Bennée

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Peter Maydell
On 28 November 2016 at 14:07, Andrew Jones wrote: > Er... actually mach-virt is 123, as we only allocate 123 redistributors. Oh yes, I'd forgotten about that limit. We'd need to add a KVM API for allocating redistributors in non-contiguous bits of memory if we wanted to raise that. thanks -- PMM

Re: [Qemu-devel] [PATCH v2] pci-assign: sync MSI/MSI-X cap and table with PCIDevice

2016-11-28 Thread Paolo Bonzini
On 25/11/2016 18:05, Michael S. Tsirkin wrote: > On Fri, Nov 25, 2016 at 10:55:22AM +0800, Peter Xu wrote: >> Since commit e1d4fb2d ("kvm-irqchip: x86: add msi route notify fn"), >> kvm_irqchip_add_msi_route() starts to use pci_get_msi_message() to fetch >> MSI info. This requires that we setup M

Re: [Qemu-devel] [qemu patch V3 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-28 Thread Eduardo Habkost
Sorry for not noticing the following issues on the previous reviews. I was only paying attention to the vmstate and machine code: On Mon, Nov 21, 2016 at 08:50:04AM -0200, Marcelo Tosatti wrote: > Check for KVM_CAP_ADJUST_CLOCK capability KVM_CLOCK_TSC_STABLE, which > indicates that KVM_GET_CLOCK

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-28 Thread Stefan Hajnoczi
On Mon, Nov 28, 2016 at 10:23:41AM +, Ketan Nilangekar wrote: > > > On 11/25/16, 5:05 PM, "Stefan Hajnoczi" wrote: > > On Fri, Nov 25, 2016 at 08:27:26AM +, Ketan Nilangekar wrote: > > On 11/24/16, 9:38 PM, "Stefan Hajnoczi" wrote: > > On Thu, Nov 24, 2016 at 11:31:14AM

Re: [Qemu-devel] [PATCH v3 10/11] tcg-mips: Adjust qemu_ld/st for mips64

2016-11-28 Thread Richard Henderson
On 11/27/2016 10:59 PM, Jin Guojie wrote: > In Richard's v2 patch (shown as below), the compilation on mips64 host is > disabled. > > -#define LO_OFF(MIPS_BE * 4) > -#define HI_OFF(4 - LO_OFF) > +#if TCG_TARGET_REG_BITS == 32 > +# define LO_OFF (MIPS_BE * 4) > +# define HI_OFF (4 - LO_O

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-28 Thread Eduardo Habkost
On Mon, Nov 28, 2016 at 02:47:18PM +0100, Paolo Bonzini wrote: > > > On 17/11/2016 13:16, Marcelo Tosatti wrote: > > What QEMU wants is to use KVM_GET_CLOCK at pre_save independently > > of whether masterclock is enabled or not... it just depends > > on KVM_GET_CLOCK being correct for the masterc

Re: [Qemu-devel] [PATCH] target-m68k: Implement bfffo

2016-11-28 Thread Richard Henderson
On 11/27/2016 11:53 AM, Laurent Vivier wrote: >> tcg_gen_andi_i32(tmp, tmp, 31); >> > mask = tcg_const_i32(0x7fffu); >> > tcg_gen_shr_i32(mask, mask, tmp); >> > +if (!TCGV_IS_UNUSED(tlen)) { >> > +tcg_gen_mov_i32(tlen, tmp); > W

Re: [Qemu-devel] [PATCH v2 3/5] target-m68k: Inline shifts

2016-11-28 Thread Richard Henderson
On 11/27/2016 09:53 AM, Laurent Vivier wrote: >> > +TCGv t0 = tcg_temp_new(); >> > +tcg_gen_sari_i32(QREG_CC_V, reg, bits - 1); >> > +tcg_gen_sari_i32(t0, t0, bits - count); > t0 is used unitialized, I think we should have here: > > t

Re: [Qemu-devel] [PATCH for-2.8 0/4] Allow 'cache-clean-interval' in Linux only

2016-11-28 Thread Kevin Wolf
Am 25.11.2016 um 12:27 hat Alberto Garcia geschrieben: > Hi all, > > The cache-clean-interval setting of qcow2 frees the memory of the L2 > cache tables that haven't been used after a certain interval of time. > > QEMU uses madvise() with MADV_DONTNEED for this. After that call, the > data in the

Re: [Qemu-devel] [PATCH v2 3/5] target-m68k: Inline shifts

2016-11-28 Thread Richard Henderson
On 11/27/2016 11:30 AM, Laurent Vivier wrote: > There is another bug on this one. > > Le 09/11/2016 à 14:46, Richard Henderson a écrit : >> diff --git a/target-m68k/translate.c b/target-m68k/translate.c >> index 4f224d7..1b3765f 100644 >> --- a/target-m68k/translate.c >> +++ b/target-m68k/translat

Re: [Qemu-devel] [PATCH v2 3/5] target-m68k: Inline shifts

2016-11-28 Thread Richard Henderson
On 11/27/2016 11:35 AM, Laurent Vivier wrote: >> > +tcg_gen_extr_i64_i32(QREG_CC_N, QREG_CC_C, t64); > This does not extract correctly the C flag when the opsize is word or byte. > I think we should use a shift instead: > > -tcg_gen_extr_i64_i32(QREG_CC_N, QREG_CC_C, t64); > - > -

Re: [Qemu-devel] [PATCH v2 4/5] target-m68k: Implement bitfield ops for registers

2016-11-28 Thread Richard Henderson
On 11/27/2016 11:46 AM, Laurent Vivier wrote: >> +uint32_t maski = -2U << (len - 1); >> > +uint32_t roti = (ofs + len) & 31; >> > +tcg_gen_andi_i32(tmp, src, maski); > should be: > >tcg_gen_andi_i32(tmp, src, ~maski); > > Is it correct? Yes.

[Qemu-devel] [Bug 1645287] [NEW] Option "split" does not available for kernel_irqchip flag in qemu-system-x86_64

2016-11-28 Thread Po-Hsu Lin
Public bug reported: On releases prior to Yakkety, the "split" option is not available for kernel_irqchip flag in qemu-system-x86_64. Yakkety: kernel_irqchip=on|off|split controls accelerated irqchip support (default=off) Xenial: kernel_irqchip=on|off controls accelerated irqchip support Trust

Re: [Qemu-devel] Linux kernel polling for QEMU

2016-11-28 Thread Eliezer Tamir
+ Eric, Willem On 24/11/2016 17:12, Stefan Hajnoczi wrote: > I looked through the socket SO_BUSY_POLL and blk_mq poll support in > recent Linux kernels with an eye towards integrating the ongoing QEMU > polling work. The main missing feature is eventfd polling support which > I describe below. ..

Re: [Qemu-devel] [PATCH 0/2] pcspk migration compatibility

2016-11-28 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 28/11/2016 14:31, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Hi, > > 39c88f56 added VMState for pcspk but turned it on for > > all machine types, this breaks backwards compatibility > > to older machine

[Qemu-devel] [Bug 1645355] [NEW] x86: singlestepping through SYSCALL instruction causes exception in kernelspace

2016-11-28 Thread Rudolf Marek
Public bug reported: Hi, The bug was originally reported [1] and [2] here. There is a problem inside QEMU with singlestepping from userspace until SYSCALL instruction is reached. The OS has in FMASK TF bit set, therefore there should be no singlestepping exception when transitioning to kernelmode

Re: [Qemu-devel] [PATCH 0/2] pcspk migration compatibility

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 14:31, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Hi, > 39c88f56 added VMState for pcspk but turned it on for > all machine types, this breaks backwards compatibility > to older machine types. > > If this is too late for 2.8 then I suggest we tak

Re: [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 15:28, Eduardo Habkost wrote: > > +s->src_use_reliable_get_clock = data.flags & KVM_CLOCK_TSC_STABLE; > > I still don't understand the reasoning behind > kvm_has_adjust_clock_stable() vs (flags & KVM_CLOCK_TSC_STABLE), > but on either case, updating src_use_reliable_get_clock i

Re: [Qemu-devel] [PATCH] target-arm: Add VBAR support to ARM1176 CPUs

2016-11-28 Thread Cédric Le Goater
On 11/28/2016 11:40 AM, Peter Maydell wrote: > On 24 November 2016 at 14:29, Cédric Le Goater wrote: >> On 09/05/2016 04:39 PM, Peter Maydell wrote: >>> We implement VBAR in v7-without-EL3 even though architecturally >>> it should only exist in v7-with-EL3 because we have some >>> legacy board mod

Re: [Qemu-devel] [PATCH] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default

2016-11-28 Thread Paolo Bonzini
On 27/11/2016 17:28, Adrian Bunk wrote: > Building qemu fails in distributions where gcc enables PIE > by default (e.g. Debian unstable) with: > /usr/bin/ld: -r and -pie may not be used together > > -r and -pie cannot be used together in the linker, > and position independent is already relocata

Re: [Qemu-devel] [PATCH] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default

2016-11-28 Thread Adrian Bunk
On Mon, Nov 28, 2016 at 04:05:33PM +0100, Paolo Bonzini wrote: > > > On 27/11/2016 17:28, Adrian Bunk wrote: > > Building qemu fails in distributions where gcc enables PIE > > by default (e.g. Debian unstable) with: > > /usr/bin/ld: -r and -pie may not be used together > > > > -r and -pie cannot

Re: [Qemu-devel] [dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-28 Thread Maxime Coquelin
On 11/24/2016 04:24 PM, Kavanagh, Mark B wrote: On 11/24/2016 12:47 PM, Maxime Coquelin wrote: On 11/24/2016 01:33 PM, Yuanhan Liu wrote: On Thu, Nov 24, 2016 at 09:30:49AM +, Kevin Traynor wrote: On 11/24/2016 06:31 AM, Yuanhan Liu wrote: On Tue, Nov 22, 2016 at 04:53:05PM +0200, Mi

Re: [Qemu-devel] Linux kernel polling for QEMU

2016-11-28 Thread Stefan Hajnoczi
On Mon, Nov 28, 2016 at 11:31:43AM +0200, Eliezer Tamir wrote: > + Eric, Willem > > On 24/11/2016 17:12, Stefan Hajnoczi wrote: > > I looked through the socket SO_BUSY_POLL and blk_mq poll support in > > recent Linux kernels with an eye towards integrating the ongoing QEMU > > polling work. The m

Re: [Qemu-devel] [PATCH] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 16:24, Adrian Bunk wrote: > On Mon, Nov 28, 2016 at 04:05:33PM +0100, Paolo Bonzini wrote: >> >> >> On 27/11/2016 17:28, Adrian Bunk wrote: >>> Building qemu fails in distributions where gcc enables PIE >>> by default (e.g. Debian unstable) with: >>> /usr/bin/ld: -r and -pie may not

Re: [Qemu-devel] Linux kernel polling for QEMU

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 16:29, Stefan Hajnoczi wrote: > Thanks for sharing the link. I'll let you know before embarking on an > effort to make epoll support busy_loop. > > At the moment I'm still evaluating whether the good results we've gotten > from polling in QEMU userspace are preserved when polling

Re: [Qemu-devel] [PATCH] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 16:38, Paolo Bonzini wrote: > > > On 28/11/2016 16:24, Adrian Bunk wrote: >> On Mon, Nov 28, 2016 at 04:05:33PM +0100, Paolo Bonzini wrote: >>> >>> >>> On 27/11/2016 17:28, Adrian Bunk wrote: Building qemu fails in distributions where gcc enables PIE by default (e.g. Deb

Re: [Qemu-devel] [PATCH] block/mirror: Fix passing wrong argument to trace_mirror_yield

2016-11-28 Thread Fam Zheng
On Mon, 11/28 16:58, Yang Wei wrote: > mirror_yield is defined in block/trace-event, just like the following: > mirror_yield(void *s, int64_t cnt, int buf_free_count, int in_flight) > so we should exchange arguement 2 and 4 while invoking it. > > Signed-off-by: Yang Wei > --- > block/mirror.c |

[Qemu-devel] [PATCH v7 0/5] IOMMU: intel_iommu support map and unmap notifications

2016-11-28 Thread Aviv B.D
From: "Aviv Ben-David" * Advertize Cache Mode capability in iommu cap register. This capability is controlled by "cache-mode" property of intel-iommu device. To enable this option call QEMU with "-device intel-iommu,cache-mode=true". * On page cache invalidation in intel vIOMMU, check if th

[Qemu-devel] [PATCH v7 5/5] IOMMU: add specific null implementation of iommu_replay to intel_iommu

2016-11-28 Thread Aviv B.D
From: "Aviv Ben-David" Currently the implementation preventing VFIO to work together with intel_iommu. Signed-off-by: Aviv Ben-David --- hw/i386/intel_iommu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index d872969..0787714 100644

[Qemu-devel] [PATCH v7 1/5] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest

2016-11-28 Thread Aviv B.D
From: "Aviv Ben-David" This capability asks the guest to invalidate cache before each map operation. We can use this invalidation to trap map operations in the hypervisor. Signed-off-by: Aviv Ben-David --- hw/i386/intel_iommu.c | 5 + hw/i386/intel_iommu_internal.h | 1 + include/

[Qemu-devel] [PATCH v7 4/5] IOMMU: add specific replay function with default implemenation

2016-11-28 Thread Aviv B.D
From: "Aviv Ben-David" The default implementation scans the address space and try to find translation for each page, if exists. This callback enables effiecent implementation for intel_iommu and other subsystems with large address space. Signed-off-by: Aviv Ben-David --- include/exec/memory.h

[Qemu-devel] [PATCH v7 2/5] IOMMU: change iommu_op->translate's is_write to flags, add support to NO_FAIL flag mode

2016-11-28 Thread Aviv B.D
From: "Aviv Ben-David" Supports translation trials without reporting error to guest on translation failure. Signed-off-by: Aviv Ben-David --- exec.c | 3 ++- hw/alpha/typhoon.c | 2 +- hw/i386/amd_iommu.c | 4 ++-- hw/i386/intel_iommu.c | 59 +

Re: [Qemu-devel] sane char device writes?

2016-11-28 Thread Michal Suchánek
Hello, On Fri, 25 Nov 2016 17:16:39 +0100 Paolo Bonzini wrote: > On 24/11/2016 08:51, Thomas Huth wrote: > > > So for this to work an extra buffer would have to be stored in > > > gtk.c somewhere, and possibly similar timer trick used as in > > > console.c > > > > > > Any ideas how to do this w

[Qemu-devel] [PATCH v7 3/5] IOMMU: enable intel_iommu map and unmap notifiers

2016-11-28 Thread Aviv B.D
From: "Aviv Ben-David" Adds a list of registered vtd_as's to intel iommu state to save iteration over each PCI device in a search of the corrosponding domain. Signed-off-by: Aviv Ben-David --- hw/i386/intel_iommu.c | 94 ++ hw/i386/intel_iommu_i

Re: [Qemu-devel] sane char device writes?

2016-11-28 Thread Paolo Bonzini
On 28/11/2016 16:53, Michal Suchánek wrote: >> > >> > My idea looks very much like Michal's. I hadn't gone very much beyond >> > the "you need a buffer" step, but anyway you don't need a timer---you >> > can just record a chr_accept_input callback in gd_vc_handler. It will >> > be called when

Re: [Qemu-devel] [PATCH v6 4/4] hw/intc/arm_gicv3_kvm: Reset GICv3 cpu interface registers

2016-11-28 Thread Vijay Kilari
On Mon, Nov 28, 2016 at 6:31 PM, Peter Maydell wrote: > On 23 November 2016 at 12:39, wrote: >> From: Vijaya Kumar K >> >> Reset CPU interface registers of GICv3 when CPU is reset. >> For this, object interface is used, which is called from >> arm_cpu_reset function. >> >> Signed-off-by: Vijaya

  1   2   >