Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
On Fri, 12/08 08:42, Markus Armbruster wrote: > Fam Zheng writes: > > > On Thu, 12/07 10:53, Eric Blake wrote: > >> On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: > >> > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: > [...] > >> >> +it less likely to conflict with a running guest's

Re: [Qemu-devel] [PATCH v3 17/50] qapi: do not define enumeration value explicitely

2017-12-07 Thread Markus Armbruster
Marc-André Lureau writes: > On Thu, Dec 7, 2017 at 5:23 PM, Markus Armbruster wrote: >> Marc-André Lureau writes: >> >>> The C standard has the initial value at 0 and the subsequent values >>> incremented by 1. No need to set this explicitely. >>> >>> This will prevent from artificial "gaps" wh

Re: [Qemu-devel] [PATCH v2 0/3] ivshmem: MSI bug fixes

2017-12-07 Thread Ladi Prosek
On Mon, Nov 20, 2017 at 1:49 PM, Ladi Prosek wrote: > On Mon, Nov 20, 2017 at 10:07 AM, Ladi Prosek wrote: >> On Sun, Nov 19, 2017 at 9:39 PM, wrote: >>> I just updated to the latest build and applied this patch set, now on VM >>> reset the qemu crashes with the following assert: >>> >>> ivshme

[Qemu-devel] [PATCH v3 4/4] ivshmem: Disable irqfd on device reset

2017-12-07 Thread Ladi Prosek
The effects of ivshmem_enable_irqfd() was not undone on device reset. This manifested as: ivshmem_add_kvm_msi_virq: Assertion `!s->msi_vectors[vector].pdev' failed. when irqfd was enabled before reset and then enabled again after reset, making ivshmem_enable_irqfd() run for the second time. To r

[Qemu-devel] [PATCH v3 0/4] ivshmem: MSI bug fixes

2017-12-07 Thread Ladi Prosek
Fixes bugs in the ivshmem device implementation uncovered with the new Windows ivshmem driver: https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/ivshmem v1->v2: * Patch 1 - added reproducer info to commit message (Markus) * Patch 2 - restructured conditionals, fixed comment forma

[Qemu-devel] [PATCH v3 2/4] ivshmem: Always remove irqfd notifiers

2017-12-07 Thread Ladi Prosek
As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"), QEMU crashes with: ivshmem: msix_set_vector_notifiers failed msix_unset_vector_notifiers: Assertion `dev->msix_vector_use_notifier && dev->msix_vector_release_notifier' failed. if MSI-X is repeatedly enabled and disabled

[Qemu-devel] [PATCH v3 3/4] ivshmem: Improve MSI irqfd error handling

2017-12-07 Thread Ladi Prosek
Adds a rollback path to ivshmem_enable_irqfd() and fixes ivshmem_disable_irqfd() to bail if irqfd has not been enabled. To reproduce, run: ivshmem-server -n 0 and QEMU with: -device ivshmem-doorbell,chardev=iv -chardev socket,path=/tmp/ivshmem_socket,id=iv then load, unload, and load aga

[Qemu-devel] [PATCH v3 1/4] ivshmem: Don't update non-existent MSI routes

2017-12-07 Thread Ladi Prosek
As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"), QEMU crashes with: kvm_irqchip_commit_routes: Assertion `ret == 0' failed. if the ivshmem device is configured with more vectors than what the server supports. This is caused by the ivshmem_vector_unmask() being called

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Markus Armbruster
Fam Zheng writes: > On Thu, 12/07 10:53, Eric Blake wrote: >> On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: >> > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: [...] >> >> +it less likely to conflict with a running guest's permissions due to >> >> image >> >> +locking. For example

Re: [Qemu-devel] iSER transport name is not good

2017-12-07 Thread Charles Kelimod
Hi Dave and Sahlberg, for this type of name:iser:, I completely agree with you. my issue is when I create an vm from libvirt, the qemu command line should be: -drive file.driver=iser,file.portal=xx.xx.xx.xx:3260,file.target=iqn.xxx,file.lun=0,file.transport=iser Actually "iser" is added by me

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: fix error param in string

2017-12-07 Thread Liu, Yi L
Looks good. Reviewed-by: Liu, Yi L On Fri, Dec 08, 2017 at 12:26:54PM +0800, Peter Xu wrote: > It should be caching-mode. It may confuse people when it pops up. > > Signed-off-by: Peter Xu > --- > hw/i386/intel_iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

Re: [Qemu-devel] [PATCH 1/2] intel_iommu: remove X86_IOMMU_PCI_DEVFN_MAX

2017-12-07 Thread Liu, Yi L
On Fri, Dec 08, 2017 at 12:26:53PM +0800, Peter Xu wrote: Looks good to me. Reviewed-by: Liu, Yi L > We have PCI_DEVFN_MAX now. > > Signed-off-by: Peter Xu > --- > hw/i386/intel_iommu.c | 10 +- > include/hw/i386/x86-iommu.h | 1 - > 2 files changed, 5 insertions(+), 6 deletio

