[Qemu-devel] How IO emulation is done in QEMU?

2012-07-16 Thread Wei-Ren Chen
Hi all, Yeah, I know reading the code should be the answer... But anyone would like give me an overview on how IO emulation is done in QEMU, so that I can have a start point to dig it out myself? I like to know how much time QEMU spend on IO emulation, so I have to know where/what function shoul

[Qemu-devel] [PATCH v4] Fixes related to processing of qemu's -numa option

2012-07-16 Thread Chegu Vinod
Changes since v3: - using bitmap_set() instead of set_bit() in numa_add() routine. - removed call to bitmak_zero() since bitmap_new() also zeros' the bitmap. - Rebased to the latest qemu. Changes since v2: - Using "unsigned long *" for the node_cpumask[]. - Use bitmap_new() instead

Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization

2012-07-16 Thread YeongKyoon Lee
The reason why softmmu condition in configure is that softmmu is thought to be a logical prerequisite of ldst optimization. Current patch causes compilation error if removed the condition above. To avoid compilation error, it needs more macros in other sources, such as, tcg.c and/or tcg-target.c,

Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w

2012-07-16 Thread Catalin Patulea
On Mon, Jul 16, 2012 at 10:24 PM, Catalin Patulea wrote: > I don't think FPREM > can ever lose precision with respect to its operands. Sorry, this should be, "FPREM can't _gain_ precision" with respect to its operands. Think of the binary representation with infinite precision, where the exponent

[Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w

2012-07-16 Thread Catalin Patulea
I'm just sending this in as a draft for now. There are two outstanding issues: 1) What is the recommended type for bitfields? A quick grep shows inconsistent usage of unsigned int/signed int/uintNN_t across the codebase. Note that mantissa must be 63 bits so int won't do on either 32 or 64-bit bui

[Qemu-devel] Can't Build i386-bsd-user on Freebsd

2012-07-16 Thread Paramjot Oberoi
Hey all, I'm having trouble building user mode BSD emulation on FreeBSD. I've tried 1.0.1, 1.1.1, and stable from GIT. I build by doing a: "./configure --target-list=i386-bsd-user", and then make with "gmake". The first error I get is in regards to CTLTYPE_QUAD. /usr/home/qemu-1.0.1/bsd-us

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi spec: add configuration change event

2012-07-16 Thread Rusty Russell
On Mon, 16 Jul 2012 16:24:37 +0200, Paolo Bonzini wrote: > This adds an event for changes to LUN parameters, for example capacity. These > are reported in virtio-blk via configuration changes, and we want a similar > functionality in virtio-scsi too. Both applied. Thanks! Rusty.

[Qemu-devel] Re [PATCH 00/22] Migration next

2012-07-16 Thread Vinod, Chegu
Hello, I used Juan's latest bits to try out migration on large guest configurations. Workload : a slightly modified SpecJBB. The following is some very preliminary data... (for the non-XBZRLE case). FYI... Vinod Configuration: -- Source & Target Host Hardware : 8 Westmere s

Re: [Qemu-devel] [PATCH 12/16] IPMI: Add a PC ISA type structure

2012-07-16 Thread Corey Minyard
On 07/16/2012 02:16 AM, Paolo Bonzini wrote: Il 15/07/2012 22:25, miny...@acm.org ha scritto: +/* Clear the property from this device so we can put it elsewhere */ +chr = isa->chr; +qdev_prop_set_chr(&dev->qdev, "chardev", NULL); + +if (chr) { + bdev = qdev_create(NULL, "ip

Re: [Qemu-devel] [PATCH 10/16] qom: release previous object when setting

2012-07-16 Thread Corey Minyard
On 07/16/2012 01:24 AM, Paolo Bonzini wrote: Il 15/07/2012 22:25, miny...@acm.org ha scritto: From: Corey Minyard When setting an object, if you don't release the previous object that was there, it may become unusable. This change allows a chardev to be removed from one object's properties an

Re: [Qemu-devel] [PATCH 01/16] smbios: Add a function to directly add an entry

2012-07-16 Thread Corey Minyard
On 07/16/2012 10:46 AM, Eric Blake wrote: On 07/15/2012 02:24 PM, miny...@acm.org wrote: From: Corey Minyard There was no way to directly add a table entry to the SMBIOS table, even though the BIOS supports this. So add a function to do this. This is in preparation for the IPMI handler adding

Re: [Qemu-devel] [PATCH] doc: Fix indefinite article an -> a before nouns that begin with 'h'

2012-07-16 Thread Peter Maydell
On 16 July 2012 22:37, Stefan Weil wrote: > Although the rule also allows 'an' for historical reasons, > 'a' is more common because 'h' is pronounced. > > Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell -- PMM

[Qemu-devel] [PATCH] doc: Fix indefinite article an -> a before nouns that begin with 'h'

2012-07-16 Thread Stefan Weil
Although the rule also allows 'an' for historical reasons, 'a' is more common because 'h' is pronounced. Signed-off-by: Stefan Weil --- qemu-doc.texi |2 +- qemu-tech.texi |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi index 1f20621..

Re: [Qemu-devel] Fw: Qemu-ga : Guest Agent : Win 2008-64bit not working

2012-07-16 Thread Michael Roth
On Mon, Jul 16, 2012 at 01:49:19PM -0700, desi babu wrote: > Any pointers for debugging ?. What version of the virtio-win drivers are you using? More specifically, what's the name of the ISO/package you used? I'm not sure how "Driver Date" maps to actual virto-win releases. There is a test utilit

[Qemu-devel] Qemu device emulation question

2012-07-16 Thread Jaikumar G
Folks, I am looking into Qemu and trying to understand device emulation better. Looking at http://qemu.weilnetz.de/qemu-tech.html#Device-emulation, I see that the address in the guest space is directly mapped to the physical address and thus only the offset to it needs to be used in the guest s

Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target.

2012-07-16 Thread Catalin Patulea
On Mon, Jul 16, 2012 at 5:11 PM, Peter Maydell wrote: > On 16 July 2012 21:00, Catalin Patulea wrote: >> On Mon, Jul 16, 2012 at 3:08 PM, Peter Maydell >> wrote: >>> ccache gcc -m32 -I/home/pm215/src/qemu/qemu/slirp -I. >>> -I/home/pm215/src/qemu/qemu -I/home/pm215/src/qemu/qemu/fpu -I../.. >>>

Re: [Qemu-devel] [PATCH v2 0/2] QOMify AXI stream for Xilinx AXI ethernet/DMA

2012-07-16 Thread Peter Maydell
I guess I should mention that I'm assuming somebody else is going to review this patchset. It looks generally OK to me but whether the stream API has the details of QOM interface use right is a bit out of my area of expertise. -- PMM On 10 July 2012 07:19, Peter Crosthwaite wrote: > Ping^2 > > O

Re: [Qemu-devel] [PATCH v2] Get tests/tcg building and fix an unused variable warning due to wrong extended asm operands.

2012-07-16 Thread Peter Maydell
On 16 July 2012 21:11, Catalin Patulea wrote: > To build/run the tests: > $ cd $BUILD_PATH/tests/tcg > $ SRC_PATH=path/to/qemu make > > Signed-off-by: Catalin Patulea > --- > This should also fix the lock nop error. I just peeked at what bytes my gcc > (4.4.3) generates. Yep, this all builds fo

Re: [Qemu-devel] [PATCH] RFC: vfio-powerpc: added VFIO support (v3)

2012-07-16 Thread Alex Williamson
On Mon, 2012-07-16 at 08:21 -0600, Alex Williamson wrote: > On Sat, 2012-07-14 at 12:34 +1000, Alexey Kardashevskiy wrote: > > On 14/07/12 01:07, Alex Williamson wrote: > > > On Fri, 2012-07-13 at 17:26 +1000, Alexey Kardashevskiy wrote: > > >> It literally does the following: > > >> > > >> 1. POWE

Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target.

2012-07-16 Thread Peter Maydell
On 16 July 2012 21:00, Catalin Patulea wrote: > On Mon, Jul 16, 2012 at 3:08 PM, Peter Maydell > wrote: >> This doesn't seem to be sufficient for test-i386 to compile >> for me: >> ccache gcc -m32 -I/home/pm215/src/qemu/qemu/slirp -I. >> -I/home/pm215/src/qemu/qemu -I/home/pm215/src/qemu/qemu/fp

Re: [Qemu-devel] [PATCH v2 01/17] qapi: fix error propagation

2012-07-16 Thread Luiz Capitulino
On Mon, 16 Jul 2012 22:31:26 +0200 Laszlo Ersek wrote: > On 07/16/12 19:12, Luiz Capitulino wrote: > > On Fri, 13 Jul 2012 21:11:15 +0200 > > Paolo Bonzini wrote: > > > > >> I think doing it for error_set was just for symmetry and to avoid > >> introducing excessive complexity. > > > > We alr

Re: [Qemu-devel] [PATCH v2 01/17] qapi: fix error propagation

2012-07-16 Thread Laszlo Ersek
On 07/16/12 19:12, Luiz Capitulino wrote: > On Fri, 13 Jul 2012 21:11:15 +0200 > Paolo Bonzini wrote: > >> I think doing it for error_set was just for symmetry and to avoid >> introducing excessive complexity. > > We already check if the error is set in several places, and I don't think > it wi

[Qemu-devel] [PATCH v2] Get tests/tcg building and fix an unused variable warning due to wrong extended asm operands.

2012-07-16 Thread Catalin Patulea
To build/run the tests: $ cd $BUILD_PATH/tests/tcg $ SRC_PATH=path/to/qemu make Signed-off-by: Catalin Patulea --- This should also fix the lock nop error. I just peeked at what bytes my gcc (4.4.3) generates. tests/tcg/Makefile| 16 ++-- tests/tcg/test-i386.c |5 +++-- t

Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target.

2012-07-16 Thread Catalin Patulea
On Mon, Jul 16, 2012 at 3:08 PM, Peter Maydell wrote: > You need to have the $(LIBS) after the $^. Done. >> test_path.o: test_path.c >> + $(CC_I386) $(QEMU_INCLUDES) $(GLIB_CFLAGS) $(CFLAGS) $(LDFLAGS) -c >> -o $@ $^ > > Ditto. I don't think I meant to put $(LDFLAGS) in there. This is jus

Re: [Qemu-devel] QEMU VNC Audio - All audio data null

2012-07-16 Thread agraham
On 07/16/2012 09:12 AM, Daniel P. Berrange wrote: On Mon, Jul 16, 2012 at 03:10:25AM +0100, agraham wrote: On 07/16/2012 01:03 AM, malc wrote: On Sun, 15 Jul 2012, agraham wrote: [..snip..] I've found the root cause and hopefully you should be able to reproduce the issue. There was a confi

Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target.

2012-07-16 Thread Peter Maydell
On 13 July 2012 07:55, Catalin Patulea wrote: > Not all tests pass, but at least they can be run using 'make test'. > > To build individual tests: > $ cd $BUILD_PATH/tests/tcg > $ SRC_PATH=path/to/qemu make I don't know enough about our test makefile structure to know if this is right (try Antho

Re: [Qemu-devel] [PATCH v2 01/17] qapi: fix error propagation

2012-07-16 Thread Luiz Capitulino
On Fri, 13 Jul 2012 21:11:15 +0200 Paolo Bonzini wrote: > Il 13/07/2012 19:30, Laszlo Ersek ha scritto: > >>> >> -if (errp == NULL) { > >>> >> +if (errp == NULL || *errp != NULL) { > >> > > >> > I think we should use assert() here. > >> > > >> > If the error is already set, that most pr

[Qemu-devel] KVM call agenda for Tuesday, July 17

2012-07-16 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Later, Juan.

Re: [Qemu-devel] [RFC PATCH 3/4] qapi: Convert delvm

2012-07-16 Thread Eric Blake
On 07/16/2012 02:12 AM, Pavel Hrdina wrote: > On 07/12/2012 07:59 PM, Eric Blake wrote: >> On 07/12/2012 10:55 AM, Pavel Hrdina wrote: >>> Signed-off-by: Pavel Hrdina >>> --- >>> hmp-commands.hx |2 +- >>> hmp.c| 10 ++ >>> hmp.h|1 + >>> qapi-schema.

Re: [Qemu-devel] [QEMU RFC PATCH 6/7] i386: topology & APIC ID utility functions

2012-07-16 Thread Eduardo Habkost
On Sat, Jul 14, 2012 at 09:14:30AM +, Blue Swirl wrote: [...] > >> > diff --git a/tests/Makefile b/tests/Makefile > >> > index b605e14..89bd890 100644 > >> > --- a/tests/Makefile > >> > +++ b/tests/Makefile > >> > @@ -15,6 +15,7 @@ check-unit-y += > >> > tests/test-string-output-visitor$(EXESU

Re: [Qemu-devel] [PATCH v2 05/17] qapi: introduce OptsVisitor

2012-07-16 Thread Luiz Capitulino
On Sat, 14 Jul 2012 00:48:58 +0200 Laszlo Ersek wrote: > On 07/13/12 18:51, Luiz Capitulino wrote: > > On Wed, 13 Jun 2012 10:22:36 +0200 > > Laszlo Ersek wrote: > > >> Repeating an optarg is supported; > > > > I see that the current code supports this too, but why? Something > > like this shou

Re: [Qemu-devel] [PATCH] configure: Fix build with capabilities

2012-07-16 Thread Alexander Graf
On 16.07.2012, at 20:28, Peter Maydell wrote: > On 16 July 2012 18:24, Alexander Graf wrote: >> On 07/16/2012 05:40 PM, Peter Maydell wrote: >>> Hmm, good point -- unlike the actual program compile, failures >>> due to -Werror inside configure are silent and near-invisible. >>> Maybe we should b

Re: [Qemu-devel] [PATCH] configure: Fix build with capabilities

2012-07-16 Thread Peter Maydell
On 16 July 2012 18:24, Alexander Graf wrote: > On 07/16/2012 05:40 PM, Peter Maydell wrote: >> Hmm, good point -- unlike the actual program compile, failures >> due to -Werror inside configure are silent and near-invisible. >> Maybe we should back out 417c9d72 ? > > So how do we deal with the orig

Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target.

2012-07-16 Thread Catalin Patulea
Peter, do you have a second to look at this? I've got a new test in tests/tcg that checks fprem correctness (or at least compares with h/w...) that depends on this. On Fri, Jul 13, 2012 at 4:44 AM, 陳韋任 (Wei-Ren Chen) wrote: > Tested-by: Wei-Ren Chen > > On Fri, Jul 13, 2012 at 02:55:13AM -0400,

Re: [Qemu-devel] qemu fails to build with glibc-2.15

2012-07-16 Thread X O
On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity wrote: > (fixed mailing list) > > On 07/16/2012 03:37 PM, X O wrote: >> Hello, >> >> I suspect upgrading my system to glibc-2.15 was a mistake. It seems to >> be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be >> compiled anymore. Yes, I d

Re: [Qemu-devel] [PATCH v5 4/4] xilinx_zynq: Added SD controllers

2012-07-16 Thread Peter Maydell
On 5 July 2012 05:04, Peter A. G. Crosthwaite wrote: > The Xilinx Zynq device has two SDHCI controllers. Added to the machine model. > > Signed-off-by: Peter A. G. Crosthwaite Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v5 3/4] vl.c: allow for repeated -sd arguments

2012-07-16 Thread Peter Maydell
On 5 July 2012 05:04, Peter A. G. Crosthwaite wrote: > Allows for repeating of -sd arguments in the same way as -pflash and > -mtdblock. > > Signed-off-by: Peter A. G. Crosthwaite > Acked-by: Igor Mitsyanko Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH] configure: Fix build with capabilities

2012-07-16 Thread Alexander Graf
On 07/16/2012 05:40 PM, Peter Maydell wrote: On 16 July 2012 16:35, Eric Blake wrote: On 07/15/2012 07:54 AM, Stefan Weil wrote: Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warn

Re: [Qemu-devel] [PATCH v5 2/4] exynos4210: Added SD host controller model

2012-07-16 Thread Peter Maydell
On 5 July 2012 05:04, Peter A. G. Crosthwaite wrote: > From: Igor Mitsyanko > > Custom Exynos4210 SD/MMC host controller, based on SD association standard > host > controller ver. 2.00. > > Signed-off-by: Igor Mitsyanko > --- > changed from v4 (Igor): > set irq on SLOTINT status instead of inte

Re: [Qemu-devel] [PATCH] configure: do not quote $PKG_CONFIG

2012-07-16 Thread Stefan Weil
Am 16.07.2012 17:39, schrieb Eric Blake: On 07/15/2012 01:54 PM, Stefan Weil wrote: Am 15.07.2012 22:26, schrieb Mike Frysinger: We should not quote the PKG_CONFIG setting as this deviates from the canonical upstream behavior that gets integrated with all other build systems, and deviates from

Re: [Qemu-devel] [PATCH 01/16] smbios: Add a function to directly add an entry

2012-07-16 Thread Eric Blake
On 07/15/2012 02:24 PM, miny...@acm.org wrote: > From: Corey Minyard > > There was no way to directly add a table entry to the SMBIOS table, > even though the BIOS supports this. So add a function to do this. > This is in preparation for the IPMI handler adding it's SMBIOS table > entry. > > Si

Re: [Qemu-devel] [PATCH] configure: Fix build with capabilities

2012-07-16 Thread Peter Maydell
On 16 July 2012 16:35, Eric Blake wrote: > On 07/15/2012 07:54 AM, Stefan Weil wrote: >> Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests >> normally run with -Werror. Some of these tests now fail because they >> raised a compiler warning. > Nothing wrong with this patch,

Re: [Qemu-devel] [PATCH] configure: do not quote $PKG_CONFIG

2012-07-16 Thread Eric Blake
On 07/15/2012 01:54 PM, Stefan Weil wrote: > Am 15.07.2012 22:26, schrieb Mike Frysinger: >> We should not quote the PKG_CONFIG setting as this deviates from the >> canonical upstream behavior that gets integrated with all other build >> systems, and deviates from how we treat all other toolchain v

Re: [Qemu-devel] [PATCH] configure: Fix build with capabilities

2012-07-16 Thread Eric Blake
On 07/15/2012 07:54 AM, Stefan Weil wrote: > Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests > normally run with -Werror. Some of these tests now fail because they > raised a compiler warning. > > This patch fixes support for capabilities. > > Signed-off-by: Stefan Weil

Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types

2012-07-16 Thread Peter Maydell
On 14 July 2012 13:34, Blue Swirl wrote: > bitops.h uses inconsistently 'unsigned long' and 'int' for bit numbers. > > Unify to 'unsigned long' because it generates better code on x86_64. > Adjust asserts accordingly. Still disagree with this patch, for the record. -- PMM

Re: [Qemu-devel] Qemu Live Migration: File Descriptor

2012-07-16 Thread Eric Blake
On 07/14/2012 08:45 AM, siddharth srivastava wrote: > Hi > > I have been exploring various live migration ways that qemu supports. > In the Qemu Migration documentation at: [1], it is only mentioned how > to invoke tcp and exec migration schemes. > But there is no mention of unix and fd migration

[Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-16 Thread Peter Maydell
Add a new QError QERR_PROPERTY_SET_AFTER_REALIZE for attempts to set a QOM or qdev property after the object/device has been realized. This allows a slightly more informative diagnostic than the previous "permission denied" message. Signed-off-by: Peter Maydell --- Changes since the v1 (which was

Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types

2012-07-16 Thread Avi Kivity
On 07/14/2012 03:34 PM, Blue Swirl wrote: > bitops.h uses inconsistently 'unsigned long' and 'int' for bit numbers. > > Unify to 'unsigned long' because it generates better code on x86_64. > Adjust asserts accordingly. > Actually, plain unsigned generates the best code. unsigned longs require

Re: [Qemu-devel] qemu fails to build with glibc-2.15

2012-07-16 Thread Avi Kivity
(fixed mailing list) On 07/16/2012 03:37 PM, X O wrote: > Hello, > > I suspect upgrading my system to glibc-2.15 was a mistake. It seems to > be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be > compiled anymore. Yes, I did search around and that led me to glibc, > resp. http://sou

[Qemu-devel] [PATCH 1/5] scsi-disk: removable hard disks support START/STOP

2012-07-16 Thread Paolo Bonzini
Support for START/STOP UNIT right now is limited to CD-ROMs. This is wrong, since removable hard disks (in the real world: SD card readers) also support it in pretty much the same way. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PATCH 2/5] scsi-disk: report resized disk via sense codes

2012-07-16 Thread Paolo Bonzini
Linux will not use these, but a very similar mechanism will be used to report the condition via virtio-scsi events. Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c |5 + hw/scsi-disk.c | 15 +++ hw/scsi.h |2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) di

[Qemu-devel] [PATCH 5/5] virtio-scsi: report parameter change events

2012-07-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-scsi.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index 83dbabd..80a47d7 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -27,6 +27,7 @@ /* Feature Bits */ #define VIRTIO_SCSI_F_IN

Re: [Qemu-devel] [PATCH v2 3/3] linux-user: exclude SO_TIMESTAMP cmsg_type from unsuppoted ancillary data

2012-07-16 Thread Peter Maydell
On 16 July 2012 11:15, Jing Huang wrote: > This patch excludes SO_TIMESTAMP cmsg_type from unsuppoted ancillary data. "unsupported". > > Signed-off-by: Jing Huang > --- > linux-user/syscall.c |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/linux-user/syscall.c

Re: [Qemu-devel] [PATCH v3 1/2] bitops: drop volatile qualifier

2012-07-16 Thread Eric Blake
On 07/14/2012 06:34 AM, Blue Swirl wrote: > Qualifier 'volatile' is not useful for applications, it's too strict > for single threaded code but does not give the real atomicity guarantees > needed for multithreaded code. > > Drop them and now useless casts. > > -static inline void set_bit(int nr

[Qemu-devel] [PATCH 3/5] scsi: establish precedence levels for unit attention

2012-07-16 Thread Paolo Bonzini
When a device is resized, we will report a unit attention condition for CAPACITY DATA HAS CHANGED. However, we should ensure that this condition does not override a more important unit attention condition. Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 52 ++

[Qemu-devel] [PATCH 4/5] scsi: report parameter changes to HBA drivers

2012-07-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 10 ++ hw/scsi-disk.c |2 +- hw/scsi.h |2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index d5e1fb0..77aa946 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1072,6 +107

Re: [Qemu-devel] [PATCH v2 2/3] linux-user: make do_setsockopt support SOL_RAW ICMP_FILTER socket option

2012-07-16 Thread Peter Maydell
On 16 July 2012 11:14, Jing Huang wrote: > This patch makes do_setsockopt() support SOL_RAW ICMP_FILTER socket option. > > Signed-off-by: Jing Huang > --- > linux-user/syscall.c | 20 > 1 files changed, 20 insertions(+), 0 deletions(-) > > diff --git a/linux-user/syscall.c

[Qemu-devel] [PATCH 2/2] fdc-test: Check RELATIVE SEEK beyond track 0/80

2012-07-16 Thread Kevin Wolf
TODO This needs to be checked against a real drive Signed-off-by: Kevin Wolf --- tests/fdc-test.c | 48 +--- 1 files changed, 37 insertions(+), 11 deletions(-) diff --git a/tests/fdc-test.c b/tests/fdc-test.c index fa74411..56e745a 100644 --- a/test

[Qemu-devel] [PATCH 1/2] fdc-test: Clean up a bit

2012-07-16 Thread Kevin Wolf
Readability of the test code has suffered as the test case evolved. This should improve it a bit again. Signed-off-by: Kevin Wolf --- tests/fdc-test.c | 36 1 files changed, 20 insertions(+), 16 deletions(-) diff --git a/tests/fdc-test.c b/tests/fdc-test.c

[Qemu-devel] [PATCH 0/2] More RELATIVE SEEK fun

2012-07-16 Thread Kevin Wolf
Hi Pavel, you said you have a real floppy drive around. Would you mind giving the cases from patch 2 a try on it? The spec wasn't entirely clear to me, so the values in the test case depend more on guessing than on knowledge. I'm pretty sure that qemu is buggy there, though, so if you like to fix

Re: [Qemu-devel] [PATCH v2 1/3] linux-user: pass sockaddr from host to target

2012-07-16 Thread Peter Maydell
On 16 July 2012 11:13, Jing Huang wrote: > This patch pass sockaddr from host to target. > > Signed-off-by: Jing Huang > --- > linux-user/syscall.c | 10 +- > 1 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 539af3f..

[Qemu-devel] [PATCH 0/5] virtio-scsi: support block_resize

2012-07-16 Thread Paolo Bonzini
This series adds support for block_resize to virtio-scsi. Events are reported via a new event type. Patches to the spec are on the list. Paolo Bonzini (5): scsi-disk: removable hard disks support START/STOP scsi-disk: report resized disk via sense codes scsi: establish precedence levels fo

[Qemu-devel] [PATCH 0/2] virtio-scsi spec: event improvements

2012-07-16 Thread Paolo Bonzini
This makes some changes to the virtio-scsi event specification, so that it is now possible to use virtio-scsi events in the implementation of the QEMU "block_resize" command. Thanks to Cong Meng for finally implementing virtio-scsi hotplug, which made me look at block_resize again! Paolo Bonzini

[Qemu-devel] [PATCH 1/2] virtio-scsi spec: unify event structs

2012-07-16 Thread Paolo Bonzini
All currently defined event structs have the same fields. Simplify the driver by enforcing this also for future structs. Signed-off-by: Paolo Bonzini --- virtio-spec.lyx | 69 +++ 1 file changed, 65 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH 2/2] virtio-scsi spec: add configuration change event

2012-07-16 Thread Paolo Bonzini
This adds an event for changes to LUN parameters, for example capacity. These are reported in virtio-blk via configuration changes, and we want a similar functionality in virtio-scsi too. There is no list of supported parameter changes, instead we just refer to the list of sense codes in the SCSI

Re: [Qemu-devel] [PATCH] RFC: vfio-powerpc: added VFIO support (v3)

2012-07-16 Thread Alex Williamson
On Sat, 2012-07-14 at 12:34 +1000, Alexey Kardashevskiy wrote: > On 14/07/12 01:07, Alex Williamson wrote: > > On Fri, 2012-07-13 at 17:26 +1000, Alexey Kardashevskiy wrote: > >> It literally does the following: > >> > >> 1. POWERPC IOMMU support (the kernel counterpart is required) > >> > >> 2. Th

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Paolo Bonzini
Il 16/07/2012 16:09, Jan Kiszka ha scritto: > On 2012-07-16 16:03, Paolo Bonzini wrote: >> Il 16/07/2012 15:53, Jan Kiszka ha scritto: > > qemu_cond_wait only uses WaitForSingleObject with INFINITE timeout, and > the algorithm relies on that. >>> I see. But this doesn't look complex awf

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Jan Kiszka
On 2012-07-16 16:03, Paolo Bonzini wrote: > Il 16/07/2012 15:53, Jan Kiszka ha scritto: qemu_cond_wait only uses WaitForSingleObject with INFINITE timeout, and the algorithm relies on that. >> I see. But this doesn't look complex awfully. Just move the waker >> signaling from within

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Paolo Bonzini
Il 16/07/2012 15:53, Jan Kiszka ha scritto: >> > >> > qemu_cond_wait only uses WaitForSingleObject with INFINITE timeout, and >> > the algorithm relies on that. > I see. But this doesn't look complex awfully. Just move the waker > signaling from within cond_wait under the mutex as well, maybe add

[Qemu-devel] [PATCH v2 6/6] hw/vexpress.c: Allow >4GB of RAM for Cortex-A15 daughterboard

2012-07-16 Thread Peter Maydell
Now that we have LPAE support and can handle passing 64 bit RAM sizes to Linux via the device tree, we can lift the restriction in the Versatile Express A15 daughterboard model on not having more than 2GB of RAM. Allow up to 30GB, which is the maximum that can fit in the address map before running

Re: [Qemu-devel] [PATCH v3 1/2] fdc: fix relative seek

2012-07-16 Thread Kevin Wolf
Am 16.07.2012 15:48, schrieb Pavel Hrdina: > Signed-off-by: Pavel Hrdina Thanks, applied both to the block branch. Kevin

[Qemu-devel] [PATCH] qemu-options.hx: Improve -nodefaults description

2012-07-16 Thread Pavel Hrdina
From: Michal Novotny This patch improves the description of -nodefaults QEMU command line option by adding more information what is being disabled using this command. Signed-off-by: Michal Novotny --- qemu-options.hx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qe

[Qemu-devel] [PATCH] qemu-options.hx: Improve -{read|write}config options description

2012-07-16 Thread Pavel Hrdina
From: Michal Novotny This is the patch to improve description for -{read|write}config functions. Signed-off-by: Michal Novotny --- qemu-options.hx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e15252e..97245a3 100644 ---

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Jan Kiszka
On 2012-07-16 15:35, Paolo Bonzini wrote: > Il 16/07/2012 15:34, Jan Kiszka ha scritto: >> On 2012-07-16 15:20, Paolo Bonzini wrote: >>> Il 16/07/2012 14:00, Jan Kiszka ha scritto: On 2012-07-16 12:42, Paolo Bonzini wrote: > The new thread pool will use semaphores instead of condition

[Qemu-devel] [PATCH v3 2/2] fdc-test: introduce test_relative_seek

2012-07-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- tests/fdc-test.c | 46 +- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/tests/fdc-test.c b/tests/fdc-test.c index 585fb0e..10d11a4 100644 --- a/tests/fdc-test.c +++ b/tests/fdc-test.c @@ -47,9 +47,11 @@

[Qemu-devel] [PATCH v3 1/2] fdc: fix relative seek

2012-07-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hw/fdc.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index edf0706..9f84931 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1695,7 +1695,7 @@ static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, in

[Qemu-devel] [PATCH v2 3/6] hw/arm_boot.c: Check for RAM sizes exceeding ATAGS capacity

2012-07-16 Thread Peter Maydell
The legacy ATAGS format for passing information to the kernel only allows RAM sizes which fit in 32 bits; enforce this restriction rather than silently doing something weird. Signed-off-by: Peter Maydell --- hw/arm_boot.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --gi

[Qemu-devel] [PATCH v2 1/6] hw/arm_boot.c: Make ram_size a uint64_t

2012-07-16 Thread Peter Maydell
Make the RAM size in arm_boot_info a uint64_t so it can express the larger RAM sizes that may be seen in LPAE systems. Signed-off-by: Peter Maydell --- hw/arm-misc.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/arm-misc.h b/hw/arm-misc.h index 1f96229..bdd8fec 100

[Qemu-devel] [PATCH v2 2/6] hw/arm_boot.c: Consistently use ram_size from arm_boot_info struct

2012-07-16 Thread 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 --- hw/arm_boot.c |5 +++-- 1 files changed, 3 insertion

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Paolo Bonzini
Il 16/07/2012 15:34, Jan Kiszka ha scritto: > On 2012-07-16 15:20, Paolo Bonzini wrote: >> Il 16/07/2012 14:00, Jan Kiszka ha scritto: >>> On 2012-07-16 12:42, Paolo Bonzini wrote: The new thread pool will use semaphores instead of condition variables, because QemuCond does not have qemu_

[Qemu-devel] [PATCH v2 0/6] arm_boot/vexpress-a15: Support >4GB of RAM

2012-07-16 Thread Peter Maydell
From: Peter Maydell This patchset adds support for booting with >4GB of RAM on the Versatile Express Cortex-A15 model. There are some caveats: * you need an LPAE A15 kernel * you need to be booting with device tree * your device tree blob needs to specify #address-cells and #size-cells as 2

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Jan Kiszka
On 2012-07-16 15:20, Paolo Bonzini wrote: > Il 16/07/2012 14:00, Jan Kiszka ha scritto: >> On 2012-07-16 12:42, Paolo Bonzini wrote: >>> The new thread pool will use semaphores instead of condition >>> variables, because QemuCond does not have qemu_cond_timedwait. >> >> I'll post an updated patch (

Re: [Qemu-devel] [PATCH v2 1/2] fdc: fix relative seek

2012-07-16 Thread Pavel Hrdina
On 07/16/2012 03:26 PM, Pavel Hrdina wrote: On 07/16/2012 03:24 PM, Kevin Wolf wrote: Am 16.07.2012 14:25, schrieb Pavel Hrdina: Signed-off-by: Pavel Hrdina --- hw/fdc.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) I applied both to the block branch for now. This restores

Re: [Qemu-devel] [PATCH v2 1/2] fdc: fix relative seek

2012-07-16 Thread Pavel Hrdina
On 07/16/2012 03:24 PM, Kevin Wolf wrote: Am 16.07.2012 14:25, schrieb Pavel Hrdina: Signed-off-by: Pavel Hrdina --- hw/fdc.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) I applied both to the block branch for now. This restores the behaviour as it was before 6be01b1e. How

[Qemu-devel] [PATCH v2 5/6] hw/arm_boot.c: Support DTBs which use 64 bit addresses

2012-07-16 Thread Peter Maydell
Support the case where the device tree blob specifies that #address-cells and #size-cells are greater than 1. (This is needed for device trees which can handle 64 bit physical addresses and thus total RAM sizes over 4GB.) Signed-off-by: Peter Maydell Reviewed-by: Peter A. G. Crosthwaite --- hw/

[Qemu-devel] [PATCH v2 4/6] device_tree: Add support for reading device tree properties

2012-07-16 Thread Peter Maydell
Add support for reading device tree properties (both generic and single-cell ones) to QEMU's convenience wrapper layer. Signed-off-by: Peter Maydell --- device_tree.c | 30 ++ device_tree.h |4 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH v2 1/2] fdc: fix relative seek

2012-07-16 Thread Kevin Wolf
Am 16.07.2012 14:25, schrieb Pavel Hrdina: > Signed-off-by: Pavel Hrdina > --- > hw/fdc.c |6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) I applied both to the block branch for now. This restores the behaviour as it was before 6be01b1e. However, I believe it is still wrong: The

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Paolo Bonzini
Il 16/07/2012 14:00, Jan Kiszka ha scritto: > On 2012-07-16 12:42, Paolo Bonzini wrote: >> The new thread pool will use semaphores instead of condition >> variables, because QemuCond does not have qemu_cond_timedwait. > > I'll post an updated patch (according to last round's review comments) > tha

