Re: [Qemu-devel] [PATCH v2] iscsi: Refuse to open as writable if the LUN is write protected

2014-10-30 Thread Peter Lieven
On 30.10.2014 12:23, Fam Zheng wrote: Before, when a write protected iSCSI target is attached as scsi-disk with BDRV_O_RDWR, we report it as writable, while in fact all writes will fail. One way to improve this is to report write protect flag as true to guest, but a even better way is to refuse

Re: [Qemu-devel] [PATCH 00/17] RFC: userfault v2

2014-10-30 Thread zhanghailiang
On 2014/10/30 1:46, Andrea Arcangeli wrote: Hi Zhanghailiang, On Mon, Oct 27, 2014 at 05:32:51PM +0800, zhanghailiang wrote: Hi Andrea, Thanks for your hard work on userfault;) This is really a useful API. I want to confirm a question: Can we support distinguishing between writing and readin

Re: [Qemu-devel] [PATCH 03/17] scsi: Rename scsi_cdb_length() to scsi_xfer_length()

2014-10-30 Thread Hannes Reinecke
On 10/30/2014 11:38 AM, Paolo Bonzini wrote: > > > On 10/29/2014 08:53 AM, Hannes Reinecke wrote: >> scsi_cdb_length() does not return the length of the cdb, but >> the transfersize encoded in the cdb. So rename it to scsi_xfer_length() >> and add a new scsi_cdb_length() which actually does retur

[Qemu-devel] [PATCH v2] iscsi: Refuse to open as writable if the LUN is write protected

2014-10-30 Thread Fam Zheng
Before, when a write protected iSCSI target is attached as scsi-disk with BDRV_O_RDWR, we report it as writable, while in fact all writes will fail. One way to improve this is to report write protect flag as true to guest, but a even better way is to refuse using a write protected LUN to guest. T

Re: [Qemu-devel] [PATCH v5] Support vhd type VHD_DIFFERENCING

2014-10-30 Thread Stefan Hajnoczi
On Wed, Oct 29, 2014 at 09:30:31PM +0800, Xiaodong Gong wrote: > On 10/28/14, Stefan Hajnoczi wrote: > > On Wed, Oct 08, 2014 at 08:42:32PM +0800, Xiaodong Gong wrote: > >> +#define PLATFORM_MACX 0x5863614d /* big endian */ > >> +#define PLATFORM_W2RU 0x75723257 ... > >> +static int vpc_read_backi

Re: [Qemu-devel] MSI interrupt support with vioscsi.c miniport driver

2014-10-30 Thread Vadim Rozenfeld
On Thu, 2014-10-30 at 18:28 +0800, Wangting (Kathy) wrote: > > On 2014-10-30 16:48, Vadim Rozenfeld wrote: > > On Thu, 2014-10-30 at 14:54 +0800, Wangting (Kathy) wrote: > >>> On Tue, 2014-02-18 at 13:11 -0800, Nicholas A. Bellinger wrote: > On Tue, 2014-02-18 at 13:00 -0800, Nicholas A. Bell

Re: [Qemu-devel] [PATCH] kvmvapic: patch_instruction fix

2014-10-30 Thread Paolo Bonzini
On 10/30/2014 10:31 AM, Pavel Dovgalyuk wrote: > When QEMU works in icount mode cpu_restore_state function performs two > actions: > restoring the program counter and updating icount to the correct value. > kvmvapic's patch_instruction function is called by cpu_report_tpr_access > function which

Re: [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives

2014-10-30 Thread Christian Borntraeger
Am 30.10.2014 10:58, schrieb Peter Maydell: > On 30 October 2014 09:50, Christian Borntraeger > wrote: >> Yes, I will try to get some of this fixed in valgrind as well. This will >> take a little longer though because the code changes are bigger than just >> 1 line of code. Given that valgrind ha

Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-30 Thread Stefan Hajnoczi
On Tue, Oct 28, 2014 at 09:28:26PM -0400, John Snow wrote: > On 10/28/2014 08:27 PM, Paolo Bonzini wrote: > In the meantime: > Patches 1, 2, and 6 are fine and should be merged. I have also fixed patch > 3, but I can submit that by itself a little later. In case I forgot to reply yesterday, I have

Re: [Qemu-devel] [PATCH] virtio-9p-proxy: improve error messages in connect_namedsocket()

2014-10-30 Thread Gonglei
On 2014/10/30 16:06, Michael Tokarev wrote: > Signed-off-by: Michael Tokarev > --- > hw/9pfs/virtio-9p-proxy.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH] iscsi: Refuse to open as writable if the LUN is write protected