Re: [Qemu-devel] [PATCH v2] 9pfs: Correctly handle cancelled requests

2017-12-07 Thread Greg Kurz
Cc'ing Stefano using a more appropriate address :) On Thu, 7 Dec 2017 18:04:24 +0100 Greg Kurz wrote: > On Mon, 4 Dec 2017 15:36:19 -0500 > Keno Fischer wrote: > > > # Background > > > > I was investigating spurious non-deterministic EINTR returns from > > various 9p file system operations i

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Wei Wang
On 12/08/2017 07:54 AM, Michael S. Tsirkin wrote: On Thu, Dec 07, 2017 at 06:28:19PM +, Stefan Hajnoczi wrote: On Thu, Dec 7, 2017 at 5:38 PM, Michael S. Tsirkin wrote: On Thu, Dec 07, 2017 at 05:29:14PM +, Stefan Hajnoczi wrote: On Thu, Dec 7, 2017 at 4:47 PM, Michael S. Tsirkin wro

[Qemu-devel] [PATCH v2] msix: don't mask already masked vectors on reset

2017-12-07 Thread Ladi Prosek
msix_mask_all() is supposed to invoke the release vector notifier if the state of the respective vector changed from unmasked to masked. The way it's currently called from msix_reset(), though, may result in calling the release notifier even if the vector is already masked. 1) msix_reset() clea

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Stefan Hajnoczi
On Thu, Dec 7, 2017 at 11:54 PM, Michael S. Tsirkin wrote: > On Thu, Dec 07, 2017 at 06:28:19PM +, Stefan Hajnoczi wrote: >> On Thu, Dec 7, 2017 at 5:38 PM, Michael S. Tsirkin wrote: >> > On Thu, Dec 07, 2017 at 05:29:14PM +, Stefan Hajnoczi wrote: >> >> On Thu, Dec 7, 2017 at 4:47 PM, Mi

Re: [Qemu-devel] iSER transport name is not good

2017-12-07 Thread ronnie sahlberg
David, Yes, QEMU has supported iSER (iSCSI extensions for RDMA) via a userspace library, libiscsi, since about a year. Here is a nice presentation from the developer of iSER support : https://www.google.com.au/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjChpba3PnXAhXBKZQKHQa

Re: [Qemu-devel] [PATCH v2] rcu: reduce more than 7MB heap memory by malloc_trim()

2017-12-07 Thread Yang Zhong
On Thu, Dec 07, 2017 at 04:33:10PM +0100, Marc-André Lureau wrote: > Hi > > On Thu, Nov 23, 2017 at 7:41 AM, Yang Zhong wrote: > > Since there are some issues in memory alloc/free machenism > > in glibc for little chunk memory, if Qemu frequently > > alloc/free little chunk memory, the glibc does

[Qemu-devel] [PATCH 2/2] intel_iommu: fix error param in string

2017-12-07 Thread Peter Xu
It should be caching-mode. It may confuse people when it pops up. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index c1fa08d205..fe15d3ba84 100644 --- a/hw/i386/intel_iommu.c +

[Qemu-devel] [PATCH 0/2] vtd: tiny fixes for 2.12

2017-12-07 Thread Peter Xu
Please review. Thanks, Peter Xu (2): intel_iommu: remove X86_IOMMU_PCI_DEVFN_MAX intel_iommu: fix error param in string hw/i386/intel_iommu.c | 12 ++-- include/hw/i386/x86-iommu.h | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) -- 2.14.3

[Qemu-devel] [PATCH 1/2] intel_iommu: remove X86_IOMMU_PCI_DEVFN_MAX

2017-12-07 Thread Peter Xu
We have PCI_DEVFN_MAX now. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 10 +- include/hw/i386/x86-iommu.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 3a5bb0bc2e..c1fa08d205 100644 --- a/hw/i386/i

[Qemu-devel] [Question] vhost-user: hot-unplug vhost-user nic for windows guest OS will fail with 100% reproduce rate

2017-12-07 Thread linzhecheng
Hi, guys I met a problem when hot-unplug vhost-user nic for Windows 2008 rc2 sp1 64 (Guest OS) The xml of nic is as followed: Firstly, I use virsh attach-device win2008 vif.xml to hot-plug a nic for Guest OS. This operation returns success. After guest OS discover nic succe

[Qemu-devel] [BUG] vhost-user: hot-unplug vhost-user nic for windows guest OS will fail with 100% reproduce rate

2017-12-07 Thread linzhecheng
Hi, guys I met a problem when hot-unplug vhost-user nic for Windows 2008 rc2 sp1 64 (Guest OS) The xml of nic is as followed: Firstly, I use virsh attach-device win2008 vif.xml to hot-plug a nic for Guest OS. This operation returns success. After guest OS discover nic succe

