Re: [Qemu-devel] [PATCH 4/4] hw/ppc/spapr: Implement the h_page_init hypercall

2016-02-10 Thread Thomas Huth
On 11.02.2016 00:47, David Gibson wrote: > On Wed, Feb 10, 2016 at 07:09:12PM +0100, Thomas Huth wrote: >> This hypercall either initializes a page with zeros, or copies >> another page. >> According to LoPAPR, the i-cache of the page should also be >> flushed when using H_ICACHE_INVALIDATE or H_IC

Re: [Qemu-devel] [PATCH 1/4] hw/ppc/spapr: Add h_set_sprg0 hypercall

2016-02-10 Thread Thomas Huth
On 11.02.2016 00:30, David Gibson wrote: > On Wed, Feb 10, 2016 at 07:09:09PM +0100, Thomas Huth wrote: >> This is a very simple hypercall that only sets up the SPRG0 >> register for the guest (since writing to SPRG0 was only permitted >> to the hypervisor in older versions of the PowerISA). >> >>

Re: [Qemu-devel] [v10][PATCH 03/10] piix: create host bridge to passthrough

2016-02-10 Thread Alex Williamson
On Thu, 11 Feb 2016 02:25:51 + "Kay, Allen M" wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, February 09, 2016 10:01 PM > > To: Kay, Allen M > > Cc: ehabk...@redhat.com; m...@redhat.com; > > stefano.stabell...@eu.citrix.

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 10.02.2016 um 13:51 hat Pavel Dovgalyuk geschrieben: > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > Am 10.02.2016 um 13:05 hat Pavel Dovgalyuk geschrieben: > > > > > Am 09.02.2016 um 12:52 hat Pavel Dovgalyuk geschrieben: > > > > > > > From:

Re: [Qemu-devel] [PATCH] w32: include winsock2.h before windows.h

2016-02-10 Thread Michael Tokarev
09.02.2016 17:16, Paolo Bonzini wrote: > Recent Fedora complains while compiling ui/sdl.c: > > /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: > #warning Please include winsock2.h before windows.h [-Wcpp] > > And with this patch we dutifully obey. Applied to -trivia

Re: [Qemu-devel] [PATCH] char: fix repeated registration of tcp chardev I/O handlers

2016-02-10 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH] Adds keycode 86 to the hid_usage_keys translation table.

2016-02-10 Thread Michael Tokarev
04.02.2016 22:03, Daniel Serpell wrote: > This key is present in international keyboards, between left shift and > the 'Z' key, ant is described in the HID usage tables as "Keyboard > Non-US \ and |": http://www.usb.org/developers/hidpage/Hut1_12v2.pdf > > This patch fixes the usb-kbd devices. Ap

Re: [Qemu-devel] [v10][PATCH 03/10] piix: create host bridge to passthrough

2016-02-10 Thread Kay, Allen M
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, February 09, 2016 10:01 PM > To: Kay, Allen M > Cc: ehabk...@redhat.com; m...@redhat.com; > stefano.stabell...@eu.citrix.com; qemu-devel@nongnu.org; > pbonz...@redhat.com; r...@twiddle.net; R

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: skip configuration section during migration of older machines

2016-02-10 Thread David Gibson
On Wed, Feb 10, 2016 at 09:26:12PM +0100, Greg Kurz wrote: > On Mon, 08 Feb 2016 16:59:47 +0100 > Greg Kurz wrote: > > Since QEMU 2.4, we have a configuration section in the migration stream. > > This must be skipped for older machines, like it is already done for x86. > > > > Ouch ! It is more

Re: [Qemu-devel] [PATCH] migration: ensure htab_save_first completes after timeout

2016-02-10 Thread David Gibson
On Wed, Feb 10, 2016 at 10:20:40AM -0800, Jianjun Duan wrote: > htab_save_first_pass could return without finishing its work due to > timeout. The patch checks if another invocation of it is necessary and > will call it in htab_save_complete if necessary. > > Signed-off-by: Jianjun Duan Looks go

Re: [Qemu-devel] [PATCHv2 0/7] Cleanups to Hash Page Table handling

2016-02-10 Thread David Gibson
On Tue, Feb 09, 2016 at 12:12:19PM +1000, David Gibson wrote: > This contains some assorted cleanups and small improvements to the > management of the Hash Page Table for 64-bit ppc systems, and the > "pseries" machine type in particular. > > These were devised in the context of getting hash page

Re: [Qemu-devel] [PATCH] migration: reorder code to make it symmetric

