"Michael S. Tsirkin" writes:
> Turns out virtio kept using ARRAY_SIZE on fields which stopped
> being arrays, this was noticed by a coverity scan.
> I fixed this up, this patchset fixes up the ARRAY_SIZE macro so that this
> bug does not reappear in any other place.
Preferably with the tweaks I
Signed-off-by: Fam Zheng
---
tests/Makefile.include | 2 +
tests/test-image-lock.c | 200 +++
tests/test-replication.c | 6 +-
3 files changed, 205 insertions(+), 3 deletions(-)
create mode 100644 tests/test-image-lock.c
diff --git a/tests/Make
Writing to the same qcow2 file from two QEMU processes at the same time
will never work correctly, so disable it even when the caller specifies
BDRV_O_RDWR.
Other formats are less vulnerable because they don't have internal
snapshots thus qemu-img is less often misused to create live snapshot.
Si
Eric Blake writes:
> On 01/19/2017 03:07 PM, Michael S. Tsirkin wrote:
>> There are theoretical concerns that some compilers might not trigger
>> build failures on attempts to define an array of size -1 and make it a
>> variable sized array instead.
>
> Rather, the concern is that if someone chan
"Michael S. Tsirkin" writes:
> There are theoretical concerns that some compilers might not trigger
> build failures on attempts to define an array of size -1 and make it a
> variable sized array instead. Let rewrite using a struct with a negative
> bit field size instead as there are no dynamic
In the case where we test the expected error when a blockdev-snapshot
target already has a backing image, backing chain is opened multiple
times. This will be a problem when we use image locking, so use a
different backing file that is not already open.
Signed-off-by: Fam Zheng
---
tests/qemu-io
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/055 | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index 1d3fd04..20a7596 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -45
In this case we may open the source's backing image chain multiple
times. Setting share flag means the new open won't try to acquire or
check any lock, once we implement image locking.
Signed-off-by: Fam Zheng
---
blockdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/blockdev.c b/blo
Eric Blake writes:
> On 01/19/2017 04:11 PM, Michael S. Tsirkin wrote:
>
+#define QEMU_IS_ARRAY(x) (!__builtin_types_compatible_p(typeof(x), \
+typeof(&(x)[0])))
#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / siz
To avoid image lock failures.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/172 | 53 --
tests/qemu-iotests/172.out | 50 ++-
2 files changed, 54 insertions(+), 49 deletions(-)
diff --git a/tests/qemu-iote
Signed-off-by: Fam Zheng
---
tests/drive_del-test.c| 2 +-
tests/nvme-test.c | 2 +-
tests/usb-hcd-uhci-test.c | 2 +-
tests/usb-hcd-xhci-test.c | 2 +-
tests/virtio-blk-test.c | 2 +-
tests/virtio-scsi-test.c | 4 ++--
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a
qemu-io is a low level tool to read or modify guest visible data, which
implies the user knows very well what is being done. Allowing reading
from a locked image is harmless in most cases, so do it.
Signed-off-by: Fam Zheng
---
qemu-io.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu
This implements open flag sensible image locking for local file
and host device protocol.
virtlockd in libvirt locks the first byte, so we start looking at the
file bytes from 1.
Quoting what was proposed by Kevin Wolf , there are
four locking modes by combining two bits (BDRV_O_RDWR and
BDRV_O_S
The COLO block replication architecture requires one disk to be shared
between primary and secondary, in the test both processes use posix file
protocol (instead of over NBD) so it is affected by image locking.
Disable the lock.
Signed-off-by: Fam Zheng
---
tests/test-replication.c | 9 +++--
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/091 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/qemu-iotests/091 b/tests/qemu-iotests/091
index 32bbd56..10ac4a8 100755
--- a/tests/qemu-iotests/091
+++ b/tests/qemu-iotests/091
@@ -95,7 +95,9 @@ echo "vm2: qemu process running succe
They are wrappers of POSIX fcntl "file private locking", with a
convenient "try lock" wrapper implemented with F_OFD_GETLK.
Signed-off-by: Fam Zheng
---
include/qemu/osdep.h | 3 +++
util/osdep.c | 48
2 files changed, 51 insertions(+)
d
Checking the status of an image when it is being used by guest is
usually useful, and there is no risk of corrupting data, so don't let
the upcoming image locking feature limit this use case.
Signed-off-by: Fam Zheng
---
qemu-img.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/030 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 54db54a..fe0c73f 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -114,7 +114,7 @@ class TestSingleD
The test scenario doesn't require the same image, instead it focuses on
the duplicated node-name, so use null-co to avoid locking conflict.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/087 | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/087 b/tests
v11: Move lock bytes from 1-2 to 0x10-0x12. [Daniel]
v10: While we still don't have comprehensive propagation mechanism that will be
provided by new op blocker system for "permissive modes", the locking enabled
by default is regardlessly useful and long overdue. So I think we should merge
this for
Signed-off-by: Fam Zheng
---
include/block/block.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/block/block.h b/include/block/block.h
index 8b0dcda..243839d 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -97,6 +97,8 @@ typedef struct HDGeometry {
"Michael S. Tsirkin" writes:
> On Thu, Jan 19, 2017 at 02:33:40PM +0100, Markus Armbruster wrote:
>> Paolo Bonzini writes:
>>
>> > On 19/01/2017 09:12, Markus Armbruster wrote:
>> >> "Michael S. Tsirkin" writes:
>> >>
>> >>> QEMU_BUILD_BUG_ON uses a typedef in order to be safe
>> >>> to use o
Eric Blake writes:
> On 01/19/2017 03:48 AM, Markus Armbruster wrote:
>> Eric Blake writes:
>>
>>> Having a named rather than anonymous C type will make it easier
>>> to improve the testsuite in a later patch.
>>
>> Post it together with said later patch then.
>
> It was that way in the v1 ser
> From: Alex Williamson
> Sent: Thursday, January 19, 2017 6:32 AM
>
> On Sat, 31 Dec 2016 17:13:07 +0800
> Cao jin wrote:
>
> > From: Chen Fan
> >
> > When physical device has uncorrectable error hanppened, the vfio_pci
> > driver will signal the uncorrectable error status register value to
>
On 01/19/2017 06:31 AM, Alex Williamson wrote:
> On Sat, 31 Dec 2016 17:13:07 +0800
> Cao jin wrote:
>
>> From: Chen Fan
>>
>> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
>> index 76a8ac3..9861f72 100644
>> --- a/hw/vfio/pci.c
>> +++ b/hw/vfio/pci.c
>> @@ -2470,21 +2470,55 @@ static void vfio_
We don't use 1ULL which is wrong during size calculation. Fix it, and
while at it, switch to use cto64() and adds a comments to make it
simpler and easier to be understood.
Reported-by: Paolo Bonzini
Cc: Paolo Bonzini
Signed-off-by: Jason Wang
---
hw/i386/intel_iommu.c | 10 +-
1 file
On 01/19/2017 06:36 AM, Alex Williamson wrote:
> On Sat, 31 Dec 2016 17:13:08 +0800
> Cao jin wrote:
>
>> From: Chen Fan
>>
>> Add 'aer' property, let user choose whether expose the aer capability
>> or not.
>
> But that's not what it does, it only controls the behavior in response
> to non-f
On 01/19/2017 06:09 AM, Alex Williamson wrote:
> On Sat, 31 Dec 2016 17:13:06 +0800
> Cao jin wrote:
>
>> From: Chen Fan
>>
>> Introduce new function to initilize AER capability registers
>> for vfio-pci device.
>>
>> Signed-off-by: Chen Fan
>> Signed-off-by: Dou Liyang
>> Signed-off-by: Cao
On Thu, Jan 19, 2017 at 09:21:10PM -0700, Alex Williamson wrote:
> On Fri, 20 Jan 2017 11:43:28 +0800
> Peter Xu wrote:
>
> > On Thu, Jan 19, 2017 at 10:54:37AM -0700, Alex Williamson wrote:
> > > On Thu, 19 Jan 2017 17:25:29 +0800
> > > Peter Xu wrote:
> > >
> > > > This requirement originat
On Fri, 20 Jan 2017 11:43:28 +0800
Peter Xu wrote:
> On Thu, Jan 19, 2017 at 10:54:37AM -0700, Alex Williamson wrote:
> > On Thu, 19 Jan 2017 17:25:29 +0800
> > Peter Xu wrote:
> >
> > > This requirement originates from the VT-d vfio series:
> > >
> > > https://lists.nongnu.org/archive/htm
Some code logic only be needed in non-shared disk, here
we adjust these codes to prepare for shared disk scenario.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: zhanghailiang
---
block/replication.c | 47 ---
1 file changed, 28 insertions(+), 19 deletio
Just as the scenario of non-shared disk block replication,
we are going to implement block replication from many basic
blocks that are already in QEMU.
The architecture is:
virtio-blk ||
.--
/
We use these two options to identify which disk is
shared
Cc: Eric Blake
Signed-off-by: zhanghailiang
Signed-off-by: Wen Congyang
Signed-off-by: Zhang Chen
---
v3:
- Move g_free(s->shared_disk_id) to the common fail process place (Stefan)
- Fix comments for these two options
---
block/replica
The helper backup_do_checkpoint() will be used for primary related
codes. Here we split it out from secondary_do_checkpoint().
Besides, it is unnecessary to call backup_do_checkpoint() in
replication starting and normally stop replication path.
We only need call it while do real checkpointing.
Re
COLO block replication doesn't support the shared disk case,
Here we try to implement it and this is the third version.
Last posted series patches:
https://lists.gnu.org/archive/html/qemu-block/2016-12/msg00039.html
You can refer to the above link if want to test it.
I have uploaded the new versi
Introuduce the scenario of shared-disk block replication
and how to use it.
Reviewed-by: Changlong Xie
Reviewed-by: Stefan Hajnoczi
Signed-off-by: zhanghailiang
Signed-off-by: Wen Congyang
Signed-off-by: Zhang Chen
---
docs/block-replication.txt | 139
Without this callback, there will be an error reports in the primary side:
"qemu-system-x86_64: Couldn't determine the cluster size of the target image,
which has no backing file: Operation not supported
Aborting, since this may create an unusable destination image"
For nbd driver, it doesn't have
On Thu, Jan 19, 2017 at 10:54:37AM -0700, Alex Williamson wrote:
> On Thu, 19 Jan 2017 17:25:29 +0800
> Peter Xu wrote:
>
> > This requirement originates from the VT-d vfio series:
> >
> > https://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg03495.html
> >
> > The goal of this series i
At 01/19/2017 01:13 AM, Igor Mammedov wrote:
possible_cpus could be initialized earlier then cpu objects,
s/then/than/
i.e. when -smp is parsed so move init code to possible_cpu_arch_ids()
[...]
On 2017年01月20日 06:27, Michael S. Tsirkin wrote:
On Thu, Jan 19, 2017 at 11:12:21AM +0800, Jason Wang wrote:
On 2017年01月19日 01:50, Michael S. Tsirkin wrote:
On Wed, Jan 18, 2017 at 10:42:48AM +0800, Jason Wang wrote:
On 2017年01月17日 22:44, Michael S. Tsirkin wrote:
On Tue, Jan 17, 2017 at 12
From: Peter Maydell
Commit 091a6b2ac fixed most of the memory leaks in failure
paths in net_init_tap() reported by Coverity (CID 1356216),
but missed one. Fix it by deferring the allocation of
fds and vhost_fds until after the error check.
Signed-off-by: Peter Maydell
Signed-off-by: Jason Wang
From: Alex Kompel
object_property_set_bool(OBJECT(dev), true, "realized", &err) in
pci_nic_init_nofail may release the object if device fails to
initialize which leads to use-after-free in error handling block.
qdev_init_nofail does the same thing while holding the reference.
(gdb) run -net nic
From: Peter Maydell
The dp8393x has several 32-bit values which are formed by concatenating
two 16 bit device register values. Attempting to do these inline
with ((s->reg[HI] << 16) | s->reg[LO]) can result in an unintended
sign extension because "x << 16" is of type 'int' even though s->reg
is u
From: Thomas Huth
When running qemu-system-m68k with the "-net" parameter (for example
simply "-net nic -net user"), there is currently a confusing warning
message saying:
Warning: requested NIC (anonymous, model mcf_fec) was not created
(not supported by this machine?)
This seems to happen b
The following changes since commit 0f6bcf68a99efdc531b209551f2b760b0bdcc554:
Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170118' into
staging (2017-01-19 18:34:13 +)
are available in the git repository at:
https://github.com/jasowang/qemu.git tags/net-pull-request
fo
From: Zhang Chen
Say it in another way to make it easier to understand.
Signed-off-by: Zhang Chen
Signed-off-by: Eric Blake
Signed-off-by: Stefan Weil
Signed-off-by: Jason Wang
---
docs/colo-proxy.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docs/colo-proxy.txt
From: Ladi Prosek
Very simple loop optimization with a significant performance impact.
Microbenchmark results, modern x86-64:
buffer size | speed up
+-
1500| 1.7x
64 | 1.5x
8 | 1.15x
Microbenchmark results, POWER7:
buffer size | speed up
From: Shannon Zhao
For ARM virt machine, if we use virt-2.7 which will not create ITS node,
the virtio-net can not recieve interrupts so it can't get ip address
through dhcp.
This fixes commit 83d768b(virtio: set ISR on dataplane notifications).
Signed-off-by: Shannon Zhao
---
hw/virtio/virtio
On 2017/1/20 0:41, Stefan Hajnoczi wrote:
On Thu, Jan 19, 2017 at 10:50:19AM +0800, Hailiang Zhang wrote:
On 2017/1/13 21:41, Stefan Hajnoczi wrote:
On Mon, Dec 05, 2016 at 04:34:59PM +0800, zhanghailiang wrote:
+Issue qmp command:
+ { 'execute': 'blockdev-add',
+'arguments': {
+'
On Thu, Jan 19, 2017 at 03:57:34PM -0700, Alex Williamson wrote:
> On Fri, 20 Jan 2017 00:21:02 +0200
> "Michael S. Tsirkin" wrote:
>
> > On Thu, Jan 19, 2017 at 03:10:56PM -0700, Alex Williamson wrote:
> > > On Thu, 19 Jan 2017 22:16:03 +0200
> > > "Michael S. Tsirkin" wrote:
> > >
> > > > T
On Thu, 01/19 17:43, Peter Lieven wrote:
> commit e1123a3b introduced a data corruption regression
> in the iscsi driver because it passed -1 as nr to bitmap_set
> and bitmap_clear. Add an assertion to catch such flaws earlier.
>
> Suggested-by: Fam Zheng
> Signed-off-by: Peter Lieven
> ---
> u
On Thu, 01/19 15:49, Daniel P. Berrange wrote:
> On Thu, Jan 19, 2017 at 10:38:14PM +0800, Fam Zheng wrote:
> > This implements open flag sensible image locking for local file
> > and host device protocol.
> >
> > virtlockd in libvirt locks the first byte, so we start looking at the
> > file bytes
Alex Bennée writes:
> From: KONRAD Frederic
>
> We know there will be cases where MTTCG won't work until additional work
> is done in the front/back ends to support. It will however be useful to
> be able to turn it on.
>
> As a result MTTCG will default to off unless the combination is
> suppor
On 01/16/17 11:00 +, Stefan Hajnoczi wrote:
On Mon, Jan 16, 2017 at 01:55:34PM +0800, Xiao Guangrong wrote:
On 01/14/2017 02:02 AM, Eduardo Habkost wrote:
> On Fri, Jan 13, 2017 at 01:17:27PM +, Stefan Hajnoczi wrote:
> > On Fri, Jan 13, 2017 at 07:56:51PM +0800, Haozhong Zhang wrote:
>
Alex Bennée writes:
> This enables the multi-threaded system emulation by default for ARMv7
> and ARMv8 guests using the x86_64 TCG backend. This is because on the
> guest side:
>
> - The ARM translate.c/translate-64.c have been converted to
> - use MTTCG safe atomic primitives
> - emit
On 01/19/2017 04:11 PM, Michael S. Tsirkin wrote:
>>> +#define QEMU_IS_ARRAY(x) (!__builtin_types_compatible_p(typeof(x), \
>>> +typeof(&(x)[0])))
>>> #ifndef ARRAY_SIZE
>>> -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
>>> +#define AR
On Fri, 20 Jan 2017 00:21:02 +0200
"Michael S. Tsirkin" wrote:
> On Thu, Jan 19, 2017 at 03:10:56PM -0700, Alex Williamson wrote:
> > On Thu, 19 Jan 2017 22:16:03 +0200
> > "Michael S. Tsirkin" wrote:
> >
> > > This is a design and an initial patch for kernel side for AER
> > > support in VFI
On Thu, Jan 19, 2017 at 11:12:21AM +0800, Jason Wang wrote:
>
>
> On 2017年01月19日 01:50, Michael S. Tsirkin wrote:
> > On Wed, Jan 18, 2017 at 10:42:48AM +0800, Jason Wang wrote:
> > >
> > > On 2017年01月17日 22:44, Michael S. Tsirkin wrote:
> > > > On Tue, Jan 17, 2017 at 12:01:00PM +0800, Jason Wa
On Thu, Jan 19, 2017 at 03:10:56PM -0700, Alex Williamson wrote:
> On Thu, 19 Jan 2017 22:16:03 +0200
> "Michael S. Tsirkin" wrote:
>
> > This is a design and an initial patch for kernel side for AER
> > support in VFIO.
> >
> > 0. What happens now (PCIE AER only)
> >Fatal errors cause a lin
On Thu, Jan 19, 2017 at 03:59:33PM -0600, Eric Blake wrote:
> On 01/19/2017 03:07 PM, Michael S. Tsirkin wrote:
> > It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring
> > changes the argument from an array to a pointer to a dynamically
> > allocated buffer. Code keeps compiling b
On Thu, 19 Jan 2017 22:16:03 +0200
"Michael S. Tsirkin" wrote:
> This is a design and an initial patch for kernel side for AER
> support in VFIO.
>
> 0. What happens now (PCIE AER only)
>Fatal errors cause a link reset.
>Non fatal errors don't.
>All errors stop the VM eventually, but
On 01/19/2017 03:07 PM, Michael S. Tsirkin wrote:
> It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring
> changes the argument from an array to a pointer to a dynamically
> allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now
> return the size of the pointer divided
On 01/19/2017 03:07 PM, Michael S. Tsirkin wrote:
> All users include the trailing ; anyway, let's require that -
> it seems cleaner.
>
> Signed-off-by: Michael S. Tsirkin
> ---
> include/qemu/compiler.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake
>
> di
Le 16/01/2017 à 20:06, mar.krzeminski a écrit :
W dniu 16.01.2017 o 18:22, Peter Maydell pisze:
On 11 January 2017 at 20:00, Jean-Christophe Dubois
wrote:
The i.MX SPI device was not de-asserting the CS line at the end of
memory access.
This triggered a SIGSEGV in Qemu when the sabrelite emul
Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too)
is wrong because elem->out_sg is a pointer.
However, the check is not in the right place and the max_size argument
of virtqueue_map_iovec can be removed. The check on in_num/out_num
should be moved to qemu_get_virtqueue_eleme
Useful to send guest data back to QEMU.
Changes from Laszlo Ersek :
- rebase the patch from Michael Tsirkin's original postings at [1] and [2]
to the following patches:
- loader: Allow a custom AddressSpace when loading ROMs
- loader: Add AddressSpace loading support to uImages
- loader: f
On 01/19/2017 03:07 PM, Michael S. Tsirkin wrote:
> QEMU_BUILD_BUG_ON uses a typedef in order to be safe
> to use outside functions, but sometimes it's useful
> to have a version that can be used within an expression.
> Following what Linux does, introduce QEMU_BUILD_BUG_ON_ZERO
> that return zero
On 01/19/2017 03:07 PM, Michael S. Tsirkin wrote:
> There are theoretical concerns that some compilers might not trigger
> build failures on attempts to define an array of size -1 and make it a
> variable sized array instead.
Rather, the concern is that if someone changes code so that the 'x' of
Q
From: Eduardo Habkost
Cc: "Michael S. Tsirkin"
Cc: Laszlo Ersek
Cc: Igor Mammedov
Signed-off-by: Eduardo Habkost
Reviewed-by: Laszlo Ersek
Reviewed-by: Michael S. Tsirkin
Acked-by: Gabriel Somlo
Tested-by: Gabriel Somlo
Cc: Gabriel Somlo
Signed-off-by: Laszlo Ersek
Reviewed-by: Michael
Update header from latest linux driver. Session creation structs gain
padding to make them same size. Formatting cleanups.
Signed-off-by: Michael S. Tsirkin
Tested-by: Gonglei
Reviewed-by: Gonglei
---
include/standard-headers/linux/virtio_crypto.h | 481 +
1 file chang
Upstream does not have it, uses VIRTIO_F_IOMMU_PLATFORM
to signal support instead.
Signed-off-by: Michael S. Tsirkin
---
linux-headers/linux/vhost.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index ac7a1f1..1e86a3d 100644
--- a/
From: Jason Wang
This patches implements Device IOTLB support for vhost kernel. This is
done through:
1) switch to use dma helpers when map/unmap vrings from vhost codes
2) introduce a set of VhostOps to:
- setting up device IOTLB request callback
- processing device IOTLB request
- pro
virtio core has code to revert queue number
to maximum on reset. Drop TODO to add that.
Signed-off-by: Michael S. Tsirkin
Reviewed-by: Stefan Hajnoczi
---
hw/virtio/virtio-pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 8baaf2b..092
From: Stefan Hajnoczi
This reverts commit aff8fd18f1786fc5af259a9bc0077727222f51ca.
Both virtio-net and virtio-crypto do not balance
virtio_queue_set_notification() enable and disable calls. This makes
the notifications_disabled counter unreliable and Doug Goldstein
reported the following asser
this drops a duplicate definition of
PCI_EXT_CAP_ATS_SIZEOF
Signed-off-by: Michael S. Tsirkin
---
include/standard-headers/linux/pci_regs.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/standard-headers/linux/pci_regs.h
b/include/standard-headers/linux/pci_regs.h
index be5b066..e5a
From: Jason Wang
We allow vhost to clear VIRITO_F_IOMMU_PLATFORM which is wrong since
VIRTIO_F_IOMMU_PLATFORM is mandatory for security. Fixing this by
enforce it after vdc->get_features().
Signed-off-by: Jason Wang
Reviewed-by: Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin
---
hw/vir
From: Laszlo Ersek
More precisely, the "x-file-slots" count is bumped for all machine types
that:
(a) use fw_cfg, and
(b) are not versioned (hence migration is not expected to work for them
across QEMU releases anyway), or have version 2.9.
This affects machine types implemented in the follo
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring
changes the argument from an array to a pointer to a dynamically
allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now
return the size of the pointer divided by element size.
Let's add build time checks to ARRAY_SI
Switch to virtio_mmio.h from Linux - will make it
easier to implement virtio 1.
Signed-off-by: Michael S. Tsirkin
---
hw/virtio/virtio-mmio.c | 95 +++--
1 file changed, 37 insertions(+), 58 deletions(-)
diff --git a/hw/virtio/virtio-mmio.c b/hw/virti
In 4.10, Linux is switching from __bitwise__ to use __bitwise
exclusively. Update our script accordingly.
Signed-off-by: Michael S. Tsirkin
---
scripts/update-linux-headers.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/update-linux-headers.sh b/scripts/update-lin
From: Laszlo Ersek
We'd like to raise the value of FW_CFG_FILE_SLOTS. Doing it naively could
lead to problems with backward migration: a more recent QEMU (running an
older machine type) would allow the guest, in fw_cfg_select(), to select a
high key value that is unavailable in the same machine t
All users include the trailing ; anyway, let's require that -
it seems cleaner.
Signed-off-by: Michael S. Tsirkin
---
include/qemu/compiler.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 157698b..7512082 100644
---
Signed-off-by: Michael S. Tsirkin
---
include/standard-headers/linux/virtio_mmio.h | 141 +++
1 file changed, 141 insertions(+)
create mode 100644 include/standard-headers/linux/virtio_mmio.h
diff --git a/include/standard-headers/linux/virtio_mmio.h
b/include/standard-h
From: Stefan Hajnoczi
While AioContext is in polling mode virtqueue notifications are not
necessary. Some device virtqueue handlers enable notifications. Make
sure they stay disabled to avoid unnecessary vmexits.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Michael S. Tsirkin
Signed-off-by: M
Turns out virtio kept using ARRAY_SIZE on fields which stopped
being arrays, this was noticed by a coverity scan.
I fixed this up, this patchset fixes up the ARRAY_SIZE macro so that this
bug does not reappear in any other place.
changes from v2:
- dropped the merged virtio patch
- whitesp
The following changes since commit 23eb9e6b6d5315171cc15969bbc755f258004df0:
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-01-16' into
staging (2017-01-17 13:53:50 +)
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_u
Instead of using kvm_enabled to order the "-cpu help" list, use a
new "ordering" field for that.
Signed-off-by: Eduardo Habkost
---
target/i386/cpu-qom.h | 2 ++
target/i386/cpu.c | 8
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/i386/cpu-qom.h b/target/i386
From: Paolo Bonzini
virtio-net-pci does not enable ioeventfd for historical reasons (and
nobody ever checked whether it should be revisited). Note that other
backends do enable ioeventfd for virtio-net.
However, it has a major effect on performance. On Windows, throughput is
_multiplied_ by 2
There are theoretical concerns that some compilers might not trigger
build failures on attempts to define an array of size -1 and make it a
variable sized array instead. Let rewrite using a struct with a negative
bit field size instead as there are no dynamic bit field sizes. This is
similar to wh
QEMU_BUILD_BUG_ON uses a typedef in order to be safe
to use outside functions, but sometimes it's useful
to have a version that can be used within an expression.
Following what Linux does, introduce QEMU_BUILD_BUG_ON_ZERO
that return zero after checking condition at build time.
Signed-off-by: Mich
Instead of reporting host CPUID data on "max", use the qemu64 CPU
model as reference to initialize CPUID
vendor/family/model/stepping/model-id.
Signed-off-by: Eduardo Habkost
---
target/i386/cpu.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
These are not needed since linux-headers/ provides up-to-date definitions.
The constants are in linux-headers/asm-powerpc/kvm.h.
The sole users, hw/intc/xics_kvm.c and target/ppc/kvm.c, include asm/kvm.h
via sysemu/kvm.h->linux/kvm.h.
Signed-off-by: Paolo Bonzini
---
target/ppc/kvm_ppc.h | 12 -
Rename the existing "host" CPU model to "max, and set it to
kvm_enabled=false. The new "max" CPU model will be able to enable
all features supported by TCG out of the box, because its logic
is based on x86_cpu_get_supported_feature_word(), which already
works with TCG.
A new KVM-specific "host" cl
The class is now safe because the assert(kvm_enabled()) line was
removed by commit e435601058e656e6d24e3e87b187e5518f7bf16a.
Signed-off-by: Eduardo Habkost
---
target/i386/cpu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index cff23e129d..7947c8737
Rename the field and add a small comment to make its purpose
clearer.
Signed-off-by: Eduardo Habkost
---
target/i386/cpu.h | 2 +-
target/i386/cpu.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 10c5a3538d..889363e120 10064
On Thu, Jan 19, 2017 at 02:58:48PM -0600, Eric Blake wrote:
> On 01/19/2017 01:25 PM, Michael S. Tsirkin wrote:
>
> > +#define QEMU_BUILD_BUG_ON_ZERO(x) (sizeof(int[(x) ? -1 : 1]) -
> > sizeof(int))
> >>>
> >>> Linux here uses:
> >>>
> >>> #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int
This is v2 of the previous series that enabled the "host" CPU
model on TCG. Now a new "max" CPU is being added, while keeping
"host" KVM-specific.
In addition to simply adding "max" as a copy of the existing
"host" CPU model, additional patches change it to not use any
host CPUID information when
Host CPUID info is used by the "max" CPU model only in KVM mode.
Move the initialization of CPUID data for "max" from class_init
to instance_init, and don't set CPUClass::cpu_def for "max".
Signed-off-by: Eduardo Habkost
---
target/i386/cpu-qom.h | 4 +++-
target/i386/cpu.c | 45 +++
On Thu, Jan 19, 2017 at 02:33:40PM +0100, Markus Armbruster wrote:
> Paolo Bonzini writes:
>
> > On 19/01/2017 09:12, Markus Armbruster wrote:
> >> "Michael S. Tsirkin" writes:
> >>
> >>> QEMU_BUILD_BUG_ON uses a typedef in order to be safe
> >>> to use outside functions, but sometimes it's use
Looks like we didn't mark PCI ROMs as RO allowing
mischief such as guests writing there.
Further, e.g. vhost gets confused trying to allocate
enough space to log writes there. Fix it up.
Signed-off-by: Michael S. Tsirkin
---
hw/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dif
1 - 100 of 354 matches
Mail list logo