2014-10-30 Thread Peter Lieven
On 30.10.2014 11:50, Fam Zheng wrote: On Thu, 10/30 11:27, Peter Lieven wrote: On 29.10.2014 19:28, Paolo Bonzini wrote: On 10/29/2014 05:18 PM, Peter Lieven wrote: Am 29.10.2014 um 14:31 schrieb Paolo Bonzini: On 10/29/2014 02:13 PM, Fam Zheng wrote: Before, when a write protected iSCSI tar

Re: [Qemu-devel] [Qemu-trivial] [PATCH] virtio-9p-proxy: Fix sockfd leak and modify the check logic

2014-10-30 Thread Gonglei
On 2014/10/30 16:03, Michael Tokarev wrote: > 29.10.2014 13:52, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> If connect() return false, the sockfd will leak, >> meanwhile proxy_init() can't check the return value >> of connect_namedsocket(), maybe cause unpredictable >> results. >> >> Le

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread Gonglei
On 2014/10/30 17:23, Markus Armbruster wrote: > Michael Tokarev writes: > >> 30.10.2014 10:10, Markus Armbruster wrote: >>> writes: >>> From: Gonglei After commit 4c7e251a (), when dump memory completed, the s->fd will be closed twice. We should return directly when du

Re: [Qemu-devel] [PATCH] iscsi: Refuse to open as writable if the LUN is write protected

2014-10-30 Thread Fam Zheng
On Thu, 10/30 11:27, Peter Lieven wrote: > On 29.10.2014 19:28, Paolo Bonzini wrote: > >On 10/29/2014 05:18 PM, Peter Lieven wrote: > >>Am 29.10.2014 um 14:31 schrieb Paolo Bonzini: > >>>On 10/29/2014 02:13 PM, Fam Zheng wrote: > Before, when a write protected iSCSI target is attached as scsi-d

Re: [Qemu-devel] [Nbd] spec, RFC: TLS support for NBDµ

2014-10-30 Thread Stefan Hajnoczi
On Sat, Oct 25, 2014 at 12:43:35PM +0200, Wouter Verhelst wrote: > I haven't seen a reply to this anymore. Do people still have comments? > I'm planning on doing a release of nbd later this weekend, and would > like to include this (not the TLS implementation yet, but at least the > spec) Hi Woute

Re: [Qemu-devel] [PATCH 03/17] scsi: Rename scsi_cdb_length() to scsi_xfer_length()

2014-10-30 Thread Paolo Bonzini
On 10/29/2014 08:53 AM, Hannes Reinecke wrote: > scsi_cdb_length() does not return the length of the cdb, but > the transfersize encoded in the cdb. So rename it to scsi_xfer_length() > and add a new scsi_cdb_length() which actually does return the > length of the cdb. This makes sense, but it m

Re: [Qemu-devel] MSI interrupt support with vioscsi.c miniport driver

2014-10-30 Thread Wangting (Kathy)
On 2014-10-30 16:48, Vadim Rozenfeld wrote: > On Thu, 2014-10-30 at 14:54 +0800, Wangting (Kathy) wrote: >>> On Tue, 2014-02-18 at 13:11 -0800, Nicholas A. Bellinger wrote: On Tue, 2014-02-18 at 13:00 -0800, Nicholas A. Bellinger wrote: > On Mon, 2014-02-10 at 11:05 -0800, Nicholas A. Be

Re: [Qemu-devel] [PATCH] iscsi: Refuse to open as writable if the LUN is write protected

2014-10-30 Thread Peter Lieven
On 29.10.2014 19:28, Paolo Bonzini wrote: On 10/29/2014 05:18 PM, Peter Lieven wrote: Am 29.10.2014 um 14:31 schrieb Paolo Bonzini: On 10/29/2014 02:13 PM, Fam Zheng wrote: Before, when a write protected iSCSI target is attached as scsi-disk with BDRV_O_RDWR, we report it as writable, while in

Re: [Qemu-devel] [Qemu-trivial] [PATCH] vmdk: Fix cylinders number during convert

