Re: [Qemu-devel] [PATCH v2 6/9] qom: Implement qom-get HMP command

2015-03-12 Thread Gonglei
On 2015/3/13 0:43, Andreas Färber wrote: > Reimplement it based on qmp_qom_get() to avoid converting QObjects back > to strings. > > Inspired-by: Paolo Bonzini > Signed-off-by: Andreas Färber > --- > hmp-commands.hx | 13 + > hmp.c | 22 ++ > hmp.h

[Qemu-devel] [PATCH v2 1/4] exec: Atomic access to bounce buffer

2015-03-12 Thread Fam Zheng
There could be a race condition when two processes call address_space_map concurrently and both want to use the bounce buffer. Add an in_use flag in BounceBuffer to sync it. Signed-off-by: Fam Zheng --- exec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec

[Qemu-devel] [PATCH v2 0/4] exec: Make bounce buffer thread safe

2015-03-12 Thread Fam Zheng
The global bounce buffer used for non-direct memory access is not thread-safe: 1) Access to "bounce" is not atomic. 2) Access to "map_client_list" is not atomic. 3) In dma_blk_cb, there is a race condition between: mem = dma_memory_map(dbs->sg->as, cur_addr, &cur_len, dbs->dir);

[Qemu-devel] [PATCH v2 3/4] exec: Notify cpu_register_map_client caller if the bounce buffer is available

2015-03-12 Thread Fam Zheng
The caller's workflow is like if (!address_space_map()) { ... cpu_register_map_client(); } If bounce buffer became available after address_space_map() but before cpu_register_map_client(), the caller could miss it and has to wait for the next bounce buffer uesr to release,

[Qemu-devel] [PATCH v2 2/4] exec: Atomic access to map_client_list

2015-03-12 Thread Fam Zheng
Change map_client_list to QSLIST which supports atomic operations. There are two access points to map_client_list. One is cpu_register_map_client, the other is cpu_notify_map_clients called after releasing the global bounce buffer in address_space_unmap. Each is now converted to a single atomic op

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-12 Thread Chen, Tiejun
I don't think you can abort here, since a user can set b_info->u.hvm.gfx_passthru_kind to default. You would need to return an error. Then, looks I should do this, LOG(ERROR, "No supported IGD to passthru," " or please force set gfx_passthru=\"igd\".\

[Qemu-devel] [PATCH v2 4/4] dma-helpers: Move reschedule_dma BH to blk's AioContext

2015-03-12 Thread Fam Zheng
That if the dbs' owner is an iothread, dma should be resumed on the right thread. In this case it is the AioContext of the block device. Signed-off-by: Fam Zheng --- dma-helpers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dma-helpers.c b/dma-helpers.c index 6918572..

Re: [Qemu-devel] [PULL v4 00/11] Net patches

2015-03-12 Thread Fam Zheng
On Thu, 03/12 17:50, Stefan Hajnoczi wrote: > Hi Fam, > This pull request contains patches that fail mingw compilation and > glib version requirements. They passed in patchew: > http://qemu.patchew.org/testing/log/%3c1426170808-6343-1-git-send-email-stefa...@redhat.com%3E > > Peter's build script

Re: [Qemu-devel] [Qemu-stable] [PATCH V2] virtio: validate the existence of handle_output before calling it

2015-03-12 Thread Fam Zheng
On Thu, 03/12 17:50, Jason Wang wrote: > We don't validate the existence of handle_output which may let a buggy > guest to trigger a SIGSEV easily. E.g: > > 1) write 10 to queue_sel to a virtio net device with only 1 queue > 2) setup an arbitrary pfn > 3) then notify queue 10 > > Fixing this by v

[Qemu-devel] [PATCH 0/2] pci: fix aer related wrong