2016-02-10 Thread Wei Yang
Hello everyone, Is this one correct? On Thu, Feb 04, 2016 at 10:50:30PM +, Wei Yang wrote: >In qemu_savevm_state_complete_precopy(), it iterates on each device to add >a json object and transfer related status to destination, while the order >of the last two steps could be refined. > >Current

[Qemu-devel] [PATCH] vfio/pci: replace 1 with PCI_CAP_LIST_NEXT to make code self-explain

2016-02-10 Thread Wei Yang
Use the macro PCI_CAP_LIST_NEXT instead of 1, so that the code would be more self-explain. This patch makes this change and also fixs one typo in comment. Signed-off-by: Wei Yang --- hw/vfio/pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfi

Re: [Qemu-devel] [PATCH 1/4] hw/ppc/spapr: Add h_set_sprg0 hypercall

2016-02-10 Thread David Gibson
On Wed, Feb 10, 2016 at 07:09:09PM +0100, Thomas Huth wrote: > This is a very simple hypercall that only sets up the SPRG0 > register for the guest (since writing to SPRG0 was only permitted > to the hypervisor in older versions of the PowerISA). > > Signed-off-by: Thomas Huth > --- > hw/ppc/spa

Re: [Qemu-devel] [PATCH 4/4] hw/ppc/spapr: Implement the h_page_init hypercall

2016-02-10 Thread David Gibson
On Wed, Feb 10, 2016 at 07:09:12PM +0100, Thomas Huth wrote: > This hypercall either initializes a page with zeros, or copies > another page. > According to LoPAPR, the i-cache of the page should also be > flushed when using H_ICACHE_INVALIDATE or H_ICACHE_SYNCHRONIZE, > but this is currently only

Re: [Qemu-devel] [PATCH 2/4] hw/ppc/spapr: Implement h_set_dabr

2016-02-10 Thread David Gibson
On Wed, Feb 10, 2016 at 07:09:10PM +0100, Thomas Huth wrote: > According to LoPAPR, h_set_dabr should simply set DABRX to 3 > (if the register is available), and load the parameter into DABR. > If DABRX is not available, the hypervisor has to check the > "Breakpoint Translation" bit of the DABR reg

Re: [Qemu-devel] [PATCH 3/4] hw/ppc/spapr: Implement the h_set_xdabr hypercall

2016-02-10 Thread David Gibson
On Wed, Feb 10, 2016 at 07:09:11PM +0100, Thomas Huth wrote: > The H_SET_XDABR hypercall is similar to H_SET_DABR, but also sets > the extended DABR (DABRX) register. > > Signed-off-by: Thomas Huth > --- > hw/ppc/spapr_hcall.c | 22 ++ > 1 file changed, 22 insertions(+) > >

Re: [Qemu-devel] [PATCH] memory: fix usage of find_next_bit and find_next_zero_bit

2016-02-10 Thread Peter Maydell
On 10 February 2016 at 14:11, Paolo Bonzini wrote: > The last two arguments to these functions are the last and first bit to > check relative to the base. The code was using incorrectly the first > bit and the number of bits. Fix this in cpu_physical_memory_get_dirty > and cpu_physical_memory_al

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: add _filter_qmp_events() for filtering out QMP events

2016-02-10 Thread Eric Blake
On 02/10/2016 11:52 AM, Sascha Silbe wrote: > Dear Max, > > Max Reitz writes: > >>> +# remove QMP events from output >>> +_filter_qmp_events() >>> +{ >>> +sed -e '/^{\(.*, \)"event": ".*}$/ d' >>> +} >> >> There is a pretty good reason test 067 uses -qmp-pretty (as you yourself >> say, the l

Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT

2016-02-10 Thread John Snow
On 02/10/2016 12:33 PM, Roman Kagan wrote: > On Wed, Feb 10, 2016 at 12:16:32PM -0500, John Snow wrote: >> On 02/10/2016 12:10 PM, Roman Kagan wrote: >>> Well, as I wrote in another mail, SeaBIOS, which is supposed to provide >>> the same information to int 0x13/0x08, populates it with static dat

Re: [Qemu-devel] commit 5b82b70 boot problems

2016-02-10 Thread Paolo Bonzini
On 10/02/2016 20:26, Gabriel L. Somlo wrote: > Hi Stefan, > > After pulling from upstream this morning, my guest VMs were no longer > able to boot. For instance, running something like > > bin/qemu-system-x86_64 -machine q35,accel=kvm -m 2048 -monitor stdio \ > -device ide-drive,bus=ide.2,dri

Re: [Qemu-devel] [PULL v3 00/33] Misc patches for 2016-02-08

