Re: [Qemu-devel] [RFC] virtio-pci: Allow PCIe virtio devices on root bus

2017-02-15 Thread Gerd Hoffmann
On Di, 2017-02-14 at 14:53 +0200, Marcel Apfelbaum wrote: > I suppose XHCI can behave the same as virtio if Gerd has nothing > against it No objections. cheers, Gerd

[Qemu-devel] 答复: Re: [RFC] virtio-fc: draft idea of virtual fibre channel HBA

2017-02-15 Thread Lin Ma
>>> Stefan Hajnoczi 2/15/2017 11:33 下午 >>> >On Wed, Feb 15, 2017 at 12:15:02AM -0700, Lin Ma wrote: >> Hi all, >> >> We know that libvirt can create fibre channels vHBA on host >> based on npiv, and present the LUNs to guest. >> >> I'd like to implement a virtual fibre channel HBA for qemu,

Re: [Qemu-devel] [PATCH 14/17] qmp: add x-debug-block-dirty-bitmap-sha256

2017-02-15 Thread Vladimir Sementsov-Ogievskiy
16.02.2017 03:35, John Snow wrote: On 02/13/2017 04:54 AM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz This is simply the same as the version in the other two series, right? Yes. Context a bit differs... Aha, I've discovered that i

[Qemu-devel] [PATCH v7 5/8] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands

2017-02-15 Thread ben
From: Igor Mammedov Add commands to query Virtual Machine Generation ID counter. QMP command example: { "execute": "query-vm-generation-id" } HMP command example: info vm-generation-id Signed-off-by: Igor Mammedov Reviewed-by: Eric Blake Signed-off-by: Ben Warren Reviewed-by: Laszlo

Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts

2017-02-15 Thread Vadim Rozenfeld
On Thu, 2017-02-16 at 01:31 +, Gonglei (Arei) wrote: > Hi, > > > > > > > On Sat, 2017-02-11 at 10:39 -0500, Paolo Bonzini wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 10/02/2017 10:31, Gonglei (Arei) wrote: > > > > > > > > > > > > > > > > > > But We tested th

[Qemu-devel] [PATCH v7 2/8] docs: VM Generation ID device description

2017-02-15 Thread ben
From: Ben Warren This patch is based off an earlier version by Gal Hammer (gham...@redhat.com) Requirements section, ASCII diagrams and overall help provided by Laszlo Ersek (ler...@redhat.com) Signed-off-by: Gal Hammer Signed-off-by: Ben Warren Reviewed-by: Laszlo Ersek Reviewed-by: Igor Ma

[Qemu-devel] [PATCH v7 7/8] tests: Add unit tests for the VM Generation ID feature

2017-02-15 Thread ben
From: Ben Warren The following tests are implemented: * test that a GUID passed in by command line is propagated to the guest. Read the GUID both from guest memory and from the monitor * test that the "auto" argument to the GUID generates a valid GUID, as seen by the guest. This patch is l

[Qemu-devel] [PATCH v7 8/8] MAINTAINERS: Add VM Generation ID entry

