> -Original Message-
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Sent: 18 February 2019 10:59
> To: Paul Durrant
> Cc: Anthony Perard ; 'Peter Maydell'
> ; QEMU Developers
> Subject: Re: [Qemu-devel] QEMU xen coverity issues
>
> Am 18.02.2019 um 11:28 hat Paul Durrant geschrieben:
>
On 2/19/19 10:13 AM, Daniel P. Berrangé wrote:
> If we abort the iotest early the server.log file might contain useful
> information for diagnosing the problem. Ensure its contents are
> displayed in this case.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> tests/qemu-iotests/233 | 3 +++
> 1
On 2/19/19 10:21 AM, Daniel P. Berrangé wrote:
>>> +tls_certtool()
>>> +{
>>> +certtool "$@" 1>certtool.log 2>&1
>>> +if test "$?" = 0; then
>>> + head -1 certtool.log
>>> +else
>>> + cat certtool.log
>>> +fi
>>> +rm -f certtool.log
>>> +}
>>
>> I assume this is
On 2/19/19 10:13 AM, Daniel P. Berrangé wrote:
> When we run "certtool | head -1" the latter command is likely to
> complete and exit before certtool has written everything it wants to
> stderr. In at least the RHEL-7 gnutls 3.3.29 this causes certtool to
> quit with broken pipe before it has
Patchew URL: https://patchew.org/QEMU/20190218125615.18970-1-arm...@redhat.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Message-id: 20190218125615.18970-1-arm...@redhat.com
Subject: [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups
On Tue, Feb 19, 2019 at 03:25:30PM +0100, Cédric Le Goater wrote:
> Patch "target/ppc: Add POWER9 external interrupt model" should have
> removed the section covering PPC_FLAGS_INPUT_POWER7.
>
> Signed-off-by: Cédric Le Goater
Applied to ppc-for-4.0, thanks.
> ---
> hw/intc/xive.c | 3 ---
>
On 19/02/2019 19.18, Paolo Bonzini wrote:
> On 19/02/19 16:55, Thomas Huth wrote:
>> With the upcoming Kconfig-like build system, it will be easy to
>> build also version of QEMU that only contain a single machine. Some
>> of these machines (like the ARM cubieboard) use CONFIG_AHCI for an
>> AHCI
On Tue, Feb 19, 2019 at 10:37:27AM -0500, Stephen Checkoway wrote:
>Don't dynamically allocate the pflash's timer. But do use timer_del in
>an unrealize function to make sure that the timer can't fire after the
>pflash_t has been freed.
>
>Signed-off-by: Stephen Checkoway
Reviewed-by: Wei Yang
On 2/19/19 6:31 PM, Wei Yang wrote:
> We didn't specify the indent rule for multiline code here, which may
> misleading users. And in current code, the code use different rules.
s/misleading/mislead/
>
> Add this rule in CODING_STYLE to make sure this is clear to every one.
>
> Signed-off-by:
On Tue, Feb 19, 2019 at 09:02:34PM -0600, Eric Blake wrote:
>On 2/19/19 6:31 PM, Wei Yang wrote:
>> We didn't specify the indent rule for multiline code here, which may
>> misleading users. And in current code, the code use different rules.
>
>s/misleading/mislead/
>
>>
>> Add this rule in
On 2/20/19 2:55 AM, Like Xu wrote:
> Signed-off-by: Like Xu
This feels like two independent patches - the .gitignore change is
different from typo fixes.
Actually, for .gitignore, you could just as easily do:
echo '*.patch' >> .git/info/exclude
and fix it so you never commit patch files
The first one is suggested by Igor Mammedov to provide rule for multiline
code.
The second is a trivial fix to make example code all indented with 4 spaces.
v3:
* fix typo in both changelog and example
v2:
* adjust Patch 1 as suggested by Eric
Wei Yang (2):
CODING_STYLE: specify the
All the example code are indented with four spaces except this one.
Fix this by adding four spaces here.
Signed-off-by: Wei Yang
Reviewed-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
---
CODING_STYLE | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
On Tue, Feb 19, 2019 at 06:17:58PM +0100, Greg Kurz wrote:
> All DRC subtypes have been converted to generate the FDT fragment at
> configure connector time instead of attach time. The fdt and fdt_offset
> arguments of spapr_drc_attach() aren't needed anymore. Drop them and
> make the
On Tue, Feb 19, 2019 at 06:18:13PM +0100, Greg Kurz wrote:
> This will be used by PHB hotplug in order to create the "interrupt-map"
> property of the PHB node.
>
> Signed-off-by: Greg Kurz
Applied, thanks.
> ---
> v5: - return phandle by value
> v4: - return phandle via a pointer
> ---
>
On Tue, Feb 19, 2019 at 06:18:03PM +0100, Greg Kurz wrote:
> The pseries machine only uses LSIs to support legacy PCI devices. Every
> PHB claims 4 LSIs at realize time. When using in-kernel XICS (or upcoming
> in-kernel XIVE), QEMU synchronizes the state of all irqs, including these
> LSIs, later
On Tue, Feb 19, 2019 at 06:18:23PM +0100, Greg Kurz wrote:
> From: Michael Roth
>
> Signed-off-by: Michael Roth
> Reviewed-by: David Gibson
> Signed-off-by: Greg Kurz
Applied, thanks.
> ---
> hw/ppc/spapr.c | 13 +
> hw/ppc/spapr_drc.c | 17
On Tue, Feb 19, 2019 at 06:18:29PM +0100, Greg Kurz wrote:
> From: Nathan Fontenot
>
> This add entries to the root OF node to advertise our PHBs as being
> DR-capable in accordance with PAPR specification.
>
> Signed-off-by: Nathan Fontenot
> Signed-off-by: Michael Roth
> Reviewed-by: David
On Tue, Feb 19, 2019 at 06:19:30PM -0500, Paolo Bonzini wrote:
>
> > > Makes sense, but it is also abstraction time. :) What if instead there
> > > was a function
> > >
> > > void msi_allocate_irqs(PCIDevice *pdev, int num, bool fallback_to_intx);
> > >
> > > and then ich.c did
> > >
> > >
Signed-off-by: Richard Henderson
---
target/arm/cpu.h | 5
target/arm/translate-a64.c | 58 ++
2 files changed, 63 insertions(+)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 000e778619..0480f9baba 100644
--- a/target/arm/cpu.h
+++
On Tue, Feb 19, 2019 at 11:25:43AM +, Dr. David Alan Gilbert wrote:
> * Yan Zhao (yan.y.z...@intel.com) wrote:
> > If a device has device memory capability, save/load data from device memory
> > in pre-copy and stop-and-copy phases.
> >
> > LOGGING state is set for device memory for dirty
On Tue, Feb 19, 2019 at 07:59:28PM +, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert"
>
> During a cancelled migration there's a race where the fd can
> go into an error state before we get back around the migration loop
> and migration_detect_error transitions from
We didn't specify the indent rule for multiline code here, which may
mislead users. And in current code, the code use different rules.
Add this rule in CODING_STYLE to make sure this is clear to every one.
Signed-off-by: Wei Yang
Suggested-by: Igor Mammedov
Reviewed-by: Eric Blake
---
v3:
On Tue, Feb 19, 2019 at 06:18:08PM +0100, Greg Kurz wrote:
> This will be needed by PHB hotplug in order to access the "phandle"
> property of the interrupt controller node.
>
> Reviewed-by: Cédric Le Goater
> Signed-off-by: Greg Kurz
> Reviewed-by: David Gibson
Applied, thanks.
> ---
>
On Tue, Feb 19, 2019 at 06:17:33PM +0100, Greg Kurz wrote:
> This allows to hotplug/unplug PHBs. I could successfully test:
> - using in-kernel XICS, emulated XICS and XIVE
> - hotplug/unplug with e1000 device to validate LSIs
> - hotplug/unplug with virtio-net device to validate MSIs
> - some
On Tue, Feb 19, 2019 at 06:18:39PM +0100, Greg Kurz wrote:
> From: Michael Roth
>
> PHB hotplug re-uses PHB device tree generation code and passes
> it to a guest via RTAS. Doing this requires knowledge of where
> exactly in the device tree the node describing the PHB begins.
>
> Provide this
Aleksandar Markovic writes:
> From: Pavel Dovgalyuk
>
> This patch enables QMP-based querying of the available CPU types for
> MIPS and MIPS64 platforms.
>
> Signed-off-by: Pavel Dovgalyuk
> Signed-off-by: Aleksandar Markovic
> Reviewed-by: Philippe Mathieu-Daudé
> Tested-by: Philippe
On Tue, Feb 19, 2019 at 11:01:45AM +, Dr. David Alan Gilbert wrote:
> * Yan Zhao (yan.y.z...@intel.com) wrote:
> > Device config is the default data that every device should have. so
> > device config capability is by default on, no need to set.
> >
> > - Currently two type of resources are
> From: Aleksandar Markovic [mailto:amarko...@wavecomp.com]
> > From: Markus Armbruster
> > Subject: Re: [Qemu-devel] [PATCH] mips: implement qmp query-cpu-definitions
> > command
>
> > Please rebase. Let me know if you need help.
>
> Hi, Markus.
>
> Pavel was probably busy today, so I took
On Tue, Feb 19, 2019 at 11:32:13AM +, Dr. David Alan Gilbert wrote:
> * Yan Zhao (yan.y.z...@intel.com) wrote:
> > This patchset enables VFIO devices to have live migration capability.
> > Currently it does not support post-copy phase.
> >
> > It follows Alex's comments on last version of
On 2019/2/20 11:09, Eric Blake wrote:
On 2/20/19 2:55 AM, Like Xu wrote:
Signed-off-by: Like Xu
This feels like two independent patches - the .gitignore change is
different from typo fixes.
Actually, for .gitignore, you could just as easily do:
echo '*.patch' >> .git/info/exclude
and fix
On 19/02/2019 21.19, Michael S. Tsirkin wrote:
> On Tue, Feb 19, 2019 at 05:07:39PM +0100, Thomas Huth wrote:
>> Some machines have an AHCI adapter, but no PCI. To be able to
>> compile hw/ide/ahci.c without CONFIG_PCI, we still need the two
>> functions msi_enabled() and msi_notify() for linking.
On 20/02/2019 07.37, Wei Yang wrote:
> On Tue, Feb 19, 2019 at 04:55:57PM +0100, Thomas Huth wrote:
>> With the upcoming Kconfig-like build system, it will be easy to
>> build also version of QEMU that only contain a single machine. Some
>
> Sorry for my poor English.
>
> What is also version?
On Wed, Feb 20, 2019 at 04:55:53PM +0800, Like Xu wrote:
>Signed-off-by: Like Xu
>---
> .gitignore | 1 +
> docs/COLO-FT.txt | 2 +-
> docs/amd-memory-encryption.txt | 2 +-
> docs/can.txt | 2 +-
> docs/colo-proxy.txt| 6 +++---
>
On Mon, Feb 11, 2019 at 06:09:24PM +0100, Robin Jarry wrote:
> Hi,
>
> I have several QEMU VMs connected via a vde_switch (with "-netdev vde"
> interfaces). I use this to create virtual network topologies without
> requiring root access (i.e. no tap + bridge on host). Performance is not
> a
On Tue, Feb 19, 2019 at 06:18:44PM +0100, Greg Kurz wrote:
> From: Michael Roth
>
> This is needed to denote a boot-time PHB as being hot-pluggable.
>
> Signed-off-by: Michael Roth
> Reviewed-by: David Gibson
> Signed-off-by: Greg Kurz
Applied, thanks.
> ---
> hw/ppc/spapr_pci.c |9
On Tue, Feb 19, 2019 at 06:18:18PM +0100, Greg Kurz wrote:
> To support PHB hotplug we need to clean up lingering references,
> memory, child properties, etc. prior to the PHB object being
> finalized. Generally this will be called as a result of calling
> object_unparent() on the PHB object,
On Tue, Feb 19, 2019 at 06:18:34PM +0100, Greg Kurz wrote:
> From: Michael Roth
>
> Extend the existing EPOW event format we use for PCI
> devices to emit PHB plug/unplug events.
>
> Signed-off-by: Michael Roth
> Reviewed-by: David Gibson
> Signed-off-by: Greg Kurz
Applied, thanks.
> ---
>
Eric Blake writes:
> On 2/19/19 1:15 PM, Aleksandar Markovic wrote:
>> From: Pavel Dovgalyuk
>>
>> This patch enables QMP-based querying of the available CPU types for
>> MIPS and MIPS64 platforms.
>>
>> Signed-off-by: Pavel Dovgalyuk
>> Signed-off-by: Aleksandar Markovic
>> Reviewed-by:
On Wed, Feb 20, 2019 at 10:34:32AM +0800, Jason Wang wrote:
>
> On 2019/2/20 上午9:54, Wei Xu wrote:
> >On Tue, Feb 19, 2019 at 09:09:33PM +0800, Jason Wang wrote:
> >>On 2019/2/19 下午6:51, Wei Xu wrote:
> >>>On Tue, Feb 19, 2019 at 03:23:01PM +0800, Jason Wang wrote:
> On 2019/2/14 下午12:26,
This decoding more closely matches the ARMv8.4 Table C4-6,
Encoding table for Data Processing - Register Group.
In particular, op2 == 0 is now more than just Add/sub (with carry).
Signed-off-by: Richard Henderson
---
target/arm/translate-a64.c | 98 ++
1
Signed-off-by: Richard Henderson
---
target/arm/cpu.h | 5 ++
linux-user/elfload.c | 1 +
target/arm/cpu64.c | 1 +
target/arm/translate-a64.c | 97 +-
4 files changed, 103 insertions(+), 1 deletion(-)
diff --git a/target/arm/cpu.h
Based-on: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg02733.html
aka the v3 ARMv8.5-MemTag patch set,
or at least some of the early patches that split handle_msr_i.
The v8.4 parts have been tested vs FVP, but there's no released
version that supports v8.5 yet, so XAFlag and AXFlag
Signed-off-by: Like Xu
---
docs/COLO-FT.txt | 2 +-
docs/amd-memory-encryption.txt | 2 +-
docs/can.txt | 2 +-
docs/colo-proxy.txt| 6 +++---
docs/cpu-hotplug.rst | 2 +-
docs/qcow2-cache.txt | 2 +-
docs/qemu-block-drivers.texi
On Tue, Feb 19, 2019 at 04:55:57PM +0100, Thomas Huth wrote:
>With the upcoming Kconfig-like build system, it will be easy to
>build also version of QEMU that only contain a single machine. Some
Sorry for my poor English.
What is also version?
>of these machines (like the ARM cubieboard) use
Now setting, but not relying upon, env->hflags.
Signed-off-by: Richard Henderson
---
v2: Fixed partial conversion to assignment to env->hflags.
---
target/arm/internals.h | 1 +
linux-user/syscall.c | 1 +
target/arm/cpu.c | 1 +
target/arm/helper-a64.c| 3 +++
We will use these to minimize the computation for every call to
cpu_get_tb_cpu_state. For now, the env->hflags variable is not used.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
target/arm/cpu.h | 22 +++-
target/arm/helper.h| 3 +
target/arm/internals.h | 3 +
Changes since v1:
* Apparently I had started a last-minute API change, and failed to
covert all of the users, and also failed to re-test afterward.
* Retain assertions for --enable-debug-tcg.
r~
Richard Henderson (3):
target/arm: Split out recompute_hflags et al
target/arm: Rebuild
All the example code are indented with four spaces except this one.
Fix this by adding four spaces here.
Signed-off-by: Wei Yang
Reviewed-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
---
CODING_STYLE | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
VHOST_USER_HDR_SIZE uses offsetof(), thus is an expression of type
size_t. Update the format string accordingly.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/virtio/vhost-user.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/vhost-user.c
Since strlen() returns an unsigned value, it is pointless to
convert it to a signed one. Use size_t to hold its return value.
Signed-off-by: Philippe Mathieu-Daudé
---
gdbstub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbstub.c b/gdbstub.c
index
The 'size' value is of type 'guint' which is already unsigned.
Remove the useless cast.
Signed-off-by: Philippe Mathieu-Daudé
---
ui/gtk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index 949b143e4e..b5879fdece 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@
In the previous commit we added an assert to be sure than
qemu_chr_be_can_write() will never return a negative value.
We can now change its prototype to return a size_t.
Adapt the backends accordingly.
Suggested-by: Paolo Bonzini
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/baum.c
On 2/20/19 1:51 AM, Wei Yang wrote:
> nvdimm_realize is used to prepare its memory region, while this is done
> in pre_plug stage.
Via the device parent:
pc_dimm_pre_plug()
-> memory_device_pre_plug()
-> MemoryDeviceClass::get_memory_region()
nvdimm_md_get_memory_region()
>
>
On 2/20/19 1:51 AM, Wei Yang wrote:
> realize callback in introduced to check if the backend memory is large
> enough to contain label data and init its memory region, while this task
> is handled in pre_plug stage.
>
> Now it's time to remove it.
Good cleanup!
Michael, can you add:
"This
> > Makes sense, but it is also abstraction time. :) What if instead there
> > was a function
> >
> > void msi_allocate_irqs(PCIDevice *pdev, int num, bool fallback_to_intx);
> >
> > and then ich.c did
> >
> > irqs = msi_allocate_irqs(pdev, 1, true);
> > s->irq = irqs[0];
> >
Some Linux specific code is missing guards, leading to
build failure on OSX:
$ sudo brew install libiscsi
$ ./configure && make
[...]
CC block/iscsi.o
qemu/block/iscsi.c:338:24: error: 'iscsi_aiocb_info' defined but not used
[-Werror=unused-const-variable=]
static const
Both callers in hw/char/virtio-serial-bus.c provide unsigned values,
even the trace event display an unsigned value.
Convert the have_data() handler to take an unsigned value.
Signed-off-by: Philippe Mathieu-Daudé
---
It is funny/scary that there are big comments about how to treat
errors to set
To the Xen team: this is not trivial to me to demonstrate
this assertion can never happen, but then the whole series
is justified and I can convert qemu_chr_fe_write() to use
size_t argument.
Can you help me here?
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/xen_console.c | 1 +
1 file
The usbredirparser_write handler should never be called with a negative
size payload, return an error if this is not the case.
Now that we are sure the 'count' value is positive, make it obvious by
casting it to a size_t.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/usb/redirect.c | 6 +-
1
Both callers (h_put_term_char and rtas_display_character) use
an unsigned value.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/spapr_vty.c| 2 +-
include/hw/ppc/spapr_vio.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/char/spapr_vty.c
Signed-off-by: Like Xu
---
.gitignore | 1 +
docs/COLO-FT.txt | 2 +-
docs/amd-memory-encryption.txt | 2 +-
docs/can.txt | 2 +-
docs/colo-proxy.txt| 6 +++---
docs/cpu-hotplug.rst | 2 +-
docs/qcow2-cache.txt |
Since it is unlikely we have sizeof(mdbo->mto.message) < 0,
we can convert this variable to an unsigned type.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/sclpconsole-lm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/char/sclpconsole-lm.c
On 2/20/19 1:51 AM, Wei Yang wrote:
> Function acpi_memory_plug_cb() is only invoked when dev is a PCDIMM,
> which is hotpluggable. This means it is not necessary to check this
> property again.
>
> This patch removes this check.
>
> Signed-off-by: Wei Yang
> Reviewed-by: Philippe Mathieu-Daudé
On Tue, Feb 19, 2019 at 09:09:33PM +0800, Jason Wang wrote:
>
> On 2019/2/19 下午6:51, Wei Xu wrote:
> >On Tue, Feb 19, 2019 at 03:23:01PM +0800, Jason Wang wrote:
> >>On 2019/2/14 下午12:26, w...@redhat.com wrote:
> >>>From: Wei Xu
> >>>
> >>>This is a helper for packed ring.
> >>>
> >>>To support
This is the payoff.
>From perf record -g data of ubuntu 18 boot and shutdown:
BEFORE:
- 23.02% 2.82% qemu-system-aar [.] helper_lookup_tb_ptr
- 20.22% helper_lookup_tb_ptr
+ 10.05% tb_htable_lookup
- 9.13% cpu_get_tb_cpu_state
3.20% aa64_va_parameters_both
On 2/19/19 11:20 PM, Wei Yang wrote:
> On Tue, Feb 19, 2019 at 07:55:31PM +0100, Philippe Mathieu-Daudé wrote:
>> On 2/19/19 6:56 PM, Eric Blake wrote:
>>> On 2/19/19 11:38 AM, Philippe Mathieu-Daudé wrote:
>>>
> +if (a == 1) {
> +/* Reads like: "If a equals 1" */
I
Patchew URL:
https://patchew.org/QEMU/20190219233421.388-1-richard.hender...@linaro.org/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Message-id: 20190219233421.388-1-richard.hender...@linaro.org
Subject: [Qemu-devel] [PATCH v2 0/3]
The first one is suggested by Igor Mammedov to provide rule for multiline
code.
The second is a trivial fix to make example code all indented with 4 spaces.
v2:
* adjust Patch 1 as suggested by Eric
Wei Yang (2):
CODING_STYLE: specify the indent rule for multiline code
CODING_STYLE:
We didn't specify the indent rule for multiline code here, which may
misleading users. And in current code, the code use different rules.
Add this rule in CODING_STYLE to make sure this is clear to every one.
Signed-off-by: Wei Yang
Suggested-by: Igor Mammedov
---
v2:
* rephrase changelog
On Tue, Feb 19, 2019 at 09:33:40PM +0800, Jason Wang wrote:
>
> On 2019/2/19 下午7:23, Wei Xu wrote:
> >On Tue, Feb 19, 2019 at 03:32:19PM +0800, Jason Wang wrote:
> >>On 2019/2/14 下午12:26,w...@redhat.com wrote:
> >>>From: Wei Xu
> >>>
> >>>Add userspace and vhost kernel/user support.
> >>>
>
nvdimm_realize is used to prepare its memory region, while this is done
in pre_plug stage.
This is time to remove it.
Signed-off-by: Wei Yang
---
v2: split nvdimm part here
---
hw/mem/nvdimm.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
Signed-off-by: Philippe Mathieu-Daudé
---
include/hw/s390x/ebcdic.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/hw/s390x/ebcdic.h b/include/hw/s390x/ebcdic.h
index 69a04cab62..d89174e113 100644
--- a/include/hw/s390x/ebcdic.h
+++
We will reuse this variable in the next patch.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/sclpconsole-lm.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c
index dbc91a1e5b..49543e2c83 100644
---
In put_packet_binary() we have:
uint8_t *p;
for(;;) {
p = s->last_packet;
*(p++) = ...
s->last_packet_len = p - s->last_packet;
put_buffer(s, (uint8_t *)s->last_packet, s->last_packet_len);
The 'p' pointer start at s->last_packet, then is only incremented.
The single caller of xencons_send(), con_event() already use the
difference 'con->buffer.size - con->buffer.consumed'.
Deduplicate by passing the difference as an argument.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/xen_console.c | 12 +++-
1 file changed, 7 insertions(+), 5
All callers provide a size_t argument, we can safely use size_t
for this function.
Signed-off-by: Philippe Mathieu-Daudé
---
gdbstub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdbstub.c b/gdbstub.c
index 69340d7cd1..860e9bb7c7 100644
--- a/gdbstub.c
+++
Avoid to use a signed type to hold an unsigned value.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/tpm/tpm_emulator.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c
index 70f4b10284..931e56f6ed 100644
---
Hi,
This series convert the chardev::qemu_chr_write() to take unsigned
length argument. To do so I went through all caller and checked if
there are no negative value possible.
I'm having headaches with the Xen backend, talking with Marc-André
he suggested I ask help to the Xen maintainers.
This function takes size_t argument and return a size_t.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/terminal3270.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c
index 35b079d5c4..1cb48a3c6f 100644
---
On 2019/2/20 上午9:54, Wei Xu wrote:
On Tue, Feb 19, 2019 at 09:09:33PM +0800, Jason Wang wrote:
On 2019/2/19 下午6:51, Wei Xu wrote:
On Tue, Feb 19, 2019 at 03:23:01PM +0800, Jason Wang wrote:
On 2019/2/14 下午12:26, w...@redhat.com wrote:
From: Wei Xu
This is a helper for packed ring.
To
Patchew URL:
https://patchew.org/QEMU/20190219233421.388-1-richard.hender...@linaro.org/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Message-id: 20190219233421.388-1-richard.hender...@linaro.org
Subject: [Qemu-devel] [PATCH v2 0/3]
Three trivial cleanup for pc-dimm.
Patch [1] remove the check on class->hotpluggable since pc-dimm is always
hotpluggable.
Patch [2] remove nvdimm_realize
Patch [2] remove pcdimm realize-callback
v2:
* fix warning in Patch 1
* split Patch 2 into two
Wei Yang (3):
pc-dimm: remove check on
Function acpi_memory_plug_cb() is only invoked when dev is a PCDIMM,
which is hotpluggable. This means it is not necessary to check this
property again.
This patch removes this check.
Signed-off-by: Wei Yang
Reviewed-by: Philippe Mathieu-Daudé
---
v2:
* remove unused dc
---
realize callback in introduced to check if the backend memory is large
enough to contain label data and init its memory region, while this task
is handled in pre_plug stage.
Now it's time to remove it.
Signed-off-by: Wei Yang
---
hw/mem/pc-dimm.c | 5 -
include/hw/mem/pc-dimm.h | 3
Since iov_size() returns a size_t, no need to use a signed type.
Signed-off-by: Philippe Mathieu-Daudé
---
net/filter-mirror.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/filter-mirror.c b/net/filter-mirror.c
index 3a61cf21e8..97b52d0544 100644
---
A througfull audit show that all time data is added to outbuf[],
'outlen' is incremented. Then at creation and each time
continue_send() returns it pass thru check_reset which resets
'outpos', thus we always have 'outlen >= outpos'.
Also due to the check on entry, we know outlen != 0.
We can then
The buffer.size and buffer.consumed fields are only updated within the
buffer_append() body. We can simply let buffer_append() return the
difference (the buffer consumed).
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/xen_console.c | 13 -
1 file changed, 8 insertions(+), 5
TabletChardev::query is an array of uint8_t.
Use the same type to hold it (this also silent a -Wsign-conversion
warning in the trace function).
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/trace-events | 2 +-
chardev/wctablet.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
IOWatchPoll::fd_can_read() really is a GSourceFunc type, it simply
returns a boolean value.
Update the backends to return a boolean, whether there is data to
read from the source or not.
Suggested-by: Paolo Bonzini
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/char-fd.c | 4 ++--
We now know all callers use a size_t argument. We can
convert qemu_chr_write() and qemu_chr_write_all() to
use a size_t argument.
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/char.c | 8
include/chardev/char.h | 2 +-
include/sysemu/replay.h | 2 +-
replay/replay-char.c
The backend should not return a negative length to read.
We will later change the prototype of IOCanReadHandler to return an
unsigned length. Meanwhile make sure the return length is positive.
Suggested-by: Paolo Bonzini
Signed-off-by: Philippe Mathieu-Daudé
---
chardev/char.c | 5 -
1
All caller have been audited and call these functions with
unsigned arguments.
Most of them use a size_t argument, or directly pass sizeof().
One case is unclear: the mux_chr_write() call in chardev/char-mux.c.
There we add an assert (which will be removed in few patches) and
cast the parameter
Since all callers provide an unsigned value, we can safely
use a size_t argument.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/char/sclpconsole-lm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c
index
On Wed, Feb 20, 2019 at 02:26:16AM +0100, Philippe Mathieu-Daudé wrote:
>On 2/20/19 1:51 AM, Wei Yang wrote:
>> realize callback in introduced to check if the backend memory is large
>> enough to contain label data and init its memory region, while this task
>> is handled in pre_plug stage.
>>
>>
On Tue, Feb 19, 2019 at 09:06:42PM +0800, Jason Wang wrote:
>
> On 2019/2/19 下午6:40, Wei Xu wrote:
> >On Tue, Feb 19, 2019 at 03:19:58PM +0800, Jason Wang wrote:
> >>On 2019/2/14 下午12:26, w...@redhat.com wrote:
> >>>From: Wei Xu
> >>>
> >>>Difference between 'avail_wrap_counter' and
On Wed, Feb 20, 2019 at 02:02:22AM +0100, Philippe Mathieu-Daudé wrote:
> Both callers (h_put_term_char and rtas_display_character) use
> an unsigned value.
>
> Signed-off-by: Philippe Mathieu-Daudé
Acked-by: David Gibson
> ---
> hw/char/spapr_vty.c| 2 +-
>
On Wed, Feb 20, 2019 at 02:02:10AM +0100, Philippe Mathieu-Daudé wrote:
> TabletChardev::query is an array of uint8_t.
> Use the same type to hold it (this also silent a -Wsign-conversion
> warning in the trace function).
>
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Gerd Hoffmann
>
On 2019/2/20 下午12:01, Wei Xu wrote:
AFAICT, virtqueue_fill() is a generic API for all relevant userspace virtio
devices that do not support batching , without touching virtqueue_fill(),
supporting batching changes the meaning of the parameter 'idx' which should
be kept overall.
To fix it, I
On Wed, Feb 20, 2019 at 02:02:15AM +0100, Philippe Mathieu-Daudé wrote:
> The 'size' value is of type 'guint' which is already unsigned.
> Remove the useless cast.
>
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Gerd Hoffmann
201 - 300 of 405 matches
Mail list logo