2016-02-10 Thread Paolo Bonzini
On 10/02/2016 20:16, John Snow wrote: > > jsnow@scv ((977a82a...)) ~/s/q/b/git> ../../configure --cxx=clang++ > --cc=clang --host-cc=clang --extra-cflags=-Werror > --extra-cflags=-fsanitize=undefined > --extra-cflags=-Wno-deprecated-declarations > --extra-cflags=-fno-sanitize=float-divide-by-zer

Re: [Qemu-devel] [PATCH] migration: ensure htab_save_first completes after timeout

2016-02-10 Thread Michael Roth
Quoting Jianjun Duan (2016-02-10 12:20:40) > htab_save_first_pass could return without finishing its work due to > timeout. The patch checks if another invocation of it is necessary and > will call it in htab_save_complete if necessary. > > Signed-off-by: Jianjun Duan Reviewed-by: Michael Roth

[Qemu-devel] [PATCH] migration: ensure htab_save_first completes after timeout

2016-02-10 Thread Jianjun Duan
htab_save_first_pass could return without finishing its work due to timeout. The patch checks if another invocation of it is necessary and will call it in htab_save_complete if necessary. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) d

[Qemu-devel] [PATCH v7 1/5] fw_cfg: expose control register size in fw_cfg.h

2016-02-10 Thread Gabriel L. Somlo
Expose the size of the control register (FW_CFG_CTL_SIZE) in fw_cfg.h. Add comment to fw_cfg_io_realize() pointing out that since the 8-bit data register is always subsumed by the 16-bit control register in the port I/O case, we use the control register width as the *total* width of the (classic, n

[Qemu-devel] [PATCH v7 4/5] acpi: arm: add fw_cfg device node to dsdt

2016-02-10 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI DSDT. This is mostly informational, as the authoritative fw_cfg MMIO region(s) are listed in the Device Tree. However, since we are building ACPI tables, we might as well be thorough while at it... Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Tested

[Qemu-devel] [PATCH v7 3/5] acpi: pc: add fw_cfg device node to ssdt

2016-02-10 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI SSDT. While the guest-side firmware can't utilize this information (since it has to access the hard-coded fw_cfg device to extract ACPI tables to begin with), having fw_cfg listed in ACPI will help the guest kernel keep a more accurate inventory of in-use IO por

[Qemu-devel] [PATCH v7 2/5] pc: fw_cfg: move ioport base constant to pc.h

2016-02-10 Thread Gabriel L. Somlo
Move BIOS_CFG_IOPORT define from pc.c to pc.h, and rename it to FW_CFG_IO_BASE. Cc: Marc Marí Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Reviewed-by: Marc Marí --- hw/i386/pc.c | 5 ++--- include/hw/i386/pc.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff -

[Qemu-devel] [PATCH v7 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-10 Thread Gabriel L. Somlo
Generate an ACPI DSDT node for fw_cfg on pc and arm guests. New since v6: - rebased to fit on top of fb306ff and f264d36, which moved things around in pc's acpi-build.c (only patch 3/5 affected); - kernel-side fw_cfg sysfs driver accepted into upstream linux Thanks, --G

[Qemu-devel] [PATCH v7 5/5] fw_cfg: document ACPI device node information

2016-02-10 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Reviewed-by: Marc Marí --- docs/specs/fw_cfg.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/specs/fw_cfg.txt b/docs/specs/fw_cfg.txt index 2099ad9..5414140 100644 --- a/docs/specs/fw_cfg.txt +++ b/docs/specs/fw_cfg.tx

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: skip configuration section during migration of older machines

2016-02-10 Thread Greg Kurz
On Mon, 08 Feb 2016 16:59:47 +0100 Greg Kurz wrote: > Since QEMU 2.4, we have a configuration section in the migration stream. > This must be skipped for older machines, like it is already done for x86. > Ouch ! It is more complex than I thought... the migration of pseries-2.3 machine is already

Re: [Qemu-devel] [PATCH] linux-user: Don't assert if guest tries shmdt(0)

2016-02-10 Thread Peter Maydell
On 10 February 2016 at 18:39, Laurent Vivier wrote: > > > Le 09/02/2016 16:57, Peter Maydell a écrit : >> Our implementation of shmat() and shmdt() for linux-user was >> using "zero guest address" as its marker for "entry in the >> shm_regions[] array is not in use". This meant that if the >> gues

[Qemu-devel] [PULL 11/11] ahci: prohibit "restarting" the FIS or CLB engines

2016-02-10 Thread John Snow
If the FIS or DMA engines are already started, do not allow them to be "restarted." As a side-effect of this change, the migration post-load routine must be modified to cope. If the engines are listed as "on" in the migrated registers, they must be cleared to allow the startup routine to see the tr

[Qemu-devel] [PULL 08/11] ahci: Do not unmap NULL addresses

2016-02-10 Thread John Snow
Definitely don't try to unmap a garbage address. Reported-by: Zuozhi fzz Signed-off-by: John Snow Message-id: 1454103689-13042-2-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7e87b18..3a95dad 100

[Qemu-devel] [PULL 07/11] fdc: always compile-check debug prints

2016-02-10 Thread John Snow
Coverity noticed that some variables are only used by debug prints, and called them unused. Always compile the print statements. While we're here, print to stderr as well. Bonus: Fix a debug printf I broke in f31937aa8 Signed-off-by: John Snow Reviewed-by: Eric Blake [Touched up commit message.

[Qemu-devel] [PULL 00/11] Ide patches

2016-02-10 Thread John Snow
The following changes since commit c9f19dff101e2c2cf3fa3967eceec2833e845e40: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-02-09 19:34:46 +) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request for you to

[Qemu-devel] [PULL 09/11] ahci: handle LIST_ON and FIS_ON in map helpers

2016-02-10 Thread John Snow
Instead of relying on ahci_cond_start_engines to maintain the engine status indicators itself, have the lower-layer CLB and FIS mapper helpers do it themselves. This makes the cond_start routine slightly nicer to read, and makes sure that the status indicators will always be correct. Signed-off-b

[Qemu-devel] [PULL 06/11] ide: fix device_reset to not ignore pending AIO

2016-02-10 Thread John Snow
Signed-off-by: John Snow Reported-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Message-id: 1453225191-11871-7-git-send-email-js...@redhat.com --- hw/ide/core.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 3c

[Qemu-devel] [PULL 10/11] ahci: explicitly reject bad engine states on post_load

2016-02-10 Thread John Snow
Currently, we let ahci_cond_start_engines reject weird configurations where either the DMA (CLB) or FIS engines are said to be started, but their matching on/off control bit is toggled off. There should be no way to achieve this, since any time you toggle the control bit off, the status bit should

[Qemu-devel] [PULL 05/11] ide: Add silent DRQ cancellation

2016-02-10 Thread John Snow
Split apart the ide_transfer_stop function into two versions: one that interrupts and one that doesn't. The one that doesn't can be used to halt any PIO transfers that are in the DRQ phase. It will not halt any PIO transfers that are currently in the process of buffering data for the guest to read.

[Qemu-devel] [PULL 00/11] Ide patches

2016-02-10 Thread John Snow
The following changes since commit c9f19dff101e2c2cf3fa3967eceec2833e845e40: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-02-09 19:34:46 +) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request for you to