2015-03-12 Thread Chen Fan
there are somethings about misuse register bit, so here fix them. Chen Fan (2): pcie: correct mistaken register bit for End-End TLP Prefix Blocking aer: fix wrong check on expose aer tlp prefix log hw/pci/pcie.c | 2 +- hw/pci/pcie_aer.c | 2 +- include/hw/pci/pcie_regs

[Qemu-devel] [PATCH 1/2] pcie: correct mistaken register bit for End-End TLP Prefix Blocking

2015-03-12 Thread Chen Fan
from pcie spec 7.8.17, the End-End TLP Prefix Blocking bit local is 15(e.g. 0x8000) in device control 2 register. Signed-off-by: Chen Fan --- hw/pci/pcie.c | 2 +- include/hw/pci/pcie_regs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pc

[Qemu-devel] [PATCH 2/2] aer: fix wrong check on expose aer tlp prefix log

2015-03-12 Thread Chen Fan
when specify TLP Prefix log as using pcie_aer_inject_error, the TLP prefix log is always discarded. because the check is incorrect, the End-End TLP Prefix Supported bit (PCI_EXP_DEVCAP2_EETLPP) should be in Device Capabilities 2 Register. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- 1 f

Re: [Qemu-devel] [PATCH] vl: fix resource leak with monitor_fdset_add_fd

2015-03-12 Thread Patchew Tool
This series passed Patchew automatic testing, but there are some warnings. Find the log fragments below, or open the following URL to see the full log: http://qemu.patchew.org/testing/log/<1426172243-7830-1-git-send-email-pbonz...@redhat.com> --8<- === Starting docker === Cop

Re: [Qemu-devel] [RFC v2] monitor: add memory search commands s, sp

2015-03-12 Thread Patchew Tool
This series failed Patchew automatic testing. Find the log fragments below (grepped lines around keywords "error" and "warning"), or open the following URL to see the full log: http://qemu.patchew.org/testing/log/<1426083636-3104-1-git-send-email-hw.clau...@gmail.com> --8<- C

Re: [Qemu-devel] [RFC] monitor: add memory search commands s, sp

2015-03-12 Thread Patchew Tool
This series failed Patchew automatic testing. Find the log fragments below (grepped lines around keywords "error" and "warning"), or open the following URL to see the full log: http://qemu.patchew.org/testing/log/<1426071808-2513-1-git-send-email-hw.clau...@gmail.com> --8<- Ch

Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to trigger transition to postcopy

2015-03-12 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:46PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Once postcopy is enabled (with migrate_set_capability), the migration > will still start on precopy mode. To cause a transition into postcopy > the: > > migrate_start_postcopy >

Re: [Qemu-devel] [PATCH v5 22/45] postcopy: OS support test

2015-03-12 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:45PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Provide a check to see if the OS we're running on has all the bits > needed for postcopy. > > Creates postcopy-ram.c which will get most of the other helpers we need. > > Signed-of

[Qemu-devel] [PATCH] ui/cocoa.m: Give laptop users ability to scroll in monitor

2015-03-12 Thread Programmingkid
Laptop users usually have keyboards that are missing the page up and page down keys. This means they cannot scroll in the monitor. This patch gives laptop users the ability to scroll in the monitor by having the user push the Control + Up/Down arrow keys to scroll one line at a time. Use ALT/Opt

Re: [Qemu-devel] [PATCH v5 24/45] MIG_STATE_POSTCOPY_ACTIVE: Add new migration state

2015-03-12 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:47PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > 'MIG_STATE_POSTCOPY_ACTIVE' is entered after migrate_start_postcopy > > 'migration_postcopy_phase' is provided for other sections to know if > they're in postcopy. > > Signed-off-b

Re: [Qemu-devel] [PATCH] vl: fix resource leak with monitor_fdset_add_fd

2015-03-12 Thread Shannon Zhao
On 2015/3/12 22:57, Paolo Bonzini wrote: > monitor_fdset_add_fd returns an AddfdInfo struct (used by the QMP > command add_fd). Free it. > > Signed-off-by: Paolo Bonzini > --- > vl.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/vl.c b/vl.c > index eba5d4c..890

