[Qemu-devel] [PATCH v9 09/37] qapi: Prefer type_int64 over type_int in visitors

2016-01-19 Thread Eric Blake
The qapi builtin type 'int' is basically shorthand for the type 'int64'. In fact, since no visitor was providing the optional type_int64() callback, visit_type_int64() was just always falling back to type_int(), cementing the equivalence between the types. However, some visitors are providing a t

[Qemu-devel] [PATCH v9 04/37] hmp: Improve use of qapi visitor

2016-01-19 Thread Eric Blake
Cache the visitor in a local variable instead of repeatedly calling the accessor. Pass NULL for the visit_start_struct() object (which matches the fact that we were already passing 0 for the size argument, because we aren't using the visit to allocate a qapi struct). Signed-off-by: Eric Blake Re

[Qemu-devel] [PATCH v9 00/37] qapi visitor cleanups (post-introspection cleanups subset E)

2016-01-19 Thread Eric Blake
Based on qemu.git master. Pending prerequisites: + Not a strong dependency, but for qapi-tests to consistently pass, I needed a race fixed: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01827.html Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-c

[Qemu-devel] [PATCH v9 06/37] balloon: Improve use of qapi visitor

2016-01-19 Thread Eric Blake
Rework the control flow of balloon_stats_get_all() to make it easier for a later patch to split visit_end_struct(). Also switch to the uint64 visitor to match the data type. Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau --- v9: no change v8: no change v7: place earlier in series v6:

[Qemu-devel] [PATCH v9 05/37] vl: Improve use of qapi visitor

2016-01-19 Thread Eric Blake
Cache the visitor in a local variable instead of repeatedly calling the accessor. Pass NULL for the visit_start_struct() object (which matches the fact that we were already passing 0 for the size argument, because we aren't using the visit to allocate a qapi struct). Guarantee that visit_end_stru

[Qemu-devel] [PATCH v9 03/37] qapi: Drop dead dealloc visitor variable

2016-01-19 Thread Eric Blake
Commit 0b9d8542 added StackEntry.is_list_head, but forgot to delete the now-unused QapiDeallocVisitor.is_list_head. Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau --- v9: no change v8: no change v7: new patch --- qapi/qapi-dealloc-visitor.c | 1 - 1 file changed, 1 deletion(-) diff

Re: [Qemu-devel] [PATCH v1 05/17] target-arm: pass DisasContext to gen_aa32_ld*/st*

2016-01-19 Thread Peter Maydell
On 18 January 2016 at 07:12, Peter Crosthwaite wrote: > From: Paolo Bonzini > > We'll need the DisasContext in the next patch to retrieve the > desired endianness, so pass it as a whole to gen_aa32_ld*/st*. > > Unfortunately we cannot let those functions call get_mem_index, > because of user-mode

Re: [Qemu-devel] [PATCH v3 04/13] nbd: convert to using I/O channels for actual socket I/O

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 14:09, Daniel P. Berrange wrote: > + * This will update @iov so that its head is advanced > + * by @skip bytes. To do this, zero or more complete > + * elements of @iov will be skipped over. The new head > + * of @iov will then have its base & len updated to > + * skip the remaining

Re: [Qemu-devel] [PATCH 07/10] virtio: combine the read of a descriptor

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:55 +0100 Paolo Bonzini wrote: > Compared to vring, virtio has a performance penalty of 10%. Fix it > by combining all the reads for a descriptor in a single address_space_read > call. This also simplifies the code nicely. > > Signed-off-by: Paolo Bonzini > --- > hw/

Re: [Qemu-devel] [PATCH 06/10] vring: slim down allocation of VirtQueueElements

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:54 +0100 Paolo Bonzini wrote: > Build the addresses and s/g lists on the stack, and then copy them > to a VirtQueueElement that is just as big as required to contain this > particular s/g list. The cost of the copy is minimal compared to that > of a large malloc. > > S

Re: [Qemu-devel] [PATCH v1 04/17] target-arm: implement SCTLR.EE

2016-01-19 Thread Peter Maydell
On 18 January 2016 at 07:12, Peter Crosthwaite wrote: > From: Peter Crosthwaite > > Implement SCTLR.EE bit which controls data endianess for exceptions > and page table translations. SCTLR.EE is mirrored to the CPSR.E bit > on exception entry. > > Signed-off-by: Peter Crosthwaite > --- > > targ

Re: [Qemu-devel] [PATCH 05/10] virtio: slim down allocation of VirtQueueElements

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:53 +0100 Paolo Bonzini wrote: > Build the addresses and s/g lists on the stack, and then copy them > to a VirtQueueElement that is just as big as required to contain this > particular s/g list. The cost of the copy is minimal compared to that > of a large malloc. > > W

Re: [Qemu-devel] [RFC PATCH 2/2] softmmu: simplify helper_*_st_name with smmu_helper(do_unl_store)

2016-01-19 Thread alvise rigo
On Fri, Jan 8, 2016 at 4:53 PM, Alex Bennée wrote: > From: Alvise Rigo > > Attempting to simplify the helper_*_st_name, wrap the > do_unaligned_access code into an shared inline function. As this also > removes the goto statement the inline code is expanded twice in each > helper. > > Suggested-b

Re: [Qemu-devel] [PATCH] hw/misc: slavepci_passthru driver

2016-01-19 Thread Alex Williamson
On Tue, 2016-01-19 at 11:30 +0100, Francesco Zuliani wrote: > Hi Alex, > > > On 01/18/2016 05:41 PM, Alex Williamson wrote: > > On Mon, 2016-01-18 at 10:16 -0500, Marc-André Lureau wrote: > > > Hi > > > > > > - Original Message - > > > > Hi there, > > > > > > > > I'd like to submit this

Re: [Qemu-devel] [Minios-devel] [PATCH v8 0/] Begin to disentangle libxenctrl and provide some stable libraries

2016-01-19 Thread Ian Campbell
On Fri, 2016-01-15 at 13:22 +, Ian Campbell wrote: >  > Therefore needing attention from Ian and/or Wei are: > > tools/libs/foreignmemory: Mention restrictions on fork in docs. > N tools/libs/evtchn: Use uint32_t for domid arguments > D tools/libs/gnttab: Extensive updates to API

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-19 Thread Daniel P. Berrange
On Mon, Jan 18, 2016 at 10:54:40AM +0100, Gerd Hoffmann wrote: > Hi folks, > > I'm starting to investigate if and how we can move the user interface > code into its own thread instead of running it in the iothread and > therefore avoid blocking the guest in case some UI actions take a little > l

Re: [Qemu-devel] live migration between different qemu versions

2016-01-19 Thread Alexey
Hello, On 2016-01-16 02:24, Eric Blake wrote: On 01/12/2016 05:11 AM, Dr. David Alan Gilbert wrote: Tell me please right way to append zeros to "BIOS (ia32) ROM Ext. (137*512)" file? I'd use dd; something like: dd if=/dev/zero bs=1 count=18944 >> theromfile I think that should do it (2032

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-19 Thread Daniel P. Berrange
On Tue, Jan 19, 2016 at 02:01:47PM +0100, Gerd Hoffmann wrote: > Hi, > > > That, and so the UI can use localization without corrupting other > > threads that MUST use the C locale (QMP parsing/output of floating point > > is particularly important to get right with '.' instead of ',' for a > > d

Re: [Qemu-devel] [PATCH 0/6] Get rid of confusing softfloat-specific integer types

2016-01-19 Thread Peter Maydell
On 12 January 2016 at 12:55, Peter Maydell wrote: > This patchset removes the confusing softfloat-specific integer > types int8, uint8, int32, uint32, int64 and uint64, replacing > them with the standard _t types that they were typedef'd as. > These frequently got accidentally used outside the sof

Re: [Qemu-devel] [PATCH v2 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Markus Armbruster
Greg Kurz writes: > This v2 does the following: > - addresses Markus Ambruster's comments for patch 1 > - capitalized some messages in patch 1 > - added R-b tags > > I've pushed this series to my 9p-next branch. Looks good, my R-by stands. Thanks!

Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer

2016-01-19 Thread Peter Maydell
On 19 January 2016 at 11:49, Christoffer Dall wrote: > The virt board has an arch timer, which is always on. Emit the > "always-on" property to indicate to Linux that it can switch off the > periodic timer and reduces the amount of interrupts injected into a > guest. > > Signed-off-by: Christoffe

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-19 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > >> That, and so the UI can use localization without corrupting other >> threads that MUST use the C locale (QMP parsing/output of floating point >> is particularly important to get right with '.' instead of ',' for a >> decimal separator). > > A quick look at the s

Re: [Qemu-devel] [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize

2016-01-19 Thread Eduardo Habkost
On Wed, Jan 06, 2016 at 04:45:01PM +0100, Gerd Hoffmann wrote: > > > > > > +static void (*i440fx_realize)(PCIDevice *pci_dev, Error **errp); > > > static void igd_pt_i440fx_realize(PCIDevice *pci_dev, Error **errp) > > > { > > > +Error *err = NULL; > > > uint32_t val = 0; > > > in

Re: [Qemu-devel] [PATCH] block: Clean up includes

2016-01-19 Thread Peter Maydell
On 19 January 2016 at 14:50, Kevin Wolf wrote: > Am 18.01.2016 um 19:01 hat Peter Maydell geschrieben: >> Clean up includes so that osdep.h is included first and headers >> which it implies are not included manually. >> >> This commit was created with scripts/clean-includes. >> >> Signed-off-by: P

Re: [Qemu-devel] [PATCH v4 2/2] iotests: Test that negative and large throttle values are rejected

2016-01-19 Thread Alberto Garcia
On Fri 15 Jan 2016 03:09:23 AM CET, Fam Zheng wrote: > echo > +echo === Catching negative/large throttling values === > +echo > + > +run_qemu -drive file="$TEST_IMG",iops=-1 > +run_qemu -drive file="$TEST_IMG",bps=-2 > +run_qemu -drive file="$TEST_IMG",bps_rd=-3 > +run_qemu -drive file="$TEST_IMG"

Re: [Qemu-devel] [PATCH v3 02/11] pc: remove has_igd_gfx_passthru global

2016-01-19 Thread Eduardo Habkost
On Tue, Jan 05, 2016 at 12:41:29PM +0100, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [RFC PATCH v2 04/10] pcie: Introduce function for DSN capability creation

2016-01-19 Thread Shmulik Ladkani
Hi Marcel, On Tue, 19 Jan 2016 16:26:31 +0200, marcel.apfelb...@gmail.com wrote: > > > > +/* DSN */ > > +#define PCI_DSN_VER 1 > > +#define PCI_DSN_SIZEOF 8 > > Are you sure the size of DSN is 8? > Looking at PCIe spec 3, chapter 7.12 I see 12, but I might be

Re: [Qemu-devel] [PATCH v4 1/2] blockdev: Error out on negative throttling option values

2016-01-19 Thread Alberto Garcia
On Mon 18 Jan 2016 02:09:22 AM CET, Fam Zheng wrote: >> > -error_setg(errp, "bps/iops/maxs values must be 0 or greater"); >> > +error_setg(errp, "bps/iops/max values must be within [0, %" PRId64 >> > + ")", (int64_t)THROTTLE_VALUE_MAX); >> >> I think that s

Re: [Qemu-devel] [RFC PATCH v2 04/10] pcie: Introduce function for DSN capability creation

2016-01-19 Thread Dmitry Fleytman
> On 19 Jan 2016, at 16:26 PM, Marcel Apfelbaum > wrote: > > On 01/18/2016 07:35 PM, Leonid Bloch wrote: >> From: Dmitry Fleytman >> >> Signed-off-by: Dmitry Fleytman >> Signed-off-by: Leonid Bloch >> --- >> hw/pci/pcie.c | 7 +++ >> include/hw/pci/pci_regs.h | 3 +++ >>

Re: [Qemu-devel] qxl : no mouse cursor with sdl2/gtk UI

2016-01-19 Thread nicolas prochazka
hello, however it "s working perfectly under windows81 Regards, Nicolas 2016-01-19 14:31 GMT+01:00 Gerd Hoffmann : > On Mo, 2016-01-18 at 21:11 +0100, nicolas prochazka wrote: > > hello, > > > > my vm is starting with libvirt xml definition file. > > > > > > Qemu 2.4.0 > > > > using sdl2|gtk u

Re: [Qemu-devel] [PATCH] block: Clean up includes

2016-01-19 Thread Kevin Wolf
Am 18.01.2016 um 19:01 hat Peter Maydell geschrieben: > Clean up includes so that osdep.h is included first and headers > which it implies are not included manually. > > This commit was created with scripts/clean-includes. > > Signed-off-by: Peter Maydell > --- a/block/archipelago.c > +++ b/blo

Re: [Qemu-devel] [PATCH v17 0/9] Virtual Machine Generation ID

2016-01-19 Thread Igor Mammedov
Here is SSDT ASL diff with vmgenid device present that Laszlo's asked for: @@ -135,6 +135,11 @@ DefinitionBlock ("tests/acpi-test-data/pc/SSDT.aml", "SSDT", 1, "BOCHS ", "BXPCS }) } +Method (\_GPE._E00, 0, NotSerialized) // _Exx: Edge-Triggered GPE +{ +Notify (\_S

Re: [Qemu-devel] [RFC PATCH v2 04/10] pcie: Introduce function for DSN capability creation

2016-01-19 Thread Marcel Apfelbaum
On 01/18/2016 07:35 PM, Leonid Bloch wrote: From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/pci/pcie.c | 7 +++ include/hw/pci/pci_regs.h | 3 +++ include/hw/pci/pcie.h | 1 + include/hw/pci/pcie_regs.h | 4 4 files cha

Re: [Qemu-devel] usb-storage assertions

2016-01-19 Thread Gerd Hoffmann
Hi, > Whoops, sorry, should be 5.1/i386. On a 7.0 I observe same endless > loop as you do. Any chance the irq storm fix helps on 5.1 guests too? I've installed 5.1.6 on a (virtual) usb-stick hooked up via ehci. Works fine here, rebooted multiple times without any problems. cheers, Gerd

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-19 Thread Gerd Hoffmann
Hi, > That does feel safer, if you can find an efficient way to do the graphics. > A lot less code running with the privs of the qemu process. That is where it starts to become tricky ... On modern linux we can simply use dma-bufs. On older linux and generic posix (*bsd etc) we should be able

Re: [Qemu-devel] Klocwork and other Source Code Analysis users

2016-01-19 Thread Kiara Green
Greetings Did you had a chance to review my previous email. Please let me know if you have any query, so that I can help you with more relevant information. Looking forward to hear from you. Regards, Kiara From: Kiara Green [mailto:kiara.gr...@e-cloudbase.com] Sent: Thursday, Ja

Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer

2016-01-19 Thread Andrew Jones
On Tue, Jan 19, 2016 at 01:43:07PM +, Marc Zyngier wrote: > On 19/01/16 13:32, Andrew Jones wrote: > > On Tue, Jan 19, 2016 at 01:43:41PM +0100, Christoffer Dall wrote: > >> On Tue, Jan 19, 2016 at 01:37:16PM +0100, Andrew Jones wrote: > >>> On Tue, Jan 19, 2016 at 12:49:18PM +0100, Christoffer

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-19 Thread Daniel P. Berrange
On Mon, Jan 18, 2016 at 09:36:08AM -0500, Programmingkid wrote: > > On Jan 18, 2016, at 4:58 AM, Daniel P. Berrange wrote: > > > On Sun, Jan 17, 2016 at 05:23:44PM -0500, Programmingkid wrote: > >> I was wondering if you had problems compiling QEMU on Mac OS X recently. > >> On my system, the ch

Re: [Qemu-devel] [PATCH 01/10] virtio: move VirtQueueElement at the beginning of the structs

2016-01-19 Thread Cornelia Huck
On Tue, 19 Jan 2016 14:22:37 +0100 Paolo Bonzini wrote: > The next patch will make virtqueue_pop/vring_pop allocate memory for the > VirtQueueElement. In some cases (blk, scsi, gpu) the device wants to > extend VirtQueueElement with device-specific fields and, until now, the > place of the VirtQ

[Qemu-devel] [PATCH v3 2/3] curl: add support for HTTP authentication parameters

2016-01-19 Thread Daniel P. Berrange
If connecting to a web server which has authentication turned on, QEMU gets a 401 as curl has not been configured with any authentication credentials. This adds 4 new parameters to the curl block driver options, username, password-id, proxy-username and proxy-password-id. Passwords are provided us

[Qemu-devel] [PATCH v3 3/3] iscsi: add support for getting CHAP password via QCryptoSecret API

2016-01-19 Thread Daniel P. Berrange
The iSCSI driver currently accepts the CHAP password in plain text as a block driver property. This change adds a new "password-id" property that accepts the ID of a QCryptoSecret instance. $QEMU \ -object secret,id=sec0,filename=/home/berrange/example.pw \ -drive driver=iscsi,url=iscs

[Qemu-devel] [PATCH v3 1/3] rbd: add support for getting password from QCryptoSecret object

2016-01-19 Thread Daniel P. Berrange
Currently RBD passwords must be provided on the command line via $QEMU -drive file=rbd:pool/image:id=myname:\ key=QVFDVm41aE82SHpGQWhBQXEwTkN2OGp0SmNJY0UrSE9CbE1RMUE=:\ auth_supported=cephx This is insecure because the key is visible in the OS process listing. Thi

[Qemu-devel] [PATCH v3 0/3] Use QCryptoSecret for block device passwords

2016-01-19 Thread Daniel P. Berrange
This series was previously posted: v1: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg04365.html v2: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03809.html The RBD, Curl and iSCSI block device drivers all need the ability to accept a password to authenticate with the re

Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer

2016-01-19 Thread Marc Zyngier
On 19/01/16 13:32, Andrew Jones wrote: > On Tue, Jan 19, 2016 at 01:43:41PM +0100, Christoffer Dall wrote: >> On Tue, Jan 19, 2016 at 01:37:16PM +0100, Andrew Jones wrote: >>> On Tue, Jan 19, 2016 at 12:49:18PM +0100, Christoffer Dall wrote: The virt board has an arch timer, which is always on

Re: [Qemu-devel] [RFC PATCH v2 02/10] pci: Introduce function for PCI PM capability creation

2016-01-19 Thread Dmitry Fleytman
> On 19 Jan 2016, at 12:36 PM, Marcel Apfelbaum > wrote: > > On 01/18/2016 07:35 PM, Leonid Bloch wrote: >> From: Dmitry Fleytman >> >> Signed-off-by: Dmitry Fleytman >> Signed-off-by: Leonid Bloch >> --- >> hw/pci/pci.c | 21 + >> include/hw/pci/pci.h

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-19 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > Hi, > > > That, and so the UI can use localization without corrupting other > > threads that MUST use the C locale (QMP parsing/output of floating point > > is particularly important to get right with '.' instead of ',' for a > > decimal separator). >

Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer

2016-01-19 Thread Andrew Jones
On Tue, Jan 19, 2016 at 01:43:41PM +0100, Christoffer Dall wrote: > On Tue, Jan 19, 2016 at 01:37:16PM +0100, Andrew Jones wrote: > > On Tue, Jan 19, 2016 at 12:49:18PM +0100, Christoffer Dall wrote: > > > The virt board has an arch timer, which is always on. Emit the > > > "always-on" property to

Re: [Qemu-devel] qxl : no mouse cursor with sdl2/gtk UI

2016-01-19 Thread Gerd Hoffmann
On Mo, 2016-01-18 at 21:11 +0100, nicolas prochazka wrote: > hello, > > my vm is starting with libvirt xml definition file. > > > Qemu 2.4.0 > > using sdl2|gtk ui ( not using spice client) > Qxl video card is necessary for dual monitor configuration under > windows OS . Dual monitor wi

Re: [Qemu-devel] [PATCH 01/10] virtio: move VirtQueueElement at the beginning of the structs

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 13:09, Cornelia Huck wrote: >> > The next patch will make virtqueue_pop/vring_pop allocate memory for a > s/will make/will make it possible for/ > > ? This patch will actually do that. This patch makes it possible. > I had to spend some time grepping through the code to find tha

Re: [Qemu-devel] [PATCH v4 0/4] Convert chardevs to QIOChannel & add TLS support

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 12:14, Daniel P. Berrange wrote: > This is an update of patches previously shown in an RFC posting > > RFC: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg00829.html >v1: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04222.html >v2: https://lists.gnu.or

Re: [Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 13:22, Cornelia Huck wrote: > > The patch is pretty large, but changes to each device are testable > > more or less independently. Splitting it would mostly add churn. > > Would it help to add a no-frills virtqueue_pop() version that simply > allocates the base VirtQueueElement an

[Qemu-devel] [PATCH v3 11/13] nbd: enable use of TLS with NBD block driver

2016-01-19 Thread Daniel P. Berrange
This modifies the NBD driver so that it is possible to request use of TLS. This is done by providing the 'tls-creds' parameter with the ID of a previously created QCryptoTLSCreds object. For example $QEMU -object tls-creds-x509,id=tls0,endpoint=client,\ dir=/home/berrange/securi

[Qemu-devel] [PATCH v3 09/13] nbd: pick first exported volume if no export name is requested

2016-01-19 Thread Daniel P. Berrange
The NBD client is currently only capable of using the new style protocol negotiation if an explicit export name is provided. This is a problem, because TLS support will require use of the new style protocol in all cases, and we wish to keep the export name as an optional request for backwards compa

[Qemu-devel] [PATCH v3 12/13] nbd: enable use of TLS with qemu-nbd server

2016-01-19 Thread Daniel P. Berrange
This modifies the qemu-nbd program so that it is possible to request the use of TLS with the server. It simply adds a new command line option --tls-creds which is used to provide the ID of a QCryptoTLSCreds object previously created via the --object command line option. For example qemu-nbd --o

[Qemu-devel] [PATCH] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-01-19 Thread Laszlo Ersek
The start_xmit() and e1000_receive_iov() functions implement DMA transfers iterating over a set of descriptors that the guest's e1000 driver prepares: - the TDLEN and RDLEN registers store the total size of the descriptor area, - while the TDH and RDH registers store the offset (in whole tx / r

[Qemu-devel] [PATCH v3 10/13] nbd: implement TLS support in the protocol negotiation

2016-01-19 Thread Daniel P. Berrange
This extends the NBD protocol handling code so that it is capable of negotiating TLS support during the connection setup. This involves requesting the STARTTLS protocol option before any other NBD options. Signed-off-by: Daniel P. Berrange --- block/nbd-client.c | 12 +++-- blockdev-nbd.c

[Qemu-devel] [PATCH v3 04/13] nbd: convert to using I/O channels for actual socket I/O

2016-01-19 Thread Daniel P. Berrange
Now that all callers are converted to use I/O channels for initial connection setup, it is possible to switch the core NBD protocol handling core over to use QIOChannel APIs for actual sockets I/O. Signed-off-by: Daniel P. Berrange --- block/nbd-client.c | 19 +++ blockdev-nbd.c | 6

[Qemu-devel] [PATCH v3 13/13] nbd: enable use of TLS with nbd-server-start command

2016-01-19 Thread Daniel P. Berrange
This modifies the nbd-server-start QMP command so that it is possible to request use of TLS. This is done by adding a new optional parameter "tls-creds" which provides the ID of a previously created QCryptoTLSCreds object instance. TLS is only supported when using an IPv4/IPv6 socket listener. Si

[Qemu-devel] [PATCH v3 05/13] nbd: invert client logic for negotiating protocol version

2016-01-19 Thread Daniel P. Berrange
The nbd_receive_negotiate() method takes different code paths based on whether 'name == NULL', and then checks the expected protocol version in each branch. This patch inverts the logic, so that it takes different code paths based on what protocol version it receives and then checks if name is NUL

[Qemu-devel] [PATCH v3 01/13] nbd: convert block client to use I/O channels for connection setup

2016-01-19 Thread Daniel P. Berrange
This converts the NBD block driver client to use the QIOChannelSocket class for initial connection setup. The NbdClientSession struct has two pointers, one to the master QIOChannelSocket providing the raw data channel, and one to a QIOChannel which is the current channel used for I/O. Initially the

[Qemu-devel] [PATCH v3 08/13] nbd: allow setting of an export name for qemu-nbd server

2016-01-19 Thread Daniel P. Berrange
The qemu-nbd server currently always uses the old style protocol since it never sets any export name. This is a problem because future TLS support will require use of the new style protocol negotiation. This adds a "--exportname NAME" argument to qemu-nbd which allows the user to set an explicit e

[Qemu-devel] [PATCH v3 06/13] nbd: make server compliant with fixed newstyle spec

2016-01-19 Thread Daniel P. Berrange
If the client does not request the fixed new style protocol, then we should only accept NBD_OPT_EXPORT_NAME. All other options are only valid when fixed new style has been activated. The qemu-nbd client doesn't currently request fixed new style protocol, but this change won't break qemu-nbd, becau

[Qemu-devel] [PATCH v3 00/13] Implement TLS support to QEMU NBD server & client

2016-01-19 Thread Daniel P. Berrange
This is an update of the series previously posted: v1: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg06126.html v2: https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg01580.html This series of patches implements support for TLS in the QEMU NBD server and client code. It is i

[Qemu-devel] [PATCH v3 07/13] nbd: make client request fixed new style if advertized

2016-01-19 Thread Daniel P. Berrange
If the server advertizes support for the fixed new style negotiation, the client should in turn enable new style. This will allow the client to negotiate further NBD options besides the export name. Signed-off-by: Daniel P. Berrange --- nbd/client.c | 27 +-- 1 file chang

[Qemu-devel] [PATCH v3 03/13] nbd: convert blockdev NBD server to use I/O channels for connection setup

2016-01-19 Thread Daniel P. Berrange
This converts the blockdev NBD server to use the QIOChannelSocket class for initial listener socket setup and accepting of client connections. Actual I/O is still being performed against the socket file descriptor using the POSIX socket APIs. Signed-off-by: Daniel P. Berrange --- blockdev-nbd.c

[Qemu-devel] [PATCH v3 02/13] nbd: convert qemu-nbd server to use I/O channels for connection setup

2016-01-19 Thread Daniel P. Berrange
This converts the qemu-nbd server to use the QIOChannelSocket class for initial listener socket setup and accepting of client connections. Actual I/O is still being performed against the socket file descriptor using the POSIX socket APIs. In this initial conversion though, all I/O is still actuall

[Qemu-devel] [PATCH v17 9/9] pc/q53: by default put vmgenid device as an function of ISA bridge

2016-01-19 Thread Igor Mammedov
it will save a PCI slot that would be used otherwise. Signed-off-by: Igor Mammedov Suggested-by: Michael S. Tsirkin --- hw/i386/pc_piix.c | 12 hw/i386/pc_q35.c | 12 include/hw/i386/ich9.h | 3 ++- include/hw/i386/pc.h | 1 + 4 files changed, 27 inserti

[Qemu-devel] [PATCH v17 7/9] add MachineClass->default_props for setting default device properties

2016-01-19 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/boards.h | 1 + vl.c| 4 2 files changed, 5 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 0f30959..d495611 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -90,6 +90,7 @@ struct MachineClas

[Qemu-devel] [PATCH v17 8/9] pc: put PIIX3 in slot 1 explicitly and cleanup functions assignment

2016-01-19 Thread Igor Mammedov
currently slot for PIIX3 bridge is selected dynamically but it's always in slot 1 for existing machine types. However it's easy to regress if another PCI device were added before PIIX3 is created and also requires passing around devfn of the created bridge. Replace dynamic slot assignment with a st

[Qemu-devel] [PATCH v17 5/9] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands

2016-01-19 Thread Igor Mammedov
Add commands to query Virtual Machine Generation ID counter. QMP command example: { "execute": "query-vm-generation-id" } HMP command example: info vm-generation-id Signed-off-by: Igor Mammedov --- hmp-commands-info.hx | 13 + hmp.c| 9 + hmp.h

[Qemu-devel] [PATCH v17 4/9] tests: add a unit test for the vmgenid device.

2016-01-19 Thread Igor Mammedov
* test that guest can read UUID provided on CLI from buffer accessing it at HPA which is available via 'vmgid-addr' property when device is inintialized. * test setting UUID at runtime and check that it's updated at expected HPA. Signed-off-by: Gal Hammer Signed-off-by: Igor Mammedov ---

[Qemu-devel] [PATCH v17 2/9] docs: vm generation id device's description

2016-01-19 Thread Igor Mammedov
From: Gal Hammer Signed-off-by: Gal Hammer Signed-off-by: Igor Mammedov --- docs/specs/vmgenid.txt | 36 1 file changed, 36 insertions(+) create mode 100644 docs/specs/vmgenid.txt diff --git a/docs/specs/vmgenid.txt b/docs/specs/vmgenid.txt new file mode

[Qemu-devel] [PATCH v17 6/9] qmp/hmp: add set-vm-generation-id commands

2016-01-19 Thread Igor Mammedov
Add set-vm-generation-id command to set Virtual Machine Generation ID counter. QMP command example: { "execute": "set-vm-generation-id", "arguments": { "uuid": "324e6eaf-d1d1-4bf6-bf41-b9bb6c91fb87" } } HMP command example: set-vm-generation-id 324e6e

[Qemu-devel] [PATCH v17 3/9] pc: add a Virtual Machine Generation ID device

2016-01-19 Thread Igor Mammedov
Based on Microsoft's specifications (paper can be downloaded from http://go.microsoft.com/fwlink/?LinkId=260709, easily found by "Virtual Machine Generation ID" keywords), add a PCI device with corresponding description in SSDT ACPI table. The GUID is set using "vmgenid.uuid" property. Example of

[Qemu-devel] [PATCH v17 1/9] acpi: extend ACPI interface to provide access to ACPI registers and SCI irq

2016-01-19 Thread Igor Mammedov
so that we don't have to always add proxy wrappers in piix4pm/ich9 to access ACPI regs and SCI kept in piix4pm/lcp_ich9 devices and call acpi_foo() API directly. Signed-off-by: Igor Mammedov --- hw/acpi/piix4.c | 17 + hw/isa/lpc_ich9.c| 1

[Qemu-devel] [PATCH v17 0/9] Virtual Machine Generation ID

2016-01-19 Thread Igor Mammedov
It's respin of v14* series which uses a PCI BAR to map VGID page in guest AS. Changes since v14: - statically reserve used BAR resources in SSDT, so that Windows won't claim them during PCI rebalancing - support VGID page in high mem in addition to low mem - add QMP/HMP interfaces to get

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-19 Thread Gerd Hoffmann
Hi, > That, and so the UI can use localization without corrupting other > threads that MUST use the C locale (QMP parsing/output of floating point > is particularly important to get right with '.' instead of ',' for a > decimal separator). A quick look at the setlocale manpage doesn't make clea

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-19 Thread Kevin Wolf
Am 18.01.2016 um 10:54 hat Gerd Hoffmann geschrieben: > Hi folks, > > I'm starting to investigate if and how we can move the user interface > code into its own thread instead of running it in the iothread and > therefore avoid blocking the guest in case some UI actions take a little > longer. >

[Qemu-devel] [PATCH v2 1/2] 9pfs: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
Reviewed-by: Markus Armbruster Signed-off-by: Greg Kurz --- hw/9pfs/9p-handle.c |5 +++-- hw/9pfs/9p-local.c | 15 --- hw/9pfs/9p-proxy.c | 12 ++-- hw/9pfs/9p.c|2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/9pfs/9p-handle.c b

[Qemu-devel] [PATCH v2 2/2] fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
Only fix the code that gets built into QEMU. Reviewed-by: Markus Armbruster Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ccfec139ab2b..55e2f7a0fb58 100644 --- a/fsdev/q

[Qemu-devel] [PATCH v2 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
This v2 does the following: - addresses Markus Ambruster's comments for patch 1 - capitalized some messages in patch 1 - added R-b tags I've pushed this series to my 9p-next branch. Thanks ! -- Greg --- Greg Kurz (2): 9pfs: use error_report() instead of fprintf(stderr) fsdev: use e

Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer

2016-01-19 Thread Christoffer Dall
On Tue, Jan 19, 2016 at 01:37:16PM +0100, Andrew Jones wrote: > On Tue, Jan 19, 2016 at 12:49:18PM +0100, Christoffer Dall wrote: > > The virt board has an arch timer, which is always on. Emit the > > "always-on" property to indicate to Linux that it can switch off the > > periodic timer and reduc

Re: [Qemu-devel] [PATCH 04/10] virtio: introduce virtqueue_alloc_element

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:52 +0100 Paolo Bonzini wrote: > Allocate the arrays for in_addr/out_addr/in_sg/out_sg outside the > VirtQueueElement. For now, virtqueue_pop and vring_pop keep > allocating a very large VirtQueueElement. > > Signed-off-by: Paolo Bonzini > --- > hw/virtio/dataplane/vr

Re: [Qemu-devel] [PATCH v2] pc: allow raising low memory via max-ram-below-4g option

2016-01-19 Thread Eduardo Habkost
On Fri, Jan 08, 2016 at 01:58:03PM +0100, Gerd Hoffmann wrote: > This patch extends the functionality of the max-ram-below-4g option > to also allow increasing lowmem. Use case: Give as much memory as > possible to legacy non-PAE guests. > > While being at it also rework the lowmem calculation lo

Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer

2016-01-19 Thread Andrew Jones
On Tue, Jan 19, 2016 at 12:49:18PM +0100, Christoffer Dall wrote: > The virt board has an arch timer, which is always on. Emit the > "always-on" property to indicate to Linux that it can switch off the > periodic timer and reduces the amount of interrupts injected into a > guest. > > Signed-off-b

Re: [Qemu-devel] [PATCH 03/10] virtio: introduce qemu_get/put_virtqueue_element

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:51 +0100 Paolo Bonzini wrote: > Move allocation to virtio functions also when loading/saving a > VirtQueueElement. This will also let the load/save functions > keep backwards compatibility when the VirtQueueElement layout > is changed. > > Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCHv4 0/8] Cleanups to error reporting on ppc and spapr

2016-01-19 Thread Markus Armbruster
David Gibson writes: > Another spin of my patches to clean up a bunch of error reporting in > the pseries machine type and target-ppc code, to better use the error > API. > > Once reviewed, I hope to merge this into ppc-for-2.6 shortly. Thanks for helping with error cleanup. > Changes in v4: >

Re: [Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:50 +0100 Paolo Bonzini wrote: > The return code of virtqueue_pop/vring_pop is unused except to check for > errors or 0. We can thus easily move allocation inside the functions > and just return a pointer to the VirtQueueElement. Like this change. > > The advantage is

Re: [Qemu-devel] [PATCHv4 8/8] pseries: Clean up error reporting in htab migration functions

2016-01-19 Thread Markus Armbruster
David Gibson writes: > On Tue, Jan 19, 2016 at 08:44:51AM +0100, Markus Armbruster wrote: >> David Gibson writes: >> >> > The functions for migrating the hash page table on pseries machine type >> > (htab_save_setup() and htab_load()) can report some errors with an >> > explicit fprintf() befor

Re: [Qemu-devel] [PATCH 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Markus Armbruster
Greg Kurz writes: > On Mon, 18 Jan 2016 17:39:28 +0100 > Markus Armbruster wrote: > >> Greg Kurz writes: >> >> > Hi, >> > >> > This series moves all the 9pfs/fsdev code to use error_report(), with the >> > notable exception of virtfs-proxy-helper, which doesn't need it. >> > >> > Markus, >> >

Re: [Qemu-devel] [PATCH v2] Add optionrom compatible with fw_cfg DMA version

2016-01-19 Thread Gerd Hoffmann
Hi, > > > +if (fw_cfg_dma_enabled(fw_cfg)) { > > > +option_rom[nb_option_roms].name = "linuxboot_dma.bin"; > > > +option_rom[nb_option_roms].bootindex = 0; > > > +} else { > > > +option_rom[nb_option_roms].name = "linuxboot.bin"; > > > +option_rom[nb_optio

Re: [Qemu-devel] [PATCH 01/10] virtio: move VirtQueueElement at the beginning of the structs

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:49 +0100 Paolo Bonzini wrote: > The next patch will make virtqueue_pop/vring_pop allocate memory for a s/will make/will make it possible for/ ? I had to spend some time grepping through the code to find that blk and scsi (and gpu, which already had elem at the beginni

Re: [Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2016-01-19 Thread Greg Kurz
On Tue, 19 Jan 2016 11:55:10 +1100 David Gibson wrote: > On Mon, Jan 18, 2016 at 09:51:56AM +0100, Greg Kurz wrote: > > On Mon, 18 Jan 2016 13:16:44 +1100 > > David Gibson wrote: > > > > > On Fri, Jan 15, 2016 at 04:00:12PM +0100, Greg Kurz wrote: > > > > On VSX capable CPUs, the 32 FP regi

Re: [Qemu-devel] [PATCH 2/2] migration/virtio: Remove simple .get/.put use

2016-01-19 Thread Dr. David Alan Gilbert
* Sascha Silbe (si...@linux.vnet.ibm.com) wrote: > Dear David, > > "Dr. David Alan Gilbert" writes: > > > Can you try this and let me know if it fixes it for you; I've > > still not managed to persuade x86-64 to fail. > > With Conny's hint re. virtio-1 (thanks!) I managed to make it fail on >

[Qemu-devel] [PATCH] cpu: cpu_save/cpu_load is no more

2016-01-19 Thread Paolo Bonzini
Everything has been converted to vmstate. Signed-off-by: Paolo Bonzini --- exec.c| 6 -- include/qemu-common.h | 6 -- 2 files changed, 12 deletions(-) diff --git a/exec.c b/exec.c index 0d8ca3f..35705a1 100644 --- a/exec.c +++ b/exec.c @@ -628,12 +628,6 @@ void cpu_exec

Re: [Qemu-devel] [PATCH] nbd: use client_close() when negotiate phase fails

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 12:50, Daniel P. Berrange wrote: > When nbd_negotiate() fails, nbd_co_client_start() is > directly calling client->close(). This eventually > ends up calling nbd_client_put(), which does an > assert(client->closing). Unfortunately we have not > set the 'closing' flag, so the code no

Re: [Qemu-devel] [PATCH 3/5] ide: move buffered DMA cancel to core

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 05:51, John Snow wrote: > Buffered DMA cancellation was added to ATAPI devices and implemented > for the BMDMA HBA. Move the code over to common IDE code and allow > it to be used for any HBA. > > Signed-off-by: John Snow > --- > hw/ide/core.c | 45 +++

[Qemu-devel] [PATCH] nbd: use client_close() when negotiate phase fails

2016-01-19 Thread Daniel P. Berrange
When nbd_negotiate() fails, nbd_co_client_start() is directly calling client->close(). This eventually ends up calling nbd_client_put(), which does an assert(client->closing). Unfortunately we have not set the 'closing' flag, so the code now aborts. This bug was accidentally introduced in commit

[Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer

2016-01-19 Thread Christoffer Dall
The virt board has an arch timer, which is always on. Emit the "always-on" property to indicate to Linux that it can switch off the periodic timer and reduces the amount of interrupts injected into a guest. Signed-off-by: Christoffer Dall --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+)

Re: [Qemu-devel] [PATCH 1/5] ide: Prohibit RESET on IDE drives

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 05:51, John Snow wrote: > +/* Only RESET is allowed to an ATAPI device while BSY and/or DRQ are > set. */ > +if (s->status & (BUSY_STAT|DRQ_STAT)) { > +if (!(val == WIN_DEVICE_RESET) && (s->drive_kind == IDE_CD)) { I was going to complain about Pascal-ish parenthes

<    1   2   3   4   >