[Qemu-devel] [PULL 01/11] ide: Prohibit RESET on IDE drives

2016-02-10 Thread John Snow
This command is meant for ATAPI devices only, prohibit acknowledging it with a command aborted response when an IDE device is busy. Signed-off-by: John Snow Reported-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Message-id: 1453225191-11871-2-git-send-email-js...@redhat.com --- hw/ide/core.c | 1

[Qemu-devel] [PULL 03/11] ide: move buffered DMA cancel to core

2016-02-10 Thread John Snow
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 Reported-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Message-id: 1453225191-11871-4-git-send-email-js...@re

[Qemu-devel] [PULL 02/11] ide: code motion

2016-02-10 Thread John Snow
Shuffle the reset function upwards. Signed-off-by: John Snow Reported-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Message-id: 1453225191-11871-3-git-send-email-js...@redhat.com --- hw/ide/core.c | 116 +- 1 file changed, 58 insertions(+),

[Qemu-devel] [PULL 04/11] ide: replace blk_drain_all by blk_drain

2016-02-10 Thread John Snow
Target the drain for just one device. Signed-off-by: John Snow Reported-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Message-id: 1453225191-11871-5-git-send-email-js...@redhat.com --- hw/ide/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw/ide/core.c

[Qemu-devel] make distclean can fail do to a configuration check

2016-02-10 Thread John Snow
Stuff like this: > ~/s/q/b/git> make distclean > config-host.mak is out-of-date, running configure > > ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. >You probably need to set PKG_CONFIG_LIBDIR >to point to the right pkg-config files for your >build target > > Make

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: 140: use virtio-scsi instead of IDE

2016-02-10 Thread Sascha Silbe
Dear Max, Max Reitz writes: [tests/qemu-iotests/140] >> -_launch_qemu -drive >> if=ide,media=cdrom,id=drv,file="$TEST_IMG",format=$IMGFMT \ >> -2> >(_filter_nbd) >> +_launch_qemu -drive >> if=none,media=cdrom,id=drv,file="$TEST_IMG",format=$IMGFMT \ >> +-device virtio-scsi -device scsi