2014-10-30 Thread Fam Zheng
On Thu, 10/30 10:09, Arthur Gautier wrote: > On Wed, Oct 29, 2014 at 09:28:52AM +0800, Fam Zheng wrote: > > On Tue, 10/28 16:00, Stefan Hajnoczi wrote: > > > On Thu, Oct 23, 2014 at 10:03:25AM +0200, Markus Armbruster wrote: > > > > Michael Tokarev writes: > > > > > > > > > On 10/22/2014 05:25 PM

Re: [Qemu-devel] Bug in recent postcopy patch

2014-10-30 Thread Dr. David Alan Gilbert
* Gary Hook (gary.h...@nimboxx.com) wrote: > *Knock* *knock* *knock* Is this thing on? Yes - but only by luck did I notice this; it's normally better to reply to the thread that posted a patch and cc the authors! > I applied the 47 pieces of the recent postcopy patch to 2.1.2 and am > poking arou

Re: [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives

2014-10-30 Thread Peter Maydell
On 30 October 2014 09:50, Christian Borntraeger wrote: > Yes, I will try to get some of this fixed in valgrind as well. This will > take a little longer though because the code changes are bigger than just > 1 line of code. Given that valgrind has around 1 release/year, this patch > set is certain

Re: [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives

2014-10-30 Thread Christian Borntraeger
Am 30.10.2014 10:46, schrieb Peter Maydell: > On 30 October 2014 09:36, Christian Borntraeger > wrote: >> This series avoids most memcheck false positives in KVM ioctls on s390x >> and x86_64. >> >> Please review and consider for 2.2 or later. Some of these things could >> also be fixed in valgri

Re: [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives

2014-10-30 Thread Peter Maydell
On 30 October 2014 09:36, Christian Borntraeger wrote: > This series avoids most memcheck false positives in KVM ioctls on s390x > and x86_64. > > Please review and consider for 2.2 or later. Some of these things could > also be fixed in valgrind, but it will take a while until these changes > hit

[Qemu-devel] [PATCH 7/9] valgrind/i386: avoid false positives on KVM_GET_MSRS ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_msrs contains a pad field. Lets initialize this pad field. A designated initializer seems not appropriate here, as struct kvm_msrs is embedded in the msr_data structure. Signed-off-by: Christian Borntraeger --- target-i386/kvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/targ

[Qemu-devel] [PATCH 1/9] valgrind: avoid false positives in KVM_GET_DIRTY_LOG ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_dirty_log contains padding fields that trigger false positives in valgrind. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvm-al

[Qemu-devel] [PATCH 4/9] valgrind/i386: avoid false positives on KVM_SET_XCRS ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_xcrs contains padding bytes. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- target-i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index d

[Qemu-devel] [PATCH 3/9] valgrind/i386: avoid false positives on KVM_SET_PIT ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_pit_state2 contains pad fields. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- hw/i386/kvm/i8254.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.

[Qemu-devel] [PATCH 6/9] valgrind/i386: avoid false positives on KVM_SET_MSRS(TSC) ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_msrs contains pad fields. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger

[Qemu-devel] [PATCH 9/9] valgrind/s390x: avoid false positives on KVM_SET_FPU ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_fpu contains an alignment padding on s390x. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/kvm.c b/target-s

[Qemu-devel] [PATCH 5/9] valgrind/i386: avoid false positives on KVM_SET_MSRS ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_msrs contains padding bytes. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- target-i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index e

[Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives

2014-10-30 Thread Christian Borntraeger
This series avoids most memcheck false positives in KVM ioctls on s390x and x86_64. Please review and consider for 2.2 or later. Some of these things could also be fixed in valgrind, but it will take a while until these changes hit a release or distros. The series is also available via signed tag

[Qemu-devel] [PATCH 2/9] valgrind/i386: avoid false positives on KVM_SET_CLOCK ioctl

2014-10-30 Thread Christian Borntraeger
kvm_clock_data contains pad fields. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- hw/i386/kvm/clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c ind

[Qemu-devel] [PATCH 8/9] valgrind/i386: avoid false positives on KVM_SET_VCPU_EVENTS ioctl

2014-10-30 Thread Christian Borntraeger
struct kvm_vcpu_events contains reserved fields. Let's use a designated initializer to avoid false positives in valgrind. Signed-off-by: Christian Borntraeger --- target-i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 900

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-30 Thread Kevin Wolf
Am 30.10.2014 um 10:27 hat Stefan Hajnoczi geschrieben: > On Thu, Oct 30, 2014 at 10:08:46AM +0100, Max Reitz wrote: > > Also, I like Kevin's proposal/Anthony's approach a lot more because of its > > principle. If a guest can overwrite the beginning of the image so it looks > > like an image format

[Qemu-devel] [PATCH] kvmvapic: patch_instruction fix

2014-10-30 Thread Pavel Dovgalyuk
When QEMU works in icount mode cpu_restore_state function performs two actions: restoring the program counter and updating icount to the correct value. kvmvapic's patch_instruction function is called by cpu_report_tpr_access function which also invokes cpu_restore_state. It results to calling cpu_r

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-30 Thread Kevin Wolf
Am 29.10.2014 um 14:54 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > Instead, let me try once more to sell my old proposal [1] from the > > thread you mentioned: > > > >> What if we let the raw driver know that it was probed and then it > >> enables a check that returns -EIO for any

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-30 Thread Stefan Hajnoczi
On Thu, Oct 30, 2014 at 10:08:46AM +0100, Max Reitz wrote: > Also, I like Kevin's proposal/Anthony's approach a lot more because of its > principle. If a guest can overwrite the beginning of the image so it looks > like an image format, that's the real bug. Afterwards, anyone will recognize > that

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-30 Thread Stefan Hajnoczi
On Thu, Oct 30, 2014 at 10:07:26AM +0100, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Wed, Oct 29, 2014 at 02:54:32PM +0100, Markus Armbruster wrote: > >> Kevin Wolf writes: > >> > >> > Am 28.10.2014 um 17:03 hat Markus Armbruster geschrieben: > >> > Instead, let me try once mor

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread Markus Armbruster
Michael Tokarev writes: > 30.10.2014 10:10, Markus Armbruster wrote: >> writes: >> >>> From: Gonglei >>> >>> After commit 4c7e251a (), when dump memory completed, >>> the s->fd will be closed twice. We should return >>> directly when dump completed. >>> >>> Using do/while block, make the badly

Re: [Qemu-devel] [PATCH RFC 07/11] dataplane: allow virtio-1 devices

2014-10-30 Thread Cornelia Huck
On Tue, 28 Oct 2014 16:22:54 +0100 Greg Kurz wrote: > On Tue, 7 Oct 2014 16:40:03 +0200 > Cornelia Huck wrote: > > > Handle endianness conversion for virtio-1 virtqueues correctly. > > > > Note that dataplane now needs to be built per-target. > > > > It also affects hw/virtio/virtio-pci.c:

Re: [Qemu-devel] [Qemu-trivial] [PATCH] vmdk: Fix cylinders number during convert

2014-10-30 Thread Arthur Gautier
On Wed, Oct 29, 2014 at 09:28:52AM +0800, Fam Zheng wrote: > On Tue, 10/28 16:00, Stefan Hajnoczi wrote: > > On Thu, Oct 23, 2014 at 10:03:25AM +0200, Markus Armbruster wrote: > > > Michael Tokarev writes: > > > > > > > On 10/22/2014 05:25 PM, Arthur Gautier wrote: > > > >> We can not rely on int

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-30 Thread Max Reitz
On 2014-10-28 at 17:03, Markus Armbruster wrote: If the user neglects to specify the image format, QEMU probes the image to guess it automatically, for convenience. Relying on format probing is insecure for raw images (CVE-2008-2004). If the guest writes a suitable header to the device, the next

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-30 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Wed, Oct 29, 2014 at 02:54:32PM +0100, Markus Armbruster wrote: >> Kevin Wolf writes: >> >> > Am 28.10.2014 um 17:03 hat Markus Armbruster geschrieben: >> >> If the user neglects to specify the image format, QEMU probes the >> >> image to guess it automatically, for

Re: [Qemu-devel] MSI interrupt support with vioscsi.c miniport driver

2014-10-30 Thread Vadim Rozenfeld
On Thu, 2014-10-30 at 14:54 +0800, Wangting (Kathy) wrote: > > On Tue, 2014-02-18 at 13:11 -0800, Nicholas A. Bellinger wrote: > >> On Tue, 2014-02-18 at 13:00 -0800, Nicholas A. Bellinger wrote: > >> > On Mon, 2014-02-10 at 11:05 -0800, Nicholas A. Bellinger wrote: > >> > > >> > > >> > > >> > >

Re: [Qemu-devel] [PATCH v6] numa: make 'info numa' take into account hotplugged memory

2014-10-30 Thread zhanghailiang
Hi Michael, Can you help applying this patch to -trivial branch? It has been reviewed, and it mainly fix bug for hmp command of 'info numa'. Which i don't know if it should go qemu-stable, for this is not a blocker. Maybe go trivial branch is a better choice. Thanks, zhanghailiang On 2014/10/2

[Qemu-devel] [PATCH] virtio-9p-proxy: improve error messages in connect_namedsocket()

2014-10-30 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/9pfs/virtio-9p-proxy.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c index 2ec211b..59c7445 100644 --- a/hw/9pfs/virtio-9p-proxy.c +++ b/hw/9pfs/virtio-9p-proxy.c @@ -1104,14 +

Re: [Qemu-devel] [Qemu-trivial] [PATCH] virtio-9p-proxy: Fix sockfd leak and modify the check logic

2014-10-30 Thread Michael Tokarev
29.10.2014 13:52, arei.gong...@huawei.com wrote: > From: Gonglei > > If connect() return false, the sockfd will leak, > meanwhile proxy_init() can't check the return value > of connect_namedsocket(), maybe cause unpredictable > results. > > Let's move the sock_id check logic out, which can > che

Re: [Qemu-devel] [PATCH v2 12/20] target-mips: add MSA BIT format instructions

2014-10-30 Thread Leon Alrae
On 29/10/14 01:42, Yongbok Kim wrote: > +uint8_t wd = (ctx->opcode >> 6) & 0x1f; > + > +if ((dfm & 0x40) == 0x00) { > +m = dfm & 0x3f; > +df = DF_DOUBLE; > +} else if ((dfm & 0x60) == 0x40) { > +m = dfm & 0x1f; > +df = DF_WORD; > +} else if ((dfm & 0x

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-30 Thread Chen, Tiejun
Sorry some urgent things always procrastinate on my response. On 2014/10/24 21:47, Michael S. Tsirkin wrote: On Fri, Oct 24, 2014 at 03:36:20PM +0800, Chen, Tiejun wrote: I think the point was mostly to reserve 1f to prevent devices from using it. As we populate slots in order it doesn't seem t

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread Michael Tokarev
30.10.2014 10:10, Markus Armbruster wrote: > writes: > >> From: Gonglei >> >> After commit 4c7e251a (), when dump memory completed, >> the s->fd will be closed twice. We should return >> directly when dump completed. >> >> Using do/while block, make the badly chosen return >> values of get_next_

Re: [Qemu-devel] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread zhanghailiang
On 2014/10/30 15:10, Markus Armbruster wrote: writes: From: Gonglei After commit 4c7e251a (), when dump memory completed, the s->fd will be closed twice. We should return directly when dump completed. Using do/while block, make the badly chosen return values of get_next_block() more visible

Re: [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by default

2014-10-30 Thread Paolo Bonzini
> Here I'm less certain what the best approach is. As you point out, > there's an inconsistency that I agree should be fixed. I wonder however > whether an approach similar to 3/6 for KVM only would be better? I.e., > have VMX as a sometimes-KVM-supported feature be listed in the model and > filte

[Qemu-devel] [PATCH] scsi-bus: Don't mask rc of scsi_req_parse_cdb

2014-10-30 Thread Fam Zheng
If the previous call failed, we can skip the second one. Signed-off-by: Fam Zheng --- hw/scsi/scsi-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index af7707c..0661f70 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@

Re: [Qemu-devel] [PATCH] target-tricore: check return value before using it

2014-10-30 Thread Bastian Koppelmann
Geez, thanks. I wonder how I missed that. Reviewed-by: Bastian Koppelmann On 10/30/2014 02:03 AM, zhanghailiang wrote: We reference the return value of cpu before checking whether it is NULL, The checking code is after that which violates code style. It makes no difference if the cpu is NULL,

Re: [Qemu-devel] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread Markus Armbruster
writes: > From: Gonglei > > After commit 4c7e251a (), when dump memory completed, > the s->fd will be closed twice. We should return > directly when dump completed. > > Using do/while block, make the badly chosen return > values of get_next_block() more visible and fix > this issue. > > Signed-o

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-tricore: check return value before using it

2014-10-30 Thread Michael Tokarev
30.10.2014 05:03, zhanghailiang wrote: > We reference the return value of cpu before checking whether it is NULL, > The checking code is after that which violates code style. Applied, thanks! /mjt