[Qemu-devel] [PATCH v2] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
Signed-off-by: Fam Zheng --- v2: - "code{qemu-img}". [Kashyap, Eric] - "etc.." -> "etc.". --- qemu-img.texi | 9 + 1 file changed, 9 insertions(+) diff --git a/qemu-img.texi b/qemu-img.texi index fdcf120f36..6b9f9adfc8 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -57,6 +57,15 @

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
On Thu, 12/07 10:53, Eric Blake wrote: > On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: > > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: > >> Signed-off-by: Fam Zheng > >> --- > >> qemu-img.texi | 8 > >> 1 file changed, 8 insertions(+) > >> > >> diff --git a/qemu-img.tex

[Qemu-devel] [PATCH 12/12] WIP ucontext: annotate coroutine stack for ASAN

2017-12-07 Thread Marc-André Lureau
Not strictly necessary, but it may help ASAN and remove some false positives. Sadly, this annotation produces an ASAN error: $ tests/test-coroutine -p /basic/lifecycle /basic/lifecycle: ==27655==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives

[Qemu-devel] [PATCH 10/12] qemu-config: fix leak in query-command-line-options

2017-12-07 Thread Marc-André Lureau
Direct leak of 160 byte(s) in 4 object(s) allocated from: #0 0x55ed7678cda8 in calloc (/home/elmarco/src/qq/build/x86_64-softmmu/qemu-system-x86_64+0x797da8) #1 0x7f3f5e725f75 in g_malloc0 /home/elmarco/src/gnome/glib/builddir/../glib/gmem.c:124 #2 0x55ed778aa3a7 in query_option_descs

[Qemu-devel] [PATCH 09/12] crypto: fix stack-buffer-overflow error

2017-12-07 Thread Marc-André Lureau
ASAN complains about: ==8856==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd8a1fe168 at pc 0x561136cb4451 bp 0x7ffd8a1fe130 sp 0x7ffd8a1fd8e0 READ of size 16 at 0x7ffd8a1fe168 thread T0 #0 0x561136cb4450 in __asan_memcpy (/home/elmarco/src/qq/build/tests/test-crypto-ivgen+0

[Qemu-devel] [PATCH 07/12] readline: add a free function

2017-12-07 Thread Marc-André Lureau
Fixes leaks such as: Direct leak of 2 byte(s) in 1 object(s) allocated from: #0 0x7eff58beb850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x7eff57942f0c in g_malloc ../glib/gmem.c:94 #2 0x7eff579431cf in g_malloc_n ../glib/gmem.c:331 #3 0x7eff5795f6eb in g_strdup ../glib/gstrfuncs.

[Qemu-devel] [PATCH 11/12] tests: fix qmp-test leak

2017-12-07 Thread Marc-André Lureau
Direct leak of 913 byte(s) in 43 object(s) allocated from: #0 0x55880a15df60 in __interceptor_malloc (/home/elmarco/src/qq/build/tests/qmp-test+0x110f60) #1 0x7f3f20fd098f in _IO_vasprintf (/lib64/libc.so.6+0x8098f) Signed-off-by: Marc-André Lureau --- tests/qmp-test.c | 3 ++- 1 file c

[Qemu-devel] [PATCH 06/12] vl: fix direct firmware directories leak

2017-12-07 Thread Marc-André Lureau
Note that data_dir[] will now point to allocated strings. Fixes: Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7f1448181850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x7f1446ed8f0c in g_malloc ../glib/gmem.c:94 #2 0x7f1446ed91cf in g_malloc_n ../glib/gmem.c:331 #3

[Qemu-devel] [PATCH 08/12] tests: fix migration-test leak

2017-12-07 Thread Marc-André Lureau
Direct leak of 12 byte(s) in 2 object(s) allocated from: #0 0x7f50d403c850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x7f50d1ddf98f in vasprintf (/lib64/libc.so.6+0x8098f) Signed-off-by: Marc-André Lureau --- tests/migration-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH 05/12] tests: fix check-qobject leak:

2017-12-07 Thread Marc-André Lureau
/public/qobject_is_equal_conversion: OK = ==14396==ERROR: LeakSanitizer: detected memory leaks Direct leak of 56 byte(s) in 1 object(s) allocated from: #0 0x7f07682c5850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x7f0767d12f

[Qemu-devel] [PATCH 04/12] build-sys: add AddressSanitizer when --enable-debug if possible

2017-12-07 Thread Marc-André Lureau
Enable ASAN by default if the compiler supports it. If necessary, we could consider a seperate configure option, although I like the idea to have it enabled by default with --enable-debug, so other people more actively fix errors/warnings, and having less configure options in general. Signed-off-

[Qemu-devel] [PATCH 03/12] build-sys: add a rule to print a variable