2017-02-15 Thread ben
From: Ben Warren Also add BIOS tables entry Signed-off-by: Ben Warren --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fb57d8e..e2e4b4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -909,6 +909,7 @@ F: hw/acpi/* F: hw/smbios/* F: hw/

[Qemu-devel] [PATCH v7 0/8] Add support for VM Generation ID

2017-02-15 Thread ben
From: Ben Warren This patch set adds support for passing a GUID to Windows guests. It is a re-implementation of previous patch sets written by Igor Mammedov et al, but this time passing the GUID data as a fw_cfg blob. This patch set has dependencies on new guest functionality, in particular the

[Qemu-devel] [PATCH v7 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-15 Thread ben
From: Ben Warren This implements the VM Generation ID feature by passing a 128-bit GUID to the guest via a fw_cfg blob. Any time the GUID changes, an ACPI notify event is sent to the guest The user interface is a simple device with one parameter: - guid (string, must be "auto" or in UUID format

[Qemu-devel] [PATCH v7 6/8] tests: Move reusable ACPI code into a utility file

2017-02-15 Thread ben
From: Ben Warren Also usable by upcoming VM Generation ID tests Signed-off-by: Ben Warren --- tests/Makefile.include | 2 +- tests/acpi-utils.c | 65 +++ tests/acpi-utils.h | 94 + tests/bios-tables-test.c | 132 ++--

[Qemu-devel] [PATCH v7 3/8] ACPI: Add vmgenid blob storage to the build tables

2017-02-15 Thread ben
From: Ben Warren This allows them to be centrally initialized and destroyed The "AcpiBuildTables.vmgenid" array will be used to construct the "etc/vmgenid_guid" fw_cfg blob. Its contents will be linked into fw_cfg after being built on the pc_machine_done() -> acpi_setup() -> acpi_build() call p

[Qemu-devel] [PATCH v7 1/8] linker-loader: Add new 'write pointer' command

2017-02-15 Thread ben
From: Ben Warren This is similar to the existing 'add pointer' functionality, but instead of instructing the guest (BIOS or UEFI) to patch memory, it instructs the guest to write the pointer back to QEMU via a writeable fw_cfg file. Signed-off-by: Ben Warren --- hw/acpi/bios-linker-loader.c

Re: [Qemu-devel] [PATCH v6 7/7] tests: Add unit tests for the VM Generation ID feature

2017-02-15 Thread Ben Warren
> On Feb 15, 2017, at 5:13 AM, Igor Mammedov wrote: > > On Tue, 14 Feb 2017 22:15:49 -0800 > b...@skyportsystems.com wrote: > >> From: Ben Warren >> >> The following tests are implemented: >> * test that a GUID passed in by command line is propagated to the gu

Re: [Qemu-devel] [PATCH v6 5/7] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands

2017-02-15 Thread Ben Warren
> On Feb 15, 2017, at 7:36 AM, Laszlo Ersek wrote: > > Two questions: > > On 02/15/17 07:15, b...@skyportsystems.com > wrote: >> From: Igor Mammedov >> >> Add commands to query Virtual Machine Generation ID counter. >> >> QMP command example: >>{ "execut

Re: [Qemu-devel] [PATCH v6 4/7] ACPI: Add Virtual Machine Generation ID support

2017-02-15 Thread Ben Warren
> On Feb 15, 2017, at 7:24 AM, Laszlo Ersek wrote: > > On 02/15/17 13:19, Igor Mammedov wrote: >> On Tue, 14 Feb 2017 22:15:46 -0800 >> b...@skyportsystems.com wrote: >> >>> From: Ben Warren >>> >>> This implements the VM Generation ID feature by passing a 128-bit >>> GUID to the guest via a

Re: [Qemu-devel] [PATCH v6 3/7] ACPI: Add vmgenid blob storage to the build tables

2017-02-15 Thread Ben Warren
> On Feb 15, 2017, at 6:30 AM, Laszlo Ersek wrote: > > On 02/15/17 07:15, b...@skyportsystems.com wrote: >> From: Ben Warren >> >> This allows them to be centrally initialized and destroyed >> >> The "AcpiBuildTables.vmgenid" array will be used to construct the >> "etc/vmgenid" fw_cfg blob. >

Re: [Qemu-devel] [PATCH v6 0/7] Add support for VM Generation ID

2017-02-15 Thread Ben Warren
> On Feb 15, 2017, at 12:52 PM, Laszlo Ersek wrote: > > On 02/15/17 21:09, Michael S. Tsirkin wrote: >> On Wed, Feb 15, 2017 at 08:47:48PM +0100, Laszlo Ersek wrote: > > [snip] > >>> For patches #1, #3, #4 and #5: >>> >>> Tested-by: Laszlo Ersek >>> >>> I'll soon post the OVMF patches. >>>

[Qemu-devel] [PATCH v2 3/4] char: remove the right fd been watched in qemu_chr_fe_set_handlers()

2017-02-15 Thread zhanghailiang
We can call qemu_chr_fe_set_handlers() to add/remove fd been watched in 'context' which can be either default main context or other explicit context. But the original logic is not correct, we didn't remove the right fd because we call g_main_context_find_source_by_id(NULL, tag) which always try to

[Qemu-devel] [PATCH v2 2/4] colo-compare: kick compare thread to exit after some cleanup in finalization

2017-02-15 Thread zhanghailiang
We should call g_main_loop_quit() to notify colo compare thread to exit, Or it will run in g_main_loop_run() forever. Besides, the finalizing process can't happen in context of colo thread, it is reasonable to remove the 'if (qemu_thread_is_self(&s->thread))' branch. Before compare thead exits, s

[Qemu-devel] [PATCH v2 4/4] colo-compare: Fix removing fds been watched incorrectly in finalization

2017-02-15 Thread zhanghailiang
We will catch the bellow error report while try to delete compare object by qmp command: chardev/char-io.c:91: io_watch_poll_finalize: Assertion `iwp->src == ((void *)0)' failed. This is caused by failing to remove the right fd been watched while call qemu_chr_fe_set_handlers(); Fix it by pass t

[Qemu-devel] [PATCH v2 1/4] colo-compare: use g_timeout_source_new() to process the stale packets

2017-02-15 Thread zhanghailiang
Instead of using qemu timer to process the stale packets, We re-use the colo compare thread to process these packets by creating a new timeout coroutine. Besides, since we process all the same vNIC's net connection/packets in one thread, it is safe to remove the timer_check_lock. Signed-off-by: z

[Qemu-devel] [PATCH v2 0/4] colo-compare: fix some bugs

2017-02-15 Thread zhanghailiang
This series includes two parts: codes optimization and bug fix. patch 1 tries to move timer process into colo compare thread as a new coroutine. patch 2 ~ 4 fixe some bugs of colo compare. v2: - Squash patch 3 of last version into patch 2. (ZhangChen's suggestion) zhanghailiang (4): colo-comp

Re: [Qemu-devel] [PULL 08/41] intel_iommu: support device iotlb descriptor

2017-02-15 Thread Jason Wang
On 2017年02月16日 13:43, Jason Wang wrote: On 2017年02月16日 13:36, Liu, Yi L wrote: -Original Message- From: Qemu-devel [mailto:qemu-devel-bounces+yi.l.liu=intel@nongnu.org] On Behalf Of Michael S. Tsirkin Sent: Tuesday, January 10, 2017 1:40 PM To: qemu-devel@nongnu.org Cc: Peter M

Re: [Qemu-devel] [PULL 08/41] intel_iommu: support device iotlb descriptor

2017-02-15 Thread Jason Wang
On 2017年02月16日 13:36, Liu, Yi L wrote: -Original Message- From: Qemu-devel [mailto:qemu-devel-bounces+yi.l.liu=intel@nongnu.org] On Behalf Of Michael S. Tsirkin Sent: Tuesday, January 10, 2017 1:40 PM To: qemu-devel@nongnu.org Cc: Peter Maydell ; Eduardo Habkost ; Jason Wang ; Peter

Re: [Qemu-devel] [PULL 08/41] intel_iommu: support device iotlb descriptor

2017-02-15 Thread Liu, Yi L
> -Original Message- > From: Qemu-devel [mailto:qemu-devel-bounces+yi.l.liu=intel@nongnu.org] > On Behalf Of Michael S. Tsirkin > Sent: Tuesday, January 10, 2017 1:40 PM > To: qemu-devel@nongnu.org > Cc: Peter Maydell ; Eduardo Habkost > ; Jason Wang ; Peter Xu > ; Paolo Bonzini ; Richa

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Hailiang Zhang
On 2017/2/16 10:27, Zhang Chen wrote: On 02/15/2017 04:34 PM, zhanghailiang wrote: We should release all unhandled packets before finalize colo compare. Besides, we need to free connection_track_table, or there will be a memory leak bug. Signed-off-by: zhanghailiang --- net/colo-compare.c

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-15 Thread Zhang Chen
On 02/16/2017 01:08 PM, Jason Wang wrote: On 2017年02月16日 11:25, Zhang Chen wrote: Ping... No new for a long time. Who can pick up this patch? I believe you'd better cc migration maintainers (cced), have you tried scripts/get_maintainer ? Thanks Jason. Add cc Markus Armbruster ,

Re: [Qemu-devel] [PATCH 5/6] target-ppc: support for 32-bit carry and overflow

2017-02-15 Thread Nikunj A Dadhania
Richard Henderson writes: > On 02/14/2017 02:05 PM, Nikunj A Dadhania wrote: >> Yes, you are right. I had a discussion with Paul Mackerras yesterday, he >> explained to me in detail about the bits. I am working on the revised >> implementation. Will detail it in the commit message. > > As you're

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-15 Thread Jason Wang
On 2017年02月16日 11:25, Zhang Chen wrote: Ping... No new for a long time. Who can pick up this patch? I believe you'd better cc migration maintainers (cced), have you tried scripts/get_maintainer ? Thanks Thanks Zhang Chen On 02/14/2017 04:28 AM, Stefano Stabellini wrote: On Wed, 8

[Qemu-devel] [PATCH v2] pcie: simplify pcie_add_capability()

2017-02-15 Thread Peter Xu
When we add PCIe extended capabilities, we should be following the rule that we add the head extended cap (at offset 0x100) first, then the rest of them. Meanwhile, we are always adding new capability bits at the end of the list. Here the "next" looks meaningless in all cases since it should always

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Peter Xu
On Thu, Feb 16, 2017 at 11:04:46AM +0800, Peter Xu wrote: > On Wed, Feb 15, 2017 at 07:52:35PM -0700, Alex Williamson wrote: > > On Thu, 16 Feb 2017 10:35:28 +0800 > > Peter Xu wrote: > > > > > On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > > > > VFIO actually wants to crea

Re: [Qemu-devel] [RFC] virtio-pci: Allow PCIe virtio devices on root bus

2017-02-15 Thread David Gibson
On Thu, Feb 16, 2017 at 01:48:42PM +1100, David Gibson wrote: > On Wed, Feb 15, 2017 at 04:59:33PM +0200, Marcel Apfelbaum wrote: > > On 02/15/2017 03:45 AM, David Gibson wrote: > > > On Tue, Feb 14, 2017 at 02:53:08PM +0200, Marcel Apfelbaum wrote: > > > > On 02/14/2017 06:15 AM, David Gibson wrot

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-15 Thread Zhang Chen
Ping... No new for a long time. Who can pick up this patch? Thanks Zhang Chen On 02/14/2017 04:28 AM, Stefano Stabellini wrote: On Wed, 8 Feb 2017, Eric Blake wrote: On 02/07/2017 11:24 PM, Zhang Chen wrote: We can call this qmp command to do checkpoint outside of qemu. Xen colo will nee

Re: [Qemu-devel] [PATCH v7 2/2] block/vxhs.c: Add qemu-iotests for new block device type "vxhs"

2017-02-15 Thread ashish mittal
Sorry, pressed the "send" button instead of "expand text" on the previous email ... On Mon, Feb 13, 2017 at 6:43 AM, Stefan Hajnoczi wrote: > On Tue, Feb 07, 2017 at 08:18:14PM -0800, Ashish Mittal wrote: >> diff --git a/tests/qemu-iotests/common.config >> b/tests/qemu-iotests/common.config >> i

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Peter Xu
On Wed, Feb 15, 2017 at 07:52:35PM -0700, Alex Williamson wrote: > On Thu, 16 Feb 2017 10:35:28 +0800 > Peter Xu wrote: > > > On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > > > VFIO actually wants to create a capability with ID == 0. > > > This is done to make guest drivers

Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Check for valid page size when hot plugging memory

2017-02-15 Thread David Gibson
On Wed, Feb 15, 2017 at 10:21:44AM +0100, Thomas Huth wrote: > On POWER, the valid page sizes that the guest can use are bound > to the CPU and not to the memory region. QEMU already has some > fancy logic to find out the right maximum memory size to tell > it to the guest during boot (see getrampa

Re: [Qemu-devel] [RFC] virtio-pci: Allow PCIe virtio devices on root bus

2017-02-15 Thread David Gibson
On Wed, Feb 15, 2017 at 04:59:33PM +0200, Marcel Apfelbaum wrote: > On 02/15/2017 03:45 AM, David Gibson wrote: > > On Tue, Feb 14, 2017 at 02:53:08PM +0200, Marcel Apfelbaum wrote: > > > On 02/14/2017 06:15 AM, David Gibson wrote: > > > > On Mon, Feb 13, 2017 at 12:14:23PM +0200, Marcel Apfelbaum

Re: [Qemu-devel] [PATCH v7 2/2] block/vxhs.c: Add qemu-iotests for new block device type "vxhs"

2017-02-15 Thread ashish mittal
On Mon, Feb 13, 2017 at 6:43 AM, Stefan Hajnoczi wrote: > On Tue, Feb 07, 2017 at 08:18:14PM -0800, Ashish Mittal wrote: >> diff --git a/tests/qemu-iotests/common.config >> b/tests/qemu-iotests/common.config >> index f6384fb..c7a80c0 100644 >> --- a/tests/qemu-iotests/common.config >> +++ b/tests

Re: [Qemu-devel] [PATCH v7 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-02-15 Thread ashish mittal
On Mon, Feb 13, 2017 at 6:57 AM, Stefan Hajnoczi wrote: > On Tue, Feb 07, 2017 at 08:18:13PM -0800, Ashish Mittal wrote: >> +static int vxhs_parse_uri(const char *filename, QDict *options) >> +{ >> +URI *uri = NULL; >> +char *hoststr, *portstr; >> +char *port; >> +int ret = 0; >> +

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Alex Williamson
On Thu, 16 Feb 2017 10:35:28 +0800 Peter Xu wrote: > On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > > VFIO actually wants to create a capability with ID == 0. > > This is done to make guest drivers skip the given capability. > > pcie_add_capability then trips up on this cap

Re: [Qemu-devel] iommu emulation

2017-02-15 Thread Alex Williamson
On Thu, 16 Feb 2017 10:28:39 +0800 Peter Xu wrote: > On Wed, Feb 15, 2017 at 11:15:52AM -0700, Alex Williamson wrote: > > [...] > > > > Alex, do you like something like below to fix above issue that Jintack > > > has encountered? > > > > > > (note: this code is not for compile, only trying sho

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Jason Wang
On 2017年02月16日 10:43, Hailiang Zhang wrote: On 2017/2/16 10:34, Jason Wang wrote: On 2017年02月15日 16:34, zhanghailiang wrote: We should release all unhandled packets before finalize colo compare. Besides, we need to free connection_track_table, or there will be a memory leak bug. Signed-off

Re: [Qemu-devel] [PATCH 2/5] colo-compare: kick compare thread to exit while finalize

2017-02-15 Thread Hailiang Zhang
On 2017/2/16 10:25, Zhang Chen wrote: On 02/15/2017 04:34 PM, zhanghailiang wrote: We should call g_main_loop_quit() to notify colo compare thread to exit, Or it will run in g_main_loop_run() forever. Besides, the finalizing process can't happen in context of colo thread, it is reasonable to

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Hailiang Zhang
On 2017/2/16 10:34, Jason Wang wrote: On 2017年02月15日 16:34, zhanghailiang wrote: We should release all unhandled packets before finalize colo compare. Besides, we need to free connection_track_table, or there will be a memory leak bug. Signed-off-by: zhanghailiang --- net/colo-compare.c |

Re: [Qemu-devel] [PATCH] target-ppc: Add quad precision muladd instructions

2017-02-15 Thread Bharata B Rao
On Thu, Feb 16, 2017 at 09:13:31AM +1100, Richard Henderson wrote: > On 02/15/2017 05:37 PM, Bharata B Rao wrote: > > + * > > + * TODO: When float128_muladd() becomes available, switch this > > + * implementation to use that instead of separate float128_mul() > > + * followed by float128_add(). >

Re: [Qemu-devel] [PATCH 2/5] colo-compare: kick compare thread to exit while finalize

2017-02-15 Thread Jason Wang
On 2017年02月16日 10:25, Zhang Chen wrote: @@ -703,13 +704,11 @@ static void colo_compare_finalize(Object *obj) qemu_chr_fe_deinit(&s->chr_sec_in); qemu_chr_fe_deinit(&s->chr_out); -g_queue_free(&s->conn_list); +g_main_loop_quit(s->compare_loop); +qemu_thread_join(&s->thr

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Peter Xu
On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > VFIO actually wants to create a capability with ID == 0. > This is done to make guest drivers skip the given capability. > pcie_add_capability then trips up on this capability > when looking for end of capability list. > > To su

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Jason Wang
On 2017年02月15日 16:34, zhanghailiang wrote: We should release all unhandled packets before finalize colo compare. Besides, we need to free connection_track_table, or there will be a memory leak bug. Signed-off-by: zhanghailiang --- net/colo-compare.c | 20 1 file change

Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Peter Xu
On Thu, Feb 16, 2017 at 10:18:00AM +0800, Cao jin wrote: > Hi peter > > On 02/14/2017 03:51 PM, Peter Xu wrote: > > When we add PCIe extended capabilities, we should be following the rule > > that we add the head extended cap (at offset 0x100) first, then the rest > > of them. Meanwhile, we are al

Re: [Qemu-devel] iommu emulation

2017-02-15 Thread Peter Xu
On Wed, Feb 15, 2017 at 11:15:52AM -0700, Alex Williamson wrote: [...] > > Alex, do you like something like below to fix above issue that Jintack > > has encountered? > > > > (note: this code is not for compile, only trying show what I mean...) > > > > --8<--- > > diff --git a/hw/vfio/p

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Zhang Chen
On 02/15/2017 04:34 PM, zhanghailiang wrote: We should release all unhandled packets before finalize colo compare. Besides, we need to free connection_track_table, or there will be a memory leak bug. Signed-off-by: zhanghailiang --- net/colo-compare.c | 20 1 file chang

Re: [Qemu-devel] [PATCH 2/5] colo-compare: kick compare thread to exit while finalize

2017-02-15 Thread Zhang Chen
On 02/15/2017 04:34 PM, zhanghailiang wrote: We should call g_main_loop_quit() to notify colo compare thread to exit, Or it will run in g_main_loop_run() forever. Besides, the finalizing process can't happen in context of colo thread, it is reasonable to remove the 'if (qemu_thread_is_self(&s-

Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Peter Xu
On Wed, Feb 15, 2017 at 04:25:05PM +0200, Marcel Apfelbaum wrote: > On 02/14/2017 09:51 AM, Peter Xu wrote: > >When we add PCIe extended capabilities, we should be following the rule > >that we add the head extended cap (at offset 0x100) first, then the rest > >of them. Meanwhile, we are always add

Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Cao jin
Hi peter On 02/14/2017 03:51 PM, Peter Xu wrote: > When we add PCIe extended capabilities, we should be following the rule > that we add the head extended cap (at offset 0x100) first, then the rest > of them. Meanwhile, we are always adding new capability bits at the end > of the list. Here the "n

Re: [Qemu-devel] [PATCH v3 15/16] target-m68k: add more FPU instructions

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: +static long double floatx80_to_ldouble(floatx80 val) +{ +if (floatx80_is_infinity(val)) { +if (floatx80_is_neg(val)) { +return -__builtin_infl(); +} +return __builtin_infl(); +} +if

Re: [Qemu-devel] [PATCH v3 14/16] target-m68k: add explicit single and double precision operations

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: +case 0: /* fmove */ +break; +case 0x40: /* fsmove */ +gen_helper_redf32_FP0(cpu_env); +gen_helper_extf32_FP0(cpu_env); +break; +case 0x44: /* fdmove */ +gen_helper_redf64_FP0(cpu_env); +gen_

