Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-27 Thread Zhang Chen
On 01/28/2016 01:44 PM, Jason Wang wrote: On 01/27/2016 10:40 AM, Zhang Chen wrote: From: ZhangChen Traffic-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host

Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation

2016-01-27 Thread Fam Zheng
On Thu, 01/28 09:28, Roy Shterman wrote: > Tried it again, > > Important to understand that after modifying and saving configuration of > xml with virsh edit $name_of_guest > > when i reenter the xml i can't see the iothread configuration in there. > don't understand why. > > Also, after add wha

Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation

2016-01-27 Thread Roy Shterman
Tried it again, Important to understand that after modifying and saving configuration of xml with virsh edit $name_of_guest when i reenter the xml i can't see the iothread configuration in there. don't understand why. Also, after add what you suggested I checked with "info qtree" command on the

Re: [Qemu-devel] [RFC 6/7] hw: arm: virt: register reserved IOVA region

2016-01-27 Thread Pavel Fedin
Hello! > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 3839c68..7eaf8be 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -125,6 +125,7 @@ static const MemMapEntry a15memmap[] = { > [VIRT_GPIO] = { 0x0903, 0x1000 }, > [VIRT_SECURE_UART] ={ 0x0904

[Qemu-devel] [PATCH 1/2] blockjob: Rename block_job_defer_to_main_loop

2016-01-27 Thread Fam Zheng
The next patch will make this function more restrictive than it is now, rename it and update comment to reflect the change. Signed-off-by: Fam Zheng --- block/backup.c| 2 +- block/commit.c| 2 +- block/mirror.c| 2 +- block/stream.c| 2 +- blo

[Qemu-devel] [PATCH 2/2] blockjob: Fix hang in block_job_finish_sync

2016-01-27 Thread Fam Zheng
With a mirror job running on a virtio-blk dataplane disk, sending "q" to HMP will cause a dead loop in block_job_finish_sync. This is because the aio_poll() only processes the AIO context of bs which has no more work to do, while the main loop BH that is scheduled for setting the job->completed fl

[Qemu-devel] [PATCH 0/2] blockjob: Fix dead loop with block_job_finish_sync on dataplane disks

2016-01-27 Thread Fam Zheng
I noticed this bug when reviewing Max's bdrv_close_all() series, so here goes the fix. Fam Zheng (2): blockjob: Rename block_job_defer_to_main_loop blockjob: Fix hang in block_job_finish_sync block/backup.c| 2 +- block/commit.c| 2 +- block/mirror.c|

[Qemu-devel] [PATCH 2/3] pcdimm: add 'type' field to PCDIMMDeviceInfo

2016-01-27 Thread Vladimir Sementsov-Ogievskiy
The field is needed to distinguish pc-dimm and nvdimm. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Xiao Guangrong CC: "Michael S. Tsirkin" CC: Igor Mammedov CC: Eric Blake CC: Markus Armbruster --- hw/mem/pc-dimm.c | 1 + qapi-schema.j

[Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning

2016-01-27 Thread Vladimir Sementsov-Ogievskiy
NVDIMM for now is planned to use as a backing store for DAX filesystem in the guest and thus this memory is excluded from guest memory management and LRUs. In this case libvirt running QEMU along with configured balloon almost immediately inflates balloon and effectively kill the guest as qemu cou

[Qemu-devel] [PATCH 1/3] move get_current_ram_size to virtio-balloon.c

2016-01-27 Thread Vladimir Sementsov-Ogievskiy
get_current_ram_size() is used only in virtio-balloon.c This patch moves it into virtio-balloon and make it static, to allow some balloon-specific tuning. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Stefan Hajnoczi CC: Xiao Guangrong

[Qemu-devel] [PATCH v4 0/3] don't use NVDIMM for balooning

2016-01-27 Thread Vladimir Sementsov-Ogievskiy
v4: 0001: Reviewed-by: Eric Blake second patch is splitted to 0002 and 0003 0002: Add 'type' field instead of 'balloonable' to PCDIMMDeviceInfo 0003: chec 'type' instead of 'balloonable' v3: - do not use additional class variable NVDIMM for now is planned to use as a backing store for DA

Re: [Qemu-devel] [PATCHv2 08/10] target-ppc: Add new TLB invalidate by HPTE call for hash64 MMUs

2016-01-27 Thread David Gibson
On Thu, Jan 28, 2016 at 03:33:18PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > > When HPTEs are removed or modified by hypercalls on spapr, we need to > > invalidate the relevant pages in the qemu TLB. > > > > Currently we do that by doing some c

Re: [Qemu-devel] [PATCHv2 06/10] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one

2016-01-27 Thread David Gibson
On Thu, Jan 28, 2016 at 03:20:38PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > > ppc_tlb_invalidate_one() has a big switch handling many different MMU > > types.  However, most of those branches can never be reached: > > > > It is called from 3 p

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-27 Thread Jike Song
On 01/28/2016 12:19 AM, Alex Williamson wrote: > On Wed, 2016-01-27 at 13:43 +0800, Jike Song wrote: {snip} >> Had a look at eventfd, I would say yes, technically we are able to >> achieve the goal: introduce a fd, with fop->{read|write} defined in KVM, >> call into vgpu device-model, also an iode

[Qemu-devel] [PATCH v7 08/13] target-ppc: Introduce PowerPC specific CPU core device

2016-01-27 Thread Bharata B Rao
CPU core device is a container of CPU thread devices. CPU hotplug is performed at the granularity of CPU core device. When hotplugged, CPU core creates CPU thread devices. Signed-off-by: Bharata B Rao --- hw/ppc/Makefile.objs | 1 + hw/ppc/cpu-core.c | 75 +

[Qemu-devel] [PATCH v7 12/13] qmp: Add query-ppc-cpu-cores command

2016-01-27 Thread Bharata B Rao
Show the details of PPC CPU cores via a new QMP command. TODO: update qmp-commands.hx with example Signed-off-by: Bharata B Rao --- hw/ppc/cpu-core.c | 77 + qapi-schema.json| 31 + qmp-commands.hx

[Qemu-devel] [PATCH v7 13/13] hmp: Add "info ppc-cpu-cores" command

2016-01-27 Thread Bharata B Rao
This is the hmp equivalent of "query ppc-cpu-cores" Signed-off-by: Bharata B Rao --- hmp-commands-info.hx | 16 hmp.c| 31 +++ hmp.h| 1 + 3 files changed, 48 insertions(+) diff --git a/hmp-commands-info.hx b/hmp-comm

[Qemu-devel] [PATCH v7 11/13] spapr: CPU hot unplug support

2016-01-27 Thread Bharata B Rao
Remove the CPU core device by removing the underlying CPU thread devices. Hot removal of CPU for sPAPR guests is supported by sending the hot unplug notification to the guest via EPOW interrupt. Release the vCPU object after CPU hot unplug so that vCPU fd can be parked and reused. Signed-off-by: B

[Qemu-devel] [PATCH v7 10/13] spapr: CPU hotplug support

2016-01-27 Thread Bharata B Rao
Support CPU hotplug via device-add command like this: (qemu) device_add powerpc64-cpu-core,id=core2 In response to device_add, CPU core device will be created. CPU core device creates and realizes CPU thread devices. If the machine type supports CPU hotplug, boot-time CPUs are created as CPU core

[Qemu-devel] [PATCH v7 05/13] cpu: Reclaim vCPU objects

2016-01-27 Thread Bharata B Rao
From: Gu Zheng In order to deal well with the kvm vcpus (which can not be removed without any protection), we do not close KVM vcpu fd, just record and mark it as stopped into a list, so that we can reuse it for the appending cpu hot-add request if possible. It is also the approach that kvm guys

[Qemu-devel] [PATCH v7 04/13] cpu: Don't realize CPU from cpu_generic_init()

2016-01-27 Thread Bharata B Rao
Don't do CPU realization from cpu_generic_init(). With this cpu_generic_init() will be used to just create CPU threads and they should be realized separately from realizefn call. Convert the existing callers to do explicit realization. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Revi

[Qemu-devel] [PATCH v7 09/13] spapr: Enable CPU hotplug for pseries-2.6 and add CPU DRC DT entries

2016-01-27 Thread Bharata B Rao
Start supporting CPU hotplug from pseries-2.6 onwards. Add CPU DRC (Dynamic Resource Connector) device tree entries. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hw/ppc/spapr.c | 23 +++ include/hw/ppc/spapr.h | 1 + 2 files changed, 24 insertions(+)

[Qemu-devel] [PATCH v7 07/13] xics, xics_kvm: Handle CPU unplug correctly

2016-01-27 Thread Bharata B Rao
XICS is setup for each CPU during initialization. Provide a routine to undo the same when CPU is unplugged. While here, move ss->cs management into xics from xics_kvm since there is nothing KVM specific in it. Also ensure xics reset doesn't set irq for CPUs that are already unplugged. This allows

[Qemu-devel] [PATCH v7 01/13] machine: Don't allow CPU toplogies with partially filled cores

2016-01-27 Thread Bharata B Rao
Prevent guests from booting with CPU topologies that have partially filled CPU cores or can result in partially filled CPU cores after CPU hotplug like -smp 15,sockets=1,cores=4,threads=4,maxcpus=16 or -smp 15,sockets=1,cores=4,threads=4,maxcpus=17. This is enforced by introducing MachineClass::v

[Qemu-devel] [PATCH v7 00/13] sPAPR CPU hotplug

2016-01-27 Thread Bharata B Rao
Hi, This is the 7th iteration of patchset that introduces CPU hotplug for PowerPC sPAPR guests using device_add/device_del commands. (qemu) device_add powerpc64-cpu-core,id=core1 The main change in this version is about adding "info ppc-cpu-cores" QMP/HMP support to obtain information about Powe

[Qemu-devel] [PATCH v7 06/13] cpu: Add a sync version of cpu_remove()

2016-01-27 Thread Bharata B Rao
This sync API will be used by the CPU hotplug code to wait for the CPU to completely get removed before flagging the failure to the device_add command. Sync version of this call is needed to correctly recover from CPU realization failures when ->plug() handler fails. Signed-off-by: Bharata B Rao

[Qemu-devel] [PATCH v7 03/13] exec: Do vmstate unregistration from cpu_exec_exit()

2016-01-27 Thread Bharata B Rao
cpu_exec_init() does vmstate_register and register_savevm for the CPU device. These need to be undone from cpu_exec_exit(). These changes are needed to support CPU hot removal and also to correctly fail hotplug attempts beyond max_cpus. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson ---

[Qemu-devel] [PATCH v7 02/13] exec: Remove cpu from cpus list during cpu_exec_exit()

2016-01-27 Thread Bharata B Rao
CPUState *cpu gets added to the cpus list during cpu_exec_init(). It should be removed from cpu_exec_exit(). cpu_exec_init() is called from generic CPU::instance_finalize and some archs like PowerPC call it from CPU unrealizefn. So ensure that we dequeue the cpu only once. Now -1 value for cpu->c

Re: [Qemu-devel] [PATCH] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-01-27 Thread Jason Wang
On 01/28/2016 02:35 AM, Laszlo Ersek wrote: > Hello Jason, > > On 01/22/16 07:15, Jason Wang wrote: >> >> On 01/22/2016 02:11 PM, Michael Tokarev wrote: >>> 22.01.2016 06:09, Jason Wang wrote: On 01/19/2016 09:17 PM, Laszlo Ersek wrote: > The start_xmit() and e1000_receive_iov() function

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-27 Thread Jason Wang
On 01/27/2016 10:40 AM, Zhang Chen wrote: > From: ZhangChen > > Traffic-mirror is a netfilter plugin. > It gives qemu the ability to copy and mirror guest's > net packet. we output packet to chardev. > > usage: > > -netdev tap,id=hn0 > -chardev socket,id=mirror0,host=ip_primary,port=X,server,now

Re: [Qemu-devel] [PATCH v2 00/11] NVDIMM ACPI: introduce the framework of QEMU emulated

2016-01-27 Thread Xiao Guangrong
Ping... On 01/20/2016 10:21 AM, Xiao Guangrong wrote: Hi Michael, Igor, Paolo, Any comment? On 01/13/2016 02:49 AM, Xiao Guangrong wrote: This patchset is against commit 8a1be662a69 (virtio: fix error message for number of queues) on pci branch of Michael's git tree and can be found at:

Re: [Qemu-devel] [PATCH v7 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2016-01-27 Thread kbuild test robot
Hi Gabriel, [auto build test WARNING on driver-core/driver-core-testing] [also build test WARNING on v4.5-rc1 next-20160127] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Gabriel-L-Somlo

Re: [Qemu-devel] [PATCHv2 10/10] target-ppc: Allow more page sizes for POWER7 & POWER8 in TCG

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > Now that the TCG and spapr code has been extended to allow (semi-) > arbitrary page encodings in the CPU's 'sps' table, we can add the > many > page sizes supported by real POWER7 and POWER8 hardware that we > previously > didn't support in T

Re: [Qemu-devel] [PATCHv2 09/10] target-ppc: Helper to determine page size information from hpte alone

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > h_enter() in the spapr code needs to know the page size of the HPTE > it's > about to insert.  Unlike other paths that do this, it doesn't have > access > to the SLB, so at the moment it determines this with some open-coded > tests which assu

Re: [Qemu-devel] [PATCHv2 08/10] target-ppc: Add new TLB invalidate by HPTE call for hash64 MMUs

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > When HPTEs are removed or modified by hypercalls on spapr, we need to > invalidate the relevant pages in the qemu TLB. > > Currently we do that by doing some complicated calculations to work out the > right encoding for the tlbie instruction

Re: [Qemu-devel] [PATCHv2 06/10] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > ppc_tlb_invalidate_one() has a big switch handling many different MMU > types.  However, most of those branches can never be reached: > > It is called from 3 places: from remove_hpte() and h_protect() in > spapr_hcall.c (which always has a 6

Re: [Qemu-devel] [PATCHv2 07/10] target-ppc: Split 44x tlbiva from ppc_tlb_invalidate_one()

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > Currently both the tlbiva instruction (used on 44x chips) and the > tlbie > instruction (used on hash MMU chips) are both handled via > ppc_tlb_invalidate_one().  This is silly, because they're invoked > from > different places, and do differ

[Qemu-devel] [PATCH 1/1] Protect stderr from non-blocking mode

2016-01-27 Thread Sam Bobroff
On Linux, if QEMU is run from a shell with -d to enable debug logging but without directing it to a file (e.g. -D is not used, and qemu_logfile is set to stderr), and no shell redirection is used, it is possible for log messages to be lost under load. This is caused by a combination of several fac

Re: [Qemu-devel] [PATCHv2 05/10] target-ppc: Use actual page size encodings from HPTE

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > At present the 64-bit hash MMU code uses information from the SLB to > determine the page size of a translation.  We do need that > information to > correctly look up the hash table.  However the MMU also allows a > possibly larger page size

Re: [Qemu-devel] [PATCH v8 14/16] block: Rewrite bdrv_close_all()

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > This patch rewrites bdrv_close_all(): Until now, all root BDSs have been > force-closed. This is bad because it can lead to cached data not being > flushed to disk. > > Instead, try to make all reference holders relinquish their reference > voluntarily: > >

Re: [Qemu-devel] [PATCHv2 03/10] target-ppc: Rework ppc_store_slb

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > ppc_store_slb updates the SLB for PPC cpus with 64-bit hash MMUs. > Currently it takes two parameters, which contain values encoded as > the > register arguments to the slbmte instruction, one register contains > the > ESID portion of the SLB

Re: [Qemu-devel] [PATCHv2 04/10] target-ppc: Rework SLB page size lookup

2016-01-27 Thread Benjamin Herrenschmidt
On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > Currently, the ppc_hash64_page_shift() function looks up a page size > based > on information in an SLB entry.  It open codes the bit translation > for > existing CPUs, however different CPU models can have different SLB > encodings.  We alre

[Qemu-devel] [PATCH] block: Remove unused struct definition BlockFinishData

2016-01-27 Thread Fam Zheng
Unused since 94db6d2d3. Signed-off-by: Fam Zheng --- blockjob.c | 8 1 file changed, 8 deletions(-) diff --git a/blockjob.c b/blockjob.c index 80adb9d..a692142 100644 --- a/blockjob.c +++ b/blockjob.c @@ -278,14 +278,6 @@ void block_job_iostatus_reset(BlockJob *job) } } -struct

Re: [Qemu-devel] [PATCH v8 12/16] blockdev: Keep track of monitor-owned BDS

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > blockdev.c | 26 ++ > include/block/block_int.h | 4 > stubs/Makefile.objs| 1 + > stubs/blockdev-close-all-bdrv-states.c | 5 +

Re: [Qemu-devel] [PATCH v8 09/16] blockdev: Use blk_remove_bs() in do_drive_del()

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Kevin Wolf > --- > blockdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/blockdev.c b/blockdev.c > index 1044a6a..09d4621 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -2792,7 +2792

Re: [Qemu-devel] [PATCH v8 08/16] block: Use blk_remove_bs() in blk_delete()

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Kevin Wolf > --- > block/block-backend.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/block/block-backend.c b/block/block-backend.c > index 621787c..7f5ad59 100644 > --- a/block/bl

Re: [Qemu-devel] [PATCH v8 07/16] block: Remove BDS close notifier

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > It is unused now, so we can remove it. > > Signed-off-by: Max Reitz > --- > block.c| 8 > block/block-backend.c | 7 --- > include/block/block.h | 1 - > include/block/block_int.h | 2 -- > includ

Re: [Qemu-devel] [PATCH v8 06/16] nbd: Switch from close to eject notifier

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > The NBD code uses the BDS close notifier to determine when a medium is > ejected. However, now it should use the BB's BDS removal notifier for > that instead of the BDS's close notifier. > > Signed-off-by: Max Reitz > --- > blockdev-nbd.c | 40 +---

Re: [Qemu-devel] [PATCH v8 05/16] virtio-scsi: Catch BDS-BB removal/insertion

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > Make use of the BDS-BB removal and insertion notifiers to remove or set > up, respectively, virtio-scsi's op blockers. > > Signed-off-by: Max Reitz > --- > hw/scsi/virtio-scsi.c | 55 > + > include/hw/virt

Re: [Qemu-devel] [PATCH v8 04/16] virtio-blk: Functions for op blocker management

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > Put the code for setting up and removing op blockers into an own > function, respectively. Then, we can invoke those functions whenever a > BDS is removed from an virtio-blk BB or inserted into it. > > Signed-off-by: Max Reitz > --- > hw/block/dataplane/vi

Re: [Qemu-devel] [PATCH v8 02/16] iotests: Add test for eject under NBD server

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > This patch adds a test for ejecting the BlockBackend an NBD server is > connected to (the NBD server is supposed to stop). > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/140 | 92 > ++ > tests/qemu-

Re: [Qemu-devel] [PATCH v8 03/16] block: Add BB-BDS remove/insert notifiers

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > bdrv_close() no longer signifies ejection of a medium, this is now done > by removing the BDS from the BB. Therefore, we want to have a notifier > for that in the BB instead of a close notifier in the BDS. The former is > added now, the latter is removed late

[Qemu-devel] [PATCH v6 4/5] acpi: arm: add fw_cfg device node to dsdt

2016-01-27 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI DSDT. This is mostly informational, as the authoritative fw_cfg MMIO region(s) are listed in the Device Tree. However, since we are building ACPI tables, we might as well be thorough while at it... Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Tested

[Qemu-devel] [PATCH v6 5/5] fw_cfg: document ACPI device node information

2016-01-27 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Reviewed-by: Marc Marí --- docs/specs/fw_cfg.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/specs/fw_cfg.txt b/docs/specs/fw_cfg.txt index 2099ad9..5414140 100644 --- a/docs/specs/fw_cfg.txt +++ b/docs/specs/fw_cfg.tx

[Qemu-devel] [PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-01-27 Thread Gabriel L. Somlo
New since v5: - rebased on top of latest QEMU git master Thanks, --Gabriel >New since v4: > > - rebased on top of Marc's DMA series > - drop machine compat dependency for insertion into x86/ssdt > (patch 3/5), following agreement between Igor and Eduardo > - [

[Qemu-devel] [PATCH v6 1/5] fw_cfg: expose control register size in fw_cfg.h

2016-01-27 Thread Gabriel L. Somlo
Expose the size of the control register (FW_CFG_CTL_SIZE) in fw_cfg.h. Add comment to fw_cfg_io_realize() pointing out that since the 8-bit data register is always subsumed by the 16-bit control register in the port I/O case, we use the control register width as the *total* width of the (classic, n

[Qemu-devel] [PATCH v6 3/5] acpi: pc: add fw_cfg device node to ssdt

2016-01-27 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI SSDT. While the guest-side firmware can't utilize this information (since it has to access the hard-coded fw_cfg device to extract ACPI tables to begin with), having fw_cfg listed in ACPI will help the guest kernel keep a more accurate inventory of in-use IO por

[Qemu-devel] [PATCH v6 2/5] pc: fw_cfg: move ioport base constant to pc.h

2016-01-27 Thread Gabriel L. Somlo
Move BIOS_CFG_IOPORT define from pc.c to pc.h, and rename it to FW_CFG_IO_BASE. Cc: Marc Marí Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Reviewed-by: Marc Marí --- hw/i386/pc.c | 5 ++--- include/hw/i386/pc.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff -

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-27 Thread Kirti Wankhede
On 1/28/2016 3:28 AM, Alex Williamson wrote: On Thu, 2016-01-28 at 02:25 +0530, Kirti Wankhede wrote: On 1/27/2016 9:30 PM, Alex Williamson wrote: On Wed, 2016-01-27 at 13:36 +0530, Kirti Wankhede wrote: On 1/27/2016 1:36 AM, Alex Williamson wrote: On Tue, 2016-01-26 at 02:20 -0800, Neo J

Re: [Qemu-devel] [PATCH v8 01/16] block: Release dirty bitmaps in bdrv_close()

2016-01-27 Thread Fam Zheng
On Wed, 01/27 18:59, Max Reitz wrote: > bdrv_delete() is not very happy about deleting BlockDriverStates with > dirty bitmaps still attached to them. In the past, we got around that > very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and > bdrv_close() simply ignoring that conditi

[Qemu-devel] [PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-01-27 Thread Gabriel L. Somlo
New since v5: - rebased on top of latest QEMU git master Thanks, --Gabriel >New since v4: > > - rebased on top of Marc's DMA series > - drop machine compat dependency for insertion into x86/ssdt > (patch 3/5), following agreement between Igor and Eduardo > - [

[Qemu-devel] [PATCH v7 2/4] kobject: export kset_find_obj() for module use

2016-01-27 Thread Gabriel L. Somlo
From: Gabriel Somlo Signed-off-by: Gabriel Somlo --- lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kobject.c b/lib/kobject.c index 7cbccd2..90d1be6 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -861,6 +861,7 @@ struct kobject *kset_find_obj(struct kset *kset, const c

[Qemu-devel] [PATCH v7 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2016-01-27 Thread Gabriel L. Somlo
From: Gabriel Somlo Make fw_cfg entries of type "file" available via sysfs. Entries are listed under /sys/firmware/qemu_fw_cfg/by_key, in folders named after each entry's selector key. Filename, selector value, and size read-only attributes are included for each entry. Also, a "raw" attribute all

[Qemu-devel] [PATCH v7 4/4] devicetree: update documentation for fw_cfg ARM bindings

2016-01-27 Thread Gabriel L. Somlo
From: Gabriel Somlo Remove fw_cfg hardware interface details from Documentation/devicetree/bindings/arm/fw-cfg.txt, and replace them with a pointer to the authoritative documentation in the QEMU source tree. Signed-off-by: Gabriel Somlo Cc: Laszlo Ersek Acked-by: Rob Herring Reviewed-by: Lasz

[Qemu-devel] [PATCH v7 0/4] SysFS driver for QEMU fw_cfg device

2016-01-27 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Allow access to QEMU firmware blobs, passed into the guest VM via the fw_cfg device, through SysFS entries. Blob meta-data (e.g. name, size, and fw_cfg key), as well as the raw binary blob data may be accessed. The SysFS access location is /sys/firmware/qemu_fw_cfg/... and

[Qemu-devel] [PATCH v7 3/4] firmware: create directory hierarchy for sysfs fw_cfg entries

2016-01-27 Thread Gabriel L. Somlo
From: Gabriel Somlo Each fw_cfg entry of type "file" has an associated 56-char, nul-terminated ASCII string which represents its name. While the fw_cfg device doesn't itself impose any specific naming convention, QEMU developers have traditionally used path name semantics (i.e. "etc/acpi/rsdp") t

Re: [Qemu-devel] [PATCH v14 4/8] Allow creating backup jobs when opening BDS

2016-01-27 Thread Changlong Xie
On 01/27/2016 10:04 PM, Stefan Hajnoczi wrote: On Wed, Jan 13, 2016 at 05:18:28PM +0800, Changlong Xie wrote: From: Wen Congyang When opening BDS, we need to create backup jobs for image-fleecing. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by

Re: [Qemu-devel] [PATCH v14 3/8] Backup: clear all bitmap when doing block checkpoint

2016-01-27 Thread Changlong Xie
On 01/28/2016 12:05 AM, Stefan Hajnoczi wrote: On Wed, Jan 13, 2016 at 05:18:27PM +0800, Changlong Xie wrote: diff --git a/blockjob.c b/blockjob.c index 80adb9d..0c8edfe 100644 --- a/blockjob.c +++ b/blockjob.c @@ -533,3 +533,14 @@ void block_job_txn_add_job(BlockJobTxn *txn, BlockJob *job)

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/13] cuda: misc fixes and cleanups

2016-01-27 Thread BALATON Zoltan
On Wed, 27 Jan 2016, Hervé Poussineau wrote: Unfortunately, Finnix doesn't try to access I2C bus, not even to initialize it. I suppose it is because OpenBIOS doesn't describe the I2C bus in the device tree... The kernel in Finnix seems to have a driver but unfortunately I2C debugging is not e

Re: [Qemu-devel] [ipxe-devel] [PATCH ipxe] build: Enable IPv6 for qemu

2016-01-27 Thread Christian Nilsson
On Wed, Jan 27, 2016 at 2:49 PM, Gerd Hoffmann wrote: > Hi, > >> We already have the named config mechanism. I wonder if building a BIOS >> option ROM for a real NIC is sufficiently specialised that it would make >> sense to have a CONFIG=rom or CONFIG=minimal named configuration. > > Maybe nam

[Qemu-devel] Running PPC Mac OS X Tiger Apps via Qemu on El Capitan

2016-01-27 Thread Gabriel Diggs
Hello, I’m trying to get my head around running a PPC App created to run on OS X 10.4 Tiger on El Capitan 10.11.3. I came across Qemu as a possible solution. The app in question is Traktor DJ Studio 3. It’s a Midi and Audio intensive app so latency has to be very low and it needs to be able to c

Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation

2016-01-27 Thread Fam Zheng
On Wed, 01/27 21:03, Roy Shterman wrote: > Hi, > > First of all thank very much for your help, > > Second, unfortunately data-plane didn't worked well, I tried to add threads > from the instructions you gave me. > > Here is my full xml file, maybe you can help me to understand why it didn't > wo

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-27 Thread Zhang Chen
On 01/28/2016 12:10 AM, Eric Blake wrote: On 01/26/2016 05:44 PM, Hailiang Zhang wrote: On 2016/1/26 16:59, Zhang Chen wrote: From: ZhangChen Traffic-mirrorer is a plugin of netfilter. It make qemu has ability to copy and mirror guest's net packet. we output packet to chardev. +static void

Re: [Qemu-devel] [PATCH v14 7/8] Implement new driver for block replication

2016-01-27 Thread Wen Congyang
On 01/27/2016 10:46 PM, Stefan Hajnoczi wrote: > On Wed, Jan 13, 2016 at 05:18:31PM +0800, Changlong Xie wrote: >> From: Wen Congyang >> >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> Signed-off-by: Changlong Xie >> --- >> block/Makefile.objs

Re: [Qemu-devel] [PATCH v3] Add optionrom compatible with fw_cfg DMA version

2016-01-27 Thread Kevin O'Connor
On Mon, Jan 25, 2016 at 02:17:48PM +0100, Marc Marí wrote: > This optionrom is based on linuxboot.S. Hi Marc, Out of curiousity, how does the timing with this option rom compare to the previous SeaBIOS patches that implemented linux dma loading? When I first tried to compile this (on fc23), I g

Re: [Qemu-devel] [PULL 07/13] fdc: add pick_drive

2016-01-27 Thread John Snow
On 01/27/2016 07:38 AM, Paolo Bonzini wrote: > > > On 25/01/2016 20:41, John Snow wrote: >> Split apart pick_geometry by creating a pick_drive routine that will only >> ever called during device bring-up instead of relying on pick_geometry to >> be used in both cases. >> >> With this change, th

Re: [Qemu-devel] [PATCHv2 06/10] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one

2016-01-27 Thread David Gibson
On Wed, Jan 27, 2016 at 07:06:26PM +0100, Laurent Vivier wrote: > On 27/01/2016 11:13, David Gibson wrote: > > ppc_tlb_invalidate_one() has a big switch handling many different MMU > > types. However, most of those branches can never be reached: > > > > It is called from 3 places: from remove_hpt

Re: [Qemu-devel] [PATCHv2 07/10] target-ppc: Split 44x tlbiva from ppc_tlb_invalidate_one()

2016-01-27 Thread David Gibson
On Wed, Jan 27, 2016 at 06:58:43PM +0100, Laurent Vivier wrote: > On 27/01/2016 11:13, David Gibson wrote: > > Currently both the tlbiva instruction (used on 44x chips) and the tlbie > > instruction (used on hash MMU chips) are both handled via > > ppc_tlb_invalidate_one(). This is silly, because

[Qemu-devel] [RFC 0/1] arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots

2016-01-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi, I've seen some regressions in my test runs lately when enabling EL2 and EL3. It turns out we are not setting RW when booting 64bit Linux kernels. In the long run, I'm not sure if this does the right thing, for example we might need to revisit if we ever want to sup

[Qemu-devel] [RFC 1/1] hw/arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots

2016-01-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" When booting Linux on AArch64 enabled cores, setup EL1 and EL2 to use AArch64. Signed-off-by: Edgar E. Iglesias --- hw/arm/boot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 7742dd3..d05a998 100644 --- a/hw/arm/boot.c +++

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/13] cuda: misc fixes and cleanups

2016-01-27 Thread Hervé Poussineau
Le 26/01/2016 12:32, BALATON Zoltan a écrit : On Mon, 25 Jan 2016, Hervé Poussineau wrote: Do you have a Linux/NetBSD/... image, where I can run some command line tool to probe the I2C bus? Have you tried the iso from www.finnix.org? When booting it you may see a boot prompt on black screen

[Qemu-devel] [PATCH v4 2/3] target-arm: Rename check_s2_startlevel to check_s2_mmu_setup

2016-01-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Rename check_s2_startlevel to check_s2_mmu_setup in preparation for additional checks. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c i

[Qemu-devel] [PATCH v4 3/3] target-arm: Implement the S2 MMU inputsize > pamax check

2016-01-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Implement the inputsize > pamax check for Stage 2 translations. This is CONSTRAINED UNPREDICTABLE and we choose to fault. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 8 1 file changed, 8 insertions(+) diff --git a/target-arm/helper.c b/target-

[Qemu-devel] [PATCH v4 1/3] target-arm: Apply S2 MMU startlevel table size check to AArch64

2016-01-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The S2 starting level table size check applies to both AArch32 and AArch64. Move it to common code. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 16 1 file changed, 8 insertions(+), 8

[Qemu-devel] [PATCH v4 0/3] target-arm: Add a few more S2 MMU input checks

2016-01-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" This adds the inputsize > pamax check and also fixes the startlevel checks to apply to the 64bit translations. Comments welcome! Cheers, Edgar ChangeLog: v3 -> v4: * Changed comment regarding our choice to fault * Rename check_s2_startlevel to check_s2_mmu_setup * Mo

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-27 Thread Alex Williamson
On Thu, 2016-01-28 at 02:25 +0530, Kirti Wankhede wrote: >  > On 1/27/2016 9:30 PM, Alex Williamson wrote: > > On Wed, 2016-01-27 at 13:36 +0530, Kirti Wankhede wrote: > > >  > > > On 1/27/2016 1:36 AM, Alex Williamson wrote: > > > > On Tue, 2016-01-26 at 02:20 -0800, Neo Jia wrote: > > > > > On Mo

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-27 Thread Neo Jia
On Wed, Jan 27, 2016 at 09:10:16AM -0700, Alex Williamson wrote: > On Wed, 2016-01-27 at 01:14 -0800, Neo Jia wrote: > > On Tue, Jan 26, 2016 at 04:30:38PM -0700, Alex Williamson wrote: > > > On Tue, 2016-01-26 at 14:28 -0800, Neo Jia wrote: > > > > On Tue, Jan 26, 2016 at 01:06:13PM -0700, Alex Wi

Re: [Qemu-devel] [PATCH 1/3] qapi-visit: Simplify how we visit common union members

2016-01-27 Thread Eric Blake
On 01/27/2016 06:54 AM, Markus Armbruster wrote: > For a simple union SU, gen_visit_union() generates a visit of its > single tag member, like this: > > visit_type_SUKind(v, "type", &(*obj)->type, &err); > > For a flat union FU with base B, it generates a visit of its base > fields: > >

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-27 Thread Kirti Wankhede
On 1/27/2016 9:30 PM, Alex Williamson wrote: On Wed, 2016-01-27 at 13:36 +0530, Kirti Wankhede wrote: On 1/27/2016 1:36 AM, Alex Williamson wrote: On Tue, 2016-01-26 at 02:20 -0800, Neo Jia wrote: On Mon, Jan 25, 2016 at 09:45:14PM +, Tian, Kevin wrote: From: Alex Williamson [mailto:al

Re: [Qemu-devel] [PATCH v8 02/16] iotests: Add test for eject under NBD server

2016-01-27 Thread Eric Blake
On 01/27/2016 10:59 AM, Max Reitz wrote: > This patch adds a test for ejecting the BlockBackend an NBD server is > connected to (the NBD server is supposed to stop). > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/140 | 92 > ++ > tests/qe

Re: [Qemu-devel] [PATCH 2/2] nvdimm: disable balloon

2016-01-27 Thread Eric Blake
On 01/27/2016 06:24 AM, Denis V. Lunev wrote: > From: Vladimir Sementsov-Ogievskiy > > NVDIMM for now is planned to use as a backing store for DAX filesystem > in the guest and thus this memory is excluded from guest memory > management > and LRUs. Intentional mid-line break? > > In this case

Re: [Qemu-devel] [PATCH 1/2] move get_current_ram_size to virtio-balloon.c

2016-01-27 Thread Eric Blake
On 01/27/2016 06:24 AM, Denis V. Lunev wrote: > From: Vladimir Sementsov-Ogievskiy > > get_current_ram_size() is used only in virtio-balloon.c > This patch moves it into virtio-balloon and make it static, to allow > some balloon-specific tuning. > > Signed-off-by: Vladimir Sementsov-Ogievskiy >

Re: [Qemu-devel] QCOW rebases on running VMs

2016-01-27 Thread Eric Blake
On 01/27/2016 11:04 AM, Alex Bligh wrote: > This question concerns the safety of rebases on backing disks whilst a VM is > running from a writing disk. > > Assume that we have the following structure: > > QEMU ---> Writing disk > > backing d

Re: [Qemu-devel] [PATCH 0/2] microblaze: clean includes

2016-01-27 Thread Edgar E. Iglesias
On Tue, Jan 26, 2016 at 06:05:29PM +, Peter Maydell wrote: > I'm sending this small series separately because cleaning > the microblaze files' use of includes requires a manual > code fix to disas/microblaze.c. That file manually defines > TRUE and FALSE, which clash with the standard defines >

Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

2016-01-27 Thread Lluís Vilanova
Lluís Vilanova writes: > Thomas Huth writes: >> On 20.01.2016 15:10, Lluís Vilanova wrote: >>> Thomas Huth writes: >>> On 18.01.2016 21:26, Eric Blake wrote: > On 01/15/2016 06:54 AM, Lluís Vilanova wrote: >> Gives some general guidelines for reporting errors in QEMU. >> >>

Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

2016-01-27 Thread Lluís Vilanova
Thomas Huth writes: > On 20.01.2016 15:10, Lluís Vilanova wrote: >> Thomas Huth writes: >> >>> On 18.01.2016 21:26, Eric Blake wrote: On 01/15/2016 06:54 AM, Lluís Vilanova wrote: > Gives some general guidelines for reporting errors in QEMU. > > Signed-off-by: Lluís Vilanova >>

Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation

2016-01-27 Thread Roy Shterman
Hi, First of all thank very much for your help, Second, unfortunately data-plane didn't worked well, I tried to add threads from the instructions you gave me. Here is my full xml file, maybe you can help me to understand why it didn't worked : gen-r-vrt-105-007-RH7.0x64 8f79e97e-d452-4577-

Re: [Qemu-devel] QCOW rebases on running VMs

2016-01-27 Thread Max Reitz
On 27.01.2016 19:04, Alex Bligh wrote: > This question concerns the safety of rebases on backing disks whilst a VM is > running from a writing disk. > > Assume that we have the following structure: > > QEMU ---> Writing disk > > backing disk

Re: [Qemu-devel] [RFC PATCH 0/3] (Resend) TranslationBlock annotation mechanism

2016-01-27 Thread Lluís Vilanova
Bastian Koppelmann writes: > Hi Peter, > thank you for your feedback. >> (2) it feels a bit unpolished at the moment (lack of documentation, >> doesn't have any existing analysis tools that produce the format that >> the code reads that would make it immediately usable by an end-user) >> > Sure

Re: [Qemu-devel] [PATCH] linux-user: Move qemu-binfmt-conf.sh to Debian model

2016-01-27 Thread Peter Maydell
On 27 January 2016 at 18:45, Michael Tokarev wrote: > 27.01.2016 17:10, Alexander Graf wrote: >> and moves that code into our script, maintaining backwards compatibility with >> its previous calling scheme. The major benefit of this is that now Debian can >> just do >> >> HOST_ARCH=$DPKG_MAINTSC

  1   2   3   >