* [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p
@ 2014-09-17 10:41 Paolo Bonzini
2014-09-17 10:47 ` Michael S. Tsirkin
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2014-09-17 10:41 UTC (permalink / raw)
To: qemu-devel; +Cc: mst
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/vhost-scsi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 7146e0e..308b393 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -23,6 +23,7 @@
#include "hw/virtio/vhost.h"
#include "hw/virtio/virtio-scsi.h"
#include "hw/virtio/virtio-bus.h"
+#include "hw/virtio/virtio-access.h"
/* Features supported by host kernel. */
static const int kernel_feature_bits[] = {
@@ -163,8 +164,8 @@ static void vhost_scsi_set_config(VirtIODevice *vdev,
VirtIOSCSIConfig *scsiconf = (VirtIOSCSIConfig *)config;
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
- if ((uint32_t) ldl_p(&scsiconf->sense_size) != vs->sense_size ||
- (uint32_t) ldl_p(&scsiconf->cdb_size) != vs->cdb_size) {
+ if ((uint32_t) virtio_ldl_p(vdev, &scsiconf->sense_size) != vs->sense_size ||
+ (uint32_t) virtio_ldl_p(vdev, &scsiconf->cdb_size) != vs->cdb_size) {
error_report("vhost-scsi does not support changing the sense data and CDB sizes");
exit(1);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p
2014-09-17 10:41 [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p Paolo Bonzini
@ 2014-09-17 10:47 ` Michael S. Tsirkin
2014-09-17 11:03 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2014-09-17 10:47 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Wed, Sep 17, 2014 at 12:41:13PM +0200, Paolo Bonzini wrote:
I'm guessing you are fixing cross-endian configs?
Commit log should mention this?
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/scsi/vhost-scsi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
> index 7146e0e..308b393 100644
> --- a/hw/scsi/vhost-scsi.c
> +++ b/hw/scsi/vhost-scsi.c
> @@ -23,6 +23,7 @@
> #include "hw/virtio/vhost.h"
> #include "hw/virtio/virtio-scsi.h"
> #include "hw/virtio/virtio-bus.h"
> +#include "hw/virtio/virtio-access.h"
>
> /* Features supported by host kernel. */
> static const int kernel_feature_bits[] = {
> @@ -163,8 +164,8 @@ static void vhost_scsi_set_config(VirtIODevice *vdev,
> VirtIOSCSIConfig *scsiconf = (VirtIOSCSIConfig *)config;
> VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
>
> - if ((uint32_t) ldl_p(&scsiconf->sense_size) != vs->sense_size ||
> - (uint32_t) ldl_p(&scsiconf->cdb_size) != vs->cdb_size) {
> + if ((uint32_t) virtio_ldl_p(vdev, &scsiconf->sense_size) != vs->sense_size ||
> + (uint32_t) virtio_ldl_p(vdev, &scsiconf->cdb_size) != vs->cdb_size) {
> error_report("vhost-scsi does not support changing the sense data and CDB sizes");
> exit(1);
> }
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p
2014-09-17 10:47 ` Michael S. Tsirkin
@ 2014-09-17 11:03 ` Paolo Bonzini
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-09-17 11:03 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
Il 17/09/2014 12:47, Michael S. Tsirkin ha scritto:
> On Wed, Sep 17, 2014 at 12:41:13PM +0200, Paolo Bonzini wrote:
>
> I'm guessing you are fixing cross-endian configs?
Yes. Found only by inspection, though.
> Commit log should mention this?
Will do.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-17 11:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 10:41 [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p Paolo Bonzini
2014-09-17 10:47 ` Michael S. Tsirkin
2014-09-17 11:03 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).