Re: [Qemu-devel] [PATCH v3 13/16] target-m68k: add fsglmul and fsgldiv

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: fsglmul and fsgldiv truncate data to single precision before computing results. Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 22 ++ target/m68k/helper.h | 2 ++ target/m68k/translate.c | 8 3 file

Re: [Qemu-devel] [PATCH v3 12/16] target-m68k: add fscale, fgetman, fgetexp and fmod

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- target/m68k/cpu.h| 1 + target/m68k/fpu_helper.c | 56 target/m68k/helper.h | 4 target/m68k/translate.c | 14 4 files changed, 75 in

Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts

2017-02-15 Thread Gonglei (Arei)
Hi, > > On Sat, 2017-02-11 at 10:39 -0500, Paolo Bonzini wrote: > > > > > > > > > > > > > > On 10/02/2017 10:31, Gonglei (Arei) wrote: > > > > > > > > > > But We tested the same cases on Xen platform and VMware, and > > > > > the guest booted successfully. > > > > > > > > Were these two also test

Re: [Qemu-devel] [PATCH v3 11/16] target-m68k: add fmovecr

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: fmovecr moves a floating point constant from the FPU ROM to a floating point register. Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 31 +++ target/m68k/helper.h | 1 + target/m68k/translate.c | 12 +

Re: [Qemu-devel] [PATCH v3 10/16] target-m68k: add fscc.

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: +addr = tcg_temp_local_new(); +tcg_gen_mov_i32(addr, taddr); +l1 = gen_new_label(); +l2 = gen_new_label(); +gen_fjmpcc(s, ext & 0x3f, l1); +gen_store(s, OS_BYTE, addr, tcg_const_i32(0x00)); +tcg_gen_br(l2); +gen_set_lab