[Qemu-devel] [PATCH] qemu-options.hx: Fix set_password and expire_password description

2012-07-16 Thread Pavel Hrdina
From: Michal Novotny The description for set_password and expire_password commands is incomplete. This patch fixes the man page that is being generated to match the real behaviour of these functions. Signed-off-by: Michal Novotny --- qemu-options.hx | 17 +++-- 1 file changed, 15

Re: [Qemu-devel] [PATCH 0/3] Introduce virtqueue_get_avail_bytes()

2012-07-16 Thread Amit Shah
On (Fri) 06 Jul 2012 [16:07:06], Amit Shah wrote: > The current virtqueue_avail_bytes() is a weird API: it's oddly-named: > doesn't tell us what the API is going to do, and also suits just one > use-case (that in virtio-net.c). > > Introduce virtqueue_get_avail_bytes(), which returns the number of

[Qemu-devel] [PATCH v2 1/2] fdc: fix relative seek

2012-07-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hw/fdc.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index edf0706..decb1f7 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1705,7 +1705,8 @@ static void fdctrl_handle_relative_seek_out(FDCtrl *fdctrl, int direction)

[Qemu-devel] [PATCH v2 2/2] fdc-test: introduce test_relative_seek

2012-07-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- tests/fdc-test.c | 46 - 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/tests/fdc-test.c b/tests/fdc-test.c index 585fb0e..4bc3515 100644 --- a/tests/fdc-test.c +++ b/tests/fdc-test.c @@ -47,9 +