Re: [Qemu-devel] [PATCH v5 25/45] qemu_savevm_state_complete: Postcopy changes

2015-03-12 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:48PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > When postcopy calls qemu_savevm_state_complete it's not really > the end of migration, so skip: Given that, maybe the name should change.. >a) Finishing postcopiable iterative

Re: [Qemu-devel] [PATCH v5 26/45] Postcopy page-map-incoming (PMI) structure

2015-03-12 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:49PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The PMI holds the state of each page on the incoming side, > so that we can tell if the page is missing, already received > or there is a request outstanding for it. > > Signed-off-

[Qemu-devel] [PATCH] hw/net/e1000: fix integer endianness

2015-03-12 Thread Shannon Zhao
It's detected by coverity.In is_vlan_packet s->mac_reg[VET] is unsigned int but is dereferenced as a narrower unsigned short. This may lead to unexpected results depending on machine endianness. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/net/e1000.c | 4 ++-- 1 file changed,

[Qemu-devel] [PATCH] hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access

2015-03-12 Thread Shannon Zhao
It's detected by coverity. Fix out-of-bounds access of the function mp_dacl_listxattr. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/9pfs/virtio-9p-posix-acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p

Re: [Qemu-devel] [PATCH v4 14/17] ahci: Migrate IDEStatus

2015-03-12 Thread Amit Shah
On (Mon) 23 Feb 2015 [11:18:03], John Snow wrote: > Amazingly, we weren't doing this before. > > Make sure we migrate the IDEState structure that belongs to > the AHCIDevice.IDEBus structure during migrations. > > No version numbering changes because AHCI is not officially > migratable (and we ca

Re: [Qemu-devel] [PATCH v4 0/7] QEMU memory hot unplug support

2015-03-12 Thread Zhu Guihua
ping... On 03/04/2015 02:01 PM, Zhu Guihua wrote: Memory hot unplug are both asynchronous procedures. When the unplug operation happens, unplug request cb is called first. And when guest OS finished handling unplug, unplug cb will be called to do the real removal of device. This series is rebas

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Fam Zheng
On Thu, 03/12 12:15, Michael S. Tsirkin wrote: > On Thu, Mar 12, 2015 at 11:04:33AM +, Peter Maydell wrote: > > On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > > > This isn't a device reset though. > > > The function that Fam is touching is called > > > when a special "virtio reset" reg

Re: [Qemu-devel] [PATCH v4 00/10] cpu: add device_add foo-x86_64-cpu support

2015-03-12 Thread Zhu Guihua
Any other comments about this series? cc Andreas, Any progress about your socket model? Thanks, Zhu On 02/13/2015 06:25 PM, Zhu Guihua wrote: This series is based on the previous patchset from Chen Fan: https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html We try to make cpu

Re: [Qemu-devel] [PATCH v4 3/4] migration: Convert 'status' of MigrationInfo to use an enum type

2015-03-12 Thread zhanghailiang
On 2015/3/13 3:37, Eric Blake wrote: On 03/09/2015 12:45 AM, zhanghailiang wrote: The original 'status' is an open-coded 'str' type, convert it to use an enum type. This conversion is backwards compatible, better documented and more convenient for future extensibility. In addition, Fix a typo f

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Fam Zheng
On Fri, 03/13 14:07, Fam Zheng wrote: > On Thu, 03/12 12:15, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2015 at 11:04:33AM +, Peter Maydell wrote: > > > On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > > > > This isn't a device reset though. > > > > The function that Fam is touching i

[Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-12 Thread Fam Zheng
Throttle timers won't make any progress when VCPU is not running, which is prone to stall the request queue in cases like utils, qtest, suspending, and live migration, unless carefully handled. What we do now is crude. For example in bdrv_drain_all, requests are resumed immediately without consulti

<    1   2   3   4