[Qemu-devel] commit 5b82b70 boot problems

2016-02-10 Thread Gabriel L. Somlo
Hi Stefan, After pulling from upstream this morning, my guest VMs were no longer able to boot. For instance, running something like bin/qemu-system-x86_64 -machine q35,accel=kvm -m 2048 -monitor stdio \ -device ide-drive,bus=ide.2,drive=CD \ -drive id=CD,if=none,snapshot=on,file=Fedora-Live-W

Re: [Qemu-devel] [PULL v3 00/33] Misc patches for 2016-02-08

2016-02-10 Thread John Snow
On 02/10/2016 07:48 AM, Paolo Bonzini wrote: > > > On 09/02/2016 17:13, Paolo Bonzini wrote: >> The following changes since commit ac1be2ae6b2995b99430c48329eb971b0281acf1: >> >> Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-02-09' >> into staging (2016-02-09 11:42:43 +000

Re: [Qemu-devel] [PATCH v2] linux-user: add option to intercept execve() syscalls

2016-02-10 Thread Laurent Vivier
Le 27/01/2016 09:49, Petros Angelatos a écrit : > From: Petros Angelatos > > In order for one to use QEMU user mode emulation under a chroot, it is > required to use binfmt_misc. This can be avoided by QEMU never doing a > raw execve() to the host system. > > Introduce a new option, -execve, t

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: add _filter_qmp_events() for filtering out QMP events

2016-02-10 Thread Sascha Silbe
Dear Max, Max Reitz writes: >> +# remove QMP events from output >> +_filter_qmp_events() >> +{ >> +sed -e '/^{\(.*, \)"event": ".*}$/ d' >> +} > > There is a pretty good reason test 067 uses -qmp-pretty (as you yourself > say, the lines get pretty long otherwise, and if we have any change >

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

2016-02-10 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 v6 15/16] nbd: enable use of TLS with qemu-nbd server

2016-02-10 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 v6 14/16] nbd: enable use of TLS with NBD block driver

2016-02-10 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 v6 11/16] nbd: always query export list in fixed new style protocol

2016-02-10 Thread Daniel P. Berrange
With the new style protocol, the NBD client will currenetly send NBD_OPT_EXPORT_NAME as the first (and indeed only) option it wants. The problem is that the NBD protocol spec does not allow for returning an error message with the NBD_OPT_EXPORT_NAME option. So if the server mandates use of TLS, the

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

2016-02-10 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 v6 08/16] nbd: make server compliant with fixed newstyle spec

2016-02-10 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 v6 07/16] nbd: invert client logic for negotiating protocol version

2016-02-10 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 v6 12/16] nbd: use "" as a default export name if none provided

2016-02-10 Thread Daniel P. Berrange
If the user does not provide an export name and the server is running the new style protocol, where export names are mandatory, use "" as the default export name if the user has not specified any. "" is defined in the NBD protocol as the default name to use in such scenarios. Signed-off-by: Daniel

[Qemu-devel] [PATCH v6 06/16] nbd: convert to using I/O channels for actual socket I/O

2016-02-10 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 v6 10/16] nbd: allow setting of an export name for qemu-nbd server

2016-02-10 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 "--exportname NAME" / "-x NAME" arguments to qemu-nbd which allow the user to set an

[Qemu-devel] [PATCH v6 09/16] nbd: make client request fixed new style if advertized

2016-02-10 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 v6 01/16] qom: add helpers for UserCreatable object types

2016-02-10 Thread Daniel P. Berrange
The QMP monitor code has two helper methods object_add and qmp_object_del that are called from several places in the code (QMP, HMP and main emulator startup). The HMP and main emulator startup code also share further logic that extracts the qom-type & id values from a qdict. We soon need to use

[Qemu-devel] [PATCH v6 04/16] nbd: convert qemu-nbd server to use I/O channels for connection setup

2016-02-10 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 v6 05/16] nbd: convert blockdev NBD server to use I/O channels for connection setup

2016-02-10 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 v6 03/16] nbd: convert block client to use I/O channels for connection setup

2016-02-10 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 v6 02/16] qemu-nbd: add support for --object command line arg

2016-02-10 Thread Daniel P. Berrange
Allow creation of user creatable object types with qemu-nbd via a new --object command line arg. This will be used to supply passwords and/or encryption keys to the various block driver backends via the recently added 'secret' object type. # printf letmein > mypasswd.txt # qemu-nbd --object secr

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

2016-02-10 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 v3: https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03440.html v4: https:/

Re: [Qemu-devel] [PATCH] linux-user: Don't assert if guest tries shmdt(0)

