Re: [Qemu-devel] [PATCH RFC] virtio-net: announce self by guest

2014-04-01 Thread Jason Wang
On Fri, 2014-03-28 at 00:33 +0800, Amos Kong wrote: > On Thu, Mar 13, 2014 at 02:56:41PM +0800, Jason Wang wrote: > > It's hard to track all mac addresses and their configurations (e.g > > vlan or ipv6)in qemu. Without those information, it's impossible to > > build proper garp packet after migrati

Re: [Qemu-devel] qemu core dump when vnc client connect to VM, Is anyone has the similar problem, thanks!

2014-04-01 Thread 蔡志峰
Thank you very much. At 2014-03-31 15:26:00,"Gonglei (Arei)" wrote: Hi, My patch http://git.qemu.org/?p=qemu.git;a=commitdiff;h=e3c1adf16e38714ebd761dd02517dd07760ba6d2 had been fixed this issue. Best regards, -Gonglei From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.

Re: [Qemu-devel] [PATCH v2] linux-user: pass correct host flags to accept4()

2014-04-01 Thread Riku Voipio
Hi, Applied to my for-2.0 branch, Thanks On 31 March 2014 18:45, Peter Maydell wrote: > On 31 March 2014 16:41, Petar Jovanovic wrote: > > From: Petar Jovanovic > > > > Flags NONBLOCK and CLOEXEC can have different values on the host and the > > guest, so set correct host values before cal

Re: [Qemu-devel] [PATCHv2] block: optimize zero writes with bdrv_write_zeroes

2014-04-01 Thread Fam Zheng
On Fri, 03/28 15:46, Peter Lieven wrote: > this patch tries to optimize zero write requests > by automatically using bdrv_write_zeroes if it is > supported by the format. > > This significantly speeds up file system initialization and > should speed zero write test used to test backend storage > p

Re: [Qemu-devel] [PATCH v4 1/9] qapi: Add optional field "name" to block dirty bitmap