Re: [Qemu-devel] [PATCH v3 09/16] target-m68k: add fmovem

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 6 +++ target/m68k/helper.h | 1 + target/m68k/translate.c | 99 +++- 3 files changed, 80 insertions(+), 26 deletions(-) diff --git a/ta

Re: [Qemu-devel] iommu emulation

2017-02-15 Thread Alex Williamson
On Wed, 15 Feb 2017 18:25:26 -0500 Jintack Lim wrote: > On Wed, Feb 15, 2017 at 5:50 PM, Alex Williamson > wrote: > > > On Wed, 15 Feb 2017 17:05:35 -0500 > > Jintack Lim wrote: > > > > > On Tue, Feb 14, 2017 at 9:52 PM, Peter Xu wrote: > > > > > > > On Tue, Feb 14, 2017 at 07:50:39AM -

Re: [Qemu-devel] [PATCH v3 08/16] target-m68k: define 96bit FP registers for gdb on 680x0

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- configure| 2 +- gdb-xml/m68k-fp.xml | 21 + target/m68k/helper.c | 45 + 3 files changed, 67 insertions(+), 1 deletion(-) create mode 1

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] [PATCH v16 1/2] virtio-crypto: Add virtio crypto device specification

2017-02-15 Thread Gonglei (Arei)
Hi Halil, > > On 02/09/2017 03:29 AM, Gonglei (Arei) wrote: > [..] > > Oh, so much work need to be done. > > > > Halil, Would you mind work together with me to perfect the spec? > > And feel free to add your signed-off-by tag. :) > > > > TBH as a non-native English speaker, it's more difficult wr