2017-12-07 Thread Marc-André Lureau
$ make print-CFLAGS CFLAGS=-fsanitize=address -Og -g Trick from various sources: https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile https://www.cmcrossroads.com/article/printing-value-makefile-variable Signed-off-by: Marc-André Lureau --- Makefile | 5 - 1

[Qemu-devel] [PATCH 02/12] build-sys: silence make by default

2017-12-07 Thread Marc-André Lureau
In particular, do not print anything when there is nothing to do, in particular, after a successful build: $ make make[1]: '/home/elmarco/src/qemu/build/capstone/libcapstone.a' is up to date. Signed-off-by: Marc-André Lureau --- rules.mak | 5 + 1 file changed, 5 insertions(+) diff --git a

[Qemu-devel] [PATCH 00/12] Various build-sys and ASAN related fixes

2017-12-07 Thread Marc-André Lureau
Hi, This is a small series that improves a bit the build system, and introduce ASAN by default when --enable-debug. Them it fixes a few leaks that occur during make check: common and x86_64 target tests are leak free after this series, the other targets will need some work. Finally, the last patch

[Qemu-devel] [PATCH 01/12] build-sys: fix qemu-ga -pthread linking

2017-12-07 Thread Marc-André Lureau
When linking qemu-ga under some configuration (when gthread-2.0.pc doesn't have -pthread, as happening atm with meson build), you may have this linking issue: /usr/bin/ld: libqemuutil.a(qemu-thread-posix.o): undefined reference to symbol 'pthread_setname_np@@GLIBC_2.12' /usr/lib64/libpthread.so.0

Re: [Qemu-devel] [PATCH 00/12] Refactor get_phys_addr() not to return FSR values

2017-12-07 Thread Richard Henderson
On 12/05/2017 11:46 AM, Peter Maydell wrote: > Edgar E. Iglesias (1): > target/arm: Extend PAR format determination > > Peter Maydell (11): > target/arm: Provide fault type enum and FSR conversion functions > target/arm: Remove fsr argument from arm_ld*_ptw() > target/arm: Convert get_phys

Re: [Qemu-devel] [PATCH v2 for-2.12 5/5] s390x/tcg: wire up STORE CHANNEL REPORT WORD

2017-12-07 Thread Richard Henderson
On 12/07/2017 07:31 AM, David Hildenbrand wrote: > CRW machine check handling requires STCRW. So let's wire it up. > > Reviewed-by: Thomas Huth > Signed-off-by: David Hildenbrand > --- > target/s390x/helper.h | 1 + > target/s390x/insn-data.def | 1 + > target/s390x/misc_helper.c | 9 +

Re: [Qemu-devel] [PATCH v2 for-2.12 4/5] s390x/tcg: indicate value of TODPR in STCKE

2017-12-07 Thread Richard Henderson
On 12/07/2017 07:31 AM, David Hildenbrand wrote: > +/* 16 bit value store in an uint32_t (only valid bits set) */ > +tcg_gen_ld32u_i64(todpr, cpu_env, offsetof(CPUS390XState, todpr)); Any reason not to use a uint16_t and use tcg_gen_ld16u_i64 here? r~

Re: [Qemu-devel] [PATCH v2 for-2.12 3/5] s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD

2017-12-07 Thread Richard Henderson
On 12/07/2017 07:31 AM, David Hildenbrand wrote: > +DEF_HELPER_FLAGS_1(sckpf, TCG_CALL_NO_RWG, void, env) ... > +/* Set Tod Programmable Field */ > +void HELPER(sckpf)(CPUS390XState *env) > +{ > +uint32_t val = env->regs[0]; > + > +if (val & 0x) { > +s390_program_interrupt(e

Re: [Qemu-devel] [PATCH v2 for-2.12 10/10] s390x: change the QEMU cpu model to a stripped down z12

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > +const S390FeatBitmap qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V2_12 }; static const? r~

[Qemu-devel] Interactive Boot Menu: New Fields in IPLB

2017-12-07 Thread Collin L. Walling
Hello, I'd like to bring up a formal discussion regarding the utilization of reserved space in the IPL Parameter Blocks for s390x guests. Particularly the following: * How should we approach "claiming" bytes so that we do not obstruct future development? * What would be "the best" locatio

Re: [Qemu-devel] [PATCH v2 for-2.12 08/10] s390x/tcg: implement extract-CPU-time facility

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > It only provides the EXTRACT CPU TIME instruction. We can reuse the stpt > helper, which calculates the CPU timer value. > > As the instruction is not privileged, but we don't have a CPU timer > value in case of linux user, we simply fake the CPU

Re: [Qemu-devel] [PATCH v2 for-2.12 09/10] s390x/tcg: we already implement the Set-Program-Parameter facility

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > The Set-Program-Parameter facility (also known as Load-Program-Parameter > facility) provides the LPP instruction used to load the program > parameter. We already implement that instruction in TCG, so add it to our > list. > > Note: Not documented

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 06:28:19PM +, Stefan Hajnoczi wrote: > On Thu, Dec 7, 2017 at 5:38 PM, Michael S. Tsirkin wrote: > > On Thu, Dec 07, 2017 at 05:29:14PM +, Stefan Hajnoczi wrote: > >> On Thu, Dec 7, 2017 at 4:47 PM, Michael S. Tsirkin wrote: > >> > On Thu, Dec 07, 2017 at 04:29:45P

Re: [Qemu-devel] [PATCH v2 for-2.12 07/10] s390x/tcg: Implement SIGNAL ADAPTER instruction

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > KVM suppresses SIGA, setting cc=3. Let's do the same for TCG, so we're at > least equal. > > Signed-off-by: David Hildenbrand > --- > target/s390x/insn-data.def | 1 + > target/s390x/translate.c | 8 > 2 files changed, 9 insertions(+)

Re: [Qemu-devel] [PATCH v2 for-2.12 06/10] s390x/tcg: Implement STORE CHANNEL PATH STATUS

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > Just like KVM does, we should suppress this instruction: > When this instruction is not provided, it is > checked for privileged operation exception and the > instruction is suppressed by the machine > > Signed-off-by: David Hildenbran

Re: [Qemu-devel] [PATCH v2 for-2.12 05/10] s390x/tcg: wire up SET CHANNEL MONITOR

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > Let's just wire it up like KVM. > > Signed-off-by: David Hildenbrand > --- > target/s390x/helper.h | 1 + > target/s390x/insn-data.def | 1 + > target/s390x/misc_helper.c | 9 + > target/s390x/translate.c | 7 +++ > 4 files ch

Re: [Qemu-devel] [PATCH v2 for-2.12 04/10] s390x/tcg: wire up SET ADDRESS LIMIT

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > Let's handle it just like KVM: > Depending on the model, this instruction may not be > provided. When this instruction is not provided, it is > checked for operand exception and privileged-opera- > tion exception, and then is suppre

Re: [Qemu-devel] [PATCH v2 for-2.12 03/10] s390x/tcg: implement Interlocked-Access Facility 2

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > +static ExitStatus op_ni(DisasContext *s, DisasOps *o) > +{ > +o->in1 = tcg_temp_new_i64(); > +/* Perform the atomic operation in memory. */ > +tcg_gen_atomic_fetch_and_i64(o->in1, o->addr1, o->in2, get_mem_index(s), > +

Re: [Qemu-devel] [PATCH v2 for-2.12 02/10] s390x/tcg: ALSI/ALSGI are atomic with interlocked-acccess facility 1

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > We can simply reuse our ASI implementation. Only the way CC is > calculated differs. > > Signed-off-by: David Hildenbrand > --- > target/s390x/insn-data.def | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Squash with previous? r~

Re: [Qemu-devel] [PATCH v2 for-2.12 01/10] s390x/tcg: ASI/ASGI are atomic with interlocked-acccess facility 1

2017-12-07 Thread Richard Henderson
On 12/07/2017 08:53 AM, David Hildenbrand wrote: > +static ExitStatus op_asi(DisasContext *s, DisasOps *o) > +{ > +o->in1 = tcg_temp_new_i64(); > +/* Perform the atomic addition in memory. */ > +tcg_gen_atomic_fetch_add_i64(o->in1, o->addr1, o->in2, get_mem_index(s), > +

Re: [Qemu-devel] [PATCH v2] Add AVX, AVX-512, MPX support to x86_cpu_dump_state

2017-12-07 Thread Doug Gale
On Thu, Dec 7, 2017 at 5:37 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > On 12/02/2017 10:35 PM, Doug Gale wrote: > > Signed-off-by: Doug Gale > > --- > > Fix MSB LSB showing when SSE is disabled > > target/i386/helper.c | 95 ++ > +++

Re: [Qemu-devel] [PATCH v5 23/23] sev: add migration blocker

2017-12-07 Thread Brijesh Singh
On 12/07/2017 05:03 AM, Dr. David Alan Gilbert wrote: ... #define SEV_FW_MAX_ERROR 0x17 @@ -460,6 +462,7 @@ static void sev_launch_finish(SEVState *s) { int ret, error; +Error *local_err = NULL; ret = sev_ioctl(KVM_SEV_LAUNCH_FINISH, 0, &error); i

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread John Snow
On 12/07/2017 06:56 AM, Kashyap Chamarthy wrote: > On Tue, Nov 21, 2017 at 07:10:19PM -0500, John Snow wrote: >> On 11/21/2017 12:23 PM, Kevin Wolf wrote: > > [...] # Snip lot of good discussion. > >>> On another note, I would double check before adding a new block job type >>> that this is the

Re: [Qemu-devel] [PATCH v2 6/6] qemu-iotests: add 203 savevm with IOThreads test

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > This test case will prevent future regressions with savevm and > IOThreads. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/203 | 59 > ++ > tests/qemu-iotests/203.out | 6 + > te

Re: [Qemu-devel] [PATCH v2 5/6] iothread: fix iothread_stop() race condition

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > There is a small chance that iothread_stop() hangs as follows: > > > The bug is explained by the AioContext->notify_me doc comments: > > "If this field is 0, everything (file descriptors, bottom halves, > timers) will be re-evaluated before t

Re: [Qemu-devel] [PATCH v2 4/6] iotests: add VM.add_object()

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > The VM.add_object() method can be used to add IOThreads or memory > backend objects. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/iotests.py | 5 + > 1 file changed, 5 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake

Re: [Qemu-devel] [PATCH v2 3/6] blockdev: add x-blockdev-set-iothread force boolean

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > When a node is already associated with a BlockBackend the > x-blockdev-set-iothread command refuses to set the IOThread. This is to > prevent accidentally changing the IOThread when the nodes are in use. > > When the nodes are created with -drive t

Re: [Qemu-devel] [PATCH v2] Add AVX, AVX-512, MPX support to x86_cpu_dump_state

2017-12-07 Thread Richard Henderson
On 12/02/2017 10:35 PM, Doug Gale wrote: > Signed-off-by: Doug Gale > --- > Fix MSB LSB showing when SSE is disabled > target/i386/helper.c | 95 > +--- > 1 file changed, 83 insertions(+), 12 deletions(-) > > diff --git a/target/i386/helper.c b/ta

Re: [Qemu-devel] [PATCH v2 2/6] docs: mark nested AioContext locking as a legacy API

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > See the patch for why nested AioContext locking is no longer allowed. > > Signed-off-by: Stefan Hajnoczi > --- > docs/devel/multiple-iothreads.txt | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake -- Eri

Re: [Qemu-devel] [PATCH v2 1/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > From: Paolo Bonzini > > BDRV_POLL_WHILE() does not support recursive AioContext locking. It > only releases the AioContext lock once regardless of how many times the > caller has acquired it. This results in a hang since the IOThread does > not m

Re: [Qemu-devel] [PATCH v2 9/9] qemu-iotests: add 202 external snapshots IOThread test

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > QMP 'transaction' blockdev-snapshot-sync with multiple disks in an > IOThread is an untested code path. Several bugs have been found in > connection with this command. This patch adds a test case to prevent > future regressions. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v2 5/9] block: don't keep AioContext acquired after internal_snapshot_prepare()

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > blockdev.c | 47 +++ > 1 file changed, 31 insertions(+), 16 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc.

[Qemu-devel] [PATCH 13/14] i386: Rename bools in PCMachineState to end in _enabled

2017-12-07 Thread minyard
From: Corey Minyard This makes their function more clear and prevents conflicts when adding the actual devices to the machine state, if necessary. Signed-off-by: Corey Minyard --- hw/i386/pc.c | 18 +- hw/i386/pc_piix.c| 3 ++- hw/i386/pc_q35.c | 6 +++--- inc

Re: [Qemu-devel] [PATCH v2 7/9] iothread: add iothread_by_id() API

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Encapsulate IOThread QOM object lookup so that callers don't need to > know how and where IOThread objects live. > > Signed-off-by: Stefan Hajnoczi > --- > include/sysemu/iothread.h | 1 + > iothread.c| 7 +++ > 2 files changed

[Qemu-devel] [PATCH 11/14] acpi: Add i2c serial bus CRS handling

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- hw/acpi/aml-build.c | 40 include/hw/acpi/aml-build.h | 18 ++ 2 files changed, 58 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 36a6cc4..36e2263 1

[Qemu-devel] [PATCH 14/14] pc: Add an SMB0 ACPI device to q35

2017-12-07 Thread minyard
From: Corey Minyard This is so I2C devices can be found in the ACPI namespace. Currently that's only IPMI, but devices can be easily added now. Adding the devices required some PCI information, and the bus itself to be added to the PCMachineState structure. Note that this only works on Q35, th

Re: [Qemu-devel] [PATCH v2 6/9] block: drop unused BlockDirtyBitmapState->aio_context field

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > The dirty bitmap actions in qmp_transaction have not used AioContext > since the dirty bitmap locking discipline was introduced in commit > 2119882c7eb7e2c612b24fc0c8d86f5887d6f1c3 ("block: introduce > dirty_bitmap_mutex"). Remove the unused field.

Re: [Qemu-devel] [PATCH v2 8/9] blockdev: add x-blockdev-set-iothread testing command

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Currently there is no easy way for iotests to ensure that a BDS is bound > to a particular IOThread. Normally the virtio-blk device calls > blk_set_aio_context() when dataplane is enabled during guest driver > initialization. This never happens in

[Qemu-devel] [PATCH 12/14] ipmi: Fix SSIF ACPI handling to use the right CRS

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- hw/acpi/ipmi-stub.c| 2 +- hw/acpi/ipmi.c | 13 +++-- hw/i386/acpi-build.c | 2 +- include/hw/acpi/ipmi.h | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/acpi/ipmi-stub.c b/hw/acpi/ipmi-stub

[Qemu-devel] [PATCH 07/14] i2c:pm_smbus: Add the ability to force block transfer enable

2017-12-07 Thread minyard
From: Corey Minyard The PIIX4 hardware has block transfer buffer always enabled in the hardware, but the i801 does not. Add a parameter to pm_smbus_init to force on the block transfer so the PIIX4 handler can enable this by default, as it was disabled by default before. Signed-off-by: Corey Min

[Qemu-devel] [PATCH 02/14] i2c:pm_smbus: Fix the semantics of block I2C transfers

2017-12-07 Thread minyard
From: Corey Minyard The I2C block transfer commands was not implemented correctly, it read a length byte and such like it was an smbus transfer. So fix the smbus_read_block() and smbus_write_block() functions so they can properly handle I2C transfers, and normal SMBus transfers (for upcoming cha

[Qemu-devel] [PATCH 10/14] ipmi: Add an SMBus IPMI interface

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- default-configs/i386-softmmu.mak | 1 + default-configs/x86_64-softmmu.mak | 1 + hw/ipmi/Makefile.objs | 1 + hw/ipmi/smbus_ipmi.c | 236 + 4 files changed, 239 insertion

[Qemu-devel] [PATCH 03/14] i2c:pm_smbus: Make the I2C block read command read-only

2017-12-07 Thread minyard
From: Corey Minyard It did have write capability, but the manual says the behavior with write enabled is undefined. So just set an error in this case. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c | 9 - 1 file changed, 4 insertions(+),

[Qemu-devel] [PATCH 09/14] i2c: Add vmstate handling to the smbus eeprom

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- hw/i2c/smbus_eeprom.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c index b13ec0f..089005d 100644 --- a/hw/i2c/smbus_eeprom.c +++ b/hw/i2c/smbus_eeprom.c @@

[Qemu-devel] [PATCH 05/14] i2c:pm_smbus: Fix state transfer

2017-12-07 Thread minyard
From: Corey Minyard Transfer the state information for the SMBus registers and internal data so it will work on a VM transfer. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/acpi/piix4.c | 1 + hw/i2c/pm_smbus.c | 19 +++ hw/i2

[Qemu-devel] [PATCH 08/14] i2c: Add an SMBus vmstate structure

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- hw/i2c/smbus.c | 14 ++ include/hw/i2c/smbus.h | 18 +++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/hw/i2c/smbus.c b/hw/i2c/smbus.c index 4b0e264..e15f3f2 100644 --- a/hw/i2c/smbus.c +++

[Qemu-devel] [PATCH 01/14] i2c:pm_smbus: Clean up some style issues

2017-12-07 Thread minyard
From: Corey Minyard Fix some spacing issues, remove extraneous comments, add some defines instead of hard-coding numbers. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c | 58 --- 1 file changed,

[Qemu-devel] [PATCH 06/14] i2c:pm_smbus: Add interrupt handling

2017-12-07 Thread minyard
From: Corey Minyard Add the necessary code so that interrupts actually work from the pm_smbus device. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c | 14 +- hw/i2c/smbus_ich9.c | 17 + include/hw/i2c/pm_s

[Qemu-devel] [PATCH 00/13] pm_smbus fixes and and IPMI SMBus device

2017-12-07 Thread minyard
The pm_smbus code has a few issues, and it's missing a lot of the device capabilities required by IPMI. This has been submitted before, but it has some new things, like vmstate handling for the smbus devices.

[Qemu-devel] [PATCH 04/14] i2c:pm_smbus: Add block transfer capability

2017-12-07 Thread minyard
From: Corey Minyard There was no block transfer code in pm_smbus.c, and it is needed for some devices. So add it. This adds both byte-by-byte block transfers and buffered block transfers. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c |

[Qemu-devel] [PATCH 4/7] ipmi: Split out BT-specific code from ISA BT code

2017-12-07 Thread minyard
From: Corey Minyard Get ready for PCI and other BT interfaces. Signed-off-by: Corey Minyard --- hw/ipmi/Makefile.objs | 2 +- hw/ipmi/ipmi_bt.c | 399 +++ hw/ipmi/isa_ipmi_bt.c | 418 +++--- inclu

Re: [Qemu-devel] [PATCH 0/7] Add PCI IPMI interfaces

2017-12-07 Thread Eric Blake
On 12/07/2017 03:34 PM, miny...@acm.org wrote: > I had to do some testing, so I went ahead and did this. Most of the > changes are re-arranging and splitting up code to separate out the > KCS/BT code from the ISA-specific code. > > There are also some migration fixes here. > > This series requir

[Qemu-devel] [PATCH 3/7] ipmi: Split out KCS-specific code from ISA KCS code

2017-12-07 Thread minyard
From: Corey Minyard Get ready for PCI and other KCS interfaces. Signed-off-by: Corey Minyard --- hw/ipmi/Makefile.objs | 2 +- hw/ipmi/ipmi_kcs.c | 375 ++ hw/ipmi/isa_ipmi_kcs.c | 394 +++-- inc

[Qemu-devel] [PATCH 7/7] ipmi: Add PCI IPMI interfaces

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- default-configs/i386-softmmu.mak | 2 + default-configs/x86_64-softmmu.mak | 2 + hw/ipmi/Makefile.objs | 2 + hw/ipmi/pci_ipmi_bt.c | 145 + hw/ipmi/pci_ipmi_kcs.c

[Qemu-devel] [PATCH 6/7] smbios:ipmi: Ignore IPMI devices with no fwinfo function

2017-12-07 Thread minyard
From: Corey Minyard Not all devices have fwinfo (like the coming PCI one), so ignore them if the their fwinfo function is NULL. Signed-off-by: Corey Minyard --- hw/smbios/smbios_type_38.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/smbios/smbios_type_38.c b/hw/smbios/smbios_type_

Re: [Qemu-devel] [PATCH v2 4/9] block: don't keep AioContext acquired after blockdev_backup_prepare()

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > blockdev.c | 44 ++-- > 1 file changed, 34 insertions(+), 10 deletions(-) > > state->job = do_blockdev_backup(backup, common->block_job_txn, > &local_err); >

[Qemu-devel] [PATCH 1/7] ipmi: Use proper struct reference for KCS vmstate

2017-12-07 Thread minyard
From: Corey Minyard The vmstate for isa_ipmi_kcs was referencing into the kcs structure, instead create a kcs structure separate and use that. There was also some issues in the state transfer. The inlen field was not being transferred, so if a transaction was in process during the transfer it w

[Qemu-devel] [PATCH 5/7] ipmi: Allow a size value to be passed for I/O space

2017-12-07 Thread minyard
From: Corey Minyard PCI device I/O must be >= 8 bytes in length or they don't work. Allow the size to be passed in, the default size of 2 or 3 won't work. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bt.c | 19 +++ hw/ipmi/ipmi_kcs.c | 23 +++--

[Qemu-devel] [PATCH 0/7] Add PCI IPMI interfaces

2017-12-07 Thread minyard
I had to do some testing, so I went ahead and did this. Most of the changes are re-arranging and splitting up code to separate out the KCS/BT code from the ISA-specific code. There are also some migration fixes here. This series requires the previous series: Small IPMI (and other) fixes

[Qemu-devel] [PATCH 2/7] ipmi: Use proper struct reference for BT vmstate

2017-12-07 Thread minyard
From: Corey Minyard The vmstate for isa_ipmi_bt was referencing into the bt structure, instead create a bt structure separate and use that. The version 1 of the BT transfer was fairly broken, if a migration occured during an IPMI operation, it is likely the migration would be corrupted because I

[Qemu-devel] [PATCH 8/8] Add maintainer for the IPMI code

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0255113..6483f79 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -924,6 +924,15 @@ F: tests/ahci-test.c F: tests/libqos/ahci* T: git git:

[Qemu-devel] [PATCH 7/8] ipmi: Allow BMC device properties to be set

2017-12-07 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index e84d710..9b509f8 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi/ipmi_bm

[Qemu-devel] [PATCH 1/8] ipmi: Fix SEL get/set time commands

2017-12-07 Thread minyard
From: Corey Minyard The minimum message size was on the wrong commands, for getting the time it's zero and for setting the time it's 6. Signed-off-by: Corey Minyard Reviewed-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH 0/8] Small IPMI (and other) fixes

2017-12-07 Thread minyard
These are some fixes I've had for a while (mostly). They are small fixes and additions for various things. It would be nice to be able to get at least some of these into the upcoming release, but it's probably too late. I also add myself as the maintainer for the IPMI code, since that seemed app

[Qemu-devel] [PATCH 6/8] vl.c: disallow command line fw cfg without opt/

2017-12-07 Thread minyard
From: "Michael S. Tsirkin" Allowing arbitary file names on command line is setting us up for failure: future guests will look for a specific QEMU-specified name and will get confused finding a user file there. Signed-off-by: Michael S. Tsirkin [Change "warning" to "error" in the error report.]

[Qemu-devel] [PATCH 5/8] ipmi: disable IRQ and ATN on an external disconnect

2017-12-07 Thread minyard
From: Corey Minyard Otherwise there's no way to clear them without an external command, and it could lock the OS in the VM if they were stuck. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi

  1   2   3   >