Re: [Qemu-devel] [PATCH] qom: add style guide

2012-08-14 Thread Jens Freimann
On Mon, Aug 13, 2012 at 01:46:46PM -0500, Anthony Liguori wrote: > Signed-off-by: Anthony Liguori > --- > docs/qom-style-guide.md | 489 > +++ > 1 files changed, 489 insertions(+), 0 deletions(-) > create mode 100644 docs/qom-style-guide.md > > diff

Re: [Qemu-devel] [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Jan Kiszka
On 2012-08-13 21:31, Anthony Liguori wrote: > Jan Kiszka writes: > >> On 2012-08-13 15:58, Avi Kivity wrote: >>> On 08/13/2012 04:27 PM, Anthony Liguori wrote: >>> Thanks for pushing this forward! Hopefully this will finally kill off qemu-kvm.git for good. >>> >>> No, it won't. vfio r

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-06 19:05, Peter Maydell wrote: > Move the init of the irqchip_inject_ioctl field of KVMState out of > kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq() > can be used even when no irqchip is created (for architectures > that support async interrupt notification even without

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-06 19:05, Peter Maydell wrote: > Move the init of the irqchip_inject_ioctl field of KVMState out of > kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq() > can be used even when no irqchip is created (for architectures > that support async interrupt notification even without

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Peter Maydell
On 14 August 2012 08:33, Jan Kiszka wrote: > Either you move both or none. OK. > KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e > injection with feedback to allow lost-tick compensation) is the current > standard that other archs should pick up. Can it be documented in the kern

Re: [Qemu-devel] [PATCH uq/master] kvm: i8254: Finish time conversion fix

2012-08-14 Thread Jan Kiszka
On 2012-08-13 20:40, Michael Tokarev wrote: > On 13.08.2012 22:18, Jan Kiszka wrote: >> 0cdd3d1444 fixed reading back the counter load time from the kernel >> while assuming the kernel would always update its load time on writing >> the state. That is only true for channel 1, and so pit_get_channel

[Qemu-devel] [PATCH] dma: Fix stupid typo/thinko

2012-08-14 Thread Benjamin Herrenschmidt
Hi hard a brain fart when coding that function, it will fail to "set" the memory beyond the first 512 bytes. This is in turn causing guest crashes in ibmveth (spapr_llan.c on the qemu side) due to the receive queue not being properly initialized. Signed-off-by: Benjamin Herrenschmidt --- Anthony

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 09:40, Peter Maydell wrote: > On 14 August 2012 08:33, Jan Kiszka wrote: >> Either you move both or none. > > OK. > >> KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e >> injection with feedback to allow lost-tick compensation) is the current >> standard that other a

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 05:24:52PM -0300, Marcelo Tosatti wrote: > On Mon, Aug 13, 2012 at 01:48:39PM -0600, Eric Blake wrote: > > On 08/13/2012 12:21 PM, Marcelo Tosatti wrote: > > > On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: > > >> We can know the guest is panicked when the gue

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Peter Maydell
On 14 August 2012 08:42, Jan Kiszka wrote: > On 2012-08-14 09:40, Peter Maydell wrote: >> On 14 August 2012 08:33, Jan Kiszka wrote: >>> KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e >>> injection with feedback to allow lost-tick compensation) is the current >>> standard that ot

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 09:52, Peter Maydell wrote: > On 14 August 2012 08:42, Jan Kiszka wrote: >> On 2012-08-14 09:40, Peter Maydell wrote: >>> On 14 August 2012 08:33, Jan Kiszka wrote: KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick c

[Qemu-devel] [PATCH] i2c: factor out VMSD to parent class

2012-08-14 Thread Peter A. G. Crosthwaite
Hi All. PMM raised a query on a recent series of mine (the SSI series) about handling VMSD for devices which define state at multiple levels of the QOM heirachy. Rather than complicate the discussion over in my series im trying to start the discussion with an existing subsystem - i2c. This patch is

[Qemu-devel] [PATCH uq/master 1/2] kvm: i8254: Cache kernel clock offset in KVMPITState

2012-08-14 Thread Jan Kiszka
To prepare the final fix for clock calibration issues with the in-kernel PIT, we want to cache the offset between vmclock and the clock used by the in-kernel PIT. So far, we only need to update it when the VM state changes between running and stopped because we only read the in-kernel PIT state whi

[Qemu-devel] [PATCH uq/master 2/2] kvm: i8254: Finish time conversion fix

2012-08-14 Thread Jan Kiszka
0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info returned wrong output pin states for high counter values. Fix this by applying the offs

Re: [Qemu-devel] [PATCH] i2c: factor out VMSD to parent class