2014-04-01 Thread Fam Zheng
On Thu, 03/27 16:30, Stefan Hajnoczi wrote: > On Thu, Mar 27, 2014 at 05:09:40PM +0800, Fam Zheng wrote: > > @@ -5079,18 +5080,45 @@ bool bdrv_qiov_is_aligned(BlockDriverState *bs, > > QEMUIOVector *qiov) > > return true; > > } > > > > -BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriver

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-04-01 Thread Fam Zheng
On Thu, 03/27 16:43, Stefan Hajnoczi wrote: > On Thu, Mar 27, 2014 at 05:09:41PM +0800, Fam Zheng wrote: > > @@ -1713,6 +1713,66 @@ void qmp_block_set_io_throttle(const char *device, > > int64_t bps, int64_t bps_rd, > > } > > } > > > > +void qmp_dirty_bitmap_add(const char *device, const c

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-04-01 Thread Fam Zheng
On Thu, 03/27 16:39, Dr. David Alan Gilbert wrote: > Hi Fam, > Could you make this something like block-dirty-bitmap - the RAM migration > also has a dirty bitmap, and it would just make it clearer. Good idea. Thanks, Dave. Fam

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-04-01 Thread Fam Zheng
On Thu, 03/27 10:41, Eric Blake wrote: > On 03/27/2014 03:09 AM, Fam Zheng wrote: > > The new command pair is added to manage user created dirty bitmap. The > > dirty bitmap's name is mandatory and must be unique for the same device, > > but different devices can have bitmaps with the same names. >

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Markus Armbruster
Chen Gang writes: > On 03/31/2014 11:49 PM, Markus Armbruster wrote: >> Chen Gang writes: >> >>> in get_boot_device() >>> >>> - remove 'res' to simplify code >>> >>> in main(): >>> >>> - remove useless 'continue'. >>> >>> - in main switch(): >>> >>>- remove or adjust all useless 'break'.

Re: [Qemu-devel] [PATCH v4 7/9] qmp: Add dirty-bitmap-enable and dirty-bitmap-disable

2014-04-01 Thread Fam Zheng
On Thu, 03/27 10:46, Eric Blake wrote: > On 03/27/2014 03:09 AM, Fam Zheng wrote: > Also, is there a counterpart query- command that I can use to > see the current state of a named dirty bitmap and whether it is > currently enabled, so that this isn't a write-only interface? > Will add the enabl

Re: [Qemu-devel] KVM call agenda for 2014-04-01

2014-04-01 Thread Peter Maydell
On 31 March 2014 20:57, Michael Roth wrote: > Agreed, though I feel a little weird about creating releases for tags that > aren't in the official repo. Would that be acceptable from a community > stand-point? I'm honestly not sure. > > Otherwise I think Anthony/Peter would probably still need to p

Re: [Qemu-devel] [PATCH v2 0/3] prebuild cpu QOM tree /machine/node/socket/core ->link-cpu

2014-04-01 Thread chen.fan.f...@cn.fujitsu.com
Ping... On Thu, 2014-03-20 at 14:33 +0800, Chen Fan wrote: > at present, after hotplug a discontinuous cpu id on source, then done > migration, > on target, it will fail to add the unoccupied cpu id which was skipped at > source, > this cause is on target Qemu prebuild CPU with continuous cpu_i

[Qemu-devel] [PATCH] HMP: support specifying dump format for dump-guest-memory

2014-04-01 Thread Qiao Nuohan
Dumping guest memory is available to specify the dump format now. This patch adds options '-z|-l|-s' to HMP command dump-guest-memory to specify dumping in kdump-compression format, with zlib/lzo/snappy compression. And without these options ELF format will be used. The discussion about this featu

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Laszlo Ersek
On 03/31/14 22:18, Gabriel L. Somlo wrote: > On Wed, Mar 26, 2014 at 06:36:10PM -0400, Kevin O'Connor wrote: >> On Wed, Mar 26, 2014 at 03:58:50PM -0400, Gabriel L. Somlo wrote: >>> - SeaBIOS is still in charge of providing the smbios_entry_point >>> structure, and it's unlikely we can reasonably

Re: [Qemu-devel] [PATCH v4 05/30] virtio-net: out-of-bounds buffer write on load

2014-04-01 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in > virtio_net_load()@hw/net/virtio-net.c > > > } else if (n->mac_table.in_use) { > > uint8_t *buf = g_malloc0(n->mac_table.in_use); > > We are allocating buffer of size n->mac

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Chen Gang
On 04/01/2014 04:13 PM, Markus Armbruster wrote: > Chen Gang writes: > >> On 03/31/2014 11:49 PM, Markus Armbruster wrote: >>> Chen Gang writes: >>> in get_boot_device() - remove 'res' to simplify code in main(): - remove useless 'continue'. - in m

Re: [Qemu-devel] [PATCH v4 18/30] virtio: validate num_sg when mapping

2014-04-01 Thread Amit Shah
On (Mon) 31 Mar 2014 [17:17:05], Michael S. Tsirkin wrote: > CVE-2013-4535 > CVE-2013-4536 > > Both virtio-block and virtio-serial read, > VirtQueueElements are read in as buffers, and passed to > virtqueue_map_sg(), where num_sg is taken from the wire and can force > writes to indicies beyond VIR

[Qemu-devel] [PATCH for-2.0] qcow2: link all L2 meta updates in preallocate()

2014-04-01 Thread Stefan Hajnoczi
preallocate() only links the first QCowL2Meta's data clusters into the L2 table and ignores any chained QCowL2Metas in the linked list. Chains of QCowL2Meta structs are built up when contiguous clusters span L2 tables. Each QCowL2Meta describes one L2 table update. This is a rare case in preallo

[Qemu-devel] [Bug 1299858] Re: qemu all apps crash on OS X 10.6.8

2014-04-01 Thread Eric Blair
I'm not personally worried about a fix for this, I reported it primarily for the benefit of others/the quality of the codebase as a whole. As I said, I got it working with gthreads as the coroutine provider so it's working for my needs. Although this seems on the surface to be a problem with the s

[Qemu-devel] [PULL for-2.0 0/3] input bugfixes.

2014-04-01 Thread Gerd Hoffmann
Hi, Three little bugfixes for the new input code. please pull for 2.0, Gerd The following changes since commit 63678e17cf399ff81b93417fe7bee8d6ef6b6b1b: configure: add option to disable -fstack-protector flags (2014-03-31 20:16:02 +0100) are available in the git repository at: git://

[Qemu-devel] [PULL 1/3] input: fix input_event_key_number trace event

2014-04-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace-events b/trace-events index 3df3f32..9303245 100644 --- a/trace-events +++ b/trace-events @@ -1022,7 +1022,7 @@ gd_update(int x, int y, int w, int h) "x=%d, y=%d, w=%d, h=%d"

[Qemu-devel] [PULL 3/3] input: add sanity check

2014-04-01 Thread Gerd Hoffmann
Check we've actually found a input handler before trying to call it. Signed-off-by: Gerd Hoffmann --- ui/input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/input.c b/ui/input.c index 6e6a924..1ed0e78 100644 --- a/ui/input.c +++ b/ui/input.c @@ -143,6 +143,9 @@ void qemu_input_even

[Qemu-devel] [PULL 2/3] input: mouse_set should check input device type.

2014-04-01 Thread Gerd Hoffmann
From: Hani Benhabiles Otherwise, the index of an input device like a usb-kbd is silently accepted. (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse (qemu) mouse_set 1 (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse Also replace monitor_printf() cal

Re: [Qemu-devel] [PATCH v4 14/30] stellaris_enet: avoid buffer overrun on incoming migration (part 2)

2014-04-01 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > CVE-2013-4532 > > s->tx_fifo_len is read from the wire and later used as an index into > s->tx_fifo[] when a DATA command is issued by the guest. If > s->tx_fifo_len is greater than the length of s->tx_fifo[], or less > than 0, the buffer can be over

[Qemu-devel] [Bug 1278977] Re: qemu-system-sparc64 crash when initializing disk

2014-04-01 Thread wbx
Hi Artyom, okay, with 1.7.0 on Maverick I get: (qemu) info block virtio0: qemu-sparc64.img (raw) ide0-hd0: qemu-sparc64.img (raw) ide1-cd0: [not inserted] Removable device: not locked, tray closed floppy0: [not inserted] Removable device: not locked, tray closed sd0: [not inserted]

[Qemu-devel] [Bug 1299858] Re: qemu all apps crash on OS X 10.6.8

2014-04-01 Thread Peter Maydell
Unfortunately the gthreads backend is pretty strongly disrecommended -- it is really mostly there as a debug convenience when working with the block code, as there are some bad interactions between signal masking and coroutine switches that mean it's likely to cause problems when using QEMU proper.

Re: [Qemu-devel] [PATCH v4 15/30] stellaris_enet: avoid buffer orerrun on incoming migration (part 3)

2014-04-01 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > CVE-2013-4532 > > s->tx_frame_len is read from the wire and can later used as an index > into s->tx_fifo[] for memset() when a DATA command is issued by the guest. > > In this case s->tx_frame_len is checked to avoid an overrun, but if the > value i

Re: [Qemu-devel] [PATCH v4 27/30] vmxnet3: validate interrupt indices coming from guest

2014-04-01 Thread Dmitry Fleytman
On Mar 31, 2014, at 18:45 PM, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: >> From: Dmitry Fleytman >> >> CVE-2013-4544 >> >> Signed-off-by: Dmitry Fleytman >> Reported-by: Michael S. Tsirkin >> Signed-off-by: Michael S. Tsirkin >> --- >> hw/net/vmxnet3.c

Re: [Qemu-devel] [PATCH v4 27/30] vmxnet3: validate interrupt indices coming from guest

2014-04-01 Thread Dr. David Alan Gilbert
* Dmitry Fleytman (dmi...@daynix.com) wrote: > > On Mar 31, 2014, at 18:45 PM, Dr. David Alan Gilbert > wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > >> From: Dmitry Fleytman > >> > >> CVE-2013-4544 > >> > >> Signed-off-by: Dmitry Fleytman > >> Reported-by: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH v4 29/30] vmxnet3: validate queues configuration coming from quest

2014-04-01 Thread Dmitry Fleytman
On Mar 31, 2014, at 18:48 PM, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: >> From: Dmitry Fleytman >> >> CVE-2013-4544 >> >> Signed-off-by: Dmitry Fleytman >> Reported-by: Michael S. Tsirkin >> Signed-off-by: Michael S. Tsirkin >> --- >> hw/net/vmxnet3.c

Re: [Qemu-devel] [PATCH v4 14/30] stellaris_enet: avoid buffer overrun on incoming migration (part 2)

2014-04-01 Thread Peter Maydell
On 1 April 2014 10:43, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: >> CVE-2013-4532 >> @@ -374,7 +374,13 @@ static int stellaris_enet_load(QEMUFile *f, void >> *opaque, int version_id) >> s->mrxd = qemu_get_be32(f); >> s->np = qemu_get_be32(f); >>

Re: [Qemu-devel] [PATCH v4 15/30] stellaris_enet: avoid buffer orerrun on incoming migration (part 3)

2014-04-01 Thread Peter Maydell
On 1 April 2014 10:51, Dr. David Alan Gilbert wrote: > So lets say that tx_frame_len is initially 2032 when written; 14 is added to > it > at this point, and if the CRC flag is set then another 4. Thus it seems a > user > can set the value in tx_frame_len to 2032+14+4=2050 - which is a bit wo

Re: [Qemu-devel] [PATCH v4 28/30] vmxnet3: validate interrupt indices read on migration

2014-04-01 Thread Dmitry Fleytman
On Mar 31, 2014, at 22:38 PM, Michael S. Tsirkin wrote: > On Mon, Mar 31, 2014 at 05:33:44PM +0100, Dr. David Alan Gilbert wrote: >> * Michael S. Tsirkin (m...@redhat.com) wrote: >>> From: Dmitry Fleytman >>> >>> CVE-2013-4544 >>> >>> Signed-off-by: Dmitry Fleytman >>> Reported-by: Michael S

Re: [Qemu-devel] [PATCH v4 03/30] vmstate: add VMSTATE_VALIDATE

2014-04-01 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > Validate state using VMS_ARRAY with num = 0 and VMS_MUST_EXIST > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Dr. David Alan Gilbert > --- > include/migration/vmstate.h | 8 > 1 file changed, 8 insertions(+) > > diff --git a/includ

Re: [Qemu-devel] [PATCH v4 10/30] hw/pci/pcie_aer.c: fix buffer overruns on invalid state load

2014-04-01 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > 4) CVE-2013-4529 > hw/pci/pcie_aer.cpcie aer log can overrun the buffer if log_num is > too large > > There are two issues in this file: > 1. log_max from remote can be larger than on local > then buffer will overrun with dat

Re: [Qemu-devel] [PATCH v4 23/30] zaurus: fix buffer overrun on invalid state load

2014-04-01 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > CVE-2013-4540 > > Within scoop_gpio_handler_update, if prev_level has a high bit set, then > we get bit > 16 and that causes a buffer overrun. > > Since prev_level comes from wire indirectly, this can > happen on invalid state load. > > Similarly f

Re: [Qemu-devel] [PATCH v4 27/30] vmxnet3: validate interrupt indices coming from guest

2014-04-01 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > From: Dmitry Fleytman > > CVE-2013-4544 > > Signed-off-by: Dmitry Fleytman > Reported-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > --- > hw/net/vmxnet3.c | 36 ++-- > 1 file changed, 34 insertions

Re: [Qemu-devel] [PATCH v4 14/30] stellaris_enet: avoid buffer overrun on incoming migration (part 2)

2014-04-01 Thread Peter Maydell
On 1 April 2014 11:05, Peter Maydell wrote: > But note that there seems to be a bug or two in > the DATA read logic: our cutoff for tx frame too > long is tx_frame_len > 2032, but for the limit > case of 2032, if we add 14 for the ethernet header > and 4 for explicit CRC then we get 2050, which is

[Qemu-devel] [RFC PATCH V2 2/6] kvm: Handle exit reason KVM_EXIT_SYSTEM_EVENT

2014-04-01 Thread Pranavkumar Sawargaonkar
In-kernel PSCI v0.2 emulation of KVM ARM/ARM64 forwards SYSTEM_OFF and SYSTEM_RESET function calls to QEMU using KVM_EXIT_SYSTEM_EVENT exit reason. This patch updates kvm_cpu_exec() to handle KVM_SYSTEM_EVENT_SHUTDOWN and KVM_SYSTEM_EVENT_RESET system-level events from QEMU-side. Signed-off-by: P

[Qemu-devel] [RFC PATCH V2 0/6] PSCI v0.2 support for KVM ARM/ARM64

2014-04-01 Thread Pranavkumar Sawargaonkar
Recentely patches have been posted for in-kernel emulation of PSCI v0.2 http://www.spinics.net/lists/arm-kernel/msg305467.html This patchset adds the QEMU side changes for providing PSCI v0.2 to VM. ChangeLog: V2: - Rebase this patchset against v6 patchset for in-kernel PSCI v0.2 emulation (h

[Qemu-devel] [RFC PATCH V2 1/6] linux-headers: Update KVM headers from v3.14

2014-04-01 Thread Pranavkumar Sawargaonkar
Syncup KVM related linux headers from v3.14. Signed-off-by: Pranavkumar Sawargaonkar Signed-off-by: Anup Patel --- linux-headers/asm-arm/kvm.h | 19 +++--- linux-headers/asm-arm64/kvm.h | 21 linux-headers/linux/kvm.h | 10 linux-headers/linux/psci.

[Qemu-devel] [RFC PATCH V2 3/6] target-arm: Enable KVM_ARM_VCPU_PSCI_0_2 feature when possible

2014-04-01 Thread Pranavkumar Sawargaonkar
Latest linux kernel supports in-kernel emulation of PSCI v0.2 but to enable it we need to select KVM_ARM_VCPU_PSCI_0_2 feature using KVM_ARM_VCPU_INIT ioctl. Also, we can use KVM_ARM_VCPU_PSCI_0_2 feature for VCPU only when linux kernel has KVM_CAP_ARM_PSCI_0_2 capability. This patch updates kvm_

[Qemu-devel] [RFC PATCH V2 6/6] hw/arm/virt: Use PSCI v0.2 function IDs when kernel supports its

2014-04-01 Thread Pranavkumar Sawargaonkar
If we have in-kernel emulation of PSCI v0.2 for KVM ARM/ARM64 then we enable PSCI v0.2 for each VCPU at the time of VCPU init hence we need to provide PSCI v0.2 function IDs via generated DTB. This patch updates generated DTB to have PSCI v0.2 function IDs when we have in-kernel emulation PSCI v0.

[Qemu-devel] [RFC PATCH V2 4/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64

2014-04-01 Thread Pranavkumar Sawargaonkar
To implement kvm_arch_reset_vcpu(), we simply re-init the VCPU using kvm_arch_init_vcpu() so that all registers of VCPU are set to their reset values by in-kernel KVM code. Signed-off-by: Pranavkumar Sawargaonkar Signed-off-by: Anup Patel --- target-arm/kvm64.c |4 1 file changed, 4 in

Re: [Qemu-devel] [PATCH v6 1/8] virtio_legacy_get_byteswap: endian-ambivalent targets using legacy virtio

2014-04-01 Thread Greg Kurz
On Mon, 31 Mar 2014 16:50:55 +0200 Alexander Graf wrote: > On 03/28/2014 11:57 AM, Greg Kurz wrote: > > From: Rusty Russell > > > > virtio data structures are defined as "target endian", which assumes > > that's a fixed value. In fact, that actually means it's platform-specific. > > The OASIS v

[Qemu-devel] [RFC PATCH V2 5/6] target-arm: Provide PSCI v0.2 constants to generic QEMU code

2014-04-01 Thread Pranavkumar Sawargaonkar
Provide QEMU PSCI v0.2 constants for non-KVM code; this will allow us to avoid an #ifdef in boards which set up a PSCI v0.2 node in the device tree. Signed-off-by: Pranavkumar Sawargaonkar Signed-off-by: Anup Patel --- target-arm/kvm-consts.h | 63 ++---

Re: [Qemu-devel] [RFC PATCH V2 6/6] hw/arm/virt: Use PSCI v0.2 function IDs when kernel supports its

2014-04-01 Thread Pranavkumar Sawargaonkar
Hi Rob/Mark, On 1 April 2014 17:23, Pranavkumar Sawargaonkar wrote: > If we have in-kernel emulation of PSCI v0.2 for KVM ARM/ARM64 then > we enable PSCI v0.2 for each VCPU at the time of VCPU init hence we > need to provide PSCI v0.2 function IDs via generated DTB. > > This patch updates generat

Re: [Qemu-devel] [PATCH v6 2/8] virtio: allow byte swapping for vring and config access

2014-04-01 Thread Greg Kurz
On Mon, 31 Mar 2014 18:26:54 +0200 Andreas Färber wrote: > Am 31.03.2014 18:24, schrieb Alexander Graf: > > On 03/28/2014 11:57 AM, Greg Kurz wrote: > >> From: Rusty Russell > >> > >> This is based on a simpler patch by Anthony Liguouri, which only handled > >> the vring accesses. We also need s

Re: [Qemu-devel] [PATCH 0/8] tcg: tidy the type of code_ptr

2014-04-01 Thread Alex Bennée
Richard Henderson writes: > On 03/29/2014 01:26 PM, Peter Maydell wrote: >> It seems like it might be worth abstracting out "give me the byte >> difference between these two code pointers" rather than having >> inline (uintptr_t)codeptr1 - (uintptr_t)codeptr2, but I dunno. > > Yeah, I dithered a

Re: [Qemu-devel] [PATCH 1/8] exec-all.h: Use stl_p to avoid undefinedbehaviour patching x86 jumpss

2014-04-01 Thread Alex Bennée
Richard Henderson writes: > From: Peter Maydell > > The code which patches x86 jump instructions assumes it can do an > unaligned write of a uint32_t. This is actually safe on x86, but it's > still undefined behaviour. We have infrastructure for doing efficient > unaligned accesses which doesn'

Re: [Qemu-devel] [PATCH 2/8] tcg: Avoid stores to unaligned addresses

2014-04-01 Thread Alex Bennée
Richard Henderson writes: > From: Peter Maydell > > Avoid stores to unaligned addresses in TCG code generation, by using the > usual memcpy() approach. (Using bswap.h would drag a lot of QEMU baggage > into TCG, so it's simpler just to do direct memcpy() here.) I notice bswap.h has an interest

Re: [Qemu-devel] [PATCH 3/8] tcg: Avoid undefined behaviour patchingcode at unaligned addressess

2014-04-01 Thread Alex Bennée
Richard Henderson writes: > From: Peter Maydell > > To avoid C undefined behaviour when patching generated code, > provide wrappers tcg_patch8/16/32/64 which use the usual memcpy > trick, and use them in the i386 backend. > > Signed-off-by: Peter Maydell > Signed-off-by: Richard Henderson Rev

Re: [Qemu-devel] [RFC PATCH V2 4/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64

2014-04-01 Thread Peter Maydell
On 1 April 2014 12:53, Pranavkumar Sawargaonkar wrote: > To implement kvm_arch_reset_vcpu(), we simply re-init the VCPU > using kvm_arch_init_vcpu() so that all registers of VCPU are set > to their reset values by in-kernel KVM code. > > Signed-off-by: Pranavkumar Sawargaonkar > Signed-off-by: An

Re: [Qemu-devel] [RFC PATCH V2 3/6] target-arm: Enable KVM_ARM_VCPU_PSCI_0_2 feature when possible

2014-04-01 Thread Peter Maydell
On 1 April 2014 12:53, Pranavkumar Sawargaonkar wrote: > Latest linux kernel supports in-kernel emulation of PSCI v0.2 but > to enable it we need to select KVM_ARM_VCPU_PSCI_0_2 feature using > KVM_ARM_VCPU_INIT ioctl. > > Also, we can use KVM_ARM_VCPU_PSCI_0_2 feature for VCPU only when > linux k

Re: [Qemu-devel] [PATCH 1/8] exec-all.h: Use stl_p to avoid undefinedbehaviour patching x86 jumpss

2014-04-01 Thread Peter Maydell
On 1 April 2014 13:09, Alex Bennée wrote: > > Richard Henderson writes: > >> From: Peter Maydell >> >> The code which patches x86 jump instructions assumes it can do an >> unaligned write of a uint32_t. This is actually safe on x86, but it's >> still undefined behaviour. We have infrastructure f

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Alex Bennée
Chen Gang writes: > Hello Maintainers: > > In main switch of main(), it contents several styles for "{...}" code block. > > If it is necessary to use unique style within a function, please let me > know, I will/should clean up it. And also better to tell me which style > we need choose -- for me

Re: [Qemu-devel] KVM call agenfda for 2014-04-01

2014-04-01 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please, send any topic that you are interested in covering. > > Thanks, Juan. > > Call details: > > 10:00 AM to 11:00 AM EDT > Every two weeks Time clarification. This time was wrong, it is 1h early. 15:00 CEST 13:00 UTC 09:00 EDT Sorry for the inconvenience (I co

[Qemu-devel] [PATCH v3 2/2] xbzrle: check 8 bytes at a time after an concurrency scene

2014-04-01 Thread arei.gonglei
From: ChenLiang The logic of old code is correct. But Checking byte by byte will consume time after an concurrency scene. Reported-by: Dr. David Alan Gilbert Signed-off-by: ChenLiang Signed-off-by: Gonglei --- xbzrle.c | 28 ++-- 1 file changed, 18 insertions(+), 10 d

[Qemu-devel] [PATCH v3 1/2] xbzrle: don't check the value in the vm ram repeatedly

2014-04-01 Thread arei.gonglei
From: ChenLiang xbzrle_encode_buffer checks the value in the vm ram repeatedly. It is risk if runs xbzrle_encode_buffer on changing data. And it is not necessary. Reported-by: Dr. David Alan Gilbert Signed-off-by: ChenLiang Signed-off-by: Gonglei --- xbzrle.c | 20 +++- 1 fil

[Qemu-devel] [PATCH v3 0/2] xbzrle: fix one corruption issue

2014-04-01 Thread arei.gonglei
From: ChenLiang v2 -> v1: * reuse the result of xor v1 -> v2: * avoid to stuck in loop * check 8 bytes at a time after an concurrency scene ChenLiang (2): xbzrle: don't check the value in the vm ram repeatedly xbzrle: check 8 bytes at a time after an concurrency scene xbzrle.c | 48 +

[Qemu-devel] How to debug qemu-ga.exe (step by step) in windows ?

2014-04-01 Thread Gonglei (Arei)
Hi, I'm learning qemu ga from wiki http://wiki.qemu.org/Features/QAPI/GuestAgent qemu-ga.exe is running in my windows VM now, and I want to debug it step by step. Could anyone specify how to debug in windows ? Thanks. Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v4 27/30] vmxnet3: validate interrupt indices coming from guest

2014-04-01 Thread Dmitry Fleytman
On Apr 1, 2014, at 14:33 PM, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: >> From: Dmitry Fleytman >> >> CVE-2013-4544 >> >> Signed-off-by: Dmitry Fleytman >> Reported-by: Michael S. Tsirkin >> Signed-off-by: Michael S. Tsirkin >> --- >> hw/net/vmxnet3.c |

Re: [Qemu-devel] [PULL 00/02] seccomp: adding new syscalls to the whitelist

2014-04-01 Thread Eduardo Otubo
On 03/24/2014 03:13 PM, Paul Moore wrote: On Thursday, March 13, 2014 10:42:42 AM Eduardo Otubo wrote: The following changes since commit 750036a848ea913ba6343718ffa70da98f7eef6b: Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into staging (2014-03-12 17:53:37 +)

Re: [Qemu-devel] [PATCH v4 27/30] vmxnet3: validate interrupt indices coming from guest

2014-04-01 Thread Dr. David Alan Gilbert
* Dmitry Fleytman (dmi...@daynix.com) wrote: > > On Apr 1, 2014, at 14:33 PM, Dr. David Alan Gilbert > wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > >> From: Dmitry Fleytman > >> > >> CVE-2013-4544 > >> > >> Signed-off-by: Dmitry Fleytman > >> Reported-by: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Chen Gang
On 04/01/2014 08:36 PM, Alex Bennée wrote: > > Chen Gang writes: > >> Hello Maintainers: >> >> In main switch of main(), it contents several styles for "{...}" code block. >> >> If it is necessary to use unique style within a function, please let me >> know, I will/should clean up it. And also b

Re: [Qemu-devel] [PATCH v5 11/37] target-arm: Don't mention PMU in debug feature register

2014-04-01 Thread Christopher Covington
Hi Peter, On 03/28/2014 12:09 PM, Peter Maydell wrote: > Suppress the ID_AA64DFR0_EL1 PMUVer field, even if the CPU specific > value claims that it exists. QEMU doesn't currently implement it, > and not advertising it prevents the guest from trying to use it > and getting UNDEFs on unimplemented r

Re: [Qemu-devel] [PATCH] HMP: support specifying dump format for dump-guest-memory

2014-04-01 Thread Christian Borntraeger
On 01/04/14 10:33, Qiao Nuohan wrote: > Dumping guest memory is available to specify the dump format now. This patch > adds options '-z|-l|-s' to HMP command dump-guest-memory to specify dumping in > kdump-compression format, with zlib/lzo/snappy compression. And without these > options ELF format

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Markus Armbruster
Chen Gang writes: > On 04/01/2014 04:13 PM, Markus Armbruster wrote: >> Chen Gang writes: >> >>> On 03/31/2014 11:49 PM, Markus Armbruster wrote: Chen Gang writes: > in get_boot_device() > > - remove 'res' to simplify code > > in main(): > > - remove use

Re: [Qemu-devel] [PATCH 0/8] tcg: tidy the type of code_ptr

2014-04-01 Thread Alex Bennée
Alex Bennée writes: > Richard Henderson writes: > >> On 03/29/2014 01:26 PM, Peter Maydell wrote: >>> Is there a better name than 'tcg_itype' ? Putting 'type' in the >>> name of a type is a bit redundant, and suggests it contains >>> a type rather than an insn. >> >> I'm open to suggestions th

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Chen Gang
On 04/01/2014 09:33 PM, Markus Armbruster wrote: > Chen Gang writes: > >> On 04/01/2014 04:13 PM, Markus Armbruster wrote: >>> Chen Gang writes: >>> On 03/31/2014 11:49 PM, Markus Armbruster wrote: > Chen Gang writes: > >> in get_boot_device() >> >> - remove 'res' to s

[Qemu-devel] Error occurs when "make efirom" in the patch "qemu/roms/"

2014-04-01 Thread Zhangjie (HZ)
Hi! I have trouble to build pex in qemu. When I run "make efirom" in the path qemu/roms/ I get errors as follows: arch/x86/core/x86_tcpip.c: Assembler messages: arch/x86/core/x86_tcpip.c:101: Error: no such instruction: `lodsll' arch/x86/core/x86_tcpip.c:103: Error: no such instruction: `lodsll'

Re: [Qemu-devel] [PATCH v5 11/37] target-arm: Don't mention PMU in debug feature register

2014-04-01 Thread Peter Maydell
On 1 April 2014 14:19, Christopher Covington wrote: > Is the A32 port able to communicate the instruction count to target software > via the PMU? Sort of -- we implement the PMCR in A32 now (that code just got added recently). However it doesn't actually return an instruction count, because QEMU

Re: [Qemu-devel] [PATCH for-2.0] qcow2: link all L2 meta updates in preallocate()

2014-04-01 Thread Stefan Hajnoczi
On Tue, Apr 01, 2014 at 11:12:57AM +0200, Stefan Hajnoczi wrote: > preallocate() only links the first QCowL2Meta's data clusters into the > L2 table and ignores any chained QCowL2Metas in the linked list. > > Chains of QCowL2Meta structs are built up when contiguous clusters span > L2 tables. Eac

Re: [Qemu-devel] [PATCH for-2.0 00/47] block: image format input validation fixes

2014-04-01 Thread Stefan Hajnoczi
On Wed, Mar 26, 2014 at 01:05:22PM +0100, Stefan Hajnoczi wrote: > This patch series fixes missing input validation in qcow2, vdi, vhdx, vpc, > bochs, curl, parallels, cloop, and dmg. > > Some of the patches have been assigned CVEs because they have a security > impact. > > Most of the missing in

Re: [Qemu-devel] Massive read only kvm guests when backing file was missing

2014-04-01 Thread Stefan Hajnoczi
On Mon, Mar 31, 2014 at 09:51:23PM -0300, Alejandro Comisario wrote: > Again, thanks to everyone. Did you reach a conclusion or is there still a problem that might be a bug in KVM? Stefan

Re: [Qemu-devel] [PATCH v6 3/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-04-01 Thread Lluís Vilanova
Eric Blake writes: > On 03/31/2014 01:16 PM, Lluís Vilanova wrote: [...] >> +if not os.path.isabs(include_path): >> +include_path = os.path.join(self.input_dir, >> include_path) >> +if not os.path.isfile(include_path): >> +

[Qemu-devel] drive_del vs. device_del: what should come first?

2014-04-01 Thread Heinz Graalfs
Hi Kevin, doing a virsh detach-device ... ends up in the following QEMU monitor commands: 1. device_del ... 2. drive_del ... qmp_device_del() performs the device unplug path. In case of a block device do_drive_del() tries to prevent further IO against the host device. However, bdrv_fi

Re: [Qemu-devel] [PATCH v6 2/4] qapi: Use an explicit input file

2014-04-01 Thread Lluís Vilanova
Eric Blake writes: > On 03/31/2014 01:16 PM, Lluís Vilanova wrote: [...] >> @@ -368,7 +368,8 @@ check-tests/test-qapi.py: tests/test-qapi.py >> >> .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y)) >> $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: >> $(SRC_PATH)/%.json >> -

[Qemu-devel] [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-01 Thread Jun Lee
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name of

Re: [Qemu-devel] Massive read only kvm guests when backing file was missing

2014-04-01 Thread Alejandro Comisario
The conclusion is that the backing file stored on NFS that is the same for all 950 hosts / 10500 guests was deleted and immediatelly raised a read-only filesystem on the guest, seems that there's no way to avoid that. We developed a script to recover from that scenario if the same happens. Basical

[Qemu-devel] [PATCH v7 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-04-01 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- docs/qapi-code-gen.txt | 11 + scripts/qapi.py| 59 +++- tests/Makefile |5 ++ tests/qapi-schema/include-after-err.err|1 tests/qapi-schema/in

[Qemu-devel] [PATCH v7 2/4] qapi: [trivial] Show full exception message in "test-qapi.py"

2014-04-01 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- tests/qapi-schema/test-qapi.py |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index b3d1e1d..ac6da13 100644 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-schema/te

[Qemu-devel] [PATCH v7 0/4] qapi: Allow modularization of QAPI schema files

2014-04-01 Thread Lluís Vilanova
Adds an include primitive to the syntax of QAPI schema files, allowing these to be modularized into multiple per-topic files in the future. Signed-off-by: Lluís Vilanova --- Changes in v7: * Add tests for relative path inclusion. * Print inclusion path on all errors. * Add test to ensure errors

[Qemu-devel] [PATCH v7 1/4] qapi: [trivial] Break long command lines

2014-04-01 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Makefile | 24 ++-- tests/Makefile | 20 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ec74039..84345ee 100644 --- a/Makefile +++ b/Makefile @@ -237,23 +237,35 @@ qapi

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Kevin O'Connor
On Tue, Apr 01, 2014 at 10:40:00AM +0200, Laszlo Ersek wrote: > On 03/31/14 22:18, Gabriel L. Somlo wrote: > > The only sticking point remaining would be who gets to generate the > > Type 0 (BIOS Information) table and when, which is something QEMU > > should arguably NOT be doing on behalf of SeaB

[Qemu-devel] [PATCH v7 3/4] qapi: Use an explicit input file

2014-04-01 Thread Lluís Vilanova
Use an explicit input file on the command-line instead of reading from standard input Signed-off-by: Lluís Vilanova --- Makefile | 12 ++-- docs/qapi-code-gen.txt |4 ++-- scripts/qapi-commands.py

Re: [Qemu-devel] [PATCH v4 15/30] stellaris_enet: avoid buffer orerrun on incoming migration (part 3)

2014-04-01 Thread Eric Blake
On 03/31/2014 08:16 AM, Michael S. Tsirkin wrote: > CVE-2013-4532 s/orerrun/overrun/ in the subject -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Christian Borntraeger
From: Ekaterina Tumanova Add KVM_DEV_TYPE_S390_CONFIG kvm device that contains configuration and control attributes of particular vm. The device is created by KVM_CREATE_DEVICE ioctl. The attributes may be retrieved and stored by calling KVM_GET_DEVICE_ATTR and KVM_SET_DEVICE_ATTR ioctls. Signed

[Qemu-devel] [PATCH/RFC] s390: Provide a configuration and control device

2014-04-01 Thread Christian Borntraeger
We want to configure several things in KVM that go beyond what ENABLE_CAP (we need payload) or ONE_REG (we need it for the VM and we need to do more complex actions) can provide. Instead of adding several s390 specific ioctls, lets provide a configuration and control device that encapsulates differ

Re: [Qemu-devel] [PATCH v6 3/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-04-01 Thread Eric Blake
On 04/01/2014 07:46 AM, Lluís Vilanova wrote: >> The formatting in Benoît's series was a little nicer aesthetically: > >> +Inclusion loop detected with file: multi_file_loop_include.json >> +Path to the broken include is: >> +multi_file_loop_include.json >> +multi_loop.json > >> Furtherm

Re: [Qemu-devel] [PATCH v4 29/30] vmxnet3: validate queues configuration coming from quest

2014-04-01 Thread Michael S. Tsirkin
On Tue, Apr 01, 2014 at 01:04:12PM +0300, Dmitry Fleytman wrote: > > On Mar 31, 2014, at 18:48 PM, Dr. David Alan Gilbert > wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > From: Dmitry Fleytman > > CVE-2013-4544 > > Signed-off-by: Dmitry Fleytman

[Qemu-devel] [PATCH/RFC] s390x/kvm: implement and use QEMU config device for s390

2014-04-01 Thread Christian Borntraeger
From: Ekaterina Tumanova The following patch adds Qemu CONFIG device, which interacts with kvm CONFIG device by calling KVM_CREATE_DEVICE (to create the device in kernel), KVM_GET_DEVICE_ATTR and KVM_SET_DEVICE_ATTR (to get and set the particular attributes of KVM CONFIG device respectively). Thi

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Alexander Graf
On 04/01/2014 04:47 PM, Christian Borntraeger wrote: From: Ekaterina Tumanova Add KVM_DEV_TYPE_S390_CONFIG kvm device that contains configuration and control attributes of particular vm. The device is created by KVM_CREATE_DEVICE ioctl. The attributes may be retrieved and stored by calling KVM_

Re: [Qemu-devel] [PATCH/RFC] s390: Provide a configuration and control device

2014-04-01 Thread Alexander Graf
On 04/01/2014 04:47 PM, Christian Borntraeger wrote: We want to configure several things in KVM that go beyond what ENABLE_CAP (we need payload) or ONE_REG (we need it for the VM and we need to do more complex actions) can provide. Instead of adding several s390 specific ioctls, lets provide a co

[Qemu-devel] Qemu 2.0 regression with xen: qemu crash on any domUs S.O. start

2014-04-01 Thread Fabio Fantoni
Today I tried latest qemu 2.0 compiled from git (commit 63678e17cf399ff81b93417fe7bee8d6ef6b6b1b) on this dom0: Debian 7 (Wheezy) 64 bit with kernel from package linux-image-3.2.0-4-amd64 version 3.2.54-2 and all dependency packages for xen, spice and usb redirection. Seabios 1.7.3-3, spice 0.12

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Christian Borntraeger
On 01/04/14 16:58, Alexander Graf wrote: > On 04/01/2014 04:47 PM, Christian Borntraeger wrote: >> From: Ekaterina Tumanova >> >> Add KVM_DEV_TYPE_S390_CONFIG kvm device that contains >> configuration and control attributes of particular vm. >> The device is created by KVM_CREATE_DEVICE ioctl. >>

Re: [Qemu-devel] networking stalls in the guest -- backlog in the host

2014-04-01 Thread Stefan Hajnoczi
On Thu, Mar 27, 2014 at 04:13:15PM -0600, David Ahern wrote: > > We are hitting a networking problem and hoping someone has an idea > -- perhaps a known bug. > > After a couple of hours of runtime with low level traffic (e.g., 1 > sec pings) the VM stops receiving packets. In the host running tc

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Alexander Graf
On 04/01/2014 05:04 PM, Christian Borntraeger wrote: On 01/04/14 16:58, Alexander Graf wrote: On 04/01/2014 04:47 PM, Christian Borntraeger wrote: From: Ekaterina Tumanova Add KVM_DEV_TYPE_S390_CONFIG kvm device that contains configuration and control attributes of particular vm. The device i

Re: [Qemu-devel] How to debug qemu-ga.exe (step by step) in windows ?

2014-04-01 Thread Michael Roth
Quoting Gonglei (Arei) (2014-04-01 07:47:42) > Hi, > > I'm learning qemu ga from wiki > http://wiki.qemu.org/Features/QAPI/GuestAgent > qemu-ga.exe is running in my windows VM now, and I want to debug it step > by step. > Could anyone specify how to debug in windows ? Thanks. Ther

Re: [Qemu-devel] [Bug 1278977] Re: qemu-system-sparc64 crash when initializing disk

2014-04-01 Thread Artyom Tarasenko
Hi Waldemar, It can be a Linux kernel bug or a QEMU bug. To get the further info, try -serial telnet::,server,wait and use the telnet as a serial console. When the guest hangs use the telnet menu to send break, and then type 'T'. This would produce the same result as magic SysRq+T: the kernel

  1   2   3   >