[Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-25 Thread Andrey Smetanin
Per Hyper-V specification (and as required by Hyper-V-aware guests), SynIC provides 4 per-vCPU timers. Each timer is programmed via a pair of MSRs, and signals expiration by delivering a special format message to the configured SynIC message slot and triggering the corresponding synthetic

[Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-25 Thread Andrey Smetanin
The SynIC message protocol mandates that the message slot is claimed by atomically setting message type to something other than HVMSG_NONE. If another message is to be delivered while the slot is still busy, message pending flag is asserted to indicate to the guest that the hypervisor wants to be

Re: [Qemu-devel] [RESEND RFC 2/6] device_tree: introduce load_device_tree_from_sysfs

2015-11-25 Thread Alex Bennée
Eric Auger writes: > This function returns the host device tree blob from sysfs > (/sys/firmware/devicetree/base). > > This has a runtime dependency on the dtc binary. This functionality > is useful for platform device passthrough where the host device tree > needs to be

Re: [Qemu-devel] [PATCH v2 14/14] iotests: Add "qemu-img map" test for VMDK extents

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/059 | 10 ++ > tests/qemu-iotests/059.out | 38 ++ > 2 files changed, 48 insertions(+) Reviewed-by: Eric Blake --

Re: [Qemu-devel] [RFC PATCH V2 09/10] Qemu/VFIO: Add SRIOV VF migration support

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 11:32:23PM +0800, Lan, Tianyu wrote: > > On 11/25/2015 5:03 AM, Michael S. Tsirkin wrote: > >>>+void vfio_migration_cap_handle(PCIDevice *pdev, uint32_t addr, > >>>+ uint32_t val, int len) > >>>+{ > >>>+VFIOPCIDevice *vdev =

Re: [Qemu-devel] [PATCH v7 12/24] virtio-blk: Functions for op blocker management

2015-11-25 Thread Max Reitz
On 25.11.2015 17:18, Kevin Wolf wrote: > Am 25.11.2015 um 17:03 hat Max Reitz geschrieben: >> On 25.11.2015 16:57, Kevin Wolf wrote: >>> Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: Put the code for setting up and removing op blockers into an own function, respectively. Then, we can

Re: [Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 16:49, Eduardo Habkost wrote: > Instead of silently clearing mcg_cap bits when the host doesn't > support them, print a warning when doing that. > > Signed-off-by: Eduardo Habkost > --- > target-i386/kvm.c | 8 +++- > 1 file changed, 7 insertions(+), 1

Re: [Qemu-devel] [PATCH v3 0/2] qga: flush explicitly when needed

2015-11-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-11-25 06:59:10) > From: Marc-André Lureau > > Without this change, a write() followed by a read() may lose the > previously written content, as shown in the following test. > > v2->v3: > - use a RwState tristate enum > -

Re: [Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Borislav Petkov
On Wed, Nov 25, 2015 at 01:49:49PM -0200, Eduardo Habkost wrote: > Instead of silently clearing mcg_cap bits when the host doesn't > support them, print a warning when doing that. Why the host? Why would we want there to be any relation between the MCA capabilities of the host and what qemu is

Re: [Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 18:21, Borislav Petkov wrote: >> Instead of silently clearing mcg_cap bits when the host doesn't >> > support them, print a warning when doing that. > Why the host? Why would we want there to be any relation between the MCA > capabilities of the host and what qemu is emulating? He

Re: [Qemu-devel] [PATCH v7 12/24] virtio-blk: Functions for op blocker management

2015-11-25 Thread Kevin Wolf
Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > 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

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Eric Blake
On 11/25/2015 05:59 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This test exhibits a POSIX behaviour regarding switching between write > and read. It's undefined result if the application doesn't ensure a > flush between the two operations

Re: [Qemu-devel] [PATCH v7 12/24] virtio-blk: Functions for op blocker management

2015-11-25 Thread Max Reitz
On 25.11.2015 16:57, Kevin Wolf wrote: > Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: >> 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. >>

Re: [Qemu-devel] [PATCH v7 13/24] virtio-scsi: Catch BDS-BB removal/insertion

2015-11-25 Thread Kevin Wolf
Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > 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 > @@ -797,6 +830,29 @@ static void virtio_scsi_hotunplug(HotplugHandler >

Re: [Qemu-devel] [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Lan, Tianyu
On 11/25/2015 8:28 PM, Michael S. Tsirkin wrote: Frankly, I don't really see what this short term hack buys us, and if it goes in, we'll have to maintain it forever. The framework of how to notify VF about migration status won't be changed regardless of stopping VF or not before doing

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Eric Blake
On 11/25/2015 09:46 AM, Michael Roth wrote: > Quoting Eric Blake (2015-11-25 10:41:35) >> On 11/25/2015 09:21 AM, Michael Roth wrote: >> > +/* seek to 0 */ > +cmd = g_strdup_printf("{'execute': 'guest-file-seek'," > + " 'arguments': { 'handle': %"

[Qemu-devel] [PULL 7/9] target-i386: kvm: Abort if MCE bank count is not supported by host

2015-11-25 Thread Paolo Bonzini
From: Eduardo Habkost Instead of silently changing the number of banks in mcg_cap based on kvm_get_mce_cap_supported(), abort initialization if the host doesn't support MCE_BANKS_DEF banks. Note that MCE_BANKS_DEF was always 10 since it was introduced in QEMU, and Linux

[Qemu-devel] [PULL 8/9] target-i386: kvm: Use env->mcg_cap when setting up MCE

2015-11-25 Thread Paolo Bonzini
From: Eduardo Habkost When setting up MCE, instead of using the MCE_*_DEF macros directly, just filter the existing env->mcg_cap value. As env->mcg_cap is already initialized as MCE_CAP_DEF|MCE_BANKS_DEF at target-i386/cpu.c:mce_init(), this doesn't change any behavior. But

[Qemu-devel] [PULL 9/9] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Paolo Bonzini
From: Eduardo Habkost Instead of silently clearing mcg_cap bits when the host doesn't support them, print a warning when doing that. Signed-off-by: Eduardo Habkost [Avoid \n at end of error_report. - Paolo] Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 3/9] call bdrv_drain_all() even if the vm is stopped

2015-11-25 Thread Paolo Bonzini
From: Wen Congyang There are still I/O operations when the vm is stopped. For example, stop the vm, and do block migration. In this case, we don't drain all I/O operation, and may meet the following problem: qemu-system-x86_64: migration/block.c:731: block_save_complete:

Re: [Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Borislav Petkov
On Wed, Nov 25, 2015 at 06:29:25PM +0100, Paolo Bonzini wrote: > On 25/11/2015 18:21, Borislav Petkov wrote: > >> Instead of silently clearing mcg_cap bits when the host doesn't > >> > support them, print a warning when doing that. > > Why the host? Why would we want there to be any relation

[Qemu-devel] [PATCH v1 0/2] QEMU: Hyper-V SynIC timers MSR's support

2015-11-25 Thread Andrey Smetanin
Hyper-V SynIC timers are host timers that are configurable by guest through corresponding MSR's (HV_X64_MSR_STIMER*). Guest setup and use fired by host events(SynIC interrupt and appropriate timer expiration message) as guest clock events. The state of Hyper-V SynIC timers are stored in

Re: [Qemu-devel] [PATCH v2 13/14] qemu-img: Use QAPI visitor to generate JSON

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > A visible improvement is that "filename" is now included in the output > if it's valid. > > Signed-off-by: Fam Zheng > --- > qemu-img.c | 39 --- > tests/qemu-iotests/122.out | 96 >

Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051

2015-11-25 Thread Max Reitz
On 24.11.2015 22:17, Sascha Silbe wrote: > Dear Max, Hi! :-) > Max Reitz writes: > >> OK, so it is expected for s390x; however, this is strictly speaking not >> the output file for s390x but for any platform but PC. That's why I'd >> rather not have it in this “generic”

Re: [Qemu-devel] [PULL 0/6] Block patches for 2.5.0-rc2

2015-11-25 Thread Peter Maydell
On 25 November 2015 at 14:10, Kevin Wolf wrote: > The following changes since commit 1aae36df4b8ed884c6ef6995e70c67fad79b49df: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-ivshmem-2015-11-25' > into staging (2015-11-25 11:38:03 +) > > are available in the

Re: [Qemu-devel] [PATCH v2 07/14] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > block/qed.c | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [Qemu-devel] [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 08:24:38AM -0800, Alexander Duyck wrote: > >> Also, assuming you just want to do ifdown/ifup for some reason, it's > >> easy enough to do using a guest agent, in a completely generic way. > >> > > > > Just ifdown/ifup is not enough for migration. It needs to restore some

Re: [Qemu-devel] [PATCH for 2.5 1/1] qga: gspawn() console helper to Windows guest agent msi build

2015-11-25 Thread Michael Roth
Quoting Denis V. Lunev (2015-11-19 06:20:37) > From: Yuri Pudgorodskiy > > This helper, gspawn-win64-helper-console.exe for 64-bit and > gspawn-win32-helper-console.exe for 32-bit environment, > is needed for gspawn() mingw implementation, used by guest-exec command. > >

Re: [Qemu-devel] [PATCH 1/3] target-i386: kvm: Abort if MCE bank count is not supported by host

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 18:26, Eduardo Habkost wrote: >> > Yoda conditions? >> > >> > if (banks < MCE_BANKS_DEF) { >> > error_report("kvm: Unsupported MCE bank count (QEMU = %d, KVM >> > = %d)", >> > MCE_BANKS_DEF, banks); > This was on purpose, because

Re: [Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 18:29, Eduardo Habkost wrote: >>> > > >>> > > +unsupported_caps = env->mcg_cap & ~(mcg_cap | >>> > > MCG_CAP_BANKS_MASK); >>> > > +if (unsupported_caps) { >>> > > +error_report("warning: Unsupported MCG_CAP bits: 0x%" >>> > > PRIx64 "\n", >> > >> >

[Qemu-devel] [PATCH for-2.5 v2] qga: Better mapping of SEEK_* in guest-file-seek

2015-11-25 Thread Eric Blake
Exposing OS-specific SEEK_ constants in our qapi was a mistake (if the host has SEEK_CUR as 1, but the guest has it as 2, then the semantics are unclear what should happen); if we had a time machine, we would instead expose only a symbolic enum. It's too late to change the fact that we have an

[Qemu-devel] [PATCH v1 7/7] kvm/x86: Hyper-V SynIC timers

2015-11-25 Thread Andrey Smetanin
Per Hyper-V specification (and as required by Hyper-V-aware guests), SynIC provides 4 per-vCPU timers. Each timer is programmed via a pair of MSRs, and signals expiration by delivering a special format message to the configured SynIC message slot and triggering the corresponding synthetic

[Qemu-devel] [PATCH v1 2/7] drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

2015-11-25 Thread Andrey Smetanin
This struct is required for Hyper-V SynIC timers implementation inside KVM and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into Hyper-V UAPI header. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov

Re: [Qemu-devel] [PATCH v7 13/24] virtio-scsi: Catch BDS-BB removal/insertion

2015-11-25 Thread Max Reitz
On 25.11.2015 17:03, Kevin Wolf wrote: > Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: >> 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 > >> @@ -797,6 +830,29 @@ static

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Eric Blake
On 11/25/2015 09:21 AM, Michael Roth wrote: >>> +/* seek to 0 */ >>> +cmd = g_strdup_printf("{'execute': 'guest-file-seek'," >>> + " 'arguments': { 'handle': %" PRId64 ", " >>> + " 'offset': %d, 'whence': %d } }", >>> +

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Eric Blake
On 11/25/2015 10:14 AM, Michael Roth wrote: >>> Thanks! FYI I now have this series applied here if you'd like to base >>> on that: >>> >>> https://github.com/mdroth/qemu/commits/qga >> >> On that branch, commit 7a38932 has two typos: >> s/is commit msg (Lazlo)/in commit msg (Laszlo)/ > >

[Qemu-devel] [PULL 5/9] exec: remove warning about mempath and hugetlbfs

2015-11-25 Thread Paolo Bonzini
From: "Daniel P. Berrange" The gethugepagesize() method in exec.c printed a warning if the file path for "-mem-path" or "-object memory-backend-file" was not on a hugetlbfs filesystem. This warning is bogus, because QEMU functions perfectly well with the path on a regular

[Qemu-devel] [PULL 4/9] Revert "exec: silence hugetlbfs warning under qtest"

2015-11-25 Thread Paolo Bonzini
From: "Daniel P. Berrange" This reverts commit 1c7ba94a184df1eddd589d5400d879568d3e5d08. That commit changed QEMU initialization order from - object-initial, chardev, qtest, object-late to - chardev, qtest, object-initial, object-late This breaks chardev setups which

Re: [Qemu-devel] [PATCH v2 12/14] qemu-img: Make MapEntry a QAPI struct

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > The "flags" bit mask is expanded to two booleans, "data" and "zero"; > "bs" is replaced with "filename" string. > > Signed-off-by: Fam Zheng > --- > qapi/block-core.json | 28 > qemu-img.c | 48

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-25 Thread David Engraf
Am 25.11.2015 um 15:36 schrieb Paolo Bonzini: On 25/11/2015 15:04, David Engraf wrote: No, you don't. Who is reading iothread_locked during qemu_cond_wait_iothread? No one, because it is a thread-local variable whose address is never taken. prepare_mmio_access is reading

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Michael Roth
Quoting Eric Blake (2015-11-25 10:02:55) > On 11/25/2015 05:59 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > This test exhibits a POSIX behaviour regarding switching between write > > and read. It's undefined result if the application

Re: [Qemu-devel] [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Thu, Nov 26, 2015 at 12:02:33AM +0800, Lan, Tianyu wrote: > On 11/25/2015 8:28 PM, Michael S. Tsirkin wrote: > >Frankly, I don't really see what this short term hack buys us, > >and if it goes in, we'll have to maintain it forever. > > > > The framework of how to notify VF about migration

Re: [Qemu-devel] [PATCH v3 0/2] qga: flush explicitly when needed

2015-11-25 Thread Marc-André Lureau
Hi - Original Message - > Quoting marcandre.lur...@redhat.com (2015-11-25 06:59:10) > > From: Marc-André Lureau > > > > Without this change, a write() followed by a read() may lose the > > previously written content, as shown in the following test. > > > >

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 16:20, Andrey Smetanin wrote: > +static void synic_clear_sint_msg_pending(struct kvm_vcpu_hv_synic *synic, > + u32 sint) > +{ > + struct kvm_vcpu *vcpu = synic_to_vcpu(synic); > + struct page *page; > + gpa_t gpa; > + struct

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Michael Roth
Quoting Eric Blake (2015-11-25 11:10:46) > On 11/25/2015 09:46 AM, Michael Roth wrote: > > Quoting Eric Blake (2015-11-25 10:41:35) > >> On 11/25/2015 09:21 AM, Michael Roth wrote: > >> > > +/* seek to 0 */ > > +cmd = g_strdup_printf("{'execute': 'guest-file-seek'," > > +

Re: [Qemu-devel] [trivial for-2.6] util/id: fully allocate names table

2015-11-25 Thread John Snow
On 11/25/2015 03:18 AM, Markus Armbruster wrote: > John Snow writes: > >> Trivial: this array should be allocated to have ID_MAX entries always. >> Otherwise if someone were to forget to expand this table, the assertion >> in the id generator won't actually trigger; it will

[Qemu-devel] [PATCH v1 2/2] target-i386/kvm: Hyper-V SynIC timers MSR's support

2015-11-25 Thread Andrey Smetanin
Hyper-V SynIC timers are host timers that are configurable by guest through corresponding MSR's (HV_X64_MSR_STIMER*). Guest setup and use fired by host events(SynIC interrupt and appropriate timer expiration message) as guest clock events. The state of Hyper-V SynIC timers are stored in

Re: [Qemu-devel] [RFC PATCH V2 09/10] Qemu/VFIO: Add SRIOV VF migration support

2015-11-25 Thread Lan, Tianyu
On 11/25/2015 5:03 AM, Michael S. Tsirkin wrote: >+void vfio_migration_cap_handle(PCIDevice *pdev, uint32_t addr, >+ uint32_t val, int len) >+{ >+VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev); >+ >+if (addr == vdev->migration_cap +

Re: [Qemu-devel] [PATCH v3 1/2] qga: flush explicitly when needed

2015-11-25 Thread Eric Blake
On 11/25/2015 05:59 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > According to the specification: > http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html > > "the application shall ensure that output is not directly followed by

Re: [Qemu-devel] [PATCH v7 for-2.6 00/24] block: Rework bdrv_close_all()

2015-11-25 Thread Kevin Wolf
Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > Currently, bdrv_close_all() force-closes all BDSs with a BlockBackend, > which can lead to data corruption (see the iotest added in the final > patch of this series) and is most certainly very ugly. > > This series reworks bdrv_close_all() to

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 16:48, David Engraf wrote: > > Indeed, TLS handling is broken. The address of iothread_locked is always > the same between threads and I can see that a different thread sets > iothread_locked to false, thus my current thread uses an invalid state. > I will have to check why my

Re: [Qemu-devel] [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 8:02 AM, Lan, Tianyu wrote: > On 11/25/2015 8:28 PM, Michael S. Tsirkin wrote: >> >> Frankly, I don't really see what this short term hack buys us, >> and if it goes in, we'll have to maintain it forever. >> > > The framework of how to notify VF about

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 17:55, Andrey Smetanin wrote: >> >> +gpa = synic->msg_page & PAGE_MASK; >> +page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT); >> +if (is_error_page(page)) { >> +vcpu_err(vcpu, "Hyper-V SynIC can't get msg page, gpa 0x%llx\n", >> + gpa); >> +

Re: [Qemu-devel] [PATCH 1/3] target-i386: kvm: Abort if MCE bank count is not supported by host

2015-11-25 Thread Eduardo Habkost
On Wed, Nov 25, 2015 at 05:46:38PM +0100, Paolo Bonzini wrote: > > > On 25/11/2015 16:49, Eduardo Habkost wrote: > > Instead of silently changing the number of banks in mcg_cap based > > on kvm_get_mce_cap_supported(), abort initialization if the host > > doesn't support MCE_BANKS_DEF banks. > >

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Michael Roth
Quoting Eric Blake (2015-11-25 11:18:24) > On 11/25/2015 10:14 AM, Michael Roth wrote: > >>> Thanks! FYI I now have this series applied here if you'd like to base > >>> on that: > >>> > >>> https://github.com/mdroth/qemu/commits/qga > >> > >> On that branch, commit 7a38932 has two typos: > >>

[Qemu-devel] [PATCH v1 1/2] include: update Hyper-V header to include SynIC timers defines

2015-11-25 Thread Andrey Smetanin
This patch brings in the necessary changes from the corresponding kernel patchset. It's included only for completeness; ideally these changes should arrive via the standard kernel header pull. Signed-off-by: Andrey Smetanin CC: Paolo Bonzini CC:

[Qemu-devel] [PATCH v1 3/7] kvm/x86: Rearrange func's declarations inside Hyper-V header

2015-11-25 Thread Andrey Smetanin
This rearrangement places functions declarations together according to their functionality, so future additions will be simplier. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini

Re: [Qemu-devel] [PATCH] Revert "vhost: send SET_VRING_ENABLE at start/stop"

2015-11-25 Thread Thibaut Collet
On Wed, Nov 25, 2015 at 1:42 PM, Michael S. Tsirkin wrote: > This reverts commit 3a12f32229a046f4d4ab0a3a52fb01d2d5a1ab76. > > In case of live migration several queues can be enabled and not only the > first one. So informing backend that only the first queue is enabled is >

[Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Eduardo Habkost
Instead of silently clearing mcg_cap bits when the host doesn't support them, print a warning when doing that. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target-i386/kvm.c

Re: [Qemu-devel] [PATCH 1/3] target-i386: kvm: Abort if MCE bank count is not supported by host

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 16:49, Eduardo Habkost wrote: > Instead of silently changing the number of banks in mcg_cap based > on kvm_get_mce_cap_supported(), abort initialization if the host > doesn't support MCE_BANKS_DEF banks. > > Note that MCE_BANKS_DEF was always 10 since it was introduced in > QEMU,

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-25 Thread Andrey Smetanin
On 11/25/2015 07:52 PM, Paolo Bonzini wrote: On 25/11/2015 16:20, Andrey Smetanin wrote: +static void synic_clear_sint_msg_pending(struct kvm_vcpu_hv_synic *synic, + u32 sint) +{ + struct kvm_vcpu *vcpu = synic_to_vcpu(synic); + struct page

[Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values

2015-11-25 Thread Paolo Bonzini
It seems like there's no good reason for the compiler to exploit the undefinedness of left shifts. GCC explicitly documents that they do not use at all this possibility and, while they also say this is subject to change, they have been saying this for 10 years (since the wording appeared in the

[Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-25 Thread Paolo Bonzini
The following changes since commit 4b6eda626fdb8bf90472c6868d502a2ac09abeeb: Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into staging (2015-11-24 17:05:06 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to

[Qemu-devel] [PATCH 1/3] target-i386: kvm: Abort if MCE bank count is not supported by host

2015-11-25 Thread Eduardo Habkost
Instead of silently changing the number of banks in mcg_cap based on kvm_get_mce_cap_supported(), abort initialization if the host doesn't support MCE_BANKS_DEF banks. Note that MCE_BANKS_DEF was always 10 since it was introduced in QEMU, and Linux always returned 32 at KVM_CAP_MCE since

[Qemu-devel] [PATCH 2/3] target-i386: kvm: Use env->mcg_cap when setting up MCE

2015-11-25 Thread Eduardo Habkost
When setting up MCE, instead of using the MCE_*_DEF macros directly, just filter the existing env->mcg_cap value. As env->mcg_cap is already initialized as MCE_CAP_DEF|MCE_BANKS_DEF at target-i386/cpu.c:mce_init(), this doesn't change any behavior. But it will allow us to change mce_init() in the

[Qemu-devel] [PATCH 0/3] target-i386: kvm: Use env->mcg_cap when setting up MCE

2015-11-25 Thread Eduardo Habkost
Instead of overwriting env->mcg_cap, make kvm_arch_init_vcpu(), use the value already set at the CPU object when initializing MCE. Except for the new "unsupported MCG_CAPS bits" warning, this patch doesn't change any of the existing QEMU behavior. The previous code set env->mcg_cap to:

Re: [Qemu-devel] [PATCH v7 12/24] virtio-blk: Functions for op blocker management

2015-11-25 Thread Kevin Wolf
Am 25.11.2015 um 17:03 hat Max Reitz geschrieben: > On 25.11.2015 16:57, Kevin Wolf wrote: > > Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > >> Put the code for setting up and removing op blockers into an own > >> function, respectively. Then, we can invoke those functions whenever a > >>

Re: [Qemu-devel] [PATCH v2 06/14] parallels: Assign bs->file->bs to file in parallels_co_get_block_status

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > block/parallels.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake > > diff --git a/block/parallels.c b/block/parallels.c > index d1146f1..6552f32 100644 > ---

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] import nvme fix

2015-11-25 Thread Keith Busch
On Wed, Nov 25, 2015 at 10:28:42AM +0100, Kevin Wolf wrote: > Am 18.11.2015 um 19:53 hat Christoph Hellwig geschrieben: > > First one fixes Identify to behave as mandated by the spec, and the > > second bumps the PCI revision so that guest drivers can detect > > the fixed version of the device so

[Qemu-devel] [PULL 6/9] target-sparc: fix 32-bit truncation in fpackfix

2015-11-25 Thread Paolo Bonzini
This is reported by Coverity. The algorithm description at ftp://ftp.icm.edu.pl/packages/ggi/doc/hw/sparc/Sparc.pdf suggests that the 32-bit parts of rs2, after the left shift, is treated as a 64-bit integer. Bits 32 and above are used to do the saturating truncation. Message-Id:

Re: [Qemu-devel] [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 8:39 AM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 08:24:38AM -0800, Alexander Duyck wrote: >> >> Also, assuming you just want to do ifdown/ifup for some reason, it's >> >> easy enough to do using a guest agent, in a completely generic way. >> >>

[Qemu-devel] [PULL 1/9] MAINTAINERS: Update TCG CPU cores section

2015-11-25 Thread Paolo Bonzini
These are the people that I think have been touching it lately or reviewing patches. Signed-off-by: Paolo Bonzini --- MAINTAINERS | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 28f0139..bb1f3e4 100644

[Qemu-devel] [PATCH v1 1/7] drivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header

2015-11-25 Thread Andrey Smetanin
This constant is required for Hyper-V SynIC timers MSR's support by userspace(QEMU). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan"

[Qemu-devel] [PATCH v1 4/7] kvm/x86: Added Hyper-V vcpu_to_hv_vcpu()/hv_vcpu_to_vcpu() helpers

2015-11-25 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov

[Qemu-devel] [PATCH v1 5/7] kvm/x86: Hyper-V internal helper to read MSR HV_X64_MSR_TIME_REF_COUNT

2015-11-25 Thread Andrey Smetanin
This helper will be used also in Hyper-V SynIC timers implementation. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC:

Re: [Qemu-devel] [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 12:21 AM, Lan Tianyu wrote: > On 2015年11月25日 13:30, Alexander Duyck wrote: >> No, what I am getting at is that you can't go around and modify the >> configuration space for every possible device out there. This >> solution won't scale. > > > PCI

Re: [Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread Michael Roth
Quoting Eric Blake (2015-11-25 10:41:35) > On 11/25/2015 09:21 AM, Michael Roth wrote: > > >>> +/* seek to 0 */ > >>> +cmd = g_strdup_printf("{'execute': 'guest-file-seek'," > >>> + " 'arguments': { 'handle': %" PRId64 ", " > >>> + "

Re: [Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Eduardo Habkost
On Wed, Nov 25, 2015 at 05:45:20PM +0100, Paolo Bonzini wrote: > On 25/11/2015 16:49, Eduardo Habkost wrote: > > Instead of silently clearing mcg_cap bits when the host doesn't > > support them, print a warning when doing that. > > > > Signed-off-by: Eduardo Habkost > > ---

Re: [Qemu-devel] [PATCH v3 for-2.5 11/12] qjson: surprise, allocating 6 QObjects per token is expensive

2015-11-25 Thread Eric Blake
On 11/25/2015 02:23 PM, Markus Armbruster wrote: > From: Paolo Bonzini > > Replace the contents of the tokens GQueue with a simple struct. This cuts > the amount of memory allocated by tests/check-qjson from ~500MB to ~20MB, > and the execution time from 600ms to 80ms on my

[Qemu-devel] [PULL for-2.5 3/6] qga: flush explicitly when needed

2015-11-25 Thread Michael Roth
From: Marc-André Lureau According to the specification: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html "the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning

[Qemu-devel] [PULL v2 for-2.5 6/6] qga: added another non-interactive gspawn() helper file.

2015-11-25 Thread Michael Roth
From: Yuri Pudgorodskiy With previous commit we added gspawn-win64-helper-console.exe, required for gspawn() mingw implementation. Unfortunatly when running as a service without interactive desktop, gspawn() also requires another helper app. Added gspawn-win64-helper.exe and

[Qemu-devel] [PATCH v6 05/23] qmp: Fix reference-counting of qnull on empty output visit

2015-11-25 Thread Eric Blake
Commit 6c2f9a15 ensured that we would not return NULL when the caller used an output visitor but had nothing to visit. But in doing so, it added a FIXME about a reference count leak that could abort qemu in the (unlikely) case of SIZE_MAX such visits (more plausible on 32-bit). This fixes things

[Qemu-devel] [PATCH v6 06/23] qapi: Don't abuse stack to track qmp-output root

2015-11-25 Thread Eric Blake
The previous commit documented an inconsistency in how we are using the stack of qmp-output-visitor. Normally, pushing a single top-level object puts the object on the stack twice: once as the root, and once as the current container being appended to; but popping that struct only pops once.

[Qemu-devel] [PATCH v6 23/23] qapi: Change visit_type_FOO() to no longer return partial objects

2015-11-25 Thread Eric Blake
Returning a partial object on error is an invitation for a careless caller to leak memory. As no one outside the testsuite was actually relying on these semantics, it is cleaner to just document and guarantee that ALL visit_type_FOO() functions leave a safe value in *obj when an error is

[Qemu-devel] [PATCH v6 16/23] qapi: Track all failures between visit_start/stop

2015-11-25 Thread Eric Blake
Inside the generated code between visit_start_struct() and visit_end_struct(), we were blindly setting the error into the caller's errp parameter. But a future patch to split visit_end_struct() will require that we take action based on whether an error has occurred, which requires us to track all

[Qemu-devel] [PATCH v6 21/23] qapi: Simplify extra member error reporting in input visitors

2015-11-25 Thread Eric Blake
When reporting that an unvisited member remains at the end of an input visit for a struct, we were using g_hash_table_find() coupled with a callback function that always returns true, to locate an arbitrary member of the hash table. But if all we need is one entry, we can get that from a single

Re: [Qemu-devel] [PATCH v8] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-11-25 Thread Eric Blake
On 11/25/2015 05:24 PM, Programmingkid wrote: > Mac OS X can be picky when it comes to allowing the user > to use physical devices in QEMU. Most mounted volumes > appear to be off limits to QEMU. If an issue is detected, > a message is displayed showing the user how to unmount a > volume. > >

[Qemu-devel] [PULL for-2.5 0/6] qemu-ga patch queue for 2.5

2015-11-25 Thread Michael Roth
The following changes since commit 1a4dab849d5d06191ab5e5850f6b8bfcad8ceb47: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-11-25 14:47:06 +) are available in the git repository at: git://github.com/mdroth/qemu.git tags/qga-pull-2015-11-25-tag for

[Qemu-devel] [PULL for-2.5 1/6] makefile: fix qemu-ga make install for --disable-tools

2015-11-25 Thread Michael Roth
ab59e3e introduced a fix for `make install` on w32 that involved filtering out qemu-ga from $TOOLS install recipe so that we could append $(EXESUF) to it before attempting to install the binary via install-prog function. install-prog takes a list of binaries to install to a particular directory.

Re: [Qemu-devel] [PULL for-2.5 0/6] qemu-ga patch queue for 2.5

2015-11-25 Thread Michael Roth
Quoting Eric Blake (2015-11-25 17:47:00) > On 11/25/2015 03:47 PM, Michael Roth wrote: > > The following changes since commit 1a4dab849d5d06191ab5e5850f6b8bfcad8ceb47: > > > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into > > staging (2015-11-25 14:47:06 +) > > > >

[Qemu-devel] [PATCH v6 00/23] qapi visitor cleanups (post-introspection cleanups subset E)

2015-11-25 Thread Eric Blake
Pending prerequisites: + Markus' "typedefs: Put them back into alphabetical order" https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04417.html + Markus' qapi-next branch http://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qapi-next + My v13 subset D patches:

[Qemu-devel] [PATCH v6 03/23] qapi: Consolidate visitor integer callbacks

2015-11-25 Thread Eric Blake
Commit 4e27e819 introduced optional visitor callbacks for all sorts of int types, but except for type_uint64() and type_size(), none of them have ever been supplied (the generic implementation based on using type_[u]int64() then bounds-checking works just fine). In the interest of simplicity, it's

[Qemu-devel] [PATCH v6 15/23] qapi: Improve generated event use of qapi visitor

2015-11-25 Thread Eric Blake
All other successful clients of visit_start_struct() were paired with an unconditional visit_end_struct(); but the generated code for events was relying on qmp_output_visitor_cleanup() to work on an incomplete visit. Alter the code to guarantee that the struct is completed, which will make a

[Qemu-devel] [PATCH v6 10/23] vl: Improve use of qapi visitor

2015-11-25 Thread Eric Blake
Cache the visitor in a local variable instead of repeatedly calling the accessor. Pass NULL for the visit_start_struct() object (which matches the fact that we were already passing 0 for the size argument, because we aren't using the visit to allocate a qapi struct). Pass "object" for the struct

[Qemu-devel] [PATCH v6 12/23] balloon: Improve use of qapi visitor

2015-11-25 Thread Eric Blake
Rework the control flow of balloon_stats_get_all() to make it easier for a later patch to split visit_end_struct(). Also switch to the uint64 visitor to match the data type. Signed-off-by: Eric Blake --- v6: new patch, split from RFC on v5 7/46 ---

[Qemu-devel] [PATCH v6 17/23] qapi: Eliminate empty visit_type_FOO_fields

2015-11-25 Thread Eric Blake
For empty structs, such as the 'Abort' helper type used as part of the 'transaction' command, we were emitting a no-op visit_type_FOO_fields(). Optimize things to instead omit calls for empty structs. Generated code changes resemble: |-static void visit_type_Abort_fields(Visitor *v, Abort

[Qemu-devel] [PATCH v6 18/23] qapi: Canonicalize missing object to :empty

2015-11-25 Thread Eric Blake
Now that we elide unnecessary visits of empty types, we can start using the special ':empty' type in more places. By using the empty type as the base class of every explicit struct or union, and as the default data for any command or event, we can simplify later logic in

[Qemu-devel] [PATCH v6 11/23] ppc: Improve use of qapi visitors

2015-11-25 Thread Eric Blake
The implementation of prop_get_fdt() is taking some shortcuts with the qapi visitor functions. Document them, and use error_abort rather than NULL to ensure that any changes to the visitors do not break our use of shortcuts. Signed-off-by: Eric Blake --- v6: new patch, split

Re: [Qemu-devel] RFC: raspberry pi / pi2 / Windows-on-ARM support

2015-11-25 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Tuesday, 24 November 2015 22:04 > On Tue, Nov 24, 2015 at 4:00 PM, Andrew Baumann > wrote: > > I am working on refactoring the Pi support code as you suggested. I have > split the Pi SOCs into

[Qemu-devel] [PATCH for 2.5 1/1] qga: added another non-interactive gspawn() helper file.

2015-11-25 Thread Denis V. Lunev
From: Yuri Pudgorodskiy With previous commit we added gspawn-win64-helper-console.exe, required for gspawn() mingw implementation. Unfortunatly when running as a service without interactive desktop, gspawn() also requires another helper app. Added gspawn-win64-helper.exe and

  1   2   3   4   >