search for: 0xffffffffull

Displaying 20 results from an estimated 27 matches for "0xffffffffull".

2013 May 29
2
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...+++ b/hw/virtio/virtio-pci.c > @@ -467,51 +467,70 @@ static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, > { > VirtIOPCIProxy *proxy = opaque; > VirtIODevice *vdev = proxy->vdev; > + struct virtio_pci_common_cfg cfg; > > uint64_t low = 0xffffffffull; > > switch (addr) { > case offsetof(struct virtio_pci_common_cfg, device_feature_select): > + assert(size == sizeof cfg.device_feature_select); > return proxy->device_feature_select; Asserting is definitely the wrong thing here, since the guest can trig...
2013 May 28
5
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...+static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, > > + unsigned size) > > +{ > > + VirtIOPCIProxy *proxy = opaque; > > + VirtIODevice *vdev = proxy->vdev; > > + > > + uint64_t low = 0xffffffffull; > > + > > + switch (addr) { > > + case offsetof(struct virtio_pci_common_cfg, device_feature_select): > > + return proxy->device_feature_select; > > Oh dear no... Please use defines like the rest of QEMU. Any good reason not to use offsetof? I see a...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
..._((packed)); + +/* XXX This hack can only be used with passthrough TSC */ +static inline unsigned long long get_tsc(void) +{ + unsigned long long tsc; + asm volatile("rdtsc" : "=&A" (tsc)); + return tsc; +} + +static unsigned long long hypercall_cycles = 0xffffffffULL; +static void time_hypercall(void) +{ + unsigned long long tsc_start, tsc_end, cycles; + int i; + for (i = 0; i < 1000; i++) { + tsc_start = get_tsc(); + vmi_rdtsc(); + tsc_end = get_tsc(); + cycles = tsc_end - tsc_start; + if (cycles < hypercall_cycles) + hypercall_cycles = cycles; +...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
..._((packed)); + +/* XXX This hack can only be used with passthrough TSC */ +static inline unsigned long long get_tsc(void) +{ + unsigned long long tsc; + asm volatile("rdtsc" : "=&A" (tsc)); + return tsc; +} + +static unsigned long long hypercall_cycles = 0xffffffffULL; +static void time_hypercall(void) +{ + unsigned long long tsc_start, tsc_end, cycles; + int i; + for (i = 0; i < 1000; i++) { + tsc_start = get_tsc(); + vmi_rdtsc(); + tsc_end = get_tsc(); + cycles = tsc_end - tsc_start; + if (cycles < hypercall_cycles) + hypercall_cycles = cycles; +...
2013 May 29
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -467,51 +467,70 @@ static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, { VirtIOPCIProxy *proxy = opaque; VirtIODevice *vdev = proxy->vdev; + struct virtio_pci_common_cfg cfg; uint64_t low = 0xffffffffull; switch (addr) { case offsetof(struct virtio_pci_common_cfg, device_feature_select): + assert(size == sizeof cfg.device_feature_select); return proxy->device_feature_select; case offsetof(struct virtio_pci_common_cfg, device_feature): + assert(size == size...
2013 May 29
6
[PATCH RFC] virtio-pci: new config layout: using memory BAR
Anthony Liguori <aliguori at us.ibm.com> writes: > "Michael S. Tsirkin" <mst at redhat.com> writes: >> + case offsetof(struct virtio_pci_common_cfg, device_feature_select): >> + return proxy->device_feature_select; > > Oh dear no... Please use defines like the rest of QEMU. It is pretty ugly. Yet the structure definitions are descriptive,
2013 May 29
6
[PATCH RFC] virtio-pci: new config layout: using memory BAR
Anthony Liguori <aliguori at us.ibm.com> writes: > "Michael S. Tsirkin" <mst at redhat.com> writes: >> + case offsetof(struct virtio_pci_common_cfg, device_feature_select): >> + return proxy->device_feature_select; > > Oh dear no... Please use defines like the rest of QEMU. It is pretty ugly. Yet the structure definitions are descriptive,
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...tio_pci_config_write(void *opaque, hwaddr addr, } } +static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, + unsigned size) +{ + VirtIOPCIProxy *proxy = opaque; + VirtIODevice *vdev = proxy->vdev; + + uint64_t low = 0xffffffffull; + + switch (addr) { + case offsetof(struct virtio_pci_common_cfg, device_feature_select): + return proxy->device_feature_select; + case offsetof(struct virtio_pci_common_cfg, device_feature): + /* TODO: 64-bit features */ + return proxy->device_feature_select ? 0 : pro...
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...tio_pci_config_write(void *opaque, hwaddr addr, } } +static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, + unsigned size) +{ + VirtIOPCIProxy *proxy = opaque; + VirtIODevice *vdev = proxy->vdev; + + uint64_t low = 0xffffffffull; + + switch (addr) { + case offsetof(struct virtio_pci_common_cfg, device_feature_select): + return proxy->device_feature_select; + case offsetof(struct virtio_pci_common_cfg, device_feature): + /* TODO: 64-bit features */ + return proxy->device_feature_select ? 0 : pro...
2016 Jun 17
2
Attempt to modify memory sanitizer for support of X86
...ngDesc::ORIGIN, "origin-2"}, + {0x80000000ULL, 0x90000000ULL, MappingDesc::SHADOW, "shadow-3"}, + {0x90000000ULL, 0xa0000000ULL, MappingDesc::ORIGIN, "origin-3"}, + {0xa0000000ULL, 0xf0000000ULL, MappingDesc::INVALID, "invalid"}, + {0xf0000000ULL, 0xffffffffULL, MappingDesc::APP, "app-3"}, +}; +#define MOVE_MEM(mem) \ + ((uptr)(mem) & ~0x80000000ULL) +#define MEM_TO_SHADOW(mem) (MOVE_MEM((mem)) + 0x10000000ULL) +#define SHADOW_TO_ORIGIN(mem) (((uptr)(mem)) + 0x10000000ULL) + #elif SANITIZER_LINUX && SANITIZER_WORDSIZE == 64 #ifdef...
2013 May 28
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...pci_config_common_read(void *opaque, hwaddr addr, >> > + unsigned size) >> > +{ >> > + VirtIOPCIProxy *proxy = opaque; >> > + VirtIODevice *vdev = proxy->vdev; >> > + >> > + uint64_t low = 0xffffffffull; >> > + >> > + switch (addr) { >> > + case offsetof(struct virtio_pci_common_cfg, device_feature_select): >> > + return proxy->device_feature_select; >> >> Oh dear no... Please use defines like the rest of QEMU. > > Any good re...
2013 May 29
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...gt; @@ -467,51 +467,70 @@ static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, > > { > > VirtIOPCIProxy *proxy = opaque; > > VirtIODevice *vdev = proxy->vdev; > > + struct virtio_pci_common_cfg cfg; > > > > uint64_t low = 0xffffffffull; > > > > switch (addr) { > > case offsetof(struct virtio_pci_common_cfg, device_feature_select): > > + assert(size == sizeof cfg.device_feature_select); > > return proxy->device_feature_select; > > Asserting is definitely the wrong t...
2013 May 28
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...t; } > } > > +static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, > + unsigned size) > +{ > + VirtIOPCIProxy *proxy = opaque; > + VirtIODevice *vdev = proxy->vdev; > + > + uint64_t low = 0xffffffffull; > + > + switch (addr) { > + case offsetof(struct virtio_pci_common_cfg, device_feature_select): > + return proxy->device_feature_select; Oh dear no... Please use defines like the rest of QEMU. >From a QEMU pov, take a look at: https://github.com/aliguori/qemu/com...
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. If you see issues or are just curious, you can turn the new feature off. For example: -global virtio-net-pci.event_idx=on -global virtio-blk-pci.event_idx=off Also, it's possible to try both
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. If you see issues or are just curious, you can turn the new feature off. For example: -global virtio-net-pci.event_idx=on -global virtio-blk-pci.event_idx=off Also, it's possible to try both
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not spend a lot of time testing performance. I hope others will try this out and report. Note: there
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not spend a lot of time testing performance. I hope others will try this out and report. Note: there
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
Attached is a working patch set for llvm to be able to emit arm64 (currently as triple aarch64-apple-ios) mach-o object files, in case someone is interested. I'm not sure if the llvm maintainers want the patch given the previous message that there's going to be an official patch set from apple to support this, but here is mine. What works (tested on an iPhone 5S): * objc strings,
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
I'm seeking feedback on multi-platform support for virtio-iommu. At the moment only devicetree (DT) is supported and we don't have a pleasant solution for other platforms. Once we figure out the topology description, x86 support is trivial. Since the IOMMU manages memory accesses from other devices, the guest kernel needs to initialize the IOMMU before endpoints start issuing DMA.
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
I'm seeking feedback on multi-platform support for virtio-iommu. At the moment only devicetree (DT) is supported and we don't have a pleasant solution for other platforms. Once we figure out the topology description, x86 support is trivial. Since the IOMMU manages memory accesses from other devices, the guest kernel needs to initialize the IOMMU before endpoints start issuing DMA.