Re: [Qemu-devel] [Xen-devel] [PATCH v1] xenpt: Properly handle 64-bit bar with more than 4G size

2015-08-12 Thread Jan Beulich
>>> On 05.08.15 at 04:02, wrote: > @@ -491,8 +474,9 @@ static int xen_pt_bar_reg_write(XenPCIPassthroughState > *s, XenPTReg *cfg_entry, > bar_ro_mask = XEN_PT_BAR_IO_RO_MASK | (r_size - 1); > break; > case XEN_PT_BAR_FLAG_UPPER: > +r = &d->io_regions[index-1]; Per

Re: [Qemu-devel] [Xen-devel] [PATCH v1] xenpt: Properly handle 64-bit bar with more than 4G size

2015-08-12 Thread Wu, Feng
> -Original Message- > From: qemu-devel-bounces+feng.wu=intel@nongnu.org > [mailto:qemu-devel-bounces+feng.wu=intel@nongnu.org] On Behalf Of > Jan Beulich > Sent: Wednesday, August 12, 2015 2:59 PM > To: Wu, Feng > Cc: xen-de...@lists.xensource.com; qemu-devel@nongnu.org; > stefan

Re: [Qemu-devel] [PATCH v6 0/2] vhost user: Add live migration

2015-08-12 Thread Michael S. Tsirkin
On Thu, Aug 06, 2015 at 10:45:07AM +0200, Thibaut Collet wrote: > v5->v6 > 1. First patch: remove a warning log > 2. Second patch: rename some functions to be more explicit on the purpose of >these functions. > > The first patch provides limited live migration: > - guest without GUEST_ANNOUNCE

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread alvise rigo
I think that tlb_flush_entry is not enough, since in theory another vCPU could have a different TLB address referring the same phys address. alvise On Tue, Aug 11, 2015 at 6:32 PM, Paolo Bonzini wrote: > > > On 11/08/2015 18:11, alvise rigo wrote: >>> > Why flush the entire cache (I understand y

Re: [Qemu-devel] [PATCH for-2.5 14/30] m68k: allow adda/suba to add/sub word

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- target-m68k/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH for-2.5 0/4] vhost: cleanups and switching to sorted memory map

2015-08-12 Thread Michael S. Tsirkin
On Tue, Jul 28, 2015 at 04:52:49PM +0200, Igor Mammedov wrote: > making memory map a sorted array helps to simplify > and speed up lookup/insertion and deletion ops on it. > It also makes insertion/deteletion code easier to read. I'm a bit confused by all the vhost patches you sent. Is this series

Re: [Qemu-devel] [PATCH v2 1/6] hw/pci: Use pow2ceil() rather than hand-calculation

2015-08-12 Thread Michael S. Tsirkin
On Fri, Jul 24, 2015 at 01:33:07PM +0100, Peter Maydell wrote: > A couple of places in hw/pci use an inline calculation to round a > size up to the next largest power of 2. We have a utility routine > for this, so use it. > > (The behaviour of the old code is different if the size value > is 0 --

Re: [Qemu-devel] [PATCH v2 2/6] hw/virtio/virtio-pci: Use pow2ceil() rather than hand-calculation

2015-08-12 Thread Michael S. Tsirkin
On Fri, Jul 24, 2015 at 01:33:08PM +0100, Peter Maydell wrote: > Use the utility function pow2ceil() for rounding up to the next > largest power of 2, rather than inline calculation. > > Signed-off-by: Peter Maydell Reviewed-by: Michael S. Tsirkin > --- > hw/virtio/virtio-pci.c | 4 +--- > 1

Re: [Qemu-devel] [PATCH for-2.5 15/30] m68k: add more modes to movem

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: +opsize = (insn & 0x40) != 0 ? OS_LONG : OS_WORD; +incr = opsize_bytes(opsize); +if (!is_load && (insn & 070) == 040) { +for (i = 15; i >= 0; i--, mask >>= 1) { This has got to be wrong. Just because it's pre-decrement doesn't m

Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread gchen gchen
On 2015年08月12日 14:45, Richard Henderson wrote: > On 08/11/2015 11:03 PM, gchen gchen wrote: >> Under Alpha host, for ubuntu12.04.5 i386 guest, it will cause failure: >> "Invalid ELF image for this architecture". >> >> The related issue commit is "a70daba linux-user: Tell guest about big >> host pag

Re: [Qemu-devel] [PATCH for-2.5 01/30] m68k: define m680x0 CPUs and features

2015-08-12 Thread Laurent Vivier
Le 12/08/2015 01:13, Richard Henderson a écrit : > On 08/09/2015 01:13 PM, Laurent Vivier wrote: >> INSN(undef, , , CF_ISA_A); >> +INSN(undef, , , M68000); >> INSN(arith_im, 0080, fff8, CF_ISA_A); >> +INSN(arith_im, , ff00, M68000); >> +INSN(und

Re: [Qemu-devel] [PATCH for-2.5 15/30] m68k: add more modes to movem

2015-08-12 Thread Andreas Schwab
Richard Henderson writes: > On 08/09/2015 01:13 PM, Laurent Vivier wrote: >> +opsize = (insn & 0x40) != 0 ? OS_LONG : OS_WORD; >> +incr = opsize_bytes(opsize); >> +if (!is_load && (insn & 070) == 040) { >> +for (i = 15; i >= 0; i--, mask >>= 1) { > > This has got to be wrong.

Re: [Qemu-devel] [PATCH COLO-Frame v8 00/34] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2015-08-12 Thread zhanghailiang
On 2015/8/5 19:24, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: This is the 8th version of COLO. Here is only COLO frame part, include: VM checkpoint, failover, proxy API, block replication API, not include block replication. The block part is treated as

Re: [Qemu-devel] [Xen-devel] [PATCH v1] xenpt: Properly handle 64-bit bar with more than 4G size

2015-08-12 Thread Jan Beulich
>>> On 12.08.15 at 09:10, wrote: > >> -Original Message- >> From: qemu-devel-bounces+feng.wu=intel@nongnu.org >> [mailto:qemu-devel-bounces+feng.wu=intel@nongnu.org] On Behalf Of >> Jan Beulich >> Sent: Wednesday, August 12, 2015 2:59 PM >> To: Wu, Feng >> Cc: xen-de...@lists.xe

Re: [Qemu-devel] [PATCH for-2.5 05/30] m68k: define operand sizes

2015-08-12 Thread Laurent Vivier
Le 12/08/2015 06:07, Richard Henderson a écrit : > On 08/09/2015 01:13 PM, Laurent Vivier wrote: >> -#define OS_BYTE 0 >> -#define OS_WORD 1 >> -#define OS_LONG 2 >> -#define OS_SINGLE 4 >> -#define OS_DOUBLE 5 >> +#define OS_BYTE 1 >> +#define OS_WORD 2 >> +#define OS_LONG 3 >> +#def

Re: [Qemu-devel] [PATCH for-2.5 05/30] m68k: define operand sizes

2015-08-12 Thread Andreas Schwab
Laurent Vivier writes: > Le 12/08/2015 06:07, Richard Henderson a écrit : >> Is there a reason you've skipped the 0 value when adding the new values? > > I think there is no reason, but if I change the value I have to update > abdc_mem, sbcd_mem instructions as they use it as an > incrementer/dec

Re: [Qemu-devel] [Xen-devel] [PATCH v1] xenpt: Properly handle 64-bit bar with more than 4G size

2015-08-12 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Wednesday, August 12, 2015 4:43 PM > To: Wu, Feng > Cc: stefano.stabell...@eu.citrix.com; xen-de...@lists.xensource.com; > qemu-devel@nongnu.org > Subject: RE: [Qemu-devel] [Xen-devel] [PATCH v1] xenpt: Properly h

Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread gchen gchen
On 2015年08月12日 15:59, gchen gchen wrote: > On 2015年08月12日 14:45, Richard Henderson wrote: >> On 08/11/2015 11:03 PM, gchen gchen wrote: >>> Under Alpha host, for ubuntu12.04.5 i386 guest, it will cause failure: >>> "Invalid ELF image for this architecture". >>> >>> The related issue commit is "a70d

[Qemu-devel] [PATCH 1/2] migration: do cleanup operation after completion

2015-08-12 Thread Liang Li
Because of the patch 3ea3b7fa9af067982f34b of kvm, now the migration_end() is a time consuming operation, which takes about dozens of milliseconds, and will prolong VM downtime. Such an operation should be done after migration completion. For a VM with 8G RAM, this patch can reduce the VM downtime

[Qemu-devel] [PATCH 2/2] migration: rename qemu_savevm_state_cancel

2015-08-12 Thread Liang Li
The function qemu_savevm_state_cancel is called after the migration in migration_thread, it seems strange to 'cancel' it after completion, rename it to qemu_savevm_state_cleanup looks better. Signed-off-by: Liang Li --- include/sysemu/sysemu.h | 2 +- migration/migration.c | 4 ++-- migration/

Re: [Qemu-devel] [ARM SMBIOS V3 PATCH 4/5] smbios: add smbios 3.0 support

2015-08-12 Thread Michael S. Tsirkin
On Tue, Aug 11, 2015 at 10:08:21PM -0400, Wei Huang wrote: > This patch adds support for SMBIOS 3.0 entry point. When caller invokes > smbios_set_defaults(), it can specify entry point as 2.1 or 3.0. Then > smbios_get_tables() will return the entry point table in right format. > > Acked-by: Gabrie

[Qemu-devel] [PATCH 0/2] Fix long vm downtime during live migration

2015-08-12 Thread Liang Li
Some cleanup operations take long time during the pause and copy stage, especially with the KVM patch 3ea3b7fa9af067, do these operation after the completion of live migration can help to reduce VM downtime. Liang Li (2): migration: do cleanup operation after completion migration: rename qemu

[Qemu-devel] [PATCH] MAINTAINERS: list smbios maintainers

2015-08-12 Thread Michael S. Tsirkin
Now that smbios has its own directory, list its maintainers. Same people as ACPI so just reuse that entry. Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 978b717..a059d5d 100644 --- a/MAINTA

Re: [Qemu-devel] [PATCH 0/2] Fix long vm downtime during live migration

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 23:04, Liang Li wrote: > Some cleanup operations take long time during the pause and copy stage, > especially with the KVM patch 3ea3b7fa9af067, do these operation after > the completion of live migration can help to reduce VM downtime. > > > Liang Li (2): > migration: do cleanu

Re: [Qemu-devel] [PATCH 1/2] migration: do cleanup operation after completion

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 23:04, Liang Li wrote: > @@ -1008,8 +1009,10 @@ static void *migration_thread(void *opaque) > } > > qemu_mutex_lock_iothread(); > +end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); > +qemu_savevm_state_cancel(); > + You can remove the qemu_savevm_state_cancel()

Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution

2015-08-12 Thread Paolo Bonzini
On 11/08/2015 23:34, Frederic Konrad wrote: >>> >> Also if qemu_cond_broadcast(&qemu_io_proceeded_cond) is being dropped >> there is no point keeping the guff around in qemu_tcg_wait_io_event. >> > Yes good point. > > BTW this leads to high consumption of host CPU eg: 100% per VCPU thread as > t

Re: [Qemu-devel] [PATCH v6 0/2] vhost user: Add live migration

2015-08-12 Thread Marc-André Lureau
Hi On Wed, Aug 12, 2015 at 9:25 AM, Michael S. Tsirkin wrote: > I think these patches need to be rebased on top of Marc Andre's ones, > and use protocol flags to negotiate capabilities. > Right? Correct. His patches should be applied before my migration tests, though. -- Marc-André Lureau

[Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call

2015-08-12 Thread Marcel Apfelbaum
No need to send VHOST_SET_VRING_CALL to backend before the negotiation with the guest is finished. Signed-off-by: Marcel Apfelbaum --- hw/virtio/vhost.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 2712c6f..b448542

Re: [Qemu-devel] [PATCH] monitor: remove QAPI_EVENT_VSERPORT_CHANGE throttle

2015-08-12 Thread Daniel P. Berrange
On Tue, Aug 11, 2015 at 08:21:18PM +0200, Laszlo Ersek wrote: > On 08/11/15 19:04, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > QAPI_EVENT_VSERPORT_CHANGE reports changes of a virtio serial port > > state. However, the events may be for different ports, but the throttle

Re: [Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call

2015-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2015 at 01:19:51PM +0300, Marcel Apfelbaum wrote: > No need to send VHOST_SET_VRING_CALL to backend > before the negotiation with the guest is finished. > > Signed-off-by: Marcel Apfelbaum Well - we do need to set it to the masked notifier initially to avoid losing events. You c

Re: [Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call

2015-08-12 Thread Marcel Apfelbaum
On 08/12/2015 01:34 PM, Michael S. Tsirkin wrote: On Wed, Aug 12, 2015 at 01:19:51PM +0300, Marcel Apfelbaum wrote: No need to send VHOST_SET_VRING_CALL to backend before the negotiation with the guest is finished. Signed-off-by: Marcel Apfelbaum Well - we do need to set it to the masked not

Re: [Qemu-devel] [PATCH 1/2] migration: do cleanup operation after completion

2015-08-12 Thread Li, Liang Z
> > On 12/08/2015 23:04, Liang Li wrote: > > @@ -1008,8 +1009,10 @@ static void *migration_thread(void *opaque) > > } > > > > qemu_mutex_lock_iothread(); > > +end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); > > +qemu_savevm_state_cancel(); > > + > > You can remove the qemu_sa

Re: [Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call

2015-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2015 at 02:10:56PM +0300, Marcel Apfelbaum wrote: > On 08/12/2015 01:34 PM, Michael S. Tsirkin wrote: > >On Wed, Aug 12, 2015 at 01:19:51PM +0300, Marcel Apfelbaum wrote: > >>No need to send VHOST_SET_VRING_CALL to backend > >>before the negotiation with the guest is finished. > >>

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Pavel Fedin
Hello! > I still think this is the wrong approach -- see my remarks > in the previous round of patch review. Christoffer did not reply anything to your question back then. So - what to do? Probe for all possible GICs? Remove the probe at all? Kind regards, Pavel Fedin Expert Engineer Samsung

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Christoffer Dall
On Wed, Aug 12, 2015 at 1:44 PM, Pavel Fedin wrote: > Hello! > >> I still think this is the wrong approach -- see my remarks >> in the previous round of patch review. > > Christoffer did not reply anything to your question back then. So - what to > do? Probe for all possible GICs? Remove the pr

[Qemu-devel] [PATCH 3/3] monitor: added generation of documentation for hmp-commands-info.hx

2015-08-12 Thread Denis V. Lunev
From: Pavel Butsykin It will be easier if you need to add info-commands to edit only hmp-commands-info.hx, before this had to edit monitor.c and hmp-commands.hx Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev CC: Luiz Capitulino CC: Paolo Bonzini CC: Peter Maydell --- .gitignor

[Qemu-devel] [PATCH v2 for 2.5 0/3] Move target- and device specific code from monitor

2015-08-12 Thread Denis V. Lunev
The monivation of this set is simple. Recently we have proposed patch to monitor.c with specific x86 APIC HMP commands. The patchset was denied with the main motivation "No more arch specific code in monitor.c" This patchset is the first step to move arch specific code from monitor.c targets. So,

[Qemu-devel] [PATCH 1/3] hmp-commands-info: move info_cmds content out of monitor.c

2015-08-12 Thread Denis V. Lunev
From: Pavel Butsykin For moving target- and device-specific code from monitor.c, to beginning we move info_cmds content to hmp-commands-info.hx Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev CC: Luiz Capitulino CC: Paolo Bonzini CC: Peter Maydell --- Makefile.target |

[Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from monitor.c

2015-08-12 Thread Denis V. Lunev
From: Pavel Butsykin Move target-specific code out of /monitor.c to /target-*/monitor.c, this will avoid code cluttering and using random ifdeffery. The solution is quite simple, but solves the issue of the separation of target-specific code from monitor Signed-off-by: Pavel Butsykin Signed-of

Re: [Qemu-devel] [PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-08-12 Thread Denis V. Lunev
On 07/07/2015 01:20 PM, Paolo Bonzini wrote: On 03/07/2015 14:01, Denis V. Lunev wrote: Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and sending notification to user

[Qemu-devel] [PATCH v6] hw/arm/virt: Add high MMIO PCI region, 512G in size

2015-08-12 Thread Pavel Fedin
This large region is necessary for some devices like ivshmem and video cards 32-bit kernels can be built without LPAE support. In this case such a kernel will not be able to use PCI controller which has windows in high addresses. In order to work around the problem, "highmem" option is introduced.

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Pavel Fedin
Hello! > I still think this is the wrong approach -- see my remarks > in the previous round of patch review. You know... I thought a little bit... So far, test = true in KVM_CREATE_DEVICE means that we just want to know whether this type is supported. No actual actions is done by the kernel.

Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution

2015-08-12 Thread Frederic Konrad
On 12/08/2015 11:58, Paolo Bonzini wrote: On 11/08/2015 23:34, Frederic Konrad wrote: Also if qemu_cond_broadcast(&qemu_io_proceeded_cond) is being dropped there is no point keeping the guff around in qemu_tcg_wait_io_event. Yes good point. BTW this leads to high consumption of host CPU eg:

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 09:31, alvise rigo wrote: > I think that tlb_flush_entry is not enough, since in theory another > vCPU could have a different TLB address referring the same phys > address. You're right, this is a TLB so it's virtually-indexed. :( I'm not sure what happens on ARM, since it has a

Re: [Qemu-devel] [RFC v4 3/9] softmmu: Add helpers for a new slowpath

2015-08-12 Thread Paolo Bonzini
On 07/08/2015 19:03, Alvise Rigo wrote: > + > +/* For this vCPU, just update the TLB entry, no need to flush. */ > +env->tlb_table[mmu_idx][index].addr_write |= TLB_EXCL; Couldn't this vCPU also have two aliasing entries in the TLB? Paolo

Re: [Qemu-devel] [PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 13:54, Denis V. Lunev wrote: > guys? > > we are going to move forward with other HyperV bits. Wait a second, 2.4 was released only a few hours ago... Paolo

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Peter Maydell
On 12 August 2015 at 13:27, Pavel Fedin wrote: > Hello! > >> I still think this is the wrong approach -- see my remarks >> in the previous round of patch review. > > You know... I thought a little bit... > So far, test = true in KVM_CREATE_DEVICE means that we just want to know > whether this

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread Peter Maydell
On 12 August 2015 at 13:36, Paolo Bonzini wrote: > > > On 12/08/2015 09:31, alvise rigo wrote: >> I think that tlb_flush_entry is not enough, since in theory another >> vCPU could have a different TLB address referring the same phys >> address. > > You're right, this is a TLB so it's virtually-ind

Re: [Qemu-devel] [RFC v4 3/9] softmmu: Add helpers for a new slowpath

2015-08-12 Thread alvise rigo
Yes, it could. However, it's really unlikely that a vCPU, after issuing a LL to the virtual address x, it stores to the same phys address using the virtual address y. I'm not really sure If we really need to handle these cases. alvise On Wed, Aug 12, 2015 at 2:43 PM, Paolo Bonzini wrote: > > >

Re: [Qemu-devel] [RFC v4 3/9] softmmu: Add helpers for a new slowpath

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 15:09, alvise rigo wrote: > Yes, it could. However, it's really unlikely that a vCPU, after > issuing a LL to the virtual address x, it stores to the same phys > address using the virtual address y. > > I'm not really sure If we really need to handle these cases. Ok, if we had to

Re: [Qemu-devel] [PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-08-12 Thread Denis V. Lunev
On 08/12/2015 03:47 PM, Paolo Bonzini wrote: On 12/08/2015 13:54, Denis V. Lunev wrote: guys? we are going to move forward with other HyperV bits. Wait a second, 2.4 was released only a few hours ago... Paolo sure :)

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Christoffer Dall
On Wed, Aug 12, 2015 at 2:59 PM, Peter Maydell wrote: > On 12 August 2015 at 13:27, Pavel Fedin wrote: >> Hello! >> >>> I still think this is the wrong approach -- see my remarks >>> in the previous round of patch review. >> >> You know... I thought a little bit... >> So far, test = true in KV

[Qemu-devel] [PATCH v3 0/7] Extract TLS handling code from VNC server

2015-08-12 Thread Daniel P. Berrange
This small patch series is a formal submission of another part of my previous series v1: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg02038.html v2: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg01267.html Now we have the basic crypto module defined for hash/cipher APIs,

[Qemu-devel] [PATCH v3 2/7] crypto: introduce new module for TLS anonymous credentials

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSCredsAnon class which is used to manage anonymous TLS credentials. Use of this class is generally discouraged since it does not offer strong security, but it is required for backwards compatibility with the current VNC server implementation. Simple example CLI configuration:

[Qemu-devel] [PATCH v3 1/7] crypto: introduce new base module for TLS credentials

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSCreds class to act as the base class for storing TLS credentials. This will be later subclassed to provide handling of anonymous and x509 credential types. The subclasses will be user creatable objects, so instances can be created & deleted via 'object-add' and 'object-del' QM

[Qemu-devel] [PATCH v3 3/7] crypto: introduce new module for TLS x509 credentials

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSCredsX509 class which is used to manage x509 certificate TLS credentials. This will be the preferred credential type offering strong security characteristics Example CLI configuration: $QEMU -object tls-creds-x509,id=tls0,endpoint=server,\ dir=/path/to/creds/

[Qemu-devel] [PATCH v3 6/7] ui: fix return type for VNC I/O functions to be ssize_t

2015-08-12 Thread Daniel P. Berrange
Various VNC server I/O functions return 'long' and then also pass this to a method accepting 'int'. All these should be ssize_t to match the signature of read/write APIs and thus avoid potential for integer truncation / wraparound. Signed-off-by: Daniel P. Berrange --- ui/vnc.c | 36

[Qemu-devel] [PATCH v3 5/7] crypto: introduce new module for handling TLS sessions

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSSession object that will encapsulate all the code for setting up and using a client/sever TLS session. This isolates the code which depends on the gnutls library, avoiding #ifdefs in the rest of the codebase, as well as facilitating any possible future port to other TLS librar

[Qemu-devel] [PATCH v3 7/7] ui: convert VNC server to use QCryptoTLSSession

2015-08-12 Thread Daniel P. Berrange
Switch VNC server over to using the QCryptoTLSSession object for the TLS session. This removes the direct use of gnutls from the VNC server code. It also removes most knowledge about TLS certificate handling from the VNC server code. This has the nice effect that all the CONFIG_VNC_TLS conditionals

[Qemu-devel] [PATCH v3 4/7] crypto: add sanity checking of TLS x509 credentials

2015-08-12 Thread Daniel P. Berrange
If the administrator incorrectly sets up their x509 certificates, the errors seen at runtime during connection attempts are very obscure and difficult to diagnose. This has been a particular problem for people using openssl to generate their certificates instead of the gnutls certtool, because the

Re: [Qemu-devel] [PATCH] Makefile.target: include top level build dir in vpath

2015-08-12 Thread Paolo Bonzini
On 09/08/2015 09:02, Michael Marineau wrote: > Using ccache with CCACHE_BASEDIR set to $(SRC_PATH) or a parent will > rewrite all absolute paths to relative paths. This interacts poorly with > QEMU's two-level build directory scheme. For example, lets say > BUILD_DIR=$(SRC_PATH)/build so build/bl

[Qemu-devel] [PULL 03/20] tests: virtio-scsi: clear unit attention after reset

2015-08-12 Thread Paolo Bonzini
From: Stefan Hajnoczi The unit attention after reset (power on) prevents normal commands from running. The unaligned WRITE SAME test never executed its command! Signed-off-by: Stefan Hajnoczi Message-Id: <1438262173-11546-4-git-send-email-stefa...@redhat.com> Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PULL 02/20] scsi-disk: fix cmd.mode field typo

2015-08-12 Thread Paolo Bonzini
From: Stefan Hajnoczi The cmd.xfer field is the data length. The cmd.mode field is the data transfer direction. scsi_handle_rw_error() was using the wrong error policy for read requests. Signed-off-by: Stefan Hajnoczi Message-Id: <1438262173-11546-3-git-send-email-stefa...@redhat.com> Signed-

[Qemu-devel] [PULL 00/20] SCSI, build, TCG, RCU, misc patches for 2015-08-12

2015-08-12 Thread Paolo Bonzini
The following changes since commit cb48f67ad8c7b33c617d4f8144a27706e69fd688: bsd-user: Fix operand to cpu_x86_exec (2015-07-30 12:38:49 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 70c6c8bdc7c91bb111710156e

[Qemu-devel] [PULL 10/20] exec: drop cpu_can_do_io, just read cpu->can_do_io

2015-08-12 Thread Paolo Bonzini
After commit 626cf8f (icount: set can_do_io outside TB execution, 2014-12-08), can_do_io is set to 1 if not executing code. It is no longer necessary to make this assumption in cpu_can_do_io. It is also possible to remove the use_icount test, simply by never setting cpu->can_do_io to 0 unless use

[Qemu-devel] [PULL 01/20] virtio-scsi: use virtqueue_map_sg() when loading requests

2015-08-12 Thread Paolo Bonzini
From: Stefan Hajnoczi The VirtQueueElement struct is serialized during migration but the in_sg[]/out_sg[] iovec arrays are not usable on the destination host because the pointers are meaningless. Use virtqueue_map_sg() to refresh in_sg[]/out_sg[] to valid pointers based on in_addr[]/out_addr[] h

[Qemu-devel] [PULL 05/20] virtio-scsi-test: Add test case for tail unaligned WRITE SAME

2015-08-12 Thread Paolo Bonzini
From: Fam Zheng Signed-off-by: Fam Zheng Message-Id: <1438159512-3871-3-git-send-email-f...@redhat.com> Signed-off-by: Paolo Bonzini --- tests/virtio-scsi-test.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c

[Qemu-devel] [PULL 07/20] cpu-exec: Do not invalidate original TB in cpu_exec_nocache()

2015-08-12 Thread Paolo Bonzini
From: Sergey Fedorov Instead of invalidating an original TB in cpu_exec_nocache() prematurely, just save a link to it in the temporary generated TB. If cpu_io_recompile() is raised subsequently from the temporary TB, invalidate the original one as well. That allows reusing the original TB each ti

[Qemu-devel] [PATCH] qemu-thread: add a fast path to the Win32 QemuEvent

2015-08-12 Thread Paolo Bonzini
QemuEvents are used heavily by call_rcu. We do not want them to be slow, but the current implementation does a kernel call on every invocation of qemu_event_* and won't cut it. So, wrap a Win32 manual-reset event with a fast userspace path. The states and transitions are the same as for the fute

[Qemu-devel] [PULL 15/20] configure: only add CONFIG_RDMA to config-host.h once

2015-08-12 Thread Paolo Bonzini
From: "Daniel P. Berrange" For unknown reasons (probably a git rebase merge mistake) commit 2da776db4846eadcb808598a5d3484d149773c05 Author: Michael R. Hines Date: Mon Jul 22 10:01:54 2013 -0400 rdma: core logic Adds CONFIG_RDMA to config-host.h twice, as can be seen in the genera

[Qemu-devel] [PULL 04/20] scsi-disk: Fix assertion failure on WRITE SAME

2015-08-12 Thread Paolo Bonzini
From: Fam Zheng The last portion of an unaligned WRITE SAME command could fail the assertion in bdrv_aligned_pwritev: assert(!qiov || bytes == qiov->size); Because we updated data->iov.iov_len right above this if block, but data->qiov still has the old size. Reinitialize the qiov to make t

[Qemu-devel] [PULL 08/20] cpu_defs: Simplify CPUTLB padding logic

2015-08-12 Thread Paolo Bonzini
From: Peter Crosthwaite There was a complicated subtractive arithmetic for determining the padding on the CPUTLBEntry structure. Simplify this with a union. Signed-off-by: Peter Crosthwaite Message-Id: <1436130533-18565-1-git-send-email-crosthwaite.pe...@gmail.com> Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 09/20] configure: Default to enable module build

2015-08-12 Thread Paolo Bonzini
From: Fam Zheng We have module build support around for a while, but also had it bitrot several times. It probably makes sense to enable it by default so that people can notice and use it. Add --disable-modules as a counterpart to --enable-modules, which is now turned on by default. If both are

[Qemu-devel] [PULL 06/20] vhost/scsi: call vhost_dev_cleanup() at unrealize() time

2015-08-12 Thread Paolo Bonzini
From: Igor Mammedov vhost-scsi calls vhost_dev_init() at realize() time but forgets to call it's counterpart vhost_dev_cleanup() at unrealize() time. Calling it should fix leaking of memory table and mem_sections table in vhost device. And also unregister vhost's memory listerner to prevent acce

[Qemu-devel] [PULL 18/20] scsi-generic: identify AIO callbacks more clearly

2015-08-12 Thread Paolo Bonzini
Functions that are not callbacks should assert that aiocb is NULL and have a SCSIGenericReq argument. AIO callbacks should assert that aiocb is not NULL. They also have an opaque argument. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-generic.c | 66

[Qemu-devel] [PULL 11/20] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-08-12 Thread Paolo Bonzini
From: Wen Congyang If rcu_(un)register_thread() is called together with synchronize_rcu(), it will wait for the synchronize_rcu() to finish. But when synchronize_rcu() waits for some events, we can modify the list registry. We also use the lock rcu_gp_lock to assume that synchronize_rcu() isn't e

[Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment

2015-08-12 Thread Paolo Bonzini
From: Chen Hanxiao Use ROUND_UP instead. Signed-off-by: Chen Hanxiao Message-Id: <1437707523-4910-1-git-send-email-chenhanx...@cn.fujitsu.com> Signed-off-by: Paolo Bonzini --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 0a4a0c5..54cd70a 100

[Qemu-devel] [PULL 17/20] scsi-disk: identify AIO callbacks more clearly

2015-08-12 Thread Paolo Bonzini
Functions that are not callbacks should assert that aiocb is NULL and have a non-opaque argument (usually a pointer to SCSIDiskReq). AIO callbacks should assert that aiocb is not NULL and take care of calling block_acct done. They also have an opaque argument. Reviewed-by: Fam Zheng Signed-off-

[Qemu-devel] [PULL 16/20] scsi: create restart bottom half in the right AioContext

2015-08-12 Thread Paolo Bonzini
This matches commit 4407c1c (virtio-blk: Schedule BH in the right context, 2014-06-17), which did the same thing for virtio-blk. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread alvise rigo
On Wed, Aug 12, 2015 at 2:36 PM, Paolo Bonzini wrote: > > > On 12/08/2015 09:31, alvise rigo wrote: >> I think that tlb_flush_entry is not enough, since in theory another >> vCPU could have a different TLB address referring the same phys >> address. > > You're right, this is a TLB so it's virtuall

[Qemu-devel] [PULL 20/20] disas: Defeature print_target_address

2015-08-12 Thread Paolo Bonzini
From: Peter Crosthwaite It does not work in multi-arch as it requires the CPU specific TARGET_VIRT_ADDR_SPACE_BITS global define. Just use the generic version that does no masking. Targets should be responsible for passing in a sane virtual address. Signed-off-by: Peter Crosthwaite Message-Id:

[Qemu-devel] [PULL 19/20] hw: fix mask for ColdFire UART command register

2015-08-12 Thread Paolo Bonzini
The "miscellaneous commands" part of the register is 3 bits wide. Spotted by Coverity and confirmed in the datasheet, downloadable from http://cache.freescale.com/files/32bit/doc/ref_manual/MCF5307BUM.pdf (figure 14-6). Signed-off-by: Paolo Bonzini --- hw/char/mcf_uart.c | 2 +- 1 file changed,

[Qemu-devel] [PULL 14/20] qemu-nbd: remove unnecessary qemu_notify_event()

2015-08-12 Thread Paolo Bonzini
This was needed when qemu-nbd was using qemu_set_fd_handler2. It is not needed anymore now that nbd_update_server_fd_handler is called whenever nbd_can_accept() can change from false to true. nbd_update_server_fd_handler will call qemu_set_fd_handler(), which will call qemu_notify_event(). Review

Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.

2015-08-12 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > From: KONRAD Frederic > > tb_flush is not thread safe we definitely need to exit VCPUs to do that. > This introduces tb_flush_safe which just creates an async safe work which will > do a tb_flush later. > > Signed-off-by: KONRAD Frederic

[Qemu-devel] [PULL 13/20] vhost-scsi: Clarify vhost_virtqueue_mask argument

2015-08-12 Thread Paolo Bonzini
From: Lu Lina vhost_virtqueue_mask takes an "absolute" virtqueue index, while the code looks like it's passing an index that is relative to s->dev.vq_index. In reality, s->dev.vq_index is always zero, so this patch does not make any difference, but the code is clearer. Signed-off-by: Lu Lina S

[Qemu-devel] [PATCH] ioapic: fix contents of arbitration register

2015-08-12 Thread Paolo Bonzini
The arbitration register should read to the same value as the IOAPIC id register. Fixes kvm-unit-tests ioapic.flat. Signed-off-by: Paolo Bonzini --- hw/intc/ioapic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 6ad3c66..bde52e8

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 16:04, alvise rigo wrote: >> > clear algorithm: >> >if bytemap[vaddr] == 254 >> > bytemap[vaddr] = CPU_ID > Isn't this also required for the clear algorithm? > > if bytemap[vaddr] < 254 > /* this can happen for the TLB_EXCL slow path effect */ > bytema

Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.

2015-08-12 Thread Frederic Konrad
On 12/08/2015 16:09, Paolo Bonzini wrote: On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: From: KONRAD Frederic tb_flush is not thread safe we definitely need to exit VCPUs to do that. This introduces tb_flush_safe which just creates an async safe work which will do a tb_flush later. S

[Qemu-devel] [PATCH] hw/misc/zynq_slcr: Change CPU clock rate

2015-08-12 Thread Guenter Roeck
The Linux kernel only accepts 34 Khz and 67 Khz clock rates, and may crash if the actual clock rate is too low. The clock rate used to be (ps-clk-frequency * 26 / 4), which resulted in a CPU frequency of 21 Khz if ps-clk-frequency was set to Hz. Change it to (ps-clk-frequency *

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Christoffer Dall
On Wed, Aug 12, 2015 at 4:14 PM, Eric Auger wrote: > Hi, > On 08/12/2015 03:23 PM, Christoffer Dall wrote: >> On Wed, Aug 12, 2015 at 2:59 PM, Peter Maydell >> wrote: >>> On 12 August 2015 at 13:27, Pavel Fedin wrote: Hello! > I still think this is the wrong approach -- see my re

Re: [Qemu-devel] [PATCH] Makefile.target: include top level build dir in vpath

2015-08-12 Thread Michael Marineau
On Aug 12, 2015 6:32 AM, "Paolo Bonzini" wrote: > > > > On 09/08/2015 09:02, Michael Marineau wrote: > > Using ccache with CCACHE_BASEDIR set to $(SRC_PATH) or a parent will > > rewrite all absolute paths to relative paths. This interacts poorly with > > QEMU's two-level build directory scheme. Fo

Re: [Qemu-devel] [PATCH v2] target-cris: update CPU state save/load to use VMStateDescription

2015-08-12 Thread Edgar E. Iglesias
On Fri, Aug 07, 2015 at 05:02:14PM +0100, Peter Maydell wrote: > From: Juan Quintela > > Update the CRIS CPU state save/load to use a VMStateDescription struct > rather than cpu_save/cpu_load functions. > > Have to define TLBSet struct. > Multidimensional arrays in C are a mess, just unroll them

Re: [Qemu-devel] [Xen-devel] [PATCH v1] xenpt: Properly handle 64-bit bar with more than 4G size

2015-08-12 Thread Konrad Rzeszutek Wilk
On Wed, Aug 12, 2015 at 08:53:44AM +, Wu, Feng wrote: > > > > -Original Message- > > From: Jan Beulich [mailto:jbeul...@suse.com] > > Sent: Wednesday, August 12, 2015 4:43 PM > > To: Wu, Feng > > Cc: stefano.stabell...@eu.citrix.com; xen-de...@lists.xensource.com; > > qemu-devel@nongn

Re: [Qemu-devel] [PATCH] MAINTAINERS: list smbios maintainers

2015-08-12 Thread Wei Huang
On 8/12/15 04:20, Michael S. Tsirkin wrote: Now that smbios has its own directory, list its maintainers. Same people as ACPI so just reuse that entry. Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAIN

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread alvise rigo
On Wed, Aug 12, 2015 at 4:10 PM, Paolo Bonzini wrote: > > > On 12/08/2015 16:04, alvise rigo wrote: >>> > clear algorithm: >>> >if bytemap[vaddr] == 254 >>> > bytemap[vaddr] = CPU_ID >> Isn't this also required for the clear algorithm? >> >> if bytemap[vaddr] < 254 >> /* this

Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 16:11, Frederic Konrad wrote: >> You could also allocate a new code buffer and free the old one with >> call_rcu. This should simplify things a lot. > > Depending the size of the code buffer this might be a good idea. :). 32 megabytes. Paolo

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Eric Auger
Hi, On 08/12/2015 03:23 PM, Christoffer Dall wrote: > On Wed, Aug 12, 2015 at 2:59 PM, Peter Maydell > wrote: >> On 12 August 2015 at 13:27, Pavel Fedin wrote: >>> Hello! >>> I still think this is the wrong approach -- see my remarks in the previous round of patch review. >>> >>> You

[Qemu-devel] [PATCH] sh4: Fix initramfs initialization for endiannes-mismatched targets

2015-08-12 Thread Guenter Roeck
If host and target endianness does not match, loding an initramfs does not work. Fix by writing boot parameters with appropriate endianness conversion. Signed-off-by: Guenter Roeck --- hw/sh4/r2d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2

Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread Richard Henderson
On 08/12/2015 12:59 AM, gchen gchen wrote: >> Nack. There's 99 problems with host page size> guest page size. This >> solves none of them, and in the hackiest way possible. >> > > Under alpha virtual machine, if set i386 guest page size 8KB, it will > cause failure directly (any dynamically link

Re: [Qemu-devel] [PATCH for-2.5 15/30] m68k: add more modes to movem

2015-08-12 Thread Richard Henderson
On 08/12/2015 01:07 AM, Andreas Schwab wrote: > Richard Henderson writes: > >> On 08/09/2015 01:13 PM, Laurent Vivier wrote: >>> +opsize = (insn & 0x40) != 0 ? OS_LONG : OS_WORD; >>> +incr = opsize_bytes(opsize); >>> +if (!is_load && (insn & 070) == 040) { >>> +for (i = 15; i

  1   2   >