+#endif /* !BLOCK_RAW_POSIX_H */
diff --git a/hw/atapi-pt.c b/hw/atapi-pt.c
new file mode 100644
-index 0000000..47ee6af
+index 0000000..92f2934
--- /dev/null
+++ b/hw/atapi-pt.c
-@@ -0,0 +1,1163 @@
+@@ -0,0 +1,1173 @@
+#include <utime.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+ /* A few commands need special attention */
+ switch(cmd_code)
+ {
++ case GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL:
++ // we don't allow locking, to prevent a VM from hogging the drive
++ if((s->io_buffer[4] & 1) == 0) // unlock
++ ide_atapi_cmd_ok(s);
++ else // lock
++ ide_atapi_pt_set_error(s, SENSE_ILLEGAL_REQUEST,
++ ASC_INV_FIELD_IN_CMD_PACKET, 0x70);
++
++ return;
++
+ case GPCMD_BLANK: // bigger timeout while blanking
+ cmd->timeout = 1000 * 60 * 80; // 80 mins
+ break;