Re: [Qemu-devel] [RFC 23/29] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-08-04 Thread Peter Xu
On Thu, Aug 03, 2017 at 12:05:41PM +0100, Dr. David Alan Gilbert wrote: [...] > > +static int loadvm_postcopy_handle_resume(MigrationIncomingState *mis) > > +{ > > +/* > > + * This means source VM is ready to resume the postcopy migration. > > + * It's time to switch state and release

Re: [Qemu-devel] [RFC 23/29] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-08-04 Thread Peter Xu
On Fri, Aug 04, 2017 at 03:04:19PM +0800, Peter Xu wrote: > On Thu, Aug 03, 2017 at 12:05:41PM +0100, Dr. David Alan Gilbert wrote: > > [...] > > > > +static int loadvm_postcopy_handle_resume(MigrationIncomingState *mis) > > > +{ > > > +/* > > > + * This means source VM is ready to resume

Re: [Qemu-devel] [PATCH for-2.11 0/8] tcg/s390 improvments

2017-08-04 Thread Fam Zheng
On Thu, 08/03 22:50, no-re...@patchew.org wrote: > /var/tmp/patchew-tester-tmp-_vw086tj/src/accel/tcg/translate-all.c:2218:1: > fatal error: error writing to /tmp/cctUT4t6.s: No space left on device Sorry for the false positive. I've cleaned up the disk space and restarted the test. Fam

Re: [Qemu-devel] [RFC 24/29] migration: new message MIG_RP_MSG_RESUME_ACK

2017-08-04 Thread Peter Xu
On Thu, Aug 03, 2017 at 12:21:41PM +0100, Dr. David Alan Gilbert wrote: [...] > > +static int migrate_handle_rp_resume_ack(MigrationState *s, uint32_t value) > > +{ > > +trace_source_return_path_thread_resume_ack(value); > > + > > +/* > > + * Currently value will always be one. It can

Re: [Qemu-devel] [PATCH 0/2] scsi: enclosure support

2017-08-04 Thread Hannes Reinecke
On 08/04/2017 08:10 AM, Paolo Bonzini wrote: > >> On 08/03/2017 05:10 PM, Paolo Bonzini wrote: >>> On 03/08/2017 15:26, Hannes Reinecke wrote: Hi all, due to a customer issue I've added simple subenclosure support to the SCSI emulation. The patch simply converts the current inv

Re: [Qemu-devel] [RFC 25/29] migration: introduce SaveVMHandlers.resume_prepare

2017-08-04 Thread Peter Xu
On Thu, Aug 03, 2017 at 12:38:01PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > This is hook function to be called when a postcopy migration wants to > > resume from a failure. For each module, it should provide its own > > recovery logic before we switch to the

Re: [Qemu-devel] [RFC 26/29] migration: synchronize dirty bitmap for resume

2017-08-04 Thread Peter Xu
On Thu, Aug 03, 2017 at 12:56:31PM +0100, Dr. David Alan Gilbert wrote: [...] > > @@ -256,6 +257,8 @@ struct RAMState { > > RAMBlock *last_req_rb; > > /* Queue of outstanding page requests from the destination */ > > QemuMutex src_page_req_mutex; > > +/* Ramblock counts to sync

[Qemu-devel] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files

2017-08-04 Thread Greg Kurz
Hi Maxim, No I didn't... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1336794 Title: 9pfs does not honor open file handles on unlinked files Status in QEMU: In Progress Status in Ubuntu: Con

Re: [Qemu-devel] [RFC 23/29] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-08-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Fri, Aug 04, 2017 at 03:04:19PM +0800, Peter Xu wrote: > > On Thu, Aug 03, 2017 at 12:05:41PM +0100, Dr. David Alan Gilbert wrote: > > > > [...] > > > > > > +static int loadvm_postcopy_handle_resume(MigrationIncomingState *mis) > > > > +{ > > > > +/*

[Qemu-devel] [PATCHv2 1/4] scsi: Make LUN 0 a simple enclosure

2017-08-04 Thread Hannes Reinecke
Instead of having an 'invisible' LUN0 (in case LUN 0 is not connected) this patch maks LUN0 a enclosure service, exposing it to the OS. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-bus.c | 56 +- 1 file changed, 55 insertions(+), 1 deletion(

[Qemu-devel] [PATCHv2 2/4] scsi: use qemu_uuid to generate logical identifier for SES

2017-08-04 Thread Hannes Reinecke
The SES enclosure descriptor requires a logical identifier, so generate one using the qemu_uuid and the Qumranet OUI. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-bus.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index c89e82d

[Qemu-devel] [PATCHv2 0/4] scsi: enclosure support

2017-08-04 Thread Hannes Reinecke
Hi all, due to a customer issue I've added simple subenclosure support to the SCSI emulation. By setting the 'enclosure' option to a SCSI device we will now present an enclosure device on LUN0 (if LUN0 is otherwise unassigned) or setting the 'EncServ' bit in the inquiry data if LUN0 is assigned to

[Qemu-devel] [PATCHv2 4/4] scsi: Add 'enclosure' option for scsi devices

2017-08-04 Thread Hannes Reinecke
Make enclosure support optional with the 'enclosure' argument to the scsi device. Adding 'enclosure=on' as option to the SCSI device will present an enclosure service device on LUN0, either as a stand-alone LUN (in case LUN0 is not assigned) or by setting the EncServ bit int the inquiry data if LUN

[Qemu-devel] [PATCHv2 3/4] scsi: clarify sense codes for LUN0 emulation

2017-08-04 Thread Hannes Reinecke
The LUN0 emulation is just that, an emulation for a non-existing LUN0. So we should be returning LUN_NOT_SUPPORTED for any request coming from any other LUN. And we should be aborting unhandled commands with INVALID OPCODE, not LUN NOT SUPPORTED. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-b

[Qemu-devel] [Bug 1708617] [NEW] qemu2.9 meet a question using reconnect about ovs+dpdk

2017-08-04 Thread jk
Public bug reported: env: qemu-2.9 dpdk-16.11 ovs-2.6.1 host os:Linux compute 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux guest os is same with host 1. ovs service is normal 2. start 2 qemu vm, using vhostuser port as server taskset 0x3f qemu-system-x

Re: [Qemu-devel] [RFC 27/29] migration: setup ramstate for resume

2017-08-04 Thread Peter Xu
On Thu, Aug 03, 2017 at 01:37:04PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > After we updated the dirty bitmaps of ramblocks, we also need to update > > the critical fields in RAMState to make sure it is ready for a resume. > > > > Signed-off-by: Peter Xu >

Re: [Qemu-devel] [RFC 29/29] migration: reset migrate thread vars when resumed

2017-08-04 Thread Peter Xu
On Thu, Aug 03, 2017 at 02:54:35PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Firstly, MigThrError enumeration is introduced to describe the error in > > migration_detect_error() better. This gives the migration_thread() a > > chance to know whether a recovery

Re: [Qemu-devel] [PATCH] pc/acpi: Fix booting of macOS with Clover EFI bootloader

2017-08-04 Thread Igor Mammedov
On Fri, 4 Aug 2017 12:15:40 +0530 Dhiru Kholia wrote: > This was tested with macOS 10.12.5 and Clover r4114. > > Without this patch, the macOS boot process gets stuck at the Apple logo > without showing any progress bar. > > I have documented the process of running macOS on QEMU/KVM at, > > h

Re: [Qemu-devel] [RFC 28/29] migration: final handshake for the resume

2017-08-04 Thread Peter Xu
On Thu, Aug 03, 2017 at 02:47:44PM +0100, Dr. David Alan Gilbert wrote: [...] > > +static int postcopy_resume_handshake(MigrationState *s) > > +{ > > +qemu_mutex_lock(&s->resume_lock); > > + > > +qemu_savevm_send_postcopy_resume(s->to_dst_file); > > + > > +while (s->state == MIGRATION

[Qemu-devel] [PATCH 1/3] i386/kvm: use a switch statement for MSR detection

2017-08-04 Thread Ladi Prosek
Switch is easier on the eye and might lead to better codegen. Signed-off-by: Ladi Prosek --- target/i386/kvm.c | 76 +++ 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 6db7783..ed119c

[Qemu-devel] [PATCH 3/3] i386/kvm: advertise Hyper-V frequency MSRs

2017-08-04 Thread Ladi Prosek
As of kernel commit eb82feea59d6 ("KVM: hyperv: support HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY"), KVM supports two new MSRs which are required for nested Hyper-V to read timestamps with RDTSC + TSC page. This commit makes QEMU advertise the MSRs with CPUID.4003H:EAX[11] and CPU

[Qemu-devel] [PATCH 0/3] i386/kvm: advertise Hyper-V frequency MSRs

2017-08-04 Thread Ladi Prosek
This is the QEMU part of the changes required for nested Hyper-V to read timestamps with RDTSC + TSC page. Without exposing the frequency MSRs, Windows with the Hyper-V role enabled use the much slower HV_X64_MSR_TIME_REF_COUNT (0x4020) RDMSR to read timestamps. The new registers are exposed o

[Qemu-devel] [PATCH 2/3] i386/kvm: set tsc_khz before configuring Hyper-V CPUID

2017-08-04 Thread Ladi Prosek
Timing-related Hyper-V enlightenments will benefit from knowing the final tsc_khz value. This commit just moves the code in preparation for further changes. Signed-off-by: Ladi Prosek --- target/i386/kvm.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletion

Re: [Qemu-devel] [RFC 23/29] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-08-04 Thread Peter Xu
On Fri, Aug 04, 2017 at 09:30:01AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Fri, Aug 04, 2017 at 03:04:19PM +0800, Peter Xu wrote: > > > On Thu, Aug 03, 2017 at 12:05:41PM +0100, Dr. David Alan Gilbert wrote: > > > > > > [...] > > > > > > > > +static int

Re: [Qemu-devel] [RFC 12/29] migration: allow dst vm pause on postcopy

2017-08-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Aug 03, 2017 at 03:03:57PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Tue, Aug 01, 2017 at 10:47:16AM +0100, Dr. David Alan Gilbert wrote: > > > > * Peter Xu (pet...@redhat.com) wrote: > > > > > > [...] >

Re: [Qemu-devel] [RFC 12/29] migration: allow dst vm pause on postcopy

2017-08-04 Thread Peter Xu
On Fri, Aug 04, 2017 at 10:33:19AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Thu, Aug 03, 2017 at 03:03:57PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > On Tue, Aug 01, 2017 at 10:47:16AM +0100, Dr. David Alan Gi

[Qemu-devel] [PATCH v9 1/3] ACPI: add APEI/HEST/CPER structures and macros

2017-08-04 Thread Dongjiu Geng
(1) Add related APEI/HEST table structures and macros, these definition refer to ACPI 6.1 and UEFI 2.6 spec. (2) Add generic error status block and CPER memory section definition, user space only handle memory section errors. Signed-off-by: Dongjiu Geng --- thanks Michael and Laszlo's re

[Qemu-devel] [PATCH v9 3/3] ACPI: build and enable APEI GHES in the Makefile and configuration

2017-08-04 Thread Dongjiu Geng
Add CONFIG_ACPI_APEI configuration in the Makefile and enable it in the arm-softmmu.mak Signed-off-by: Dongjiu Geng --- thanks a lot Michael and Laszlo's review and comments: change since v5: (1) no change change since v4: (1) fix email threading in this series is incorrect issue change since

[Qemu-devel] [PATCH v9 2/3] ACPI: Add APEI GHES Table Generation support

2017-08-04 Thread Dongjiu Geng
This implements APEI GHES Table by passing the error CPER info to the guest via a fw_cfg_blob. After a CPER info is recorded, an SEA(Synchronous External Abort)/SEI(SError Interrupt) exception will be injected into the guest OS. Below is the table layout, the max number of error soure is 11, which

Re: [Qemu-devel] [PATCH 10/15] target/arm: Don't use cpsr_write/cpsr_read to transfer M profile XPSR

2017-08-04 Thread Peter Maydell
On 3 August 2017 at 23:13, Richard Henderson wrote: > On 08/02/2017 09:43 AM, Peter Maydell wrote: >> +if (val & XPSR_EXCP) { >> +/* This is a CPSR format value from an older QEMU. (We can tell >> + * because values transferred in XPSR format always have zero >> +

Re: [Qemu-devel] [RFC 22/29] migration: new message MIG_RP_MSG_RECV_BITMAP

2017-08-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Aug 03, 2017 at 11:50:22AM +0100, Dr. David Alan Gilbert wrote: > > > +/* Size of the bitmap, in bytes */ > > > +size = (block->max_length >> TARGET_PAGE_BITS) / 8; > > > +qemu_put_be64(file, size); > > > +qemu_put_buffer(file, (const

[Qemu-devel] [PATCH v9 0/3] Generate APEI GHES table and dynamically record CPER

2017-08-04 Thread Dongjiu Geng
In the armv8 platform, the mainly hardware error source are ARMv8 SEA/SEI/GSIV. For the ARMv8 SEA/SEI, the KVM or host kernel will signal SIGBUS or use other interface to notify user space, such as Qemu. After Qemu gets the notification, it will record the CPER and inject the SEA/SEI to KVM. this s

Re: [Qemu-devel] [RFC 28/29] migration: final handshake for the resume

2017-08-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Aug 03, 2017 at 02:47:44PM +0100, Dr. David Alan Gilbert wrote: > > [...] > > > > +static int postcopy_resume_handshake(MigrationState *s) > > > +{ > > > +qemu_mutex_lock(&s->resume_lock); > > > + > > > +qemu_savevm_send_postcopy_resume(s->t

Re: [Qemu-devel] [RFC 29/29] migration: reset migrate thread vars when resumed

2017-08-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Aug 03, 2017 at 02:54:35PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > Firstly, MigThrError enumeration is introduced to describe the error in > > > migration_detect_error() better. This gives the migration_thr

Re: [Qemu-devel] [PATCH] vl.c/exit: pause cpus before closing block devices

2017-08-04 Thread Stefan Hajnoczi
On Thu, Aug 3, 2017 at 11:36 PM, Paolo Bonzini wrote: > - Original Message - >> From: "Dr. David Alan Gilbert" >> To: "Alberto Garcia" >> Cc: qemu-devel@nongnu.org, pbonz...@redhat.com, js...@redhat.com >> Sent: Thursday, August 3, 2017 6:45:17 PM >> Subject: Re: [Qemu-devel] [PATCH] vl.

Re: [Qemu-devel] [PATCH v3 1/9] kvm: remove hard dependency on pci

2017-08-04 Thread Cornelia Huck
On Wed, 26 Jul 2017 10:26:23 +0200 Cornelia Huck wrote: > On Wed, 26 Jul 2017 08:52:44 +0200 > Thomas Huth wrote: > > Since this missed the 2.10 freeze anyway and we've got some more time to > > discuss it: I still think it would be much cleaner to move the functions > > from kvm-all.c that use

Re: [Qemu-devel] [PATCH] vl.c/exit: pause cpus before closing block devices

2017-08-04 Thread Stefan Hajnoczi
On Mon, Jul 17, 2017 at 5:43 PM, John Snow wrote: > On 07/17/2017 06:26 AM, Dr. David Alan Gilbert wrote: >> * Stefan Hajnoczi (stefa...@gmail.com) wrote: >>> On Thu, Jul 13, 2017 at 08:01:16PM +0100, Dr. David Alan Gilbert (git) >>> wrote: From: "Dr. David Alan Gilbert" There's a

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2017-08-04 Thread Peter Lieven
Am 29.10.2013 um 10:59 schrieb Paolo Bonzini: > Il 29/10/2013 10:48, Peter Lieven ha scritto: >> Hi all, >> >> this question might seem a bit weird, but does anyone see a good way to >> avoid >> that Windows is able to boot inside qemu? >> >> We have defined several profiles for different operation

[Qemu-devel] [PATCH v10 3/3] ACPI: build and enable APEI GHES in the Makefile and configuration

2017-08-04 Thread Dongjiu Geng
Add CONFIG_ACPI_APEI configuration in the Makefile and enable it in the arm-softmmu.mak Signed-off-by: Dongjiu Geng --- thanks a lot Michael and Laszlo's review and comments: change since v5: (1) no change change since v4: (1) fix email threading in this series is incorrect issue change since

[Qemu-devel] [PATCH v10 2/3] ACPI: Add APEI GHES Table Generation support

2017-08-04 Thread Dongjiu Geng
This implements APEI GHES Table by passing the error CPER info to the guest via a fw_cfg_blob. After a CPER info is recorded, an SEA(Synchronous External Abort)/SEI(SError Interrupt) exception will be injected into the guest OS. Below is the table layout, the max number of error soure is 11, which

[Qemu-devel] [PATCH v10 0/3] Generate APEI GHES table and dynamically record CPER

2017-08-04 Thread Dongjiu Geng
In the armv8 platform, the mainly hardware error source are ARMv8 SEA/SEI/GSIV. For the ARMv8 SEA/SEI, the KVM or host kernel will signal SIGBUS or use other interface to notify user space, such as Qemu. After Qemu gets the notification, it will record the CPER and inject the SEA/SEI to KVM. this s

[Qemu-devel] [PATCH v10 1/3] ACPI: add APEI/HEST/CPER structures and macros

2017-08-04 Thread Dongjiu Geng
(1) Add related APEI/HEST table structures and macros, these definition refer to ACPI 6.1 and UEFI 2.6 spec. (2) Add generic error status block and CPER memory section definition, user space only handle memory section errors. Signed-off-by: Dongjiu Geng --- thanks Michael and Laszlo's re

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2017-08-04 Thread Paolo Bonzini
On 04/08/2017 11:58, Peter Lieven wrote: > Am 29.10.2013 um 10:59 schrieb Paolo Bonzini: >> Il 29/10/2013 10:48, Peter Lieven ha scritto: >>> Hi all, >>> >>> this question might seem a bit weird, but does anyone see a good way to >>> avoid >>> that Windows is able to boot inside qemu? >>> >>> We ha

Re: [Qemu-devel] [PATCH for-2.10 2/5] block: Allow reopen rw without BDRV_O_ALLOW_RDWR

2017-08-04 Thread Kevin Wolf
Am 04.08.2017 um 03:49 hat Eric Blake geschrieben: > On 08/03/2017 10:21 AM, Eric Blake wrote: > > On 08/03/2017 10:02 AM, Kevin Wolf wrote: > >> BDRV_O_ALLOW_RDWR is a flag that tells whether qemu can internally > >> reopen a node read-write temporarily because the user requested > >> read-write f

[Qemu-devel] [PATCH v2 5/6] hw/block: Use errp directly rather than local_err

2017-08-04 Thread Mao Zhongyi
Pass the error message to errp directly rather than the local variable local_err and propagate it to errp via error_propagate(). Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz Cc: Keith Busch Cc: Stefan Hajnoczi Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Markus Armbruster

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2017-08-04 Thread Peter Lieven
Am 04.08.2017 um 12:23 schrieb Paolo Bonzini: > On 04/08/2017 11:58, Peter Lieven wrote: >> Am 29.10.2013 um 10:59 schrieb Paolo Bonzini: >>> Il 29/10/2013 10:48, Peter Lieven ha scritto: Hi all, this question might seem a bit weird, but does anyone see a good way to avoid

[Qemu-devel] [PATCH v2 4/6] hw/block: Fix the return type

2017-08-04 Thread Mao Zhongyi
When the function no success value to transmit, it usually make the function return void. It has turned out not to be a success, because it means that the extra local_err variable and error_propagate() will be needed. It leads to cumbersome code, therefore, transmit success/ failure in the return v

[Qemu-devel] [PATCH v2 2/6] hw/block/fdc: Convert to realize

2017-08-04 Thread Mao Zhongyi
Convert floppy_drive_init() to realize and rename it to floppy_drive_realize(). Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz Cc: Markus Armbruster Signed-off-by: Mao Zhongyi --- hw/block/fdc.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --gi

[Qemu-devel] [PATCH v2 1/6] hw/ide: Convert DeviceClass init to realize

2017-08-04 Thread Mao Zhongyi
Replace init with realize in IDEDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Cc: John Snow Cc: Markus Armbruster Signed-off-by: Mao Zhongyi --- hw/ide/core.c | 7 ++-- hw/ide/qdev.c

[Qemu-devel] [PATCH v2 0/6] Convert to realize and improve error handling

2017-08-04 Thread Mao Zhongyi
This series mainly implements the conversions of ide, floppy and nvme device to realize. Add some error handling messages and remove the local variable local_err, use errp to propagate the error directly. Also fix the unusual function name. v2: -use bool as the return type instead of int. [Marku

[Qemu-devel] [PATCH v2 3/6] hw/block/nvme: Convert to realize

2017-08-04 Thread Mao Zhongyi
Convert nvme_init() to realize and rename it to nvme_realize(). Cc: John Snow Cc: Keith Busch Cc: Kevin Wolf Cc: Max Reitz Cc: Markus Armbruster Signed-off-by: Mao Zhongyi --- hw/block/nvme.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/block/n

Re: [Qemu-devel] [PATCH for-2.11 02/23] tcg: Rearrange ldst label tracking

2017-08-04 Thread Paolo Bonzini
On 04/08/2017 07:44, Richard Henderson wrote: > Dispense with TCGBackendData, as it has never been used for more than > holding a single pointer. Use a define in the cpu/tcg-target.h to > signal requirement for TCGLabelQemuLdst, so that we can drop the no-op > tcg-be-null.h stubs. Rename tcg-be-l

[Qemu-devel] [PATCH v2 6/6] dev-storage: Fix the unusual function name

2017-08-04 Thread Mao Zhongyi
The function name of usb_msd_{realize,unrealize}_*, usb_msd_class_initfn_* are unusual. Rename it to usb_msd_*_{realize,unrealize}, usb_msd_class_*_initfn. Cc: Gerd Hoffmann Signed-off-by: Mao Zhongyi --- hw/usb/dev-storage.c | 20 ++-- 1 file changed, 10 insertions(+), 10 dele

Re: [Qemu-devel] [PATCH] pc/acpi: Fix booting of macOS with Clover EFI bootloader

2017-08-04 Thread Dhiru Kholia
On Fri, Aug 4, 2017 at 2:35 PM, Igor Mammedov wrote: > On Fri, 4 Aug 2017 12:15:40 +0530 > Dhiru Kholia wrote: > >> This was tested with macOS 10.12.5 and Clover r4114. >> >> Without this patch, the macOS boot process gets stuck at the Apple logo >> without showing any progress bar. >> >> I have

Re: [Qemu-devel] [PATCHv2 4/4] scsi: Add 'enclosure' option for scsi devices

2017-08-04 Thread Paolo Bonzini
On 04/08/2017 10:36, Hannes Reinecke wrote: > Make enclosure support optional with the 'enclosure' argument to > the scsi device. > Adding 'enclosure=on' as option to the SCSI device will present > an enclosure service device on LUN0, either as a stand-alone > LUN (in case LUN0 is not assigned) or

Re: [Qemu-devel] [PATCHv2 4/4] scsi: Add 'enclosure' option for scsi devices

2017-08-04 Thread Hannes Reinecke
On 08/04/2017 12:48 PM, Paolo Bonzini wrote: > On 04/08/2017 10:36, Hannes Reinecke wrote: >> Make enclosure support optional with the 'enclosure' argument to >> the scsi device. >> Adding 'enclosure=on' as option to the SCSI device will present >> an enclosure service device on LUN0, either as a s

Re: [Qemu-devel] [PATCH v2 4/6] hw/block: Fix the return type

2017-08-04 Thread Stefan Hajnoczi
On Fri, Aug 04, 2017 at 06:26:41PM +0800, Mao Zhongyi wrote: > When the function no success value to transmit, it usually make the > function return void. It has turned out not to be a success, because > it means that the extra local_err variable and error_propagate() will > be needed. It leads to

Re: [Qemu-devel] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?

2017-08-04 Thread Denis V. Lunev
On 08/04/2017 03:16 PM, Markus Armbruster wrote: > Denis, you added this in commit d50d822: > > #ifdef CONFIG_FALLOCATE > if (s->has_fallocate && aiocb->aio_offset >= bdrv_getlength(aiocb->bs)) { > int ret = do_fallocate(s->fd, 0, aiocb->aio_offset, > aiocb->aio_nbytes); > if (

Re: [Qemu-devel] Cleaning up handling of CPU exceptions accessing non-existent memory/devices

2017-08-04 Thread Peter Maydell
On 1 August 2017 at 11:50, Peter Maydell wrote: > My proposal is that we should define a new QOM CPU hook: > void (*do_transaction_failed)(CPUState *cpu, hwaddr physaddr, vaddr addr, > unsigned size, MMUAccessType access_type, > Mem

Re: [Qemu-devel] Is the use of bdrv_getlength() in parallels.c kosher?

2017-08-04 Thread Denis V. Lunev
On 08/04/2017 03:31 PM, Markus Armbruster wrote: > Same question for allocate_clusters() in parallels.c, commit 5a41e1f, > modified in commit ddd2ef2: > > if (s->data_end + space > bdrv_getlength(bs->file->bs) >> > BDRV_SECTOR_BITS) { > > bdrv_getlength() can fail. Does it do the right thing

Re: [Qemu-devel] [PATCH for 2.10] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-08-04 Thread Daniel P. Berrange
On Fri, Aug 04, 2017 at 01:48:01PM +0100, Stefan Hajnoczi wrote: > On Fri, Aug 04, 2017 at 11:51:36AM +0100, Daniel P. Berrange wrote: > > Using 16KB bounce buffers creates a significant performance > > penalty for I/O to encrypted volumes on storage with high > > I/O latency (rotating rust & netwo

Re: [Qemu-devel] [PATCH] block: move trace probes into bdrv_co_preadv|pwritev

2017-08-04 Thread Stefan Hajnoczi
On Fri, Aug 04, 2017 at 11:50:36AM +0100, Daniel P. Berrange wrote: > There are trace probes in bdrv_co_readv|writev, however, the > block drivers are being gradually moved over to using the > bdrv_co_preadv|pwritev functions instead. As a result some > block drivers miss the current probes. Move t

Re: [Qemu-devel] [PATCH v2 5/6] hw/block: Use errp directly rather than local_err

2017-08-04 Thread Stefan Hajnoczi
On Fri, Aug 04, 2017 at 06:26:42PM +0800, Mao Zhongyi wrote: > Pass the error message to errp directly rather than the local > variable local_err and propagate it to errp via error_propagate(). > > Cc: John Snow > Cc: Kevin Wolf > Cc: Max Reitz > Cc: Keith Busch > Cc: Stefan Hajnoczi > Cc: "M

Re: [Qemu-devel] [PULL 0/8] target-mips queue

2017-08-04 Thread Peter Maydell
On 3 August 2017 at 15:45, Yongbok Kim wrote: > The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8: > > Update version for v2.10.0-rc1 release (2017-08-02 16:36:32 +0100) > > are available in the git repository at: > > git://github.com/yongbok/upstream-qemu.git tags/mi

Re: [Qemu-devel] [PATCH v4 7/9] s390x/pci: fence off instructions for non-pci

2017-08-04 Thread David Hildenbrand
On 04.08.2017 13:29, Cornelia Huck wrote: > If a guest running on a machine without zpci issues a pci instruction, > throw them an exception. > > Reviewed-by: Thomas Huth > Signed-off-by: Cornelia Huck > --- > target/s390x/kvm.c | 54 > +- >

Re: [Qemu-devel] [PATCH v4 5/9] s390x/ccw: create s390 phb conditionally

2017-08-04 Thread David Hildenbrand
On 04.08.2017 13:29, Cornelia Huck wrote: > Don't create the s390 pci host bridge if we do not provide the zpci > facility. > > Reviewed-by: Thomas Huth > Acked-by: Christian Borntraeger > Signed-off-by: Cornelia Huck This works, because s390_init_cpus(machine) (which sets up features) is call

Re: [Qemu-devel] [PATCH] block: document semanatics of bdrv_co_preadv|pwritev

2017-08-04 Thread Stefan Hajnoczi
On Fri, Aug 04, 2017 at 11:50:59AM +0100, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > include/block/block_int.h | 29 + > 1 file changed, 29 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH v4 8/9] s390x/kvm: msi route fixup for non-pci

2017-08-04 Thread David Hildenbrand
On 04.08.2017 13:29, Cornelia Huck wrote: > If we don't provide pci, we cannot have a pci device for which we > have to translate to adapter routes: just return -ENODEV. > > Signed-off-by: Cornelia Huck > --- > target/s390x/kvm.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/ta

[Qemu-devel] Is the use of bdrv_getlength() in quorum_co_flush() kosher?

2017-08-04 Thread Markus Armbruster
Have a look at quorum_co_flush(): quorum_report_bad(QUORUM_OP_TYPE_FLUSH, 0, bdrv_getlength(s->children[i]->bs), s->children[i]->bs->node_name, result); bdrv_getlength() can fail. Does it do the right thing then?

Re: [Qemu-devel] [PATCH for 2.10] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-08-04 Thread Stefan Hajnoczi
On Fri, Aug 04, 2017 at 11:51:36AM +0100, Daniel P. Berrange wrote: > Using 16KB bounce buffers creates a significant performance > penalty for I/O to encrypted volumes on storage with high > I/O latency (rotating rust & network drives), because it > triggers lots of fairly small I/O operations. >

[Qemu-devel] Is the use of bdrv_getlength() in vhdx*.c kosher?

2017-08-04 Thread Markus Armbruster
bdrv_getlength() can fail. There are several calls in vhdx*.c that don't seem to check. Bug or not?

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Clarify about relative backing file options

2017-08-04 Thread Eric Blake
On 08/04/2017 08:55 AM, Fam Zheng wrote: > It's not too surprising when a user specifies the backing file relative > to the current working directory instead of the top layer image. This > causes error when they differ. Though the error message has enough > information to infer the fact about the m

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10] block: move trace probes into bdrv_co_preadv|pwritev

2017-08-04 Thread Eric Blake
On 08/04/2017 05:50 AM, Daniel P. Berrange wrote: > There are trace probes in bdrv_co_readv|writev, however, the > block drivers are being gradually moved over to using the > bdrv_co_preadv|pwritev functions instead. As a result some > block drivers miss the current probes. Move the probes > into b

[Qemu-devel] [PATCH v4 9/9] s390x: refine pci dependencies

2017-08-04 Thread Cornelia Huck
VIRTIO_PCI should properly depend on CONFIG_PCI. With this change, we can switch off pci for s390x by removing 'CONFIG_PCI=y' from the default config. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- default-configs/s390x-softmmu.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [Qemu-devel] [Qemu-block] [PATCH] block: document semanatics of bdrv_co_preadv|pwritev

2017-08-04 Thread Eric Blake
On 08/04/2017 05:50 AM, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > include/block/block_int.h | 29 + > 1 file changed, 29 insertions(+) > > diff --git a/include/block/block_int.h b/include/block/block_int.h > index d4f4ea7584..deb81a58bd 100

Re: [Qemu-devel] [PATCH v3] block: document semanatics of bdrv_co_preadv|pwritev

2017-08-04 Thread Eric Blake
On 08/04/2017 09:08 AM, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > > - Clarify that @bytes matches @qiov total size (Kevin) > > include/block/block_int.h | 31 +++ > 1 file changed, 31 insertions(+) [looks like the nongnu.org infrastructu

Re: [Qemu-devel] [PATCH v3 1/7] block: move ThrottleGroup membership to ThrottleGroupMember

2017-08-04 Thread Alberto Garcia
On Mon 31 Jul 2017 11:54:37 AM CEST, Manos Pitsidianakis wrote: > This commit eliminates the 1:1 relationship between BlockBackend and > throttle group state. Users will be able to create multiple throttle > nodes, each with its own throttle group state, in the future. The > throttle group state

Re: [Qemu-devel] [PATCH v4 9/9] s390x: refine pci dependencies

2017-08-04 Thread David Hildenbrand
On 04.08.2017 13:29, Cornelia Huck wrote: > VIRTIO_PCI should properly depend on CONFIG_PCI. > With this change, we can switch off pci for s390x by removing > 'CONFIG_PCI=y' from the default config. > > Reviewed-by: Thomas Huth > Signed-off-by: Cornelia Huck > --- > default-configs/s390x-softmm

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Clarify about relative backing file options

2017-08-04 Thread Fam Zheng
On Fri, 08/04 09:23, Eric Blake wrote: > > +If a relative path name is given, the backing file is looked up against > > +@var{filename}, rather than the current working directory. > > Maybe better as: > the backing file is looked up relative to the directory containing > @var{filename} Sounds goo

[Qemu-devel] [PATCH v4 0/9] s390x: zPCI detangling

2017-08-04 Thread Cornelia Huck
Next version, not so many changes from v3. As you might have guessed, the goals are still the same: - Being able to disable PCI support in a build completely. - Properly fencing off PCI if the relevant facility bit is not provided. Changes v3->v4: - introduce pci_available boolean - use pci_avail

[Qemu-devel] [PATCH v6 0/3] Generate APEI GHES table and dynamically record CPER

2017-08-04 Thread Programmingkid
> On Aug 4, 2017, at 1:22 AM, qemu-devel-requ...@nongnu.org wrote: > > Date: Fri, 4 Aug 2017 12:37:52 +0800 > From: Dongjiu Geng > To: , , , > , , > , > Cc: , , > > Subject: [Qemu-devel] [PATCH v6 0/3] Generate APEI GHES table and > dynamically record CPER > Message-ID:

[Qemu-devel] [PATCH v4 3/9] s390x: chsc nt2 events are pci-only

2017-08-04 Thread Cornelia Huck
The nt2 event class is pci-only - don't look for events if pci is not in the active cpu model. Signed-off-by: Cornelia Huck --- hw/s390x/s390-pci-bus.c | 4 ++-- hw/s390x/s390-pci-bus.h | 4 ++-- hw/s390x/s390-pci-stub.c | 4 ++-- target/s390x/ioinst.c| 16 4 files chan

[Qemu-devel] [PATCH v2] qemu-img: Clarify about relative backing file options

2017-08-04 Thread Fam Zheng
It's not too surprising when a user specifies the backing file relative to the current working directory instead of the top layer image. This causes error when they differ. Though the error message has enough information to infer the fact about the misunderstanding, it is better if we document this

Re: [Qemu-devel] [PATCHv2 3/4] scsi: clarify sense codes for LUN0 emulation

2017-08-04 Thread Paolo Bonzini
On 04/08/2017 10:36, Hannes Reinecke wrote: > The LUN0 emulation is just that, an emulation for a non-existing > LUN0. So we should be returning LUN_NOT_SUPPORTED for any request > coming from any other LUN. > And we should be aborting unhandled commands with INVALID OPCODE, > not LUN NOT SUPPORTED

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2017-08-04 Thread Paolo Bonzini
On 04/08/2017 12:27, Peter Lieven wrote: > Am 04.08.2017 um 12:23 schrieb Paolo Bonzini: >> On 04/08/2017 11:58, Peter Lieven wrote: >>> Am 29.10.2013 um 10:59 schrieb Paolo Bonzini: Il 29/10/2013 10:48, Peter Lieven ha scritto: > Hi all, > > this question might seem a bit weird, b

[Qemu-devel] [PATCH] block: document semanatics of bdrv_co_preadv|pwritev

2017-08-04 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- include/block/block_int.h | 29 + 1 file changed, 29 insertions(+) diff --git a/include/block/block_int.h b/include/block/block_int.h index d4f4ea7584..deb81a58bd 100644 --- a/include/block/block_int.h +++ b/include/block/block_in

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2017-08-04 Thread Peter Lieven
Am 04.08.2017 um 12:43 schrieb Paolo Bonzini: > On 04/08/2017 12:27, Peter Lieven wrote: >> Am 04.08.2017 um 12:23 schrieb Paolo Bonzini: >>> On 04/08/2017 11:58, Peter Lieven wrote: Am 29.10.2013 um 10:59 schrieb Paolo Bonzini: > Il 29/10/2013 10:48, Peter Lieven ha scritto: >> Hi all

[Qemu-devel] [PATCH v4 4/9] s390x/pci: do not advertise pci on non-pci builds

2017-08-04 Thread Cornelia Huck
Only set the zpci feature bit on builds that actually support pci. Signed-off-by: Cornelia Huck --- target/s390x/kvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index c4c5791d27..bc62bba5b7 100644 --- a/target/s390x/kvm.c +++ b

Re: [Qemu-devel] [PULL 0/2] slirp updates

2017-08-04 Thread Peter Maydell
On 2 August 2017 at 23:28, Samuel Thibault wrote: > warning: redirection vers https://people.debian.org/~sthibault/qemu.git/ > The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8: > > Update version for v2.10.0-rc1 release (2017-08-02 16:36:32 +0100) > > are available in

[Qemu-devel] [PATCH] block: move trace probes into bdrv_co_preadv|pwritev

2017-08-04 Thread Daniel P. Berrange
There are trace probes in bdrv_co_readv|writev, however, the block drivers are being gradually moved over to using the bdrv_co_preadv|pwritev functions instead. As a result some block drivers miss the current probes. Move the probes into bdrv_co_preadv|pwritev instead, so that they are triggered by

Re: [Qemu-devel] [PATCH v4 4/9] s390x/pci: do not advertise pci on non-pci builds

2017-08-04 Thread David Hildenbrand
On 04.08.2017 13:29, Cornelia Huck wrote: > Only set the zpci feature bit on builds that actually support pci. > > Signed-off-by: Cornelia Huck > --- > target/s390x/kvm.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c > index

Re: [Qemu-devel] [PATCH for-2.10 2/5] block: Allow reopen rw without BDRV_O_ALLOW_RDWR

2017-08-04 Thread Eric Blake
On 08/04/2017 05:20 AM, Kevin Wolf wrote: >>> >>> Hmm, I wonder. https://bugzilla.redhat.com/show_bug.cgi?id=1465320 >>> details a failure when starting qemu with a read-write NBD disk, then >>> taking several snapshots (nbd <- snap1 <- snap2 <- snap3), then where >>> intermediate commit (snap2 in

Re: [Qemu-devel] [PULL] virtio: fix for rc2

2017-08-04 Thread Peter Maydell
On 3 August 2017 at 15:07, Michael S. Tsirkin wrote: > The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8: > > Update version for v2.10.0-rc1 release (2017-08-02 16:36:32 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/mst/q

[Qemu-devel] [PATCH for 2.10] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-08-04 Thread Daniel P. Berrange
Using 16KB bounce buffers creates a significant performance penalty for I/O to encrypted volumes on storage with high I/O latency (rotating rust & network drives), because it triggers lots of fairly small I/O operations. On tests with rotating rust, and cache=none|directsync, write speed increased

[Qemu-devel] [PATCH for 2.11] vga/migration: Update memory map in post_load

2017-08-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" After migration the chain4 alias mapping added by 80763888 (in 2011) might be missing, since there's no call to vga_update_memory_access in the post_load after the registers are updated. Add it back. Signed-off-by: Dr. David Alan Gilbert --- hw/display/vga.c | 1

Re: [Qemu-devel] Is the use of bdrv_getlength() in quorum_co_flush() kosher?

2017-08-04 Thread Alberto Garcia
On Fri 04 Aug 2017 02:48:03 PM CEST, Markus Armbruster wrote: > Have a look at quorum_co_flush(): > > quorum_report_bad(QUORUM_OP_TYPE_FLUSH, 0, > bdrv_getlength(s->children[i]->bs), > s->children[i]->bs->node_name, result); >

Re: [Qemu-devel] [PATCH v4 00/22] Clean up around qmp() and hmp()

2017-08-04 Thread Eric Blake
On 08/03/2017 08:54 PM, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. When will patchew have a syntax for stating dependencies? (Of

Re: [Qemu-devel] [PATCH 1/3] i386/kvm: use a switch statement for MSR detection

2017-08-04 Thread David Hildenbrand
On 04.08.2017 11:14, Ladi Prosek wrote: > Switch is easier on the eye and might lead to better codegen. > > Signed-off-by: Ladi Prosek Reviewed-by: David Hildenbrand -- Thanks, David

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: advertise Hyper-V frequency MSRs

2017-08-04 Thread David Hildenbrand
On 04.08.2017 11:14, Ladi Prosek wrote: > As of kernel commit eb82feea59d6 ("KVM: hyperv: support > HV_X64_MSR_TSC_FREQUENCY > and HV_X64_MSR_APIC_FREQUENCY"), KVM supports two new MSRs which are required > for nested Hyper-V to read timestamps with RDTSC + TSC page. > > This commit makes QEMU ad

[Qemu-devel] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?

2017-08-04 Thread Markus Armbruster
Denis, you added this in commit d50d822: #ifdef CONFIG_FALLOCATE if (s->has_fallocate && aiocb->aio_offset >= bdrv_getlength(aiocb->bs)) { int ret = do_fallocate(s->fd, 0, aiocb->aio_offset, aiocb->aio_nbytes); if (ret == 0 || ret != -ENOTSUP) { return ret;

  1   2   3   >