Re: [Qemu-devel] [PATCH] block/raw-posix: detect readonly LVM volumes using BLKROGET

2013-02-04 Thread Markus Armbruster
Stefan Hajnoczi writes: > LVM volumes can be set read-only with "lvchange --permission r > ". The device node permissions remain unchanged so the volume > can still be opened O_RDWR. Actual writes will fail. Are you sure it's just LVM? blockdev(8) suggests it's a more general issue. Check ou

[Qemu-devel] [PATCH v3 07/10] main-loop: drop rfds/wfds/xfds for good

2013-02-04 Thread Stefan Hajnoczi
Now that all *_fill() and *_poll() functions use GPollFD we no longer need rfds/wfds/xfds or pollfds_from_select()/pollfds_to_select(). >From now on everything uses GPollFD. Signed-off-by: Stefan Hajnoczi --- main-loop.c | 77 ++--- 1 file

[Qemu-devel] KVH call agenda for 2013-02-05

2013-02-04 Thread Juan Quintela
Hi Please send in any agenda topics you are interested in. Later, Juan.

[Qemu-devel] [PATCH 47/60] kvm: fix incorrect length in a loop over kvm dirty pages map

2013-02-04 Thread Michael Tokarev
From: Alexey Kardashevskiy QEMU allocates a map enough for 4k pages. However the system page size can be 64K (for example on POWER) and the host kernel uses only a small part of it as one big stores a dirty flag for 16 pages 4K each, the hpratio variable stores this ratio and the kvm_get_dirty_pa

[Qemu-devel] [PATCH 56/60] target-xtensa: fix search_pc for the last TB opcode

2013-02-04 Thread Michael Tokarev
From: Max Filippov Zero out tcg_ctx.gen_opc_instr_start for instructions representing the last guest opcode in the TB. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Filippov Signed-off-by: Blue Swirl (cherry picked from commit 36f25d2537c40c6c47f4abee5d31a24863d1adf7) Signed-off-by: Michael T

[Qemu-devel] [PATCH 22/60] uhci: Raise interrupt when requested even for non active tds

2013-02-04 Thread Michael Tokarev
From: Hans de Goede According to the spec we must raise an interrupt when one is requested even for non active tds. Linux depends on this, for bulk transfers it runs an inactivity timer to work around a bug in early uhci revisions, when we take longer then 200 ms to process a packet, this timer

[Qemu-devel] [PATCH 42/60] target-mips: fix wrong microMIPS opcode encoding

2013-02-04 Thread Michael Tokarev
From: "陳韋任 (Wei-Ren Chen)" While reading microMIPS decoding, I found a possible wrong opcode encoding. According to [1] page 166, the bits 13..12 for MULTU is 0x01 rather than 0x00. Please review, thanks. [1] MIPS Architecture for Programmers VolumeIV-e: The MIPS DSP Application-Specific Ext

[Qemu-devel] [PATCH 57/60] buffered_file: do not send more than s->bytes_xfer bytes per tick

2013-02-04 Thread Michael Tokarev
From: Paolo Bonzini Sending more was possible if the buffer was large. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Juan Quintela (cherry picked from commit bde54c08b4854aceee3dee25121a2b835cb81166) Conflicts (backport): buffered_file.c Signed-off-by: Michae

Re: [Qemu-devel] [PATCH 05/10] hw/arm_sysctl: Convert from qdev init to instance_init

2013-02-04 Thread Andreas Färber
Am 04.02.2013 14:44, schrieb Peter Maydell: > Convert this device from old-style qdev init to an instance_init > function. We don't need a realize function yet, though. > > Signed-off-by: Peter Maydell > --- > hw/arm_sysctl.c |7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > >

[Qemu-devel] [PATCH 26/60] target-i386: Allow tsc-frequency to be larger then 2.147G

2013-02-04 Thread Michael Tokarev
From: Don Slutz The check using INT_MAX (2147483647) is wrong in this case. Signed-off-by: Fred Oliveira Signed-off-by: Don Slutz Signed-off-by: Stefan Hajnoczi (cherry picked from commit 2e84849aa2cc7f220d3b3668f5f7e3c57bb1b590) Signed-off-by: Michael Tokarev --- target-i386/cpu.c |2

Re: [Qemu-devel] [PATCH v3 02/10] main-loop: switch to g_poll() on POSIX hosts

2013-02-04 Thread Stefan Hajnoczi
On Mon, Feb 04, 2013 at 03:37:39PM +0100, Laszlo Ersek wrote: > I assume this is complex because the pre-patch situation is overly > complex as well: > > slirp -> fd_set > iohandler -> fd_set > unix

[Qemu-devel] [PATCH 16/60] blockdev: preserve readonly and snapshot states across media changes

2013-02-04 Thread Michael Tokarev
From: Kevin Shanahan If readonly=on is given at device creation time, the ->readonly flag needs to be set in the block driver state for this device so that readonly-ness is preserved across media changes (qmp change command). Similarly, to preserve the snapshot property requires ->open_flags to b

[Qemu-devel] [PATCH 54/60] hw/arm_boot.c: Consistently use ram_size from arm_boot_info struct