2012-08-14 Thread Juan Quintela
"Peter A. G. Crosthwaite" wrote: > Hi All. PMM raised a query on a recent series of mine (the SSI series) about > handling VMSD for devices which define state at multiple levels of the QOM > heirachy. Rather than complicate the discussion over in my series im trying to > start the discussion with

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-08-14 Thread Kevin Wolf
Am 14.08.2012 06:38, schrieb Bharata B Rao: > Kevin, Thanks for your review. I will address all of your comments > in the next iteration, but have a few questions/comments on the others... > > On Mon, Aug 13, 2012 at 02:50:29PM +0200, Kevin Wolf wrote: >>> +static int parse_server(GlusterURI *uri,

[Qemu-devel] memory: could we add extra input param for memory_region_init_io()?

2012-08-14 Thread liu ping fan
To make memoryRegion survive without the protection of qemu big lock, we need to pin its based Object. In current code, the type of mr->opaque are quite different. Lots of them are Object, but quite of them are not yet. The most challenge for changing from memory_region_init_io(..., void *opaque,

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Markus Armbruster
Anthony Liguori writes: > Markus Armbruster writes: > >> Avi Kivity writes: >> >>> On 08/08/2012 12:04 PM, Markus Armbruster wrote: > > Yes please, maybe with a notice to the user. Next problem: minimum RAM size. For instance, -M pc -m X, where X < 32KiB dies "qemu

Re: [Qemu-devel] [PATCH] i2c: factor out VMSD to parent class

2012-08-14 Thread Peter Maydell
On 14 August 2012 09:27, Juan Quintela wrote: > "Peter A. G. Crosthwaite" wrote: >> Hi All. PMM raised a query on a recent series of mine (the SSI series) about >> handling VMSD for devices which define state at multiple levels of the QOM >> heirachy. > - If you ask me, I would very much preffer

Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Stefan Hajnoczi
On Tue, Jul 31, 2012 at 11:18:15PM -0600, Alex Williamson wrote: > This adds the core of the QEMU VFIO-based PCI device assignment driver. > To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, > and CONFIG_VFIO_PCI in your host Linux kernel config. Load the vfio-pci > module.

Re: [Qemu-devel] [PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-14 Thread Sebastian Ott
On Tue, 7 Aug 2012, Cornelia Huck wrote: > +/** > + * ccw_device_get_schid - obtain a subchannel id > + * @cdev: device to obtain the id for > + * @schid: where to fill in the values > + */ > +void ccw_device_get_schid(struct ccw_device *cdev, struct subchannel_id > *schid) > +{ > + *schid =

Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2

2012-08-14 Thread Wenchao Xia
于 2012-8-14 4:00, Blue Swirl 写道: On Mon, Aug 13, 2012 at 11:27 AM, Wenchao Xia wrote: 于 2012-8-11 20:18, Blue Swirl 写道: On Fri, Aug 10, 2012 at 8:04 AM, Wenchao Xia wrote: Thanks for your review, sorry I have forgot some fixing you mentioned before, will correct them this time. 于 201

Re: [Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely

2012-08-14 Thread Supriya Kannery
On 08/03/2012 01:49 AM, Luiz Capitulino wrote: > On Tue, 31 Jul 2012 03:04:22 +0530 > Supriya Kannery wrote: > >> + >> +void bdrv_reopen_commit(BlockDriverState *bs, BDRVReopenState *rs) >> +{ >> +BlockDriver *drv = bs->drv; >> + >> +drv->bdrv_reopen_commit(bs, rs); >> +} >> + >> +void b

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Daniel P. Berrange
On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: > On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: > > We can know the guest is panicked when the guest runs on xen. > > But we do not have such feature on kvm. > > > > Another purpose of this feature is: management app(

[Qemu-devel] [PATCH] MAINTAINERS: Update email address for Stefan Hajnoczi

2012-08-14 Thread Stefan Hajnoczi
Switch to my personal email address. Signed-off-by: Stefan Hajnoczi --- Access to the IBM email address ceases from September 2012. Keeping qemu-trivial moving during September should be no problem. I'll be back 100% and continuing to contribute to QEMU in October again. MAINTAINERS |4 ++

Re: [Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely

2012-08-14 Thread Supriya Kannery
On 08/09/2012 02:43 AM, Jeff Cody wrote: On 07/30/2012 05:34 PM, Supriya Kannery wrote: Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen respective image files. + +

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-08-14 Thread Bharata B Rao
On Tue, Aug 14, 2012 at 10:29:26AM +0200, Kevin Wolf wrote: > > > > Yes, and that will result in port=0, which is default. So this is to > > cater for cases like gluster://[1:2:3:4:5]:/volname/image > > So you consider this a valid URL? I would have expected it to invalid. > But let me see, there

[Qemu-devel] [PATCH 01/10] linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET

2012-08-14 Thread Peter Maydell
The definitions for the ioctl numbers TARGET_BLKBSZGET and TARGET_BLKBSZSET had the wrong size parameters (they are defined with size_t, not int, even though the ioctl implementations themselves read and write integers). Since commit 354a0008 we now have an ioctl wrapper definition for BLKBSZGET an

[Qemu-devel] [PATCH 10/10] linux-user: ARM: Ignore immediate value for svc in thumb mode

2012-08-14 Thread Peter Maydell
From: Alexander Graf When running in thumb mode, Linux doesn't evaluate the immediate value of the svc instruction, but instead just always assumes the syscall number to be in r7. This fixes executing go_bootstrap while building go for me. Signed-off-by: Alexander Graf Reviewed-by: Peter Mayde

Re: [Qemu-devel] [Bug 1035572] Re: Bug in Qemu User Mode

2012-08-14 Thread Peter Maydell
On 14 August 2012 02:01, Dietmar Stölting wrote: > with this new syscall.c content above things are going in the right > direction:-). > I make a test with strace from the program testthread of the Qemu testsuite. > When I understand the result right, > threading works now with this new compiled

[Qemu-devel] [PATCH 06/10] linux-user: make host_to_target_cmsg support SO_TIMESTAMP cmsg_type

2012-08-14 Thread Peter Maydell
From: Jing Huang Signed-off-by: Jing Huang Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/syscall.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 700163e..3fa5299 100644 ---

[Qemu-devel] [PATCH 08/10] linux-user: Factor out guest space probing into a function

2012-08-14 Thread Peter Maydell
From: Meador Inge Signed-off-by: Meador Inge Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/elfload.c | 110 +++--- linux-user/qemu.h| 13 ++ 2 files changed, 90 insertions(+), 33 deletions(-) diff --git a/linux-u

[Qemu-devel] [PULL for-1.2 00/10] linux-user queue

2012-08-14 Thread Peter Maydell
Hi. This is a collection of recent linux-user patches: * my minor fixes for complaints about ioctl mismatches * Jing Huang's fixes for running ping * Meador's guest space probing patches * and some minor fixes from Mike Frysinger and Alex I've put these together as a pullreq with Riku's agreem

[Qemu-devel] [PATCH 02/10] linux-user: Fix SNDCTL_DSP_MAP{IN, OUT}BUF ioctl definitions

2012-08-14 Thread Peter Maydell
Fix the SNDCTL_DSP_MAP{IN,OUT}BUF ioctl definitions so that they refer to a suitably defined target struct layout rather than hardcoding the ioctl number. This fixes complaints from the syscall_init() consistency check when running an x86_64-to-x86_64 linux-user qemu. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 05/10] linux-user: make do_setsockopt support SOL_RAW ICMP_FILTER socket option

2012-08-14 Thread Peter Maydell
From: Jing Huang Signed-off-by: Jing Huang Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/syscall.c | 20 1 file changed, 20 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 47f0eb3..700163e 100644 --- a/linux-user/sy

[Qemu-devel] [PATCH 04/10] linux-user: pass sockaddr from host to target

2012-08-14 Thread Peter Maydell
From: Jing Huang Signed-off-by: Jing Huang Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/syscall.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1af68d2..47f0eb3 100644 --- a/l

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-08-14 Thread Kevin Wolf
Am 14.08.2012 11:34, schrieb Bharata B Rao: > On Tue, Aug 14, 2012 at 10:29:26AM +0200, Kevin Wolf wrote: >>> >>> Yes, and that will result in port=0, which is default. So this is to >>> cater for cases like gluster://[1:2:3:4:5]:/volname/image >> >> So you consider this a valid URL? I would have e

[Qemu-devel] [PATCH 09/10] linux-user: Use init_guest_space when -R and -B are specified

2012-08-14 Thread Peter Maydell
From: Meador Inge Roll the code used to initialize the guest memory space when -R or -B is used into 'init_guest_space' and then call 'init_guest_space' from the driver. This way the reserved guest memory space can be probed for. Calling 'mmap' just once as is currently done is not guaranteed t

[Qemu-devel] [PATCH 03/10] linux-user: Move target_to_host_errno_table[] setup out of ioctl loop

2012-08-14 Thread Peter Maydell
The code to initialise the target_to_host_errno_table[] array was accidentally inside the loop through checking and initialising all the supported ioctls. This was harmless but meant that we reinitialised the array several hundred times on startup. Signed-off-by: Peter Maydell --- linux-user/sys

[Qemu-devel] [PATCH 07/10] flatload: fix bss clearing

2012-08-14 Thread Peter Maydell
From: Mike Frysinger The current bss clear logic assumes the target mmap address and host address are the same. Use g2h to translate from the target address space to the host so we can call memset on it. Signed-off-by: Mike Frysinger Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Avi Kivity
On 08/14/2012 11:44 AM, Markus Armbruster wrote: > > Next error: > > $ gdb --args qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -monitor > stdio -m 640k > [...] > Program received signal SIGSEGV, Segmentation fault. > [...] > (gdb) bt > #0 0x003b0de884ac in __m

Re: [Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely

2012-08-14 Thread Supriya Kannery
On 08/09/2012 06:32 PM, Jeff Cody wrote: > On 08/09/2012 05:20 AM, Kevin Wolf wrote: >> Am 09.08.2012 06:26, schrieb Jeff Cody: >>> On 07/30/2012 05:34 PM, Supriya Kannery wrote: + +void bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp) +{ +BlockDriver *drv =

Re: [Qemu-devel] [PATCH] iscsi: fix race between task completition and task abortion

2012-08-14 Thread Stefan Hajnoczi
On Tue, Aug 14, 2012 at 08:44:46AM +0200, Stefan Priebe wrote: > From: spriebe CCing Ronnie, iSCSI block driver author. > > --- > block/iscsi.c | 36 > 1 files changed, 20 insertions(+), 16 deletions(-) > > diff --git a/block/iscsi.c b/block/iscsi.c > in

Re: [Qemu-devel] [PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-14 Thread Cornelia Huck
On Tue, 14 Aug 2012 10:52:09 +0200 (CEST) Sebastian Ott wrote: > > On Tue, 7 Aug 2012, Cornelia Huck wrote: > > +/** > > + * ccw_device_get_schid - obtain a subchannel id > > + * @cdev: device to obtain the id for > > + * @schid: where to fill in the values > > + */ > > +void ccw_device_get_schi

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread Alexander Graf
On 08/07/2012 04:41 AM, Li Zhang wrote: When -usb option is used, global varible usb_enabled is set. And all the plafrom will create one USB controller according to this variable. In fact, global varibles make code hard to read. So this patch is to remove global variable usb_enabled and add USB

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Jan Kiszka
On 2012-08-14 10:56, Daniel P. Berrange wrote: > On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: >> On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: >>> We can know the guest is panicked when the guest runs on xen. >>> But we do not have such feature on kvm. >>> >>> An

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Jan Kiszka
On 2012-08-14 12:20, Avi Kivity wrote: > On 08/14/2012 11:44 AM, Markus Armbruster wrote: >> >> Next error: >> >> $ gdb --args qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 >> -monitor stdio -m 640k >> [...] >> Program received signal SIGSEGV, Segmentation fault. >> [...] >>

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread Alexander Graf
On 08/07/2012 04:41 AM, Li Zhang wrote: When -usb option is used, global varible usb_enabled is set. And all the plafrom will create one USB controller according to this variable. In fact, global varibles make code hard to read. So this patch is to remove global variable usb_enabled and add USB

Re: [Qemu-devel] memory: could we add extra input param for memory_region_init_io()?

2012-08-14 Thread Avi Kivity
On 08/14/2012 11:30 AM, liu ping fan wrote: > To make memoryRegion survive without the protection of qemu big lock, > we need to pin its based Object. > In current code, the type of mr->opaque are quite different. Lots of > them are Object, but quite of them are not yet. > > The most challenge fo

Re: [Qemu-devel] [PATCH v10 0/7] file descriptor passing using fd sets

2012-08-14 Thread Kevin Wolf
Am 13.08.2012 20:39, schrieb Corey Bryant: > > > On 08/13/2012 02:02 PM, Eric Blake wrote: >> On 08/13/2012 08:08 AM, Corey Bryant wrote: >>> libvirt's sVirt security driver provides SELinux MAC isolation for >>> Qemu guest processes and their corresponding image files. In other >>> words, sVirt

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Avi Kivity
On 08/14/2012 01:44 PM, Jan Kiszka wrote: > On 2012-08-14 12:20, Avi Kivity wrote: >> On 08/14/2012 11:44 AM, Markus Armbruster wrote: >>> >>> Next error: >>> >>> $ gdb --args qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 >>> -monitor stdio -m 640k >>> [...] >>> Program received

Re: [Qemu-devel] [v2 Patch 2/9]block: raw-posix image file reopen

2012-08-14 Thread Supriya Kannery
On 07/31/2012 10:47 PM, Eric Blake wrote: > On 07/30/2012 03:34 PM, Supriya Kannery wrote: >> +s->fd = dup3(raw_rs->stash_s->fd, s->fd, O_CLOEXEC); > > You called it out in your cover letter, but just pointing out that this > is one of the locations that needs a conditional fallback to > dup2/

Re: [Qemu-devel] [PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-14 Thread Sebastian Ott
On Tue, 14 Aug 2012, Cornelia Huck wrote: > Sebastian Ott wrote: > > On Tue, 7 Aug 2012, Cornelia Huck wrote: > > > +/** > > > + * ccw_device_get_schid - obtain a subchannel id > > > + * @cdev: device to obtain the id for > > > + * @schid: where to fill in the values > > > + */ > > > +void ccw_de

[Qemu-devel] [PATCH] xbzrle: fix compilation on ppc32

2012-08-14 Thread Alexander Graf
When compiling the xbzrle code on my ppc32 user space, I hit the following gcc compiler warning (treated as an error): cc1: warnings being treated as errors savevm.c: In function ‘xbzrle_encode_buffer’: savevm.c:2476: error: overflow in implicit constant conversion Fix this by making the ca

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Avi Kivity
On 08/14/2012 10:33 AM, Jan Kiszka wrote: > > KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e > injection with feedback to allow lost-tick compensation) is the current > standard that other archs should pick up. KVM_IRQ_LINE_STATUS may not make sense on all architectures. I don't

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Jan Kiszka
On 2012-08-14 12:51, Avi Kivity wrote: > On 08/14/2012 01:44 PM, Jan Kiszka wrote: >> On 2012-08-14 12:20, Avi Kivity wrote: >>> On 08/14/2012 11:44 AM, Markus Armbruster wrote: Next error: $ gdb --args qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -monitor stdio

Re: [Qemu-devel] [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

2012-08-14 Thread Cornelia Huck
On Tue, 14 Aug 2012 09:40:01 +0930 Rusty Russell wrote: > On Mon, 13 Aug 2012 10:56:38 +0200, Cornelia Huck > wrote: > > On Wed, 08 Aug 2012 13:52:57 +0930 > > Rusty Russell wrote: > > > > > On Tue, 7 Aug 2012 16:52:47 +0200, Cornelia Huck > > > wrote: > > > 1) Please don't limit yourself

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 2/3] Add one new file vga-pci.h and cleanup on all platforms

2012-08-14 Thread Alexander Graf
On 08/07/2012 04:41 AM, Li Zhang wrote: Functions pci_vga_init() and pci_cirrus_vga_init() are declared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the declarations to vga-pci.h, so that they can be shared by all platfo

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread Alexander Graf
On 08/07/2012 04:42 AM, Li Zhang wrote: Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Li Zhang --- hw/spapr.c | 31 +

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 0/3] Add USB enablement and VGA enablement on sPAPR

2012-08-14 Thread Alexander Graf
On 08/07/2012 05:05 PM, Li Zhang wrote: Hi Alex and Andreas, Would you please help review the new version patches? We hope the patches can be merged into 1.2. 1.2 will be freezed soon. Most of it should be unintrusive enough for 1.2. Please just make sure to rework the USB patches quickly.

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 13:01, Avi Kivity wrote: > On 08/14/2012 10:33 AM, Jan Kiszka wrote: >> >> KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e >> injection with feedback to allow lost-tick compensation) is the current >> standard that other archs should pick up. > > KVM_IRQ_LINE_STATUS m

[Qemu-devel] [PATCH uq/master] kvmvapic: Disable if there is insufficient memory

2012-08-14 Thread Jan Kiszka
We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash. Reported-by: Markus Armbruster Signed-off-by: Jan Kiszka --- hw/apic_common.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/apic_common.c b/hw/apic_common.c i

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Markus Armbruster
Avi Kivity writes: > On 08/14/2012 11:44 AM, Markus Armbruster wrote: [...] >> And another one: >> >> $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -monitor >> stdio -m 900k >> QEMU 1.1.50 monitor - type 'help' for more information >> (qemu) KVM internal error. Suberror: 1 >>

Re: [Qemu-devel] [v2 Patch 2/9]block: raw-posix image file reopen

2012-08-14 Thread Supriya Kannery
On 08/10/2012 07:15 PM, Corey Bryant wrote: > > > On 07/30/2012 05:34 PM, Supriya Kannery wrote: >> +static int raw_reopen_prepare(BlockDriverState *bs, BDRVReopenState >> **prs, >> + int flags) >> +{ >> + BDRVRawReopenState *raw_rs = g_malloc0(sizeof(BDRVRawReopenState)); >> + BDRVRawState *s

[Qemu-devel] [PATCH] PPC: spapr: Rework VGA select logic

2012-08-14 Thread Alexander Graf
When selecting our VGA adapter, we want to: * fail completely when we can't satisfy the user's request * support -nographic where no VGA adapter should be spawned This patch reworks the logic so we fulfill the two conditions above. Signed-off-by: Alexander Graf --- hw/spapr.c | 14 ++

Re: [Qemu-devel] [PATCH 15/35] migration: don't rely on any QERR_SOCKET_*

2012-08-14 Thread Juan Quintela
Markus Armbruster wrote: > Luiz Capitulino writes: > >> Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The >> other errors are handled the same by checking if the error is set and >> then calling migrate_fd_error() if it's. >> >> It's also necessary to change inet_connect_opts(

[Qemu-devel] [PATCH] PPC: spapr: Remove global variable

2012-08-14 Thread Alexander Graf
Global variables are bad. Let's move spapr_has_graphics into the machine state struct. Signed-off-by: Alexander Graf --- hw/spapr.c |5 ++--- hw/spapr.h |1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c index 31c4e53..b3d14c3 100644 --- a/hw/spa

Re: [Qemu-devel] [PATCH] audio: Make pcspk card selectable again

2012-08-14 Thread Jan Kiszka
On 2012-07-20 09:17, Jan Kiszka wrote: > From: Jan Kiszka > > Since we moved pcspk into hwlib, CONFIG_PCSPK is no longer defined per > target. Therefore, statically built soundhw array in arch_init.c stopped > including this card. > > Work around this by re-adding this define to config-target.ma

Re: [Qemu-devel] [v2 Patch 2/9]block: raw-posix image file reopen

2012-08-14 Thread Kevin Wolf
Am 14.08.2012 13:13, schrieb Supriya Kannery: > On 08/10/2012 07:15 PM, Corey Bryant wrote: >> >> >> On 07/30/2012 05:34 PM, Supriya Kannery wrote: > >>> +static int raw_reopen_prepare(BlockDriverState *bs, BDRVReopenState >>> **prs, >>> + int flags) >>> +{ >>> + BDRVRawReopenState *raw_rs = g_ma

Re: [Qemu-devel] [PATCH 15/35] migration: don't rely on any QERR_SOCKET_*

2012-08-14 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Luiz Capitulino writes: >> >>> Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The >>> other errors are handled the same by checking if the error is set and >>> then calling migrate_fd_error() if it's. >>> >>> It's also neces

Re: [Qemu-devel] [PATCH uq/master] kvmvapic: Disable if there is insufficient memory

2012-08-14 Thread Markus Armbruster
Jan Kiszka writes: > We need at least 1M of RAM to map the option ROM. Otherwise, we will > corrupt host memory or even crash. Let's put a reproducer in the commit message, if it's not too much trouble. Here's mine: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmenta

[Qemu-devel] [PATCH v2 uq/master] kvmvapic: Disable if there is insufficient memory

2012-08-14 Thread Jan Kiszka
We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped) Reported-and-tested-by: Markus Armbruster Signed-off-by: Jan Kiszka --- hw/apic_common.

Re: [Qemu-devel] [PATCH 06/10] pseries: Export find_phb() utility function for PCI code

2012-08-14 Thread Alexander Graf
On 08/08/2012 04:10 AM, David Gibson wrote: From: Alexey Kardashevskiy The pseries PCI code makes use of an internal find_dev() function which locates a PCIDevice * given a (platform specific) bus ID and device address. Internally this needs to first locate the host bridge on which the device

Re: [Qemu-devel] Qemu memory operations

2012-08-14 Thread Prathmesh Kallurkar
Sorry friends for the misleading instructions in the previous mail. cmp ecx, [r12+0x4] mov r10b, [r13+0x0] mov byte [rax+0xf], 0x0 mov byte [rax+rdx], 0x0 It seems all the above instructions are getting covered with the tcg_gen_ld/st helpers. But now I have stumbled upon another problem : I

[Qemu-devel] [PATCH 0/2] Fix two bugs related to ram_size

2012-08-14 Thread Markus Armbruster
There are more, but let's start with these two. Markus Armbruster (2): vl: Round argument of -m up to multiple of 8KiB pc: Fix RTC CMOS info on RAM for ram_size < 1MiB hw/pc.c | 27 +++ vl.c| 4 +++- 2 files changed, 18 insertions(+), 13 deletions(-) -- 1.7.11.

[Qemu-devel] [PATCH 1/2] vl: Round argument of -m up to multiple of 8KiB

2012-08-14 Thread Markus Armbruster
Partial pages make little sense and don't work. Ensure the RAM size is a multiple of any possible target's page size. Fixes $ qemu-system-x86_64 -nodefaults -S -vnc :0 -monitor stdio -m 0.8 QEMU 1.1.50 monitor - type 'help' for more information (qemu) qemu-system-x86_64: /work/armbru/qemu/exec.c

Re: [Qemu-devel] [PATCH v10 6/7] block: Enable qemu_open/close to work with fd sets

2012-08-14 Thread Kevin Wolf
Am 13.08.2012 16:08, schrieb Corey Bryant: > When qemu_open is passed a filename of the "/dev/fdset/nnn" > format (where nnn is the fdset ID), an fd with matching access > mode flags will be searched for within the specified monitor > fd set. If the fd is found, a dup of the fd will be returned >

Re: [Qemu-devel] [PATCH] iscsi: fix race between task completition and task abortion

2012-08-14 Thread ronnie sahlberg
Stefan H How should I do Acked-by properly, Is a reply with the text Acked-by: Ronnie Sahlberg sufficient ? regards ronnie sahlberg On Tue, Aug 14, 2012 at 8:35 PM, Stefan Hajnoczi wrote: > On Tue, Aug 14, 2012 at 08:44:46AM +0200, Stefan Priebe wrote: >> From: spriebe > > CCing Ronnie,

[Qemu-devel] [PATCH 2/2] pc: Fix RTC CMOS info on RAM for ram_size < 1MiB

2012-08-14 Thread Markus Armbruster
pc_cmos_init() always claims 640KiB base memory, and ram_size - 1MiB extended memory. The latter can underflow to "lots of extended memory". Fix both, and clean up some. Note: SeaBIOS currently requires 1MiB of RAM, and doesn't check whether it got enough. Signed-off-by: Markus Armbruster ---

Re: [Qemu-devel] [PATCH] iscsi: fix race between task completition and task abortion

2012-08-14 Thread Stefan Hajnoczi
On Tue, Aug 14, 2012 at 1:09 PM, ronnie sahlberg wrote: > Is a reply with the text > > Acked-by: Ronnie Sahlberg > > sufficient ? Yes

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread David Gibson
On Tue, Aug 14, 2012 at 10:04:03PM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2012-08-14 at 13:04 +0200, Alexander Graf wrote: > > Thanks, applied to ppc-next without the USB bits. I also get the > > following warning now: > > > > $ ./ppc64-softmmu/qemu-system-ppc64 -nographic -M pseries -ker

Re: [Qemu-devel] [PATCH] trace/simple: Fix compiler warning for 32 bit hosts

2012-08-14 Thread Stefan Hajnoczi
On Mon, Aug 13, 2012 at 09:50:56PM +0200, Stefan Weil wrote: > gcc complains when a 32 bit pointer is casted to a 64 bit integer. > > Cc: Stefan Hajnoczi > Signed-off-by: Stefan Weil > --- > scripts/tracetool/backend/simple.py |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Thank

Re: [Qemu-devel] [0/10] pseries updates and cleanups

2012-08-14 Thread Alexander Graf
On 08/08/2012 04:10 AM, David Gibson wrote: Hi Alex, This series contains all my outstanding pseries updates which aren't dependent on getting a generic patch upstream first. I have a number more which are actually more urgent to get into 1.2, but we need to get some word on the generic patches

Re: [Qemu-devel] [PATCH] xbzrle: fix compilation on ppc32

2012-08-14 Thread Eric Blake
On 08/14/2012 04:55 AM, Alexander Graf wrote: > When compiling the xbzrle code on my ppc32 user space, I hit the following > gcc compiler warning (treated as an error): > > cc1: warnings being treated as errors > savevm.c: In function ‘xbzrle_encode_buffer’: > savevm.c:2476: error: overflow

Re: [Qemu-devel] [PATCH 1/2] vl: Round argument of -m up to multiple of 8KiB

2012-08-14 Thread Avi Kivity
On 08/14/2012 02:58 PM, Markus Armbruster wrote: > Partial pages make little sense and don't work. Ensure the RAM size > is a multiple of any possible target's page size. > > index d01256a..b411d45 100644 > --- a/vl.c > +++ b/vl.c > @@ -2708,11 +2708,13 @@ int main(int argc, char **argv, char **e

Re: [Qemu-devel] [PATCH] trace/simple: Replace asprintf by g_strdup_printf

2012-08-14 Thread Stefan Hajnoczi
On Mon, Aug 13, 2012 at 09:51:16PM +0200, Stefan Weil wrote: > asprintf is not available for all hosts. g_strdup_printf is > more portable and simplifies the code because if does not > need error handling. > > The static variable does not need an explicit assignment to be NULL. > > Cc: Stefan Haj

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread Benjamin Herrenschmidt
On Tue, 2012-08-14 at 13:04 +0200, Alexander Graf wrote: > Thanks, applied to ppc-next without the USB bits. I also get the > following warning now: > > $ ./ppc64-softmmu/qemu-system-ppc64 -nographic -M pseries -kernel > /boot/vmlinux -initrd /boot/initrd -enable-kvm -m 1G -append > root=/dev/nu

[Qemu-devel] [PATCH: RFC] Adding BAR0 for e500 PCI controller

2012-08-14 Thread Bharat Bhushan
PCI Root complex have TYPE-1 configuration header while PCI endpoint have type-0 configuration header. The type-1 configuration header have a BAR (BAR0). In Freescale PCI controller BAR0 is used for mapping pci address space to CCSR address space. This can used for 2 purposes: 1) for MSI interrupt

Re: [Qemu-devel] [PATCH 1/2] vl: Round argument of -m up to multiple of 8KiB

2012-08-14 Thread Markus Armbruster
Avi Kivity writes: > On 08/14/2012 02:58 PM, Markus Armbruster wrote: >> Partial pages make little sense and don't work. Ensure the RAM size >> is a multiple of any possible target's page size. >> >> index d01256a..b411d45 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -2708,11 +2708,13 @@ int main(i

[Qemu-devel] [PATCH 1/6] trace: rename TraceRecordHeader to TraceLogHeader

2012-08-14 Thread Stefan Hajnoczi
From: Harsh Prateek Bora The TraceRecordHeader is really the header for the entire trace log file. It's not per-record header so make this obvious by renaming it. Signed-off-by: Harsh Prateek Bora Signed-off-by: Stefan Hajnoczi --- trace/simple.c |4 ++-- 1 file changed, 2 insertions(+),

[Qemu-devel] [PATCH 2/6] trace: remove unnecessary write_to_buffer() typecasting

2012-08-14 Thread Stefan Hajnoczi
From: Harsh Prateek Bora The buffer argument is void* so it is not necessary to cast. Signed-off-by: Harsh Prateek Bora Signed-off-by: Stefan Hajnoczi --- trace/simple.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trace/simple.c b/trace/simple.c index 5d92939.

[Qemu-devel] [PATCH 5/6] trace/simple: Fix compiler warning for 32 bit hosts

2012-08-14 Thread Stefan Hajnoczi
From: Stefan Weil gcc complains when a 32 bit pointer is casted to a 64 bit integer. Cc: Stefan Hajnoczi Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- scripts/tracetool/backend/simple.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tracetool/

[Qemu-devel] [PATCH 3/6] trace: drop unused TraceBufferRecord->next_tbuf_idx field

2012-08-14 Thread Stefan Hajnoczi
From: Harsh Prateek Bora Signed-off-by: Harsh Prateek Bora Signed-off-by: Stefan Hajnoczi --- trace/simple.c |2 -- trace/simple.h |1 - 2 files changed, 3 deletions(-) diff --git a/trace/simple.c b/trace/simple.c index a0e0f05..4fed07f 100644 --- a/trace/simple.c +++ b/trace/simple.c

Re: [Qemu-devel] [RFC v0] HACK: qom: object_property_set: abort on failure

2012-08-14 Thread Anthony Liguori
"Peter A. G. Crosthwaite" writes: > Hi All. A couple of times now ive had debug issues due to silent failure of > object_property_set. This function silently fails if the requested property > does not exist for the target object. To trap this error I applied the patch > below to my tree, but I am

Re: [Qemu-devel] [Qemu-ppc] [0/10] pseries updates and cleanups

2012-08-14 Thread Alexander Graf
On 08/14/2012 02:34 PM, Alexander Graf wrote: On 08/08/2012 04:10 AM, David Gibson wrote: Hi Alex, This series contains all my outstanding pseries updates which aren't dependent on getting a generic patch upstream first. I have a number more which are actually more urgent to get into 1.2, but

[Qemu-devel] [PATCH 6/6] trace/simple: Replace asprintf by g_strdup_printf

2012-08-14 Thread Stefan Hajnoczi
From: Stefan Weil asprintf is not available for all hosts. g_strdup_printf is more portable and simplifies the code because if does not need error handling. The static variable does not need an explicit assignment to be NULL. Cc: Stefan Hajnoczi Signed-off-by: Stefan Weil Signed-off-by: Stefa

Re: [Qemu-devel] [PATCH 15/35] migration: don't rely on any QERR_SOCKET_*

2012-08-14 Thread Luiz Capitulino
On Tue, 14 Aug 2012 13:35:59 +0200 Markus Armbruster wrote: > Juan Quintela writes: > > > Markus Armbruster wrote: > >> Luiz Capitulino writes: > >> > >>> Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The > >>> other errors are handled the same by checking if the error is

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Peter Maydell
On 14 August 2012 09:09, Jan Kiszka wrote: > On 2012-08-14 09:52, Peter Maydell wrote: >> Well, you appear to know what this variant ioctl does and why it's >> better than KVM_IRQ_LINE, whereas I don't. I just want to deliver >> an interrupt, KVM_IRQ_LINE lets me deliver an interrupt, why >> do I

[Qemu-devel] [PATCH 4/6] trace: avoid pointer aliasing in trace_record_finish()

2012-08-14 Thread Stefan Hajnoczi
From: Harsh Prateek Bora Declaring a TraceRecord on the stack works fine. No need for a uint8_t array and pointer aliasing. Signed-off-by: Harsh Prateek Bora Signed-off-by: Stefan Hajnoczi --- trace/simple.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/trac

[Qemu-devel] [PULL 0/6 1.2] Tracing patches for QEMU 1.2

2012-08-14 Thread Stefan Hajnoczi
The last pull request from 19 July was not merged. Here it is rebased on qemu.git/master with two additional fixes from Stefan Weil. The following changes since commit 633decd71119a4293e5e53e6059026c517a8bef0: Merge remote-tracking branch 'qmp/queue/qmp' into staging (2012-08-13 16:12:35 -050

  1   2   3   >