Re: [Qemu-devel] [PATCH v7 5/6] s390x/cpu: Add error handling to cpu creation

2016-03-02 Thread David Hildenbrand
> Check for and propogate errors during s390 cpu creation. > > Signed-off-by: Matthew Rosato > --- > hw/s390x/s390-virtio-ccw.c | 30 + > hw/s390x/s390-virtio.c | 2 +- > hw/s390x/s390-virtio.h | 1 + > target-s390x/cpu-qom.h | 3 +++ > target-s390x/cpu.c

Re: [Qemu-devel] [PATCH v7 6/6] s390x/cpu: Allow hotplug of CPUs

2016-03-02 Thread David Hildenbrand
> Implement cpu hotplug routine and add the machine hook. > > Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand > --- > hw/s390x/s390-virtio-ccw.c | 13 + > target-s390x/cpu.c | 7 +++ > 2 files changed, 20 insertions(+) > > diff --git a/hw/s390x/s390-virt

Re: [Qemu-devel] [QEMU] Windows XP / Windows 95 / MS-DOS 6 regressions

2016-03-02 Thread Hervé Poussineau
Le 02/03/2016 05:05, Richard Henderson a écrit : On 03/01/2016 12:03 PM, Hervé Poussineau wrote: Windows 95 still doesn't work, even with your two patches applied. The message is: "A fatal exception 0E has occurred at 0137:FD512607. The current application will be terminated. * Press any key

Re: [Qemu-devel] [PATCH v2 3/4] rng: move request queue cleanup from RngEgd to RngBackend

2016-03-02 Thread Ladi Prosek
On Wed, Mar 2, 2016 at 8:15 AM, Amit Shah wrote: > On (Wed) 10 Feb 2016 [16:53:24], Ladi Prosek wrote: >> RngBackend is now in charge of cleaning up the linked list on >> instance finalization. It also exposes a function to finalize >> individual RngRequest instances, called by its child classes.

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-02 Thread Jike Song
On 02/24/2016 12:24 AM, Kirti Wankhede wrote: > Aim of this module is to pin and unpin guest memory. > This module provides interface to GPU driver that can be used to map guest > physical memory into its kernel space driver. > Currently this module has duplicate code from vfio_iommu_type1.c > Work

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-02 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 03:29:33PM +0800, Xiao Guangrong wrote: > > > On 03/02/2016 03:20 PM, Michael S. Tsirkin wrote: > >On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: > >> > >> > >>On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: > >>>On Wed, Mar 02, 2016 at 11:30:10AM +0800,

Re: [Qemu-devel] ping [PATCH v14] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-03-02 Thread Kevin Wolf
Am 02.03.2016 um 04:32 hat Programmingkid geschrieben: > > On Mar 1, 2016, at 10:16 AM, Kevin Wolf wrote: > > > Am 29.02.2016 um 16:17 hat Programmingkid geschrieben: > >> I do think this patch is ready to be added to QEMU. I have listened to > >> what you said and implemented your changes. > >

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-02 Thread Xiao Guangrong
On 03/02/2016 04:44 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:29:33PM +0800, Xiao Guangrong wrote: On 03/02/2016 03:20 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: On Wed, M

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-02 Thread Markus Armbruster
This got lost over the Christmas break, sorry. Cc'ing Marcel for additional PCI expertise. Cao jin writes: > msi_init() is a supporting function in PCI device initialization, > in order to convert .init() to .realize(), it should be modified first. "Supporting function" doesn't imply "should u

Re: [Qemu-devel] [QEMU] Windows XP / Windows 95 / MS-DOS 6 regressions

2016-03-02 Thread Paolo Bonzini
On 02/03/2016 09:06, Hervé Poussineau wrote: > I just reconfirmed that > d6a2914984c89fa0a3125b9842e0cbf68de79a3d~1 + > 88c73d16ad1b6c22a2ab082064d0d521f756296a works, > while > d6a2914984c89fa0a3125b9842e0cbf68de79a3d + > 88c73d16ad1b6c22a2ab082064d0d521f756296a bugchecks. > > a5af12871fd4601c4

Re: [Qemu-devel] Making Qemu/KVM more undetectable to malwares

2016-03-02 Thread Paolo Bonzini
On 02/03/2016 04:07, Yang Luo wrote: > And how about this idea. I found out that lots of malware will detect > the presence of hypervisors and refuse to refuse to execute their real > code in a VM. The malwares do this to prevent security engineers from > analyzing their code under a VM. Lots of

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Replace pc/xt keyboard keycode array with QKeyCode

2016-03-02 Thread Markus Armbruster
Eric Blake writes: > On 03/01/2016 06:20 PM, Programmingkid wrote: > >>> You weren't the original cause of the bug, so it is not necessarily this >>> patch's job to fix the bug. Therefore, "pre-existing". But since the >>> bug was observed during review of your patch, you may want to fix it >>>

Re: [Qemu-devel] [PATCH v2] MacKeys.h: initial commit

2016-03-02 Thread Markus Armbruster
Programmingkid writes: > This patch adds the file MacKeys.h. It is a file that contains all the > constants > for the Macintosh keyboard keycodes. > > Signed-off-by: John Arbuckle > > --- > Added standard license. > Added #ifndef #define #endif macros. > > include/hw/input/MacKeys.h | 168 >

