[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

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

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 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] 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 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 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

[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

[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,

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-

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] 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 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

[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 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

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] [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] [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] [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

[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

[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 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

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

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

[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..

[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 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 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);

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

Re: [Qemu-devel] [PATCH v2 3/9] qom: Implement qom-set HMP command

2015-03-12 Thread Gonglei
On 2015/3/13 0:43, Andreas Färber wrote: > Re-implemented based on qmp_qom_set() to facilitate argument parsing. > > Warn about ambiguous path arguments. > > Signed-off-by: Andreas Färber > --- > hmp-commands.hx | 13 + > hmp.c | 21 + > hmp.h

Re: [Qemu-devel] [PATCH v2 2/9] qom: Implement qom-list HMP command

2015-03-12 Thread Gonglei
On 2015/3/13 0:43, Andreas Färber wrote: > Implement it as a wrapper for QMP qom-list, but mimic the behavior of > scripts/qmp/qom-list in making the path argument optional and listing > the root if absent, to hint users what kind of path to pass. > > Signed-off-by: Andreas Färber > --- > hmp-co

Re: [Qemu-devel] [PATCH v2] hmp: add info iothreads command

2015-03-12 Thread Ting Wang
On 2015-3-12 22:03, Stefan Hajnoczi wrote: > On Thu, Mar 12, 2015 at 04:35:24PM +0800, Ting Wang wrote: >> +void hmp_info_iothreads(Monitor *mon, const QDict *qdict) >> +{ >> +IOThreadInfoList *head = NULL, *elem = NULL; >> + >> +head = qmp_query_iothreads(NULL); >> +if (!head) { >> +

Re: [Qemu-devel] [PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size

2015-03-12 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Mar 11, 2015 at 02:19:03PM +0100, Michael S. Tsirkin wrote: >> QEMU wants to use virtio scsi structures with >> a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, >> let's add ifdefs to allow overriding them. >> >> Keep the old defines under new names:

Re: [Qemu-devel] [PATCH v2 0/9] qom: HMP commands to supersede info qtree

2015-03-12 Thread Gonglei
On 2015/3/13 0:43, Andreas Färber wrote: > Hello, > > The main patch of this series is an HMP command "info qom-tree", > which displays the machine composition tree. This names all objects, > including those missing in "info qtree" for lack of bus or for not being a > device. > > Properties can

Re: [Qemu-devel] [PATCH 0/2] virtio len fixes for qemu.

2015-03-12 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Thu, Mar 12, 2015 at 11:34:35AM +1030, Rusty Russell wrote: >> "Michael S. Tsirkin" writes: >> > On Wed, Mar 11, 2015 at 10:06:40PM +1030, Rusty Russell wrote: >> >> Each entry in the ring is a pair: \field{id} indicates the head >> >> entry of th

Re: [Qemu-devel] [PATCH v5 18/45] MIG_CMD_PACKAGED: Send a packaged chunk of migration stream

2015-03-12 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:41PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > MIG_CMD_PACKAGED is a migration command that allows a chunk > of migration stream to be sent in one go, and be received by > a separate instance of the loadvm loop while not interact

Re: [Qemu-devel] [PATCH v5 20/45] Modify savevm handlers for postcopy

2015-03-12 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:43PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Modify save_live_pending to return separate postcopiable and > non-postcopiable counts. > > Add 'can_postcopy' to allow a device to state if it can postcopy What's the purpose of t

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-12 Thread Bandan Das
jacob jacob writes: > On Thu, Mar 12, 2015 at 3:07 PM, Bandan Das wrote: >> jacob jacob writes: >> >>> Hi, >>> >>> Seeing failures when trying to do PCI passthrough of Intel XL710 40G >>> interface to KVM vm. >>> 0a:00.1 Ethernet controller: Intel Corporation Ethernet >>> Controller XL71

Re: [Qemu-devel] qemu-system-ppc TCG assert with git master

2015-03-12 Thread Richard Henderson
On Mar 12, 2015 4:34 PM, Mark Cave-Ayland wrote: > Yes indeed, this fixes the issue in my tests here. But from what you're > saying this is more of a workaround rather than a fix? Correct. It simply shows a bug in tcg/optimize.c. At least we have a workaround if a fix proves difficult before

Re: [Qemu-devel] qemu-system-ppc TCG assert with git master

2015-03-12 Thread Mark Cave-Ayland
On 12/03/15 16:51, Bastian Koppelmann wrote: Hi Bastian, > On 03/12/2015 03:41 PM, Richard Henderson wrote: >> On 03/12/2015 01:41 AM, Mark Cave-Ayland wrote: >>> Whilst testing git master in preparation for some OpenBIOS updates, I'm >>> seeing the following TCG assert in one of my older test im

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

2015-03-12 Thread Fam Zheng
On Thu, 03/12 15: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..89

Re: [Qemu-devel] qemu-system-ppc TCG assert with git master

2015-03-12 Thread Mark Cave-Ayland
On 12/03/15 14:55, Bastian Koppelmann wrote: Hi Bastian, > Hi Mark, sorry I forgot to cc qemu-devel :/ > > On 03/12/2015 08:41 AM, Mark Cave-Ayland wrote: >> Hi all, >> >> Whilst testing git master in preparation for some OpenBIOS updates, I'm >> seeing the following TCG assert in one of my olde

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-12 Thread jacob jacob
On Thu, Mar 12, 2015 at 3:07 PM, Bandan Das wrote: > jacob jacob writes: > >> Hi, >> >> Seeing failures when trying to do PCI passthrough of Intel XL710 40G >> interface to KVM vm. >> 0a:00.1 Ethernet controller: Intel Corporation Ethernet >> Controller XL710 for 40GbE QSFP+ (rev 01) > > Y

Re: [Qemu-devel] Dummy question for setting up a serial connection between host and guest

2015-03-12 Thread Alex Sun
Thank you Chris! Your suggestion is really working!!! Awesome!!! I find in this way if I input "^C" in stdio I'm gonna kill the qemu process. But I think it's fine to me ;-). Did you managed to make serial communication between host (which holds QEMU client) and guest (QEMU client)? I tried to us

[Qemu-devel] qemu with vde not working

2015-03-12 Thread Tim Tassonis
Hi all I have tried now for two days to get qemu 2.2.0 or 2.2.1 working with vde and just seem to get absolutely nowhere. On my old server (Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-77-generic x86_64)) it is working flawlessly, having a self compiled 2.2.0 version with the distros vde packages: -

Re: [Qemu-devel] [PATCH] windows build: -lssp added to qga-vss.dll libraries list

2015-03-12 Thread Stefan Weil
Am 12.03.2015 um 15:08 schrieb Paolo Bonzini: On 11/03/2015 20:59, Stefan Weil wrote: Am 11.03.2015 um 18:10 schrieb Joseph Hindin: When building qga-bss.dll with 64-bit mingw toolchain v. 4.9.2, the Typo: qga-vss.dll qga-vss.dll linking fails with unresolved symbols from libssp, stack prot

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

2015-03-12 Thread Paolo Bonzini
On 12/03/2015 20:58, Stefan Hajnoczi wrote: > David, Jiri, Scott: The minimum required glib version is 2.12 so > glib APIs that were added later cannot be used. Also note the > Windows integer constant warning above. > > My build environments didn't hit these issues so we need to go > around on

Re: [Qemu-devel] [PATCH v2 3/6] hw/char: pl011 don't keep setting the IRQ if nothing changed

2015-03-12 Thread Peter Maydell
On 12 March 2015 at 15:51, Peter Maydell wrote: > On 4 March 2015 at 14:35, Alex Bennée wrote: >> While observing KVM traces I can see additional IRQ calls on pretty much >> every MMIO access which is just plain inefficient. Only update the QEMU >> IRQ level if something has actually changed from

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

2015-03-12 Thread Peter Maydell
On 12 March 2015 at 17:50, Stefan Hajnoczi wrote: > 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 is

[Qemu-devel] [PULL v5 2/2] tests: rtl8139: test timers and interrupt

2015-03-12 Thread Stefan Hajnoczi
From: Frediano Ziglio Test behaviour of timers and interrupts related to timeouts. Signed-off-by: Frediano Ziglio Reviewed-by: Paolo Bonzini Message-id: 1420742303-3030-1-git-send-email-fredd...@gmail.com Signed-off-by: Stefan Hajnoczi --- tests/Makefile | 2 +- tests/rtl8139-test.c

[Qemu-devel] [PULL v5 1/2] net: synchronize net_host_device_remove with host_net_remove_completion

2015-03-12 Thread Stefan Hajnoczi
From: Paolo Bonzini Using net_host_check_device is unnecessary. qemu_del_net_client asserts for the non-peer case that it can only process NIC type NetClientStates, and that assertion is valid for the peered case as well, so move it and use the same check in net_host_device_remove. host_net_rem

[Qemu-devel] [PULL v5 0/2] Net patches

2015-03-12 Thread Stefan Hajnoczi
for rocker format string specifiers [Peter] * Squash in Windows build fix [Peter] * Both build fixes are described in "rocker: add new rocker switch device" The following changes since commit 2a5b58e2405e9fe42ba356b5a1b78146a4e9a659: Merge remote-tracking branch 'remotes/kraxel

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

2015-03-12 Thread Stefan Hajnoczi
On Thu, Mar 12, 2015 at 03:03:45PM +, Peter Maydell wrote: > On 12 March 2015 at 14:43, Peter Maydell wrote: > > On 12 March 2015 at 14:33, Stefan Hajnoczi wrote: > >> v4: > >> * Drop clang 3.5.0 fixes since they break with older clang and w32 [Peter] > >> > >> v3: > >> * Add clang 3.5.0 wa

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

2015-03-12 Thread Eric Blake
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 for qapi-schema.json (just re

Re: [Qemu-devel] [for 2.3? PATCH v4 0/4] Convert 'status' of MigrationInfo from open-coded 'str' to enum type

2015-03-12 Thread Eric Blake
On 03/11/2015 07:06 PM, zhanghailiang wrote: > ping... > > Should this series be merged in 2.3 version? I noticed that 3.17 is > hardfreeze time. Yes, I'd be in favor of including it in 2.3; it's up to the maintainer to make final decision, though. -- Eric Blake eblake redhat com+1-919-30

Re: [Qemu-devel] [PATCH v4 1/4] migration: Rename abbreviated macro MIG_STATE_* to MIGRATION_STATUS_*

2015-03-12 Thread Eric Blake
On 03/09/2015 12:45 AM, zhanghailiang wrote: > Rename all macros MIG_STATE_* to MIGRATION_STATUS_* except "MIG_STATE_ERROR", > we rename it to "MIGRATION_STATUS_FAILED" which will match the migration > status > string 'failed'. > > Signed-off-by: zhanghailiang > --- > migration/migration.c | 93

Re: [Qemu-devel] [PATCH v2] 9pfs-local: simplify/optimize local_mapped_attr_path()

2015-03-12 Thread Aneesh Kumar K.V
Michael Tokarev writes: > Omit one unnecessary memory allocation for components > of the path and create the resulting path directly given > lengths of the components. > > Do not use basename(3) because there are 2 versions of > this function which differs when argument ends with > slash characte

Re: [Qemu-devel] [PATCH v2 8/9] memory: Move owner-less MemoryRegions to /machine/unattached

2015-03-12 Thread Andreas Färber
Am 12.03.2015 um 19:05 schrieb Paolo Bonzini: > On 12/03/2015 17:43, Andreas Färber wrote: >> This cleans up the official /machine namespace. In particular >> /machine/system and /machine/io as well as entries with non-sanitized >> node names. > > Just a question: isn't it /machine/system[0] and /

[Qemu-devel] [PULL 2/2] qcow2: fix the macro QCOW_MAX_L1_SIZE's use

2015-03-12 Thread Stefan Hajnoczi
From: Wen Congyang QCOW_MAX_L1_SIZE's unit is byte, and l1_size's unit is l1 table entry size(8 bytes). Signed-off-by: Wen Congyang Message-id: 54ffb0f1.5010...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- block/qcow2-snapshot.c | 2 +- block/qcow2.c | 2 +- 2 files changed, 2 i

[Qemu-devel] [PULL 1/2] queue: fix QSLIST_INSERT_HEAD_ATOMIC race

2015-03-12 Thread Stefan Hajnoczi
From: Paolo Bonzini There is a not-so-subtle race in QSLIST_INSERT_HEAD_ATOMIC. Because atomic_cmpxchg returns the old value instead of a success flag, QSLIST_INSERT_HEAD_ATOMIC was checking for success by comparing against the second argument to atomic_cmpxchg. Unfortunately, this only works i

[Qemu-devel] [PULL 0/2] Block patches

2015-03-12 Thread Stefan Hajnoczi
The following changes since commit 2a5b58e2405e9fe42ba356b5a1b78146a4e9a659: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150312-1' into staging (2015-03-12 10:35:54 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pu

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-12 Thread Bandan Das
jacob jacob writes: > Hi, > > Seeing failures when trying to do PCI passthrough of Intel XL710 40G > interface to KVM vm. > 0a:00.1 Ethernet controller: Intel Corporation Ethernet > Controller XL710 for 40GbE QSFP+ (rev 01) You are assigning the PF right ? Does assigning VFs work or it's

Re: [Qemu-devel] [PATCH 0/5] monitor usb: Fixes for encrypted images

2015-03-12 Thread Eric Blake
On 03/12/2015 10:26 AM, Markus Armbruster wrote: > Fixes for encrypted images is of course a fool's errand. My actual > motivation is killing a few more qerror_report() calls. > > Markus Armbruster (5): > monitor: Drop dead QMP check from monitor_read_password() > monitor: Plug memory leak in

Re: [Qemu-devel] [PATCH v2 8/9] memory: Move owner-less MemoryRegions to /machine/unattached

2015-03-12 Thread Paolo Bonzini
On 12/03/2015 17:43, Andreas Färber wrote: > This cleans up the official /machine namespace. In particular > /machine/system and /machine/io as well as entries with non-sanitized > node names. Just a question: isn't it /machine/system[0] and /machine/io[0]? > > Cc: Paolo Bonzini > Signed-off-

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

2015-03-12 Thread Stefan Hajnoczi
On Thu, Mar 12, 2015 at 3:03 PM, Peter Maydell wrote: > On 12 March 2015 at 14:43, Peter Maydell wrote: >> On 12 March 2015 at 14:33, Stefan Hajnoczi wrote: >>> v4: >>> * Drop clang 3.5.0 fixes since they break with older clang and w32 [Peter] >>> >>> v3: >>> * Add clang 3.5.0 warning fixes >>

Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory

2015-03-12 Thread John Snow
On 02/26/2015 12:13 AM, Jordan Hargrave wrote: Referencing this old thread: https://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg00606.html I've run into an issue recently with testing q35 DMAR/intel iommu with ahci driver. My ahci driver writes the upper-32 bits (PORT_FIS_ADDR_HI) fir

Re: [Qemu-devel] [PATCH 0/2] ahci: test varying sector offsets

2015-03-12 Thread John Snow
NACK. Patchew caught a problem with how I was generating the QEMU_IMG path. Not important for 2.3, anyway. Will re-spin with a 2.4 subject. --js On 03/10/2015 01:29 PM, John Snow wrote: This is a re-send of patches 7 & 8 from an earlier series, "[PATCH v2 0/8] ahci: add more IO tests" which u

Re: [Qemu-devel] [PATCH] qemu-img: Avoid qerror_report_err() outside QMP handlers, again

2015-03-12 Thread Eric Blake
On 03/12/2015 09:08 AM, Markus Armbruster wrote: > qerror_report_err() is a transitional interface to help with > converting existing monitor commands to QMP. It should not be used > elsewhere. Replace by error_report_err(). > > Commit 6936f29 cleaned that up in qemu-img.c, but two calls have cr

[Qemu-devel] [PATCH v2 8/9] memory: Move owner-less MemoryRegions to /machine/unattached

2015-03-12 Thread Andreas Färber
This cleans up the official /machine namespace. In particular /machine/system and /machine/io as well as entries with non-sanitized node names. Cc: Paolo Bonzini Signed-off-by: Andreas Färber --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c in

Re: [Qemu-devel] [PATCH v2] utils: Add pow2ceil()

2015-03-12 Thread Eric Blake
On 03/12/2015 09:29 AM, Richard Henderson wrote: > On 02/25/2015 02:45 AM, Markus Armbruster wrote: >> return 0x8000u >> (clz64(value - 1) - 1); > > I realize this was weeks ago, but it would certainly be preferable to shift a > small constant left than a large constant right. > > Mos

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

2015-03-12 Thread Eric Blake
On 03/12/2015 08:57 AM, 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(-) Reviewed-by: Eric Blake -- Eric Blake eb

Re: [Qemu-devel] [PATCH 4/9] mips/kvm: Implement Config CP0 registers

2015-03-12 Thread James Hogan
On 12/03/15 16:41, Leon Alrae wrote: > On 11/03/2015 15:22, James Hogan wrote: >> Implement saving and restoring to KVM state of the Config CP0 registers >> (namely Config, Config1, Config2, Config3, Config4, and Config5). These >> control the features available to a guest, and a few of the fields

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

2015-03-12 Thread Andreas Färber
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 | 1 + 3 files changed, 36 insertions(+) diff --git

Re: [Qemu-devel] [PATCH RFC 0/2] Limit support for encrypted images to qemu-img

2015-03-12 Thread Paolo Bonzini
On 10/03/2015 19:13, Daniel P. Berrange wrote: > FWIW, I could see an improved interaction scheme working as follows > > First, introduce a new monitor command for setting named passwords, > > add_key mykey1 SECRETDATA Or reuse object_add: object_add secret,id=mykey1,secret=SECRETDATA

Re: [Qemu-devel] [PATCH 8/9] mips/kvm: Support FPU in MIPS KVM guests

2015-03-12 Thread James Hogan
On 12/03/15 16:44, Paolo Bonzini wrote: > > > On 11/03/2015 16:22, James Hogan wrote: >> diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h >> index 12045a11c036..410eb158f564 100644 >> --- a/linux-headers/linux/kvm.h >> +++ b/linux-headers/linux/kvm.h >> @@ -761,6 +761,7 @@ struc

[Qemu-devel] [PATCH v2 9/9] qdev: Move owner-less IRQs to /machine/unattached

2015-03-12 Thread Andreas Färber
Move non-qdev-gpio[*] from /machine into /machine/unattached. For the PC this moves 25 nodes from the stable namespace into the unstable. Cc: Peter Crosthwaite Signed-off-by: Andreas Färber --- hw/core/qdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev.

[Qemu-devel] [PATCH v2 0/9] qom: HMP commands to supersede info qtree

2015-03-12 Thread Andreas Färber
Hello, The main patch of this series is an HMP command "info qom-tree", which displays the machine composition tree. This names all objects, including those missing in "info qtree" for lack of bus or for not being a device. Properties can be listed with "qom-list" and set with "qom-set", like in

[Qemu-devel] [PATCH v2 7/9] qom: Add verbose option to info qom-tree HMP command

2015-03-12 Thread Andreas Färber
It lists object properties, as equivalent to what info qtree displays. Cc: Hani Benhabiles Signed-off-by: Andreas Färber --- monitor.c | 6 +++--- qdev-monitor.c | 49 ++--- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/monito

[Qemu-devel] [PATCH v2 4/9] qom: Implement info qom-tree HMP command

2015-03-12 Thread Andreas Färber
To complement qdev's bus-oriented info qtree, info qom-tree prints a hierarchical view of the QOM composition tree. By default, the machine composition tree is shown. This can be overriden by supplying a path argument, such as "info qom-tree /". Signed-off-by: Andreas Färber --- hmp-commands.hx

Re: [Qemu-devel] [PATCH 1/6] kvm: encapsulate HAS_DEVICE for vm attrs

2015-03-12 Thread Paolo Bonzini
On 12/03/2015 13:53, Jens Freimann wrote: > From: Dominik Dingel > > More and more virtual machine specifics between kvm and qemu will be > transferred with vm attributes. > So we encapsulate the common logic in a generic function. > > Additionally we need only to check during initialization i

[Qemu-devel] [PATCH v2 2/9] qom: Implement qom-list HMP command

2015-03-12 Thread Andreas Färber
Implement it as a wrapper for QMP qom-list, but mimic the behavior of scripts/qmp/qom-list in making the path argument optional and listing the root if absent, to hint users what kind of path to pass. Signed-off-by: Andreas Färber --- hmp-commands.hx | 13 + hmp.c | 26

[Qemu-devel] [PATCH v2 1/9] scripts: Add qom-tree script

2015-03-12 Thread Andreas Färber
Functionally it is a recursive qom-list with qom-get per non-child<> property. Some failures needed to be handled, such as trying to read a pointer property, which is not representable in QMP. Those print a literal "". Signed-off-by: Andreas Färber --- scripts/qmp/qom-tree | 70 +

[Qemu-devel] [PATCH v2 5/9] qapi: Stub out StringOutputVisitor struct support

2015-03-12 Thread Andreas Färber
Avoid a segfault when visiting, e.g., the QOM rtc-time property, by implementing the struct callbacks and raising an Error. Signed-off-by: Andreas Färber --- qapi/string-output-visitor.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/qapi/string-output-visitor.c b/qapi/strin

[Qemu-devel] [PATCH v2 3/9] qom: Implement qom-set HMP command

2015-03-12 Thread Andreas Färber
Re-implemented based on qmp_qom_set() to facilitate argument parsing. Warn about ambiguous path arguments. Signed-off-by: Andreas Färber --- hmp-commands.hx | 13 + hmp.c | 21 + hmp.h | 1 + 3 files changed, 35 insertions(+) diff --git a/hm

Re: [Qemu-devel] [PATCH 8/9] mips/kvm: Support FPU in MIPS KVM guests

2015-03-12 Thread Paolo Bonzini
On 11/03/2015 16:22, James Hogan wrote: > diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h > index 12045a11c036..410eb158f564 100644 > --- a/linux-headers/linux/kvm.h > +++ b/linux-headers/linux/kvm.h > @@ -761,6 +761,7 @@ struct kvm_ppc_smmu_info { > #define KVM_CAP_PPC_FIXUP_

Re: [Qemu-devel] [PATCH 4/9] mips/kvm: Implement Config CP0 registers

2015-03-12 Thread Leon Alrae
On 11/03/2015 15:22, James Hogan wrote: > Implement saving and restoring to KVM state of the Config CP0 registers > (namely Config, Config1, Config2, Config3, Config4, and Config5). These > control the features available to a guest, and a few of the fields will > soon be writeable by a guest so QEM

Re: [Qemu-devel] [PATCH 3/9] mips/kvm: Implement PRid CP0 register

2015-03-12 Thread Leon Alrae
On 11/03/2015 15:22, James Hogan wrote: > Implement saving and restoring to KVM state of the Processor ID (PRid) > CP0 register. This allows QEMU to control the PRid exposed to the guest > instead of using the default set by KVM. > > Signed-off-by: James Hogan > Cc: Paolo Bonzini > Cc: Leon Alra

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-12 Thread jacob jacob
Hi Alex, Thanks for the response. I tried both pci-assign and vfio-pci. The issue is seen in both cases. i40e driver complains about data tx timeout. # libvirtd --version libvirtd (libvirt) 1.2.9.2 Name: qemu-system-x86 Arch: x86_64 Epoch : 2 Version : 2.1.3 Release

Re: [Qemu-devel] fw_cfg specification ?

2015-03-12 Thread Paolo Bonzini
On 12/03/2015 17:16, Gabriel L. Somlo wrote: > static bool fw_cfg_data_mem_valid(void *opaque, hwaddr addr, >unsigned size, bool is_write) > { > +//FIXME: additional checks before we nuke fw_cfg_data_mem_write() ? yes, "&& !is_write". Or just leave an empt

Re: [Qemu-devel] [SeaBIOS] seabios stable release

2015-03-12 Thread Gerd Hoffmann
On Mi, 2015-03-11 at 14:31 -0400, Kevin O'Connor wrote: > On Wed, Mar 11, 2015 at 02:48:18PM +0100, Gerd Hoffmann wrote: > > Hi, > > > > Looks like we need a stable release branch for 1.8 and roll out a 1.8.1 > > release with some fixes for qemu. > > > > Issue #1: support for multiple pci roots

Re: [Qemu-devel] [PATCH 2/9] mips/kvm: Remove a couple of noisy DPRINTFs

2015-03-12 Thread Leon Alrae
On 11/03/2015 15:22, James Hogan wrote: > The DPRINTFs in cpu_mips_io_interrupts_pending() and kvm_arch_pre_run() > are particularly noisy during normal execution, and also not > particularly helpful. Remove them so that more important debug messages > can be more easily seen. > > Signed-off-by: J

Re: [Qemu-devel] Dummy question for setting up a serial connection between host and guest

2015-03-12 Thread Christopher Covington
Hi Alex, On 03/10/2015 09:12 PM, Alex Sun wrote: > I downloaded QEMU 2.2.0, and built a qemu-system-arm from there. > I loaded a versatile kernel 2.6.32.5 and my own file system. > > #qemu-system-arm -pidfile /tmp/qemu_0_pids/0.pid -M versatilepb -option-rom > efi-rtl8139.rom -initrd newinitrd -k

[Qemu-devel] [PATCH 2/5] monitor: Plug memory leak in monitor_read_bdrv_key_start()

2015-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitor.c b/monitor.c index 29c930a..12d80a1 100644 --- a/monitor.c +++ b/monitor.c @@ -5390,9 +5390,11 @@ int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs, if (monitor_c

[Qemu-devel] [PATCH 3/5] monitor usb: Inline monitor_read_bdrv_key_start()'s first part

2015-03-12 Thread Markus Armbruster
monitor_read_bdrv_key_start() does several things: 1. If no key is needed, call completion_cb() and succeed 2. If we're in QMP context, call qerror_report_err() and fail 3. Start reading the key in the monitor. This is two things too many. Inline 1. and 2. into its callers monitor_read_block_d

Re: [Qemu-devel] [PATCH 1/9] mips/kvm: Drop KVM_REG_MIPS_COUNT_* definitions

2015-03-12 Thread Leon Alrae
On 11/03/2015 15:22, James Hogan wrote: > The KVM_REG_MIPS_COUNT_* definitions are now included in > linux-headers/asm-mips/kvm.h since commit b061808d39fa ("linux-headers: > update linux headers to kvm/next"), therefore the duplicate definitions > in target-mips/kvm.c can now be dropped. > > Sign

[Qemu-devel] [PATCH 4/5] usb/dev-storage: Fix QMP device_add missing encryption key failure

2015-03-12 Thread Markus Armbruster
When the image is encrypted, QMP device_add creates the device, defers actually attaching it to when the key becomes available, then returns an error. This is wrong. device_add must either create the device and succeed, or do nothing and fail. The bug is in usb_msd_realize_storage(). It posts a

[Qemu-devel] [PATCH 1/5] monitor: Drop dead QMP check from monitor_read_password()

2015-03-12 Thread Markus Armbruster
Function is only called in HMP context since commit 333a96e "qapi: Convert change". Signed-off-by: Markus Armbruster --- monitor.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index c86a89e..29c930a 100644 --- a/monitor.c +++ b/monitor.c @@ -265,1

[Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-12 Thread jacob jacob
Hi, Seeing failures when trying to do PCI passthrough of Intel XL710 40G interface to KVM vm. 0a:00.1 Ethernet controller: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (rev 01) >From dmesg on host: [80326.559674] kvm: zapping shadow pages for mmio generation wraparound [80327.

  1   2   3   4   >