[Qemu-devel] [PATCH] qemu-thread: Introduce qemu_cond_timedwait for POSIX

2012-07-16 Thread Jan Kiszka
First user will be POSIX compat aio. Windows use cases aren't in sight, so this remains a POSIX-only service for now. This version uses CLOCK_MONOTONIC for the timeout to avoid jumps on wall clock adjustments, provided the host support pthread_condattr_setclock. Signed-off-by: Jan Kiszka --- co

Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Jan Kiszka
On 2012-07-16 12:42, Paolo Bonzini wrote: > The new thread pool will use semaphores instead of condition > variables, because QemuCond does not have qemu_cond_timedwait. I'll post an updated patch (according to last round's review comments) that adds this service for POSIX. I bet you'll find a way

[Qemu-devel] [PATCH 02/12] event_notifier: add Win32 implementation

2012-07-16 Thread Paolo Bonzini
The Win32 implementation of EventNotifier is a trivial wrapper around manual-reset events. Signed-off-by: Paolo Bonzini --- Makefile.objs |4 +- event_notifier.c => event_notifier-posix.c |0 event_notifier-win32.c | 59 +

[Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore

2012-07-16 Thread Paolo Bonzini
The new thread pool will use semaphores instead of condition variables, because QemuCond does not have qemu_cond_timedwait. (I also like it more this way, since semaphores model well the producer-consumer problem). Signed-off-by: Paolo Bonzini --- qemu-thread-posix.c | 74 +

Re: [Qemu-devel] [PATCH] qemu-io: Fix memory leaks

2012-07-16 Thread Stefan Hajnoczi
On Thu, Jul 12, 2012 at 2:02 PM, Kevin Wolf wrote: > Almost all callers of create_iovec() forgot to destroy the qiov when the > request has completed. > > Signed-off-by: Kevin Wolf > --- > qemu-io.c |4 > 1 files changed, 4 insertions(+), 0 deletions(-) Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 05/12] aio: add Win32 implementation

2012-07-16 Thread Paolo Bonzini
The Win32 implementation only accepts EventNotifiers, thus a few drivers are disabled under Windows. It is possible to use the same techniques in main-loop.c and reenable them; alternatively, the drivers can be changed to use threads instead of non-blocking I/O. Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PATCH 06/12] linux-aio: use event notifiers

2012-07-16 Thread Paolo Bonzini
Since linux-aio already uses an eventfd, converting it to use the EventNotifier-based API simplifies the code even though it is not meant to be portable. Signed-off-by: Paolo Bonzini --- linux-aio.c | 49 +++-- 1 file changed, 19 insertions(+), 30 de

[Qemu-devel] [PATCH 04/12] aio: provide platform-independent API

2012-07-16 Thread Paolo Bonzini
This adds to aio.c a platform-independent API based on EventNotifiers, that can be used by the portable thread pool. Signed-off-by: Paolo Bonzini --- aio.c |9 + qemu-aio.h | 19 ++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/aio.c b/aio.c i

  1   2   >