Re: [Qemu-devel] implement lvm-aware P2V to reduce time cost significantly for linux server

2015-01-02 Thread Richard W.M. Jones
On Sat, Jan 03, 2015 at 12:47:10AM +, Richard W.M. Jones wrote: > On Fri, Jan 02, 2015 at 10:19:29AM +, Stefan Hajnoczi wrote: > > On Sat, Dec 27, 2014 at 09:28:53AM +0800, Haoyu Zhang wrote: > > > I want to P2V a redhat server to kvm vm, and lvm was used to manage disks > > > in the redhat

Re: [Qemu-devel] implement lvm-aware P2V to reduce time cost significantly for linux server

2015-01-02 Thread Richard W.M. Jones
On Fri, Jan 02, 2015 at 10:19:29AM +, Stefan Hajnoczi wrote: > On Sat, Dec 27, 2014 at 09:28:53AM +0800, Haoyu Zhang wrote: > > I want to P2V a redhat server to kvm vm, and lvm was used to manage disks > > in the redhat server. > > I want to only migrate the really used storage to vm image, whi

Re: [Qemu-devel] Does kvm friendly support GPT?

2015-01-02 Thread Richard W.M. Jones
On Mon, Dec 22, 2014 at 02:39:27PM +0800, Zhang Haoyu wrote: > Hi, > > When I perform P2V from native servers with win2008 to kvm vm, > some cases failed due to the physical disk was using GPT for partition, > and QEMU doesn't support GPT by default. > > And, I see in below site that OVMF can be

Re: [Qemu-devel] [question] How to get the guest physical memory usage from host?

2015-01-02 Thread Richard W.M. Jones
On Mon, Dec 22, 2014 at 12:41:45PM +0400, Andrey Korolyov wrote: > On Mon, Dec 22, 2014 at 6:59 AM, Zhang Haoyu > wrote: > > Hi, > > > > How to get the guest physical memory usage from host? > > I don't want to introduce a guest-agent to get the info. > > > > Thanks, > > Zhang Haoyu > > > > Ther

Re: [Qemu-devel] [RFC PATCH 1/2] qga: Introduce guest-get-os-version command with stubs

2015-01-02 Thread Richard W.M. Jones
On Tue, Dec 16, 2014 at 09:23:46AM -0700, Eric Blake wrote: > On 12/16/2014 12:30 AM, zhanghailiang wrote: > > +# Since: 2.3 > > +## > > +{ 'type': 'GuestOSVersion', > > + 'data': {'name': 'str', 'type': 'int'} } > > 'name' feels a bit vague; it looks like you are intending to use the > string as