2013-02-04 Thread Michael Tokarev
From: Peter Maydell Clean up the mix of getting the RAM size from the global ram_size and from the ram_size field in the arm_boot_info structure, so that we always use the structure field. Signed-off-by: Peter Maydell Reviewed-by: Peter A. G. Crosthwaite (cherry picked from commit 0b94438480c8

[Qemu-devel] [PATCH 05/10] hw/arm_sysctl: Convert from qdev init to instance_init

2013-02-04 Thread Peter Maydell
Convert this device from old-style qdev init to an instance_init function. We don't need a realize function yet, though. Signed-off-by: Peter Maydell --- hw/arm_sysctl.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index bb56238.

Re: [Qemu-devel] [PATCH][v5] linux-user: correct semctl() and shmctl()

2013-02-04 Thread Peter Maydell
On 31 January 2013 19:50, Laurent Vivier wrote: > The parameter "union semun" of semctl() is not a value > but a pointer to the value. Hi. For your next patch could you make sure you send it as a fresh email rather than a followup to the previous version? Anthony's patch-handling tools don't real

[Qemu-devel] [PATCH 07/10] hw/arm_sysctl: Implement SYS_CFG_VOLT

2013-02-04 Thread Peter Maydell
Implement the SYS_CFG_VOLT registers which return the voltage of various supplies on motherboard and daughterboard. Since QEMU implements a perfectly stable power supply these registers always return a constant value. The number and value of the daughterboard voltages is dependent on the specific d

[Qemu-devel] [PATCH 03/10] hw/arm_sysctl: Implement SYS_CFG_MUXFPGA writes as a no-op

2013-02-04 Thread Peter Maydell
SYS_CFG_MUXFPGA allows the guest to select whether the video output should come from the motherboard's LCD controller or the daughterboard's one. Since QEMU doesn't currently support selecting the video output like this, implement as a no-op, so Linux doesn't complain about the register not being i

[Qemu-devel] [PATCH 20/60] ui/vnc: Only report/use TIGHT_PNG encoding if enabled.

2013-02-04 Thread Michael Tokarev
From: Joel Martin If TIGHT_PNG is not enabled by the --enable-vnc-png configure flag then do not report to the client that it is supported. Also, since TIGHT_PNG is the same as the TIGHT encoding but with the filter/copy replaced with PNG data, adding it to the supported encodings list when it i

[Qemu-devel] [PATCH 00/10] vexpress: implement more SYS_CFG registers (feat. qdev property arrays)

2013-02-04 Thread Peter Maydell
This patchset fixes a number of warnings produced by Linux 3.8 on the vexpress boards resulting from newer kernels prodding more of the SYS_CFG register operations. Since some of the newly implemented functions expose voltage and oscillator settings which vary in number and value between vexpress

[Qemu-devel] [PATCH 09/10] hw/arm_sysctl: Implement SYS_CFG_OSC function

2013-02-04 Thread Peter Maydell
Implement the SYS_CFG_OSC function. Since the idea of programmable clock rates doesn't make much sense for QEMU, we simply allow the clock rate to be read back as written. The number and value of the daughterboard oscillators varies between daughterboards, so we provide an array property to allow t

[Qemu-devel] [PATCH 01/10] hw/vexpress: Pass proc_id via VEDBoardInfo

2013-02-04 Thread Peter Maydell
Pass the daughterboard-specific proc_id property to the code that creates the sysctl device via the VEDBoardInfo struct, rather than by having the daughterboard init function write to a uint32_t* argument. This is a cleaner way to pass the info around, and is in line with the way we are going to ha

Re: [Qemu-devel] Headsup: windows virtio networking does not work on current git

2013-02-04 Thread Anthony Liguori
Vadim Rozenfeld writes: > On Mon, 2013-02-04 at 14:22 +0200, Michael S. Tsirkin wrote: >> On Mon, Feb 04, 2013 at 02:00:46PM +0200, Yan Vugenfirer wrote: >> > >> virtio spec is very explicit that revision never changes: >> "The device must also have a Revision ID of 0 to match this >> specificat

[Qemu-devel] [PATCH 10/10] hw/vexpress: Set reset values for daughterboard oscillators

2013-02-04 Thread Peter Maydell
Set the reset values for the VExpress daughterboard oscillators via the new sysctl properties. Signed-off-by: Peter Maydell --- hw/vexpress.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/vexpress.c b/hw/vexpress.c index 8653200..547379a 100644 --- a/

[Qemu-devel] [PATCH 02/10] hw/arm_sysctl: Handle SYS_CFGCTRL in a more structured way

2013-02-04 Thread Peter Maydell
The SYS_CFGCTRL register consists of separate fields for DCC, function, site, position and device, as well as a read/write bit. Refactor the code handling SYS_CFGCTRL writes to make it easier to add support for functions like SYS_CFG_OSC which support multiple device fields. We also pull the handli

[Qemu-devel] [PATCH 08/10] hw/vexpress: Pass voltage sensor properties to sysctl device

2013-02-04 Thread Peter Maydell
Pass voltage sensor properties to the sysctl device. Since these are daughterboard specific, we specify them via the VEDBoardInfo structure. Signed-off-by: Peter Maydell --- hw/vexpress.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/hw/vexpress.c b/hw/vex

[Qemu-devel] [PATCH 33/60] e1000: drop check_rxov, always treat RX ring with RDH == RDT as empty

2013-02-04 Thread Michael Tokarev
From: Dmitry Fleytman Real HW always treats RX ring with RDH == RDT as empty. Emulation is supposed to behave the same. Reported-by: Chris Webb Reported-by: Richard Davies Signed-off-by: Dmitry Fleytman Signed-off-by: Stefan Hajnoczi (cherry picked from commit e5b8b0d4ba29fe1268ba049519a1b0c

[Qemu-devel] [PATCH 21/60] vnc: fix "info vnc" with "-vnc ..., reverse=on"

2013-02-04 Thread Michael Tokarev
From: Paolo Bonzini When reverse connection is in use, there is no active VNC server socket. Because of this, getsockopt(-1, ...) is attempted and the following error is emitted: $ socat TCP-LISTEN:5900,reuseaddr TCP-LISTEN:5901,reuseaddr & $ x86_64-softmmu/qemu-system-x86_64 -vnc local

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-04 Thread Seiji Aguchi
> > Do we really want to add timestamps to error messages unconditionally? > > I don't doubt it's useful in your scenario, but most of the time it's > > just annoying clutter. > > Agreed, I think it should be an option. OK. I will add the timestamp as an option. > Also remember that management

Re: [Qemu-devel] [PATCH for-1.4] tests/test-string-input-visitor: Handle errors provoked by fuzz test

2013-02-04 Thread Luiz Capitulino
On Mon, 04 Feb 2013 08:48:57 +0100 Markus Armbruster wrote: > [Note cc: Luiz] > > Peter Maydell writes: > > > On 2 February 2013 21:37, Andreas Färber wrote: > >> Am 02.02.2013 22:19, schrieb Peter Maydell: > >>> It's OK and expected for visitors to return errors when presented with > >>> the

Re: [Qemu-devel] [PATCH v3 02/10] main-loop: switch to g_poll() on POSIX hosts

2013-02-04 Thread Laszlo Ersek
On 02/04/13 16:07, Stefan Hajnoczi wrote: > slirp uses OOB because it implements TCP. I don't think we can drop it. I considered slirp for that reason, and I did grep the tree for OOB and saw some hits. I didn't track it down but I thought slirp would use lower level sockets (SOCK_RAW?) for the

[Qemu-devel] EDKII OVMF+QEMU Query- What is the Max supported Buffer size for file IO.

2013-02-04 Thread baban devkate
Hi All,When Working with OVMF+QEMU, What is the Max supported Buffer size (in Block I/O Protocol)? Thanks, Baban

Re: [Qemu-devel] [PATCH 2/7] do_device_add(): look up "device" opts list with qemu_find_opts_err()

2013-02-04 Thread Luiz Capitulino
On Fri, 1 Feb 2013 18:38:14 +0100 Laszlo Ersek wrote: > > Signed-off-by: Laszlo Ersek > --- > hw/qdev-monitor.c |7 +-- > 1 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c > index 3ec9e49..32be5a2 100644 > --- a/hw/qdev-monitor.c

Re: [Qemu-devel] [PATCH V20 6/8] Add support for cancelling of a TPM command

2013-02-04 Thread Corey Bryant
On 01/18/2013 11:02 AM, Stefan Berger wrote: This patch adds support for cancelling an executing TPM command. In Linux for example a user can cancel a command through the TPM's sysfs 'cancel' entry using echo "1" > /sysfs/.../cancel This patch propagates the cancellation to the host TPM's sysf

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-04 Thread Seiji Aguchi
> > [TODO] > > Other functions below are used to output error messages in qemu. > > - qerror_report() is called in many source codes. > > Not a problem, it ends up in qerror_print(), which calls error_report(). Thanks. > > > - fprintf() is called in vl.c. > > All over the place, not just vl.

[Qemu-devel] [PATCH for-1.4] acpi_piix4: fix segfault migrating from 1.2

2013-02-04 Thread Michael Roth
b0b873a07872f7ab7f66f259c73fb9dd42aa66a9 bumped the vmstate version and introduced an old-style load function to handle migration from prior (<= 1.2) versions. The load function passes the top-level PIIX4PMState pointer to vmstate_load_state() to handle nested structs for APMState and pci_status,

Re: [Qemu-devel] [PATCH v3 03/10] main-loop: switch POSIX glib integration to GPollFD

2013-02-04 Thread Laszlo Ersek
one remark below: On 02/04/13 13:12, Stefan Hajnoczi wrote: > Convert glib file descriptor polling from rfds/wfds/xfds to GPollFD. > > The Windows code still needs poll_fds[] and n_poll_fds but they can now > become local variables. > > Signed-off-by: Stefan Hajnoczi > --- > main-loop.c | 71

Re: [Qemu-devel] [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - Create eventfd per vfio device assigned to a guest and register an > event handler > > - This fd is passed to the vfio_pci driver through the SET_IRQ ioctl > > - When the device encounters an error

Re: [Qemu-devel] [PATCH v3 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - New VFIO_SET_IRQ ioctl option to pass the eventfd that is signaled > when > an error occurs in the vfio_pci_device > > - Register pci_error_handler for the vfio_pci driver > > - When the device en

Re: [Qemu-devel] [PATCH v3 0/3] AER-KVM: Error containment of VFIO devices assigned to KVM guests

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > Add support for error containment when a VFIO device assigned to a KVM > guest encounters an error. This is for PCIe devices/drivers that support AER > functionality. When the host OS is notified of an error in a device either >

Re: [Qemu-devel] EDKII OVMF+QEMU Query- What is the Max supported Buffer size for file IO.

2013-02-04 Thread Jordan Justen
On Mon, Feb 4, 2013 at 8:22 AM, baban devkate wrote: > When Working with OVMF+QEMU, What is the Max supported Buffer size (in Block > I/O Protocol)? I don't think there should be a set limit, although the VM RAM size is obviously 1 limit. :) -Jordan

[Qemu-devel] [PATCH v3 08/10] aio: extract aio_dispatch() from aio_poll()

2013-02-04 Thread Stefan Hajnoczi
We will need to loop over AioHandlers calling ->io_read()/->io_write() when aio_poll() is converted from select(2) to g_poll(2). Luckily the code for this already exists, extract it into the new aio_dispatch() function. Two small changes: * aio_poll() checks !node->deleted to avoid calling hand

[Qemu-devel] [PATCH 48/60] ide: Fix crash with too long PRD

2013-02-04 Thread Michael Tokarev
From: Kevin Wolf Without this, s->nsector can become negative and badness happens (trying to malloc huge amount of memory and glib calls abort()) Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi (cherry picked from commit 038268e2e8087ee2fd8987a77ba580e15f14c147) Signed-off-by: Michae

[Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings

2013-02-04 Thread Markus Armbruster
Test cases are scraped from Markus Kuhn's UTF-8 decoder capability and stress test at http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt Unfortunately, both JSON parser and formatter misbehave right now. This test expects current, incorrect results. They're all clearly marked, and are to

Re: [Qemu-devel] [PATCH for-1.4] target-cris: Build fix for debug output

2013-02-04 Thread Edgar E. Iglesias
On Mon, Feb 04, 2013 at 02:42:55PM +0100, Andreas Färber wrote: > Am 27.01.2013 07:26, schrieb Andreas Färber: > > Around r3361 (81fdc5f8d2d681da8d255baf0713144f8656bac9) env->debug1 used > > to contain the address of an MMU fault. This is now written into > > env->pregs[PR_EDA] instead. > > > > S

Re: [Qemu-devel] [PATCH 3/7] qdev_prop_parse(): report errors via Error

2013-02-04 Thread Luiz Capitulino
On Fri, 1 Feb 2013 18:38:15 +0100 Laszlo Ersek wrote: > > Signed-off-by: Laszlo Ersek I usually split this kind of patch the following way: 1. add an Error ** argument to the function reporting the error. Callers are changed to pass NULL for the new argument 2. Handling of the new err

Re: [Qemu-devel] [PATCH qom-cpu-next v3 3/4] target-i386: Slim conversion to X86CPU subclasses

2013-02-04 Thread Igor Mammedov
On Mon, 04 Feb 2013 13:52:32 +0100 Andreas Färber wrote: > Am 04.02.2013 12:08, schrieb Igor Mammedov: > > On Sat, 2 Feb 2013 01:37:07 +0100 > > Andreas Färber wrote: > > > >> Move x86_def_t definition to header and embed into X86CPUClass. > >> Register types per built-in model definition. > >

[Qemu-devel] [PATCH 01/19] hw: move char backends to backends/

2013-02-04 Thread Paolo Bonzini
Braille and msmouse support is in hw/, but it is not hardware. Move it to the backends/ directory. Signed-off-by: Paolo Bonzini --- backends/Makefile.objs |4 {hw => backends}/baum.c|4 ++-- {hw => backends}/msmouse.c |2 +- hw/Makefile.objs |

[Qemu-devel] [PATCH 02/19] hw: move fifo.[ch] to libqemuutil

2013-02-04 Thread Paolo Bonzini
fifo.c is generic code that can be easily unit tested. So it belongs in libqemuutil. Signed-off-by: Paolo Bonzini --- hw/Makefile.objs |1 - hw/xilinx_spi.c |2 +- hw/xilinx_spips.c |2 +- include/migration/vmstate.h |2 ++

[Qemu-devel] [PATCH 04/19] hw: move device-hotplug.o to toplevel, compile it once

2013-02-04 Thread Paolo Bonzini
The situation with device-hotplug.c is similar to qdev-monitor.c. Add a stub for pci_drive_hot_add, so that it can be compiled once, and move it out of hw/. Signed-off-by: Paolo Bonzini --- Makefile.objs |2 +- hw/device-hotplug.c => device-hotplug.c | 13 ++--

[Qemu-devel] [PATCH 11/19] hw: make subdirectories for devices

2013-02-04 Thread Paolo Bonzini
Prepare the new directory structure. Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 29 ++--- 1 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 hw/acpi/Makefile.objs create mode 100644 hw/audio/Makefile.objs create mode 100644 hw/bloc

[Qemu-devel] [PATCH 08/19] ppc: do not use ../ in include files

2013-02-04 Thread Paolo Bonzini
This simplifies the scripted execution of the next patch. Signed-off-by: Paolo Bonzini --- hw/ppc/e500-ccsr.h |2 +- hw/ppc/e500plat.c |2 +- hw/ppc/mpc8544ds.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/e500-ccsr.h b/hw/ppc/e500-ccsr.h index f20f51

[Qemu-devel] [PATCH 13/19] hw: move boards and some devices to hw/ARCH

2013-02-04 Thread Paolo Bonzini
This moves devices that are board-specific and do not fit in any more specific category to hw/ARCH directories. Devices that can be moved to specific categories are left in hw/ for now. The next patch will take care of them, and remove the strange hw/ARCH/../FILE indirection. Signed-off-by: Paol

[Qemu-devel] [PATCH 13/60] usb-audio: fix usb version

2013-02-04 Thread Michael Tokarev
From: Gerd Hoffmann usb-audio is a full speed (1.1) device, but bcdUSB claims it is usb 2.0. Fix it. Signed-off-by: Gerd Hoffmann (cherry picked from commit 2bbd086c41a00dc4384727ec895a94890c688eb5) Signed-off-by: Michael Tokarev --- hw/usb/dev-audio.c |2 +- 1 file changed, 1 insertion

[Qemu-devel] [PATCH 14/19] hw: use default-configs for more devices instead of hw/ARCH/Makefile.objs

2013-02-04 Thread Paolo Bonzini
Other devices are now moved out of hw/ARCH, adding new CONFIG_* symbols that let them be included selectively in the emulators. The devices however are still compiled in target-specific directories. Signed-off-by: Paolo Bonzini --- Makefile.target|1 + con

[Qemu-devel] [PATCH 16/19] MAINTAINERS: update for source code movement

2013-02-04 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- MAINTAINERS | 168 --- 1 files changed, 91 insertions(+), 77 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 21043e4..7d1a68e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -59,75 +59,90 @@ Alpha

Re: [Qemu-devel] [PATCH v3 02/10] main-loop: switch to g_poll() on POSIX hosts

2013-02-04 Thread Paolo Bonzini
Il 04/02/2013 16:07, Stefan Hajnoczi ha scritto: >> > No idea why the windows version has been mixing g_poll() and select(). >> > I'd hope that this series kills select() for uniformity's sake, but the >> > 00/10 subject and the commit msg for this patch indicate otherwise. > This is why I CCed Fab

Re: [Qemu-devel] [edk2] EDKII OVMF+QEMU Query- What is the Max supported Buffer size for file IO.

2013-02-04 Thread Laszlo Ersek
On 02/04/13 17:22, baban devkate wrote: > > When Working with OVMF+QEMU, What is the Max supported > Buffer size (in Block I/O Protocol)? Are you producing EFI_BLOCK_IO_PROTOCOL, or consuming it? If producing (ie. implementing a driver), then why does it matter? BufferSize should be an inte

[Qemu-devel] [PATCH v3 10/10] aio: support G_IO_HUP and G_IO_ERR

2013-02-04 Thread Stefan Hajnoczi
aio-posix.c could not take advantage of G_IO_HUP and G_IO_ERR because select(2) does not have equivalent events. Now that g_poll(3) is used we can support G_IO_HUP and G_IO_ERR. Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) d

Re: [Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings

2013-02-04 Thread Paolo Bonzini
Il 04/02/2013 18:19, Markus Armbruster ha scritto: > +/* 2 Boundary condition test cases */ > +/* 2.1 First possible sequence of a certain length */ > +/* 2.1.5 5 bytes U+20 */ > +{ > +"\"\xF8\x88\x80\x80\x80\"", > +NULL,

[Qemu-devel] [PATCH v3 09/10] aio: convert aio_poll() to g_poll(3)

2013-02-04 Thread Stefan Hajnoczi
AioHandler already has a GPollFD so we can directly use its events/revents. Add the int pollfds_idx field to AioContext so we can map g_poll(3) results back to AioHandlers. Reuse aio_dispatch() to invoke handlers after g_poll(3). Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 67

Re: [Qemu-devel] [PATCH 5/7] qbus_find_recursive(): terminate search by name in case of fatal error

2013-02-04 Thread Luiz Capitulino
On Fri, 1 Feb 2013 18:38:17 +0100 Laszlo Ersek wrote: > Use an Error to communicate the "stop the search" message. > > Signed-off-by: Laszlo Ersek > --- > hw/qdev-monitor.c | 24 > 1 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/hw/qdev-monitor.c

[Qemu-devel] [PATCH 07/19] vt82c686: vt82c686 is not a PCI host bridge

2013-02-04 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/vt82c686.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/vt82c686.c b/hw/vt82c686.c index 2d8e398..c2b1bfc 100644 --- a/hw/vt82c686.c +++ b/hw/vt82c686.c @@ -26,8 +26,6 @@ #include "qemu/timer.h" #include "exec/address-spaces.h"

[Qemu-devel] [Bug 1024275] Re: bad iteraction between -daemonize and -nographic

2013-02-04 Thread Bug Watch Updater
** Changed in: qemu (Debian) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1024275 Title: bad iteraction between -daemonize and -nographic Status in QEMU:

Re: [Qemu-devel] [PATCH v3 02/10] main-loop: switch to g_poll() on POSIX hosts

2013-02-04 Thread Fabien Chouteau
On 02/04/2013 06:35 PM, Paolo Bonzini wrote: > Il 04/02/2013 16:07, Stefan Hajnoczi ha scritto: No idea why the windows version has been mixing g_poll() and select(). I'd hope that this series kills select() for uniformity's sake, but the 00/10 subject and the commit msg for this pat

Re: [Qemu-devel] [PATCH 6/7] qbus_find(): report errors via Error

2013-02-04 Thread Luiz Capitulino
On Fri, 1 Feb 2013 18:38:18 +0100 Laszlo Ersek wrote: > > Signed-off-by: Laszlo Ersek Splitting this as I suggested in the other patch would make review easier. I honestly got a bit lost while reviewing this one. > --- > hw/qdev-monitor.c | 29 +++-- > 1 files chan

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring

2013-02-04 Thread Andreas Färber
Am 04.02.2013 18:29, schrieb Paolo Bonzini: > I haven't thought of a way to ensure patch 19 is safe, apart from trusting > the poisoning mechanism. [...] I've wondered, is it possible it poison from the Makefile? Then we could forbid that the whole of common-obj-y uses CONFIG_USER_ONLY or CONFIG_S

Re: [Qemu-devel] [PATCH 7/7] qdev_device_add(): report errors with Error

2013-02-04 Thread Luiz Capitulino
On Fri, 1 Feb 2013 18:38:19 +0100 Laszlo Ersek wrote: > > Signed-off-by: Laszlo Ersek > --- > hw/qdev-monitor.h |3 ++- > hw/qdev-monitor.c | 29 +++-- > vl.c |9 +++-- > 3 files changed, 24 insertions(+), 17 deletions(-) > > diff --git a/hw

Re: [Qemu-devel] [PATCH 0/7] propagate Errors to do_device_add()

2013-02-04 Thread Luiz Capitulino
On Fri, 1 Feb 2013 18:38:12 +0100 Laszlo Ersek wrote: > This series is the first in converting do_device_add() to qapi. I've reviewed this, although it doesn't apply on master anymore and then I was unable to try it. Also, it's a good idea to CC qdev expert guys.

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring

2013-02-04 Thread Paolo Bonzini
Il 04/02/2013 18:57, Andreas Färber ha scritto: >> > I haven't thought of a way to ensure patch 19 is safe, apart from trusting >> > the poisoning mechanism. [...] > I've wondered, is it possible it poison from the Makefile? Then we could > forbid that the whole of common-obj-y uses CONFIG_USER_ONL

[Qemu-devel] [PATCH 15/60] i386: kvm: bit 10 of CPUID[8000_0001].EDX is reserved

2013-02-04 Thread Michael Tokarev
From: Eduardo Habkost Bit 10 of CPUID[8000_0001].EDX is not defined as an alias of CPUID[1].EDX[10], so do not duplicate it on kvm_arch_get_supported_cpuid(). Signed-off-by: Eduardo Habkost Reviewed-By: Igor Mammedov Reviewed-by: Don Slutz Signed-off-by: Blue Swirl (cherry picked from commit

Re: [Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings

2013-02-04 Thread Markus Armbruster
Paolo Bonzini writes: > Il 04/02/2013 18:19, Markus Armbruster ha scritto: >> +/* 2 Boundary condition test cases */ >> +/* 2.1 First possible sequence of a certain length */ >> +/* 2.1.5 5 bytes U+20 */ >> +{ >> +"\"\xF8\x88\x80\x80\x80\"", >> +

Re: [Qemu-devel] [PATCH 5/7] qbus_find_recursive(): terminate search by name in case of fatal error

2013-02-04 Thread Laszlo Ersek
On 02/04/13 18:46, Luiz Capitulino wrote: > On Fri, 1 Feb 2013 18:38:17 +0100 > Laszlo Ersek wrote: > >> Use an Error to communicate the "stop the search" message. >> >> Signed-off-by: Laszlo Ersek >> --- >> hw/qdev-monitor.c | 24 >> 1 files changed, 16 insertions(+

Re: [Qemu-devel] [PATCH v3 02/10] main-loop: switch to g_poll() on POSIX hosts

2013-02-04 Thread Paolo Bonzini
Il 04/02/2013 18:51, Fabien Chouteau ha scritto: > On 02/04/2013 06:35 PM, Paolo Bonzini wrote: >> Il 04/02/2013 16:07, Stefan Hajnoczi ha scritto: > No idea why the windows version has been mixing g_poll() and select(). > I'd hope that this series kills select() for uniformity's sake, but

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring

2013-02-04 Thread Peter Maydell
On 4 February 2013 17:29, Paolo Bonzini wrote: > This reorganizes the over 600 files in the hw/ directory to multiple > subdirectories: acpi/, audio/, block/, bt/, char/, display/, i2c/, input/, > isa/, misc/, net/, scsi/, sd/, ssi/, timer/, virtio/, watchdog/, xen/. > These are in addition to the

Re: [Qemu-devel] [PATCH 5/6] load_linux: report open kernel file & its size error

2013-02-04 Thread Blue Swirl
On Mon, Feb 4, 2013 at 2:27 AM, liguang wrote: > Signed-off-by: liguang > --- > hw/pc.c | 14 +++--- > 1 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/hw/pc.c b/hw/pc.c > index 01d00f6..0ccd775 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -652,12 +652,20 @@ static voi

Re: [Qemu-devel] [PATCH 6/7] qbus_find(): report errors via Error

2013-02-04 Thread Laszlo Ersek
On 02/04/13 18:51, Luiz Capitulino wrote: > On Fri, 1 Feb 2013 18:38:18 +0100 > Laszlo Ersek wrote: > >> >> Signed-off-by: Laszlo Ersek > > Splitting this as I suggested in the other patch would make review > easier. I honestly got a bit lost while reviewing this one. I think you cannot revie

Re: [Qemu-devel] [PATCH 2/6] pc/numa: refactor bios_init function

2013-02-04 Thread Blue Swirl
On Mon, Feb 4, 2013 at 2:27 AM, liguang wrote: > orginally, numa data was packed into an array, > which was implicit and hard to maintain, we > define a struct for this data, hope to be as > clear as enough. > also, we only pass cpumask of corresponding > nodes to seabios, and leave the paring wor

[Qemu-devel] [PATCH 5/8] vl.c: numa_add(): Validate nodeid before using it

2013-02-04 Thread Eduardo Habkost
Without this check, QEMU will corrupt memory if a too-large nodeid is provided in the command-line. e.g.: -numa node,mem=...,cpus=...,nodeid=65 This changes nodenr to unsigned long long, to avoid integer conversion issues when converting the strtoull() result to int. Signed-off-by: Eduardo Hab

[Qemu-devel] [PATCH 2/8] vl.c: Fix off-by-one bug when handling "-numa node" argument

2013-02-04 Thread Eduardo Habkost
The numa_add() code was unconditionally adding 1 to the get_opt_name() return value, making it point after the end of the string if no ',' separator is present. Example of weird behavior caused by the bug: $ qemu-img create -f qcow2 this-file-image-has,cpus=5,mem=1000,in-its-name.qcow2 5G Fo

[Qemu-devel] [PATCH 7/8] vl.c: Extract -numa "cpus" parsing to separate function

2013-02-04 Thread Eduardo Habkost
This will make it easier to refactor that code later. Signed-off-by: Eduardo Habkost Reviewed-by: Eric Blake --- vl.c | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/vl.c b/vl.c index d6f6422..de164f8 100644 --- a/vl.c +++ b/vl.c @

[Qemu-devel] [PATCH 3/8] vl.c: Abort on unknown -numa option type

2013-02-04 Thread Eduardo Habkost
Abort in case an invalid -numa option is provided, instead of silently ignoring it. Signed-off-by: Eduardo Habkost Reviewed-by: Eric Blake --- vl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vl.c b/vl.c index 0dae44c..586aa9a 100644 --- a/vl.c +++ b/vl.c @@ -1293,6 +1293,9 @@ static

[Qemu-devel] [PATCH 1/8] cutils: unsigned int parsing functions

2013-02-04 Thread Eduardo Habkost
There are lots of duplicate parsing code using strto*() in QEMU, and most of that code is broken in one way or another. Even the visitors code have duplicate integer parsing code[1]. This introduces functions to help parsing unsigned int values: parse_uint() and parse_uint_full(). Parsing function

[Qemu-devel] [PATCH 4/8] vl.c: Check for NUMA node limit inside numa_add()

2013-02-04 Thread Eduardo Habkost
Instead of checking the limit before calling numa_add(), check the limit only when we already know we're going to add a new node. Signed-off-by: Eduardo Habkost Reviewed-by: Eric Blake --- vl.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 586a

Re: [Qemu-devel] [PATCH 6/6] load_linux: change kernel header size allocation

2013-02-04 Thread Blue Swirl
On Mon, Feb 4, 2013 at 2:27 AM, liguang wrote: > it's not necessary to alloc 8K bytes for kernel > header, 0.5K is enough. > > Signed-off-by: liguang > --- > hw/pc.c | 10 ++ > 1 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/hw/pc.c b/hw/pc.c > index 0ccd775..b6b236f

[Qemu-devel] [PATCH] bitops: unify bitops_flsl with host-utils.h, call it bitops_clzl

2013-02-04 Thread Richard Henderson
Similar to the bitops_ctz change just made. Signed-off-by: Richard Henderson --- include/qemu/bitops.h | 44 +++- target-i386/topology.h | 2 +- util/bitops.c | 2 +- 3 files changed, 17 insertions(+), 31 deletions(-) diff --git a/include/qemu

[Qemu-devel] [PATCH 06/19] virtio-9p: remove PCI dependencies from hw/9pfs/

2013-02-04 Thread Paolo Bonzini
Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistency with the corresponding .c file. Signed-off-by: Paolo Bonzini --- hw/9pfs/virtio-9p-device.c | 53 +- hw/{9p.h => 9pfs/virtio-9p-device.h} |4 +- hw/9pfs/virtio-9p.c

[Qemu-devel] [PATCH 19/19] hw: compile most devices once

2013-02-04 Thread Paolo Bonzini
Most devices moved to hw/ subdirectories (other than hw/ARCH) can now be compiled once only. A notable exception is that many framebuffer devices have assumptions on the target endianness. I have no idea what would happen with OMAP in armeb mode, for example, so I'm leaving them aside. The ARM m

Re: [Qemu-devel] [PATCH 4/4] virtio: console: add flow control

2013-02-04 Thread Blue Swirl
On Mon, Feb 4, 2013 at 12:50 PM, Amit Shah wrote: > The virtio-serial-bus already has the logic to make flow control work > properly. Hook into the char layer's new ability to signal a backend is > writable again. > > Signed-off-by: Amit Shah > --- > hw/virtio-console.c | 13 + > 1

Re: [Qemu-devel] [PATCHv2] virtio-net: remove mq feature flag

2013-02-04 Thread Blue Swirl
On Mon, Feb 4, 2013 at 7:41 AM, Michael S. Tsirkin wrote: > mq flag is not needed: we can look at the number of queues and set > the flag accordingly. > Removing this feature removes ambiguity (what does it mean to have > queues=2 with mq=off?), and simplifies compatibility hacks. > work-around fo

Re: [Qemu-devel] [PATCH] bitops: unify bitops_flsl with host-utils.h, call it bitops_clzl

2013-02-04 Thread Eric Blake
On 02/04/2013 11:26 AM, Richard Henderson wrote: > Similar to the bitops_ctz change just made. > > Signed-off-by: Richard Henderson > --- > include/qemu/bitops.h | 44 +++- > target-i386/topology.h | 2 +- > util/bitops.c | 2 +- > 3 files chan

Re: [Qemu-devel] [PATCH 1/8] cutils: unsigned int parsing functions

2013-02-04 Thread Laszlo Ersek
On 02/04/13 19:27, Eduardo Habkost wrote: > Changes on v7 are trivial: > - Patch refresh after changes on test/Makefile on qemu.git master > - Fix typo on comment on parse_uint() (missing whitespace) > > As the changes are really trivial, I am keeping the Reviewed-by lines > from Eric and Laszl

Re: [Qemu-devel] [PATCH v3 1/3] VFIO: Wrapper for getting reference to vfio_device from device

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - Added vfio_device_get_from_dev() as wrapper to get > reference to vfio_device from struct device. > > - Added vfio_device_data() as a wrapper to get device_data from > vfio_device. > > Signed-o

[Qemu-devel] [PATCH v3 06/10] iohandler: switch to GPollFD

2013-02-04 Thread Stefan Hajnoczi
Convert iohandler_select_fill() and iohandler_select_poll() to use GPollFD instead of rfds/wfds/xfds. Signed-off-by: Stefan Hajnoczi --- include/qemu/main-loop.h | 4 ++-- iohandler.c | 40 ++-- main-loop.c | 4 ++-- 3 files changed

Re: [Qemu-devel] [PATCH] linux-user: Support setgroups syscall with no groups

2013-02-04 Thread Eric Blake
On 02/02/2013 04:04 PM, dill...@dillona.com wrote: > From: Dillon Amburgey > > Signed-off-by: Dillon Amburgey > --- > linux-user/syscall.c | 22 -- > 1 files changed, 12 insertions(+), 10 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index a1

Re: [Qemu-devel] [PATCH] bitops: unify bitops_flsl with host-utils.h, call it bitops_clzl

2013-02-04 Thread Richard Henderson
On 2013-02-04 10:34, Peter Maydell wrote: - } +/* Both this function and the gcc builtin are undefined at 0, whereas + the host-utils functions return word-size at 0. Thus we prefer the + gcc builtin as the closer match. */ I think we should just fix the inconsistency ra

Re: [Qemu-devel] [PATCH] bitops: unify bitops_flsl with host-utils.h, call it bitops_clzl

2013-02-04 Thread Peter Maydell
On 4 February 2013 18:26, Richard Henderson wrote: > /** > - * bitops_fls - find last (most-significant) set bit in a long word > + * bitops_clzl - find last (most-significant) set bit in a long word Should probably change the descriptive text to say "count leading zeros"... > * @word: the wo

Re: [Qemu-devel] [PATCH 18/19] hw: remove CPU dependencies

2013-02-04 Thread Andreas Färber
Am 04.02.2013 18:30, schrieb Paolo Bonzini: > Some devices or headers are using poisoned identifiers. > For .c files, some are useless and we remove them. > > For headers, wrap the definitions in the headers with #if at start of line gets dropped by git. ;) > > Signed-off-by: Paolo Bonzini > -

[Qemu-devel] [PATCH 05/19] virtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX

2013-02-04 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-pci.h |2 +- hw/virtio.h |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h index d24957c..e775525 100644 --- a/hw/virtio-pci.h +++ b/hw/virtio-pci.h @@ -75,7 +75,7 @@ struct VirtIOPCIPro

Re: [Qemu-devel] [PATCH V20 6/8] Add support for cancelling of a TPM command

2013-02-04 Thread Stefan Berger
On 02/04/2013 11:02 AM, Corey Bryant wrote: @@ -221,7 +243,24 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb) static void tpm_passthrough_cancel_cmd(TPMBackend *tb) { -/* cancelling an ongoing command is known not to work with some TPMs */ +TPMPassthruState *tpm_pt

Re: [Qemu-devel] [PATCH 14/19] hw: use default-configs for more devices instead of hw/ARCH/Makefile.objs

2013-02-04 Thread Andreas Färber
Am 04.02.2013 18:29, schrieb Paolo Bonzini: > Other devices are now moved out of hw/ARCH, adding new CONFIG_* > symbols that let them be included selectively in the emulators. > The devices however are still compiled in target-specific > directories. > > Signed-off-by: Paolo Bonzini I don't thin

<    1   2   3   >