[Qemu-devel] [PATCH v2] ivshmem: add a new PIO BAR3(Doorbell) besides MMIO BAR0 to reduce notification time

2011-11-17 Thread zanghongyong
From: Hongyong Zang This patch, adds a PIO BAR3 for guest notifying qemu. And we find the new notification way of PIO BAR3 reduces 30% time in comparison with the original MMIO BAR0 way. Signed-off-by: Hongyong Zang --- hw/ivshmem.c | 24 ++-- kvm-all.c| 23 ++

Re: [Qemu-devel] [Bug 891525] [NEW] Guest kernel crashes when booting a NUMA guest without explicitly specifying cpus= in -numa option

2011-11-17 Thread Bharata B Rao
The reason for guest kernel crash is because qemu enumerates the VCPUs in a round robin fashion between the nodes. As per this comment from vl.c, guest kernel is supposed to handle this: /* assigning the VCPUs round-robin is easier to implement, guest OSes * must cope with this anyway, because th

Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd

2011-11-17 Thread Chun Yan Liu
Yes. I have tested using same device twice as described in my previous mail. Without lock: If issuing "qemu-nbd -c /dev/nbd0 disk.img" and "qemu-nbd -c /dev/nbd0 disk1.img" almost at the same time, both can pass nbd_init() and get to nbd_client(), then the latter one will fail and exit, but t

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Luiz Capitulino
On Thu, 17 Nov 2011 19:09:10 +0200 Barak Azulay wrote: > On Wednesday 16 November 2011 22:24:51 Adam Litke wrote: > > I have been following this thread pretty closely and the one sentence > > summary of the current argument is: ovirt-guest-agent is already > > featureful and tested, so let's drop

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-17 Thread Scott Wood
On Thu, Nov 17, 2011 at 01:22:17PM -0700, Alex Williamson wrote: > On Wed, 2011-11-16 at 11:52 -0500, Konrad Rzeszutek Wilk wrote: > > On Fri, Nov 11, 2011 at 03:10:56PM -0700, Alex Williamson wrote: > > What would be the return value if somebody tried to unmask an edge one? > > Should that be docu

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-17 Thread Alex Williamson
On Wed, 2011-11-16 at 11:47 -0600, Scott Wood wrote: > On 11/11/2011 04:10 PM, Alex Williamson wrote: > > > > Thanks Konrad! Comments inline. > > > > On Fri, 2011-11-11 at 12:51 -0500, Konrad Rzeszutek Wilk wrote: > >> On Thu, Nov 03, 2011 at 02:12:24PM -0600, Alex Williamson wrote: > >>> +When

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-17 Thread Alex Williamson
On Wed, 2011-11-16 at 11:52 -0500, Konrad Rzeszutek Wilk wrote: > On Fri, Nov 11, 2011 at 03:10:56PM -0700, Alex Williamson wrote: > > > > + > > > > +Regions are described by a struct vfio_region_info, which is retrieved > > > > by > > > > +using the GET_REGION_INFO ioctl with vfio_region_info.in

Re: [Qemu-devel] wiki summary

2011-11-17 Thread Michael Roth
On 11/17/2011 10:34 AM, Barak Azulay wrote: On Thursday 17 November 2011 02:48:50 Michael Roth wrote: I've tried to summarize the pros/cons, points, and proposals outlined in this thread at the following wiki: http://www.ovirt.org/wiki/Guest_agent_proposals Please feel free to add/edit as need

Re: [Qemu-devel] [RFC] Add a .mailmap to map pre-git-conversion authors to friendly names

2011-11-17 Thread Anthony Liguori
On 11/17/2011 12:10 PM, Peter Maydell wrote: ...nobody cares at all either way? (in which case we should commit it for my personal benefit if nothing else ;-)) Oh, I just missed it since it didn't have [PATCH] in the header. I'd be happy to apply this. Regards, Anthony Liguori -- PMM O

[Qemu-devel] [Bug 611142] Re: seabios should have native scsi support

2011-11-17 Thread Serge Hallyn
** Changed in: seabios (Ubuntu) Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/611142 Title: seabios should have native scsi support Status in QEMU: New Statu

[Qemu-devel] [PATCH] gdbstub: Fix GDBRegisterState memory leak and use g_new0 to allocate it

2011-11-17 Thread Stefan Weil
cppcheck reported a memory leak which is fixed here. I also replaced the corresponding g_malloc0 by g_new0 because that helps reviewers, and it is required by latest recommendations anyway. Signed-off-by: Stefan Weil --- gdbstub.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [RFC] Add a .mailmap to map pre-git-conversion authors to friendly names

2011-11-17 Thread Peter Maydell
...nobody cares at all either way? (in which case we should commit it for my personal benefit if nothing else ;-)) -- PMM On 26 October 2011 18:36, Peter Maydell wrote: > Add a .mailmap file so 'git shortlog' can map the unfriendly > pre-git-conversion author entries to real names. > > Signed-of

[Qemu-devel] [PATCH 2/5] Makefile: remove more generated files on clean

2011-11-17 Thread Luiz Capitulino
From: "Michael S. Tsirkin" make clean missed the source qmp files generated by python. Fix that. Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- Makefile |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makef

[Qemu-devel] [PATCH 3/5] Makefile: fix dependencies for generated .h, .c

2011-11-17 Thread Luiz Capitulino
From: "Michael S. Tsirkin" We have a single rule generating .c and .h files, so .h doesn't depend on .c: both depend on the source schema. Fix Makefile to reflect that - without this, if .c is there and .h is missing, Makefile does not know how to remake .h and assumes it's a dummy target, trigg

[Qemu-devel] [PATCH 5/5] Makefile: fix qga dependencies

2011-11-17 Thread Luiz Capitulino
From: "Michael S. Tsirkin" .c files include .h files, so .o depends on .h, and the linked result depends on .o. We got it wrong for qga rules, fix it up. Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- Makefile |9 + 1 files changed

[Qemu-devel] [PATCH 4/5] Makefile: dependency fix

2011-11-17 Thread Luiz Capitulino
From: "Michael S. Tsirkin" qga/guest-agent-commands.c includes qga-qmp-commands.h, but it was missing in its dependencies. Add it in QGALIB_GEN. Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- Makefile |2 +- 1 files changed, 1 insertions(+

[Qemu-devel] [PATCH 1/5] qapi: Check for negative enum values

2011-11-17 Thread Luiz Capitulino
We don't currently check for negative enum values in qmp_output_type_enum(), this will very likely generate a segfault when triggered. However, it _seems_ that no code in tree can trigger this today. Acked-by: Michael Roth Signed-off-by: Luiz Capitulino --- qapi/qmp-output-visitor.c |2 +-

[Qemu-devel] [PULL 0/5]: QMP patches for 1.0

2011-11-17 Thread Luiz Capitulino
Anthony, This pull contains a fix for the enum type handling plus Michael's Makefile fixes. The changes (since 3f5bd4e1b874590d3d76e031530799a4610da6dc) are available in the following repository: git://repo.or.cz/qemu/qmp-unstable.git queue/qmp-1.0 Luiz Capitulino (1): qapi: Check for

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Barak Azulay
On Wednesday 16 November 2011 22:24:51 Adam Litke wrote: > I have been following this thread pretty closely and the one sentence > summary of the current argument is: ovirt-guest-agent is already > featureful and tested, so let's drop qemu-ga and have everyone adopt > ovirt-guest-agent. Not exa

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Eric Gaulin
On Thu, Nov 17, 2011 at 11:14 AM, Daniel P. Berrange wrote: > On Thu, Nov 17, 2011 at 09:58:33AM -0600, Adam Litke wrote: >> On Thu, Nov 17, 2011 at 03:46:37AM -0500, Ayal Baron wrote: >> > >> > >> > - Original Message - >> > > I have been following this thread pretty closely and the one s

Re: [Qemu-devel] wiki summary

2011-11-17 Thread Barak Azulay
On Thursday 17 November 2011 02:48:50 Michael Roth wrote: > I've tried to summarize the pros/cons, points, and proposals outlined in > this thread at the following wiki: > > http://www.ovirt.org/wiki/Guest_agent_proposals > > Please feel free to add/edit as needed. If you don't have an account on

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Daniel P. Berrange
On Thu, Nov 17, 2011 at 09:58:33AM -0600, Adam Litke wrote: > On Thu, Nov 17, 2011 at 03:46:37AM -0500, Ayal Baron wrote: > > > > > > - Original Message - > > > I have been following this thread pretty closely and the one sentence > > > summary of the current argument is: ovirt-guest-agen

[Qemu-devel] [PATCH 1/8] qcow2: Return real error code in qcow2_read_snapshots

2011-11-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 25 - block/qcow2.c |5 +++-- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index fb7f58c..db49bb3 100644 --- a/block/qcow2-snapshot.c ++

Re: [Qemu-devel] [[PATCH V2] 0/5]

2011-11-17 Thread Avi Kivity
On 11/17/2011 03:22 PM, Benoît Canet wrote: > These patches converts the remaining sh4 devices to the memory API. > The patch "sh_intc: convert interrupt controller to memory API" is > somewhat tricky > > Thanks, applied. Please adjust your editor to display tabs as 8 positions, not 4. Your patc

Re: [Qemu-devel] [PATCH V2 00/12] Proxy FS driver for VirtFS

2011-11-17 Thread Stefan Hajnoczi
On Tue, Nov 15, 2011 at 12:09 PM, M. Mohan Kumar wrote: > Changes from previous version: > > 1) Communication between qemu and helper process is similar to 9p way of > packing > elements (pdu marshaling). There is code I haven't reviewed yet but I think it will change as you add input validation,

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Adam Litke
On Thu, Nov 17, 2011 at 03:46:37AM -0500, Ayal Baron wrote: > > > - Original Message - > > I have been following this thread pretty closely and the one sentence > > summary of the current argument is: ovirt-guest-agent is already featureful > > and tested, so let's drop qemu-ga and have e

[Qemu-devel] [PATCH 0/8] qcow2: Fix error paths for internal snapshots

2011-11-17 Thread Kevin Wolf
This is more or less the same kind of fixes that we made in the rest of qcow2 last year: Return the right error codes and make the order of operations safe so that a crash can lead to no more than cluster leaks. Although all of these are bug fixes, I'm not so sure about taking them into 1.0. Maybe

Re: [Qemu-devel] [PATCH V2 04/12] hw/9pfs: Open and create files

2011-11-17 Thread Stefan Hajnoczi
On Tue, Nov 15, 2011 at 11:57 AM, M. Mohan Kumar wrote: > +static void send_fd(int sockfd, int fd) > +{ > +    struct msghdr msg = { }; > +    struct iovec iov; > +    struct cmsghdr *cmsg; > +    int retval, data; > +    union MsgControl msg_control; > + > +    iov.iov_base = &data; > +    iov.io

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Alon Levy
On Wed, Nov 16, 2011 at 08:59:35AM -0600, Michael Roth wrote: > On 11/16/2011 02:16 AM, Ayal Baron wrote: > > > > > >- Original Message - > >>Hi, > >> > >>On 11/15/2011 11:39 PM, Ayal Baron wrote: > >>> > >> > >> > >> > If you want to talk about convergence, the discussion should start

[Qemu-devel] [PATCH 7/8] qcow2: Fix order in qcow2_snapshot_delete

2011-11-17 Thread Kevin Wolf
First the snapshot must be deleted and only then the refcounts can be decreased. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 48 +--- 1 files changed, 33 insertions(+), 15 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-sna

[Qemu-devel] [PATCH V4 10/10] Introduce Xen PCI Passthrough, MSI (3/3)

2011-11-17 Thread Anthony PERARD
From: Jiang Yunhong A more complete history can be found here: git://xenbits.xensource.com/qemu-xen-unstable.git Signed-off-by: Jiang Yunhong Signed-off-by: Shan Haitao Signed-off-by: Anthony PERARD --- Makefile.target |1 + hw/apic-msidef.h |

[Qemu-devel] [PATCH V4 07/10] Introduce Xen PCI Passthrough, qdevice (1/3)

2011-11-17 Thread Anthony PERARD
From: Allen Kay A more complete history can be found here: git://xenbits.xensource.com/qemu-xen-unstable.git Signed-off-by: Allen Kay Signed-off-by: Guy Zana Signed-off-by: Anthony PERARD --- Makefile.target |2 + hw/xen_common.h |3 + hw/xen

[Qemu-devel] [PATCH V4 09/10] Introduce apic-msidef.h

2011-11-17 Thread Anthony PERARD
This patch move the msi definition from apic.c to apic-msidef.h. So it can be used also by other .c files. Signed-off-by: Anthony PERARD Cc: Michael S. Tsirkin --- hw/apic-msidef.h | 28 hw/apic.c| 11 +-- 2 files changed, 29 insertions(+), 10 de

[Qemu-devel] [PATCH V4 03/10] pci_regs: Add PCI_EXP_TYPE_PCIE_BRIDGE

2011-11-17 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/pci_regs.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci_regs.h b/hw/pci_regs.h index 6b42515..56a404b 100644 --- a/hw/pci_regs.h +++ b/hw/pci_regs.h @@ -392,6 +392,7 @@ #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port

[Qemu-devel] [PATCH V4 04/10] configure: Introduce --enable-xen-pci-passthrough.

2011-11-17 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Makefile.target |2 ++ configure | 25 + 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/Makefile.target b/Makefile.target index a111521..2e881ce 100644 --- a/Makefile.target +++ b/Makefile.target @@ -219,6 +219

[Qemu-devel] [PATCH V4 02/10] pci_regs: Fix value of PCI_EXP_TYPE_RC_EC.

2011-11-17 Thread Anthony PERARD
Value check in PCI Express Base Specification rev 1.1 Signed-off-by: Anthony PERARD --- hw/pci_regs.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci_regs.h b/hw/pci_regs.h index e8357c3..6b42515 100644 --- a/hw/pci_regs.h +++ b/hw/pci_regs.h @@ -393,7 +393,7 @@

[Qemu-devel] [PATCH V4 06/10] pci.c: Add pci_check_bar_overlap

2011-11-17 Thread Anthony PERARD
From: Yuji Shimada This function help Xen PCI Passthrough device to check for overlap. Signed-off-by: Yuji Shimada Signed-off-by: Anthony PERARD --- hw/pci.c | 47 +++ hw/pci.h |3 +++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --

[Qemu-devel] [PATCH V4 05/10] Introduce HostPCIDevice to access a pci device on the host.

2011-11-17 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Makefile.target |1 + hw/host-pci-device.c | 279 ++ hw/host-pci-device.h | 75 ++ 3 files changed, 355 insertions(+), 0 deletions(-) create mode 100644 hw/host-pci-device.c create mode 100

[Qemu-devel] [PATCH V4 01/10] pci_ids: Add INTEL_82599_VF id.

2011-11-17 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/pci_ids.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci_ids.h b/hw/pci_ids.h index 83f3893..2ea5ec2 100644 --- a/hw/pci_ids.h +++ b/hw/pci_ids.h @@ -117,6 +117,7 @@ #define PCI_DEVICE_ID_INTEL_82801I_UHCI6 0x2939 #define PCI

[Qemu-devel] [PATCH V4 00/10] Xen PCI Passthrough

2011-11-17 Thread Anthony PERARD
Hi all, This patch series introduces the PCI passthrough for Xen. First, we have HostPCIDevice that help to access one PCI device of the host. Then, there is an additions in the QEMU code, pci_check_bar_overlap. There are also several change in pci_ids and pci_regs. Last part, but not least,

[Qemu-devel] [PATCH 8/8] qcow2: Fix error path in qcow2_snapshot_load_tmp

2011-11-17 Thread Kevin Wolf
If the bdrv_read() of the snapshot's L1 table fails, return the right error code and make sure that the old L1 table is still loaded and we don't break the BlockDriverState completely. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 33 + 1 files changed,

[Qemu-devel] [PATCH 5/8] qcow2: Return real error in qcow2_snapshot_goto

2011-11-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 50 +-- 1 files changed, 39 insertions(+), 11 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 066d56b..9f6647f 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow

[Qemu-devel] [PATCH 6/8] qcow2: Fix order of refcount updates in qcow2_snapshot_goto

2011-11-17 Thread Kevin Wolf
The refcount updates must be moved so that in the worst case we can get cluster leaks, but refcounts may never be too low. Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c |7 - block/qcow2-snapshot.c | 61 ++- 2 files changed, 50 inserti

[Qemu-devel] [PATCH 4/8] qcow2: Rework qcow2_snapshot_create error handling

2011-11-17 Thread Kevin Wolf
Increase refcounts only after allocating a new L1 table has succeeded in order to make leaks less likely. If writing the snapshot table fails, revert in-memory state to be consistent with that on disk. While at it, make it return the real error codes instead of -1. Signed-off-by: Kevin Wolf ---

[Qemu-devel] [PATCH 2/8] qcow2: Return real error code in qcow2_write_snapshots

2011-11-17 Thread Kevin Wolf
Doesn't immediately fix anything as the callers don't use the return value, but they will be fixed next. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 48 ++-- 1 files changed, 38 insertions(+), 10 deletions(-) diff --git a/block/qcow2-snap

[Qemu-devel] [PATCH 3/8] qcow2: Cleanups and memleak fix in qcow2_snapshot_create

2011-11-17 Thread Kevin Wolf
sn->id_str could be leaked before this. The rest of this patch changes comments, fixes coding style or removes checks that are unnecessary with g_malloc. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 26 +++--- 1 files changed, 11 insertions(+), 15 deletions(-) di

Re: [Qemu-devel] [PATCH] ivshmem: use PIO for BAR0(Doorbell) instead of MMIO to reduce notification time

2011-11-17 Thread Avi Kivity
On 11/17/2011 04:48 PM, Sasha Levin wrote: > On Thu, 2011-11-17 at 16:36 +0200, Avi Kivity wrote: > > On 11/14/2011 05:56 AM, zanghongy...@huawei.com wrote: > > > From: Hongyong Zang > > > > > > Ivshmem(nahanni) is a mechanism for sharing host memory with VMs running > > > on the same host. Curre

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Michael Roth
On 11/17/2011 02:46 AM, Ayal Baron wrote: - Original Message - I have been following this thread pretty closely and the one sentence summary of the current argument is: ovirt-guest-agent is already featureful and tested, so let's drop qemu-ga and have everyone adopt ovirt-guest-agent.

Re: [Qemu-devel] [PATCH] ivshmem: use PIO for BAR0(Doorbell) instead of MMIO to reduce notification time

2011-11-17 Thread Sasha Levin
On Thu, 2011-11-17 at 16:36 +0200, Avi Kivity wrote: > On 11/14/2011 05:56 AM, zanghongy...@huawei.com wrote: > > From: Hongyong Zang > > > > Ivshmem(nahanni) is a mechanism for sharing host memory with VMs running on > > the same host. Currently, guest notifies qemu by reading or writing ivshmem

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Anthony Liguori
On 11/17/2011 02:59 AM, Ayal Baron wrote: - Original Message - On 11/16/2011 11:53 AM, Barak Azulay wrote: On Wednesday 16 November 2011 17:28:16 Michael Roth wrote: 2) You'd also need a schema, similar to qemu.git/qapi-schema-guest.json, to describe the calls you're proxying. The ex

Re: [Qemu-devel] [v9 Patch 6/6]Qemu: raw posix implementation of reopen functions

2011-11-17 Thread Stefan Hajnoczi
On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery wrote: > +static int raw_reopen_prepare(BlockDriverState *bs, BDRVReopenState **prs, > +                              int flags) > +{ > +    BDRVRawReopenState *raw_rs = g_malloc0(sizeof(BDRVRawReopenState)); > +    BDRVRawState *s = bs->opaque; > +

Re: [Qemu-devel] [PATCH] ivshmem: use PIO for BAR0(Doorbell) instead of MMIO to reduce notification time

2011-11-17 Thread Avi Kivity
On 11/14/2011 05:56 AM, zanghongy...@huawei.com wrote: > From: Hongyong Zang > > Ivshmem(nahanni) is a mechanism for sharing host memory with VMs running on > the same host. Currently, guest notifies qemu by reading or writing ivshmem > device's PCI MMIO BAR0(Doorbell). > > This patch, changes t

Re: [Qemu-devel] [v9 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-17 Thread Stefan Hajnoczi
On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery wrote: > @@ -708,17 +731,31 @@ int bdrv_reopen(BlockDriverState *bs, in >         qerror_report(QERR_DATA_SYNC_FAILED, bs->device_name); >         return ret; >     } > -    open_flags = bs->open_flags; > -    bdrv_close(bs); > > -    ret = bdrv_ope

Re: [Qemu-devel] converging around a single guest agent

2011-11-17 Thread Jamie Lokier
>>> On 11/16/2011 03:36 PM, Anthony Liguori wrote: We have another requirement. We need to embed the source for the guest agent in the QEMU release tarball. This is for GPL compliance since we want to include an ISO (eventually) that contains binaries. Paolo Bonzini wrote: > ovirt-g

Re: [Qemu-devel] [PATCH] Add -f option to qemu-nbd

2011-11-17 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 11:34 AM, Chun Yan Liu wrote: > Thanks for your suggestions. > > For the usage "qemu-nbd -f disk.img", adding some code could implement it. I > think it could be like "losetup -f" usage. > > #qemu-nbd -f > > show the first free nbd device at this moment. > > user can choose

[Qemu-devel] [[PATCH V2] 3/5] sh_timer: convert to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/sh.h |3 ++- hw/sh7750.c |4 ++-- hw/sh_timer.c | 43 --- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/hw/sh.h b/hw/sh.h index cf3f6f6..c764be6 100644 --- a/hw/sh.h +++ b/hw/sh.h @@ -3

[Qemu-devel] [[PATCH V2] 5/5] sh_serial: convert to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/sh.h|3 ++- hw/sh7750.c| 28 +++- hw/sh_serial.c | 55 ++- 3 files changed, 47 insertions(+), 39 deletions(-) diff --git a/hw/sh.h b/hw/sh.h index c764be6..0e45d61 1

[Qemu-devel] [PATCH v2 8/8] block: add -drive copy-on-read=on|off

2011-11-17 Thread Stefan Hajnoczi
This patch adds the -drive copy-on-read=on|off command-line option: copy-on-read=on|off copy-on-read is "on" or "off" and enables whether to copy read backing file sectors into the image file. Copy-on-read avoids accessing the same backing file sectors repeatedly and is useful when the ba

[Qemu-devel] [PATCH v2 3/8] block: add request tracking

2011-11-17 Thread Stefan Hajnoczi
The block layer does not know about pending requests. This information is necessary for copy-on-read since overlapping requests must be serialized to prevent races that corrupt the image. The BlockDriverState gets a new tracked_request list field which contains all pending requests. Each request

[Qemu-devel] [PATCH v2 2/8] coroutine: add qemu_co_queue_restart_all()

2011-11-17 Thread Stefan Hajnoczi
It's common to wake up all waiting coroutines. Introduce the qemu_co_queue_restart_all() function to do this instead of looping over qemu_co_queue_next() in every caller. Signed-off-by: Stefan Hajnoczi --- block/qcow2.c |2 +- qemu-coroutine-lock.c | 15 --- qemu-corou

Re: [Qemu-devel] [v9 Patch 4/6]Qemu: Add commandline -drive option 'hostcache'

2011-11-17 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 5:18 AM, Supriya Kannery wrote: > On 11/17/2011 01:36 AM, Stefan Hajnoczi wrote: >> >> On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery >>  wrote: >>> >>> +        if ((hostcache = qemu_opt_get_bool(opts, "hostcache", -1)) != >>> -1) { >> >> This does not work.  qemu_opt_g

[Qemu-devel] [PATCH v2 4/8] block: add bdrv_set_copy_on_read()

2011-11-17 Thread Stefan Hajnoczi
The bdrv_set_copy_on_read() function can be used to programmatically enable or disable copy-on-read for a block device. Later patches add the actual copy-on-read logic. Signed-off-by: Stefan Hajnoczi --- block.c | 22 ++ block.h |3 +++ block_int.h |2 ++ 3

[Qemu-devel] [PATCH v2 0/8] block: generic copy-on-read

2011-11-17 Thread Stefan Hajnoczi
The new -drive copy-on-read=on|off feature populates the image file with data from the backing file on read. This is useful when accessing images backed over a slow medium (e.g. http over internet). All read data will be stored in the local image file so it does not need to be fetched again in th

[Qemu-devel] [PATCH v2 5/8] block: wait for overlapping requests

2011-11-17 Thread Stefan Hajnoczi
When copy-on-read is enabled it is necessary to wait for overlapping requests before issuing new requests. This prevents races between the copy-on-read and a write request. Signed-off-by: Stefan Hajnoczi --- block.c | 35 +++ 1 files changed, 35 insertions(+),

[Qemu-devel] [PATCH v2 6/8] block: request overlap detection

2011-11-17 Thread Stefan Hajnoczi
Detect overlapping requests and remember to align to cluster boundaries if the image format uses them. This assumes that allocating I/O is performed in cluster granularity - which is true for qcow2, qed, etc. Signed-off-by: Stefan Hajnoczi --- block.c | 40

[Qemu-devel] Host networking hang-ups in a qemu cluster

2011-11-17 Thread Kfir Lavi
Hi, I have a cluster of similar qemu machines, for doing some simulation. I'm using e1000 as network driver. When loading few machines, we encounter hangs of networking inside a virtual machine, and it will hang all the interfaces inside the machine. If I'll do down/up to all interfaces, the networ

[Qemu-devel] [Bug 891625] [NEW] [qemu-kvm] add vhost-net to kvm group udev rules 65-kvm.rules

2011-11-17 Thread Alon Bar-Lev
Public bug reported: Please consider authorizing the kvm group to access vhost-net device, similar to the kvm device. Thanks! ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed t

[Qemu-devel] [Bug 891625] Re: [qemu-kvm] add vhost-net to kvm group udev rules 65-kvm.rules

2011-11-17 Thread Alon Bar-Lev
** Patch added: "udef.diff" https://bugs.launchpad.net/bugs/891625/+attachment/2599656/+files/udev.diff -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/891625 Title: [qemu-kvm] add vhost-net to kv

Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd

2011-11-17 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 1:41 PM, Paolo Bonzini wrote: > On 11/17/2011 12:36 PM, Chunyan Liu wrote: >> >> Adding lock to the nbd device before connecting disk image to that device >> to >> handling race conditions. > > This removes the possibility for other programs to lock.  Have you checked > wha

Re: [Qemu-devel] [PATCH v2 5/8] block: wait for overlapping requests

2011-11-17 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 1:43 PM, Paolo Bonzini wrote: > On 11/17/2011 02:40 PM, Stefan Hajnoczi wrote: >> >> When copy-on-read is enabled it is necessary to wait for overlapping >> requests before issuing new requests.  This prevents races between the >> copy-on-read and a write request. > > What

Re: [Qemu-devel] [PATCH v2 5/8] block: wait for overlapping requests

2011-11-17 Thread Paolo Bonzini
On 11/17/2011 02:40 PM, Stefan Hajnoczi wrote: When copy-on-read is enabled it is necessary to wait for overlapping requests before issuing new requests. This prevents races between the copy-on-read and a write request. What about discards? Paolo

Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd

2011-11-17 Thread Paolo Bonzini
On 11/17/2011 12:36 PM, Chunyan Liu wrote: Adding lock to the nbd device before connecting disk image to that device to handling race conditions. This removes the possibility for other programs to lock. Have you checked what happens if you use the same device twice and whether you can piggy

[Qemu-devel] [PATCH v2 7/8] block: core copy-on-read logic

2011-11-17 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- block.c | 72 ++ trace-events |1 + 2 files changed, 73 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 0eef122..d5faa6c 100644 --- a/block.c +++ b/block.c @@ -1464,6 +1464,61

[Qemu-devel] [PATCH v2 1/8] qemu-common: add QEMU_ALIGN_DOWN() and QEMU_ALIGN_UP() macros

2011-11-17 Thread Stefan Hajnoczi
Add macros for aligning a number to a multiple, for example: QEMU_ALIGN_DOWN(500, 2000) = 0 QEMU_ALIGN_UP(500, 2000) = 2000 Since ALIGN_UP() is a common macro name use the QEMU_* namespace prefix. Hopefully this will protect us from included headers that leak something with a similar name. Signe

Re: [Qemu-devel] [PATCH 1/4] Makefile: remove more generated files on clean

2011-11-17 Thread Michael S. Tsirkin
On Thu, Nov 17, 2011 at 11:21:01AM -0200, Luiz Capitulino wrote: > On Wed, 16 Nov 2011 23:58:46 +0200 > "Michael S. Tsirkin" wrote: > > > make clean missed the source qmp files generated > > by python. Fix that. > > > > Signed-off-by: Michael S. Tsirkin > > Michael, this series is for 1.0, rig

[Qemu-devel] [[PATCH V2] 4/5] sh_intc: convert interrupt controller to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/sh7750.c |2 +- hw/sh_intc.c| 85 ++- hw/sh_intc.h|7 +++- target-sh4/helper.c |3 ++ 4 files changed, 66 insertions(+), 31 deletions(-) diff --git a/hw/sh7750.c b/hw/sh7750.c

[Qemu-devel] [[PATCH V2] 2/5] sh7750: convert cache and tlb to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/sh7750.c | 43 ++- 1 files changed, 22 insertions(+), 21 deletions(-) diff --git a/hw/sh7750.c b/hw/sh7750.c index 3bf568d..6ad76df 100644 --- a/hw/sh7750.c +++ b/hw/sh7750.c @@ -42,6 +42,7 @@ typedef struct SH7750State

[Qemu-devel] [[PATCH V2] 1/5] sh7750: convert memory controller/ioport to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/r2d.c|2 +- hw/sh.h |3 +- hw/sh7750.c | 72 -- hw/shix.c |2 +- 4 files changed, 49 insertions(+), 30 deletions(-) diff --git a/hw/r2d.c b/hw/r2d.c index a9aefa2..9b6fcba 100644 --

[Qemu-devel] [[PATCH V2] 0/5]

2011-11-17 Thread Benoît Canet
These patches converts the remaining sh4 devices to the memory API. The patch "sh_intc: convert interrupt controller to memory API" is somewhat tricky V2: Cosmetic change of a memory region size in "sh7750: convert memory controller/ioport to memory API". Remove the realloc in "convert interrupt

Re: [Qemu-devel] [PATCH 1/4] Makefile: remove more generated files on clean

2011-11-17 Thread Luiz Capitulino
On Wed, 16 Nov 2011 23:58:46 +0200 "Michael S. Tsirkin" wrote: > make clean missed the source qmp files generated > by python. Fix that. > > Signed-off-by: Michael S. Tsirkin Michael, this series is for 1.0, right? > --- > Makefile |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-

Re: [Qemu-devel] [v9 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-17 Thread Luiz Capitulino
On Fri, 11 Nov 2011 12:18:18 +0530 Supriya Kannery wrote: > Struct BDRVReopenState along with three reopen related functions > introduced for handling reopen state of images safely. This can be > extended by each of the block drivers to reopen respective > image files. Shouldn't this patch come

Re: [Qemu-devel] [v9 Patch 3/6]Qemu: Cmd "block_set_hostcache" for dynamic cache change

2011-11-17 Thread Luiz Capitulino
On Thu, 17 Nov 2011 11:15:06 +0530 Supriya Kannery wrote: > On 11/17/2011 12:04 AM, Stefan Hajnoczi wrote: > > On Fri, Nov 11, 2011 at 6:47 AM, Supriya Kannery > > wrote: > >> +{ > >> +.name = "block_set_hostcache", > >> +.args_type = "device:B,option:b", > >> +

Re: [Qemu-devel] [v9 Patch 3/6]Qemu: Cmd "block_set_hostcache" for dynamic cache change

2011-11-17 Thread Luiz Capitulino
On Fri, 11 Nov 2011 12:17:48 +0530 Supriya Kannery wrote: > New command "block_set_hostcache" added for dynamically changing > host pagecache setting of a block device. > > Usage: > block_set_hostcache > = block device > = on/off > > Example: > (qemu) block_set_hostcache ide0-hd0

Re: [Qemu-devel] [PATCH 4/5] sh_intc: convert interrupt controller to memory API

2011-11-17 Thread Benoît Canet
Yes, allocating the exact size would make the realloc unnecessary. But it involve more code to walk one more time through the mask_reg and prio_reg array before allocating. I made it this way to make code shorter. The freed MemoryRegion are not initialized at all. However as realloc seems to be a

[Qemu-devel] [PATCH 2/5] Fix some spelling bugs in documentation and comments

2011-11-17 Thread Stefan Hajnoczi
From: Stefan Weil These errors were detected by codespell: remaing -> remaining soley -> solely virutal -> virtual seperate -> separate libcacard.txt still needs some more patches. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- block-migration.c |2 +- docs/libcacard

[Qemu-devel] [PATCH 4/5] Fixing some spelling in docs/libcacard.txt

2011-11-17 Thread Stefan Hajnoczi
From: Matthias Brugger Reviewed-by: Alon Levy Signed-off-by: Matthias Brugger Signed-off-by: Stefan Hajnoczi --- docs/libcacard.txt | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/libcacard.txt b/docs/libcacard.txt index 296706a..f7d7519 100644 --- a/d

[Qemu-devel] [PATCH 5/5] monitor: Fix file_completion() to check for stat() failure

2011-11-17 Thread Stefan Hajnoczi
From: Markus Armbruster stat() can fail for a file name just read with readdir(). Easiest way to trigger is a dangling symbolic link --- look ma, no race! When it fails, file_completion() uses sb.st_mode uninitialized. If the directory bit happens to be set, it appends a "/" to the completed n

[Qemu-devel] [PATCH 3/5] Fix typo: runnning -> running

2011-11-17 Thread Stefan Hajnoczi
From: Vagrant Cascadian One n too many for running, need we say more. Signed-Off-By: Vagrant Cascadian Signed-off-by: Stefan Hajnoczi --- target-i386/kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index ddd115c..5bfc21f 1

[Qemu-devel] [PULL 1.0 0/5] Trivial patches for 11 to 17 November 2011

2011-11-17 Thread Stefan Hajnoczi
These bug fixes and documentation fixes are suitable for 1.0. The purely internal trivial patches are being queued up for 1.1 in the trivial-patches-next tree. The following changes since commit 3f5bd4e1b874590d3d76e031530799a4610da6dc: Update version to 1.0-rc2 (2011-11-14 11:26:32 -0600) ar

[Qemu-devel] [PATCH 1/5] Fix spelling in documentation and comments (similiar -> similar)

2011-11-17 Thread Stefan Hajnoczi
From: Stefan Weil This bug was detected by codespell. In mips_mipssim.c a grammatical error was fixed, too. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- docs/libcacard.txt |2 +- hw/mips_mipssim.c |2 +- qemu-doc.texi |4 ++-- 3 files changed, 4 insertions(+

Re: [Qemu-devel] [PATCH 4/5] sh_intc: convert interrupt controller to memory API

2011-11-17 Thread Avi Kivity
On 11/17/2011 02:56 PM, Peter Maydell wrote: > 2011/11/17 Benoît Canet : > > Signed-off-by: Benoit Canet > > --- a/hw/sh7750.c > > +++ b/hw/sh7750.c > > @@ -756,7 +756,7 @@ SH7750State *sh7750_init(CPUSH4State * cpu, > > MemoryRegion *sysmem) > > "cache-and-tlb", 0x08000

Re: [Qemu-devel] [PATCH 4/5] sh_intc: convert interrupt controller to memory API

2011-11-17 Thread Peter Maydell
2011/11/17 Benoît Canet : > Signed-off-by: Benoit Canet > --- a/hw/sh7750.c > +++ b/hw/sh7750.c > @@ -756,7 +756,7 @@ SH7750State *sh7750_init(CPUSH4State * cpu, MemoryRegion > *sysmem) >                           "cache-and-tlb", 0x0800); >     memory_region_add_subregion(sysmem, 0xf000,

Re: [Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and data sync failure

2011-11-17 Thread Luiz Capitulino
On Fri, 11 Nov 2011 12:17:35 +0530 Supriya Kannery wrote: > New error classes defined for file reopen failure and data > sync error > > Signed-off-by: Supriya Kannery > > --- > qerror.c |8 > qerror.h |6 ++ > 2 files changed, 14 insertions(+) > > Index: qemu/qerror.c >

Re: [Qemu-devel] [PATCH 1/5] sh7750: convert memory controller/ioport to memory API

2011-11-17 Thread Avi Kivity
On 11/17/2011 02:24 PM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > > /* sh775x interrupt controller tables for sh_intc.c > @@ -706,30 +714,40 @@ static CPUWriteMemoryFunc * const sh7750_mmct_write[] = > { > sh7750_mmct_writel > }; > > -SH7750State *sh7750_init(CPUSH4State * cp

Re: [Qemu-devel] [PATCH] ivshmem: use PIO for BAR0(Doorbell) instead of MMIO to reduce notification time

2011-11-17 Thread Zang Hongyong
于 2011/11/16,星期三 2:43, Cam Macdonell 写道: On Sun, Nov 13, 2011 at 8:56 PM, wrote: From: Hongyong Zang Ivshmem(nahanni) is a mechanism for sharing host memory with VMs running on the same host. Currently, guest notifies qemu by reading or writing ivshmem device's PCI MMIO BAR0(Doorbell). This

Re: [Qemu-devel] [v9 Patch 1/6 - updated]Qemu: Enhance "info block" to display host cache setting

2011-11-17 Thread Luiz Capitulino
On Fri, 11 Nov 2011 15:39:29 +0530 Supriya Kannery wrote: > On 11/11/2011 12:17 PM, Supriya Kannery wrote: > > Enhance "info block" to display hostcache setting for each > > block device. > > > > > > ## > > Index: qemu/qapi-types.h > >

[Qemu-devel] [PATCH 5/5] sh_serial: convert to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/sh.h|3 ++- hw/sh7750.c| 28 +++- hw/sh_serial.c | 55 ++- 3 files changed, 47 insertions(+), 39 deletions(-) diff --git a/hw/sh.h b/hw/sh.h index c764be6..0e45d61 1

[Qemu-devel] [PATCH 2/5] sh7750: convert cache and tlb to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/sh7750.c | 43 ++- 1 files changed, 22 insertions(+), 21 deletions(-) diff --git a/hw/sh7750.c b/hw/sh7750.c index 5cee76a..fd48c4a 100644 --- a/hw/sh7750.c +++ b/hw/sh7750.c @@ -42,6 +42,7 @@ typedef struct SH7750State

[Qemu-devel] [PATCH 0/5] Convert remaining sh4 devices to memory API

2011-11-17 Thread Benoît Canet
These patches converts the remaining sh4 devices to the memory API. The patch "sh_intc: convert interrupt controller to memory API" is somewhat tricky. Benoît Canet (5): sh7750: convert memory controller/ioport to memory API sh7750: convert cache and tlb to memory API sh_timer: convert to me

[Qemu-devel] [PATCH 1/5] sh7750: convert memory controller/ioport to memory API

2011-11-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/r2d.c|2 +- hw/sh.h |3 +- hw/sh7750.c | 72 -- hw/shix.c |2 +- 4 files changed, 49 insertions(+), 30 deletions(-) diff --git a/hw/r2d.c b/hw/r2d.c index a9aefa2..9b6fcba 100644 --

  1   2   >