Re: [Qemu-devel] [PATCH v3 07/16] target-m68k: manage FPU exceptions

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- target/m68k/cpu.h| 28 + target/m68k/fpu_helper.c | 107 ++- target/m68k/helper.h | 1 + target/m68k/translate.c | 27 4 files ch

Re: [Qemu-devel] [PATCH v3 06/16] target-m68k: add FPCR and FPSR

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: void HELPER(itrunc_FP0)(CPUM68KState *env) { floatx80 res; +set_float_rounding_mode(float_round_to_zero, &env->fp_status); res = floatx80_round_to_int(FP0_to_floatx80(env), &env->fp_status); +restore_rounding_mode(env); It would

[Qemu-devel] [PATCH v5 8/8] hw/mips: MIPS Boston board support

2017-02-15 Thread Yongbok Kim
From: Paul Burton Introduce support for emulating the MIPS Boston development board. The Boston board is built around an FPGA & 3 PCIe controllers, one of which is connected to an Intel EG20T Platform Controller Hub. It is used during the development & debug of new CPUs and the software intended

Re: [Qemu-devel] [PATCH 14/17] qmp: add x-debug-block-dirty-bitmap-sha256

2017-02-15 Thread John Snow
On 02/13/2017 04:54 AM, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz This is simply the same as the version in the other two series, right? Reviewed-by: John Snow > --- > block/dirty-bitmap.c | 5 + > blockdev.c

[Qemu-devel] [PATCH v5 5/8] dtc: Update requirement to v1.4.2

2017-02-15 Thread Yongbok Kim
From: Paul Burton In order to obtain fdt_first_subnode & fdt_next_subnode symbols from libfdt for use by a later patch, bump the requirement for dtc to v1.4.2 & the submodule to that same version. Signed-off-by: Paul Burton Reviewed-by: Yongbok Kim Signed-off-by: Yongbok Kim --- configure |

[Qemu-devel] [PATCH v5 7/8] hw: xilinx-pcie: Add support for Xilinx AXI PCIe Controller

2017-02-15 Thread Yongbok Kim
From: Paul Burton Add support for emulating the Xilinx AXI Root Port Bridge for PCI Express as described by Xilinx' PG055 document. This is a PCIe controller that can be used with certain series of Xilinx FPGAs, and is used on the MIPS Boston board which will make use of this code. Signed-off-by

[Qemu-devel] [PATCH v5 4/8] target-mips: Provide function to test if a CPU supports an ISA

2017-02-15 Thread Yongbok Kim
From: Paul Burton Provide a new cpu_supports_isa function which allows callers to determine whether a CPU supports one of the ISA_ flags, by testing whether the associated struct mips_def_t sets the ISA flags in its insn_flags field. An example use of this is to allow boards which generate bootl

[Qemu-devel] [PATCH v5 2/8] hw/mips_gictimer: provide API for retrieving frequency

2017-02-15 Thread Yongbok Kim
From: Paul Burton Provide a new function mips_gictimer_get_freq() which returns the frequency at which a GIC timer will count. This will be useful for boards which perform setup based upon this frequency. Signed-off-by: Paul Burton Reviewed-by: Leon Alrae Reviewed-by: Philippe Mathieu-Daudé S

[Qemu-devel] [PATCH v5 6/8] loader: Support Flattened Image Trees (FIT images)

2017-02-15 Thread Yongbok Kim
From: Paul Burton Introduce support for loading Flattened Image Trees, as used by modern U-Boot. FIT images are essentially flattened device tree files which contain binary images such as kernels, FDTs or ramdisks along with one or more configuration nodes describing boot configurations. The MIP

[Qemu-devel] [PATCH v5 0/8] MIPS Boston board support

2017-02-15 Thread Yongbok Kim
This series introduces support for the MIPS Boston development board. It begins by introducing support for moving MIPS Coherence Manager GCRs which Boston software typically does to avoid conflicting with its flash memory region. An API is then added to retrieve the emulated MIPS GIC timer frequenc

[Qemu-devel] [PATCH v5 3/8] hw/mips_gic: Update pin state on mask changes

2017-02-15 Thread Yongbok Kim
From: Paul Burton If the GIC interrupt mask is changed by a write to the smask (set mask) or rmask (reset mask) registers, we need to re-evaluate the state of the pins/IRQs fed to the CPU. Without doing so we risk leaving a pin high despite the interrupt that led to that state being masked, or lo

[Qemu-devel] [PATCH v5 1/8] hw/mips_cmgcr: allow GCR base to be moved

2017-02-15 Thread Yongbok Kim
From: Paul Burton Support moving the GCR base address & updating the CPU's CP0 CMGCRBase register appropriately. This is required if a platform needs to move its GCRs away from other memory, as the MIPS Boston development board does to avoid its flash memory. Signed-off-by: Paul Burton Reviewed

Re: [Qemu-devel] [PATCH v15 25/25] qcow2-bitmap: improve check_constraints_on_bitmap

2017-02-15 Thread John Snow
On 02/15/2017 05:10 AM, Vladimir Sementsov-Ogievskiy wrote: > Add detailed error messages. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow > --- > block/qcow2-bitmap.c | 48 ++-- > 1 file changed, 34 insertions(+), 14 deleti

Re: [Qemu-devel] RFC: How to make seccomp reliable and useful ?

2017-02-15 Thread Eduardo Otubo
On Wed, Feb 15, 2017 at 06=27=32PM +, Daniel P. Berrange wrote: > The current impl of seccomp in QEMU is intentionally allowing a huge range > of system calls to be executed. The goal was that running '-sandbox on' > should never break any feature of QEMU, so naturally any syscall that can > ex

Re: [Qemu-devel] iommu emulation

2017-02-15 Thread Jintack Lim
On Wed, Feb 15, 2017 at 5:50 PM, Alex Williamson wrote: > On Wed, 15 Feb 2017 17:05:35 -0500 > Jintack Lim wrote: > > > On Tue, Feb 14, 2017 at 9:52 PM, Peter Xu wrote: > > > > > On Tue, Feb 14, 2017 at 07:50:39AM -0500, Jintack Lim wrote: > > > > > > [...] > > > > > > > > > >> > I misunderstoo

Re: [Qemu-devel] [PATCH v15 16/25] qmp: add persistent flag to block-dirty-bitmap-add

2017-02-15 Thread John Snow
On 02/15/2017 05:10 AM, Vladimir Sementsov-Ogievskiy wrote: > Add optional 'persistent' flag to qmp command block-dirty-bitmap-add. > Default is false. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Denis V. Lunev > Reviewed-by: Max Reitz Reviewed-by: John Snow > --- > b

Re: [Qemu-devel] [PATCH v15 15/25] qcow2: add .bdrv_can_store_new_dirty_bitmap

2017-02-15 Thread John Snow
On 02/15/2017 05:10 AM, Vladimir Sementsov-Ogievskiy wrote: > Realize .bdrv_can_store_new_dirty_bitmap interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Thanks, Reviewed-by: John Snow > --- > block/qcow2-bitmap.c | 52 > > bloc

Re: [Qemu-devel] [PATCH v6 6/7] tests: Move reusable ACPI macros into a new header file

2017-02-15 Thread Ben Warren
> On Feb 15, 2017, at 2:56 PM, Eric Blake wrote: > > On 02/15/2017 03:58 PM, Ben Warren wrote: > >>> >>> --- >>> tests/acpi-utils.h | 75 >>> >>> tests/bios-tables-test.c | 72 +- >>> 2 files chan

Re: [Qemu-devel] [PATCH v3 05/16] target-m68k: use floatx80 internally

2017-02-15 Thread Richard Henderson
On 02/07/2017 11:59 AM, Laurent Vivier wrote: +uint32_t fp0h; +uint64_t fp0l; +uint32_t fp1h; +uint64_t fp1l; I'm not especially keen on these temporaries. Wouldn't it be better to pass pointers to FPReg to the helpers, so that e.g. fadd.x fp0, fp1 puts the result in fp1 d

Re: [Qemu-devel] [PATCH v6 6/7] tests: Move reusable ACPI macros into a new header file

2017-02-15 Thread Eric Blake
On 02/15/2017 03:58 PM, Ben Warren wrote: >> >> --- >> tests/acpi-utils.h | 75 >> >> tests/bios-tables-test.c | 72 +- >> 2 files changed, 76 insertions(+), 71 deletions(-) >> No copyright blurb?

Re: [Qemu-devel] iommu emulation

2017-02-15 Thread Alex Williamson
On Wed, 15 Feb 2017 17:05:35 -0500 Jintack Lim wrote: > On Tue, Feb 14, 2017 at 9:52 PM, Peter Xu wrote: > > > On Tue, Feb 14, 2017 at 07:50:39AM -0500, Jintack Lim wrote: > > > > [...] > > > > > > > >> > I misunderstood what you said? > > > > > > > > > > > > I failed to understand why an v

Re: [Qemu-devel] [RFC QEMU PATCH 1/8] nvdimm: do not initialize label_data if label_size is zero

2017-02-15 Thread Konrad Rzeszutek Wilk
On Mon, Oct 10, 2016 at 08:34:16AM +0800, Haozhong Zhang wrote: > When memory-backend-xen is used, the label_data pointer can not be got > via memory_region_get_ram_ptr(). We will use other functions to get Could you explain why it cannot be retrieved via that way? > label_data once we introduce

Re: [Qemu-devel] [PATCH] target-ppc: Add quad precision muladd instructions

2017-02-15 Thread Richard Henderson
On 02/15/2017 05:37 PM, Bharata B Rao wrote: + * + * TODO: When float128_muladd() becomes available, switch this + * implementation to use that instead of separate float128_mul() + * followed by float128_add(). Let's just do that, rather than add something that can't pass tests. You should be

Re: [Qemu-devel] iommu emulation

2017-02-15 Thread Jintack Lim
On Tue, Feb 14, 2017 at 9:52 PM, Peter Xu wrote: > On Tue, Feb 14, 2017 at 07:50:39AM -0500, Jintack Lim wrote: > > [...] > > > > > >> > I misunderstood what you said? > > > > > > > > > > I failed to understand why an vIOMMU could help boost performance. > :( > > > > > Could you provide your comm

Re: [Qemu-devel] [PATCH v6 6/7] tests: Move reusable ACPI macros into a new header file

2017-02-15 Thread Ben Warren
> On Feb 15, 2017, at 1:35 PM, Eric Blake wrote: > > On 02/15/2017 12:15 AM, b...@skyportsystems.com > wrote: >> From: Ben Warren >> >> Also usable by upcoming VM Generation ID tests >> >> Signed-off-by: Ben Warren >> --- >> tests/acpi-utils.h | 75 >>

Re: [Qemu-devel] [PATCH v12 12/24] tcg: handle EXCP_ATOMIC exception for system emulation

2017-02-15 Thread Richard Henderson
On 02/14/2017 09:50 PM, Alex Bennée wrote: Richard Henderson writes: On 02/13/2017 11:10 PM, Alex Bennée wrote: @@ -239,9 +240,16 @@ static void cpu_exec_step(CPUState *cpu) +} else if (r == EXCP_ATOMIC) { +qemu_mutex_unlock_iothread(); +

Re: [Qemu-devel] [PATCH v6 6/7] tests: Move reusable ACPI macros into a new header file

2017-02-15 Thread Eric Blake
On 02/15/2017 12:15 AM, b...@skyportsystems.com wrote: > From: Ben Warren > > Also usable by upcoming VM Generation ID tests > > Signed-off-by: Ben Warren > --- > tests/acpi-utils.h | 75 > > tests/bios-tables-test.c | 72 +---

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Alex Williamson
On Wed, 15 Feb 2017 22:49:47 +0200 "Michael S. Tsirkin" wrote: > VFIO actually wants to create a capability with ID == 0. > This is done to make guest drivers skip the given capability. > pcie_add_capability then trips up on this capability > when looking for end of capability list. > > To suppo

[Qemu-devel] [PATCH v2] target/sparc: Restore ldstub of odd asis

2017-02-15 Thread Richard Henderson
Fixes the booting of ss20 roms. Cc: qemu-sta...@nongnu.org Reported-by: Michael Russo Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- v2: Update tags. --- target/sparc/translate.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/

Re: [Qemu-devel] [PATCH v6 1/7] linker-loader: Add new 'write pointer' command

2017-02-15 Thread Michael S. Tsirkin
On Wed, Feb 15, 2017 at 10:44:05AM -0800, Ben Warren wrote: > > On Feb 15, 2017, at 10:35 AM, Igor Mammedov wrote: > > On Wed, 15 Feb 2017 10:14:55 -0800 > Ben Warren wrote: > > > On Feb 15, 2017, at 10:06 AM, Michael S. Tsirkin > wrote: > > O

Re: [Qemu-devel] [PATCH v6 0/7] Add support for VM Generation ID

2017-02-15 Thread Laszlo Ersek
On 02/15/17 21:09, Michael S. Tsirkin wrote: > On Wed, Feb 15, 2017 at 08:47:48PM +0100, Laszlo Ersek wrote: [snip] >> For patches #1, #3, #4 and #5: >> >> Tested-by: Laszlo Ersek >> >> I'll soon post the OVMF patches. >> >> Thanks! >> Laszlo > > > How do you feel about Igor's request to chang

[Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Michael S. Tsirkin
VFIO actually wants to create a capability with ID == 0. This is done to make guest drivers skip the given capability. pcie_add_capability then trips up on this capability when looking for end of capability list. To support this use-case, it's easy enough to switch to e.g. 0x for these com

Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-02-15 Thread ashish mittal
Thanks! Will change accordingly in the next patch. On Tue, Feb 14, 2017 at 7:54 PM, Jeff Cody wrote: > On Tue, Feb 14, 2017 at 07:02:32PM -0800, ashish mittal wrote: >> On Tue, Feb 14, 2017 at 2:34 PM, ashish mittal wrote: >> > On Tue, Feb 14, 2017 at 12:51 PM, Jeff Cody wrote: >> >> On Thu, Fe

Re: [Qemu-devel] [PATCH v3 8/8] hw: Drop superfluous special checks for orphaned -drive

2017-02-15 Thread John Snow
On 02/15/2017 05:05 AM, Markus Armbruster wrote: > We've traditionally rejected orphans here and there, but not > systematically. For instance, the sun4m machines have an onboard SCSI > HBA (bus=0), and have always rejected bus>0. Other machines with an > onboard SCSI HBA don't. > > Commit a66

  1   2   3   4   >