[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-27 Thread Jan Kiszka
Jun Koi wrote: > On Wed, Apr 28, 2010 at 8:48 AM, Jun Koi wrote: >> On Wed, Apr 28, 2010 at 3:36 AM, Jan Kiszka wrote: >>> Jun Koi wrote: It is not necessary to continue searching for watchpoint when we already found one and setup for handling watchpoint in a search loop in tlb_set

[Qemu-devel] Re: [PATCH v6 05/18] virtio-serial: Use control messages to notify guest of new ports

2010-04-27 Thread Amit Shah
On (Tue) Apr 27 2010 [12:37:00], Anthony Liguori wrote: > On 04/27/2010 07:33 AM, Amit Shah wrote: >> Allow the port 'id's to be set by a user on the command line. This is >> needed by management apps that will want a stable port numbering scheme >> for hot-plug/unplug and migration. >> >> Since th

Re: [Qemu-devel] SPARC not booting SMP Linux kernel

2010-04-27 Thread 陈宇飞
I've tested the latest git HEAD version. But still has the problem. Investigating Linux kernel execution shows that the function which will clear the interrupt is not executed. Here's the relevant kernel code. maybe_smp4m_msg: GET_PROCESSOR4M_ID(o3) set sun4m_interrupts, %l

[Qemu-devel] Question on implementatio of GETPC()

2010-04-27 Thread Jun Koi
Hi, In x86, GETPC() is implemented as below: # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1)) As I understand, it gets the returned address on the stack, then subtract 1 to get back to the above address. Imagine we have code like this (pseudo asm code): CALL .

Re: [Qemu-devel] Multiple monitor interfaces?

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 3:26 AM, Luiz Capitulino wrote: > On Tue, 27 Apr 2010 23:23:45 +0900 > Jun Koi wrote: > >> Hi, >> >> I am wondering if is it possible to have multiple monitor interfaces >> at the same time? If so, how can we open more than one? > >  The following command will create three

[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 8:48 AM, Jun Koi wrote: > On Wed, Apr 28, 2010 at 3:36 AM, Jan Kiszka wrote: >> Jun Koi wrote: >>> It is not necessary to continue searching for watchpoint when we >>> already found one and setup for handling watchpoint in a search loop >>> in tlb_set_page(). >>> This patc

[Qemu-devel] [PATCH] QMP: Introduce RESUME event

2010-04-27 Thread Luiz Capitulino
It's emitted when the Virtual Machine resumes execution. We currently have the STOP event but don't have the matching RESUME one, this means that clients are notified when the VM is stopped but don't get anything when it resumes. Let's fix that as it's already causing some trouble to libvirt. Si

Re: [Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 4:55 AM, Stefan Weil wrote: > Am 22.04.2010 09:02, schrieb Jan Kiszka: >> >> Stefan Weil wrote: >>> >>> Jan Kiszka schrieb: Alexander Graf wrote: > On 21.04.2010, at 12:04, Jun Koi wrote: > > >> On Tue, Apr 20, 2010 at 8:44 PM, Alexander Graf

[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 3:36 AM, Jan Kiszka wrote: > Jun Koi wrote: >> It is not necessary to continue searching for watchpoint when we >> already found one and setup for handling watchpoint in a search loop >> in tlb_set_page(). >> This patch breaks that search loop on then. > > Acked-by: Jan Kis

[Qemu-devel] Re: [PATCH 09/10] kvm: port qemu-kvm's bitmap scanning

2010-04-27 Thread Yoshiaki Tamura
Marcelo Tosatti wrote: On Tue, Apr 27, 2010 at 01:49:15PM +0900, Yoshiaki Tamura wrote: Hi, This patch may conflict with the patch I posted on April 19. http://www.mail-archive.com/qemu-devel@nongnu.org/msg29941.html If Marcelo's is going to be merged, I need to rebase the above to it. It wou

Re: [Qemu-devel] thread synchronization in qcow2.c and qcow2-cluster.c

2010-04-27 Thread Stefan Hajnoczi
On Tue, Apr 27, 2010 at 9:39 PM, Chunqiang (CQ) Tang wrote: > Thank you for the information. I also suspected that > qemu_mutex_lock_iothread() does the synchronization. However, my > profiling showed that qemu-kvm.c:kvm_cpu_exec() in is actually > executed, instead of kvm-all.c:kvm_cpu_exec(). A

[Qemu-devel] [PATCH] Clean up definition of MAX_OPC_PARAM

2010-04-27 Thread Stuart Brady
MAX_OPC_PARAM is intended to refer to the maximum number of entries used in gen_opparam_buf[] for any single helper call. It is currently defined as 10, but for 32-bit archs, the correct value (with a maximum for four helper arguments) is 14, and for 64-bit archs, only 9 entries are needed. tcg_g

[Qemu-devel] Re: [PATCH v2 0/5] fix & clean PPC e300

2010-04-27 Thread Thomas Monjalon
Blue Swirl wrote: > On 4/27/10, Thomas Monjalon wrote: > > The only improvement is in the fix for RFI/RFID. > > Please Blue Swirl, could you test with Altivec ? > > Sorry, I don't have one. Oops, sorry. I have "CCed" the author of the commit 2ada0ed. But it was the SVN old time. I should look

Re: [Qemu-devel] thread synchronization in qcow2.c and qcow2-cluster.c

2010-04-27 Thread Chunqiang (CQ) Tang
> kvm-all.c:kvm_cpu_exec: >        qemu_mutex_unlock_iothread(); >        ret = kvm_vcpu_ioctl(env, KVM_RUN, 0); >        qemu_mutex_lock_iothread(); Thank you for the information. I also suspected that qemu_mutex_lock_iothread() does the synchronization. However, my profiling showed that qemu-kvm

Re: [Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-27 Thread Stefan Weil
Am 22.04.2010 09:02, schrieb Jan Kiszka: Stefan Weil wrote: Jan Kiszka schrieb: Alexander Graf wrote: On 21.04.2010, at 12:04, Jun Koi wrote: On Tue, Apr 20, 2010 at 8:44 PM, Alexander Graf wrote: On 20.04.2010, at 13:38, Jan Kiszka wrote: Alexander Graf wrote: On 20.04.2010, at 09

Re: [Qemu-devel] thread synchronization in qcow2.c and qcow2-cluster.c

2010-04-27 Thread Stefan Hajnoczi
On Tue, Apr 27, 2010 at 5:06 PM, Chunqiang (CQ) Tang wrote: > I just started to read the code of qemu-kvm-0.12.3 recently, and was > puzzled by the thread synchronization issue in qcow2.c and > qcow2-cluster.c. Could someone please enlighten me? Thanks! Is this what you are looking for: kvm-all.

[Qemu-devel] qemu on linux

2010-04-27 Thread K D
Hi This is my first post here. Am not sure if this is right forum. I am trying to get KVM/qemu running on linux. I compiled 2.6.27.10 by enabling "KVM", "KVM for intel" options at configure time. My box is running with KVM enabled inside kernel. I also built qemu-kvm-0.12.2 using above kernel head

Re: [Qemu-devel] [PATCH] microblaze: fix custom fprintf

2010-04-27 Thread Blue Swirl
Thanks, applied. Also clang analyzer had problems with the 'fprintf' variable. On 4/27/10, Thomas Monjalon wrote: > From: Thomas Monjalon > > Using GCC-4.2.4-1ubuntu4, there is a warning: > microblaze-dis.c:792: warning: unused variable 'fprintf' > > Indeed, fprintf() is shadowed by a

[Qemu-devel] Re: [PATCH v2 0/5] fix & clean PPC e300

2010-04-27 Thread Blue Swirl
On 4/27/10, Thomas Monjalon wrote: > From: Thomas Monjalon > > Mainly resending. > > The only improvement is in the fix for RFI/RFID. > Please Blue Swirl, could you test with Altivec ? Sorry, I don't have one. > > --- > > Thomas Monjalon (5): > target-ppc: fix processor versions (PVR) fo

[Qemu-devel] Re: Multiple monitor interfaces?

2010-04-27 Thread Jan Kiszka
Jun Koi wrote: > Hi, > > I am wondering if is it possible to have multiple monitor interfaces > at the same time? If so, how can we open more than one? Provide multiple -mon options on the command line (works with legacy -monitor as well). Moreover, you get one for free once you open a gdb sessio

[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-27 Thread Jan Kiszka
Jun Koi wrote: > It is not necessary to continue searching for watchpoint when we > already found one and setup for handling watchpoint in a search loop > in tlb_set_page(). > This patch breaks that search loop on then. Acked-by: Jan Kiszka > > Signed-off-by: Jun Koi > > diff --git a/exec.c b

Re: [Qemu-devel] Re: [PATCH] Remove IO_MEM_SUBWIDTH.

2010-04-27 Thread Richard Henderson
On 04/26/2010 02:54 PM, Artyom Tarasenko wrote: > This patch introduces a regression. qemu crashes on lance test: I'm not sure how to get to this, since the sparc-test images don't include ifconfig, and I havn't been able to find a sparc install image that works (doesn't support sparc32 or sparc64

Re: [Qemu-devel] Multiple monitor interfaces?

2010-04-27 Thread Luiz Capitulino
On Tue, 27 Apr 2010 23:23:45 +0900 Jun Koi wrote: > Hi, > > I am wondering if is it possible to have multiple monitor interfaces > at the same time? If so, how can we open more than one? The following command will create three monitors (stdio, vc and telnet on port ): # qemu [...] -charde

Re: [Qemu-devel] SPARC not booting SMP Linux kernel

2010-04-27 Thread Blue Swirl
On 4/27/10, 陈宇飞 wrote: > Actually this has been test before. > > http://lists.gnu.org/archive/html/qemu-devel/2006-08/msg00512.html That was before I added SMP support to OpenBIOS. > I've tested Debian 3.1 (with Linux 2.4.27.3) and Debian 4.0 (with > Linux 2.6.18.6), on both qemu 0.10.6 and 0

[Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification

2010-04-27 Thread Anthony Liguori
On 04/27/2010 12:58 PM, Marcelo Tosatti wrote: On Tue, Apr 27, 2010 at 12:41:27PM -0500, Anthony Liguori wrote: On 04/27/2010 07:34 AM, Amit Shah wrote: From: Marcelo Tosatti Wake up iothread when buffers are consumed. Signed-off-by: Marcelo Tosatti Signed-off-by: Amit Shah

Re: [Qemu-devel] Help getting an qemu-alpha environment to work

2010-04-27 Thread Richard Henderson
On 04/26/2010 11:00 PM, q...@zensonic.dk wrote: > 1. avoid the problem? (Give the guest a larger valid address space) Assuming that you don't have a guest program that (ab)uses the "known unused" high bits of the address for type tagging pointers (common in some lisp and virtual machine interpret

Re: [Qemu-devel] NPTL user mode fixes

2010-04-27 Thread Blue Swirl
On 4/27/10, David Munday wrote: > > > > > Hi, > > I starting to work with qemu to enable NPTL dependent binaries to run in > user mode. I see that currently NPTL is not supported for SPARC or x86. > > > > What is still left to do for NPTL support? I'd start by checking what kind of changes are in

[Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification

2010-04-27 Thread Marcelo Tosatti
On Tue, Apr 27, 2010 at 12:41:27PM -0500, Anthony Liguori wrote: > On 04/27/2010 07:34 AM, Amit Shah wrote: > >From: Marcelo Tosatti > > > >Wake up iothread when buffers are consumed. > > > >Signed-off-by: Marcelo Tosatti > >Signed-off-by: Amit Shah > > What's the race here? This looks very odd t

[Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification

2010-04-27 Thread Anthony Liguori
On 04/27/2010 07:34 AM, Amit Shah wrote: From: Marcelo Tosatti Wake up iothread when buffers are consumed. Signed-off-by: Marcelo Tosatti Signed-off-by: Amit Shah What's the race here? This looks very odd to me. Regards, Anthony Liguori --- hw/virtio-serial-bus.c |1 + 1 files

[Qemu-devel] Re: [PATCH v6 05/18] virtio-serial: Use control messages to notify guest of new ports

2010-04-27 Thread Anthony Liguori
On 04/27/2010 07:33 AM, Amit Shah wrote: Allow the port 'id's to be set by a user on the command line. This is needed by management apps that will want a stable port numbering scheme for hot-plug/unplug and migration. Since the port numbers are shared with the guest (to identify ports in control

[Qemu-devel] Re: KVM call minutes for Apr 27

2010-04-27 Thread Chris Wright
* Justin M. Forbes (jmfor...@linuxtx.org) wrote: > On Tue, Apr 27, 2010 at 09:11:00AM -0700, Chris Wright wrote: > > > > stable tree policy (push vs. pull and call for stable volunteers) > > - historically pull based (cherry picking) > > - doesn't scale wwell > > - push based...submit patches di

[Qemu-devel] Re: KVM call minutes for Apr 27

2010-04-27 Thread Justin M. Forbes
On Tue, Apr 27, 2010 at 09:11:00AM -0700, Chris Wright wrote: > > stable tree policy (push vs. pull and call for stable volunteers) > - historically pull based (cherry picking) > - doesn't scale wwell > - push based...submit patches directly to stable tree > - not just add "good for stable" in

[Qemu-devel] Re: [PATCH] work around make bug for *-user builds

2010-04-27 Thread Paolo Bonzini
To restore buildability of the *-user configs, move calls to set-vpath out from under ifdefs, and conditionally provide a path for set-vpath. Uhm, out of curiosity what make is this? Lots of patches have been committed to *-user in the meanwhile, so it looks like a problem in your make. Thi

[Qemu-devel] Re: [PATCH] work around make bug for *-user builds

2010-04-27 Thread Nathan Froyd
On Tue, Apr 27, 2010 at 06:10:50PM +0200, Paolo Bonzini wrote: > On 04/27/2010 05:07 PM, Nathan Froyd wrote: >> To restore buildability of the *-user configs, move calls to set-vpath >> out from under ifdefs, and conditionally provide a path for set-vpath. > > Uhm, out of curiosity what make is thi

[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map

2010-04-27 Thread Marcelo Tosatti
On Tue, Apr 27, 2010 at 08:32:27AM -0600, Cam Macdonell wrote: > > > > +ram_addr_t qemu_ram_map(ram_addr_t size, void *host) > > +{ > > +    RAMBlock *new_block; > > + > > +    size = TARGET_PAGE_ALIGN(size); > > +    new_block = qemu_malloc(sizeof(*new_block)); > > + > > +    new_block->host = hos

[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map

2010-04-27 Thread Marcelo Tosatti
On Tue, Apr 27, 2010 at 08:28:15AM -0600, Cam Macdonell wrote: > On Mon, Apr 26, 2010 at 12:54 PM, Anthony Liguori > wrote: > > On 04/26/2010 01:49 PM, Marcelo Tosatti wrote: > >> > >> On Mon, Apr 26, 2010 at 01:27:30PM -0500, Anthony Liguori wrote: > >> > >>> > >>> On 04/26/2010 12:59 PM, Marcel

[Qemu-devel] Re: [PATCH] work around make bug for *-user builds

2010-04-27 Thread Paolo Bonzini
On 04/27/2010 05:07 PM, Nathan Froyd wrote: To restore buildability of the *-user configs, move calls to set-vpath out from under ifdefs, and conditionally provide a path for set-vpath. Uhm, out of curiosity what make is this? Lots of patches have been committed to *-user in the meanwhile, so

[Qemu-devel] KVM call minutes for Apr 27

2010-04-27 Thread Chris Wright
qemu management interface (and libvirt) - qemu standardizing guest enumeration itself - fs w/ QMP sockets in well-known location per guest or qemud for enumeration - QMP C library - QMP for runtime guest mgmt, but not guest launch, storage pools, networking - selinux, cgroups, tc, etc..done in li

[Qemu-devel] thread synchronization in qcow2.c and qcow2-cluster.c

2010-04-27 Thread Chunqiang (CQ) Tang
Hi there, I just started to read the code of qemu-kvm-0.12.3 recently, and was puzzled by the thread synchronization issue in qcow2.c and qcow2-cluster.c. Could someone please enlighten me? Thanks! Specifically, I found that BDRVQcowState.cluster_allocs, which is a QLIST_HEAD, may be accessed con

[Qemu-devel] [PATCH v2 3/5] target-ppc: exception model of 603e inherits from 603

2010-04-27 Thread Thomas Monjalon
From: Thomas Monjalon It appears in the code that the exception handling of 603e is the same as 603. If there is addon like SRR1[KEY], it is handled without special case for it. So it could be removed safely. Signed-off-by: Thomas Monjalon --- target-ppc/cpu.h|2 -- target-ppc/

[Qemu-devel] [PATCH v2 5/5] ppc: remove dead code

2010-04-27 Thread Thomas Monjalon
From: Thomas Monjalon This function had been disabled from the beginning (see 9fddaa0). cpu_reset() function is in target-ppc/helper.c Signed-off-by: Thomas Monjalon Acked-by: Alexander Graf --- hw/ppc.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/hw/pp

[Qemu-devel] [PATCH v2 2/5] target-ppc: fix interrupt vectors for MPC603 and e300

2010-04-27 Thread Thomas Monjalon
From: Thomas Monjalon The vectors are listed - in the chapter 1.3.3.2 (Implementation-Specific Interrupt Model) of the e300 datasheet [e300CORERM] and - in the chapter 3.5.2 (PowerPC 603 Microprocessor Exception Model) of the MPC603 datasheet. As e300 inherits from MPC603, in

[Qemu-devel] [PATCH v2 4/5] target-ppc: fix RFI by clearing upper bytes of MSR

2010-04-27 Thread Thomas Monjalon
From: Thomas Monjalon Since commit 2ada0ed, "Return From Interrupt" is broken for PPC processors because the upper bits (POW, TGPR, ILE) of MSR were not cleared. Below is a representation of MSR bits: 0 .. 12 13 14 15 16 .. 23 24.. 31 — POW TGPR ILE EE PR

[Qemu-devel] [PATCH v2 0/5] fix & clean PPC e300

2010-04-27 Thread Thomas Monjalon
From: Thomas Monjalon Mainly resending. The only improvement is in the fix for RFI/RFID. Please Blue Swirl, could you test with Altivec ? --- Thomas Monjalon (5): target-ppc: fix processor versions (PVR) for e300 target-ppc: fix interrupt vectors for MPC603 and e300 target-ppc: exception

[Qemu-devel] [PATCH v2 1/5] target-ppc: fix processor versions (PVR) for e300

2010-04-27 Thread Thomas Monjalon
From: Thomas Monjalon Reflect values from the table "Assigned PVR values" in [e300CORERM]. Values for MPC603 and G2 processors could need check/changes also. The reference document (e300CORERM) which is used is: "e300 Power Architecture Core Family Reference Manual", Revision 4, 12/2007. Signe

[Qemu-devel] [PATCH] work around make bug for *-user builds

2010-04-27 Thread Nathan Froyd
When I try to build a linux-user target, I get: Makefile:84: *** missing `endif'. Stop. As best as I can figure out, what happens is that when we call eval from set-vpath, make is checking that there are no dangling conditionals at the end of the input. But in this case make is doing the wrong

[Qemu-devel] Re: [PATCH 09/10] kvm: port qemu-kvm's bitmap scanning

2010-04-27 Thread Marcelo Tosatti
On Tue, Apr 27, 2010 at 01:49:15PM +0900, Yoshiaki Tamura wrote: > Hi, > > This patch may conflict with the patch I posted on April 19. > > http://www.mail-archive.com/qemu-devel@nongnu.org/msg29941.html > > If Marcelo's is going to be merged, I need to rebase the above to it. > It would be help

[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map

2010-04-27 Thread Cam Macdonell
On Mon, Apr 26, 2010 at 11:59 AM, Marcelo Tosatti wrote: > Which allows drivers to register an mmaped region into ram block mappings. > To be used by device assignment driver. > > CC: Cam Macdonell > Signed-off-by: Marcelo Tosatti > --- >  cpu-common.h |    1 + >  exec.c       |   28 +++

[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map

2010-04-27 Thread Cam Macdonell
On Mon, Apr 26, 2010 at 12:54 PM, Anthony Liguori wrote: > On 04/26/2010 01:49 PM, Marcelo Tosatti wrote: >> >> On Mon, Apr 26, 2010 at 01:27:30PM -0500, Anthony Liguori wrote: >> >>> >>> On 04/26/2010 12:59 PM, Marcelo Tosatti wrote: >>> Which allows drivers to register an mmaped region

[Qemu-devel] Multiple monitor interfaces?

2010-04-27 Thread Jun Koi
Hi, I am wondering if is it possible to have multiple monitor interfaces at the same time? If so, how can we open more than one? This might be useful for something like libvirt, so while we leave one monitor port for libvirt, we can still access to another one to control Qemu? Thanks, J

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Gleb Natapov
On Tue, Apr 27, 2010 at 02:38:17PM +0100, Daniel P. Berrange wrote: > On Tue, Apr 27, 2010 at 04:15:54PM +0300, Gleb Natapov wrote: > > On Tue, Apr 27, 2010 at 02:11:46PM +0100, Daniel P. Berrange wrote: > > > On Tue, Apr 27, 2010 at 08:03:42AM -0500, Anthony Liguori wrote: > > > > On 04/27/2010 03

Re: [Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 08:58 AM, Kevin Wolf wrote: Am 27.04.2010 15:48, schrieb Anthony Liguori: On 04/27/2010 08:42 AM, Kevin Wolf wrote: Am 27.04.2010 15:21, schrieb Anthony Liguori: On 04/27/2010 08:18 AM, Kevin Wolf wrote: The watermark is not some complex computed va

Re: [Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Kevin Wolf
Am 27.04.2010 15:48, schrieb Anthony Liguori: > On 04/27/2010 08:42 AM, Kevin Wolf wrote: >> Am 27.04.2010 15:21, schrieb Anthony Liguori: >> >>> On 04/27/2010 08:18 AM, Kevin Wolf wrote: >>> The watermark is not some complex computed value, but actually the statistic itself. We

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-27 Thread Matthias Bolte
2010/4/26 Avi Kivity : > [...] >> In theory, it does support this with the session urls but they are currently second-class citizens in libvirt.  The remote dispatch also adds a fair bit of complexity and at least for the use-cases I'm interested in, it's not an important

[Qemu-devel] Re: [PATCH 5/9] Monitor: Return before exiting with 'quit'

2010-04-27 Thread Paolo Bonzini
On 04/27/2010 03:20 PM, Luiz Capitulino wrote: On Tue, 27 Apr 2010 13:52:29 +0200 Paolo Bonzini wrote: On 04/26/2010 09:44 PM, Luiz Capitulino wrote: +qemu_system_exit_request(); Untested suggestion: why add qemu_system_exit_request, exit_requested, and a hook in the main loop? You can

Re: [Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 08:42 AM, Kevin Wolf wrote: Am 27.04.2010 15:21, schrieb Anthony Liguori: On 04/27/2010 08:18 AM, Kevin Wolf wrote: The watermark is not some complex computed value, but actually the statistic itself. We can get rid of handling a threshold in qemu by just signalling "som

Re: [Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Kevin Wolf
Am 27.04.2010 15:21, schrieb Anthony Liguori: > On 04/27/2010 08:18 AM, Kevin Wolf wrote: >> >> The watermark is not some complex computed value, but actually the >> statistic itself. We can get rid of handling a threshold in qemu by just >> signalling "something has changed with this stat". >> >>

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Daniel P. Berrange
On Tue, Apr 27, 2010 at 04:15:54PM +0300, Gleb Natapov wrote: > On Tue, Apr 27, 2010 at 02:11:46PM +0100, Daniel P. Berrange wrote: > > On Tue, Apr 27, 2010 at 08:03:42AM -0500, Anthony Liguori wrote: > > > On 04/27/2010 03:14 AM, Avi Kivity wrote: > > > >On 04/27/2010 01:36 AM, Anthony Liguori wro

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Gleb Natapov
On Tue, Apr 27, 2010 at 08:19:06AM -0500, Anthony Liguori wrote: > On 04/27/2010 08:05 AM, Gleb Natapov wrote: > >On Tue, Apr 27, 2010 at 08:00:02AM -0500, Anthony Liguori wrote: > >>On 04/27/2010 06:11 AM, Gleb Natapov wrote: > >>>Network cards have low number of rx/tx buffers interrupt. This is a

[Qemu-devel] [PATCH] microblaze: fix custom fprintf

2010-04-27 Thread Thomas Monjalon
From: Thomas Monjalon Using GCC-4.2.4-1ubuntu4, there is a warning: microblaze-dis.c:792: warning: unused variable 'fprintf' Indeed, fprintf() is shadowed by a custom redefinition but is not used because of FORTIFY_SOURCE option which replace calls to fprintf() by fprintf_chk(). So, fpri

Re: [Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 08:18 AM, Kevin Wolf wrote: The watermark is not some complex computed value, but actually the statistic itself. We can get rid of handling a threshold in qemu by just signalling "something has changed with this stat". I'm really not arguing that qemu should do anything complex or

[Qemu-devel] Re: [PATCH 5/9] Monitor: Return before exiting with 'quit'

2010-04-27 Thread Luiz Capitulino
On Tue, 27 Apr 2010 13:52:29 +0200 Paolo Bonzini wrote: > On 04/26/2010 09:44 PM, Luiz Capitulino wrote: > > +qemu_system_exit_request(); > > Untested suggestion: why add qemu_system_exit_request, exit_requested, > and a hook in the main loop? You can do instead > > no_shutdown = 0; >

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 08:05 AM, Gleb Natapov wrote: On Tue, Apr 27, 2010 at 08:00:02AM -0500, Anthony Liguori wrote: On 04/27/2010 06:11 AM, Gleb Natapov wrote: Network cards have low number of rx/tx buffers interrupt. This is also heuristic. Do you think driver should poll for this event ins

Re: [Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Kevin Wolf
Am 27.04.2010 15:10, schrieb Anthony Liguori: > On 04/27/2010 03:53 AM, Kevin Wolf wrote: >> Am 27.04.2010 00:36, schrieb Anthony Liguori: >> >>> On 04/26/2010 05:12 PM, Chris Wright wrote: >>> * Anthony Liguori (anth...@codemonkey.ws) wrote: > On 04/26/2010 12:

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 04:41 AM, Kevin Wolf wrote: Am 27.04.2010 11:32, schrieb Dor Laor: On 04/27/2010 12:22 PM, Avi Kivity wrote: On 04/27/2010 12:08 PM, Dor Laor wrote: On 04/27/2010 11:56 AM, Avi Kivity wrote: On 04/27/2010 11:48 AM, Dor Laor wrote: IMHO th

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Gleb Natapov
On Tue, Apr 27, 2010 at 02:11:46PM +0100, Daniel P. Berrange wrote: > On Tue, Apr 27, 2010 at 08:03:42AM -0500, Anthony Liguori wrote: > > On 04/27/2010 03:14 AM, Avi Kivity wrote: > > >On 04/27/2010 01:36 AM, Anthony Liguori wrote: > > >> > > >>A few comments: > > >> > > >>1) The problem was not b

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Daniel P. Berrange
On Tue, Apr 27, 2010 at 08:03:42AM -0500, Anthony Liguori wrote: > On 04/27/2010 03:14 AM, Avi Kivity wrote: > >On 04/27/2010 01:36 AM, Anthony Liguori wrote: > >> > >>A few comments: > >> > >>1) The problem was not block watermark itself but generating a > >>notification on the watermark threshol

Re: [Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 03:53 AM, Kevin Wolf wrote: Am 27.04.2010 00:36, schrieb Anthony Liguori: On 04/26/2010 05:12 PM, Chris Wright wrote: * Anthony Liguori (anth...@codemonkey.ws) wrote: On 04/26/2010 12:26 PM, Chris Wright wrote: Please send in any agenda items you ar

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Avi Kivity
On 04/27/2010 04:03 PM, Anthony Liguori wrote: On 04/27/2010 03:14 AM, Avi Kivity wrote: On 04/27/2010 01:36 AM, Anthony Liguori wrote: A few comments: 1) The problem was not block watermark itself but generating a notification on the watermark threshold. It's a heuristic and should be imp

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Gleb Natapov
On Tue, Apr 27, 2010 at 08:00:02AM -0500, Anthony Liguori wrote: > On 04/27/2010 06:11 AM, Gleb Natapov wrote: > >Network cards have low number of rx/tx buffers interrupt. This is also > >heuristic. Do you think driver should poll for this event instead and > >NIC designers just wasted their time d

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 03:14 AM, Avi Kivity wrote: On 04/27/2010 01:36 AM, Anthony Liguori wrote: A few comments: 1) The problem was not block watermark itself but generating a notification on the watermark threshold. It's a heuristic and should be implemented based on polling block stats. Pollin

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Anthony Liguori
On 04/27/2010 06:11 AM, Gleb Natapov wrote: Network cards have low number of rx/tx buffers interrupt. This is also heuristic. Do you think driver should poll for this event instead and NIC designers just wasted their time designing the feature? I don't see how the two cases are at all simil

Re: [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure

2010-04-27 Thread Kevin Wolf
Am 27.04.2010 14:52, schrieb Stefan Hajnoczi: > On Tue, Apr 27, 2010 at 11:35 AM, Kevin Wolf wrote: >> --- a/block/qcow2-refcount.c >> +++ b/block/qcow2-refcount.c >> @@ -638,7 +638,7 @@ void qcow2_free_clusters(BlockDriverState *bs, >> ret = update_refcount(bs, offset, size, -1); >> if (r

Re: [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure

2010-04-27 Thread Stefan Hajnoczi
On Tue, Apr 27, 2010 at 11:35 AM, Kevin Wolf wrote: > --- a/block/qcow2-refcount.c > +++ b/block/qcow2-refcount.c > @@ -638,7 +638,7 @@ void qcow2_free_clusters(BlockDriverState *bs, >     ret = update_refcount(bs, offset, size, -1); >     if (ret < 0) { >         fprintf(stderr, "qcow2_free_clust

[Qemu-devel] [PATCH v6 17/18] virtio-serial: Implement flow control for individual ports

2010-04-27 Thread Amit Shah
Individual ports can now signal to the virtio-serial core to stop sending data if the ports cannot immediately handle new data. When a port later unthrottles, any data queued up in the virtqueue are sent to the port. Disable throttling once a port is closed (and we discard all the unconsumed buff

[Qemu-devel] [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification

2010-04-27 Thread Amit Shah
From: Marcelo Tosatti Wake up iothread when buffers are consumed. Signed-off-by: Marcelo Tosatti Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 97694d5..ee868e9

[Qemu-devel] [PATCH v6 16/18] virtio-serial: Discard data that guest sends us when ports aren't connected

2010-04-27 Thread Amit Shah
Before the earlier patch, we relied on incorrect virtio api usage to signal to the guest that a particular buffer wasn't consumed by the host. After fixing that, we now just discard the data the guest sends us while a host port is disconnected or doesn't have a handler registered for consuming dat

[Qemu-devel] [PATCH v6 15/18] virtio-serial: Apps should consume all data that guest sends out / Fix virtio api abuse

2010-04-27 Thread Amit Shah
We cannot indicate to the guest how much data was consumed by an app for out_bufs. So we just have to assume the apps will consume all the data that are handed over to them. Fix the virtio api abuse in control_out() and handle_output(). Signed-off-by: Amit Shah --- hw/virtio-console.c|

[Qemu-devel] [PATCH v6 13/18] virtio-serial: Handle scatter-gather buffers for control messages

2010-04-27 Thread Amit Shah
Current control messages are small enough to not be split into multiple buffers but we could run into such a situation in the future or a malicious guest could cause such a situation. So handle the entire iov request for control messages. Also ensure the size of the control request is >= what we

[Qemu-devel] [PATCH v6 14/18] virtio-serial: Handle scatter/gather input from the guest

2010-04-27 Thread Amit Shah
Current guests don't send more than one iov but it can change later. Ensure we handle that case. Signed-off-by: Amit Shah CC: Avi Kivity --- hw/virtio-serial-bus.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c

[Qemu-devel] [PATCH v6 12/18] iov: Add iov_to_buf and iov_size helpers

2010-04-27 Thread Amit Shah
iov_to_buf() puts the buffer contents in the iov in a linearized buffer. iov_size() gets the length of the contents in the iov. The iov_to_buf() function is the memcpy_to_iovec() function that was used in virtio-ballon.c. Signed-off-by: Amit Shah --- hw/iov.c| 37

[Qemu-devel] [PATCH v6 11/18] iov: Introduce a new file for helpers around iovs, add iov_from_buf()

2010-04-27 Thread Amit Shah
The virtio-net code uses iov_fill() which fills an iov from a linear buffer. The virtio-serial-bus code does something similar in an open-coded function. Create a new iov.c file that has iov_from_buf(). Convert virtio-net and virtio-serial-bus over to use this functionality. virtio-net used ints

[Qemu-devel] [PATCH v6 09/18] virtio-serial: Propagate errors in initialising ports / devices in guest

2010-04-27 Thread Amit Shah
If adding of ports or devices in the guest fails we can send out a QMP event so that management software can deal with it. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-ser

[Qemu-devel] [PATCH v6 10/18] virtio-serial: Send out guest data to ports only if port is opened

2010-04-27 Thread Amit Shah
Data should be written only when ports are open. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 3a09f0d..6befd4d 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/vi

[Qemu-devel] [PATCH v6 08/18] virtio-serial: Update copyright year to 2010

2010-04-27 Thread Amit Shah
Signed-off-by: Amit Shah --- hw/virtio-console.c|2 +- hw/virtio-serial-bus.c |2 +- hw/virtio-serial.h |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 17b221d..6b8 100644 --- a/hw/virtio-console.c +++ b

[Qemu-devel] [PATCH v6 06/18] virtio-serial: whitespace: match surrounding code

2010-04-27 Thread Amit Shah
The virtio-serial code doesn't mix declarations and definitions, so separate them out on different lines. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index bb11a9b

[Qemu-devel] [PATCH v6 05/18] virtio-serial: Use control messages to notify guest of new ports

2010-04-27 Thread Amit Shah
Allow the port 'id's to be set by a user on the command line. This is needed by management apps that will want a stable port numbering scheme for hot-plug/unplug and migration. Since the port numbers are shared with the guest (to identify ports in control messages), we just send a control message

[Qemu-devel] [PATCH v6 07/18] virtio-serial: Remove redundant check for 0-sized write request

2010-04-27 Thread Amit Shah
The check for a 0-sized write request to a guest port is not necessary; the while loop below won't be executed in this case and all will be fine. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/hw/virtio-serial-bus.c

[Qemu-devel] [PATCH v6 04/18] virtio-serial: save/load: Send target host connection status if different

2010-04-27 Thread Amit Shah
If the host connection to a port is closed on the destination machine after migration, whereas the connection was open on the source, the guest has to be informed of that. Similar for a host connection open on the destination. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c | 11 +

[Qemu-devel] [PATCH v6 03/18] virtio-serial: save/load: Ensure we have hot-plugged ports instantiated

2010-04-27 Thread Amit Shah
If some ports that were hot-plugged on the source are not available on the destination, fail migration instead of trying to deref a NULL pointer. Signed-off-by: Amit Shah Reported-by: Juan Quintela --- hw/virtio-serial-bus.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH v6 02/18] virtio-serial: save/load: Ensure nr_ports on src and dest are same.

2010-04-27 Thread Amit Shah
The number of ports on the source as well as the destination machines should match. If they don't, it means some ports that got hotplugged on the source aren't instantiated on the destination. Or that ports that were hot-unplugged on the source are created on the destination. Signed-off-by: Amit S

[Qemu-devel] [PATCH v6 01/18] virtio-serial: save/load: Ensure target has enough ports

2010-04-27 Thread Amit Shah
The target could be started with max_nr_ports for a virtio-serial device lesser than what was available on the source machine. Fail the migration in such a case. Signed-off-by: Amit Shah Reported-by: Juan Quintela --- hw/virtio-serial-bus.c | 13 +++-- 1 files changed, 11 insertions(+

[Qemu-devel] [PATCH v6 00/18] PULL: virtio-serial fixes

2010-04-27 Thread Amit Shah
Hi Anthony, The following changes since commit 14a6063a91083c9cbe1bc502ee58fc7ca146bc1a: Richard Henderson (1): Implement cpu_get_real_ticks for Alpha. are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/amit/vs-qemu-kvm.git for-anthony This series

[Qemu-devel] Re: [PATCH 5/9] Monitor: Return before exiting with 'quit'

2010-04-27 Thread Paolo Bonzini
On 04/26/2010 09:44 PM, Luiz Capitulino wrote: +qemu_system_exit_request(); Untested suggestion: why add qemu_system_exit_request, exit_requested, and a hook in the main loop? You can do instead no_shutdown = 0; qemu_system_shutdown_request(); which will actually call quit_timers

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Gleb Natapov
On Mon, Apr 26, 2010 at 05:36:52PM -0500, Anthony Liguori wrote: > On 04/26/2010 05:12 PM, Chris Wright wrote: > >* Anthony Liguori (anth...@codemonkey.ws) wrote: > >>On 04/26/2010 12:26 PM, Chris Wright wrote: > >>>Please send in any agenda items you are interested in covering. > >>> > >>>While I

[Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure

2010-04-27 Thread Kevin Wolf
While it's true that during regular operation free_clusters failure would be a bug, an I/O error can always happen. There's no need to kill the VM, the worst thing that can happen (and it will) is that we leak some clusters. Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c |2 +- 1 files

[Qemu-devel] Re: Problem with watchpoint in gdbstub

2010-04-27 Thread Jan Kiszka
Jun Koi wrote: > On Tue, Apr 27, 2010 at 6:30 PM, Jan Kiszka wrote: >> Jun Koi wrote: >>> On Tue, Apr 27, 2010 at 5:10 PM, Jan Kiszka wrote: Jun Koi wrote: > Hi, > > I am trying to debug a VM using gdb. I connected gdb to Qemu (latest > code from git repo), and issued below c

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Kevin Wolf
Am 27.04.2010 11:32, schrieb Dor Laor: > On 04/27/2010 12:22 PM, Avi Kivity wrote: >> On 04/27/2010 12:08 PM, Dor Laor wrote: >>> On 04/27/2010 11:56 AM, Avi Kivity wrote: On 04/27/2010 11:48 AM, Dor Laor wrote: > IMHO the whole thing is way over engineered: > a) Having another channel

[Qemu-devel] Re: Problem with watchpoint in gdbstub

2010-04-27 Thread Jun Koi
On Tue, Apr 27, 2010 at 6:30 PM, Jan Kiszka wrote: > Jun Koi wrote: >> On Tue, Apr 27, 2010 at 5:10 PM, Jan Kiszka wrote: >>> Jun Koi wrote: Hi, I am trying to debug a VM using gdb. I connected gdb to Qemu (latest code from git repo), and issued below command: ... >>

[Qemu-devel] Re: KVM call agenda for Apr 27

2010-04-27 Thread Dor Laor
On 04/27/2010 12:22 PM, Avi Kivity wrote: On 04/27/2010 12:08 PM, Dor Laor wrote: On 04/27/2010 11:56 AM, Avi Kivity wrote: On 04/27/2010 11:48 AM, Dor Laor wrote: Here's another option: an nbd-like protocol that remotes all BlockDriver operations except read and write over a unix domain socke

  1   2   >