Re: [Qemu-devel] [PATCH 1/3] arm: gic: add GICType

2016-03-02 Thread Markus Armbruster
Peter Xu writes: > On Wed, Mar 02, 2016 at 11:34:44AM +0800, Peter Xu wrote: >> [ "v2": { "emulated": true, >> "split": false, >> "kernel": true }, >> "v3": { "emulated": false, >> "split": false, >> "kernel": true } ] > > Or something like this: > > [{ >

Re: [Qemu-devel] [PATCH 08/38] ivshmem: Rewrite specification document

2016-03-02 Thread Markus Armbruster
Eric Blake writes: > On 02/29/2016 11:40 AM, Markus Armbruster wrote: >> This started as an attempt to update ivshmem_device_spec.txt for >> clarity, accuracy and completeness while working on its code, and >> quickly became a full rewrite. Since the diff would be useless >> anyway, I'm using th

Re: [Qemu-devel] [PATCH 10/38] ivshmem: Compile debug prints unconditionally to prevent bit-rot

2016-03-02 Thread Markus Armbruster
Eric Blake writes: > On 03/01/2016 05:22 AM, Marc-André Lureau wrote: >> On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: >>> Signed-off-by: Markus Armbruster >>> --- >> >> Reviewed-by: Marc-André Lureau >> >> (apparently, there are other places in qemu where this conversion could b

Re: [Qemu-devel] [PATCH 13/38] ivshmem: Don't destroy the chardev on version mismatch

2016-03-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: >> Yes, the chardev is commonly useless after we read a bad version from >> it, but destroying it is inappropriate anyway: the user created it, so >> the user should be able to hold on to it as long as h

Re: [Qemu-devel] [PATCH 15/38] ivshmem: Failed realize() can leave migration blocker behind

2016-03-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: >> If pci_ivshmem_realize() fails after it created its migration blocker, >> the blocker is left in place. Fix that by creating it last. >> >> Likewise, if it fails after it called fifo8_create(), it le

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-03-02 Thread Amit Shah
On (Wed) 10 Feb 2016 [16:53:25], Ladi Prosek wrote: > Requests are now created in the RngBackend parent class and the > code path is shared by both rng-egd and rng-random. > > This commit fixes the rng-random implementation which currently > processes only one request at a time and simply discards

Re: [Qemu-devel] [PATCH v2 3/4] rng: move request queue cleanup from RngEgd to RngBackend

2016-03-02 Thread Amit Shah
On (Wed) 02 Mar 2016 [09:32:48], Ladi Prosek wrote: > On Wed, Mar 2, 2016 at 8:15 AM, Amit Shah wrote: > > On (Wed) 10 Feb 2016 [16:53:24], Ladi Prosek wrote: > >> RngBackend is now in charge of cleaning up the linked list on > >> instance finalization. It also exposes a function to finalize > >>

Re: [Qemu-devel] [PATCH v7 4/6] s390x/cpu: Add CPU property links

2016-03-02 Thread Igor Mammedov
On Tue, 1 Mar 2016 16:13:24 -0500 Matthew Rosato wrote: > Link each CPUState as property machine/cpu[n] during initialization. > Add a hotplug handler to s390-virtio-ccw machine and set the > state during plug. > Additionally, maintain an array of state pointers indexed by CPU > id for fast look

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-03-02 Thread Ladi Prosek
On Wed, Mar 2, 2016 at 10:56 AM, Amit Shah wrote: > On (Wed) 10 Feb 2016 [16:53:25], Ladi Prosek wrote: >> Requests are now created in the RngBackend parent class and the >> code path is shared by both rng-egd and rng-random. >> >> This commit fixes the rng-random implementation which currently >>

[Qemu-devel] [PATCH v2 00/10] ipmi: a couple of enhancements to the BMC simulator (round 2)

2016-03-02 Thread Cédric Le Goater
Hello, The first patches are cleanups and prepare ground for an extension of the BMC simulator providing a SDR loader using a file. A simple FRU support comes next. Changes since v1: - Added initial cleanups removing the macros implicitely making use of local variables in the command handl

[Qemu-devel] [PATCH v2 06/10] ipmi: use a function to initialize the SDR table

2016-03-02 Thread Cédric Le Goater
This patch moves the code section initializing the sdrs in its own routine to prepare ground for changes in the subsequent patches. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 49 - 1 file changed, 28 inser

[Qemu-devel] [PATCH v2 02/10] ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers

2016-03-02 Thread Cédric Le Goater
The IPMI command handlers in the BMC simulator use a macro IPMI_ADD_RSP_DATA() to push bytes in a response buffer. The macro hides the fact that it implicitly uses variables local to the handler, which is misleading. This patch introduces a simple 'struct rsp_buffer' and inlined helper routines to

[Qemu-devel] [PATCH v2 05/10] ipmi: add a realize function to the device class

2016-03-02 Thread Cédric Le Goater
This will be useful to define and use properties when the object is instantiated. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- Changes since v1: - removed empty properties. hw/ipmi/ipmi_bmc_sim.c | 7 --- 1 file changed, 4 insertions(+), 3 d

[Qemu-devel] [PATCH v2 04/10] ipmi: add rsp_buffer_set_error() helper

2016-03-02 Thread Cédric Le Goater
The third byte in the response buffer of an IPMI command holds the error code. In many IPMI command handlers, this byte is updated directly. This patch adds a helper routine to clarify why this byte is being used. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 115 +

[Qemu-devel] [PATCH v2 09/10] ipmi: use a file to load SDRs

2016-03-02 Thread Cédric Le Goater
The IPMI BMC simulator populates the sdr/sensor tables with a minimal set of entries (Watchdog). But some qemu platforms might want to use extra entries for their custom needs. This patch modifies slighty the initializing routine to take into account a larger set read from a file. The name of the

[Qemu-devel] [PATCH v2 10/10] ipmi: provide support for FRUs

2016-03-02 Thread Cédric Le Goater
This patch provides a simple FRU support for the BMC simulator. FRUs are loaded from a file which name is specified in the object properties, each entry having a fixed size, also specified in the properties. If the file is unknown or not accessible for some reason, a unique entry of 1024 bytes is c

[Qemu-devel] [PATCH v2 07/10] ipmi: remove the need of an ending record in the SDR table

2016-03-02 Thread Cédric Le Goater
Currently, the code initializing the sdr table relies on an ending record with a recid of 0x. This patch changes the loop to use the sdr size as a breaking condition. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- hw/ipmi/ipmi_bmc_sim.c | 13 +++--

[Qemu-devel] [PATCH v2 01/10] ipmi: remove IPMI_CHECK_CMD_LEN() macro

2016-03-02 Thread Cédric Le Goater
Most IPMI command handlers in the BMC simulator start with a call to the macro IPMI_CHECK_CMD_LEN() which verifies that a minimal number of arguments expected by the command are indeed available. To achieve this task, the macro implicitly uses local variables which is misleading in the code. This

[Qemu-devel] [PATCH v2 03/10] ipmi: remove IPMI_CHECK_RESERVATION() macro

2016-03-02 Thread Cédric Le Goater
Some IPMI command handlers in the BMC simulator use a macro IPMI_CHECK_RESERVATION() to check a SDR reservation but the macro implicitly uses local variables. This patch simply removes it. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 33 +++-- 1 file c

[Qemu-devel] [PATCH v2 08/10] ipmi: add some local variables in ipmi_sdr_init

2016-03-02 Thread Cédric Le Goater
This patch adds a couple of variables to manipulate the raw sdr entries. The const attribute is also removed on init_sdrs. This will ease the introduction of a sdr loader using a file. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- hw/ipmi/ipmi_bmc_si

Re: [Qemu-devel] [PATCH v2 02/10] ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers

2016-03-02 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 11:14:50AM +0100, Cédric Le Goater wrote: > The IPMI command handlers in the BMC simulator use a macro > IPMI_ADD_RSP_DATA() to push bytes in a response buffer. The macro > hides the fact that it implicitly uses variables local to the handler, > which is misleading. > > Thi

Re: [Qemu-devel] [PATCH 17/38] ivshmem: Clean up MSI-X conditions

2016-03-02 Thread Markus Armbruster
Marc-André Lureau writes: > On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: >> There are three predicates related to MSI-X: >> >> * ivshmem_has_feature(s, IVSHMEM_MSI) is true unless the non-MSI-X >> variant of the device is selected with msi=off. >> >> * msix_present() is true when

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] blockjob: correct backup cluster size for backups

2016-03-02 Thread Stefan Hajnoczi
On Mon, Feb 22, 2016 at 05:07:04PM -0500, John Snow wrote: > Backups sometimes need a non-64KiB transfer cluster size. > See patch #2 for the detailed justificaton. > > === > v2 > === > > 01: Removed "sectors_per_cluster" as a cached property of the Backup Block > Job, > In favor of recomput

Re: [Qemu-devel] [PATCH 15/38] ivshmem: Failed realize() can leave migration blocker behind

2016-03-02 Thread Marc-André Lureau
Hi On Wed, Mar 2, 2016 at 10:54 AM, Markus Armbruster wrote: >>> -create_shared_memory_BAR(s, fd, attr, errp); >>> +create_shared_memory_BAR(s, fd, attr, &err); >>> +if (err) { >>> +error_propagate(errp, err); >>> +return; >>> +} > > Before

[Qemu-devel] [Bug 1548471] Re: Lost of log file during block migration

2016-03-02 Thread Stefan Hajnoczi
Please discuss this with the libvirt community. The /var/log/libvirt/qemu/.log files are managed by libvirt and not QEMU. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs

Re: [Qemu-devel] [PATCH 0/5] trace: Add events for vCPU memory accesses

2016-03-02 Thread Stefan Hajnoczi
On Tue, Feb 23, 2016 at 07:22:07PM +0100, Lluís Vilanova wrote: > NOTE: This series applies on top of "trace: Show vCPU info in guest code > events" > > This series adds to new events: > > * guest_vmem: memory accesses performed by vCPUs (guest code) > > * guest_vmem_user_syscall: memory access

Re: [Qemu-devel] [PATCH 1/3] arm: gic: add GICType

2016-03-02 Thread Peter Xu
On Wed, Mar 02, 2016 at 10:47:39AM +0100, Markus Armbruster wrote: > Peter Xu writes: > > If temporarily not considering kernel_irqchip=split case: > > > > [{ > > "version": 2, > > "emulated": true, > > "kernel": true > > }, > > { > > "version": 3, > > "emulated": false, > >

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] blockjob: correct backup cluster size for backups

2016-03-02 Thread Fam Zheng
On Wed, 03/02 10:48, Stefan Hajnoczi wrote: > On Mon, Feb 22, 2016 at 05:07:04PM -0500, John Snow wrote: > > Backups sometimes need a non-64KiB transfer cluster size. > > See patch #2 for the detailed justificaton. > > > > === > > v2 > > === > > > > 01: Removed "sectors_per_cluster" as a cached p

Re: [Qemu-devel] [PATCH 18/38] ivshmem: Leave INTx alone when using MSI-X

2016-03-02 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/03/2016 18:14, Marc-André Lureau wrote: >> > +/* >> > + * Note: we don't use INTx with IVSHMEM_MSI at all, so this is a >> > + * bald-faced lie then. But it's a backwards compatible lie. >> > + */ >> > pci_config_set_interrupt_pin(pci_conf, 1);

Re: [Qemu-devel] [PATCH 30/38] ivshmem: Simplify memory regions for BAR 2 (shared memory)

2016-03-02 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/03/2016 15:06, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> On 29/02/2016 19:40, Markus Armbruster wrote: -memory_region_init_ram_ptr(&s->ivshmem, OBJECT(s), +s->ivshmem_bar2 = g_new(MemoryRegion, 1); +memory_region_init_ram_p

Re: [Qemu-devel] [PATCH] vl.c: fix memleaks with g_strdup+strtok

2016-03-02 Thread Stefan Hajnoczi
On Wed, Feb 24, 2016 at 10:22:14AM +0100, Quentin PEREZ wrote: > diff --git a/vl.c b/vl.c > index b87e292..9f6593a 100644 > --- a/vl.c > +++ b/vl.c > @@ -1362,16 +1362,19 @@ static int add_semihosting_arg(void *opaque, > static inline void semihosting_arg_fallback(const char *file, const char > *

Re: [Qemu-devel] [PATCH] vl.c: fix memleaks with g_strdup+strtok

2016-03-02 Thread Daniel P. Berrange
On Wed, Mar 02, 2016 at 11:07:02AM +, Stefan Hajnoczi wrote: > On Wed, Feb 24, 2016 at 10:22:14AM +0100, Quentin PEREZ wrote: > > diff --git a/vl.c b/vl.c > > index b87e292..9f6593a 100644 > > --- a/vl.c > > +++ b/vl.c > > @@ -1362,16 +1362,19 @@ static int add_semihosting_arg(void *opaque, > >

[Qemu-devel] [PATCH] blockdev: Snapshotting must not open second instance of old top

2016-03-02 Thread Kevin Wolf
Calling bdrv_img_create() with a size of -1 means that it determines the size automatically by opening the backing file. However, in the case of live snapshots, the backing file is already opened and we must avoid opening the same image twice at the same time. Apart from that, just getting the size

Re: [Qemu-devel] Performance Profiling 2 VMs

2016-03-02 Thread Stefan Hajnoczi
On Tue, Mar 01, 2016 at 04:06:16PM -0800, kalyan tata wrote: > Hi All, > > I am new to qemu development. > Sorry If this is not the correct forum for this question, it would be great > if you could direct me to correct forum. > > I am seeing very low virtio network throughput on an older (2.6.18)

[Qemu-devel] [PATCH v5 4/5] nvdimm acpi: emulate dsm method

2016-03-02 Thread Xiao Guangrong
Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c| 56 + include/hw/mem/nvdimm.h | 8 +++ 2 files changed, 64 insert

[Qemu-devel] [PATCH v5 1/5] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-02 Thread Xiao Guangrong
32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this port to tell QEMU the final address of the DSM memory and notify QEMU to emulate the DSM method Signed-off-by: Xiao Guan

[Qemu-devel] [PATCH v5 3/5] nvdimm acpi: let qemu handle _DSM method

2016-03-02 Thread Xiao Guangrong
If dsm memory is successfully patched, we let qemu fully emulate the dsm method This patch saves _DSM input parameters into dsm memory, tell dsm memory address to QEMU, then fetch the result from the dsm memory Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 117 +++

[Qemu-devel] [PATCH v5 0/5] NVDIMM ACPI: introduce the framework of QEMU emulated DSM

2016-03-02 Thread Xiao Guangrong
This patchset is against commit 429fb940caadf9 (fw-cfg: support writeable blobs) on pci branch of Michael's git tree and can be found at: https://github.com/xiaogr/qemu.git nvdimm-acpi-v5 Changelog in v5: Thanks to Michael's review, the changes in this version are: - use nvdimm_debug() inste

[Qemu-devel] [PATCH v5 5/5] nvdimm acpi: add _CRS

2016-03-02 Thread Xiao Guangrong
As Igor suggested that we can report the BIOS patched operation region so that OSPM could see that particular range is in use and be able to notice conflicts if it happens some day Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 27 +++ 1 file changed, 27 insertions(

[Qemu-devel] [PATCH v5 2/5] nvdimm acpi: introduce patched dsm memory

2016-03-02 Thread Xiao Guangrong
The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int32 object named "MEMA" Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 +--- 1 file changed, 17 insertio

Re: [Qemu-devel] [PATCH v5 1/5] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-02 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 07:50:37PM +0800, Xiao Guangrong wrote: > 32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM > ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into > NVDIMM ACPI binary code > > OSPM uses this port to tell QEMU the final address of the DSM

[Qemu-devel] [PATCH v3] net: check packet payload length

2016-03-02 Thread P J P
From: Prasad J Pandit While computing IP checksum, 'net_checksum_calculate' reads payload length from the packet. It could exceed the given 'data' buffer size. Add a check to avoid it. Reported-by: Liu Ling Signed-off-by: Prasad J Pandit --- net/checksum.c | 10 -- 1 file changed, 8 i

Re: [Qemu-devel] [PATCH v2 1/2] net: check packet payload length

2016-03-02 Thread P J P
Hello Jason, +-- On Wed, 2 Mar 2016, Jason Wang wrote --+ | How about L4, since we will calculate L4 checksum I believe? And it | looks like the following check: | | plen + hlen >= length | only count L3 header plus payload? Yes, I've sent a revised patch v3. Thank you. -- Prasad J Pandit /

Re: [Qemu-devel] [PATCH 19/38] ivshmem: Assert interrupts are set up once

2016-03-02 Thread Marc-André Lureau
Hi On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > An interrupt is set up when the interrupt's file descriptor is > received. Each message applies to the next interrupt vector. > Therefore, each vector cannot be set up more than once. > > ivshmem_add_kvm_msi_virq() half-heartedly tri

Re: [Qemu-devel] [PATCH 3/4] bcm2835_fb: add framebuffer device for Raspberry Pi

2016-03-02 Thread Peter Maydell
On 2 March 2016 at 00:19, Andrew Baumann wrote: >> From: Peter Maydell [mailto:peter.mayd...@linaro.org] >> More interestingly, why can't you just read from the source >> pointer you're passed in here? The framebuffer_update_display() >> code should have obtained it by looking up the location of t

Re: [Qemu-devel] [PATCH] hw/input/adb.c: Replace pc_to_adb_keycode with more detailed array

2016-03-02 Thread Peter Maydell
On 2 March 2016 at 00:31, Programmingkid wrote: > > On Mar 1, 2016, at 6:34 PM, Peter Maydell wrote: > >> On 1 March 2016 at 22:10, Programmingkid wrote: >>> The pc_to_adb_keycode array was not very easy to work with. The replacement >>> array number_to_adb_keycode list all the element indexes on

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/3] hw/intc: Add (new) ASPEED AST2400 AVIC device model

2016-03-02 Thread Peter Maydell
On 2 March 2016 at 01:09, Andrew Jeffery wrote: > Hi Peter, > > On Thu, 2016-02-25 at 16:29 +, Peter Maydell wrote: >> On 16 February 2016 at 11:34, Andrew Jeffery wrote: >> > +#define AVIC_L_MASK 0x >> >> This needs a 'U' suffix or at least one of the compilers we build >> with will

Re: [Qemu-devel] [PATCH COLO-Frame v15 00/38] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-03-02 Thread Hailiang Zhang
On 2016/3/1 20:25, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2016/2/29 17:47, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2016/2/27 0:36, Dr. David Alan Gilbert wrote: * Dr. David Alan Gilbert (dgilb

[Qemu-devel] Build breakage: error: "ARM_cpsr" redefined

2016-03-02 Thread Christopher Covington
Hi, Attempting to build QEMU on aarch64, I got the following error. === ./configure --target-list=arm-softmmu,aarch64-softmmu,arm-linux-user,aarch64-linux-user make [...] CCarm-linux-user/exec.o In file included from /root/qemu/linux-user/qemu.h:16:0, from /root/qemu/exec.

Re: [Qemu-devel] [PATCH] blockdev: Snapshotting must not open second instance of old top

2016-03-02 Thread Jeff Cody
On Wed, Mar 02, 2016 at 12:27:01PM +0100, Kevin Wolf wrote: > Calling bdrv_img_create() with a size of -1 means that it determines the > size automatically by opening the backing file. However, in the case of > live snapshots, the backing file is already opened and we must avoid > opening the same

Re: [Qemu-devel] [PATCH 1/3] arm: gic: add GICType

2016-03-02 Thread Markus Armbruster
Peter Xu writes: > On Wed, Mar 02, 2016 at 10:47:39AM +0100, Markus Armbruster wrote: >> Peter Xu writes: >> > If temporarily not considering kernel_irqchip=split case: >> > >> > [{ >> > "version": 2, >> > "emulated": true, >> > "kernel": true >> > }, >> > { >> > "version": 3, >>

Re: [Qemu-devel] Build breakage: error: "ARM_cpsr" redefined

2016-03-02 Thread Peter Maydell
On 2 March 2016 at 13:11, Christopher Covington wrote: > Hi, > > Attempting to build QEMU on aarch64, I got the following error. Interesting -- I do do a full aarch64 build before merging pulls so this must be a quirk of your host system header files. Nonetheless we should fix the collision. > =

Re: [Qemu-devel] [QEMU] Windows XP / Windows 95 / MS-DOS 6 regressions

2016-03-02 Thread Paolo Bonzini
On 02/03/2016 09:06, Hervé Poussineau wrote: >> > > I just reconfirmed that > d6a2914984c89fa0a3125b9842e0cbf68de79a3d~1 + > 88c73d16ad1b6c22a2ab082064d0d521f756296a works, > while > d6a2914984c89fa0a3125b9842e0cbf68de79a3d + > 88c73d16ad1b6c22a2ab082064d0d521f756296a bugchecks. > > a5af12871fd

Re: [Qemu-devel] [PULL 02/12] sheepdog: allow to delete snapshot

2016-03-02 Thread Paolo Bonzini
On 29/02/2016 21:08, Jeff Cody wrote: > From: Vasiliy Tolstov > > This patch implements a blockdriver function bdrv_snapshot_delete() in > the sheepdog driver. With the new function, snapshots of sheepdog can > be deleted from libvirt. > > Cc: Jeff Cody > Signed-off-by: Hitoshi Mitake > Sign

Re: [Qemu-devel] [PULL 3/8] egl-helpers: add functions for render nodes and dma-buf passing

2016-03-02 Thread Paolo Bonzini
On 23/02/2016 15:24, Gerd Hoffmann wrote: > +if (strncmp(e->d_name, "renderD", 7)) { > +continue; > +} > + > +r = asprintf(&p, "/dev/dri/%s", e->d_name); > +if (r < 0) { > +return -1; > +} This leaks "dir" (due to skipping the close

Re: [Qemu-devel] [PATCH 18/38] ivshmem: Leave INTx alone when using MSI-X

2016-03-02 Thread Paolo Bonzini
On 02/03/2016 12:04, Markus Armbruster wrote: > For better or worse, fallback to INTx has never been implemented in > ivshmem. You can either ask for an INTx-only device (msi=off), or for > an MSI-X-only device (msi=on). The latter *cannot* do interrupts until > you enable MSI-X. Aha, now I se

[Qemu-devel] QEMU has been accepted into GSoC & Outreachy 2016!

2016-03-02 Thread Stefan Hajnoczi
Good news! QEMU is participating in Google Summer of Code 2016 and Outreachy May-August 2016. Please check out our project ideas lists that eligible applicants can apply for: http://qemu-project.org/Google_Summer_of_Code_2016 http://qemu-project.org/Outreachy_2016_MayAugust Both GSoC and Outrea

[Qemu-devel] [PATCH] vnc: send cursor when a new client is connecting

2016-03-02 Thread Frediano Ziglio
If you have hardware cursor and you are reconnecting the VNC client you need to send the cursor. Failing to do so make the cursor invisible till is changed. Signed-off-by: Frediano Ziglio --- ui/vnc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index ce4c669..825e6

Re: [Qemu-devel] [PATCH v2] MacKeys.h: initial commit

2016-03-02 Thread Programmingkid
On Mar 2, 2016, at 4:32 AM, Markus Armbruster wrote: > Programmingkid writes: > >> This patch adds the file MacKeys.h. It is a file that contains all the >> constants >> for the Macintosh keyboard keycodes. >> >> Signed-off-by: John Arbuckle >> >> --- >> Added standard license. >> Added #if

[Qemu-devel] [PATCH] target-i386: fix addr16 prefix

2016-03-02 Thread Paolo Bonzini
While ADDSEG will only be false in 16-bit mode for LEA, it can be false even in other cases when 16-bit addresses are obtained via the 67h prefix in 32-bit mode. In this case, gen_lea_v_seg forgets to add a nonzero FS or GS base if CS/DS/ES/SS are all zero. This case is pretty rare but happens wh

Re: [Qemu-devel] [PATCH 20/38] ivshmem: Simplify rejection of invalid peer ID from server

2016-03-02 Thread Marc-André Lureau
On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > ivshmem_read() processes server messages. These are 64 bit signed > integers. -1 is shared memory setup, 16 bit unsigned is a peer ID, > anything else is invalid. > > ivshmem_read() rejects invalid negative messages right away, silently

Re: [Qemu-devel] [PATCH v8 0/4] i386: expose floppy-related objects in SSDT

2016-03-02 Thread Denis V. Lunev
On 02/17/2016 09:25 PM, Roman Kagan wrote: Windows on UEFI systems is only capable of detecting the presence and the type of floppy drives via corresponding ACPI objects. Those objects are added in patch 4; the preceding ones pave the way to it, by making the necessary data public and by moving

Re: [Qemu-devel] [PATCH v8 0/4] i386: expose floppy-related objects in SSDT

2016-03-02 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 06:08:41PM +0300, Denis V. Lunev wrote: > On 02/17/2016 09:25 PM, Roman Kagan wrote: > >Windows on UEFI systems is only capable of detecting the presence and > >the type of floppy drives via corresponding ACPI objects. > > > >Those objects are added in patch 4; the preceding

[Qemu-devel] [PATCH 1/1] block/sheepdog: fix argument passed to qemu_strtoul()

2016-03-02 Thread Jeff Cody
The function qemu_strtoul() reads 'unsigned long' sized data, which is larger than uint32_t on 64-bit machines. Even though the snap_id field in the header is 32-bits, we must accomodate the full size in qemu_strtoul(). Reported-by: Paolo Bonzini Signed-off-by: Jeff Cody --- block/sheepdog.c |

Re: [Qemu-devel] [PATCH] hw/input/adb.c: Replace pc_to_adb_keycode with more detailed array

2016-03-02 Thread Programmingkid
On Mar 2, 2016, at 7:38 AM, Peter Maydell wrote: > On 2 March 2016 at 00:31, Programmingkid wrote: >> >> On Mar 1, 2016, at 6:34 PM, Peter Maydell wrote: >> >>> On 1 March 2016 at 22:10, Programmingkid wrote: The pc_to_adb_keycode array was not very easy to work with. The replacement >>>

Re: [Qemu-devel] [PULL 02/12] sheepdog: allow to delete snapshot

2016-03-02 Thread Jeff Cody
On Wed, Mar 02, 2016 at 03:11:27PM +0100, Paolo Bonzini wrote: > > > On 29/02/2016 21:08, Jeff Cody wrote: > > From: Vasiliy Tolstov > > > > This patch implements a blockdriver function bdrv_snapshot_delete() in > > the sheepdog driver. With the new function, snapshots of sheepdog can > > be de

Re: [Qemu-devel] [PATCH] target-i386: fix addr16 prefix

2016-03-02 Thread Hervé Poussineau
Le 02/03/2016 16:04, Paolo Bonzini a écrit : While ADDSEG will only be false in 16-bit mode for LEA, it can be false even in other cases when 16-bit addresses are obtained via the 67h prefix in 32-bit mode. In this case, gen_lea_v_seg forgets to add a nonzero FS or GS base if CS/DS/ES/SS are all

Re: [Qemu-devel] [Qemu-block] [PATCH 1/1] block/sheepdog: fix argument passed to qemu_strtoul()

2016-03-02 Thread Max Reitz
On 02.03.2016 16:16, Jeff Cody wrote: > The function qemu_strtoul() reads 'unsigned long' sized data, > which is larger than uint32_t on 64-bit machines. > > Even though the snap_id field in the header is 32-bits, we must > accomodate the full size in qemu_strtoul(). > > Reported-by: Paolo Bonzin

[Qemu-devel] [PATCH] default-configs: add mips-softmmu-common.mak

2016-03-02 Thread Leon Alrae
Add mips-softmmu-common.mak and include it in existing mips*-softmmu.mak files to avoid having to repeat CONFIG defines four times. Suggested-by: Peter Maydell Signed-off-by: Leon Alrae --- default-configs/mips-softmmu-common.mak | 32 default-configs/mips-softm

Re: [Qemu-devel] [PATCH 21/38] ivshmem: Disentangle ivshmem_read()

2016-03-02 Thread Marc-André Lureau
Hi On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/misc/ivshmem.c | 189 > +++--- > 1 file changed, 96 insertions(+), 93 deletions(-) > > diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c >

Re: [Qemu-devel] [PATCH] target-i386: Fix SMSW for 64-bit mode

2016-03-02 Thread Paolo Bonzini
On 01/03/2016 19:28, Richard Henderson wrote: > In non-64-bit modes, the instruction always stores 16 bits. > But in 64-bit mode, when the destination is a register, the > instruction can write 32 or 64 bits. > > Signed-off-by: Richard Henderson > --- > target-i386/translate.c | 14 ---

Re: [Qemu-devel] [Qemu-block] [PATCH 1/1] block/sheepdog: fix argument passed to qemu_strtoul()

2016-03-02 Thread Jeff Cody
On Wed, Mar 02, 2016 at 04:27:31PM +0100, Max Reitz wrote: > On 02.03.2016 16:16, Jeff Cody wrote: > > The function qemu_strtoul() reads 'unsigned long' sized data, > > which is larger than uint32_t on 64-bit machines. > > > > Even though the snap_id field in the header is 32-bits, we must > > acc

Re: [Qemu-devel] [PATCH v2 03/10] ipmi: remove IPMI_CHECK_RESERVATION() macro

2016-03-02 Thread Corey Minyard
On 03/02/2016 04:14 AM, Cédric Le Goater wrote: Some IPMI command handlers in the BMC simulator use a macro IPMI_CHECK_RESERVATION() to check a SDR reservation but the macro implicitly uses local variables. This patch simply removes it. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard

[Qemu-devel] [PATCH] hw/9pfs: Add CephFS support in VirtFS

2016-03-02 Thread Jevon Qiao
Ceph as a promising unified distributed storage system is widely used in the world of OpenStack. OpenStack users deploying Ceph for block (Cinder) and object (S3/Swift) are unsurprisingly looking at Manila and CephFS to round out a unified storage solution. Since the typical hypervisor people are u

Re: [Qemu-devel] [PATCH 18/38] ivshmem: Leave INTx alone when using MSI-X

2016-03-02 Thread Markus Armbruster
Paolo Bonzini writes: > On 02/03/2016 12:04, Markus Armbruster wrote: >> For better or worse, fallback to INTx has never been implemented in >> ivshmem. You can either ask for an INTx-only device (msi=off), or for >> an MSI-X-only device (msi=on). The latter *cannot* do interrupts until >> you

[Qemu-devel] [PATCH] input-keymap.c: Add keypad equal and power keys

2016-03-02 Thread Programmingkid
Add the keypad equals and power keys to the qcode_to_number array. These keys are used on a Macintosh keyboard. Signed-off-by: John Arbuckle --- ui/input-keymap.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ui/input-keymap.c b/ui/input-keymap.c index fd2c09d..8cff

Re: [Qemu-devel] [PATCH 10/38] ivshmem: Compile debug prints unconditionally to prevent bit-rot

2016-03-02 Thread Eric Blake
On 03/02/2016 02:51 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 03/01/2016 05:22 AM, Marc-André Lureau wrote: >>> On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster >>> wrote: Signed-off-by: Markus Armbruster --- >>> >>> Reviewed-by: Marc-André Lureau >>> >>> (apparent

Re: [Qemu-devel] [PATCH 21/38] ivshmem: Disentangle ivshmem_read()

2016-03-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> hw/misc/ivshmem.c | 189 >> +++--- >> 1 file changed, 96 insertions(+), 93 deletions(-) >> >> diff --git a

Re: [Qemu-devel] [PATCH v2] MacKeys.h: initial commit

2016-03-02 Thread Markus Armbruster
Programmingkid writes: > On Mar 2, 2016, at 4:32 AM, Markus Armbruster wrote: > >> Programmingkid writes: >> >>> This patch adds the file MacKeys.h. It is a file that contains all the >>> constants >>> for the Macintosh keyboard keycodes. >>> >>> Signed-off-by: John Arbuckle >>> >>> --- >>>

Re: [Qemu-devel] [PATCH v2] MacKeys.h: initial commit

2016-03-02 Thread Eric Blake
On 03/02/2016 08:55 AM, Markus Armbruster wrote: >>> >>> Please stick to lower case in file names. >> >> Which one do you prefer: mackeys.h or macKeys.h ? > > I'd call it mac-keys.h. mackeys.h would be okay. There's enough > precedence for '_' in file names to justify mac_keys.h, but I persona

[Qemu-devel] [PATCH v2 1/1] block/sheepdog: fix argument passed to qemu_strtoul()

2016-03-02 Thread Jeff Cody
The function qemu_strtoul() reads 'unsigned long' sized data, which is larger than uint32_t on 64-bit machines. Even though the snap_id field in the header is 32-bits, we must accomodate the full size in qemu_strtoul(). This patch also adds more meaningful error handling to the qemu_strtoul() cal

Re: [Qemu-devel] [PATCH] hw/input/adb.c: Replace pc_to_adb_keycode with more detailed array

2016-03-02 Thread Gerd Hoffmann
Hi, > In any case this whole array ought at some point to be > replaced with a Q_KEY code to ADB code lookup -- at the > moment we will convert Q_KEY to pc scancode to ADB code, > which is unfortunate if the pc scancodes don't include > some keys that ADB and the host keyboard do. (In fact, > wa

Re: [Qemu-devel] [PATCH v5 1/5] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-02 Thread Xiao Guangrong
On 03/02/2016 07:58 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 07:50:37PM +0800, Xiao Guangrong wrote: 32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this po

Re: [Qemu-devel] [PATCH] input-keymap.c: Add keypad equal and power keys

2016-03-02 Thread Gerd Hoffmann
On Mi, 2016-03-02 at 10:52 -0500, Programmingkid wrote: > Add the keypad equals and power keys to the qcode_to_number array. These keys > are used on a Macintosh keyboard. > > Signed-off-by: John Arbuckle > > --- > ui/input-keymap.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-)

Re: [Qemu-devel] [PATCH v2 1/1] block/sheepdog: fix argument passed to qemu_strtoul()

2016-03-02 Thread Paolo Bonzini
On 02/03/2016 17:09, Jeff Cody wrote: > +ret = qemu_strtoul(snapshot_id, NULL, 10, &snap_id); > +if (ret) { > +error_setg_errno(errp, -ret, "Invalid snapshot ID: %s", > + snapshot_id ? snapshot_id : ""); > +return ret; > +} > + > +if (snap_i

Re: [Qemu-devel] [PATCH v1 01/10] qdict: implement a qdict_crumple method for un-flattening a dict

2016-03-02 Thread Max Reitz
On 19.02.2016 17:47, Daniel P. Berrange wrote: > The qdict_flatten() method will take a dict whose elements are > further nested dicts/lists and flatten them by concatenating > keys. > > The qdict_crumple() method aims todo the reverse, taking a flat > qdict, and turning it into a set of nested di

Re: [Qemu-devel] [PATCH v2 1/1] block/sheepdog: fix argument passed to qemu_strtoul()

2016-03-02 Thread Jeff Cody
On Wed, Mar 02, 2016 at 11:09:29AM -0500, Jeff Cody wrote: > The function qemu_strtoul() reads 'unsigned long' sized data, > which is larger than uint32_t on 64-bit machines. > > Even though the snap_id field in the header is 32-bits, we must > accomodate the full size in qemu_strtoul(). > > This

  1   2   3   >