Re: [Qemu-devel] [PATCH] hw/9pfs/virtio_9p_device: use virtio wrappers to access headers.

2014-02-10 Thread Alexey Kardashevskiy
Is anyone going to pull this series anywhere? Thanks!


On Tue, Nov 26, 2013 at 1:56 AM, Greg Kurz gk...@linux.vnet.ibm.com wrote:

 Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p.

 Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com
 ---
  hw/9pfs/virtio-9p-device.c |3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

 diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
 index f0ffbe8..72ef60a 100644
 --- a/hw/9pfs/virtio-9p-device.c
 +++ b/hw/9pfs/virtio-9p-device.c
 @@ -19,6 +19,7 @@
  #include fsdev/qemu-fsdev.h
  #include virtio-9p-xattr.h
  #include virtio-9p-coth.h
 +#include hw/virtio/virtio-access.h

  static uint32_t virtio_9p_get_features(VirtIODevice *vdev, uint32_t
 features)
  {
 @@ -34,7 +35,7 @@ static void virtio_9p_get_config(VirtIODevice *vdev,
 uint8_t *config)

  len = strlen(s-tag);
  cfg = g_malloc0(sizeof(struct virtio_9p_config) + len);
 -stw_raw(cfg-tag_len, len);
 +virtio_stw_p(cfg-tag_len, len);
  /* We don't copy the terminating null to config space */
  memcpy(cfg-tag, s-tag, len);
  memcpy(config, cfg, s-config_size);





-- 
-- 
Alexey


[Qemu-devel] [PATCH] hw/9pfs/virtio_9p_device: use virtio wrappers to access headers.

2013-11-25 Thread Greg Kurz
Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p.

Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com
---
 hw/9pfs/virtio-9p-device.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index f0ffbe8..72ef60a 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -19,6 +19,7 @@
 #include fsdev/qemu-fsdev.h
 #include virtio-9p-xattr.h
 #include virtio-9p-coth.h
+#include hw/virtio/virtio-access.h
 
 static uint32_t virtio_9p_get_features(VirtIODevice *vdev, uint32_t features)
 {
@@ -34,7 +35,7 @@ static void virtio_9p_get_config(VirtIODevice *vdev, uint8_t 
*config)
 
 len = strlen(s-tag);
 cfg = g_malloc0(sizeof(struct virtio_9p_config) + len);
-stw_raw(cfg-tag_len, len);
+virtio_stw_p(cfg-tag_len, len);
 /* We don't copy the terminating null to config space */
 memcpy(cfg-tag, s-tag, len);
 memcpy(config, cfg, s-config_size);




Re: [Qemu-devel] [PATCH] hw/9pfs/virtio_9p_device: use virtio wrappers to access headers.

2013-09-10 Thread Rusty Russell
Greg Kurz gk...@linux.vnet.ibm.com writes:
 Follow-up to Rusty's virtio endianness serie: enough to get a working
 virtfs mount.

 Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p.

 Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com

Thanks!

I've reworked my patches in line with the anticipated KVM_GET_ONE_REG
from Mikey, and put this into the series.

Mikey, here's the template I assumed (needs CONFIG_KVM implementation of
kvmppc_update_spr_lpcr).

Cheers,
Rusty.

FIXME: Implement for KVM using KVM_GET_ONE_REG!

diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h
index 771cfbe..30d8af6 100644
--- a/target-ppc/kvm_ppc.h
+++ b/target-ppc/kvm_ppc.h
@@ -29,6 +29,7 @@ int kvmppc_clear_tsr_bits(PowerPCCPU *cpu, uint32_t tsr_bits);
 int kvmppc_or_tsr_bits(PowerPCCPU *cpu, uint32_t tsr_bits);
 int kvmppc_set_tcr(PowerPCCPU *cpu);
 int kvmppc_booke_watchdog_enable(PowerPCCPU *cpu);
+void kvmppc_update_spr_lpcr(PowerPCCPU *cpu);
 #ifndef CONFIG_USER_ONLY
 off_t kvmppc_alloc_rma(const char *name, MemoryRegion *sysmem);
 void *kvmppc_create_spapr_tce(uint32_t liobn, uint32_t window_size, int *pfd);
@@ -159,6 +160,10 @@ static inline bool kvmppc_has_cap_epr(void)
 {
 return false;
 }
+
+static inline void kvmppc_update_spr_lpcr(PowerPCCPU *cpu)
+{
+}
 #endif
 
 #ifndef CONFIG_KVM



[Qemu-devel] [PATCH] hw/9pfs/virtio_9p_device: use virtio wrappers to access headers.

2013-09-09 Thread Greg Kurz
Follow-up to Rusty's virtio endianness serie: enough to get a working
virtfs mount.

Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p.

Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com
---
 hw/9pfs/virtio-9p-device.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index f0ffbe8..bc2d0da 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -19,6 +19,7 @@
 #include fsdev/qemu-fsdev.h
 #include virtio-9p-xattr.h
 #include virtio-9p-coth.h
+#include hw/virtio/virtio-access.h
 
 static uint32_t virtio_9p_get_features(VirtIODevice *vdev, uint32_t features)
 {
@@ -34,7 +35,7 @@ static void virtio_9p_get_config(VirtIODevice *vdev, uint8_t 
*config)
 
 len = strlen(s-tag);
 cfg = g_malloc0(sizeof(struct virtio_9p_config) + len);
-stw_raw(cfg-tag_len, len);
+virtio_stl_p(cfg-tag_len, len);
 /* We don't copy the terminating null to config space */
 memcpy(cfg-tag, s-tag, len);
 memcpy(config, cfg, s-config_size);