Re: [Qemu-devel] [PATCH 08/10] block/dmg: fix sector data offset calculation

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: This patch addresses two issues: - The data fork offset was not taken into account, resulting in failure to read an InstallESD.dmg file (5164763151 bytes) which had a non-zero DataForkOffset field. - The offset of the previous block ("partiti

Re: [Qemu-devel] [PATCH 07/10] block/dmg: set virtual size to a non-zero value

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: Right now the virtual size is always reported as zero which makes it impossible to convert between formats. After this patch, the number of sectors will be read from the BLXX ("mish") header. Do you mean to say from the 'koly' header? http://en.wikip

Re: [Qemu-devel] [PATCH 06/10] block/dmg: process XML plists

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: The format is simple enough to avoid using a full-blown XML parser. The offsets are based on the description at http://newosxbook.com/DMG.html Signed-off-by: Peter Wu --- block/dmg.c | 69 +

Re: [Qemu-devel] [PATCH 05/10] block/dmg: validate chunk size to avoid overflow

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: Previously the chunk size was not checked, allowing for a large memory allocation. This patch checks whether the chunks size is within the resource fork length. Signed-off-by: Peter Wu --- block/dmg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [Qemu-devel] [PATCH 04/10] block/dmg: process a buffer instead of reading ints

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: As the decoded plist XML is not a pointer in the file, dmg_read_mish_block must be able to process a buffer instead of a file pointer. Since the full buffer must be processed, let's change the return value again to just a success flag. Signed-off-by: Pet

Re: [Qemu-devel] [PATCH 03/10] block/dmg: extract processing of resource forks

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: Besides the offset, also read the resource length. This length is now used in the extracted function to verify the end of the resource fork against "count" from the resource fork. Signed-off-by: Peter Wu --- block/dmg.c | 90 ++

Re: [Qemu-devel] [PATCH 02/10] block/dmg: extract mish block decoding functionality

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: Extract the mish block decoder such that this can be used for other formats in the future. A new DmgHeaderState struct is introduced to share state while decoding. The code is kept unchanged as much as possible, a "fail" label is added for example where

Re: [Qemu-devel] [PATCH 01/10] block/dmg: properly detect the UDIF trailer

2015-01-02 Thread John Snow
On 12/27/2014 10:01 AM, Peter Wu wrote: DMG files have a variable length with a UDIF trailer at the end of a file. This UDIF trailer is essential as it describes the contents of the image. At the moment however, the start of this trailer is almost always incorrect as bdrv_getlength() returns a

Re: [Qemu-devel] [PATCH 08/10] qmp: add rocker device support

2015-01-02 Thread Eric Blake
On 12/29/2014 10:14 PM, sfel...@gmail.com wrote: > From: Scott Feldman [your message came through as a top-level thread instead of in-reply-to the 0/10 cover letter; please see if you can fix that before the next submission] > > Add QMP/HMP support for rocker devices. This is mostly for debugg

Re: [Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2015-01-02 Thread Peter Wu
On Friday 02 January 2015 13:58:33 John Snow wrote: > > On 01/02/2015 01:46 PM, Peter Wu wrote: > > FYI, I plan to make some more changes: > > > > - do not require offset ≠ 0 for resource fork and XML offsets. > > Technically it is allowed, do you agree on this change? > > If you have seen this i

[Qemu-devel] [PATCH v4] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-02 Thread Programmingkid
Removes redundant ret variable and renames sectorSize variable to meet QEMU coding standards. Signed-off-by: John Arbuckle --- block/raw-posix.c | 18 +- configure |2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/block/raw-posix.c b/block/ra

Re: [Qemu-devel] [PATCH] target-arm: crypto: fix BE host support

2015-01-02 Thread Ard Biesheuvel
On 2 January 2015 at 15:17, Laszlo Ersek wrote: > On 01/02/15 15:18, Ard Biesheuvel wrote: >> The crypto emulation code in target-arm/crypto_helper.c never worked >> correctly on big endian hosts, due to the fact that it uses a union >> of array types to convert between the native VFP register siz

Re: [Qemu-devel] [PATCH] target-arm: crypto: fix BE host support

2015-01-02 Thread Laszlo Ersek
On 01/02/15 18:36, Peter Maydell wrote: > On 2 January 2015 at 15:17, Laszlo Ersek wrote: >> On 01/02/15 15:18, Ard Biesheuvel wrote: >>> (ie if you store 0x112233445566778899aabbccddeeff00 as a 64 bit write >>> to VFP register D0 then regs[0] will be >>> 0x112233445566778899aabbccddeeff00 regardl

Re: [Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2015-01-02 Thread John Snow
On 01/02/2015 01:46 PM, Peter Wu wrote: FYI, I plan to make some more changes: - do not require offset ≠ 0 for resource fork and XML offsets. Technically it is allowed, do you agree on this change? If you have seen this in the wild, I definitely agree. If you haven't, I am not against the

Re: [Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2015-01-02 Thread Peter Wu
FYI, I plan to make some more changes: - do not require offset ≠ 0 for resource fork and XML offsets. Technically it is allowed, do you agree on this change? - improve offset checking https://git.lekensteyn.nl/peter/qemu/commit/?h=block-dmg-2.3&id=41fd83773361923f668f54796ff563660b77e96c (squa

Re: [Qemu-devel] [PATCH] target-arm: crypto: fix BE host support

2015-01-02 Thread Peter Maydell
On 2 January 2015 at 15:17, Laszlo Ersek wrote: > On 01/02/15 15:18, Ard Biesheuvel wrote: >> (ie if you store 0x112233445566778899aabbccddeeff00 as a 64 bit write >> to VFP register D0 then regs[0] will be >> 0x112233445566778899aabbccddeeff00 regardless of host endianness. That >> is, the least

[Qemu-devel] [PATCH] tcg-aarch64: handle additional PXN case

2015-01-02 Thread Andrew Jones
D4.5.1 "Memory access control:Access permissions for instruction execution" states "... In addition: * For the EL1&0 translation regime, if the value of the AP[2:1] bits is 0b01, permitting write access from EL0, then the PXN bit is treated as if it has the value 1, regardless of its actual value.

Re: [Qemu-devel] [PATCH 0/5] SPARC: fix clang warnings

2015-01-02 Thread Peter Maydell
On 2 January 2015 at 13:57, Mark Cave-Ayland wrote: > On 23/12/14 22:11, Peter Maydell wrote: >> These patches fix warnings generated by clang. Patches 1-3 >> have been onlist before (and reviewed by RTH) but didn't get >> applied I think because of a mixup between me and Mark about >> which tree

Re: [Qemu-devel] [PATCH v3] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-02 Thread Peter Maydell
On 2 January 2015 at 16:47, Programmingkid wrote: > On Jan 2, 2015, at 9:38 AM, Stefan Hajnoczi wrote: >> Plain text emails are usually wrapped at 72 characters. It makes it >> easier to read the git log if you wrap lines. > > On my email program, the lines just wrap at the width of the window th

Re: [Qemu-devel] [PATCH v3] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-02 Thread Programmingkid
On Jan 2, 2015, at 9:38 AM, Stefan Hajnoczi wrote: > On Sun, Dec 28, 2014 at 04:18:38PM -0500, Programmingkid wrote: > > Suggestion for concise subject line: > > block/raw-posix: fix raw_getlength() for host CD-ROMs on Mac > >> This patch fixes the problem with raw_getlength() on Mac OS X so

Re: [Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2015-01-02 Thread John Snow
On 01/02/2015 09:14 AM, Stefan Hajnoczi wrote: On Sat, Dec 27, 2014 at 04:01:34PM +0100, Peter Wu wrote: These series improve QEMU support for DMG image files: Hi, Thanks for this patch series. Kevin and I consider patches for merging after they have a Reviewed-by: from at least 1 other QEM

Re: [Qemu-devel] [PATCH v2 1/1] migration/block: fix pending() return value

2015-01-02 Thread Stefan Hajnoczi
On Tue, Dec 30, 2014 at 01:04:16PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Because of wrong return value of .save_live_pending() in > migration/block.c, migration finishes before the whole disk is > transferred. Such situation occurs when the migration process is fast > enough, for example whe

Re: [Qemu-devel] [PATCH] net: remove all cleanup methods from NIC NetClientInfos

2015-01-02 Thread Paolo Bonzini
On 02/01/2015 15:00, Stefan Hajnoczi wrote: >>> This cleanup function gets in the way of making the >>> NetClientStates for the NIC hold an object_ref reference to >>> the object, so get rid of it. > This patch does not drop NetClientInfo->cleanup() and clean up > net.c. Do you have plans for a

Re: [Qemu-devel] [PATCH] net: synchronize net_host_device_remove with host_net_remove_completion

2015-01-02 Thread Paolo Bonzini
On 02/01/2015 15:06, Stefan Hajnoczi wrote: > On Tue, Dec 23, 2014 at 05:53:20PM +0100, Paolo Bonzini wrote: >> @@ -324,6 +324,8 @@ void qemu_del_net_client(NetClientState *nc) >> NetClientState *ncs[MAX_QUEUE_NUM]; >> int queues, i; >> >> +assert(nc->info->type != NET_CLIENT_OPTI

Re: [Qemu-devel] [PATCH] target-arm: crypto: fix BE host support

2015-01-02 Thread Laszlo Ersek
On 01/02/15 15:18, Ard Biesheuvel wrote: > The crypto emulation code in target-arm/crypto_helper.c never worked > correctly on big endian hosts, due to the fact that it uses a union > of array types to convert between the native VFP register size (64 > bits) and the types used in the algorithms (by

Re: [Qemu-devel] [PATCH 00/10] rocker: add new rocker ethernet switch device

2015-01-02 Thread Stefan Hajnoczi
On Mon, Dec 29, 2014 at 09:14:01PM -0800, sfel...@gmail.com wrote: > From: Scott Feldman > > [This is a collaboration between myself and Jiri Pirko]. > > This patch set adds a new ethernet switch device, called rocker. Rocker is > intended to emulate HW features of switch ASICs found in today's

Re: [Qemu-devel] [PATCH v3] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-02 Thread Stefan Hajnoczi
On Sun, Dec 28, 2014 at 04:18:38PM -0500, Programmingkid wrote: Suggestion for concise subject line: block/raw-posix: fix raw_getlength() for host CD-ROMs on Mac > This patch fixes the problem with raw_getlength() on Mac OS X so that it > actually calculates the correct size of a volume. It h

[Qemu-devel] [PATCH] target-arm: crypto: fix BE host support

2015-01-02 Thread Ard Biesheuvel
The crypto emulation code in target-arm/crypto_helper.c never worked correctly on big endian hosts, due to the fact that it uses a union of array types to convert between the native VFP register size (64 bits) and the types used in the algorithms (bytes and 32 bit words) We cannot just swab betwee

Re: [Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2015-01-02 Thread Stefan Hajnoczi
On Sat, Dec 27, 2014 at 04:01:34PM +0100, Peter Wu wrote: > These series improve QEMU support for DMG image files: Hi, Thanks for this patch series. Kevin and I consider patches for merging after they have a Reviewed-by: from at least 1 other QEMU contributor. I have CCed John Snow. John: If yo

Re: [Qemu-devel] [PATCH] net: synchronize net_host_device_remove with host_net_remove_completion

2015-01-02 Thread Stefan Hajnoczi
On Tue, Dec 23, 2014 at 05:53:20PM +0100, Paolo Bonzini wrote: > @@ -324,6 +324,8 @@ void qemu_del_net_client(NetClientState *nc) > NetClientState *ncs[MAX_QUEUE_NUM]; > int queues, i; > > +assert(nc->info->type != NET_CLIENT_OPTIONS_KIND_NIC); > + > /* If the NetClientState be

Re: [Qemu-devel] [PATCH] net: remove all cleanup methods from NIC NetClientInfos

2015-01-02 Thread Stefan Hajnoczi
On Tue, Dec 23, 2014 at 05:53:19PM +0100, Paolo Bonzini wrote: > All NICs have a cleanup function that, in most cases, zeroes the pointer > to the NICState. In some cases, it frees data belonging to the NIC. > > However, this function is never called except when exiting from QEMU. > It is not nec

Re: [Qemu-devel] [PATCH 0/5] SPARC: fix clang warnings

2015-01-02 Thread Mark Cave-Ayland
On 23/12/14 22:11, Peter Maydell wrote: > These patches fix warnings generated by clang. Patches 1-3 > have been onlist before (and reviewed by RTH) but didn't get > applied I think because of a mixup between me and Mark about > which tree they should go in by. 4 and 5 are new. > > Peter Maydell

Re: [Qemu-devel] [Bug 1404278] [NEW] tap connections not working on windows host

2015-01-02 Thread Stefan Hajnoczi
On Fri, Dec 19, 2014 at 03:36:39PM -, timsoft wrote: > using latest qemu 2.2.0 64bit for windows host (installed from > qemu-w64-setup-20141210.exe obtained from http://qemu.weilnetz.de/w64/ > ),OpenVPN 2.6.3-I601 64bit tap adapter named tap01 and calling qemu > using the following. > > qemu-s

Re: [Qemu-devel] Qemu support with rbd in Centos7

2015-01-02 Thread Stefan Hajnoczi
On Fri, Dec 19, 2014 at 02:07:35PM +1300, Mario Codeniera wrote: > I don't know if this is the right place to ask with my query regarding with > rbd. As there is issue the virtualisation that I created, it seems related > to rbd as i could not able to run an instances/virtual machines. Did you fol

Re: [Qemu-devel] 2.1 unexpected stop after exporting blockdev via nbd server

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 07:38:59PM +0400, Andrey Korolyov wrote: > 2.1-stable is currently crashing with the > > Co-routine re-entered recursively > 2014-12-16 15:06:23.578+: shutting down > > after execution of (for example) following when using virtio-dp as a > disk backend: > > '{ "execut

Re: [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices.

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 04:59:50PM +0100, Christian Borntraeger wrote: > Are you ok with the patches? If yes, can you take care of these patches in > the block tree? This series looks close, I've left comments on the patches. The series is fine for command-line QEMU users where probing makes the

Re: [Qemu-devel] [PATCH v5 5/5] BlockConf: Call backend functions to detect geometry and blocksizes

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 12:18:04PM +0100, Ekaterina Tumanova wrote: > +void blkconf_blocksizes(BlockConf *conf) > +{ > +BlockBackend *blk = conf->blk; > +BlockSizes blocksizes; > + > +blk_probe_blocksizes(blk, &blocksizes); > +/* fill in detected values if they are not defined via q

Re: [Qemu-devel] [PATCH v5 4/5] block-backend: Add wrappers for blocksizes and geometry probing

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 12:18:03PM +0100, Ekaterina Tumanova wrote: > Signed-off-by: Ekaterina Tumanova > Reviewed-by: Markus Armbruster > --- > block/block-backend.c | 10 ++ > include/sysemu/block-backend.h | 2 ++ > 2 files changed, 12 insertions(+) Reviewed-by: Stefan Hajn

Re: [Qemu-devel] [PATCH 0/3] dp8393x update

2015-01-02 Thread Peter Maydell
On 2 January 2015 at 11:33, Laurent Vivier wrote: > Le 02/01/2015 11:19, Peter Maydell a écrit : >> On 2 January 2015 at 09:25, Laurent Vivier wrote: >>> Using AddressSpace is really a very good idea, in fact, but I don't like >>> the way you pass it to the device (a qdev_set_prop()). >>> >>> I t

Re: [Qemu-devel] [PATCH v5 3/5] block: Add driver methods to probe blocksizes and geometry

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 12:18:02PM +0100, Ekaterina Tumanova wrote: > @@ -90,6 +91,10 @@ > #include > #endif > > +#ifdef __s390__ > +#include > +#endif #if defined(__linux__) && defined(__s390__) Or you could move it inside #ifdef __linux__ earlier in the file. > +/** > + * Try to get @bs'

Re: [Qemu-devel] [PATCH v4 02/17] spapr_drc: initial implementation of sPAPRDRConnector device

2015-01-02 Thread Bharata B Rao
On Tue, Dec 23, 2014 at 6:00 PM, Michael Roth wrote: > This device emulates a firmware abstraction used by pSeries guests to > manage hotplug/dynamic-reconfiguration of host-bridges, PCI devices, > memory, and CPUs. It is conceptually similar to an SHPC device, > complete with LED indicators to id

Re: [Qemu-devel] [PATCH v5 2/5] raw-posix: Refactor logical block size detection.

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 12:18:01PM +0100, Ekaterina Tumanova wrote: > +#if defined(BLKSSZGET) > +# define SECTOR_SIZE BLKSSZGET > +#elif defined(DKIOCGETBLOCKSIZE) > +# define SECTOR_SIZE DKIOCGETBLOCKSIZE > +#elif defined(DIOCGSECTORSIZE) > +# define SECTOR_SIZE DIOCGSECTORSIZE > +#else > +

Re: [Qemu-devel] [PATCH 0/3] dp8393x update

2015-01-02 Thread Laurent Vivier
Le 02/01/2015 11:19, Peter Maydell a écrit : > On 2 January 2015 at 09:25, Laurent Vivier wrote: >> Using AddressSpace is really a very good idea, in fact, but I don't like >> the way you pass it to the device (a qdev_set_prop()). >> >> I think we should do as it is done in PCI. This must be manag

Re: [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices.

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 12:17:59PM +0100, Ekaterina Tumanova wrote: > Updates v4 -> v5: > > Minor Updates according the last review from Markus: > 1. update commit message for patch 2 > 2. fix comment typos > 3. fix check_for_dasd to return -1 instead of -ENOTSUP > > Thanks, > Kate. > >

Re: [Qemu-devel] [PATCH 0/3] dp8393x update

2015-01-02 Thread Peter Maydell
On 2 January 2015 at 09:25, Laurent Vivier wrote: > Using AddressSpace is really a very good idea, in fact, but I don't like > the way you pass it to the device (a qdev_set_prop()). > > I think we should do as it is done in PCI. This must be managed at > sysbus level, not at the device level. Act

Re: [Qemu-devel] implement lvm-aware P2V to reduce time cost significantly for linux server

2015-01-02 Thread Stefan Hajnoczi
On Sat, Dec 27, 2014 at 09:28:53AM +0800, Haoyu Zhang wrote: > I want to P2V a redhat server to kvm vm, and lvm was used to manage disks > in the redhat server. > I want to only migrate the really used storage to vm image, which can > reduce the time cost significantly sometimes, > so I need the in

Re: [Qemu-devel] [PATCH 0/3] dp8393x update

2015-01-02 Thread Laurent Vivier
Le 02/01/2015 02:34, Laurent Vivier a écrit : > Hi Hervé, > > Le 01/01/2015 22:01, Hervé Poussineau a écrit : >> Hi Laurent, >> >> Le 29/12/2014 01:39, Laurent Vivier a écrit : >>> This is a series of patches I wrote to use dp8393x (SONIC) with >>> Quadra 800 emulation. I think it is interesting t