2016-02-10 Thread Laurent Vivier
Le 09/02/2016 16:57, Peter Maydell a écrit : > Our implementation of shmat() and shmdt() for linux-user was > using "zero guest address" as its marker for "entry in the > shm_regions[] array is not in use". This meant that if the > guest did a shmdt(0) we would match on an unused array entry Is

Re: [Qemu-devel] [PATCH v5 6/9] qemu-log: new option -dfilter to limit output

2016-02-10 Thread Alex Bennée
Richard Henderson writes: > On 02/11/2016 04:40 AM, Alex Bennée wrote: >> OK I think this version is a lot cleaner: >> >>void qemu_set_dfilter_ranges(const char *filter_spec) >>{ >>gchar **ranges = g_strsplit(filter_spec, ",", 0); >>if (ranges) { >>gchar **nex

[Qemu-devel] [PATCH 0/4] hw/ppc/spapr: Add "Processor Register Hypervisor Resource Access" H-calls

2016-02-10 Thread Thomas Huth
While we were recently debugging a problem with the H_SET_DABR call [1], I noticed that some hypercalls from the chapter 14.5.4.3 ("Processor Register Hypervisor Resource Access") from the LoPAPR spec [2] are still missing in QEMU. So here's are some patches that implement these hypercalls. Linux a

[Qemu-devel] [PATCH 1/4] hw/ppc/spapr: Add h_set_sprg0 hypercall

2016-02-10 Thread Thomas Huth
This is a very simple hypercall that only sets up the SPRG0 register for the guest (since writing to SPRG0 was only permitted to the hypervisor in older versions of the PowerISA). Signed-off-by: Thomas Huth --- hw/ppc/spapr_hcall.c | 15 +-- 1 file changed, 13 insertions(+), 2 deleti

[Qemu-devel] [PATCH 3/4] hw/ppc/spapr: Implement the h_set_xdabr hypercall

2016-02-10 Thread Thomas Huth
The H_SET_XDABR hypercall is similar to H_SET_DABR, but also sets the extended DABR (DABRX) register. Signed-off-by: Thomas Huth --- hw/ppc/spapr_hcall.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 6b9d512..f14f849

[Qemu-devel] [PATCH 4/4] hw/ppc/spapr: Implement the h_page_init hypercall

2016-02-10 Thread Thomas Huth
This hypercall either initializes a page with zeros, or copies another page. According to LoPAPR, the i-cache of the page should also be flushed when using H_ICACHE_INVALIDATE or H_ICACHE_SYNCHRONIZE, but this is currently only done when running with TCG - assuming the cache will be flushed with KV

[Qemu-devel] [PATCH 2/4] hw/ppc/spapr: Implement h_set_dabr

2016-02-10 Thread Thomas Huth
According to LoPAPR, h_set_dabr should simply set DABRX to 3 (if the register is available), and load the parameter into DABR. If DABRX is not available, the hypervisor has to check the "Breakpoint Translation" bit of the DABR register first. Signed-off-by: Thomas Huth --- hw/ppc/spapr_hcall.c |

Re: [Qemu-devel] [Qemu-block] [PATCH v9 3/3] qmp: add monitor command to add/remove a child

2016-02-10 Thread Max Reitz
On 25.12.2015 10:22, Changlong Xie wrote: > From: Wen Congyang > > The new QMP command name is x-blockdev-change. It's just for adding/removing > quorum's child now, and doesn't support all kinds of children, all kinds of > operations, nor all block drivers. So it is experimental now. > > Signed

Re: [Qemu-devel] [PATCH v5 6/9] qemu-log: new option -dfilter to limit output

2016-02-10 Thread Richard Henderson
On 02/11/2016 04:40 AM, Alex Bennée wrote: OK I think this version is a lot cleaner: void qemu_set_dfilter_ranges(const char *filter_spec) { gchar **ranges = g_strsplit(filter_spec, ",", 0); if (ranges) { gchar **next = ranges; gchar *r = *next++;

Re: [Qemu-devel] [PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-10 Thread Gabriel L. Somlo
On Wed, Feb 10, 2016 at 11:16:57AM -0500, Gabriel L. Somlo wrote: > Ping. > > Now that the kernel side seems to have been accepted (Thanks again > Laszlo and Matt for all the help and advice!!!), is there anything > left to clean up before this series could be applied to QEMU ? Actually, I take t

Re: [Qemu-devel] [PATCH] memory: fix usage of find_next_bit and find_next_zero_bit

2016-02-10 Thread Thomas Huth
On 10.02.2016 15:11, Paolo Bonzini wrote: > The last two arguments to these functions are the last and first bit to > check relative to the base. The code was using incorrectly the first > bit and the number of bits. Fix this in cpu_physical_memory_get_dirty > and cpu_physical_memory_all_dirty.

Re: [Qemu-devel] [PATCH] qemu-ga: Fixed minor version switch issue

2016-02-10 Thread Michael Roth
Quoting Leonid Bloch (2016-01-11 03:12:41) > With automatically generated GUID, on minor version changes, an error > occurred, stating that there is a problem with the installer. > Now, a notification is shown, warning the user that another version of > this product is already installed, and that c

Re: [Qemu-devel] [PATCH v5 6/9] qemu-log: new option -dfilter to limit output

2016-02-10 Thread Alex Bennée
Richard Henderson writes: > On 02/05/2016 01:56 AM, Alex Bennée wrote: >> +gchar *range_op = g_strstr_len(r, -1, "-"); > > This is strchr. > >> +range_op = g_strstr_len(r, -1, "."); > > Or at least if you're going to make use of strstr, search for "..". > >> +

Re: [Qemu-devel] [PATCH 07/15] tcg-mips: Adjust qemu_ld/st for mips64

2016-02-10 Thread Richard Henderson
On 02/11/2016 03:34 AM, James Hogan wrote: Hi Richard, On Tue, Feb 09, 2016 at 09:39:55PM +1100, Richard Henderson wrote: @@ -1212,11 +1237,24 @@ static void tcg_out_tlb_load(TCGContext *s, TCGReg base, TCGReg addrl, : offsetof(CPUArchState, tlb_table[mem_index][0].addr_write));

Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT

2016-02-10 Thread Roman Kagan
On Wed, Feb 10, 2016 at 12:16:32PM -0500, John Snow wrote: > On 02/10/2016 12:10 PM, Roman Kagan wrote: > > Well, as I wrote in another mail, SeaBIOS, which is supposed to provide > > the same information to int 0x13/0x08, populates it with static data > > based only on the drive type as encoded in

Re: [Qemu-devel] [PATCH] memory: fix usage of find_next_bit and find_next_zero_bit

2016-02-10 Thread Leon Alrae
On 10/02/16 14:11, Paolo Bonzini wrote: > The last two arguments to these functions are the last and first bit to > check relative to the base. The code was using incorrectly the first > bit and the number of bits. Fix this in cpu_physical_memory_get_dirty > and cpu_physical_memory_all_dirty. Th

Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT

2016-02-10 Thread Roman Kagan
On Wed, Feb 10, 2016 at 11:14:30AM -0500, John Snow wrote: > On 02/09/2016 01:48 PM, Michael S. Tsirkin wrote: > > On Tue, Feb 09, 2016 at 07:36:12PM +0100, Laszlo Ersek wrote: > >> Implementing this in QEMU would require: > >> - inventing virt-only registers for the FDC that provide the current >

Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT

2016-02-10 Thread John Snow
On 02/10/2016 12:10 PM, Roman Kagan wrote: > On Tue, Feb 09, 2016 at 07:36:12PM +0100, Laszlo Ersek wrote: >> In my opinion, the real mess in this case is in the ACPI spec itself. If >> you re-read the _FDI control method's description, the Package that it >> returns contains *dynamic* geometry d

Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT

2016-02-10 Thread Roman Kagan
On Tue, Feb 09, 2016 at 07:36:12PM +0100, Laszlo Ersek wrote: > In my opinion, the real mess in this case is in the ACPI spec itself. If > you re-read the _FDI control method's description, the Package that it > returns contains *dynamic* geometry data, about the *disk* (not *drive*): > > - Maximu

Re: [Qemu-devel] [PULL 02/32] memory: RCU ram_list.dirty_memory[] for safe RAM hotplug

2016-02-10 Thread Paolo Bonzini
On 10/02/2016 17:56, Leon Alrae wrote: > Hi, > > I just noticed significant performance hit with this change. Booting > small system (I tried on system mips only) was usually taking around 20 > seconds, now reaches 3 minutes with this change. You're lucky that it booted at all. :) Unfortunatel

Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT

2016-02-10 Thread Roman Kagan
On Tue, Feb 09, 2016 at 11:22:01AM -0500, John Snow wrote: > > I don't. At the time the patch was developed there basically were no > > mechanisms to update the geometry at all (and this was what you patchset > > addressed, in particular, wasn't it?) so I didn't care. > > That's not true. > > Yo

Re: [Qemu-devel] [PULL 02/32] memory: RCU ram_list.dirty_memory[] for safe RAM hotplug

2016-02-10 Thread Leon Alrae
Hi, I just noticed significant performance hit with this change. Booting small system (I tried on system mips only) was usually taking around 20 seconds, now reaches 3 minutes with this change. Leon On 09/02/16 12:13, Paolo Bonzini wrote: > From: Stefan Hajnoczi > > Although accesses to ram_li

Re: [Qemu-devel] [PATCH v2] cirrus_vga: fix off-by-one in blit_region_is_unsafe

2016-02-10 Thread Laszlo Ersek
On 02/10/16 17:17, Paolo Bonzini wrote: > The "max" value is being compared with >=, but addr + width points to > the first byte that will _not_ be copied. Laszlo suggested using a > "greater than" comparison, instead of subtracting one like it is > already done above for the height, so that max r

Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT

2016-02-10 Thread Michael S. Tsirkin
On Wed, Feb 10, 2016 at 11:14:30AM -0500, John Snow wrote: > > > On 02/09/2016 01:48 PM, Michael S. Tsirkin wrote: > > On Tue, Feb 09, 2016 at 07:36:12PM +0100, Laszlo Ersek wrote: > >> On 02/09/16 17:22, John Snow wrote: > >>> > >>> > >>> On 02/09/2016 10:52 AM, Roman Kagan wrote: > On Mon,

Re: [Qemu-devel] [PATCH v2 5/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-02-10 Thread Paolo Bonzini
On 21/01/2016 15:01, Andrey Smetanin wrote: > The patch implements KVM_EXIT_HYPERV userspace exit > functionality for Hyper-V VMBus hypercalls: > HV_X64_HCALL_POST_MESSAGE, HV_X64_HCALL_SIGNAL_EVENT. > > Changes v2: > * use KVM_EXIT_HYPERV for hypercalls > > Signed-off-by: Andrey Smetanin > Re

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: add _filter_qmp_events() for filtering out QMP events

2016-02-10 Thread Max Reitz
On 09.02.2016 14:23, Sascha Silbe wrote: > The order of some QMP events may depend on the architecture being > tested. Add support for filtering out QMP events so we can use a > single reference output for all architecture when the test doesn't > care about the events. > > Signed-off-by: Sascha Si

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

2016-02-10 Thread Paolo Bonzini
On 10/02/2016 17:40, Ladi Prosek wrote: >> >> >> On 10/02/2016 16:53, Ladi Prosek wrote: >>> +req->size = size; >>> +req->receive_entropy = receive_entropy; >>> +req->opaque = opaque; >>> +req->data = g_malloc(req->size); >>> + >>> +k->request_entropy(s, re

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

2016-02-10 Thread Ladi Prosek
> > > On 10/02/2016 16:53, Ladi Prosek wrote: > > +req->size = size; > > +req->receive_entropy = receive_entropy; > > +req->opaque = opaque; > > +req->data = g_malloc(req->size); > > + > > +k->request_entropy(s, req); > > + > > +s->requests = g_slis

Re: [Qemu-devel] [PATCH 07/15] tcg-mips: Adjust qemu_ld/st for mips64

2016-02-10 Thread James Hogan
Hi Richard, On Tue, Feb 09, 2016 at 09:39:55PM +1100, Richard Henderson wrote: > @@ -1212,11 +1237,24 @@ static void tcg_out_tlb_load(TCGContext *s, TCGReg > base, TCGReg addrl, > : offsetof(CPUArchState, tlb_table[mem_index][0].addr_write)); > int add_off = offsetof(CPUArchState

Re: [Qemu-devel] [PATCH v3 00/10] Allow hotplug of s390 CPUs

2016-02-10 Thread Andreas Färber
Am 10.02.2016 um 16:28 schrieb David Hildenbrand: > For x86, cpu models are realized by making x86_64-cpu an abstract class and > creating loads of new classes, e.g. host-x86_64-cpu or haswell-x86_64-cpu. > > How does 'device_add ' play together with the x86 cpu model > approach? And with cpu mode

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

2016-02-10 Thread Paolo Bonzini
On 10/02/2016 16:53, Ladi Prosek wrote: > +req->size = size; > +req->receive_entropy = receive_entropy; > +req->opaque = opaque; > +req->data = g_malloc(req->size); > + > +k->request_entropy(s, req); > + > +s->requests = g_slist_append(s->requests,

Re: [Qemu-devel] [PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-10 Thread Gabriel L. Somlo
Ping. Now that the kernel side seems to have been accepted (Thanks again Laszlo and Matt for all the help and advice!!!), is there anything left to clean up before this series could be applied to QEMU ? gmane.org quick links: 1/5: http://article.gmane.org/gmane.comp.emulators.qemu/389896/raw 2/5:

  1   2   3   >