Re: [Qemu-devel] [vfio-users] [PATCH v2 1/3] input: add qemu_input_qcode_to_linux + qemu_input_linux_to_qcode

2016-01-05 Thread Gerd Hoffmann
On Di, 2016-01-05 at 15:44 +0100, sL1pKn07 SpinFlo wrote: > 2016-01-05 9:06 GMT+01:00 Jonathan Scruggs : > > I notice no bugs as of yet. > > Hi > I found one (if can call that) bug > > I use a physical USB switch for share the K/M with other PC > when switch to other pc, lost the signal. How doe

Re: [Qemu-devel] [PATCH for v2.3.0] fw_cfg: add check to validate current entry value

2016-01-05 Thread P J P
+-- On Tue, 5 Jan 2016, Stefan Weil wrote --+ | > -s->cur_offset < e->len) { | > +if (s->cur_entry != FW_CFG_INVALID | > +&& s->cur_entry & FW_CFG_WRITE_CHANNEL | > +&& e->callback | > +&& s->cur_offset < e->len) { | | I suggest to test e != NULL instead of s->c

[Qemu-devel] [PATCH v2 for v2.3.0] fw_cfg: add check to validate current entry value

2016-01-05 Thread P J P
From: Prasad J Pandit When processing firmware configurations, an OOB r/w access occurs if 's->cur_entry' is set to be invalid(FW_CFG_INVALID=0x). Add a check to validate 's->cur_entry' to avoid such access. Reported-by: Donghai Zdh Signed-off-by: Prasad J Pandit --- hw/nvram/fw_cfg.c | 1

Re: [Qemu-devel] [PATCH v3 4/7] bcm2835_peripherals: add rollup device for bcm2835 peripherals

2016-01-05 Thread Andrew Baumann
> From: Alistair Francis [mailto:alistai...@gmail.com] > Sent: Tuesday, 5 January 2016 18:14 > On Thu, Dec 31, 2015 at 4:31 PM, Andrew Baumann > wrote: > > This device maintains all the non-CPU peripherals on bcm2835 (Pi1) > > which are also present on bcm2836 (Pi2). It also implements the > > pri

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-05 Thread Jason Wang
On 01/05/2016 12:52 AM, Dr. David Alan Gilbert wrote: > * Jason Wang (jasow...@redhat.com) wrote: >> >> On 01/04/2016 04:16 PM, Zhang Chen wrote: >>> >>> On 01/04/2016 01:37 PM, Jason Wang wrote: On 12/31/2015 04:40 PM, Zhang Chen wrote: > On 12/31/2015 10:36 AM, Jason Wang wrote: >>

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-05 Thread Jason Wang
On 01/04/2016 07:17 PM, Zhang Chen wrote: > > > On 01/04/2016 05:46 PM, Jason Wang wrote: >> >> On 01/04/2016 04:16 PM, Zhang Chen wrote: >>> >>> On 01/04/2016 01:37 PM, Jason Wang wrote: On 12/31/2015 04:40 PM, Zhang Chen wrote: > On 12/31/2015 10:36 AM, Jason Wang wrote: >> On 12/2

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread lihuiba
At 2016-01-05 21:55:56, "Eric Blake" wrote: >On 01/05/2016 05:10 AM, lihuiba wrote: > In our production environment, we need to extend a qcow2 image with snapshots in it. > >>> The thing is that one would need to update all the inactive L1 tables. I >>> don't think it should be too diffi

Re: [Qemu-devel] [PATCH v2] l2tpv3: fix cookie decoding

2016-01-05 Thread Jason Wang
On 01/05/2016 07:26 AM, Alexis Dambricourt wrote: > If a 32 bits l2tpv3 frame cookie MSB if set to 1, the cast to uint64_t > cookie will spread 1 to the four most significant bytes. > Then the condition (cookie != s->rx_cookie) becomes false. > > Signed-off-by: Alexis Dambricourt > --- > net/l2

[Qemu-devel] [PATCH v3 4/4] Xen PCI passthru: convert to realize()

2016-01-05 Thread Cao jin
Signed-off-by: Cao jin Reviewed-by: Stefano Stabellini --- hw/xen/xen_pt.c | 53 - 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 3787c26..b058f61 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xe

[Qemu-devel] [PATCH v3 2/4] Add Error **errp for xen_pt_setup_vga()

2016-01-05 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin Reviewed-by: Stefano Stabellini --- hw/xen/xen_pt.c | 5 - hw/xen/xen_pt.h | 3 ++- hw/xen/xen_pt_graphics.c | 11 ++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/xen/xen

[Qemu-devel] [PATCH v3 3/4] Add Error **errp for xen_pt_config_init()

2016-01-05 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen_pt.c | 7 --- hw/xen/xen_pt.h | 2 +- hw/xen/xen_pt_config_init.c | 51 - 3 files changed, 32 insertions(+), 28 deletions(-) diff --git

[Qemu-devel] [PATCH v3 0/4] Convert to realize()

2016-01-05 Thread Cao jin
v3 changelog: 1. use following style when we want to check the returned error Error *err = NULL; foo(arg, &err); if (err) { handle the error... error_propagate(errp, err); } Cao jin (4): Add Error **errp for xen_host_pci_device_get() Add Error **errp for

[Qemu-devel] [PATCH v3 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-05 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen-host-pci-device.c | 106 +-- hw/xen/xen-host-pci-device.h | 5 +- hw/xen/xen_pt.c | 12 +++-- 3 files changed, 71 insertions(+), 52 deletions(-) diff --gi

Re: [Qemu-devel] [v15 12/15] vfio: add bus in reset flag

2016-01-05 Thread Chen Fan
On 01/06/2016 03:58 AM, Alex Williamson wrote: On Tue, 2016-01-05 at 09:20 +0800, Cao jin wrote: From: Chen Fan mark the host bus be in reset. avoid multiple devices trigger the host bus reset many times. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 6 ++ include/hw/vf

Re: [Qemu-devel] [PATCH v3 4/7] bcm2835_peripherals: add rollup device for bcm2835 peripherals

2016-01-05 Thread Alistair Francis
On Thu, Dec 31, 2015 at 4:31 PM, Andrew Baumann wrote: > This device maintains all the non-CPU peripherals on bcm2835 (Pi1) > which are also present on bcm2836 (Pi2). It also implements the > private address spaces used for DMA and mailboxes. > > Signed-off-by: Andrew Baumann > --- > > Notes: >

Re: [Qemu-devel] [PATCH] hw/dma/xilinx_axidma: debug printf fixups

2016-01-05 Thread Alistair Francis
On Tue, Jan 5, 2016 at 7:32 AM, Andrew Jones wrote: > On Tue, Jan 05, 2016 at 07:07:22AM -0700, Eric Blake wrote: >> On 01/05/2016 06:22 AM, Andrew Jones wrote: >> > (Found by grepping for broken PRI users.) >> > >> > Signed-off-by: Andrew Jones >> > --- >> > hw/dma/xilinx_axidma.c | 8

Re: [Qemu-devel] [PATCH v8 17/35] qapi: Drop unused 'kind' for struct/enum visit

2016-01-05 Thread Eric Blake
On 12/21/2015 10:08 AM, Eric Blake wrote: > visit_start_struct() and visit_type_enum() had a 'kind' argument > that was usually set to either the stringized version of the > corresponding qapi type name, or to NULL (although some clients > didn't even get that right). But nothing ever used the arg

Re: [Qemu-devel] [PATCH v8 14.5/35] qapi: Update docs to match recent generator changes

2016-01-05 Thread Eric Blake
On 01/05/2016 05:01 PM, Eric Blake wrote: > Several commits have been changing the generator, but not updating > the docs to match (an obvious one is commit 9f08c8ec that made > list types lazy, and thereby dropped UserDefOneList). Rework the > example to show slightly more output (we don't want t

Re: [Qemu-devel] [PATCH 06/13] HBitmap: Introduce "meta" bitmap to track bit changes

2016-01-05 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > Upon each bit toggle, the corresponding bit in the meta bitmap will be > set. > > Signed-off-by: Fam Zheng > --- > include/qemu/hbitmap.h | 8 +++ > util/hbitmap.c | 61 > +- > 2 files chan

[Qemu-devel] Clang -Werror build fails against spice-server-devel 0.12.6-1.fc22

2016-01-05 Thread John Snow
Just as a heads up: /home/bos/jhuston/src/qemu/hw/display/qxl.c:1071:6: error: 'set_mm_time' is deprecated [-Werror,-Wdeprecated-declarations] .set_mm_time = interface_set_mm_time, ^ /usr/include/spice-server/spice-qxl.h:162:12: note: 'set_mm_time' has been explicitly marked d

[Qemu-devel] [PATCH v8 14.5/35] qapi: Update docs to match recent generator changes

2016-01-05 Thread Eric Blake
Several commits have been changing the generator, but not updating the docs to match (an obvious one is commit 9f08c8ec that made list types lazy, and thereby dropped UserDefOneList). Rework the example to show slightly more output (we don't want to show too much; that's what the testsuite is for)

Re: [Qemu-devel] [PATCH 08/17] isa: add an ISA DMA interface, and store it within the ISA bus

2016-01-05 Thread John Snow
On 12/29/2015 03:04 AM, Hervé Poussineau wrote: > This will permit to deprecate global DMA_*() functions. > > Signed-off-by: Hervé Poussineau > --- > hw/isa/isa-bus.c| 21 + > include/hw/isa/isa.h| 38 ++ > include/qemu/typede

Re: [Qemu-devel] [PATCH 05/13] block: Hide HBitmap in block dirty bitmap interface

2016-01-05 Thread John Snow
Should we skip adding the typedef for HBitmapIter if we're just going to use this instead? On 01/04/2016 05:27 AM, Fam Zheng wrote: > HBitmap is an implementation detail of block dirty bitmap that should be > hidden > from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying > HBi

Re: [Qemu-devel] [PATCH v8 14/35] qapi: Swap visit_* arguments for consistent 'name' placement

2016-01-05 Thread Eric Blake
On 01/05/2016 08:32 AM, Eric Blake wrote: >> >> However, docs/qapi-code-gen.txt should be updated in a follow-up patch. > > D'oh - I knew I'd forget something :) You're right, of course. For that matter, several recent patches have tweaked generated code without updating the docs, such as 9f08c

Re: [Qemu-devel] [PATCH 04/13] block: Remove unused typedef of BlockDriverDirtyHandler

2016-01-05 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > include/block/block.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/include/block/block.h b/include/block/block.h > index 97e9b5e..0f42964 100644 > --- a/include/block/block.h > +++ b/include/block/block.h

Re: [Qemu-devel] [PATCH 03/13] block: Move block dirty bitmap code to separate files

2016-01-05 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > The only change is making bdrv_dirty_bitmap_truncate public. It is used in > block.c. > > Signed-off-by: Fam Zheng > --- > block.c | 339 --- > block/Makefile.objs | 2 +- > block/dir

Re: [Qemu-devel] [PATCH 02/13] typedefs: Add BdrvDirtyBitmap and HBitmapIter

2016-01-05 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > Following patches to refactor and move block dirty bitmap code could use this. > > Signed-off-by: Fam Zheng > --- > include/qemu/typedefs.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h >

[Qemu-devel] [PATCH v4 1/1] xlnx-zynqmp: Add support for high DDR memory regions

2016-01-05 Thread Alistair Francis
The Xilinx ZynqMP SoC and EP108 board supports three memory regions: - A 2GB region starting at 0 - A 32GB region starting at 32GB - A 256GB region starting at 768GB This patch adds support for the first two memory regions, which is automatically created based on the size specified by the QEMU

Re: [Qemu-devel] [PATCH 10/17] magnum: disable floppy DMA for now

2016-01-05 Thread John Snow
On 12/29/2015 03:04 AM, Hervé Poussineau wrote: > Floppy uses the DMA controller in rc4030 chipset, and not the i8259 from the > ISA bus. > It's better to disable DMA than to call the wrong DMA controller. > I'll trust that these platforms' FDCs are already terribly broken and unusable, I've n

Re: [Qemu-devel] [PATCH 09/17] i8257: implement the IsaDma interface

2016-01-05 Thread John Snow
Accidental duplicate send of patch #09 with minor differences in the commit message... Assuming this one is the "correct" one and just discarding the other. On 12/29/2015 03:04 AM, Hervé Poussineau wrote: > Rewrite the global DMA_*() functions to use the IsaDma interface. > Note that these functio

Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup

2016-01-05 Thread Peter Hornyack
On Thu, Dec 24, 2015 at 1:33 AM, Andrey Smetanin wrote: > Lately tsc page was implemented but filled with empty > values. This patch setup tsc page scale and offset based > on vcpu tsc, tsc_khz and HV_X64_MSR_TIME_REF_COUNT value. > > The valid tsc page drops HV_X64_MSR_TIME_REF_COUNT msr > reads

Re: [Qemu-devel] [PATCH] macio: fix overflow in lba to offset conversion for ATAPI devices

2016-01-05 Thread John Snow
On 01/04/2016 12:30 PM, Mark Cave-Ayland wrote: > As the IDEState lba field is an int32_t, make sure we cast to int64_t before > shifting to calculate the offset. Otherwise we end up with an overflow when > trying to access sectors beyond 2GB as can occur when using DVD images. > > Signed-off-by

Re: [Qemu-devel] [PATCH for v2.3.0] fw_cfg: add check to validate current entry value

2016-01-05 Thread Stefan Weil
Am 05.01.2016 um 15:55 schrieb P J P: > From: Prasad J Pandit > > When processing firmware configurations, an OOB r/w access occurs > if 's->cur_entry' is set to be invalid(FW_CFG_INVALID=0x). > Add a check to validate 's->cur_entry' to avoid such access. > > Reported-by: Donghai Zdh > Sign

Re: [Qemu-devel] [Qemu-block] [PATCH 05/10] block: Inactivate BDS when migration completes

2016-01-05 Thread John Snow
On 12/22/2015 03:43 PM, Eric Blake wrote: > On 12/22/2015 09:46 AM, Kevin Wolf wrote: >> So far, live migration with shared storage meant that the image is in a >> not-really-ready don't-touch-me state on the destination while the >> source is still actively using it, but after completing the mig

Re: [Qemu-devel] [Qemu-block] [PATCH] send readcapacity10 when readcapacity16 failed

2016-01-05 Thread ronnie sahlberg
MMC devices: READ CAPACITY 10 support is mandatory. No support for READ CAPACITY 16 SBC devices: READ CAPACITY 10 is mandatory READ CAPACITY 16 support is only required when you have thin provisioning or protection information (or if the device is >2^32 blocks) Almost all, but apparently not all,

Re: [Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-05 Thread Eric Blake
On 01/05/2016 10:29 AM, Cédric Le Goater wrote: [meta-comment] Your messages were not marked in-reply-to: the 0/8 cover letter, but came through as separate threads. This makes it harder to follow, especially in mail clients that sort top-level threads by most recent activity on the thread. > Th

Re: [Qemu-devel] [v15 12/15] vfio: add bus in reset flag

2016-01-05 Thread Alex Williamson
On Tue, 2016-01-05 at 09:20 +0800, Cao jin wrote: > From: Chen Fan > > mark the host bus be in reset. avoid multiple devices trigger the > host bus reset many times. > > Signed-off-by: Chen Fan > --- >  hw/vfio/pci.c | 6 ++ >  include/hw/vfio/vfio-common.h | 1 + >  2 files c

[Qemu-devel] [PATCH 13/22] fsdev: rename virtio-9p-marshal.{c, h} to 9p-iov-marshal.{c, h}

2016-01-05 Thread Wei Liu
And rename v9fs_marshal to v9fs_iov_marshal, v9fs_unmarshal to v9fs_iov_unmarshal. The rationale behind this change is that, this marshalling interface is used both by virtio and proxy helper. Renaming files and functions to reflect the true nature of this interface. Xen transport is going to hav

Re: [Qemu-devel] [Qemu-block] [PATCH] send readcapacity10 when readcapacity16 failed

2016-01-05 Thread John Snow
On 12/28/2015 10:32 PM, Zhu Lingshan wrote: > When play with Dell MD3000 target, for sure it > is a TYPE_DISK, but readcapacity16 would fail. > Then we find that readcapacity10 succeeded. It > looks like the target just support readcapacity10 > even through it is a TYPE_DISK or have some > TYPE_R

[Qemu-devel] [PATCH 12/22] 9pfs: use V9fsBlob to transmit xattr

2016-01-05 Thread Wei Liu
And make v9fs_pack static function. Now we only need to export v9fs_{,un}marshal to device. Signed-off-by: Wei Liu --- fsdev/virtio-9p-marshal.c | 4 ++-- fsdev/virtio-9p-marshal.h | 3 --- hw/9pfs/virtio-9p.c | 21 + 3 files changed, 15 insertions(+), 13 deletions(-)

[Qemu-devel] [PATCH 17/22] 9pfs: factor out virtio_pdu_{, un}marshal

2016-01-05 Thread Wei Liu
Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p-device.c | 14 ++ hw/9pfs/virtio-9p.c| 6 ++ hw/9pfs/virtio-9p.h| 5 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index f3091cc..d77247f

[Qemu-devel] [PATCH 20/22] 9pfs: break out generic code from virtio-9p.{c, h}

2016-01-05 Thread Wei Liu
The vast majority of code in virtio-9p.c is actually generic code. Rename that file to 9p.c and move virtio specific code to virtio-9p-device.c. Rename virtio-9p.h to 9p.h and split out virtio specific code to new virtio-9p.h. Finally fix up virtio-pci.h header file inclusion. Note that V9fsState

[Qemu-devel] [PATCH 16/22] 9pfs: make pdu_{, un}marshal proper functions

2016-01-05 Thread Wei Liu
Factor out v9fs_iov_v{,un}marshal. Implement pdu_{,un}marshal with those functions. Signed-off-by: Wei Liu --- fsdev/9p-iov-marshal.c | 42 ++ fsdev/9p-iov-marshal.h | 5 + hw/9pfs/virtio-9p.c| 26 ++ hw/9pfs/virtio-9p.h

[Qemu-devel] [PATCH 14/22] 9pfs: PDU processing functions don't need to take V9fsState as argument

2016-01-05 Thread Wei Liu
V9fsState can be referenced by pdu->s. Initialise that in device realization function. Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p-device.c | 1 + hw/9pfs/virtio-9p.c| 98 +- 2 files changed, 46 insertions(+), 53 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 19/22] 9pfs: break out virtio_init_iov_from_pdu

2016-01-05 Thread Wei Liu
Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p-device.c | 12 hw/9pfs/virtio-9p.c| 8 +--- hw/9pfs/virtio-9p.h| 2 ++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index d77247f..5cad654 100

[Qemu-devel] [PATCH 18/22] 9pfs: factor out pdu_push_and_notify

2016-01-05 Thread Wei Liu
Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index db79a48..5475f29 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -63,6 +63,17 @@ ssize_t pdu_unmarsha

[Qemu-devel] [PATCH 10/22] fsdev: break out 9p-marshal.{c, h} from virtio-9p-marshal.{c, h}

2016-01-05 Thread Wei Liu
Break out some generic functions for marshaling 9p state. Pure code motion plus minor fixes for build system. Signed-off-by: Wei Liu --- Makefile | 2 +- fsdev/9p-marshal.c| 57 fsdev/9p-marshal.h| 84

[Qemu-devel] [PATCH 21/22] 9pfs: factor out v9fs_device_{, un}realize_common

2016-01-05 Thread Wei Liu
Signed-off-by: Wei Liu --- hw/9pfs/9p.c | 95 ++ hw/9pfs/9p.h | 2 + hw/9pfs/virtio-9p-device.c | 90 --- 3 files changed, 104 insertions(+), 83 deletions(-) diff --git a/hw/9pfs/9p.c

[Qemu-devel] [PATCH 22/22] 9pfs: disentangle V9fsState

2016-01-05 Thread Wei Liu
V9fsState now only contains generic fields. Introduce V9fsVirtioState for virtio transport. Change virtio-pci and virtio-ccw to use V9fsVirtioState. Handle transport enumeration in generic routines. Signed-off-by: Wei Liu --- hw/9pfs/9p.c | 41 +++- hw/9pfs/9p.

[Qemu-devel] [PATCH 15/22] 9pfs: PDU processing functions should start pdu_ prefix

2016-01-05 Thread Wei Liu
This matches naming convention of pdu_marshal and pdu_unmarshal. Signed-off-by: Wei Liu --- This patch can be squashed if necessary. --- hw/9pfs/virtio-9p.c | 88 ++--- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/hw/9pfs/virtio-

[Qemu-devel] [PATCH 11/22] fsdev: 9p-marshal: introduce V9fsBlob

2016-01-05 Thread Wei Liu
Introduce a concept of blob. It will be used to pack / unpack xattr value. With this change there is no need to expose v9fs_pack to device code anymore. Signed-off-by: Wei Liu --- fsdev/9p-marshal.c| 7 +++ fsdev/9p-marshal.h| 14 ++ fsdev/virtio-9p-marshal.c |

Re: [Qemu-devel] [Qemu-block] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2016-01-05 Thread John Snow
On 12/22/2015 08:24 PM, Wen Congyang wrote: > On 12/19/2015 06:02 PM, Markus Armbruster wrote: >> Copying qemu-block because this seems related to generalising block jobs >> to background jobs. >> >> zhanghailiang writes: >> >>> If some errors happen during VM's COLO FT stage, it's important to

Re: [Qemu-devel] [PATCH v2 0/3] virtio: cross-endian helpers fixes

2016-01-05 Thread Greg Kurz
On Wed, 23 Dec 2015 17:28:23 +0100 Greg Kurz wrote: > On Wed, 23 Dec 2015 15:47:00 +0200 > "Michael S. Tsirkin" wrote: > > > On Thu, Dec 17, 2015 at 09:52:46AM +0100, Greg Kurz wrote: > > > This series tries to rework cross-endian helpers for better clarity. > > > It does not change behaviour,

[Qemu-devel] [PATCH 07/22] 9pfs: rename virtio-9p-xattr{, -user}.{c, h} to 9p-xattr{, -user}.{c, h}

2016-01-05 Thread Wei Liu
These three files are not virtio specific. Rename them to generic names. Fix comments and header inclusion in various files. Signed-off-by: Wei Liu --- hw/9pfs/9p-handle.c | 2 +- hw/9pfs/9p-local.c | 2 +- hw/9pfs/9p-posix-acl.c

[Qemu-devel] [PATCH 00/22] 9pfs: disentangling virtio and generic code

2016-01-05 Thread Wei Liu
Hi all Back in 2015 summer one of our OPW interns Linda Jacobson explored the possibility of making 9pfs work on Xen. It turned out lots of code in QEMU can be reused. This series refactors 9pfs related code: 1. Rename a bunch of files and functions to make clear they are generic. 2. Only export

[Qemu-devel] [PATCH 04/22] 9pfs: rename virtio-9p-posix-acl.c to 9p-posix-acl.c

2016-01-05 Thread Wei Liu
This file is not virtio specific. Rename it to use generic name. Fix comment and remove unneeded inclusion of virtio.h. Signed-off-by: Wei Liu --- hw/9pfs/{virtio-9p-posix-acl.c => 9p-posix-acl.c} | 3 +-- hw/9pfs/Makefile.objs | 2 +- 2 files changed, 2 insertions(+

[Qemu-devel] [PATCH 05/22] 9pfs: rename virtio-9p-proxy.{c, h} to 9p-proxy.{c, h}

2016-01-05 Thread Wei Liu
Those two files are not virtio specific. Rename them to use generic names. Fix includes in various C files. Change define guards and comments in header files. Signed-off-by: Wei Liu --- fsdev/virtfs-proxy-helper.c | 2 +- hw/9pfs/{virtio-9p-proxy.c => 9p-proxy.c} | 5 ++--- hw/9pf

[Qemu-devel] [PATCH 09/22] 9pfs: remove dead code

2016-01-05 Thread Wei Liu
Some structures virtio-9p.h have been unused since 2011 when relevant functions switched to use coroutines. The declaration of pdu_packunpack and function do_pdu_unpack are useless. The function virtio_9p_set_fd_limit is unused. Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p.c | 11 - hw

[Qemu-devel] [PATCH 01/22] 9pfs: rename virtio-9p-coth.{c, h} to coth.{c, h}

2016-01-05 Thread Wei Liu
Those two files are not virtio specific. Rename them to use generic names. Fix includes in various C files. Change define guards and comments in header files. Signed-off-by: Wei Liu --- hw/9pfs/Makefile.objs| 2 +- hw/9pfs/codir.c | 2 +- hw/9pfs/cofile.c

[Qemu-devel] [PATCH 02/22] 9pfs: rename virtio-9p-handle.c to 9p-handle.c

2016-01-05 Thread Wei Liu
This file is not virtio specific. Rename it to use generic name. Fix comment and remove unneeded inclusion of virtio.h. Signed-off-by: Wei Liu --- hw/9pfs/{virtio-9p-handle.c => 9p-handle.c} | 3 +-- hw/9pfs/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 3 deletio

[Qemu-devel] [PATCH 06/22] 9pfs: rename virtio-9p-synth.{c, h} to 9p-synth.{c, h}

2016-01-05 Thread Wei Liu
These two files are not virtio specific. Rename them to use generic names. Fix includes in various C files. Change define guards and comments in header files. Signed-off-by: Wei Liu --- hw/9pfs/{virtio-9p-synth.c => 9p-synth.c} | 2 +- hw/9pfs/{virtio-9p-synth.h => 9p-synth.h} | 6 +++--- hw/9p

[Qemu-devel] [PATCH 08/22] 9pfs: merge hw/virtio/virtio-9p.h into hw/9pfs/virtio-9p.h

2016-01-05 Thread Wei Liu
The deleted file only contained V9fsConf which wasn't virtio specific. Merge that to the general header of 9pfs. Fixed header inclusions as I went along. Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p-device.c| 1 - hw/9pfs/virtio-9p.h | 8 +++- hw/virtio/virtio-pci.h|

[Qemu-devel] [PATCH 03/22] 9pfs: rename virtio-9p-handle.c to 9p-handle.c

2016-01-05 Thread Wei Liu
This file is not virtio specific. Rename it to use generic name. Fix comment and remove unneeded inclusion of virtio.h. Signed-off-by: Wei Liu --- hw/9pfs/{virtio-9p-local.c => 9p-local.c} | 3 +-- hw/9pfs/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Konrad Rzeszutek Wilk
> You can create a dummy device in guest for the duration of migration. > Use guest agent to move IP address there and that should be enough to trick > most guests. If you are doing this - why not bond the physical NIC with an virtual device and unplug the physical NIC?

Re: [Qemu-devel] [RFC v6 02/14] softmmu: Add new TLB_EXCL flag

2016-01-05 Thread Alex Bennée
alvise rigo writes: > On Tue, Jan 5, 2016 at 5:10 PM, Alex Bennée wrote: >> >> Alvise Rigo writes: >> >>> Add a new TLB flag to force all the accesses made to a page to follow >>> the slow-path. >>> >>> In the case we remove a TLB entry marked as EXCL, we unset the >>> corresponding exclusive

Re: [Qemu-devel] [PATCH] sdhci: add quirk property for card insert interrupt status on Raspberry Pi

2016-01-05 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Monday, 4 January 2016 22:18 > On Mon, Jan 4, 2016 at 2:12 PM, Andrew Baumann > wrote: > >> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > >> Sent: Thursday, 31 December 2015 21:38 > >> On Thu, Dec 31, 2015 at 1:4

Re: [Qemu-devel] [PATCH for v2.3.0] fw_cfg: add check to validate current entry value

2016-01-05 Thread P J P
+-- On Tue, 5 Jan 2016, P J P wrote --+ | An OOB r/w access issue was reported by Mr Donghai Zdh, CC'd here. Mr Donghai CC'd now. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH v8 34/35] qapi: Change visit_type_FOO() to no longer return partial objects

2016-01-05 Thread Eric Blake
On 01/05/2016 10:22 AM, Marc-André Lureau wrote: > Hi > > On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: >> Returning a partial object on error is an invitation for a careless >> caller to leak memory. As no one outside the testsuite was actually >> relying on these semantics, it is cleaner

Re: [Qemu-devel] [PATCH 3/6] device_tree: introduce qemu_fdt_node_path

2016-01-05 Thread Peter Maydell
On 5 January 2016 at 16:20, Eric Auger wrote: > Hi Peter, > On 12/18/2015 03:23 PM, Peter Maydell wrote: >> On 17 December 2015 at 12:29, Eric Auger wrote: >>> This new helper routine returns the node path of a device >>> referred to by its node name and compat string. >>> >>> Signed-off-by: Eric

Re: [Qemu-devel] [PATCH 4/6] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-05 Thread Peter Maydell
On 5 January 2016 at 16:20, Eric Auger wrote: > Hi Peter, > On 12/18/2015 03:36 PM, Peter Maydell wrote: >> On 17 December 2015 at 12:29, Eric Auger wrote: >>> Current qemu_fdt_getprop exits if the property is not found. It is >>> sometimes needed to read an optional property, in which case we do

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread John Snow
On 01/05/2016 08:55 AM, Eric Blake wrote: > On 01/05/2016 05:10 AM, lihuiba wrote: > In our production environment, we need to extend a qcow2 image with snapshots in it. > >>> The thing is that one would need to update all the inactive L1 tables. I >>> don't think it should be too dif

[Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 51 -- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 559e1398d669..061db8437479 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +

[Qemu-devel] [PATCH 0/8] ipmi: a couple of enhancements to the BMC simulator

2016-01-05 Thread Cédric Le Goater
Hi, Here are a few patches adding a couple of IPMI commands to the BMC simulator. The last patches provides an API to extend the initial SDRs and generate events. These will be useful for the upcoming powernv platform. Based on 38a762fec63f and also available here : https://github.com/legoate

[Qemu-devel] [PATCH 8/8] ipmi: introduce an ipmi_bmc_gen_event() API

2016-01-05 Thread Cédric Le Goater
It will be used to fill the message buffer with custom events expected by some systems. Typically, an Open PowerNV platform guest is notified with an OEM SEL message before a shutdown or a reboot. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 24 include/h

[Qemu-devel] [PATCH 6/8] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-05 Thread Cédric Le Goater
SET_SENSOR_READING is a complex IPMI command (IPMI spec : "35.17 Set Sensor Reading And Event Status Command"). Here is a very minimum framework fitting the Open PowerNV platform needs. This command is used on this platform to set the "System Firmware Progress" sensor and the "Boot Count" sensor.

[Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 60586a67104e..c3a06d0ac7e4 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi/ipm

[Qemu-devel] [PATCH 4/8] ipmi: add FRU support

2016-01-05 Thread Cédric Le Goater
This patch provides a simplistic FRU support for the IPMI BMC simulator. The FRU area contains 32 entries * 256 bytes which should be enough to start some simulation. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 119 + 1 file chang

[Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_init_sensor() API

2016-01-05 Thread Cédric Le Goater
This routine will let qemu platforms populate the sdr/sensor tables of the IPMI BMC simulator with their customs needs. The patch adds a compact sensor record typedef to ease definition of sdrs. To be used in the code the following way: static ipmi_sdr_compact_buffer my_init_sdrs[] = {

[Qemu-devel] [PATCH 3/8] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-05 Thread Cédric Le Goater
This is a simulator. Just return an unknown cause (0). Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 061db8437479..5db94491b130 100644 ---

[Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-05 Thread Cédric Le Goater
The IPMI BMC simulator populates the SDR table with a set of initial SDRs. The length of each SDR is taken from the record itself (byte 4) which does not include the size of the header. But, the full length (header + data) is required by the sdr_add_entry() routine. Signed-off-by: Cédric Le Goater

Re: [Qemu-devel] [RFC v6 02/14] softmmu: Add new TLB_EXCL flag

2016-01-05 Thread alvise rigo
On Tue, Jan 5, 2016 at 5:10 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> Add a new TLB flag to force all the accesses made to a page to follow >> the slow-path. >> >> In the case we remove a TLB entry marked as EXCL, we unset the >> corresponding exclusive bit in the bitmap. >> >> Suggeste

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-05 Thread Laszlo Ersek
On 01/05/16 18:08, Igor Mammedov wrote: > On Mon, 4 Jan 2016 21:17:31 +0100 > Laszlo Ersek wrote: > >> Michael CC'd me on the grandparent of the email below. I'll try to add >> my thoughts in a single go, with regard to OVMF. >> >> On 12/30/15 20:52, Michael S. Tsirkin wrote: >>> On Wed, Dec 30,

Re: [Qemu-devel] [PATCH v8 32/35] qapi: Split visit_end_struct() into pieces

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > As mentioned in previous patches, we want to call visit_end_struct() > functions unconditionally, so that visitors can release resources > tied up since the matching visit_start_struct() without also having > to worry about error priority if

Re: [Qemu-devel] [PATCH v8 34/35] qapi: Change visit_type_FOO() to no longer return partial objects

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Returning a partial object on error is an invitation for a careless > caller to leak memory. As no one outside the testsuite was actually > relying on these semantics, it is cleaner to just document and > guarantee that ALL pointer-based vi

Re: [Qemu-devel] [PATCH v8 33/35] qapi: Simplify semantics of visit_next_list()

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > We have two uses of list visits in the entire code base: one in > spapr_drc (which completely avoids visit_next_list(), feeding in > integers from a different source than uint8List), and one in > qapi-visit.py (that is, all other list visito

Re: [Qemu-devel] [PATCH v8 35/35] RFC: qapi: Adjust layout of FooList types

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > By sticking the next pointer first, we don't need a union with > 64-bit padding for smaller types. On 32-bit platforms, this > can reduce the size of uint8List from 16 bytes (or 12, depending > on whether 64-bit ints can tolerate 4-byte ali

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-05 Thread Xiao Guangrong
On 01/06/2016 12:43 AM, Michael S. Tsirkin wrote: Yes - if address is static, you need to put it outside the table. Can come right before or right after this. Also if OperationRegion() is used, then one has to patch DefOpRegion directly as RegionOffset must be Integer, using variable names i

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-05 Thread Igor Mammedov
On Mon, 4 Jan 2016 21:17:31 +0100 Laszlo Ersek wrote: > Michael CC'd me on the grandparent of the email below. I'll try to add > my thoughts in a single go, with regard to OVMF. > > On 12/30/15 20:52, Michael S. Tsirkin wrote: > > On Wed, Dec 30, 2015 at 04:55:54PM +0100, Igor Mammedov wrote:

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-05 Thread Laszlo Ersek
On 01/05/16 17:43, Michael S. Tsirkin wrote: > On Tue, Jan 05, 2016 at 05:30:25PM +0100, Igor Mammedov wrote: bios-linker-loader is a great interface for initializing some guest owned data and linking it together but I think it adds unnecessary complexity and is misused if it's used

Re: [Qemu-devel] [PATCH 5/6] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-05 Thread Eric Auger
On 12/18/2015 03:54 PM, Peter Maydell wrote: > On 17 December 2015 at 12:29, Eric Auger wrote: >> Some passthrough'ed devices depend on clock nodes. Those need to be >> generated in the guest device tree. This patch introduces some helpers >> to build a clock node from information retrieved in the

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 05:30:25PM +0100, Igor Mammedov wrote: > > > bios-linker-loader is a great interface for initializing some > > > guest owned data and linking it together but I think it adds > > > unnecessary complexity and is misused if it's used to handle > > > device owned data/on device

Re: [Qemu-devel] [RFC v6 03/14] Add CPUClass hook to set exclusive range

2016-01-05 Thread Alex Bennée
Alvise Rigo writes: > Allow each architecture to set the exclusive range at any LoadLink > operation through a CPUClass hook. nit: space or continue paragraph. > This comes in handy to emulate, for instance, the exclusive monitor > implemented in some ARM architectures (more precisely, the Exc

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-05 Thread Igor Mammedov
On Wed, 30 Dec 2015 21:52:32 +0200 "Michael S. Tsirkin" wrote: > On Wed, Dec 30, 2015 at 04:55:54PM +0100, Igor Mammedov wrote: > > On Mon, 28 Dec 2015 14:50:15 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Dec 28, 2015 at 10:39:04AM +0800, Xiao Guangrong wrote: > > > > > > > > H

Re: [Qemu-devel] [PATCH v2] trace-events: fix broken format strings

2016-01-05 Thread Greg Kurz
Cc'ing Peter because we'd like this patch to go directly to the master branch. On Tue, 5 Jan 2016 16:37:35 +0100 Andrew Jones wrote: > Fixes compiling with --enable-trace-backends > > Signed-off-by: Andrew Jones > --- > v2: also remove trailing null strings [Laurent] > > Reviewed-by: Greg

Re: [Qemu-devel] [PATCH 3/6] device_tree: introduce qemu_fdt_node_path

2016-01-05 Thread Eric Auger
Hi Peter, On 12/18/2015 03:23 PM, Peter Maydell wrote: > On 17 December 2015 at 12:29, Eric Auger wrote: >> This new helper routine returns the node path of a device >> referred to by its node name and compat string. >> >> Signed-off-by: Eric Auger >> >> --- >> >> RFC -> v1: >> - improve error ha

Re: [Qemu-devel] [PATCH 4/6] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-05 Thread Eric Auger
Hi Peter, On 12/18/2015 03:36 PM, Peter Maydell wrote: > On 17 December 2015 at 12:29, Eric Auger wrote: >> Current qemu_fdt_getprop exits if the property is not found. It is >> sometimes needed to read an optional property, in which case we do >> not wish to exit but simply returns a null value.

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Alexander Duyck
On Tue, Jan 5, 2016 at 1:40 AM, Michael S. Tsirkin wrote: > On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: >> >> The two mechanisms referenced above would likely require coordination with >> >> QEMU and as such are open to discussion. I haven't attempted to address >> >> them as

Re: [Qemu-devel] [PATCH v8 26/35] qapi: Add type.is_empty() helper

2016-01-05 Thread Eric Blake
On 01/05/2016 07:04 AM, Marc-André Lureau wrote: > Hi > > On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: >> And use it in qapi-types and qapi-event. Down the road, we may >> want to lift our artificial restriction of no variants at the >> top level of an event, at which point, inlining our c

Re: [Qemu-devel] [RFC v6 02/14] softmmu: Add new TLB_EXCL flag

2016-01-05 Thread Alex Bennée
Alvise Rigo writes: > Add a new TLB flag to force all the accesses made to a page to follow > the slow-path. > > In the case we remove a TLB entry marked as EXCL, we unset the > corresponding exclusive bit in the bitmap. > > Suggested-by: Jani Kokkonen > Suggested-by: Claudio Fontana > Signed-

Re: [Qemu-devel] [PATCH v8 22/35] qapi: Add visit_type_null() visitor

2016-01-05 Thread Eric Blake
On 01/05/2016 07:05 AM, Marc-André Lureau wrote: > Hi > > On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: >> Right now, qmp-output-visitor happens to produce a QNull result >> if nothing is actually visited between the creation of the visitor >> and the request for the resulting QObject. A st

  1   2   3   >